Automated Verification of Prolog Programs

Abstract Although Prolog is (still) the most widely used logic language, it suffers from a number of drawbacks which prevent it from being truely declarative. The nondeclarative features such as the depth-first search rule are nevertheless necessary to make Prolog reasonably efficient. Several authors have proposed methodologies to reconcile declarative programming with the algorithmic features of Prolog. The idea is to analyse the logic program with respect to a set of properties such as modes, types, sharing, termination, and the like in order to ensure that the operational behaviour of the Prolog program complies with its logic meaning. Such analyses are tedious to perform by hand and can be automated to some extent. This paper presents a state-of-the-art analyser which allows one to integrate many individual analyses previously proposed in the literature as well as new ones. Conceptually, the analyser is based on the notion of abstract sequence which makes it possible to collect all kinds of desirable information, including relations between the input and output sizes of terms, multiplicity, and termination.

[1]  Kung-Kiu Lau,et al.  Top-down Synthesis of Recursive Logic Procedures from First-order Logic Specifications , 1990, ICLP.

[2]  P. H. Lindsay Human Information Processing , 1977 .

[3]  Wlodzimierz Drabent,et al.  Inductive Assertion Method for Logic Programs , 1987, Theoretical Computer Science.

[4]  Alexander Aiken,et al.  Directional Type Checking of Logic Programs , 1994, SAS.

[5]  Yves Deville,et al.  Logic Program Synthesis from Incomplete Specifications , 1993, J. Symb. Comput..

[6]  Geraint A. Wiggins Synthesis and Transformation of Logic Programs in the Whelk Proof Development System , 1992, JICSLP.

[7]  Pascal Van Hentenryck,et al.  Experimental evaluation of a generic abstract interpretation algorithm for Prolog , 1992, ICCL.

[8]  Danny De Schreye,et al.  Automatic Termination Analysis , 1992, LOPSTR.

[9]  Agostino Cortesi,et al.  Conceptual and Software Support for Abstract Domain Design: Generic Structural Domain and Open Product , 1993 .

[10]  Patrick Cousot,et al.  Abstract Interpretation and Application to Logic Programs , 1992, J. Log. Program..

[11]  Marc Bezem,et al.  Characterizing Termination of Logic Programs with Level Mappings , 1989, NACLP.

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

[13]  Christophe Verschaetse Static termination analysis for definite Horn clause programs , 1992 .

[14]  Harald Søndergaard,et al.  An Application of Abstract Interpretation of Logic Programs: Occur Check Reduction , 1986, ESOP.

[15]  Lutz Plümer Automatic Verification of GHC-Programs: Termination , 1992, FGCS.

[16]  Zoltan Somogyi,et al.  The Execution Algorithm of Mercury, an Efficient Purely Declarative Logic Programming Language , 1996, J. Log. Program..

[17]  Patrick Cousot,et al.  Inductive definitions, semantics and abstract interpretations , 1992, POPL '92.

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

[19]  Dino Pedreschi,et al.  Proving Termination of General Prolog Programs , 1991, TACS.

[20]  Wlodzimierz Drabent,et al.  Inductive Assertion Method for Logic Programs , 1988, Theor. Comput. Sci..

[21]  Maurice Bruynooghe,et al.  A Practical Framework for the Abstract Interpretation of Logic Programs , 1991, J. Log. Program..

[22]  Dino Pedreschi,et al.  Studies in Pure Prolog: Termination , 1990 .

[23]  John Wylie Lloyd,et al.  Foundations of Logic Programming , 1987, Symbolic Computation.

[24]  Yves Deville,et al.  Logic programming - systematic program development , 1990, International series in logic programming.

[25]  Maurice Bruynooghe,et al.  Improving abstract interpretations by combining domains , 1995, TOPL.

[26]  Giorgio Levi,et al.  Proving Properties of Logic Programs by Abstract Diagnosis , 1996, LOMAPS.

[27]  Pascal Van Hentenryck,et al.  Type analysis of Prolog using type graphs , 1994, PLDI '94.

[28]  Gerda Janssens,et al.  Abstract equation systems: description and insights , 1995 .

