On the Decidability of Termination for Polynomial Loops (original) (raw)
Related papers
Termination of Polynomial Loops
Static Analysis
We consider the termination problem for triangular weakly non-linear loops (twn-loops) over some ring S like Z, Q, or R. Essentially, the guard of such a loop is an arbitrary Boolean formula over (possibly non-linear) polynomial inequations, and the body is a single assignment x1. .. x d ← c1 • x1 + p1. .. c d • x d + p d where each xi is a variable, ci ∈ S, and each pi is a (possibly non-linear) polynomial over S and the variables xi+1,. .. , x d. We present a reduction from the question of termination to the existential fragment of the first-order theory of S and R. For loops over R, our reduction entails decidability of termination. For loops over Z and Q, it proves semi-decidability of non-termination. Furthermore, we present a transformation to convert certain non-twnloops into twn-form. Then the original loop terminates iff the transformed loop terminates over a specific subset of R, which can also be checked via our reduction. This transformation also allows us to prove tight complexity bounds for the termination problem for two important classes of loops which can always be transformed into twn-loops.
Polynomial Loops: Beyond Termination
EPiC Series in Computing
In the last years, several works were concerned with identifying classes of programswhere termination is decidable. We consider triangular weakly non-linear loops(twn-loops) over a ring Z ≤ S ≤ R_A , where R_A is the set of all real algebraicnumbers. Essentially, the body of such a loop is a single assignment(x_1, ..., x_d) ← (c_1 · x_1 + pol_1, ..., c_d · x_d + pol_d)where each x_i is a variable, c_i ∈ S, and each pol_i is a (possibly non-linear)polynomial over S and the variables x_{i+1}, ..., x_d. Recently, we showed thattermination of such loops is decidable for S = R_A and non-termination issemi-decidable for S = Z and S = Q.In this paper, we show that the halting problem is decidable for twn-loops over anyring Z ≤ S ≤ R_A. In contrast to the termination problem, where termination on allinputs is considered, the halting problem is concerned with termination on a giveninput. This allows us to compute witnesses for non-termination.Moreover, we present the first computability resu...
Termination of Triangular Polynomial Loops
arXiv (Cornell University), 2019
We consider the problem of proving termination for triangular weakly non-linear loops (twn-loops) over some ring S like Z, Q, or R. The guard of such a loop is an arbitrary quantifier-free Boolean formula over (possibly non-linear) polynomial inequations, and the body is a single assignment of the form x1. .. x d ← c1 • x1 + p1. .. c d • x d + p d where each x i is a variable, c i ∈ S, and each p i is a (possibly non-linear) polynomial over S and the variables x i+1 ,. .. , x d. We show that the question of termination can be reduced to the existential fragment of the first-order theory of S. For loops over R, our reduction implies decidability of termination. For loops over Z and Q, it proves semi-decidability of non-termination. Furthermore, we present a transformation to convert certain non-twn-loops into twn-form. Then the original loop terminates iff the transformed loop terminates over a specific subset of R, which can also be checked via our reduction. Moreover, we formalize a technique to linearize (the updates of) twn-loops in our setting and analyze its complexity. Based on these results, we prove complexity bounds for the termination problem of twn-loops as well as tight bounds for two important classes of loops which can always be transformed into twn-loops. Finally, we show that there is an important class of linear loops where our decision procedure results in an efficient procedure for termination analysis, i.e., where the parameterized complexity of deciding termination is polynomial.
What’s decidable about linear loops?
Proceedings of the ACM on Programming Languages
We consider the MSO model-checking problem for simple linear loops, or equivalently discrete-time linear dynamical systems, with semialgebraic predicates (i.e., Boolean combinations of polynomial inequalities on the variables). We place no restrictions on the number of program variables, or equivalently the ambient dimension. We establish decidability of the model-checking problem provided that each semialgebraic predicate either has intrinsic dimension at most 1, or is contained within some three-dimensional subspace. We also note that lifting either of these restrictions and retaining decidability would necessarily require major breakthroughs in number theory.
Termination of Triangular Integer Loops is Decidable
Computer Aided Verification, 2019
We consider the problem whether termination of affine integer loops is decidable. Since Tiwari conjectured decidability in 2004 [15], only special cases have been solved [3, 4, 14]. We complement this work by proving decidability for the case that the update matrix is triangular. 1 Note that multiplying with the least common multiple of all denominators yields an equivalent constraint with integer coefficients, i.e., allowing rational instead of integer coefficients does not extend the considered class of loops.
On Termination of Integer Linear Loops
A fundamental problem in program verification concerns the termination of simple linear loops of the form: x := u ; while Bx >= b do {x := Ax + a} where x is a vector of variables, u, a, and c are integer vectors, and A and B are integer matrices. Assuming the matrix A is diagonalisable, we give a decision procedure for the problem of whether, for all initial integer vectors u, such a loop terminates. The correctness of our algorithm relies on sophisticated tools from algebraic and analytic number theory, Diophantine geometry, and real algebraic geometry. To the best of our knowledge, this is the first substantial advance on a 10-year-old open problem of Tiwari (2004) and Braverman (2006).
On the Termination of Integer Loops
ACM Transactions on Programming Languages and Systems, 2012
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...
Aaecc, 2006
In the seventies, Manna and Ness, Lankford, and Dershowitz pionneered the use of polynomial interpretations with integer and real coefficients in proofs of termination of rewriting. More than twenty five years after these works were published, however, the absence of true examples in the literature has given rise to some doubts about the possible benefits of using polynomials with real or rational coefficients. In this paper we prove that there are, in fact, rewriting systems that can be proved polynomially terminating by using polynomial interpretations with (algebraic) real coefficients; however, the proof cannot be achieved if polynomials only contain rational coefficients. We prove a similar statement with respect to the use of rational coefficients versus integer coefficients. 2 Salvador Lucas termination in restricted cases. Polynomial interpretations and their corresponding reduction orderings (first suggested by Iturriaga [26] and Manna and Ness [31], and further developed by Lankford [28]) are well-suited for achieving automatic or semiautomatic proofs of termination of rewriting .
Applicable Algebra in Engineering, Communication and Computing, 2006
In the seventies, Manna and Ness, Lankford, and Dershowitz pionneered the use of polynomial interpretations with integer and real coefficients in proofs of termination of rewriting. More than twenty five years after these works were published, however, the absence of true examples in the literature has given rise to some doubts about the possible benefits of using polynomials with real or rational coefficients. In this paper we prove that there are, in fact, rewriting systems that can be proved polynomially terminating by using polynomial interpretations with (algebraic) real coefficients; however, the proof cannot be achieved if polynomials only contain rational coefficients. We prove a similar statement with respect to the use of rational coefficients versus integer coefficients. 2 Salvador Lucas termination in restricted cases. Polynomial interpretations and their corresponding reduction orderings (first suggested by Iturriaga [26] and Manna and Ness [31], and further developed by Lankford [28]) are well-suited for achieving automatic or semiautomatic proofs of termination of rewriting .
On the Edge of Decidability in Complexity Analysis of Loop Programs
International Journal of Foundations of Computer Science, 2012
We investigate the decidability of the feasibility problem for imperative programs with bounded loops. A program is called feasible if all values it computes are polynomially bounded in terms of the input. The feasibility problem is representative of a group of related properties, like that of polynomial time complexity. It is well known that such properties are undecidable for a Turing-complete programming language. They may be decidable, however, for languages that are not Turing-complete. But if these languages are expressive enough, they do pose a challenge for analysis. We are interested in tracing the edge of decidability for the feasibility problem and similar problems. In previous work, we proved that such problems are decidable for a language where loops are bounded but indefinite (that is, the loops may exit before completing the given iteration count). In this paper, we consider definite loops. A second language feature that we vary, is the kind of assignment statements. ...