DeepAI AI Chat
Log In Sign Up

egg: Easy, Efficient, and Extensible E-graphs

by   Max Willsey, et al.

An E-graph is a data structure that can efficiently encode the congruence closure of an equivalence relation over many expressions. E-graphs are used in theorem provers for communicating equalities among theories. Another strand of work proposed their use for rewrite-driven program optimization with a technique called equality saturation. In this work, we expand on the idea of equality saturation and re-propose E-graphs as a solution to a diverse set of optimization problems, addressing issues identified by past work. We introduce rebuilding, a new, simpler means of maintaining congruence closure that is much faster than current techniques. We propose metadata, a mechanism that enables integration of semantic analyses to the E-graph in addition to syntactic rewrites. We realize these techniques in egg, an easy, efficient, and extensible E-graph library. We highlight published works that use egg across a wide range of optimization-oriented applications.


page 1

page 2

page 3

page 4


egg: Fast and Extensible E-graphs

An e-graph efficiently represents a congruence relation over many expres...

k-Equivalence Relations and Associated Algorithms

Lines and circles pose significant scalability challenges in synthetic g...

Better Together: Unifying Datalog and Equality Saturation

We present egglog, a fixpoint reasoning system that unifies Datalog and ...

Expressiveness of SHACL Features and Extensions for Full Equality and Disjointness Tests

SHACL is a W3C-proposed schema language for expressing structural constr...

Colored E-Graph: Equality Reasoning with Conditions

E-graphs are a prominent data structure that has been increasing in popu...

Caviar: An E-graph Based TRS for Automatic Code Optimization

Term Rewriting Systems (TRSs) are used in compilers to simplify and prov...

An Evaluation Algorithm for Datalog with Equality

We describe an evaluation algorithm for relational Horn logic (RHL). RHL...