Equality Saturation as an Abstract Interpretation
cs.PL
Submitted: 2026-12-01
Updated: 2026-12-01
License: http://creativecommons.org/licenses/by/4.0/
The gist: Equality saturation is typically described as a technique for exploring program transformations without destructive edits, allowing the simultaneous exploration of many rewriting paths.
Abstract
Equality saturation is typically described as a technique for exploring program transformations without destructive edits, allowing the simultaneous exploration of many rewriting paths. This perspective is adequate for describing optimizers over term languages, but struggles to encompass important extensions, such as representing contextual rewrites or reasoning about programs with control flow. We instead propose to view equality saturation as an abstract interpretation, where the abstract domain represents variables as symbolic values conforming to a conjunction of equality constraints, and rewriting constitutes a local decreasing iteration that adds new equalities into the conjunction. This perspective affords a natural description of a flow-sensitive equality saturation and applies to programs with unstructured control flow. Standard abstract domains can be combined with equality saturation - we show that e-class analysis, a previously proposed analysis framework for e-graphs, constitutes adding analysis constraints over symbolic values into our domain. We describe how our abstract domain can be efficiently represented using versioned e-graphs. We implement equality saturation as an abstract interpretation in a prototype tool - we demonstrate its analysis capabilities on example programs and its efficiency due to a formulation of relational versioned equality saturation.
Related papers
- Omnidirectional type inference for ML: principality any way
- The Best of Times, the Worst of Times: Moment-Based Analysis of Probabilistic Cost Structures
- Formal Verification of an Out-of-Order Multiprocessor against an In-Order Weak-Memory ISA
- ETAS: An Effect-Typed Language for Agent Systems
- Fuss-free cumulative universes: theory and practice
- Function Contracts and Beyond: Machine-Checked Assurance Cases for Conformance of C Libraries to Their Requirements