258 research outputs found
Enhancing Predicate Pairing with Abstraction for Relational Verification
Relational verification is a technique that aims at proving properties that
relate two different program fragments, or two different program runs. It has
been shown that constrained Horn clauses (CHCs) can effectively be used for
relational verification by applying a CHC transformation, called predicate
pairing, which allows the CHC solver to infer relations among arguments of
different predicates. In this paper we study how the effects of the predicate
pairing transformation can be enhanced by using various abstract domains based
on linear arithmetic (i.e., the domain of convex polyhedra and some of its
subdomains) during the transformation. After presenting an algorithm for
predicate pairing with abstraction, we report on the experiments we have
performed on over a hundred relational verification problems by using various
abstract domains. The experiments have been performed by using the VeriMAP
transformation and verification system, together with the Parma Polyhedra
Library (PPL) and the Z3 solver for CHCs.Comment: Pre-proceedings paper presented at the 27th International Symposium
on Logic-Based Program Synthesis and Transformation (LOPSTR 2017), Namur,
Belgium, 10-12 October 2017 (arXiv:1708.07854
Verifying Catamorphism-Based Contracts using Constrained Horn Clauses
We address the problem of verifying that the functions of a program meet
their contracts, specified by pre/postconditions. We follow an approach based
on constrained Horn clauses (CHCs) by which the verification problem is reduced
to the problem of checking satisfiability of a set of clauses derived from the
given program and contracts. We consider programs that manipulate algebraic
data types (ADTs) and a class of contracts specified by catamorphisms, that is,
functions defined by simple recursion schemata on the given ADTs. We show by
several examples that state-of-the-art CHC satisfiability tools are not
effective at solving the satisfiability problems obtained by direct translation
of the contracts into CHCs. To overcome this difficulty, we propose a
transformation technique that removes the ADT terms from CHCs and derives new
sets of clauses that work on basic sorts only, such as integers and booleans.
Thus, when using the derived CHCs there is no need for induction rules on ADTs.
We prove that the transformation is sound, that is, if the derived set of CHCs
is satisfiable, then so is the original set. We also prove that the
transformation always terminates for the class of contracts specified by
catamorphisms. Finally, we present the experimental results obtained by an
implementation of our technique when verifying many non-trivial contracts for
ADT manipulating programs.Comment: Paper presented at the 38th International Conference on Logic
Programming (ICLP 2022), 16 pages; added Journal reference and related DO
- …