paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Dis/Equality Graphs

不相等/相等图(Dis/Equality Graphs)
POPL 9(POPL)2025匹配度 4/10 · 该论文属于程序语言与形式化方法的基础设施工作(e-graph 的不等式支持、形式化与 egg 实现),与用户关注的 AI↔PL 交叉(LLM/Agent 用于静态分析与形式化验证、ML/Agentic 程序的静态分析)并无直接关联;但其理论形式化+工程落地、问题驱动(指出 SMT 求解器在 disequality 上的开销)的风格与用户偏好相符,且 e-graph 是优化与验证工具链中的常用组件,存在潜在间接价值。引用 2 inbox
George Zakhour, Pascal Weisenburger, Jahrim Gabriele Cesario, Guido Salvaneschi
crossref: 2026-09-10

AI 速览

一句话:首次形式化直接支持不等式的 e-graph,证明其比等式嵌入编码更高效,并在 egg 中实现验证。

E-graph 是紧凑表示程序空间并推理项相等性的数据结构,已用于程序优化与自动定理证明。但许多应用还需推理不等式,虽可编码实现,直接支持却能提升性能并简化元理论。本文提出与具体实现无关的形式化框架,首次证明 e-graph 等价于其所编码等价关系的自反、对称、传递与同余闭包。基于此,作者首次形式化直接支持不等式的 e-graph 扩展,并从解析上证明其效率优于 SMT 求解器与自动验证器常用的嵌入技术。他们通过剖析发现 SMT 求解器处理不等式耗时可观,并在 Rust 的 egg 库中实现该扩展,于 SMT 求解器与自动定理证明器上用标准基准评估,结果证实直接支持不等式优于等式嵌入编码。

问题
e-graph 只直接支持等式推理,而不等式的推理只能通过编码实现,导致性能下降且元理论复杂。
方法
建立与实现无关的形式化框架,证明 e-graph 与其等价关系的自反、对称、传递、同余闭包等价,并据此形式化直接支持不等式的 e-graph 扩展,在 egg 库中实现。
评估
通过解析性证明给出效率优势,剖析 SMT 求解器中不等式处理开销,并在 SMT 求解器与自动定理证明器上用标准基准与等式嵌入编码对比。
原文摘要(Abstract)

E-graphs are a data structure to compactly represent a program space and reason about equality of program terms. E-graphs have been successfully applied to a number of domains, including program optimization and automated theorem proving. In many applications, however, it is necessary to reason about disequality of terms as well as equality. While disequality reasoning can be encoded, direct support for disequalities increases performance and simplifies the metatheory. In this paper, we develop a framework independent of a specific implementation to formally reason about e-graphs. For the first time, we prove the equivalence of e-graphs to the reflexive, symmetric, transitive, and congruent closure of the equivalence relation they are expected to encode. We use these results to present the first formalization of an extension of e-graphs that directly supports disequalities and prove an analytical result about their superior efficiency compared to embedding techniques that are commonly used in SMT solvers and automated verifiers. We further profile an SMT solver and find that it spends a measurable amount of time handling disequalities. We implement our approach in an extension to egg, a popular e-graph Rust library. We evaluate our solution in an SMT solver and an automated theorem prover using standard benchmarks. The results indicate that direct support for disequalities outperforms other encodings based on equality embedding, confirming the results obtained analytically.

链接与引用

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

BibTeX
@article{paperbot3226,
  title = {Dis/Equality Graphs},
  author = {George Zakhour and Pascal Weisenburger and Jahrim Gabriele Cesario and Guido Salvaneschi},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {POPL},
  year = {2025},
  doi = {10.1145/3704913}
}