Download PDFOpen PDF in browserPolynomial Loops: Beyond Termination19 pages•Published: May 27, 2020AbstractIn the last years, several works were concerned with identifying classes of programswhere termination is decidable. We consider triangular weakly nonlinear loops (twnloops) over a ring Z ≤ S ≤ R_A , where R_A is the set of all real algebraic numbers. 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 nonlinear) polynomial over S and the variables x_{i+1}, ..., x_d. Recently, we showed that termination of such loops is decidable for S = R_A and nontermination is semidecidable for S = Z and S = Q. In this paper, we show that the halting problem is decidable for twnloops over any ring Z ≤ S ≤ R_A. In contrast to the termination problem, where termination on all inputs is considered, the halting problem is concerned with termination on a given input. This allows us to compute witnesses for nontermination. Moreover, we present the first computability results on the runtime complexity of such loops. More precisely, we show that for twnloops over Z one can always compute a polynomial f such that the length of all terminating runs is bounded by f(  (x_1, ..., x_d)  ), where  ·  denotes the 1norm. As a corollary, we obtain that the runtime of a terminating triangular linear loop over Z is at most linear. Keyphrases: decidability, halting problem, Runtime Complexity, termination In: Elvira Albert and Laura Kovács (editors). LPAR23. LPAR23: 23rd International Conference on Logic for Programming, Artificial Intelligence and Reasoning, vol 73, pages 279297
