skip to main content
10.1145/964001.964028acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

Non-linear loop invariant generation using Gröbner bases

Published:01 January 2004Publication History

ABSTRACT

We present a new technique for the generation of non-linear (algebraic) invariants of a program. Our technique uses the theory of ideals over polynomial rings to reduce the non-linear invariant generation problem to a numerical constraint solving problem. So far, the literature on invariant generation has been focussed on the construction of linear invariants for linear programs. Consequently, there has been little progress toward non-linear invariant generation. In this paper, we demonstrate a technique that encodes the conditions for a given template assertion being an invariant into a set of constraints, such that all the solutions to these constraints correspond to non-linear (algebraic) loop invariants of the program. We discuss some trade-offs between the completeness of the technique and the tractability of the constraint-solving problem generated. The application of the technique is demonstrated on a few examples.

References

  1. Baader, F., and Nipkow, T. Term Rewriting and All That. Cambridge University Press, 1998.]] Google ScholarGoogle ScholarCross RefCross Ref
  2. Ballarin, C., and Kauers, M. Solving parametric linear systems: an experiment with constraint algebraic programming. In Eighth Rhine Workshop on Computer Algebra (2002), pp. 101--114.]]Google ScholarGoogle Scholar
  3. Bensalem, S., Bozga, M., Fernandez, J.-C., Ghirvu, L., and Lakhnech, Y. A transformational approach for generating non-linear invariants. In Static Analysis Symposium (June 2000), vol. 1824 of LNCS, Springer Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Bensalem, S., Lakhnech, Y., and Saidi, H. Powerful techniques for the automatic generation of invariants. In Computer-Aided Verification (1996), vol. 1102 of LNCS, pp. 323--335.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bjørner, N. S., Browne, A., and Manna, Z. Automatic generation of invariants and intermediate assertions. Theoretical Comput. Sci. 173, 1 (Feb. 1997), 49--87.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Bultan, T., Gerber, R., and Pugh, W. Symbolic model checking of infinite state systems using Presburger arithmetic. In Computer-Aided Verification (June 1997), vol. 1254 of LNCS, springer, pp. 400--411.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Collins, G. Quantifier elimination for real closed fields by cylindrical algebraic decomposition. In Automata Theory and Formal Languages (1975), H.Brakhage, Ed., vol. 33 of LNCS, pp. 134--183.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Collins, G. E., and Hong, H. Partial cylindrical algebraic decomposition for quantifier elimination. Journal of Symbolic Computation 12, 3 (sep 1991), 299--328.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Colòn, M., Sankaranarayanan, S., and Sipma, H. Linear invariant generation using non-linear constraint solving. In Computer Aided Verification (July 2003), F. Somenzi and W. H. Jr, Eds., vol. 2725 of LNCS, Springer Verlag, pp. 420--433.]]Google ScholarGoogle ScholarCross RefCross Ref
  10. Cousot, P., and Cousot, R. Abstract Interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In ACM Principles of Programming Languages (1977), pp. 238--252.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Cousot, P., and Halbwachs, N. Automatic discovery of linear restraints among the variables of a program. In ACM Principles of Programming Languages (Jan. 1978), pp. 84--97.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Cox, D., little, J., and O'Shea, D. Ideals, Varieties and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra. Springer, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Dolzmann, A., and Sturm, T. REDLOG: Computer algebra meets computer logic. ACM SIGSAM Bulletin 31, 2 (June 1997), 2--9.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Floyd, R. W. Assigning meanings to programs. Proc. Symposia in Applied Mathematics 19 (1967), 19--32.]]Google ScholarGoogle ScholarCross RefCross Ref
  15. Henzinger, T. A., and Ho, P. HyTech: The Cornell hybrid technology tool. In Hybrid Systems II (1995), vol. 999 of LNCS, pp. 265--293.]] Google ScholarGoogle ScholarCross RefCross Ref
  16. Hoare, C. A. R. An axiomatic basis for computer programming. Commun. ACM 12, 10 (1969), 576--580.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Jaffar, J., and Lassez, J.-L. Constraint logic programming. In Principles of Programming Languages( popl) (Jan. 1987), pp. 111--119.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Karr, M. Affine relationships among variables of a program. Acta Inf. 6 (1976), 133--151.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Manna, Z. Mathematical Theory of Computation. McGraw-Hill, 1974.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Manna, Z., and Pnueli, A. Temporal Verification of Reactive Systems: Safety. Springer-Verlag, New York, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Mishra, B., and Yap, C. Notes on Gröbner bases. Information Sciences 48 (1989), 219--252.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Müller-Olm, M., and Seidl, H. Polynomial constants are decidable. In Static Analysis Symposium (SAS 2002) (2002), vol. 2477 of LNCS, pp. 4--19.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Schrijver, A. Theory of Linear and Integer Programming. Wiley, 1986.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Sit, W. Y. An algorithm for solving parametric linear systems. Journal of Symbolic Computation 13, 3 (April 1992), 353--394.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Tarski, A. A decision method for elementary algebra and geometry. Univ. of California Press, Berkeley 5 (1951).]]Google ScholarGoogle ScholarCross RefCross Ref
  26. Tiwari, A., Ruess, H., Saïdi, H., and Shankar, N. A technique for invariant generation. In TACAS 2001 (2001), vol. 2031 of LNCS, Springer-Verlag, pp. 113--127.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Weispfenning, V. The complexity of linear problems in fields. Journal of Symbolic Computation 5, 1-2 (April 1988), 3--27.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Weispfenning, V. Comprehensive Gröbner bases. Journal of Symbolic Computation 14 (1992), 1--29.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Weispfenning, V. Quantifier elimination for real algebra---the quadratic case and beyond. In Applied Algebra and Error-Correcting Codes (AAECC) 8 (1997), pp. 85--101.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Windsteiger, W., and Buchberger, B. Groebner: A library for computing grobner bases based on saclib. Tech. rep., RISC-Linz, 1993.]]Google ScholarGoogle Scholar

Index Terms

  1. Non-linear loop invariant generation using Gröbner bases

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Conferences
              POPL '04: Proceedings of the 31st ACM SIGPLAN-SIGACT symposium on Principles of programming languages
              January 2004
              364 pages
              ISBN:158113729X
              DOI:10.1145/964001
              • cover image ACM SIGPLAN Notices
                ACM SIGPLAN Notices  Volume 39, Issue 1
                POPL '04
                January 2004
                352 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/982962
                Issue’s Table of Contents

              Copyright © 2004 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 1 January 2004

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • Article

              Acceptance Rates

              POPL '04 Paper Acceptance Rate29of176submissions,16%Overall Acceptance Rate824of4,130submissions,20%

              Upcoming Conference

              POPL '25

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader