arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1202.4834cs.LOcs.MScs.PLcs.SC
收藏

基于程序关系语义的计算机辅助程序推理

Computer-Assisted Program Reasoning Based on a Relational Semantics of Programs

Wolfgang Schreiner

摘要:

我们提出了一种程序推理的方法,它在程序及其验证条件之间插入一个附加层,即以声明形式表示的程序的外延。首先将程序翻译成其表示,随后从该表示生成验证条件。然而,即使在任何验证尝试之前(并且独立于任何验证尝试),人们也可以调查指称本身以洞察程序的“语义本质”,特别是看看指称是否确实给出了相信程序具有预期行为的理由。因此,在实际执行形式化验证之前,可以检测并修复程序和元信息中的错误。更具体地说,程序语义的关系方法,我们建模的程序作为一个二元关系的程序状态的影响。一个正式的演算是从一个程序中推导出一个逻辑公式,描述这种关系,并进行检查和操作。我们已经实现了这一想法在RISC ProgramExplorer,一个新的程序推理环境的教育目的,其中包括以前开发的RISC ProofNavigator作为一个交互式的证明助理的全面形式。

英文摘要:

We present an approach to program reasoning which inserts between a program and its verification conditions an additional layer, the denotation of the program expressed in a declarative form. The program is first translated into its denotation from which subsequently the verification conditions are generated. However, even before (and independently of) any verification attempt, one may investigate the denotation itself to get insight into the "semantic essence" of the program, in particular to see whether the denotation indeed gives reason to believe that the program has the expected behavior. Errors in the program and in the meta-information may thus be detected and fixed prior to actually performing the formal verification. More concretely, following the relational approach to program semantics, we model the effect of a program as a binary relation on program states. A formal calculus is devised to derive from a program a logic formula that describes this relation and is subject for inspection and manipulation. We have implemented this idea in a comprehensive form in the RISC ProgramExplorer, a new program reasoning environment for educational purposes which encompasses the previously developed RISC ProofNavigator as an interactive proving assistant.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