Program termination analysis in polynomial time

A size-change termination algorithm takes as input abstract information about a program in the form of size-change graphs and uses it to determine whether any infinite computation would imply that some data decrease in size infinitely. Since such an infinite descent is presumed impossible, this proves program termination. The property of the graphs that implies program termination is called SCT. There are many examples of practical programs whose termination can be verified by creating size-change graphs and testing them for SCT.The size-change graph abstraction is useful because the graphs often carry sufficient information to deduce termination, and at the same time are simple enough to be analyzed automatically. However, there is a tradeoff between the completeness and efficiency of this analysis, and complete algorithms in the literature can easily be pushed to an exponential combinatorial search by certain patterns in the graph structures.We therefore propose a novel algorithm to detect common forms of parameter-descent behavior efficiently. Specifically, we target lexicographic descent, multiset descent, and min- and max-descent. Our algorithm makes it possible to verify practical instances of SCT while guarding against unwarranted combinatorial search. It has worst-case time complexity cubic in the input size, and its effectiveness is demonstrated empirically using a test suite of over 90 programs.

[1]  Jürgen Giesl,et al.  Automated Termination Proofs with AProVE , 2004, RTA.

[2]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[3]  Jürgen Giesl,et al.  Automatically Proving Termination Where Simplification Orderings Fail , 1997, TAPSOFT.

[4]  Peter J. Stuckey,et al.  Testing for Termination with Monotonicity Constraints , 2005, ICLP.

[5]  Danny De Schreye,et al.  Termination of Logic Programs: The Never-Ending Story , 1994, J. Log. Program..

[6]  Zoltan Somogyi,et al.  Termination Analysis for Mercury , 1997, SAS.

[7]  David Wahlstedt Detecting termination using size-change in parameter values , 2000 .

[8]  Yehoshua Sagiv,et al.  Automatic Termination Analysis of Logic Programs (with Detailed Experimental Results) , 1997 .

[9]  Chin Soon Lee Finiteness Analysis in Polynomial Time , 2002, SAS.

[10]  Wim Vanhoof,et al.  Binding-Time Annotations Without Binding-Time Analysis , 2001, LPAR.

[11]  C. Yates Recursive Functions , 1970, Nature.

[12]  Neil D. Jones,et al.  Termination Analysis of the Untyped lamba-Calculus , 2004, RTA.

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

[14]  John P. Gallagher,et al.  Combining Norms to Prove Termination , 2002, VMCAI.

[15]  Amir M. Ben-Amram General Size-Change Termination and Lexicographic Descent , 2002, The Essence of Computation.

[16]  A. M. Turing,et al.  Checking a large routine , 1989 .

[17]  Hongwei Xi Dependent Types for Program Termination Verification , 2002, High. Order Symb. Comput..

[18]  Dino Pedreschi,et al.  Modular termination proofs for logic and pure PROLOG programs , 1993 .

[19]  Jürgen Giesl,et al.  Size-Change Termination for Term Rewriting , 2003, RTA.

[20]  Ronald L. Rivest,et al.  Introduction to Algorithms , 1990 .

[21]  Yehoshua Sagiv A Termination Test for Logic Programs , 1991, ISLP.

[22]  Chin Soon Lee Partial Evaluation of the Euclidean Algorithm, Revisited , 1999, High. Order Symb. Comput..

[23]  Chin Soon Lee Program Termination Analysis in Polynomial Time , 2002, GPCE.

[24]  Enno Ohlebusch,et al.  TALP: A Tool for the Termination Analysis of Logic Programs , 2000, RTA.

[25]  Kim Marriott,et al.  Improving Program Analyses, by Structure Untupling , 2000, J. Log. Program..

[26]  Lutz Plümer Termination Proofs for Logic Programs , 1990, Lecture Notes in Computer Science.

[27]  Michael Codish,et al.  A Semantic Basis for Termination Analysis of Logic Programs and its Realization Using Symbolic Norm Constraints , 1997, APPIA-GULP-PRODE.

[28]  Henny B. Sipma,et al.  Practical Methods for Proving Program Termination , 2002, CAV.

[29]  Alessandro Verri,et al.  Pattern Recognition with Support Vector Machines , 2002, Lecture Notes in Computer Science.

[30]  Jürgen Giesl Automated Termination Proofs with Measure Functions , 1995, KI.

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

[32]  Patrick Cousot,et al.  Semantic foundations of program analysis , 1981 .

[33]  Neil D. Jones,et al.  The size-change principle for program termination , 2001, POPL '01.

[34]  Zohar Manna,et al.  Proving termination with multiset orderings , 1979, CACM.

[35]  Manuel V. Hermenegildo,et al.  Effectiveness of Global Analysis in Strict Independence-Based Automatic Parallelization , 1994, ILPS.

[36]  Siau-Cheng Khoo,et al.  Affine-Based Size-Change Termination , 2003, APLAS.

[37]  Yehoshua Sagiv,et al.  Automatic Termination Analysis of Logic Programs , 1997, ICLP.

[38]  T. Arts Automatically proving termination and innermost normalisation of term rewriting systems , 2001 .

[39]  Zohar Manna,et al.  Proving termination with multiset orderings , 1979, CACM.

[40]  Robert F. Stärk,et al.  The Theoretical Foundations of LPTP (A Logic Program Theorem Prover) , 1998, J. Log. Program..

[41]  Zhe Yang,et al.  High level reading and data structure compilation , 1997, POPL '97.

[42]  Andreas Podelski,et al.  Transition predicate abstraction and fair termination , 2005, POPL '05.

[43]  J. Avery The Size-Change Termination Principle on Non-Well founded Data Types , 2005 .

[44]  Neil D. Jones,et al.  Termination analysis and specialization-point insertion in offline partial evaluation , 2005, TOPL.

[45]  Jürgen Giesl,et al.  The size-change principle and dependency pairs for termination of term rewriting , 2005, Applicable Algebra in Engineering, Communication and Computing.