Abstract
A method for generating polynomial invariants of imperative programs is presented using the abstract interpretation framework. It is shown that for programs with polynomial assignments, an invariant consisting of a conjunction of polynomial equalities can be automatically generated for each program point. The proposed approach takes into account tests in conditional statements as well as in loops, insofar as they can be abstracted to be polynomial equalities and disequalities. The semantics of each statement is given as a transformation on polynomial ideals. Merging of paths in a program is defined as the intersection of the polynomial ideals associated with each path. For a loop junction, a widening operator based on selecting polynomials up to a certain degree is proposed. The algorithm for finding invariants using this widening operator is shown to terminate in finitely many steps. The proposed approach has been implemented and successfully tried on many programs. A table providing details about the programs is given.
This research was partially supported by an NSF ITR award CCR-0113611, the Prince of Asturias Endowed Chair in Information Science and Technology at the University of New Mexico, an FPU grant from the Spanish SecretarÃa de Estado de Educación y Universidades, ref. AP2002-3693, and the Spanish project MCYT TIC2001-2476-C03-01.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Bourdoncle, F.: Efficient Chaotic Iteration Strategies with Widenings. In: Pottosin, I.V., Bjorner, D., Broy, M. (eds.) FMP&TA 1993. LNCS, vol. 735, pp. 128–141. Springer, Heidelberg (1993)
Bressoud, D.M.: Factorization and Primality Testing. Springer, Heidelberg (1989)
Cohen, E.: Programming in the 1990s. Springer, Heidelberg (1990)
Colón, M.A., Sankaranarayanan, S., Sipma, H.B.: Linear Invariant Generation Using Non-Linear Constraint Solving. In: Hunt Jr., W.A., Somenzi, F. (eds.) CAV 2003. LNCS, vol. 2725, pp. 420–432. Springer, Heidelberg (2003)
Cousot, P., Cousot, R.: Abstract Interpretation: a Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In: Conference Record of the Fourth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 238–252 (1977)
Cousot, P., Halbwachs, N.: Automatic Discovery of Linear Restraints among Variables of a Program. In: Conference Record of the Fifth Annual ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, pp. 84–97 (1978)
Cox, D., Little, J., O’Shea, D.: Ideals, Varieties and Algorithms. An Introduction to Computational Algebraic Geometry and Commutative Algebra. Springer, Heidelberg (1998)
Davenport, J.H., Siret, Y., Tournier, E.: Computer Algebra: Systems and Algorithms for Algebraic Computation. Academic Press, London (1988)
Dershowitz, N., Manna, Z.: Inference rules for program annotation. In: Proceedings of the 3rd International Conference on Software Engineering, pp. 158–167 (1978)
Dijkstra, E.: A Discipline of Programming. Prentice-Hall, Englewood Cliffs (1976)
Freire, P.: http://www.pedrofreire.com/crea2_en.htm?
Grayson, D.R., Stillman, M.E.: Macaulay 2, a Software System for Research in Algebraic Geometry, Available at http://www.math.uiuc.edu/Macaulay2/
Kaldewaij, A.: Programming. The Derivation of Algorithms. Prentice-Hall, Englewood Cliffs (1990)
Kapur, D.: A Refutational Approach to Geometry Theorem Proving. Artificial Intelligence 37, 61–93 (1988)
Kapur, D., Narendran, P.: An equational approach to theorem proving in firstorder predicate calculus. In: Proceedings of the Ninth International Joint Conference on Artificial Intelligence (IJCAI 1985), August 1985, pp. 1146–1153 (1985)
Karr, M.: Affine Relationships Among Variables of a Program. Acta Informatica 6, 133–151 (1976)
Knuth, D.E.: The Art of Computer Programming. Seminumerical Algorithms, vol. 2. Addison-Wesley, Reading (1969)
Müller-Olm, M., Seidl, H.: Computing Interprocedurally Valid Relations in Affine Programs. In: ACM SIGPLAN Principles of Programming Languages (POPL 2004), pp. 330–341 (2004)
RodrÃguez-Carbonell, E., Kapur, D.: An Abstract Interpretation Approach for Automatic Generation of Polynomial Invariants (extended version), http://www.lsi.upc.es/~erodri
RodrÃguez-Carbonell, E., Kapur, D.: Automatic Generation of Polynomial Loop Invariants: Algebraic Foundations. To appear in International Symposium on Symbolic and Algebraic Computation 2004, ISSAC 2004 (2004), www.lsi.upc.es/~erodri
RodrÃguez-Carbonell, E., Kapur, D.: Program Verification Using Automatic Generation of Polynomial Invariants, http://www.lsi.upc.es/~erodri
Sankaranarayanan, S., Sipma, H.B., Manna, Z.: Non-linear Loop Invariant Generation Using Gröbner Bases. In: ACM SIGPLAN Principles of Programming Languages (POPL 2004), pp. 318–329 (2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
RodrÃguez-Carbonell, E., Kapur, D. (2004). An Abstract Interpretation Approach for Automatic Generation of Polynomial Invariants. In: Giacobazzi, R. (eds) Static Analysis. SAS 2004. Lecture Notes in Computer Science, vol 3148. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-27864-1_21
Download citation
DOI: https://doi.org/10.1007/978-3-540-27864-1_21
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-22791-5
Online ISBN: 978-3-540-27864-1
eBook Packages: Springer Book Archive