Lune

POPL2022Top-tier venue

Relational e-matching

Yihong Zhang, Yisu Remy Wang, Max Willsey, Zachary Tatlock

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

11 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Optimizing Tensor Programs on Flexible Storage cites egg: Fast and extensible equality saturation
  • Optimizing Tensor Programs on Flexible Storage cites Adopting Worst-Case Optimal Joins in Relational Database Systems
  • Fast and Optimal Extraction for Sparse Equality Graphs cites Synthesizing structured CAD models with equality saturation and inverse transformations
  • Fast and Optimal Extraction for Sparse Equality Graphs cites Better Together: Unifying Datalog and Equality Saturation
  • Flan: An Expressive and Efficient Datalog Compiler for Program Analysis cites Better Together: Unifying Datalog and Equality Saturation
  • Flan: An Expressive and Efficient Datalog Compiler for Program Analysis cites Adopting Worst-Case Optimal Joins in Relational Database Systems
  • Better Together: Unifying Datalog and Equality Saturation cites Optimizing Tensor Programs on Flexible Storage
  • Better Together: Unifying Datalog and Equality Saturation cites Synthesizing structured CAD models with equality saturation and inverse transformations
  • Better Together: Unifying Datalog and Equality Saturation cites egg: Fast and extensible equality saturation
  • Fast Instruction Selection for Fast Digital Signal Processing cites egg: Fast and extensible equality saturation
  • egg: Fast and extensible equality saturation cites Synthesizing structured CAD models with equality saturation and inverse transformations
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers11

  1. Better Together: Unifying Datalog and Equality SaturationYihong Zhang, Yisu Remy Wang, Oliver Flatt, David Cao et al.PLDI 2023 · 38 citations
  2. Optimizing Tensor Programs on Flexible StorageMaximilian Schleich, Amir Shaikhha, Dan SuciuSIGMOD 2023 · 21 citations
  3. Fast and Optimal Extraction for Sparse Equality GraphsAmir Kafshdar Goharshady, Chun Kit Lam, Lionel ParreauxOOPSLA 2024 · 11 citations
  4. Flan: An Expressive and Efficient Datalog Compiler for Program AnalysisSupun Abeysinghe, Anxhelo Xhebraj, Tiark RompfPOPL 2024 · 9 citations
  5. Fast Instruction Selection for Fast Digital Signal ProcessingAlexander J. Root, Maaz Bin Safeer Ahmad, Dillon Sharlet, Andrew Adams et al.ASPLOS 2023 · 7 citations

Builds on3

  1. egg: Fast and extensible equality saturationMax Willsey, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt et al.POPL 2021 · 170 citations
  2. Adopting Worst-Case Optimal Joins in Relational Database SystemsMichael J. Freitag, Maximilian Bandle, Tobias Schmidt, Alfons Kemper et al.VLDB 2020 · 79 citations
  3. Synthesizing structured CAD models with equality saturation and inverse transformationsChandrakana Nandi, Max Willsey, Adam Anderson, James R. Wilcox et al.PLDI 2020 · 65 citations

Related papers

  1. RapidMatch: A Holistic Approach to Subgraph Query ProcessingShixuan Sun, Xibo Sun, Yulin Che, Qiong Luo et al.VLDB 2021 · 105 citations
  2. Towards a Converged Relational-Graph Optimization FrameworkYunkai Lou, Longbin Lai, Bingqing Lyu, Yufan Yang et al.SIGMOD 2025 · 4 citations
  3. GraphMatch: Subgraph Query Processing on SteroidsJonas Dann, Tobias Götz, Daniel Ritter, Jana Giceva et al.SIGMOD 2026
  4. Efficient Hypergraph Pattern Matching via Match-and-Filter and Intersection ConstraintSiwoo Song, Wonseok Shin, Kunsoo Park, Giuseppe F. Italiano et al.ICDE 2026
  5. cuMatch: A GPU-based Memory-Efficient Worst-case Optimal Join Processing Method for Subgraph Queries with Complex PatternsSungwoo Park, Seyeon Oh, Min-Soo KimSIGMOD 2025 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines