Abstract
In this article we study the decidability of termination of several variants of simple integer loops, without branching in the loop body and with affine constraints as the loop guard (and possibly a precondition). We show that termination of such loops is undecidable in some cases, in particular, when the body of the loop is expressed by a set of linear inequalities where the coefficients are from Z ∪ {r} with r an arbitrary irrational; when the loop is a sequence of instructions, that compute either linear expressions or the step function; and when the loop body is a piecewise linear deterministic update with two pieces. The undecidability result is proven by a reduction from counter programs, whose termination is known to be undecidable. For the common case of integer linear-constraint loops with rational coefficients we have not succeeded in proving either decidability or undecidability of termination, but we show that a Petri net can be simulated with such a loop; this implies some interesting lower bounds. For example, termination for a partially specified input is at least EXPSPACE-hard.
- Albert, E., Arenas, P., Genaim, S., Puebla, G., and Zanardini, D. 2007. Costa: Design and implementation of a cost and termination analyzer for java bytecode. In Proceedings of the International Symposium on Formal Methods for Components and Objects (FMCO’07). F. S. de Boer, M. M. Bonsangue, S. Graf, and W. P. de Roever Eds., Lecture Notes in Computer Science, vol. 5382, Springer, 113--132.Google Scholar
- Bagnara, R., Mesnard, F., Pescetti, A., and Zaffanella, E. 2012. A new look at the automatic synthesis of linear ranking functions. Inf. Comput. 215, 47--67. Google ScholarDigital Library
- Ben-Amram, A. M. 2008. Size-Change termination with difference constraints. ACM Trans. Program. Lang. Syst. 30, 3. Google ScholarDigital Library
- Ben-Amram, A. M. 2010. Size-Change termination, monotonicity constraints and ranking functions. Logic. Meth. Comput. Sci. 6, 3.Google Scholar
- Ben-Amram, A. M. 2011. Monotonicity constraints for termination in the integer domain. Logic. Meth. Comput. Sci. 7, 3.Google ScholarCross Ref
- Ben-Amram, A. M. and Codish, M. 2008. A SAT-based approach to size change termination with global ranking functions. In Proceedings of the International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’08). C. Ramakrishnan and J. Rehof Eds., Lecture Notes in Computer Science, vol. 5028, Springer, 46--55. Google ScholarDigital Library
- Ben-Amram, A. M. and Lee, C. S. 2007. Program termination analysis in polynomial time. ACM Trans. Program. Lang. Syst. 29, 1. Google ScholarDigital Library
- Ben-Amram, A. M., Genaim, S., and Masud, A. N. 2012. On the termination of integer loops. In Proceedings of the International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI’12). V. Kuncak and A. Rybalchenko Eds., Lecture Notes in Computer Science, vol. 7148, Springer, 72--87. Google ScholarDigital Library
- Blondel, V. D., Bournez, O., Koiran, P., Papadimitriou, C. H., and Tsitsiklis, J. N. 2001. Deciding stability and mortality of piecewise affine dynamical systems. Theor. Comput. Sci. 255, 1--2, 687--696. Google ScholarDigital Library
- Bozga, M., Iosif, R., and Konecný, F. 2012. Deciding conditional termination. In Proceedings of the International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’12). C. Flanagan and B. Konig Eds., Lecture Notes in Computer Science, vol. 7214, Springer, 252--266. Google ScholarDigital Library
- Bozzelli, L. and Pinchinat, S. 2012. Verification of gap-order constraint abstractions of counter systems. In Proceedings of the International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI’12). V. Kuncak and A. Rybalchenko Eds., Lecture Notes in Computer Science, vol. 7148, Springer, 88--103. Google ScholarDigital Library
- Bradley, A. R., Manna, Z., and Sipma, H. B. 2005. Termination analysis of integer linear loops. In Proceedings of the International Conference on Concurrency Theory (CONCUR’05). M. Abadi and L. de Alfaro Eds., Lecture Notes in Computer Science, vol. 3653, Springer, 488--502. Google ScholarDigital Library
- Braverman, M. 2006. Termination of integer linear programs. In Proceedings of the International Conference on Computer-Aided Verification (CAV’06). T. Ball and R. B. Jones Eds., Lecture Notes in Computer Science, vol. 4144, Springer, 372--385. Google ScholarDigital Library
- Bruynooghe, M., Codish, M., Gallagher, J. P., Genaim, S., and Vanhoof, W. 2007. Termination analysis of logic programs through combination of type-based norms. ACM Trans. Program. Lang. Syst. 29, 2. Google ScholarDigital Library
- Codish, M., Lagoon, V., and Stuckey, P. J. 2005. Testing for termination with monotonicity constraints. In Proceedings of the International Conference on Logic Programming (ICLP’05). M. Gabbrielli and G. Gupta Eds., Lecture Notes in Computer Science, vol. 3668, Springer, 326--340. Google ScholarDigital Library
- Colón, M. and Sipma, H. 2001. Synthesis of linear ranking functions. In Proceedings of the International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’01). T. Margaria and W. Yi Eds., Lecture Notes in Computer Science, vol. 2031, Springer, 67--81. Google ScholarDigital Library
- Cook, B., Podelski, A., and Rybalchenko, A. 2006. Termination proofs for systems code. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’06). M. I. Schwarzbach and T. Ball Eds., ACM Press, New York, 415--426. Google ScholarDigital Library
- Dufourd, C., Jancar, P., and Schnoebelen, P. 1999. Boundedness of reset p/t nets. In Proceedings of the International Colloquium on Automata, Languages and Programming (ICALP’99). J. Wiedermann, P. van Emde Boas, and M. Nielsen Eds., Lecture Notes in Computer Science, vol. 1644, Springer, 301--310. Google ScholarDigital Library
- Esparza, J. 1998. Decidability and complexity of Petri net problems -- An introduction. In Lectures on Petri Nets, Vol. I: Basic Models. W. Reisig and G. Rozenberg Eds., Lecture Notes in Computer Science, vol. 1491, Springer, 374--428. Google ScholarDigital Library
- Esparza, J. and Nielsen, M. 1994. Decidability issues for Petri nets. Tech. rep. RS-94-8, BRICS, Department of Computer Science, University of Aarhus.Google Scholar
- Giesl, J., Thiemann, R., Schneider-Kamp, P., and Falke, S. 2004. Automated termination proofs with aprove. In Proceedings of the International Conference on Rewriting Techniques and Applications (RTA’04). V. van Oostrom Ed., Lecture Notes in Computer Science, vol. 3091, Springer, 210--220.Google Scholar
- Giesl, J., Raffelsieper, M., Schneider-Kamp, P., Swiderski, S., and Thiemann, R. 2011. Automated termination proofs for Haskell by term rewriting. ACM Trans. Program. Lang. Syst. 33, 2, 7. Google ScholarDigital Library
- Hack, M. 1976. Decidability questions for Petri nets. Tech. rep. MIT/LCS/TR-161, Massachusetts Institute of Technology. Google ScholarDigital Library
- Jancar, P. 1995. Undecidability of bisimilarity for Petri nets and some related problems. Theor. Comput. Sci. 148, 2, 281--301. Google ScholarDigital Library
- Kurtz, S. A. and Simon, J. 2007. The undecidability of the generalized Collatz problem. In Proceedings of the Annual Conference on Theory and Applications of Models of Computation (TAMC’07). J.-Y. Cai, S. B. Cooper, and H. Zhu Eds., Lecture Notes in Computer Science, vol. 4484, Springer, 542--553. Google ScholarDigital Library
- Lee, C. S., Jones, N. D., and Ben-Amram, A. M. 2001. The size-change principle for program termination. In Proceedings of the Symposium on Principles of Programming Languages (POPL’01). C. Hankin and D. Schmidt Eds., ACM Press, New York, 81--92. Google ScholarDigital Library
- Lindenstrauss, N. and Sagiv, Y. 1997. Automatic termination analysis of Prolog programs. In Proceedings of the International Conference on Logic Programming (ICLP’97). L. Naish Ed., MIT Press, 64--77.Google Scholar
- Lindenstrauss, N., Sagiv, Y., and Serebrenik, A. 1997. Termilog: A system for checking termination of queries to logic programs. In Proceedings of the International Conference on Computer-Aided Verification (CAV’97). O. Grumberg Ed., Lecture Notes in Computer Science, vol. 1254, Springer, 444--447. Google ScholarDigital Library
- Lipton, R. J. 1976. The reachability problem requires exponential space. Tech. rep. 63, Yale University.Google Scholar
- Matiyasevich. 2000. Hilbert’s tenth problem: What was done and what is to be done. In Hilbert’s Tenth Problem: Relations with Arithmetic and Algebraic Geometry (AMS’00). J. Denef, L. Lipshitz, T. Pheidas, and V. Geel Eds., American Mathematical Society.Google Scholar
- Mehlhorn, K. and Schirra, S. 2001. Exact computation with leda_real -- Theory and geometric applications. Symbol. Algebr. Meth. Verif. Meth. 379, 163--172.Google ScholarCross Ref
- Memmi, G. and Roucairol, G. 1980. Linear algebra in net theory. In Net Theory and Applications, W. Brauer Ed., Lecture Notes in Computer Science, vol. 84, Springer, 213--223. Google ScholarDigital Library
- Mesnard, F. and Serebrenik, A. 2008. Recurrence with affine level mappings is p-time decidable for clp(r). Theory Pract. Logic Program. 8, 1, 111--119. Google ScholarDigital Library
- Meyer, R. R. 1975. Integer and mixed-integer programming models: General properties. J. Optim. Theory Appl. 16, 191--206.Google ScholarDigital Library
- Minsky, M. L. 1967. Computation: Finite and Infinite Machines. Prentice Hall, Upper Saddle River, NJ. Google ScholarDigital Library
- Podelski, A. and Rybalchenko, A. 2004. A complete method for the synthesis of linear ranking functions. In Proceedings of the International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI’04). B. Steffen and G. Levi Eds., Lecture Notes in Computer Science, vol. 2937, Springer, 239--251.Google Scholar
- Rackoff, C. 1978. The covering and boundedness problems for vector addition systems. Theor. Comput. Sci. 6, 2, 223--231.Google ScholarCross Ref
- Reisig, W. 1985. Petri Nets: An Introduction. EATCS Monographs on Theoretical Computer Science. Springer. Google ScholarDigital Library
- Shoenfield, J. R. 1993. Recursion Theory. Springer. Google ScholarDigital Library
- Sohn, K. and Gelder, A. V. 1991. Termination detection in logic programs using argument sizes. In Proceedings of the Symposium on Principles of Database Systems (PODS’91). D. J. Rosenkrantz Ed., ACM Press, New York, 216--226. Google ScholarDigital Library
- Spoto, F., Mesnard, F., and Payet, É. 2010. A termination analyzer for java bytecode based on path-length. ACM Trans. Program. Lang. Syst. 32, 3. Google ScholarDigital Library
- Tiwari, A. 2004. Termination of linear programs. In Proceedings of the International Conference on Computer-Aided Verification (CAV’04). R. Alur and D. Peled Eds., Lecture Notes in Computer Science, vol. 3114, Springer, 387--390.Google ScholarCross Ref
Index Terms
- On the Termination of Integer Loops
Recommendations
On the termination of integer loops
VMCAI'12: Proceedings of the 13th international conference on Verification, Model Checking, and Abstract InterpretationIn this paper we study the decidability of termination of several variants of simple integer loops, without branching in the loop body and with affine constraints as the loop guard (and possibly a precondition). We show that termination of such loops is ...
On tree automata that certify termination of left-linear term rewriting systems
We present a new method for automatically proving termination of left-linear term rewriting systems on a given regular language of terms. It is a generalization of the match bound method for string rewriting. To prove that a term rewriting system ...
Loops of Superexponential Lengths in One-Rule String Rewriting
RTA '02: Proceedings of the 13th International Conference on Rewriting Techniques and ApplicationsLoops are the most frequent cause of non-termination in string rewriting. In the general case, non-terminating, nonlooping string rewriting systems exist, and the uniform termination problem is undecidable. For rewriting with only one string rewriting ...
Comments