Inference of termination conditions for numerical loops in Prolog

We present a new approach to termination analysis of numerical computations in logic programs. Traditional approaches fail to analyse them due to non well-foundedness of the integers. We present a technique that allows overcoming these difficulties. Our approach is based on transforming a program in a way that allows integrating and extending techniques originally developed for analysis of numerical computations in the framework of query-mapping pairs with the well-known framework of acceptability. Such an integration not only contributes to the understanding of termination behaviour of numerical computations, but also allows us to perform a correct analysis of such computations automatically, by extending previous work on a constraint-based approach to termination. Finally, we discuss possible extensions of the technique, including incorporating general term orderings.

[1]  Elena Marchiori,et al.  A declarative approach for first-order built-in's of Prolog , 1992, Applicable Algebra in Engineering, Communication and Computing.

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

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

[4]  William H. Winsborough,et al.  Multiple Specialization using Minimal-Function Graph Semantics , 1992, J. Log. Program..

[5]  Li-Yan Yuan,et al.  Loop checks for logic programs with functions , 2001, Theor. Comput. Sci..

[6]  Ingo Br,et al.  Prolog programming for artificial intelligence , 1990 .

[7]  Richard A. O'Keefe,et al.  The Craft of Prolog , 1990 .

[8]  Nachum Dershowitz,et al.  A General Framework for Automatic Termination Analysis of Logic Programs , 2000, Applicable Algebra in Engineering, Communication and Computing.

[9]  Sandro Etalle,et al.  On modular termination proofs of general logic programs , 2002, Theory Pract. Log. Program..

[10]  Étienne Payet,et al.  Detecting Optimal Termination Conditions of Logic Programs , 2002, SAS.

[11]  Allen Van Gelder,et al.  Termination detection in logic programs using argument sizes (extended abstract) , 1991, PODS.

[12]  Leon Sterling,et al.  The Art of Prolog , 1987, IEEE Expert.

[13]  Alexander Serebrenik,et al.  On Termination of Logic Programs with Floating Point Computations , 2002, SAS.

[14]  Annalisa Bossi,et al.  Preserving Universal Termination through Unfold/Fold , 1994, ALP.

[15]  Anna Philippou,et al.  Tools and Algorithms for the Construction and Analysis of Systems , 2018, Lecture Notes in Computer Science.

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

[17]  Ivan A. Sag,et al.  Book Reviews: Head-driven Phrase Structure Grammar and German in Head-driven Phrase-structure Grammar , 1996, CL.

[18]  Bal Wang,et al.  Proving Termination of Logic Programs , 1989, A Perspective in Theoretical Computer Science.

[19]  William F. Clocksin,et al.  Programming in Prolog , 1981, Springer Berlin Heidelberg.

[20]  Maurice Bruynooghe,et al.  A Framework for Analyzing the Termination of Definite Logic Programs with respect to Call Patterns , 1992, FGCS.

[21]  Alexander Serebrenik,et al.  TermiLog: A System for Checking Termination of Queries to Logic Programs , 1997, CAV.

[22]  Gerda Janssens,et al.  Abstracting Numerical Values in CLP(H, N) , 1994, PLILP.

[23]  Danny De Schreye,et al.  Termination Analysis: Some Practical Properties of the Norm and Level Mapping Space , 1998, IJCSLP.

[24]  Masoud Yazdani,et al.  Prolog Programming: A Tutorial Introduction , 1991 .

[25]  Patrick Cousot,et al.  Static determination of dynamic properties of programs , 1976 .

[26]  Maurice Bruynooghe,et al.  A Practical Technique for Detecting Non-terminating Queries for a Restricted Class of Horn Clauses, Using Directed, Weighted Graphs , 1990, ICLP.

[27]  Zohar Manna,et al.  A closer look at termination , 1975, Acta Informatica.

[28]  Frédéric Mesnard,et al.  Applying Static Analysis Techniques for Inferring Termination Conditions of Logic Programs , 2001, SAS.

[29]  Danny De Schreye,et al.  Termination proofs for logic programs with tabling , 2001, TOCL.

[30]  Ivan Bratko,et al.  Prolog Programming for Artificial Intelligence , 1986 .

[31]  Alexander Serebrenik,et al.  Inference of termination conditions for numerical loops , 2001, ArXiv.

[32]  Christian Holzbaur OFAI clp(Q,R) Manual , 1995 .

[33]  Elena Marchiori,et al.  On Termination of Constraint Logic Programs , 1995, CP.

[34]  Samir Genaim,et al.  Inferring termination conditions for logic programs using backwards analysis , 2001, Theory and Practice of Logic Programming.

[35]  Frédéric Mesnard,et al.  On proving left termination of constraint logic programs , 2003, TOCL.

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

[37]  Lutz Plümer Automatic Termination Proofs for Prolog Programs Operating on Nonground Terms , 1991, ISLP.

[38]  Helder Coelho,et al.  Prolog by Example , 1988, Symbolic Computation.

[39]  Alexander Serebrenik,et al.  Unfolding the Mystery of Mergesort , 1997, LOPSTR.

[40]  Michael Codish,et al.  A Semantic Basis for the Termination Analysis of Logic Programs , 1999, J. Log. Program..

[41]  William F. Clocksin,et al.  Programming in Prolog , 1987, Springer Berlin Heidelberg.

[42]  Danny De Schreye,et al.  Constraint-based termination analysis of logic programs , 1999, TOPL.

[43]  Annalisa Bossi,et al.  Proving Termination of Logic Programs by Exploiting Term Properties , 1991, TAPSOFT, Vol.2.

[44]  Alexander Serebrenik,et al.  Non-tranformational termination analysis of logic programs, based on general term-orderings , 2000, LOPSTR.

[45]  Wim Vanhoof,et al.  Reuse of Results in Termination Analysis of Typed Logic Programs , 2002, SAS.

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

[47]  Zohar Manna,et al.  Automatic Generation of Invariants and Intermediate Assertions , 1997, Theor. Comput. Sci..

[48]  Gerda Janssens,et al.  Deriving Descriptions of Possible Values of Program Variables by Means of Abstract Interpretation , 1990, J. Log. Program..

[49]  Jeffrey D. Ullman,et al.  Efficient tests for top-down termination of logical rules , 1988, JACM.

[50]  Annalisa Bossi,et al.  Norms on Terms and their use in Proving Universal Termination of a Logic Program , 1994, Theor. Comput. Sci..

[51]  Dimiter Skordev,et al.  An Abstract Approach to Some Loop Detection Problems , 1997, Fundam. Informaticae.

[52]  Salvatore Ruggieri Termination of Constraint Logic Programs , 1997, ICALP.

[53]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[54]  Lutz Plüer Termination proofs for logic programs based on predicate inequalities , 1990 .

[55]  Iain Mackintosh Unfolding a mystery , 1993 .

[56]  Roland N. Bol Loop checking in logic programming , 1995 .

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

[58]  Frédéric Mesnard,et al.  Inferring Left-terminating Classes of Queries for Constraint Logic Programs , 1996 .

[59]  Danny De Schreye,et al.  Deriving Termination Proofs for Logic Programs, Using Abstract Procedures , 1991, International Conference on Logic Programming.

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

[61]  Max Bramer Logic Programming with Prolog , 2005, Springer London.