Loop Invariants on Demand

This paper describes a sound technique that combines the precision of theorem proving with the loop-invariant inference of abstract interpretation. The loop-invariant computations are invoked on demand when the need for a stronger loop invariant arises, which allows a gradual increase in the level of precision used by the abstract interpreter. The technique generates loop invariants that are specific to a subset of a program’s executions, achieving a dynamic and automatic form of value-based trace partitioning. Finally, the technique can be incorporated into a lemmas-on-demand theorem prover, where the loop-invariant inference happens after the generation of verification conditions.

[1]  Rajeev Alur,et al.  A Temporal Logic of Nested Calls and Returns , 2004, TACAS.

[2]  K. Rustan M. Leino,et al.  The Spec# Programming System: An Overview , 2004, CASSIS.

[3]  K. Rustan M. Leino,et al.  Weakest-precondition of unstructured programs , 2005, PASTE '05.

[4]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

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

[6]  Thomas A. Henzinger,et al.  Lazy abstraction , 2002, POPL '02.

[7]  Francesco Logozzo,et al.  Class-Level Modular Analysis for Object Oriented Languages , 2003, SAS.

[8]  Alan Bundy,et al.  Constructing Induction Rules for Deductive Synthesis Proofs , 2006, CLASE.

[9]  Maria Handjieva,et al.  Refining Static Analyses by Trace-Based Partitioning Using Control Flow , 1998, SAS.

[10]  François Bourdoncle,et al.  Abstract interpretation by dynamic partitioning , 1992, Journal of Functional Programming.

[11]  C. A. R. Hoare,et al.  An axiomatic basis for computer programming , 1969, CACM.

[12]  K. Rustan M. Leino,et al.  Efficient weakest preconditions , 2005, Inf. Process. Lett..

[13]  J. Saxe,et al.  An Explicating Theorem Prover for Quantified Formulas , 2004 .

[14]  K. Rustan M. Leino,et al.  Checking Java Programs via Guarded Commands , 1999, ECOOP Workshops.

[15]  Nicolas Halbwachs,et al.  Dynamic Partitioning in Analyses of Numerical Properties , 1999, SAS.

[16]  Stephen Gilmore,et al.  Mobile Resource Guarantees for Smart Devices , 2004, CASSIS.

[17]  Reinhard Wilhelm,et al.  Parametric shape analysis via 3-valued logic , 2002, TOPL.

[18]  K. Rustan M. Leino,et al.  BoogiePL: A typed procedural language for checking object-oriented programs , 2005 .

[19]  Bor-Yuh Evan Chang,et al.  Inferring Object Invariants: Extended Abstract , 2005, Electron. Notes Theor. Comput. Sci..

[20]  Roberto Giacobazzi,et al.  The Reduced Relative Power Operation on Abstract Domains , 1999, Theor. Comput. Sci..

[21]  Greg Nelson,et al.  A generalization of Dijkstra's calculus , 1989, ACM Trans. Program. Lang. Syst..

[22]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[23]  Thomas W. Reps,et al.  Symbolically Computing Most-Precise Abstract Operations for Shape Analysis , 2004, TACAS.

[24]  Cormac Flanagan,et al.  Avoiding exponential explosion: generating compact verification conditions , 2001, POPL '01.

[25]  Bowen Alpern,et al.  Detecting equality of variables in programs , 1988, POPL '88.

[26]  Patrick Cousot,et al.  Systematic design of program analysis frameworks , 1979, POPL.

[27]  K. Rustan M. Leino,et al.  A Two-Tier Technique for Supporting Quantifiers in a Lazily Proof-Explicating Theorem Prover , 2005, TACAS.

[28]  Shuvendu K. Lahiri,et al.  Zapato: Automatic Theorem Proving for Predicate Abstraction Refinement , 2004, CAV.

[29]  Francesco Logozzo Approximating module semantics with constraints , 2004, SAC '04.

[30]  Martin Rinard,et al.  Combining Theorem proving with Static Analysis for Data Structure Consistency , 2004 .

[31]  Antoine Miné,et al.  The octagon abstract domain , 2001, High. Order Symb. Comput..

[32]  Patrick Cousot,et al.  The calculational design of a generic abstract interpreter , 1999 .

[33]  Thomas A. Henzinger,et al.  Abstractions from proofs , 2004, POPL.

[34]  Antoine Mid The Octagon Abstract Domain , 2001 .

[35]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[36]  Hassen Saïdi,et al.  Construction of Abstract State Graphs with PVS , 1997, CAV.

[37]  Sriram K. Rajamani,et al.  Automatically validating temporal safety properties of interfaces , 2001, SPIN '01.

[38]  Sergey Berezin,et al.  CVC Lite: A New Implementation of the Cooperating Validity Checker Category B , 2004, CAV.

[39]  Shlomo Nir,et al.  NATO ASI Series , 1995 .

[40]  Xavier Rival,et al.  Trace Partitioning in Abstract Interpretation Based Static Analyzers , 2005, ESOP.

[41]  Xinming Ou,et al.  Theorem Proving Using Lazy Proof Explication , 2003, CAV.

[42]  L. D. Moura Lemmas on Demand for Satisfiability Solvers , 2002 .

[43]  Manfred Broy,et al.  Calculational system design , 1999 .