Skip to main content

Inference of Polynomial Invariants for Imperative Programs: A Farewell to Gröbner Bases

  • Conference paper

Part of the Lecture Notes in Computer Science book series (LNPSE,volume 7460)

Abstract

We propose a static analysis for computing polynomial invariants for imperative programs. The analysis is derived from an abstract interpretation of a backwards semantics, and computes pre-conditions for equalities like g = 0 to hold at the end of execution. A distinguishing feature of the technique is that it computes polynomial loop invariants without resorting to Gröbner base computations. The analysis uses remainder computations over parameterized polynomials in order to handle conditionals and loops efficiently. The algorithm can analyse and find a large majority of loop invariants reported previously in the literature, and executes significantly faster than implementations using Gröbner bases.

Keywords

  • Base Computation
  • Abstract Interpretation
  • Polynomial Invariant
  • Abstract Domain
  • Abstract Semantic

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

This work was partly supported by the ANR Decert and the Région Bretagne CertLogs projects.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (Canada)
  • 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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Besson, F., Jensen, T., Pichardie, D., Turpin, T.: Certified Result Checking for Polyhedral Analysis of Bytecode Programs. In: Wirsing, M., Hofmann, M., Rauschmayer, A. (eds.) TGC 2010, LNCS, vol. 6084, pp. 253–267. Springer, Heidelberg (2010)

    CrossRef  Google Scholar 

  2. Cachera, D., Jensen, T., Jobin, A., Kirchner, F.: Fast inference of polynomial invariants for imperative programs. Research Report RR-7627, INRIA (2011)

    Google Scholar 

  3. Colón, M., Sankaranarayanan, S., Sipma, H.: 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)

    CrossRef  Google Scholar 

  4. Cousot, P., Cousot, R.: Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: POPL, pp. 238–252. ACM Press (1977)

    Google Scholar 

  5. Cousot, P., Halbwachs, N.: Automatic discovery of linear restraints among variables of a program. In: POPL, pp. 84–96. ACM Press (1978)

    Google Scholar 

  6. Cox, D., Little, J., O’Shea, D.: Ideals, varieties, and algorithms, 3rd edn. Undergraduate Texts in Mathematics. Springer (2007)

    Google Scholar 

  7. Dijkstra, E.: A Discipline of Programming. Prentice-Hall (1976)

    Google Scholar 

  8. Karr, M.: Affine relationships among variables of a program. Acta Informatica 6, 133–151 (1976)

    CrossRef  MathSciNet  MATH  Google Scholar 

  9. Kovács, L.: A Complete Invariant Generation Approach for P-solvable Loops. In: Pnueli, A., Virbitskaite, I., Voronkov, A. (eds.) PSI 2009. LNCS, vol. 5947, pp. 242–256. Springer, Heidelberg (2010)

    CrossRef  Google Scholar 

  10. Manna, Z.: Mathematical Theory of Computation. McGraw-Hill (1974)

    Google Scholar 

  11. Müller-Olm, M., Seidl, H.: Polynomial Constants Are Decidable. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 4–19. Springer, Heidelberg (2002)

    CrossRef  Google Scholar 

  12. Müller-Olm, M., Seidl, H.: Computing polynomial program invariants. Information Processing Letters 91(5), 233–244 (2004)

    CrossRef  MathSciNet  MATH  Google Scholar 

  13. Müller-Olm, M., Petter, M., Seidl, H.: Interprocedurally Analyzing Polynomial Identities. In: Durand, B., Thomas, W. (eds.) STACS 2006. LNCS, vol. 3884, pp. 50–67. Springer, Heidelberg (2006)

    CrossRef  Google Scholar 

  14. Petter, M.: Berechnung von polynomiellen Invarianten. Master’s thesis, Technische Universität München (2004)

    Google Scholar 

  15. Petter, M., Seidl, H.: Inferring polynomial program invariants with Polyinvar. Short paper, NSAD (2005)

    Google Scholar 

  16. Rodríguez-Carbonell, E.: Some programs that need polynomial invariants in order to be verified, http://www.lsi.upc.edu/~erodri/webpage/polynomial_invariants/list.html

  17. Rodríguez-Carbonell, E., Kapur, D.: Automatic generation of polynomial invariants of bounded degree using abstract interpretation. Science of Computer Programming 64(1), 54–75 (2007)

    CrossRef  MathSciNet  MATH  Google Scholar 

  18. Rodríguez-Carbonell, E., Kapur, D.: Generating all polynomial invariants in simple loops. Journal of Symbolic Computation 42(4), 443–476 (2007)

    CrossRef  MathSciNet  MATH  Google Scholar 

  19. Sankaranarayanan, S., Sipma, H., Manna, Z.: Non-linear loop invariant generation using Gröbner bases. In: POPL, pp. 318–329. ACM Press (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Cachera, D., Jensen, T., Jobin, A., Kirchner, F. (2012). Inference of Polynomial Invariants for Imperative Programs: A Farewell to Gröbner Bases. In: Miné, A., Schmidt, D. (eds) Static Analysis. SAS 2012. Lecture Notes in Computer Science, vol 7460. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-33125-1_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-33125-1_7

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-33124-4

  • Online ISBN: 978-3-642-33125-1

  • eBook Packages: Computer ScienceComputer Science (R0)