Skip to main content

An Abstract Interpretation Approach for Automatic Generation of Polynomial Invariants

  • Conference paper
Static Analysis (SAS 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3148))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Chapter  Google Scholar 

  2. Bressoud, D.M.: Factorization and Primality Testing. Springer, Heidelberg (1989)

    MATH  Google Scholar 

  3. Cohen, E.: Programming in the 1990s. Springer, Heidelberg (1990)

    MATH  Google Scholar 

  4. 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)

    Chapter  Google Scholar 

  5. 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)

    Google Scholar 

  6. 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)

    Google Scholar 

  7. Cox, D., Little, J., O’Shea, D.: Ideals, Varieties and Algorithms. An Introduction to Computational Algebraic Geometry and Commutative Algebra. Springer, Heidelberg (1998)

    Google Scholar 

  8. Davenport, J.H., Siret, Y., Tournier, E.: Computer Algebra: Systems and Algorithms for Algebraic Computation. Academic Press, London (1988)

    MATH  Google Scholar 

  9. Dershowitz, N., Manna, Z.: Inference rules for program annotation. In: Proceedings of the 3rd International Conference on Software Engineering, pp. 158–167 (1978)

    Google Scholar 

  10. Dijkstra, E.: A Discipline of Programming. Prentice-Hall, Englewood Cliffs (1976)

    MATH  Google Scholar 

  11. Freire, P.: http://www.pedrofreire.com/crea2_en.htm?

  12. Grayson, D.R., Stillman, M.E.: Macaulay 2, a Software System for Research in Algebraic Geometry, Available at http://www.math.uiuc.edu/Macaulay2/

  13. Kaldewaij, A.: Programming. The Derivation of Algorithms. Prentice-Hall, Englewood Cliffs (1990)

    Google Scholar 

  14. Kapur, D.: A Refutational Approach to Geometry Theorem Proving. Artificial Intelligence 37, 61–93 (1988)

    Article  MATH  MathSciNet  Google Scholar 

  15. 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)

    Google Scholar 

  16. Karr, M.: Affine Relationships Among Variables of a Program. Acta Informatica 6, 133–151 (1976)

    Article  MATH  MathSciNet  Google Scholar 

  17. Knuth, D.E.: The Art of Computer Programming. Seminumerical Algorithms, vol. 2. Addison-Wesley, Reading (1969)

    MATH  Google Scholar 

  18. 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)

    Google Scholar 

  19. Rodríguez-Carbonell, E., Kapur, D.: An Abstract Interpretation Approach for Automatic Generation of Polynomial Invariants (extended version), http://www.lsi.upc.es/~erodri

  20. 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

  21. Rodríguez-Carbonell, E., Kapur, D.: Program Verification Using Automatic Generation of Polynomial Invariants, http://www.lsi.upc.es/~erodri

  22. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics