Practical and Flexible Equality Saturation
Programming language tools like compilers, optimizers, verifiers, and synthesizers rely on term rewriting to effectively manipulate programs. While powerful and well-studied, term rewriting traditionally suffers from a critical stumbling block: users must choose when and how to apply the right rewri...
Saved in:
Main Author: | |
---|---|
Format: | Dissertation |
Language: | English |
Published: |
ProQuest Dissertations & Theses
01-01-2021
|
Subjects: | |
Online Access: | Get full text |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Summary: | Programming language tools like compilers, optimizers, verifiers, and synthesizers rely on term rewriting to effectively manipulate programs. While powerful and well-studied, term rewriting traditionally suffers from a critical stumbling block: users must choose when and how to apply the right rewrite, and the quality of the results hinges on this difficult decision. A recent technique called equality saturation mitigates this “rewrite choice” issue by allowing many rewrites to apply simultaneously. Despite its promise, the technique’s applicability has been limited by lack of flexibility and poor scalability. This thesis offers theoretical and practical advances that make equality saturation fast and flexible enough to use in real-world applications in any domain.On the theoretical side, this work contributes two techniques to make e-graphs, the data structure underlying equality saturation, better suited to the algorithm’s needs. A new amortized invariant restoration technique called rebuilding takes advantage of equality saturation’s distinct workload, providing asymptotic speedups over current techniques in practice. A general mechanism called e-class analyses integrates domain-specific analyses into the e-graph, reducing the need for ad hoc manipulation.We implemented these techniques in a new open-source library called egg. egg has been used to achieve state-of-the-art results in many domains, including floating point accuracy, automatic vectorization, deep learning compute graphs, 3D CAD decompilation, and linear algebra kernels, among others. We present case studies that highlight how egg’s performance and flexibility helped these projects succeed, making the case that equality saturation is ready for a wide variety of real-world use cases. |
---|---|
ISBN: | 9798535503189 |