arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1202.4829cs.LOcs.PL
收藏

基于不变量的程序设计中的一个练习,具有交互式和自动定理证明器支持

An Exercise in Invariant-based Programming with Interactive and Automatic Theorem Prover Support

Ralph-Johan Back, Johannes Eriksson

摘要:

基于不变式的编程(IBP)是一种基于结构的正确的编程方法,其中程序是围绕不变式构建的,这些不变式在实际代码之前被另外制定。Socos是一个专门为支持IBP而构建的程序构建和验证环境。Socos的前端是一个图形化的图表编辑器,允许程序员构建基于不变式的程序并检查其正确性。Socos的后端组件,程序检查器,计算程序的验证条件,并试图自动证明它们。它使用定理证明器PVS和SMT求解器Yices来尽可能多地释放验证条件,而无需用户交互。在本文中,我们首先从用户和系统级的角度描述了Socos环境,然后通过在Socos中构建一个经过验证的堆排序实现来验证IBP工作流。案例研究突出了自动和交互式定理证明在IBP工作流程的三个连续阶段的作用:开发的背景理论,制定程序规范和不变量,并证明最终实现的正确性。

英文摘要:

Invariant-Based Programming (IBP) is a diagram-based correct-by-construction programming methodology in which the program is structured around the invariants, which are additionally formulated before the actual code. Socos is a program construction and verification environment built specifically to support IBP. The front-end to Socos is a graphical diagram editor, allowing the programmer to construct invariant-based programs and check their correctness. The back-end component of Socos, the program checker, computes the verification conditions of the program and tries to prove them automatically. It uses the theorem prover PVS and the SMT solver Yices to discharge as many of the verification conditions as possible without user interaction. In this paper, we first describe the Socos environment from a user and systems level perspective; we then exemplify the IBP workflow by building a verified implementation of heapsort in Socos. The case study highlights the role of both automatic and interactive theorem proving in three sequential stages of the IBP workflow: developing the background theory, formulating the program specification and invariants, and proving the correctness of the final implementation.

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

↑