Bridging Arrays and ADTs in Recursive Proofs

We present an approach to synthesize relational invariants to prove equivalences between object-oriented programs. The approach bridges the gap between recursive data types and arrays that serve to represent internal states. Our relational invariants are recursively-defined, and thus are valid for data structures of unbounded size. Based on introducing recursion into the proofs by observing and lifting the constraints from joint methods of the two objects, our approach is fully automatic and can be seen as an algorithm for solving Constrained Horn Clauses (CHC) of a specific sort. It has been implemented on top of the SMT-based CHC solver AdtChc and evaluated on a range of benchmarks.

[1]  Serdar Tasiran,et al.  Code-Level Model Checking in the Software Development Workflow , 2020, 2020 IEEE/ACM 42nd International Conference on Software Engineering: Software Engineering in Practice (ICSE-SEIP).

[2]  Grigory Fedyukovich,et al.  Lemma Synthesis for Automating Induction over Algebraic Data Types , 2019, CP.

[3]  Sidney Amani,et al.  Cogent: Verifying High-Assurance File System Implementations , 2016, ASPLOS.

[4]  Viktor Kuncak,et al.  Synthesis modulo recursive functions , 2013, OOPSLA.

[5]  Cliff B. Jones,et al.  Systematic software development using VDM , 1986, Prentice Hall International Series in Computer Science.

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

[7]  Rastislav Bodík,et al.  Sampling invariants from frequency distributions , 2017, 2017 Formal Methods in Computer Aided Design (FMCAD).

[8]  Robin Milner,et al.  An Algebraic Definition of Simulation Between Programs , 1971, IJCAI.

[9]  C. A. R. Hoare,et al.  Data Refinement Refined , 1986, ESOP.

[10]  Kedar S. Namjoshi,et al.  Witnessing Program Transformations , 2013, SAS.

[11]  Egon Börger,et al.  The ASM Refinement Method , 2003, Formal Aspects of Computing.

[12]  Sagar Chaki,et al.  SMT-based model checking for recursive programs , 2014, Formal Methods in System Design.

[13]  Gidon Ernst,et al.  KIV: overview and VerifyThis competition , 2014, International Journal on Software Tools for Technology Transfer.

[14]  Jeannette M. Wing,et al.  A behavioral notion of subtyping , 1994, TOPL.

[15]  Rajeev Alur,et al.  Syntax-guided synthesis , 2013, 2013 Formal Methods in Computer-Aided Design.

[16]  Adam Chlipala,et al.  Using Crash Hoare logic for certifying the FSCQ file system , 2015, USENIX Annual Technical Conference.

[17]  Peter W. O'Hearn,et al.  Continuous Reasoning: Scaling the impact of formal methods , 2018, LICS.

[18]  Ralph-Johan Back,et al.  Refinement Calculus: A Systematic Introduction , 1998 .

[19]  Naoki Kobayashi,et al.  HoIce: An ICE-Based Non-linear Horn Clause Solver , 2018, APLAS.

[20]  Cesare Tinelli,et al.  cvc4sy: Smart and Fast Term Enumeration for Syntax-Guided Synthesis , 2019, CAV.

[21]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[22]  Clark W. Barrett,et al.  Verifying Low-Level Implementations of High-Level Datatypes , 2010, CAV.

[23]  Grigory Fedyukovich,et al.  Solving Constrained Horn Clauses Using Syntax and Data , 2018, 2018 Formal Methods in Computer Aided Design (FMCAD).

[24]  Jean-Raymond Abrial,et al.  Modeling in event-b - system and software engineering by Jean-Raymond Abrial , 2010, SOEN.

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

[26]  Grigory Fedyukovich,et al.  Quantified Invariants via Syntax-Guided Synthesis , 2019, CAV.

[27]  Nicolas Christin,et al.  Push-Button Verification of File Systems via Crash Refinement , 2016, USENIX Annual Technical Conference.

[28]  Gilles Barthe,et al.  Relational Verification Using Product Programs , 2011, FM.

[29]  Philipp Rümmer,et al.  The ELDARICA Horn Solver , 2018, 2018 Formal Methods in Computer Aided Design (FMCAD).

[30]  Edsger W. Dijkstra,et al.  A constructive approach to the problem of program correctness , 1968 .

[31]  K. Rustan M. Leino,et al.  Program extrapolation with jennisys , 2012, OOPSLA '12.

[32]  Grigory Fedyukovich,et al.  Property Directed Inference of Relational Invariants , 2019, 2019 Formal Methods in Computer Aided Design (FMCAD).

[33]  Ofer Strichman,et al.  Regression Verification for Unbalanced Recursive Functions , 2016, FM.

[34]  Armando Solar-Lezama,et al.  Synthesis of Recursive ADT Transformations from Reusable Templates , 2015, TACAS.

[35]  Xavier Leroy,et al.  Formal verification of a realistic compiler , 2009, CACM.

[36]  Gidon Ernst,et al.  Development of a Verified Flash File System , 2014, ABZ.

[37]  Alberto Pettorossi,et al.  Solving Horn Clauses on Inductive Data Types Without Induction - ERRATUM , 2019, Theory Pract. Log. Program..

[38]  Jorge A. Navas,et al.  The SeaHorn Verification Framework , 2015, CAV.

[39]  Marie-Laure Potet,et al.  Composition and Refinement in the B-Method , 1998, B.

[40]  Dirk Beyer,et al.  CPAchecker: A Tool for Configurable Software Verification , 2009, CAV.

[41]  Alexander Aiken,et al.  Data-driven equivalence checking , 2013, OOPSLA.

[42]  Alberto Pettorossi,et al.  Solving Horn Clauses on Inductive Data Types Without Induction , 2018, Theory and Practice of Logic Programming.

[43]  Arie Gurfinkel,et al.  Automated Discovery of Simulation Between Programs , 2015, LPAR.

[44]  Viktor Kuncak,et al.  Decision procedures for algebraic data types with abstractions , 2010, POPL '10.

[45]  Brian Huffman,et al.  Continuous Formal Verification of Amazon s2n , 2018, CAV.

[46]  Kai Engelhardt,et al.  Data Refinement: Model-Oriented Proof Methods and their Comparison , 1998 .

[47]  Todd Millstein,et al.  Data-driven inference of representation invariants , 2020, PLDI.

[48]  Xi Wang,et al.  Hyperkernel: Push-Button Verification of an OS Kernel , 2017, SOSP.

[49]  Bernhard Beckert,et al.  Lessons Learned From Microkernel Verification -- Specification is the New Bottleneck , 2012, SSV.

[50]  Grigory Fedyukovich,et al.  Exploiting Synchrony and Symmetry in Relational Verification , 2018, CAV.

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

[52]  Leslie Lamport,et al.  Specifying Systems: The TLA+ Language and Tools for Hardware and Software Engineers [Book Review] , 2002, Computer.

[53]  George Candea,et al.  Verifying software network functions with no verification expertise , 2019, SOSP.

[54]  Niklaus Wirth,et al.  Program development by stepwise refinement , 1971, CACM.