paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Encode the ∀∃ Relational Hoare Logic into Standard Hoare Logic

将 ∀∃ 关系霍尔逻辑编码到标准霍尔逻辑中
OOPSLA 9(OOPSLA2)2025匹配度 3/10 · 论文属于程序验证与霍尔逻辑的理论工作,虽与形式化验证相关,但未涉及用户核心关注的 LLM/Agent 改进静态分析或形式化验证、浮点程序分析、贝叶斯程序分析等交叉方向,也缺乏工业落地或 LLM 工具链内容。引用 1 inbox
Shushu Wu, Xiwei Wu, Qinxiang Cao
crossref: 2026-09-10

AI 速览

一句话:提出通用编码理论,把 ∀∃ 关系霍尔逻辑归约为标准一元霍尔逻辑,无需扩展框架或重证可靠性。

验证真实程序的功能正确性可分解为程序精化与高层算法正确性证明。关系霍尔逻辑能建立精化,但在非确定性场景下需要 ∀∃ 关系霍尔逻辑;现有编码引入 ghost state 与不变量,增加形式化复杂度和可靠性证明负担。本文提出通用编码理论:重新定义关系霍尔三元组的有效性,同时保留原有证明规则,并将 ∀∃ 模式封装进断言,从而把关系三元组归约为标准一元霍尔三元组。作者证明编码后的标准霍尔三元组有效性与原关系三元组有效性等价,并说明常见关系霍尔证明规则是标准霍尔规则的特例,关系证明步骤对应标准证明步骤。由此,标准霍尔逻辑只需定义 Exec 谓词即可证明 ∀∃ 关系性质,无需修改逻辑框架或重新验证可靠性。

问题
关系霍尔逻辑用于证明程序精化,但在非确定性设置下需要 ∀∃ 关系霍尔逻辑;现有编码依赖 ghost state 和不变量,增加形式化与可靠性证明负担。
方法
重新定义关系霍尔三元组有效性,保留原证明规则,将 ∀∃ 模式封装进断言,把关系三元组编码为标准一元霍尔三元组,并证明二者有效性等价及证明规则对应。
评估
通过元理论证明编码后标准霍尔三元组的有效性与原关系三元组等价,说明关系证明步骤可对应标准证明步骤;未报告工具实现或实验评估。
原文摘要(Abstract)

Verifying a real-world program’s functional correctness can be decomposed into (1) a refinement proof showing that the program implements a more abstract high-level program and (2) an algorithm correctness proof at the high level. Relational Hoare logic serves as a powerful tool to establish refinement but often necessitates formalization beyond standard Hoare logic. Particularly in the nondeterministic setting, the ∀∃ relational Hoare logic is required. Existing approaches encode this logic into a Hoare logic with ghost states and invariants, yet these extensions significantly increase formalization complexity and soundness proof overhead. This paper proposes a generic encoding theory that reduces the ∀∃ relational Hoare logic to standard (unary) Hoare logic. Precisely, we propose to redefine the validity of relational Hoare triples while preserving the original proof rules and then encapsulate the ∀∃ pattern within assertions. We have proved that the validity of encoded standard Hoare triples is equivalent to the validity of the desired relational Hoare triples. Moreover, the encoding theory demonstrates how common relational Hoare logic proof rules are indeed special cases of standard Hoare logic proof rules, and relational proof steps correspond to standard proof steps. Our theory enables standard Hoare logic to prove ∀∃ relational properties by defining a predicate Exec , without requiring modifications to the logic framework or re-verification of soundness.

链接与引用

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

BibTeX
@article{paperbot2901,
  title = {Encode the ∀∃ Relational Hoare Logic into Standard Hoare Logic},
  author = {Shushu Wu and Xiwei Wu and Qinxiang Cao},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763138}
}