Reference. Automatic Generation of Polynomial Loop Invariants: Algebraic Foundations
In [17], an abstract framework for automatically generating loop invariants of imperative programs was proposed. This framework was then instantiated for the language of conjunctions of polynomial equations for expressing loop invariants. This paper presents an algebraic foundation of the approach. It is first shown that the set of polynomials serving as loop invariants has the algebraic structure of an ideal. Using this connection, it is proved that the procedure for finding invariants can be expressed using operations on ideals, for which Gröbner basis constructions can be employed. Most importantly, it is proved that if the assignment statements in a loop are solvable –in particular, affine– mappings with positive eigenvalues, then the procedure terminates in at most 2m+1 iterations, where m is the number of variables changing in the loop. The proof is done by showing that the irreducible subvarieties of the variety associated with a polynomial ideal approximating the invariant polynomial ideal of the loop either stay the same or increase their dimension in every iteration. This yields a correct and complete algorithm for inferring conjunctions of polynomial equations as invariants. The method has been implemented in Maple using the Groebner package. The implementation has been used to automatically discover nontrivial invariants for several examples to illustrate the power of the technique.
Cite
Cites 21 works (0 here)
External (21)
- Precise interprocedural analysis through linear algebra (cited as 'Computing Interprocedurally Valid Relations in Affine Programs', Müller-Olm & Seidl, POPL 2004, pp. 330-341) (2004)
- Non-linear loop invariant generation using Gröbner bases (2004)
- Linear Invariant Generation Using Non-Linear Constraint Solving (2003)
- The verifying compiler (2003)
- Ideals, Varieties and Algorithms. An Introduction to Computational Algebraic Geometry and Commutative Algebra (1998)
- Enumerative Combinatorics (1997)
- Programming in the 1990s (1990)
- Programming: The Derivation of Algorithms (1990)
- Factorization and Primality Testing (1989)
- Automatic discovery of linear restraints among variables of a program (1978)
- Abstract interpretation (1977)
- Affine relationships among variables of a program (1976)
- Logical analysis of programs (1976)
- A Discipline of Programming (1976)
- A synthesizer of inductive assertions (1975)
- Property extraction in well-founded property sets (1975)
- The synthesis of loop predicates (1974)
- Research in Interactive Program-Proving Techniques (1972)
- The Art of Computer Programming, Volume 2: Seminumerical Algorithms (1969)
- P. Freire, web page www.pedrofreire.com/crea2_en.htm
- Program Verification Using Automatic Generation of Polynomial Invariants (Rodríguez-Carbonell & Kapur, manuscript)