Generating all polynomial invariants in simple loops

  • Authors:
  • E. Rodríguez-Carbonell;D. Kapur

  • Affiliations:
  • Software Department, Technical University of Catalonia, Jordi Girona, 1-3 08034 Barcelona, Spain;Department of Computer Science, University of New Mexico, Albuquerque, NM 87131-0001, USA

  • Venue:
  • Journal of Symbolic Computation
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper presents a method for automatically generating all polynomial invariants in simple loops. It is first shown that the set of polynomials serving as loop invariants has the algebraic structure of an ideal. Based on this connection, a fixpoint procedure using operations on ideals and Grobner basis constructions is proposed for finding all polynomial invariants. Most importantly, it is proved that the procedure terminates in at most m+1 iterations, where m is the number of program variables. The proof relies on showing that the irreducible components of the varieties associated with the ideals generated by the procedure either remain the same or increase their dimension at every iteration of the fixpoint procedure. This yields a correct and complete algorithm for inferring conjunctions of polynomial equalities as invariants. The method has been implemented in Maple using the Groebner package. The implementation has been used to automatically discover non-trivial invariants for several examples to illustrate the power of the technique.