paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Efficient Extraction for Effectful E-graphs

面向有副作用 E-graph 的高效提取
OOPSLA 10(OOPSLA2)2026匹配度 3/10 · 论文属于程序语言/编译器与程序优化方向,关注有副作用 E-graph 的提取算法,兼具理论证明与工程实现;但未涉及 LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析,与用户画像的核心交叉方向不匹配。引用 0 inbox
Oliver Flatt, Anjali Pal, Yihong Zhang, Ryan Tjoa, Kirsten Graham, Alex Fischman, Chandrakana Nandi, Eli Rosenthal, Zachary Tatlock, Haobin Ni
crossref: 2026-10-02

AI 速览

一句话:提出 Statewalk DP,无需外部求解器即可高效完成有副作用 E-graph 的保序提取,并证明其按 statewalk width 可 tractable。

E-graph 已推动程序优化、合成与验证,但难以应用于内存和 I/O 等必须遵守执行顺序的有副作用程序;现有 effect-aware extraction 依赖整数线性规划(ILP),且往往主导总运行时间。本文提出 Statewalk DP,一种无需外部求解器即可执行副作用排序的提取算法。作者证明寻找任意 effect-safe extraction 是 NP-complete 的,但 Statewalk DP 在 statewalk width 这一度量副作用间数据流交互复杂度的参数下是 tractable 的。实践中 statewalk width 通常较小,因此该算法相较 ILP 提取取得数量级加速,生成程序在基准测试中与 LLVM 相当。作者在面向命令式 Bril 程序的原型 e-graph 编译器 EGGCC 中实现该算法,表明 effect-aware extraction 不再是瓶颈。

问题
如何从包含内存与 I/O 等副作用的 E-graph 中提取程序,同时严格尊重副作用执行顺序,并避免现有 ILP 提取带来的运行时间瓶颈。
方法
提出 Statewalk DP,一种不依赖外部求解器的 effect-safe extraction 算法;证明该问题 NP-complete,并给出以 statewalk width 为参数的 tractability 结果。
评估
在原型 e-graph 编译器 EGGCC 上针对命令式 Bril 程序评测,与 ILP 提取和 LLVM 比较速度与生成程序质量,显示数量级加速且性能相当。
原文摘要(Abstract)

E-Graphs have enabled recent advances in program optimization, synthesis, and verification, yet remain difficult to apply to effectful programs whose memory and I/O operations must respect execution order. Existing effect-aware extraction algorithms rely on integer linear programming (ILP) and dominate total runtime. We introduce Statewalk DP, a new extraction algorithm that enforces effect ordering efficiently without external solvers. We prove that finding any effect-safe extraction is NP-complete, but show that Statewalk DP is tractable in statewalk width, a parameter that measures the complexity of dataflow interactions among effects. In practice, statewalk width generally remains small, enabling Statewalk DP to achieve order-of-magnitude speedups over ILP extraction while producing programs comparable to LLVM across our benchmarks. We implement the algorithm in EGGCC, a prototype e-graph-based compiler for imperative Bril programs, and demonstrate that effect-aware extraction is no longer a bottleneck.

链接与引用

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

BibTeX
@article{paperbot12161,
  title = {Efficient Extraction for Effectful E-graphs},
  author = {Oliver Flatt and Anjali Pal and Yihong Zhang and Ryan Tjoa and Kirsten Graham and Alex Fischman and Chandrakana Nandi and Eli Rosenthal and Zachary Tatlock and Haobin Ni},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA2},
  year = {2026},
  doi = {10.1145/3839530}
}