当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
egg: Fast and Extensible Equality Saturation
arXiv - CS - Programming Languages Pub Date : 2020-04-07 , DOI: arxiv-2004.03082
Max Willsey, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt, Zachary Tatlock, Pavel Panchekha

An e-graph efficiently represents a congruence relation over many expressions. Although they were originally developed in the late 1970s for use in automated theorem provers, a more recent technique known as equality saturation repurposes e-graphs to implement state-of-the-art, rewrite-driven compiler optimizations and program synthesizers. However, e-graphs remain unspecialized for this newer use case. Equality saturation workloads exhibit distinct characteristics and often require ad-hoc e-graph extensions to incorporate transformations beyond purely syntactic rewrites. This work contributes two techniques that make e-graphs fast and extensible, specializing them to equality saturation. 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. Our case studies on three previously published applications of equality saturation highlight how egg's performance and flexibility enable state-of-the-art results across diverse domains.

中文翻译:

鸡蛋:快速且可扩展的平等饱和

一个电子图有效地表示了许多表达式的同余关系。尽管它们最初是在 1970 年代后期开发的,用于自动定理证明器,但最近一种称为等式饱和的技术重新利用电子图来实现最先进的、重写驱动的编译器优化和程序合成器。但是,电子图仍然没有专门用于这个较新的用例。相等饱和工作负载表现出不同的特征,并且通常需要临时电子图扩展来合并超出纯粹语法重写的转换。这项工作贡献了两种技术,使电子图快速且可扩展,专门用于等式饱和。一种称为重建的新摊销不变恢复技术利用了等式饱和的独特工作量,在实践中提供相对于当前技术的渐进加速。一种称为 e-class 分析的通用机制将特定领域的分析集成到 e-graph 中,减少了对临时操作的需要。我们在名为 egg 的新开源库中实现了这些技术。我们对先前发布的三个相等饱和应用的案例研究突出了 Egg 的性能和灵活性如何在不同领域实现最先进的结果。
更新日期:2020-11-10
down
wechat
bug