论文标题
通过谓词约束可满足模式理论进行程序验证
Program Verification via Predicate Constraint Satisfiability Modulo Theories
论文作者
论文摘要
本文基于称为PCSP的新类别的谓词约束满意度问题提出了一个验证框架,其中约束表示为Modulo子句,而对功能变量和谓词变量可能代表良好的谓词。验证框架将基于受约束的角子句(CHC)的现有框架推广到任意子句,功能变量和良好的子句约束。虽然众所周知,CHC的满意度和对约束逻辑程序(CLP)的查询的有效性是可重新确定的,但我们表明,由于增加了表现力,PCSP的表现足以表达MUCLP查询。 MUCLP本身是我们在本文中提出的CLP的新扩展。它以任意嵌套的电感和共感性谓词扩展了CLP,并且作为一阶FixPoint逻辑是平等表达的。我们表明,MUCLP自然可以编码各种各样的验证问题,包括但不限于终止/非终止验证,甚至全模态MU-Calculus模型模型检查以各种语言编写的程序。为了建立我们的验证框架,我们提出了(1)一种从MUCLP到PCSP的声音和完全还原算法,以及(2)基于(共同)归纳不变的不变性,排名功能以及Skolem函数的PCSP的约束求解方法,以及基于分层的反例引导的归纳合成(CEGIS)。分层的CEGIS将CEGI与模板的分层家族相结合,以避免过度拟合问题,从而实现相对完整性和更快,稳定的CEGIS收敛性。我们已经实施了拟议的框架,并在基于CHC的先前验证框架范围之外的各种验证问题上获得了有希望的结果。
This paper presents a verification framework based on a new class of predicate Constraint Satisfaction Problems called pCSP where constraints are represented as clauses modulo first-order theories over function variables and predicate variables that may represent well-founded predicates. The verification framework generalizes an existing one based on Constrained Horn Clauses (CHCs) to arbitrary clauses, function variables, and well-foundedness constraints. While it is known that the satisfiability of CHCs and the validity of queries for Constrained Logic Programs (CLP) are inter-reducible, we show that, thanks to the added expressiveness, pCSP is expressive enough to express muCLP queries. muCLP itself is a new extension of CLP that we propose in this paper. It extends CLP with arbitrarily nested inductive and co-inductive predicates and is equi-expressive as first-order fixpoint logic. We show that muCLP can naturally encode a wide variety of verification problems including but not limited to termination/non-termination verification and even full modal mu-calculus model checking of programs written in various languages. To establish our verification framework, we present (1) a sound and complete reduction algorithm from muCLP to pCSP and (2) a constraint solving method for pCSP based on stratified CounterExample-Guided Inductive Synthesis (CEGIS) of (co-)inductive invariants, ranking functions, and Skolem functions witnessing existential quantifiers. Stratified CEGIS combines CEGIS with stratified families of templates to achieve relative completeness and faster and stable convergence of CEGIS by avoiding the overfitting problem. We have implemented the proposed framework and obtained promising results on diverse verification problems that are beyond the scope of the previous verification frameworks based on CHCs.