Generating Loop Invariants by Computing Vanishing Ideals of Sample Points

Loop invariants play a very important role in proving correctness of programs. In this paper, we address the problem of generating invariants of polynomial loop programs. We present a new approach, for generating polynomial equation invariants of polynomial loop programs through computing vanishing ideals of sample points. We apply rational function interpolation, based on early termination technique, to generate invariants of loop programs with symbolic initial values. Our approach avoids first-order quantifier elimination and cylindrical algebraic decomposition(CAD). An algorithm for generating polynomial invariants is proposed and some examples are given to illustrate the algorithm. Furthermore, we demonstrate on a set of loop programs with symbolic initial values that our algorithm can yield polynomial invariants with degrees high up to 15.

[1]  Yinghua Chen,et al.  Generating Polynomial Invariants with DISCOVERER and QEPCAD , 2007, Formal Methods and Hybrid Real-Time Systems.

[2]  Laura Kovács,et al.  Reasoning Algebraically About P-Solvable Loops , 2008, TACAS.

[3]  Manuel Kauers,et al.  Computing the algebraic relations of C-finite sequences and multisequences , 2008, J. Symb. Comput..

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

[5]  Ben Wegbreit,et al.  The synthesis of loop predicates , 1974, CACM.

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

[7]  Ben Wegbreit,et al.  Property extraction in well-founded property sets , 1975, IEEE Transactions on Software Engineering.

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

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

[10]  N. Bose Gröbner Bases: An Algorithmic Method in Polynomial Ideal Theory , 1995 .

[11]  Erich Kaltofen,et al.  On exact and approximate interpolation of sparse rational functions , 2007, ISSAC '07.

[12]  Deepak Kapur Automatically Generating Loop Invariants Using Quantifier Elimination , 2005, Deduction and Applications.

[13]  Zohar Manna,et al.  Logical analysis of programs , 1976, CACM.

[14]  Michael B. Monagan,et al.  Polynomial Division Using Dynamic Arrays, Heaps, and Packed Exponent Vectors , 2007, CASC.

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

[16]  V. Pan Structured Matrices and Polynomials: Unified Superfast Algorithms , 2001 .

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

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

[19]  Helmut Seidl,et al.  Precise interprocedural analysis through linear algebra , 2004, POPL.

[20]  Maria Grazia Marinari,et al.  Gröbner bases of ideals defined by functionals with an application to ideals of projective points , 1993, Applicable Algebra in Engineering, Communication and Computing.

[21]  Bruno Buchberger,et al.  The Construction of Multivariate Polynomials with Preassigned Zeros , 1982, EUROCAM.

[22]  Steven M. German,et al.  A Synthesizer of Inductive Assertions , 1975, IEEE Trans. Software Eng..

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

[24]  Jacob T. Schwartz,et al.  Fast Probabilistic Algorithms for Verification of Polynomial Identities , 1980, J. ACM.

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

[26]  Enric Rodríguez-Carbonell,et al.  Automatic Generation of Polynomial Loop Invariants: Algebraic Foundations , 2004, ISSAC '04.