AI Cloud Architect

Semantic diffing of formal policies with anti-unification

AWSBlog post by Ferhat Erata and Remi DelmasAWS Artificial Intelligence Blog

A textual diff of two formal policies flags every cosmetic change and hides the one that alters behavior. This post shows how to compute a symbolic, deterministic semantic diff with an open-source anti-unification engine, so reviewers see only the genuine disagreements between two candidate authorization policies.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

An open-source anti-unification engine diffs candidate formal policies modulo declared algebra and domain rewrites, so reviewers see only real disagreements, such as an Or where the requirement says and.

Who it is for

Teams that generate authorization or agent policies with LLMs and need to review differences between candidate formalizations.

Key points

  • Declared rewrites and algebraic laws (associative, commutative, idempotent) hide presentational changes; remaining differences are kept as Variants nodes.
  • Compression ratio :cr of 0 means full agreement under the declared equalities; it does not prove correctness.
  • Pinned revision 5a7969ae is built from source with Rust; the engine is Apache-2.0 and the post's Verus verification covers only part of the code.