Communications of the ACM· 2026Q1
egg: Fast and Extensible Equality Saturation
- 132citations
- Q1SCImago
- 2026year
Short summary
The egg library implements equality saturation using e-graphs, enabling programmatic program optimization by adding information rather than destroying terms.
AI-generated from the title and abstract; the full text is not read.
Key points
- Egg is an open-source library for equality saturation using e-graphs, a data structure representing equivalent expressions.
- Equality saturation adds information to e-graphs, avoiding the destructive nature of traditional term rewriting.
- The library allows users to define custom languages, rewrites, and analyses for programmatic use.
- Novel techniques include e-class analysis for integrating program analyses modulo equality and rebuilding for deferred invariant restoration.
AI-generated from the title and abstract; the full text is not read.
Abstract
E-graphs, originally developed for use in automated theorem provers, are data structures that compactly represent a large number of expressions and the equalities between them. Recently, a technique called equality saturation adapted e-graphs for program optimization. Equality saturation can ameliorate issues with traditional, destructive term rewriting since e-graph rewriting only adds information to the e-graph. After rewriting, the e-graph represents a large space of equivalent terms (including the original term), and a final extraction procedure selects the best term according to a user-provided cost function. The egg library is a fast and flexible open-source implementation of e-graphs and equality saturation. Unlike solvers, egg is a white-box library for programmatic use. Users can easily define their own languages, rewrites, and analyses, and they can inspect and manipulate the e-graph directly. It incorporates novel techniques such as e-class analysis , a mechanism for integrating program analyses modulo equality; and rebuilding , a deferred invariant restoration algorithm. egg has been used in hundreds of academic and industrial projects for program optimization, synthesis, and verification in many domains; some are briefly highlighted in this article.
The authors' abstract, as published at the source. Communications of the ACM, 2026 · DOI ↗
Continue with a free account
Ask the paper: 3 free questions a day about this paper; save it, get its citation, new summaries every day for your field. Takeaways are Premium.
Continue free on the webSign in with Google or Apple; no card needed. You come back to this paper.
On your phone:
Field: Artificial Intelligence Software
SoftwareComputer ScienceArtificial Intelligence