Towards Verifying Procedural Programs using Constrained Rewriting Induction

This paper aims at developing a verification method for procedural programs via a transformation into the recently introduced Logically Constrained Term Rewriting Systems (LCTRSs). To this end, we introduce an extension of transformation methods based on integer TRSs, which can also handle global variables and arrays, and encode safety checks. Then we adapt existing rewriting induction methods to LCTRSs and propose a simple yet effective method to generalize equations. We show that we can automatically verify memory safety and prove correctness of realistic functions, involving for instance integers and arrays.

[1]  John McCarthy,et al.  Recursive functions of symbolic expressions and their computation by machine, Part I , 1960, Commun. ACM.

[2]  Emmanuel Kounalis,et al.  Sound generalizations in mathematical induction , 2004, Theor. Comput. Sci..

[3]  Alan Bundy,et al.  Rippling - meta-level guidance for mathematical reasoning , 2005, Cambridge tracts in theoretical computer science.

[4]  Florent Jacquemard,et al.  Automated Induction with Constrained Tree Automata , 2008, IJCAR.

[5]  Valentin Goranko,et al.  Logic in Computer Science: Modelling and Reasoning About Systems , 2007, J. Log. Lang. Inf..

[6]  Ashutosh Gupta,et al.  Predicate abstraction and refinement for verifying multi-threaded programs , 2011, POPL '11.

[7]  Gérard P. Huet,et al.  Proofs by induction in equational theories with constructors , 1980, 21st Annual Symposium on Foundations of Computer Science (sfcs 1980).

[8]  Deepak Kapur,et al.  Automatic Generation of Generalization Lemmas for Proving Properties of Tail-Recursive Definitions , 2003, TPHOLs.

[9]  Deepak Kapur,et al.  Lemma Discovery in Automated Induction , 1996, CADE.

[10]  Cynthia Kop Termination of LCTRSs , 2016, ArXiv.

[11]  Toby Walsh,et al.  A Divergence Critic for Inductive Proof , 1996, J. Artif. Intell. Res..

[12]  Cynthia Kop,et al.  Term Rewriting with Logical Constraints , 2013, FroCos.

[13]  Florent Jacquemard,et al.  Automated Induction for Complex Data Structures , 2008, ArXiv.

[14]  Sorin Lerner,et al.  Proving optimizations correct using parameterized program equivalence , 2009, PLDI '09.

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

[16]  Frank van Harmelen,et al.  Rippling: A Heuristic for Guiding Inductive Proofs , 1993, Artif. Intell..

[17]  Salvador Lucas,et al.  Removing redundant arguments automatically , 2006, Theory and Practice of Logic Programming.

[18]  Alexander Aiken,et al.  Secure Information Flow as a Safety Problem , 2005, SAS.

[19]  Amir Pnueli,et al.  Translation Validation , 1998, TACAS.

[20]  Masahiko Sakai,et al.  Lemma Generation Method in Rewriting Induction for Constrained Term Rewriting Systems , 2012 .

[21]  Toshiki Sakabe,et al.  On Proving Termination of Constrained Term Rewrite Systems by Eliminating Edges from Dependency Graphs , 2011, WFLP.

[22]  Uday S. Reddy,et al.  Term Rewriting Induction , 1990, CADE.

[23]  Christian von Essen,et al.  Automated Termination Analysis of Java Bytecode by Term Rewriting , 2010, RTA.

[24]  Elvira Albert,et al.  Removing useless variables in cost analysis of Java bytecode , 2008, SAC '08.

[25]  Toby Walsh,et al.  Difference Matching , 1992, CADE.

[26]  Cynthia Kop,et al.  Automatic Constrained Rewriting Induction towards Verifying Procedural Programs , 2014, APLAS.

[27]  Deepak Kapur,et al.  Termination Analysis of C Programs Using Compiler Intermediate Languages , 2011, RTA.

[28]  George C. Necula,et al.  Translation validation for an optimizing compiler , 2000, PLDI '00.

[29]  Frédéric Mesnard,et al.  Using CLP Simplifications to Improve Java Bytecode Termination Analysis , 2009, Electron. Notes Theor. Comput. Sci..

[30]  Jürgen Giesl,et al.  Deaccumulation techniques for improving provability , 2007, J. Log. Algebraic Methods Program..

[31]  Dirk Beyer,et al.  Software model checking via large-block encoding , 2009, 2009 Formal Methods in Computer-Aided Design.

[32]  Tobias Nipkow,et al.  Term rewriting and all that , 1998 .

[33]  Deepak Kapur,et al.  Rewriting Induction + Linear Arithmetic = Decision Procedure , 2012, IJCAR.

[34]  Ofer Strichman,et al.  Inference rules for proving the equivalence of recursive procedures , 2008, Acta Informatica.

[35]  José C. Monteiro,et al.  Automatic equivalence checking of programs with uninterpreted functions and integer arithmetic , 2015, International Journal on Software Tools for Technology Transfer.

[36]  Jürgen Giesl,et al.  Proving Termination of Integer Term Rewriting , 2009, RTA.

[37]  Stephan Falke,et al.  Term rewriting with built-in numbers and collection data structures , 2009 .

[38]  Raymond AUBIN,et al.  Mechanizing Structural Induction Part I: Formal System , 1979, Theor. Comput. Sci..

[39]  Alan Bundy,et al.  The Automation of Proof by Mathematical Induction , 1999, Handbook of Automated Reasoning.

[40]  Adel Bouhoula,et al.  Automated Theorem Proving by Test Set Induction , 1997, J. Symb. Comput..

[41]  Cesare Tinelli,et al.  Solving SAT and SAT Modulo Theories: From an abstract Davis--Putnam--Logemann--Loveland procedure to DPLL(T) , 2006, JACM.

[42]  Cesare Tinelli,et al.  An Automatable Formal Semantics for IEEE-754 Floating-Point Arithmetic , 2015, 2015 IEEE 22nd Symposium on Computer Arithmetic.

[43]  Shuvendu K. Lahiri,et al.  Towards Modularly Comparing Programs Using Automated Theorem Provers , 2013, CADE.

[44]  Marc Brockschmidt,et al.  Better Termination Proving through Cooperation , 2013, CAV.

[45]  Shuvendu K. Lahiri,et al.  SYMDIFF: A Language-Agnostic Semantic Diff Tool for Imperative Programs , 2012, CAV.

[46]  Deepak Kapur,et al.  A Term Rewriting Approach to the Automated Termination Analysis of Imperative Programs , 2009, CADE.