arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1507.05877cs.LOcs.PL
收藏

用线性化约束Horn子句证明命令程序的正确性

Proving Correctness of Imperative Programs by Linearizing Constrained Horn Clauses

Emanuele De Angelis, Fabio Fioravanti, Alberto Pettorossi, Maurizio Proietti

摘要:

本文提出了一种基于规范自动转换的命令式程序正确性验证方法。给定一个程序prog,我们考虑形式为$\{φ\}$ prog $\{ψ\}$的部分正确性规范,其中断言$φ$和$ψ$是由可能递归的Horn子句的集合Spec定义的谓词,其前提中具有线性算术(LA)约束(也称为约束Horn子句)。验证方法包括在构造一组PC的约束Horn子句,其可满足性意味着$\{φ\}$ prog $\{ψ\}$是有效的。我们强调了一些限制的国家的最先进的约束霍恩子句求解方法,这里称为LA求解方法,证明可满足性的条款,通过寻找线性算术解释的谓词。特别是,我们证明了存在一些规格,不能证明有效的任何这些LA解决方法。这些规范要求证明一组包含非线性子句(即前提中有多个原子的子句)的受约束Horn子句的PC的可满足性。然后,我们提出了一个转换,称为线性化,PC转换成一组线性条款(即条款,在其前提中最多一个原子)。我们表明,几个规格,不能被证明是有效的LA解决方法,可以被证明是有效的线性化后。我们还提出了一种策略,用于执行线性化在一个自动的方式,我们报告的一些实验结果,通过使用我们的方法的初步实施。

英文摘要:

We present a method for verifying the correctness of imperative programs which is based on the automated transformation of their specifications. Given a program prog, we consider a partial correctness specification of the form $\{φ\}$ prog $\{ψ\}$, where the assertions $φ$ and $ψ$ are predicates defined by a set Spec of possibly recursive Horn clauses with linear arithmetic (LA) constraints in their premise (also called constrained Horn clauses). The verification method consists in constructing a set PC of constrained Horn clauses whose satisfiability implies that $\{φ\}$ prog $\{ψ\}$ is valid. We highlight some limitations of state-of-the-art constrained Horn clause solving methods, here called LA-solving methods, which prove the satisfiability of the clauses by looking for linear arithmetic interpretations of the predicates. In particular, we prove that there exist some specifications that cannot be proved valid by any of those LA-solving methods. These specifications require the proof of satisfiability of a set PC of constrained Horn clauses that contain nonlinear clauses (that is, clauses with more than one atom in their premise). Then, we present a transformation, called linearization, that converts PC into a set of linear clauses (that is, clauses with at most one atom in their premise). We show that several specifications that could not be proved valid by LA-solving methods, can be proved valid after linearization. We also present a strategy for performing linearization in an automatic way and we report on some experimental results obtained by using a preliminary implementation of our method.

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

↑