Relational e-matching
Yihong Zhang, Yisu Remy Wang, Max Willsey et al. · Proceedings of the ACM on Programming Languages · 2022
We present a new approach to e-matching based on relational join; in particular, we apply recent database query execution techniques to guarantee worst-case optimal run time. Compared to the conventional backtracking approach that always searches the e-graph "top down", our new relational e-matching approach can better exploit pattern structure by searching the e-graph according to an optimized query plan. We also establish the first data complexity result for e-matching, bounding run time as a function of the e-graph size and output size. We prototyped and evaluated our technique in the state-of-the-art egg e-graph framework. Compared to a conventional baseline, relational e-matching is simpler to implement and orders of magnitude faster in practice.
Cited by 13 works. doi:10.1145/3498696 Open-access PDF
Authors
References
- Efficiency of a Good But Not Linear Set Union Algorithm
- View maintenance in a warehousing environment
- Simplify: a theorem prover for program checking
- Complexity of finitely presented algebras
- Efficient E-Matching for SMT Solvers
- CVC4
- On the Complexity of Database Queries
- Worst-Case Optimal Join Algorithms
- Equality saturation
- Size Bounds and Query Plans for Relational Joins