[29]  Giorgio Levi,et al.  A Reconstruction of Veriication Techniques by Abstract Interpretation , 1997 .

[30]  Kim Marriott,et al.  Semantics-Based Dataflow Analysis of Logic Programs , 1989, IFIP Congress.

[31]  Krzysztof R. Apt,et al.  From logic programming to Prolog , 1996, Prentice Hall International series in computer science.

[32]  Manuel V. Hermenegildo,et al.  Compile-Time Derivation of Variable Dependency Using Abstract Interpretation , 1992, J. Log. Program..

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

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

[35]  Doran Wilde,et al.  A LIBRARY FOR DOING POLYHEDRAL OPERATIONS , 2000 .

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

[37]  Pascal Van Hentenryck,et al.  Combinations of abstract domains for logic programming , 1994, POPL '94.

[38]  Marc Bezem,et al.  Strong Termination of Logic Programs , 1991, J. Log. Program..

[39]  Saumya K. Debray,et al.  Task granularity analysis in logic programs , 1990, PLDI '90.

[40]  Danny De Schreye,et al.  Automatic Inference of Norms: A Missing Link in Automatic Termination Analysis , 1993, ILPS.

[41]  Chris Mellish,et al.  Abstract Interpretation of Prolog Programs , 1986, ICLP.

[42]  Saumya K. Debray,et al.  Cost analysis of logic programs , 1993, TOPL.

[43]  Alan Bundy,et al.  The Synthesis of Logic Programs from Inductive Proofs , 1990 .

[44]  Pierre De Boeck,et al.  Static Type Analysis of Prolog Procedures for Ensuring Correctness , 1990, PLILP.

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

[46]  Albert R. Meyer,et al.  Proceedings of the International Conference on Theoretical Aspects of Computer Software , 1991 .

[47]  Agostino Cortesi,et al.  Speci cation-based Automatic Veri cation of Prolog Programs 1 , 1996 .

[48]  Pascal Van Hentenryck,et al.  Reexecution in abstract interpretation of Prolog , 1995 .

[49]  Patrick Cousot,et al.  Abstract Interpretation Frameworks , 1992, J. Log. Comput..

[50]  Annalisa Bossi,et al.  Typed Norms , 1992, ESOP.

[51]  Daniel Le Métayer Program analysis for software engineering: new applications, new requirements, new tools , 1996, CSUR.

[52]  Pierre De Boeck,et al.  Mechanical Transformation of Logic Definitions Augmented with Type Information into Prolog Procedures: Some Experiments , 1993, LOPSTR.

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

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

[55]  Pascal Van Hentenryck,et al.  Evaluation of the Domain Prop , 1995, J. Log. Program..

[56]  Danny De Schreye,et al.  Deriving Termination Proofs for Logic Programs, Using Abstract Procedures , 1991, ICLP.

[57]  Saumya K. Debray,et al.  Functional computations in logic programs , 1989, TOPL.

[58]  Pascal Van Hentenryck,et al.  An Abstract Interpretation Framework which Accurately Handles Prolog Search-Rule and the Cut , 1994, ILPS.

[59]  Jean Henrard,et al.  FOLON: An Environment for Declarative Construction of Logic Programs , 1992, PLILP.

[60]  Patrick Cousot,et al.  Automatic synthesis of optimal invariant assertions: Mathematical foundations , 1977 .

[61]  Dean Jacobs,et al.  Accurate and Efficient Approximation of Variable Aliasing in Logic Programs , 1989, NACLP.

[62]  D. D. Schreye,et al.  Exploiting the power of typed norms in automatic inference of interargument relations , 1997 .

[63]  Chris Hankin,et al.  Abstract Interpretation of Declarative Languages , 1987 .

[64]  Ulf Nilsson,et al.  Systematic Semantic Approximations of Logic Programs , 1990, PLILP.

[65]  Pascal Van Hentenryck,et al.  Type Analysis of Prolog Using Type Graphs , 1995, J. Log. Program..

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

[67]  Simon L. Peyton Jones,et al.  Imperative functional programming , 1993, POPL '93.

[68]  Pascal Van Hentenryck,et al.  Cardinality Analysis of Prolog , 1994, ILPS.