paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A Relational Program Logic with Data Abstraction and Dynamic Framing

一种具有数据抽象和动态框架的关系程序逻辑
TOPLAS 44(4)2022匹配度 3/10 · 论文属于纯形式化程序验证(关系霍尔逻辑、数据抽象、动态框架),与用户关注的 LLM/Agent 与静态分析/形式化验证交叉、浮点程序分析或贝叶斯程序分析均无直接关联;仅可作为形式验证背景知识,不涉及 AI/LLM 或工业落地。引用 8 inbox
Anindya Banerjee, Ramana Nagasamudram, David A. Naumann, Mohammad Nikouei
crossref: 2026-09-10

AI 速览

一句话:提出带动态分配对象语言的关系霍尔逻辑,以状态化框架条件统一封装、隐藏与实现耦合。

本文结合 Hoare 关于不变量隐藏、模拟以及程序逻辑的思想,研究如何为带动态分配的对象语言进行关系推理。作者提出一种关系霍尔逻辑,使用状态化框架条件来形式化封装、不变量隐藏,以及关联两个实现的耦合关系;断言用一阶逻辑表达。该逻辑可描述条件等价、带解密的非干扰等关系性质,证明规则通过便利的对齐支持关系推理,并相对于传统操作语义被证明可靠。文中还导出一条用于链接程序等价的规则,直接体现表示独立性,并通过基于 SMT 的实现展示在代表性例子上的适用性。

问题
如何将 Hoare 的不变量隐藏与模拟思想同程序逻辑结合,为带动态分配的对象语言提供支持数据抽象和关系推理的验证方法。
方法
提出带状态化框架条件的关系霍尔逻辑,断言用一阶逻辑,证明规则支持对齐与耦合,证明相对操作语义可靠,并导出表示独立性规则。
评估
通过基于 SMT 的实现,在代表性示例上展示该逻辑的适用性。
原文摘要(Abstract)

Dedicated to Tony Hoare. In a paper published in 1972, Hoare articulated the fundamental notions of hiding invariants and simulations. Hiding: invariants on encapsulated data representations need not be mentioned in specifications that comprise the API of a module. Simulation: correctness of a new data representation and implementation can be established by proving simulation between the old and new implementations using a coupling relation defined on the encapsulated state. These results were formalized semantically and for a simple model of state, though the paper claimed this could be extended to encompass dynamically allocated objects. In recent years, progress has been made toward formalizing the claim, for simulation, though mainly in semantic developments. In this article, hiding and simulation are combined with the idea in Hoare’s 1969 paper: a logic of programs. For an object-based language with dynamic allocation, we introduce a relational Hoare logic with stateful frame conditions that formalizes encapsulation, hiding of invariants, and couplings that relate two implementations. Relations and other assertions are expressed in first-order logic. Specifications can express a wide range of relational properties such as conditional equivalence and noninterference with declassification. The proof rules facilitate relational reasoning by means of convenient alignments and are shown sound with respect to a conventional operational semantics. A derived proof rule for equivalence of linked programs directly embodies representation independence. Applicability to representative examples is demonstrated using an SMT-based implementation.

链接与引用

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

BibTeX
@article{paperbot1600,
  title = {A Relational Program Logic with Data Abstraction and Dynamic Framing},
  author = {Anindya Banerjee and Ramana Nagasamudram and David A. Naumann and Mohammad Nikouei},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {44},
  number = {4},
  year = {2022},
  doi = {10.1145/3551497}
}