Termination of Linear Loops over the Integers

We consider the problem of deciding termination of single-path while loops with integer variables, affine updates, and affine guard conditions. The question is whether such a loop terminates on all integer initial values. This problem is known to be decidable for the subclass of loops whose update matrices are diagonalisable, but the general case has remained open since being conjectured decidable by Tiwari in 2004. In this paper we show decidability of determining termination for arbitrary update matrices, confirming Tiwari's conjecture. For the class of loops considered in this paper, the question of deciding termination on a specific initial value is a longstanding open problem in number theory. The key to our decision procedure is in showing how to circumvent the difficulties inherent in deciding termination on a fixed initial value.

[1]  Zachary Kincaid,et al.  Closed forms for numerical loops , 2019, Proc. ACM Program. Lang..

[2]  Joël Ouaknine,et al.  Positivity Problems for Low-Order Linear Recurrence Sequences , 2013, SODA.

[3]  Supratik Mukhopadhyay,et al.  Termination proofs for linear simple loops , 2013, International Journal on Software Tools for Technology Transfer.

[4]  Ashish Tiwari,et al.  Termination of Linear Programs , 2004, CAV.

[5]  Sriram Sankaranarayanan,et al.  Abstract acceleration of general linear loops , 2014, POPL.

[6]  Arto Salomaa,et al.  Automata-Theoretic Aspects of Formal Power Series , 1978, Texts and Monographs in Computer Science.

[7]  Mark Braverman,et al.  Termination of Integer Linear Programs , 2006, CAV.

[8]  Alexander I. Barvinok,et al.  Lattice Points and Lattice Polytopes , 2004, Handbook of Discrete and Computational Geometry, 2nd Ed..

[9]  Amir M. Ben-Amram,et al.  Ranking Functions for Linear-Constraint Loops , 2012, JACM.

[10]  Samir Genaim,et al.  On Multiphase-Linear Ranking Functions , 2017, CAV.

[11]  A. Rybalchenko,et al.  Transition invariants , 2004, LICS 2004.

[12]  Joel Ouaknine,et al.  On Termination of Integer Linear Loops , 2015, SODA.

[13]  Grzegorz Rozenberg,et al.  Cornerstones of undecidability , 1994, Prentice Hall International Series in Computer Science.

[14]  Joël Ouaknine,et al.  Effective Divergence Analysis for Linear Recurrence Sequences , 2018, CONCUR.

[15]  Leonid Khachiyan,et al.  Computing integral points in convex semi-algebraic sets , 1997, Proceedings 38th Annual Symposium on Foundations of Computer Science.

[16]  Andreas Podelski,et al.  Termination proofs for systems code , 2006, PLDI '06.

[17]  Samir Genaim,et al.  On the linear ranking problem for integer linear-constraint loops , 2012, POPL.

[18]  Samir Genaim,et al.  Multiphase-Linear Ranking Functions and their Relation to Recurrent Sets , 2018, SAS.

[19]  Andreas Podelski,et al.  A Complete Method for the Synthesis of Linear Ranking Functions , 2004, VMCAI.

[20]  Bernard Boigelot,et al.  On iterating linear transformations over recognizable sets of integers , 2003, Theor. Comput. Sci..

[21]  Henny B. Sipma,et al.  Synthesis of Linear Ranking Functions , 2001, TACAS.

[22]  D. W. Masser New Advances in Transcendence Theory: Linear relations on algebraic groups , 1988 .

[23]  Henny B. Sipma,et al.  Termination Analysis of Integer Linear Loops , 2005, CONCUR.