Skip to main content

Geometric Quantifier Elimination Heuristics for Automatically Generating Octagonal and Max-plus Invariants

  • Chapter
Book cover Automated Reasoning and Mathematics

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 7788))

Abstract

Geometric heuristics for the quantifier elimination approach presented by Kapur (2004) are investigated to automatically derive loop invariants expressing weakly relational numerical properties (such as l ≤ x ≤ h or l ≤ ±x ±y ≤ h) for imperative programs. Such properties have been successfully used to analyze commercial software consisting of hundreds of thousands of lines of code (using for example, the Astrée tool based on abstract interpretation framework proposed by Cousot and his group). The main attraction of the proposed approach is its much lower complexity in contrast to the abstract interpretation approach (O(n2) in contrast to O(n4), where n is the number of variables) with the ability to still generate invariants of comparable strength. This approach has been generalized to consider disjunctive invariants of the similar form, expressed using maximum function (such as max (x + a,y + b,z + c,d) ≤ max (x + e,y + f,z + g,h)), thus enabling automatic generation of a subclass of disjunctive invariants for imperative programs as well.

Partially supported by NSF grants CCF-0729097 and CNS-0905222, by a fellowship from the Postdoc Program of the German Academic Exchange Service (DAAD), and by EXACTA and the China Scholarship Council.

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 49.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. Allamigeon, X.: Static analysis of memory manipulations by abstract interpretation–Algorithmics of tropical polyhedra, and application to abstract interpretation. PhD thesis, Ecole Polytechnique, Palaiseau, France (2009)

    Google Scholar 

  2. Allamigeon, X., Gaubert, S., Goubault, É.: Inferring Min and Max Invariants Using Max-Plus Polyhedra. In: Alpuente, M., Vidal, G. (eds.) SAS 2008. LNCS, vol. 5079, pp. 189–204. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  3. Bagnara, R., Hill, P.M., Zaffanella, E.: An Improved Tight Closure Algorithm for Integer Octagonal Constraints. In: Logozzo, F., Peled, D.A., Zuck, L.D. (eds.) VMCAI 2008. LNCS, vol. 4905, pp. 8–21. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  4. Bezem, M., Nieuwenhuis, R., Rodriguez-Carbonell, E.: Hard problems in max-algebra, control theory, hypergraphs and other areas. Information Processing Letters 110(4), 133–138 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  5. Blanchet, B., Cousot, P., Cousot, R., Feret, J., Mauborgne, L., Miné, A., Monniaux, D., Rival, X.: Design and Implementation of a Special-Purpose Static Program Analyzer for Safety-Critical Real-Time Embedded Software. In: Mogensen, T.Æ., Schmidt, D.A., Sudborough, I.H. (eds.) The Essence of Computation. LNCS, vol. 2566, pp. 85–108. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  6. Butkovič, P.: Max-Linear Systems: Theory and Algorithms. Springer Monographs in Mathematics. Springer (2010)

    Google Scholar 

  7. Chawdhary, A., Cook, B., Gulwani, S., Sagiv, M., Yang, H.: Ranking Abstractions. In: Drossopoulou, S. (ed.) ESOP 2008. LNCS, vol. 4960, pp. 148–162. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  8. 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. ACM Press, New York (1977)

    Chapter  Google Scholar 

  9. Cousot, P., Cousot, R., Feret, J., Mauborgne, L., Miné, A., Monniaux, D., Rival, X.: The Astrée analyzer. In: Programming Languages and Systems, p. 140 (2005)

    Google Scholar 

  10. Cousot, P., Halbwachs, N.: Automatic Discovery of Linear Restraints among Variables of a Program. In: Conference Record of the Fifth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Tucson, Arizona, pp. 84–97. ACM Press, New York (1978)

    Chapter  Google Scholar 

  11. Cousot, P., Cousot, R.: Abstract interpretation frameworks. Journal of Logic and Computation 2, 511–547 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  12. Flanagan, C., Saxe, J.B.: Avoiding exponential explosion: generating compact verification conditions. In: POPL, pp. 193–205 (2001)

    Google Scholar 

  13. Gaubert, S., Katz, R.: Max-Plus Convex Geometry. In: Schmidt, R.A. (ed.) RelMiCS/AKA 2006. LNCS, vol. 4136, pp. 192–206. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  14. Gulwani, S., Jha, S., Tiwari, A., Venkatesan, R.: Synthesis of loop-free programs. In: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 62–73. ACM (2011)

    Google Scholar 

  15. Gulwani, S., Srivastava, S., Venkatesan, R.: Program analysis as constraint solving. In: PLDI, pp. 281–292 (2008)

    Google Scholar 

  16. Gulwani, S., Tiwari, A.: Constraint-Based Approach for Analysis of Hybrid Systems. In: Gupta, A., Malik, S. (eds.) CAV 2008. LNCS, vol. 5123, pp. 190–203. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  17. Henzinger, T.A., Jhala, R., Majumdar, R., McMillan, K.L.: Abstractions from proofs. In: Jones, N.D., Leroy, X. (eds.) POPL, pp. 232–244. ACM (2004)

    Google Scholar 

  18. Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12(10), 576–580 (1969)

    Article  MATH  Google Scholar 

  19. Jaffar, J., Maher, M., Stuckey, P., Yap, R.: Beyond Finite Domains. In: Borning, A. (ed.) PPCP 1994. LNCS, vol. 874, pp. 86–94. Springer, Heidelberg (1994)

    Chapter  Google Scholar 

  20. Jeannet, B., Argoud, M., Lalire, G.: The Interproc interprocedural analyzer

    Google Scholar 

  21. Jha, S., Seshia, S.A., Tiwari, A.: Synthesis of optimal switching logic for hybrid systems. In: EMSOFT 2011, pp. 107–116. ACM (2011)

    Google Scholar 

  22. Kapur, D.: A quantifier-elimination based heuristic for automatically generating inductive assertions for programs. Journal of Systems Science and Complexity 19(3), 307–330 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  23. Kapur, D.: Automatically generating loop invariants using quantifier elimination—preliminary report. Technical report, University of New Mexico, Albuquerque, NM, USA (2004)

    Google Scholar 

  24. Loos, R., Weispfenning, V.: Applying linear quantifier elimination. Computer Journal (1993)

    Google Scholar 

  25. Miné, A.: Weakly relational numerical abstract domains. These de doctorat en informatique, École polytechnique, Palaiseau, France (2004)

    Google Scholar 

  26. Sankaranarayanan, S., Sipma, H.B., Manna, Z.: Non-linear Loop Invariant Generation using Gröbner Bases. In: Symp. on Principles of Programming Languages (2004)

    Google Scholar 

  27. Sheini, H.M., Sakallah, K.A.: A Scalable Method for Solving Satisfiability of Integer Linear Arithmetic Logic. In: Bacchus, F., Walsh, T. (eds.) SAT 2005. LNCS, vol. 3569, pp. 241–256. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  28. Srivastava, S., Gulwani, S., Foster, J.S.: From program verification to program synthesis. In: POPL, pp. 313–326 (2010)

    Google Scholar 

  29. Sturm, T., Tiwari, A.: Verification and synthesis using real quantifier elimination. In: ISSAC 2011, pp. 329–336. ACM (2011)

    Google Scholar 

  30. Taly, A., Gulwani, S., Tiwari, A.: Synthesizing switching logic using constraint solving. STTT 13(6), 519–535 (2011)

    Article  MATH  Google Scholar 

  31. Xia, B., Zhang, Z.: Termination of linear programs with nonlinear constraints. J. Symb. Comput. 45(11), 1234–1249 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  32. Yang, L., Zhou, C., Zhan, N., Xia, B.: Recent advances in program verification through computer algebra. Frontiers of Computer Science in China 4(1), 1–16 (2010)

    Article  MATH  Google Scholar 

  33. Zimmermann, K.: A general separation theorem in extremal algebras. Ekonomia Matematyczna Obzory 13, 179–201 (1977)

    MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Kapur, D., Zhang, Z., Horbach, M., Zhao, H., Lu, Q., Nguyen, T. (2013). Geometric Quantifier Elimination Heuristics for Automatically Generating Octagonal and Max-plus Invariants. In: Bonacina, M.P., Stickel, M.E. (eds) Automated Reasoning and Mathematics. Lecture Notes in Computer Science(), vol 7788. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-36675-8_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-36675-8_11

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-36674-1

  • Online ISBN: 978-3-642-36675-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics