Inference of Polynomial Invariants for Imperative Programs: A Farewell to Gröbner Bases

We propose a static analysis for computing polynomial invariants for imperative programs. The analysis is derived from an abstract interpretation of a backwards semantics, and computes pre-conditions for equalities like g=0 to hold at the end of execution. A distinguishing feature of the technique is that it computes polynomial loop invariants without resorting to Grobner base computations. The analysis uses remainder computations over parameterized polynomials in order to handle conditionals and loops efficiently. The algorithm can analyse and find a large majority of loop invariants reported previously in the literature, and executes significantly faster than implementations using Grobner bases.

[1]  David A. Cox,et al.  Ideals, Varieties, and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra, 3/e (Undergraduate Texts in Mathematics) , 2007 .

[2]  Michael Karr,et al.  Affine relationships among variables of a program , 1976, Acta Informatica.

[3]  David Pichardie,et al.  Certified Result Checking for Polyhedral Analysis of Bytecode Programs , 2010, TGC.

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

[5]  Giorgio Delzanno,et al.  Constraint-Based Verification of Parameterized Cache Coherence Protocols , 2003, Formal Methods Syst. Des..

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

[7]  Henny B. Sipma,et al.  Non-linear loop invariant generation using Gröbner bases , 2004, POPL.

[8]  Arnaldo Vieira Moura,et al.  Endomorphisms for Non-trivial Non-linear Loop Invariant Generation , 2008, ICTAC.

[9]  Markus Müller-Olm,et al.  Computing polynomial program invariants , 2004, Inf. Process. Lett..

[10]  F. Kirchner,et al.  Fast inference of polynomial invariants for imperative programs , 2011 .

[11]  John McCarthy,et al.  Mathematical Theory of Computation , 1991 .

[12]  Laura Kovács A Complete Invariant Generation Approach for P-solvable Loops , 2009, Ershov Memorial Conference.

[13]  Zohar Manna,et al.  Introduction to mathematical theory of computation , 1972 .

[14]  Ernst W. Mayr,et al.  Membership in Plynomial Ideals over Q Is Exponential Space Complete , 1989, STACS.

[15]  H. Seidl,et al.  Inferring polynomial invariants with Polyinvar , 2005 .

[16]  Roland Carl Backhouse,et al.  Galois Connections and Fixed Point Calculus , 2000, Algebraic and Coalgebraic Methods in the Mathematics of Program Construction.

[17]  David A. Cox,et al.  Ideals, Varieties, and Algorithms , 1997 .

[18]  Henny B. Sipma,et al.  Linear Invariant Generation Using Non-linear Constraint Solving , 2003, CAV.

[19]  Markus Müller-Olm,et al.  Polynomial Constants Are Decidable , 2002, SAS.

[20]  Markus Müller-Olm,et al.  Interprocedurally Analyzing Polynomial Identities , 2006, STACS.

[21]  Roland Carl Backhouse,et al.  Algebraic and Coalgebraic Methods in the Mathematics of Program Construction , 2000, Lecture Notes in Computer Science.

[22]  Enric Rodríguez-Carbonell,et al.  Generating all polynomial invariants in simple loops , 2007, J. Symb. Comput..

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

[24]  Michael Colón,et al.  Polynomial approximations of the relational semantics of imperativeprograms , 2007, Sci. Comput. Program..

[25]  Patrick Cousot,et al.  Comparing the Galois Connection and Widening/Narrowing Approaches to Abstract Interpretation , 1992, PLILP.

[26]  Mark A. Hillebrand,et al.  Invariants, Modularity, and Rights , 2009, Ershov Memorial Conference.

[27]  Enric Rodríguez-Carbonell,et al.  Automatic generation of polynomial invariants of bounded degree using abstract interpretation , 2007, Sci. Comput. Program..