Reference. egg: Fast and Extensible Equality Saturation

Max Willsey, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt, Zachary Tatlock, Pavel Panchekha · · PDF · DOI · arXiv · pldb
An e-graph efficiently represents a congruence relation over many expressions. Although they were originally developed in the late 1970s for use in automated theorem provers, a more recent technique known as equality saturation repurposes e-graphs to implement state-of-the-art, rewrite-driven compiler optimizations and program synthesizers. However, e-graphs remain unspecialized for this newer use case. Equality saturation workloads exhibit distinct characteristics and often require ad-hoc e-graph extensions to incorporate transformations beyond purely syntactic rewrites. This work contributes two techniques that make e-graphs fast and extensible, specializing them to equality saturation. A new amortized invariant restoration technique called rebuilding takes advantage of equality saturation’s distinct workload, providing asymptotic speedups over current techniques in practice. A general mechanism called e-class analyses integrates domain-specific analyses into the e-graph, reducing the need for ad hoc manipulation. We implemented these techniques in a new open-source library called egg. Our case studies on three previously published applications of equality saturation highlight how egg’s performance and flexibility enable state-of-the-art results across diverse domains.

Cite

Cite as @willsey-2021-egg (helia, typst) · \cite{willsey-2021-egg} (LaTeX)
BibTeX
bibtex · 12 lines
@article{willsey-2021-egg,
 author = {Willsey, Max and Nandi, Chandrakana and Wang, Yisu Remy and Flatt, Oliver and Tatlock, Zachary and Panchekha, Pavel},
 title = {egg: Fast and Extensible Equality Saturation},
 journal = {Proc. ACM Program. Lang.},
 volume = {5},
 number = {POPL},
 year = {2021},
 month = jan,
 pages = {1--29},
 publisher = {Association for Computing Machinery},
 doi = {10.1145/3434304}
}
hayagriva YAML (typst)
yaml · 20 lines
willsey-2021-egg:
  type: article
  title: 'egg: Fast and Extensible Equality Saturation'
  author:
  - Willsey, Max
  - Nandi, Chandrakana
  - Wang, Yisu Remy
  - Flatt, Oliver
  - Tatlock, Zachary
  - Panchekha, Pavel
  date: 2021-01
  page-range: 1-29
  serial-number:
    doi: 10.1145/3434304
  parent:
    type: periodical
    title: Proc. ACM Program. Lang.
    publisher: Association for Computing Machinery
    issue: POPL
    volume: 5
Cited by (2)

The Equational Theories Project: Advancing Collaborative Mathematical Research at Scale bolan-2025-the

We report on the Equational Theories Project (ETP), an online collaborative pilot project to explore new ways to collaborate in mathematics with machine assistance. The project successfully determined all 22 028 942 edges of the implication graph between the 4694 simplest equational laws on magmas, by a combination of human-generated and automated proofs, all validated by the formal proof assistant language Lean. As a result of this project, several new constructions of magmas satisfying specific laws were discovered, and several auxiliary questions were also addressed, such as the effect of restricting attention to finite magmas.
DOI · arXiv

Vectorization for digital signal processors via equality saturation vanhattum-2021-vectorization

DOI
Cites 32 works (0 here)
External (32)
willsey-2021-egg reference entries/refs/willsey-2021-egg/willsey-2021-egg.hel