paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Verification-Preserving Inlining in Automatic Separation Logic Verifiers

自动分离逻辑验证器中的保持验证的内联
OOPSLA 7(OOPSLA1)2023匹配度 4/10 · 论文属于自动分离逻辑验证器的内联技术,具备用户偏好的“理论形式化(Isabelle/HOL 证明)+ 工程实现(Viper)”以及“指出已有方法失效并解释原因(内联引入伪错误)”的问题驱动特征,与程序验证/静态分析方向相邻;但它与用户核心关注的 PL×AI 交叉(Agentic 程序分析、用 LLM/Agent 改进静态分析或形式化验证、浮点/贝叶斯程序分析)没有任何交集。引用 4 inbox
Thibault Dardinier, Gaurav Parthasarathy, Peter Müller
crossref: 2026-09-10

AI 速览

一句话:提出首个用于自动分离逻辑验证器的保持验证内联技术,并给出经 Isabelle/HOL 验证的语义条件。

有界验证通过内联调用与展开循环,可尽量减少方法规约和循环不变式。但对自动分离逻辑验证器(如 Caper、Viper 等),内联会改变方法执行拥有的资源,影响自动证明搜索并可能引入伪错误,因此传统程序逻辑中内联保持验证的性质未必成立。本文提出首个用于此类验证器的保持验证内联技术:定义程序上的语义条件,在 Isabelle/HOL 中证明其能保证内联保持验证,并证明对偶结论——内联程序验证成功意味着原程序存在支持有界执行验证的方法与循环标注。作者还给出语法检查与借助验证器检查两种近似,在 Viper 中实现,并在来自不同验证器的非平凡例子上验证了有效性。

问题
自动分离逻辑验证器中的内联会改变方法执行拥有的资源,可能使自动证明搜索产生伪错误,导致有界验证结果不再可靠地反映原程序错误。
方法
定义程序上的语义条件,在 Isabelle/HOL 中机器化证明该条件保证内联保持验证,并证明关于原程序有界执行标注的对偶结论;另提供语法检查和验证器驱动检查两种近似。
评估
在 Viper 中实现上述检查,并使用来自不同验证器的非平凡例子评估其有效性。
原文摘要(Abstract)

Bounded verification has proved useful to detect bugs and to increase confidence in the correctness of a program. In contrast to unbounded verification, reasoning about calls via (bounded) inlining and about loops via (bounded) unrolling does not require method specifications and loop invariants and, therefore, reduces the annotation overhead to the bare minimum, namely specifications of the properties to be verified. For verifiers based on traditional program logics, verification is preserved by inlining (and unrolling): successful unbounded verification of a program w.r.t. some annotation implies successful verification of the inlined program. That is, any error detected in the inlined program reveals a true error in the original program. However, this essential property might not hold for automatic separation logic verifiers such as Caper, GRASShopper, RefinedC, Steel, VeriFast, and verifiers based on Viper. In this setting, inlining generally changes the resources owned by method executions, which may affect automatic proof search algorithms and introduce spurious errors. In this paper, we present the first technique for verification-preserving inlining in automatic separation logic verifiers. We identify a semantic condition on programs and prove in Isabelle/HOL that it ensures verification-preserving inlining for state-of-the-art automatic separation logic verifiers. We also prove a dual result: successful verification of the inlined program ensures that there are method and loop annotations that enable the verification of the original program for bounded executions. To check our semantic condition automatically, we present two approximations that can be checked syntactically and with a program verifier, respectively. We implement these checks in Viper and demonstrate that they are effective for non-trivial examples from different verifiers.

链接与引用

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

BibTeX
@article{paperbot2045,
  title = {Verification-Preserving Inlining in Automatic Separation Logic Verifiers},
  author = {Thibault Dardinier and Gaurav Parthasarathy and Peter Müller},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {OOPSLA1},
  year = {2023},
  doi = {10.1145/3586054}
}