egg: Easy, Efficient, and Extensible E-graphs

04/07/2020
by   Max Willsey, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/07/2020

egg: Fast and Extensible E-graphs

An e-graph efficiently represents a congruence relation over many expres...
research
02/09/2021

k-Equivalence Relations and Associated Algorithms

Lines and circles pose significant scalability challenges in synthetic g...
research
04/10/2023

Better Together: Unifying Datalog and Equality Saturation

We present egglog, a fixpoint reasoning system that unifies Datalog and ...
research
12/07/2022

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

SHACL is a W3C-proposed schema language for expressing structural constr...
research
05/30/2023

Colored E-Graph: Equality Reasoning with Conditions

E-graphs are a prominent data structure that has been increasing in popu...
research
11/23/2021

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

Term Rewriting Systems (TRSs) are used in compilers to simplify and prov...
research
02/11/2023

An Evaluation Algorithm for Datalog with Equality

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

Please sign up or login with your details

Forgot password? Click here to reset