Solving Horn Clauses on Inductive Data Types Without Induction

We address the problem of verifying the satisfiability of Constrained Horn Clauses (CHCs) based on theories of inductively defined data structures, such as lists and trees. We propose a transformation technique whose objective is the removal of these data structures from CHCs, hence reducing their satisfiability to a satisfiability problem for CHCs on integers and booleans. We propose a transformation algorithm and identify a class of clauses where it always succeeds. We also consider an extension of that algorithm, which combines clause transformation with reasoning on integer constraints. Via an experimental evaluation we show that our technique greatly improves the effectiveness of applying the Z3 solver to CHCs. We also show that our verification technique based on CHC transformation followed by CHC solving, is competitive with respect to CHC solvers extended with induction. This paper is under consideration for acceptance in TPLP.

[1]  Hiroshi Unno,et al.  Automating Induction for Solving Horn Clauses , 2016, CAV.

[2]  Edmund M. Clarke,et al.  Counterexample-Guided Abstraction Refinement , 2000, CAV.

[3]  Alberto Pettorossi,et al.  Semantics-based generation of verification conditions via program specialization , 2017, Sci. Comput. Program..

[4]  Philip Wadler,et al.  Deforestation: Transforming Programs to Eliminate Trees , 1988, Theoretical Computer Science.

[5]  Alberto Pettorossi,et al.  Program Verification using Constraint Handling Rules and Array Constraint Generalizations , 2014, CILC.

[6]  Nicolas Halbwachs,et al.  Automatic discovery of linear restraints among variables of a program , 1978, POPL.

[7]  Alberto Pettorossi,et al.  Relational Verification Through Horn Clause Transformation , 2016, SAS.

[8]  Viktor Kuncak,et al.  Satisfiability Modulo Recursive Programs , 2011, SAS.

[9]  Viktor Kuncak,et al.  Induction for SMT Solvers , 2015, VMCAI.

[10]  Jorge A. Navas,et al.  Unbounded Symbolic Execution for Program Verification , 2011, RV.

[11]  Kenneth L. McMillan,et al.  Interpolation and SAT-Based Model Checking , 2003, CAV.

[12]  Roberto Bagnara,et al.  The Parma Polyhedra Library: Toward a complete set of numerical abstractions for the analysis and verification of hardware and software systems , 2006, Sci. Comput. Program..

[13]  John P. Gallagher,et al.  Analysis of Imperative Programs through Analysis of Constraint Logic Programs , 1998, SAS.

[14]  John P. Gallagher,et al.  Rahft: A Tool for Verifying Horn Clauses Using Abstract Interpretation and Finite Tree Automata , 2016, CAV.

[15]  Vladimir Klebanov,et al.  Automating regression verification , 2014, Software Engineering & Management.

[16]  Elvira Albert,et al.  Verification of Java Bytecode Using Analysis and Transformation of Logic Programs , 2007, PADL.

[17]  Jacques D. Fleuriot,et al.  IsaPlanner: A Prototype Proof Planner in Isabelle , 2003, CADE.

[18]  Aaron R. Bradley,et al.  SAT-Based Model Checking without Unrolling , 2011, VMCAI.

[19]  Alberto Pettorossi,et al.  VeriMAP: A Tool for Verifying Programs through Transformations , 2014, TACAS.

[20]  Sandro Etalle,et al.  Transformations of CLP Modules , 1996, Theor. Comput. Sci..

[21]  Damien Doligez,et al.  The OCaml system release 4.07: Documentation and user's manual , 2013 .

[22]  Hisao Tamaki,et al.  Unfold/Fold Transformation of Logic Programs , 1984, ICLP.

[23]  Viktor Kuncak,et al.  A Verification Toolkit for Numerical Transition Systems - Tool Paper , 2012, FM.

[24]  Sagar Chaki,et al.  Automatic Abstraction in SMT-Based Unbounded Software Model Checking , 2013, CAV.

[25]  Grigory Fedyukovich,et al.  Synchronizing Constrained Horn Clauses , 2017, LPAR.

[26]  Andrey Rybalchenko,et al.  Synthesizing software verifiers from proof rules , 2012, PLDI.

[27]  Herbert B. Enderton,et al.  A mathematical introduction to logic , 1972 .

[28]  Nikolaj Bjørner,et al.  Horn Clause Solvers for Program Verification , 2015, Fields of Logic and Computation II.

[29]  M. Sørensen,et al.  Conjunctive Partial Deduction: Foundations, Control, Algorithms, and Experiments , 1999, J. Log. Program..

[30]  Alberto Pettorossi,et al.  Unfolding - Definition - Folding, in this Order, for Avaoiding Unnecessary Variables in Logic Programs , 1995, Theor. Comput. Sci..

[31]  Jorge A. Navas,et al.  A Flexible, (C)LP-Based Approach to the Analysis of Object-Oriented Programs , 2008, LOPSTR.

[32]  Nikolaj Bjørner,et al.  Generalized Property Directed Reachability , 2012, SAT.

[33]  Alberto Pettorossi,et al.  Proving correctness of imperative programs by linearizing constrained Horn clauses , 2015, Theory and Practice of Logic Programming.