Meta-circular Abstract Interpretation in Prolog

We give an introduction to the meta-circular approach to the abstract interpretation of logic programs. This approach is particularly useful for prototyping and for introductory classes on abstract interpretation. Using interpreters, students can immediately write, adapt, and experiment with interpreters and working dataflow analysers. We use a simple meta-circular interpreter, based on a "non-ground Tp" semantics, as a generic analysis engine. Instantiating the engine is a matter of providing an appropriate domain of approximations, together with definitions of "abstract" unification and disjunction. Small changes of the interpreter let us vary both what can be "observed" by an analyser, and how fixed point computation is done. Amongst the dataflow analyses used to exemplify this approach are a parity analysis, groundness dependency analysis, call patterns, depth-k analysis, and a "pattern" analysis to establish most specific generalisations of calls and success sets.

[1]  Saumya K. Debray,et al.  Automatic Mode Inference for Prolog Programs , 1986, SLP.

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

[3]  John P. Gallagher,et al.  Deletion of Redundant Unary Type Predicates from Logic Programs , 1992, LOPSTR.

[4]  Charles N. Fischer,et al.  Automatic, transparent parallelization of logic programs at compile time , 1988 .

[5]  Jeffrey D. Ullman,et al.  A survey of deductive database systems , 1995, J. Log. Program..

[6]  Michael J. Maher,et al.  Déjà Vu in Fixpoints of Logic Programs ∗ , 1989 .

[7]  Jacob M. Howe,et al.  Implementing Groundness Analysis with Definite Boolean Functions , 2000, ESOP.

[8]  Alan Mycroft,et al.  Abstract interpretation and optimising transformations for applicative programs , 1982 .

[9]  Michael Codish,et al.  An Algebraic Approach to Sharing Analysis of Logic Programs , 1997, SAS.

[10]  Bart Demoen,et al.  Semantics-based program analysis for logic-based languages using XSB , 1998, International Journal on Software Tools for Technology Transfer.

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

[12]  Peter J. Stuckey,et al.  Sharing and groundness dependencies in logic programs , 1999, TOPL.

[13]  Bart Demoen,et al.  Analysing Logic Programs Using 'Prop'-ositional Logic Programs and a Magic Wand , 1993, ILPS.

[14]  Konstantinos Sagonas,et al.  XSB as an efficient deductive database engine , 1994, SIGMOD '94.

[15]  Franz Baader,et al.  Unification theory , 1986, Decis. Support Syst..

[16]  Roberto Barbuti,et al.  A general framework for semantics-based bottom-up abstract interpretation of logic programs , 1993, TOPL.

[17]  Jens E. Wunderwald Memoing Evaluation by Source-to-Source Transformation , 1995, LOPSTR.

[18]  Jeffrey D. Ullman,et al.  Principles Of Database And Knowledge-Base Systems , 1979 .

[19]  John P. Gallagher,et al.  Practical Model-Based Static Analysis for Definite Logic Programs , 1995, ILPS.

[20]  Giorgio Levi,et al.  A Formalization of Metaprogramming for real , 1993, ICLP.

[21]  Giorgio Levi,et al.  Declarative Modeling of the Operational Behavior of Logic Languages , 1989, Theor. Comput. Sci..

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

[23]  Pascal Van Hentenryck,et al.  Experimental Evaluation of a Generic Abstract Interpretation Algorithm for PROLOG , 1992, ACM Trans. Program. Lang. Syst..

[24]  Samir Genaim,et al.  The Def-inite Approach to Dependency Analysis , 2001, ESOP.

[25]  John P. Gallagher,et al.  Fast and Precise Regular Approximations of Logic Programs , 1994, ICLP.

[26]  Kim Marriott,et al.  Bottom-Up Dataflow Analysis of Normal Logic Programs , 1992, J. Log. Program..

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

[28]  Maurice Bruynooghe,et al.  Abstracting s-semantincs Using A Model-Theoretic Approach , 1994, PLILP.

[29]  Michael Codish,et al.  Type Dependencies for Logic Programs Using ACI-Unification , 2000, ISTCS.

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

[31]  Danny De Schreye,et al.  Why Untyped Nonground Metaprogramming Is Not (Much Of) A Problem , 1995, J. Log. Program..

[32]  Patrick Cousot,et al.  Systematic design of program analysis frameworks , 1979, POPL.

[33]  Bart Demoen,et al.  Abstract Interpretation: Towards the Global Optimization of Prolog Programs , 1987, SLP.

[34]  Peter J. Stuckey,et al.  A practical object‐oriented analysis engine for CLP , 1998 .

[35]  Robert A. Kowalski,et al.  The Semantics of Predicate Logic as a Programming Language , 1976, JACM.

[36]  Giorgio Levi,et al.  A New Declarative Semantics for Logic Languages , 1988, ICLP/SLP.

[37]  J. W. Lloyd,et al.  Foundations of logic programming; (2nd extended ed.) , 1987 .

[38]  Maurizio Gabbrielli,et al.  The s-Semantics Approach: Theory and Applications , 1994, J. Log. Program..

[39]  Neil D. Jones,et al.  Data flow analysis of applicative programs using minimal function graphs , 1986, POPL '86.

[40]  Kim Marriott,et al.  Bottom-up Abstract Interpretation of Logic Programs , 1988, ICLP/SLP.

[41]  Chris Mellish,et al.  Some Global Optimizations for a Prolog Compiler , 1985, J. Log. Program..

[42]  C. R. Ramakrishnan,et al.  Practical program analysis using general purpose logic programming systems—a case study , 1996, PLDI '96.

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

[44]  Bart Demoen,et al.  Deriving Polymorphic Type Dependencies for Logic Programs Using Multiple Incarnations of Prop , 1994, SAS.

[45]  Bart Demoen,et al.  A Freeness and Sharing Analysis of Logic Programs Based on a Pre-interpretation , 1996, SAS.

[46]  Jeffrey D. Ullman,et al.  Principles of Database and Knowledge-Base Systems, Volume II , 1988, Principles of computer science series.

[47]  Giorgio Levi,et al.  A Model-Theoretic Reconstruction of the Operational Semantics of Logic Programs , 1993, Inf. Comput..

[48]  Hisao Tamaki,et al.  Enumeration of Success Patterns in Logic Programs , 1983, Theor. Comput. Sci..

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

[50]  David Maier,et al.  Magic sets and other strange ways to implement logic programs (extended abstract) , 1985, PODS '86.

[51]  Michael Codish,et al.  Efficient Goal Directed Bottom-up Evaluation of Logic Programs , 1999, ICLP.

[52]  Saumya K. Debray,et al.  Global Flow Analysis as a Practical Compilation Tool , 1992, J. Log. Program..

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

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

[55]  Antoine Rauzy,et al.  Efficient Bottom-up Abstract Interpretation of Prolog by Means of Constraint Solving over Symbolic Finite Domains , 1993, PLILP.

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

[57]  Michael Codish,et al.  Bottum-up abstract interpretation of logic programs , 1992 .