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.
- Baader, F., and Nipkow, T. Term Rewriting and All That. Cambridge University Press, 1998.]] Google ScholarCross Ref
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Collins, G. E., and Hong, H. Partial cylindrical algebraic decomposition for quantifier elimination. Journal of Symbolic Computation 12, 3 (sep 1991), 299--328.]] Google ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Cox, D., little, J., and O'Shea, D. Ideals, Varieties and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra. Springer, 1991.]] Google ScholarDigital Library
- Dolzmann, A., and Sturm, T. REDLOG: Computer algebra meets computer logic. ACM SIGSAM Bulletin 31, 2 (June 1997), 2--9.]] Google ScholarDigital Library
- Floyd, R. W. Assigning meanings to programs. Proc. Symposia in Applied Mathematics 19 (1967), 19--32.]]Google ScholarCross Ref
- 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 ScholarCross Ref
- Hoare, C. A. R. An axiomatic basis for computer programming. Commun. ACM 12, 10 (1969), 576--580.]] Google ScholarDigital Library
- Jaffar, J., and Lassez, J.-L. Constraint logic programming. In Principles of Programming Languages( popl) (Jan. 1987), pp. 111--119.]] Google ScholarDigital Library
- Karr, M. Affine relationships among variables of a program. Acta Inf. 6 (1976), 133--151.]]Google ScholarDigital Library
- Manna, Z. Mathematical Theory of Computation. McGraw-Hill, 1974.]] Google ScholarDigital Library
- Manna, Z., and Pnueli, A. Temporal Verification of Reactive Systems: Safety. Springer-Verlag, New York, 1995.]] Google ScholarDigital Library
- Mishra, B., and Yap, C. Notes on Gröbner bases. Information Sciences 48 (1989), 219--252.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- Schrijver, A. Theory of Linear and Integer Programming. Wiley, 1986.]] Google ScholarDigital Library
- Sit, W. Y. An algorithm for solving parametric linear systems. Journal of Symbolic Computation 13, 3 (April 1992), 353--394.]] Google ScholarDigital Library
- Tarski, A. A decision method for elementary algebra and geometry. Univ. of California Press, Berkeley 5 (1951).]]Google ScholarCross Ref
- 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 ScholarDigital Library
- Weispfenning, V. The complexity of linear problems in fields. Journal of Symbolic Computation 5, 1-2 (April 1988), 3--27.]] Google ScholarDigital Library
- Weispfenning, V. Comprehensive Gröbner bases. Journal of Symbolic Computation 14 (1992), 1--29.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- Windsteiger, W., and Buchberger, B. Groebner: A library for computing grobner bases based on saclib. Tech. rep., RISC-Linz, 1993.]]Google Scholar
Index Terms
- Non-linear loop invariant generation using Gröbner bases
Recommendations
Inductive invariant generation via abductive inference
OOPSLA '13This paper presents a new method for generating inductive loop invariants that are expressible as boolean combinations of linear integer constraints. The key idea underlying our technique is to perform a backtracking search that combines Hoare-style ...
Non-linear loop invariant generation using Gröbner bases
POPL '04We 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 ...
Tree polynomials and non-associative Gröbner bases
In this article the basic notions of a theory of Grobner bases for ideals in the non-associative, non-commutative algebra K{X} with a unit freely generated by a set X over a field K are discussed. The monomials in this algebra can be identified with the ...
Comments