# Semantic diffing with anti-unification compares formal policies by meaning, not text

> Original title: Semantic diffing of formal policies with anti-unification

- Source: AWS Machine Learning Blog
- Published: 2026-11-11T23:33:03.000Z
- Bad Influence: https://badinfluence.news/items/adjeogo4nvwrrz0agx8wdgwvp
- Original: https://aws.amazon.com/blogs/machine-learning/semantic-diffing-of-formal-policies-with-anti-unification/

## Summary

AWS Machine Learning Blog describes a semantic diff for formal policies that uses anti-unification over an e-graph to show shared structure and where two translations differ. The engine takes SMT-LIB, Cedar, Dogwood, OpenShell, or CEL policy encodings, with algebraic laws and domain rules supplied to justify equalities. If no differences remain, the policies are equivalent under those laws and rules.
