具有数据抽象和动态成帧的关系程序逻辑
A Relational Program Logic with Data Abstraction and Dynamic Framing
摘要:
饰Tony Hoare霍尔在1972年发表的一篇论文中阐述了隐藏不变量和模拟的基本概念。隐藏:封装数据表示的不变量不需要在包含模块API的规范中提及。模拟:可以通过使用封装状态上定义的耦合关系证明旧实现和新实现之间的模拟来确定新数据表示和实现的正确性。这些结果在语义上被形式化,并且是针对一个简单的状态模型,尽管该论文声称这可以扩展到包含动态分配的对象。近年来,已经取得了进展,正式的索赔,模拟,虽然主要是在语义的发展。在这篇文章中,隐藏和模拟结合了Hoare 1969年论文中的思想:程序逻辑。对于一个基于对象的语言与动态分配,我们引入了一个关系霍尔逻辑与状态框架条件,形式化封装,隐藏的不变量,和耦合,涉及两个实现。关系和其他断言用一阶逻辑表示。规范可以表达广泛的关系属性,如条件等价和不干扰解密。证明规则通过方便的对齐来促进关系推理,并且相对于传统的操作语义被示出为合理的。导出的链接程序等价性证明规则直接体现了表示独立性。具有代表性的例子的适用性证明使用基于SMT的实现。
英文摘要:
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 towards 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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。