paperbot · PL 论文追踪

全部论文 待读 收藏

P2 babble: Learning Better Abstractions with E-Graphs and Anti-unification

babble:使用 E-Graph 和反合一学习更好的抽象
POPL 7(POPL)2023匹配度 2/10 · 该论文属于程序合成中的库学习方向,核心是 E-Graph、等式饱和与反合一,用于程序压缩,不涉及 LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析,与用户研究画像的核心交叉方向匹配度很低。引用 38 inbox
David Cao, Rose Kunkel, Chandrakana Nandi, Max Willsey, Zachary Tatlock, Nadia Polikarpova
crossref: 2026-09-10

AI 速览

一句话:提出 LLMT 库学习算法,利用 E-Graph 和等式饱和及 E-Graph 反合一,高效提取可复用库函数,压缩优于 SOTA。

库学习通过从程序语料中提取公共结构为可复用库函数来压缩程序。现有方法探索过多无用候选函数,且对句法变化不鲁棒。本文提出库学习模理论(LLMT),额外接收问题领域的等式理论。LLMT 用 E-Graph 和等式饱和紧凑表示模理论等价的程序空间,并用新颖的 E-Graph 反合一技术更直接高效地发现公共模式。作者实现工具 babble,评估表明其压缩效果优于最优方法且快数个数量级,定性评估显示 babble 能在先前无法处理的输入上学习可复用函数。

问题
现有库学习算法探索过多无用候选函数且对输入句法变化不鲁棒,难以扩展到更大更复杂的程序语料。
方法
提出 LLMT,将问题领域的等式理论作为输入,利用 E-Graph 和等式饱和表示等价程序空间,并用 E-Graph 反合一发现公共模式。
评估
实现工具 babble,与当前最优方法比较压缩效果和速度,并进行定性评估。
原文摘要(Abstract)

Library learning compresses a given corpus of programs by extracting common structure from the corpus into reusable library functions. Prior work on library learning suffers from two limitations that prevent it from scaling to larger, more complex inputs. First, it explores too many candidate library functions that are not useful for compression. Second, it is not robust to syntactic variation in the input. We propose library learning modulo theory (LLMT), a new library learning algorithm that additionally takes as input an equational theory for a given problem domain. LLMT uses e-graphs and equality saturation to compactly represent the space of programs equivalent modulo the theory, and uses a novel e-graph anti-unification technique to find common patterns in the corpus more directly and efficiently. We implemented LLMT in a tool named babble. Our evaluation shows that babble achieves better compression orders of magnitude faster than the state of the art. We also provide a qualitative evaluation showing that babble learns reusable functions on inputs previously out of reach for library learning.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2070,
  title = {babble: Learning Better Abstractions with E-Graphs and Anti-unification},
  author = {David Cao and Rose Kunkel and Chandrakana Nandi and Max Willsey and Zachary Tatlock and Nadia Polikarpova},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {POPL},
  year = {2023},
  doi = {10.1145/3571207}
}