|
ABSTRACT
This paper presents the algebraic foundation for an approach for generating polynomial loop invariants in imperative programs. It is first shown that the set of polynomials serving as loop invariants has the algebraic structure of an ideal. Using this connection, a procedure for finding loop invariants is given in terms of operations on ideals, for which Grobner 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 in the loop. The proof is done by showing that the irreducible subvarieties of the variety associated with the 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 techniques.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
D. M. Bressoud. Factorization and Primality Testing. Springer-Verlag, 1989.
|
| |
2
|
E. Cohen. Programming in the 1990s. Springer-Verlag, 1990.
|
| |
3
|
M. A. Colon, S. Sankaranarayanan, and H. Sipma. Linear Invariant Generation Using Non-Linear Constraint Solving. In Computer-Aided Verification (CAV 2003), volume 2725 of Lecture Notes in Computer Science, pages 420--432. Springer-Verlag, 2003.
|
 |
4
|
|
 |
5
|
|
| |
6
|
D. Cox, J. Little, and D. O'Shea. Ideals, Varieties and Algorithms. An Introduction to Computational Algebraic Geometry and Commutative Algebra. Springer-Verlag, 1998.
|
| |
7
|
|
| |
8
|
B. Elspas, M. Green, K. Levitt, and R. Waldinger. Research in Interactive Program-Proving Techniques. Technical report, Stanford Research Institute, Menlo Park, California, USA, May 1972.
|
| |
9
|
P. Freire. www.pedrofreire.com/crea2_en.htm?
|
| |
10
|
S. German and B. Wegbreit. A Synthesizer of Inductive Assertions. IEEE Transactions on Software Engineering, 1(1):68--75, 1975.
|
 |
11
|
|
| |
12
|
|
| |
13
|
M. Karr. Affine Relationships Among Variables of a Program. Acta Informatica, 6:133--151, 1976.
|
 |
14
|
|
| |
15
|
|
| |
16
|
M. Müller-Olm and H. Seidl. Computing Interprocedurally Valid Relations in Affine Programs. In ACM SIGPLAN Principles of Programming Languages (POPL 2004), pages 330--341, 2004.
|
| |
17
|
E. Rodríguez-Carbonell and D. Kapur. Program Verification Using Automatic Generation of Polynomial Invariants. \tt www.lsi.upc.es/\ erodri.
|
 |
18
|
|
| |
19
|
|
 |
20
|
|
| |
21
|
B. Wegbreit. Property Extraction in Well-founded Property Sets. IEEE Transactions on Software Engineering, 1(3):270--285, September 1975.
|
|