Rewrite Rule Inference Using Equality Saturation
Not on the map. Why?
Abstract (arXiv)
Many compilers, synthesizers, and theorem provers rely on rewrite rules to simplify expressions or prove equivalences. Developing rewrite rules can be difficult: rules may be subtly incorrect, profitable rules are easy to miss, and rulesets must be rechecked or extended whenever semantics are tweaked. Large rulesets can also be challenging to apply: redundant rules slow down rule-based search and frustrate debugging. This paper explores how equality saturation, a promising technique that uses e-graphs to apply rewrite rules, can also be used to infer rewrite rules. E-graphs can compactly represent the exponentially large sets of enumerated terms and potential rewrite rules. We show that equality saturation efficiently shrinks both sets, leading to faster synthesis of smaller, more general rulesets. We prototyped these strategies in a tool dubbed ruler. Compared to a similar tool built on CVC4, ruler synthesizes 5.8X smaller rulesets 25X faster without compromising on proving power. In an end-to-end case study, we show ruler-synthesized rules which perform as well as those crafted by domain experts, and addressed a longstanding issue in a popular open source tool.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). First posted on arXiv 23 Aug 2021.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 1; 2023: 3; 2024: 0; 2025: 4; 2026: 2.
10 papers.
- 2023NeuRI: Diversifying DNN Generation via Inductive Rule Inferencecited by 6
- 2023Search-Based Regular Expression Inference on a GPUcited by 6
- 2025QUITE: A Query Rewrite System Beyond Rules with LLM Agentscited by 6
- 2025EGG-SR: Embedding Symbolic Equivalence into Symbolic Regression via Equality Graphcited by 2
- 2023SEER: Super-Optimization Explorer for HLS using E-graph Rewriting with MLIRcited by 1
- 2025Modelling Program Spaces in Program Synthesis with Constraintscited by 1
- 2026Saturating Scaling Laws for Equational Discovery: A Phenomenology of Growth Dynamics in Three Toy Substrates with Two Real-World Replicationscited by 1
- 2022Abstract Interpretation on E-Graphscited by 0
- 2025Verifying Computational Graphs in Production-Grade Distributed Machine Learning Frameworkscited by 0
- 2026LLM-Guided Strategy Synthesis for Scalable Equality Saturationcited by 0
- 2026Saturating Scaling Laws for Equational Discovery: A Phenomenology of Growth Dynamics in Three Toy Substrates with Two Real-World Replications14 May 2026
- 2026LLM-Guided Strategy Synthesis for Scalable Equality Saturation19 Apr 2026
- 2025EGG-SR: Embedding Symbolic Equivalence into Symbolic Regression via Equality Graph8 Nov 2025
- 2025Verifying Computational Graphs in Production-Grade Distributed Machine Learning Frameworks12 Sep 2025
- 2025Modelling Program Spaces in Program Synthesis with Constraints10 Jul 2025
- 2025QUITE: A Query Rewrite System Beyond Rules with LLM Agents9 Jun 2025
- 2023SEER: Super-Optimization Explorer for HLS using E-graph Rewriting with MLIR15 Aug 2023
- 2023Search-Based Regular Expression Inference on a GPU29 May 2023
- 2023NeuRI: Diversifying DNN Generation via Inductive Rule Inference4 Feb 2023
- 2022Abstract Interpretation on E-Graphs17 Mar 2022