Analysing Logic Programs Using 'Prop'-ositional Logic Programs and a Magic Wand

Abstract This paper illustrates the role of a class of “prop”-ositional logic programs in the analysis of complex properties of logic programs. Analyses are performed by abstracting Prolog programs to corresponding “prop”-ositional logic programs which approximate the original programs and have finite meanings. We focus on a groundness analysis which is equivalent to that obtained by abstract interpretation using the domain Prop . The main contribution is in the ease in which a highly efficient implementation of the analysis is obtained. The implementation is bottom-up and provides approximations of a program's success patterns . Goal-dependent information such as call patterns is obtained using a magic-set transformation. A novel compositional approach is applied so that call patterns for arbitrary goals are derived in a precise and efficient way.

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

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

[3]  Kim Marriott,et al.  Denotational abstract interpretation of logic programs , 1994, TOPL.

[4]  Dean Jacobs,et al.  Static Analysis of Logic Programs for Independent And-Parallelism , 1992, J. Log. Program..

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

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

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

[8]  Kim Marriott,et al.  Suspension analyses for concurrent logic programs , 1994, TOPL.

[9]  Kim Marriott,et al.  Precise and efficient groundness analysis for logic programs , 1993, LOPL.

[10]  Jean H. Gallier,et al.  Linear-Time Algorithms for Testing the Satisfiability of Propositional Horn Formulae , 1984, J. Log. Program..

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

[12]  Koichi Furukawa,et al.  Proceedings of the eighth international conference on Logic programming , 1991 .

[13]  Maurizio Gabbrielli,et al.  Fixpoint Semantics for Partial Computed Answer Substitutions and Call Patterns , 1992, ALP.

[14]  Maurizio Gabbrielli,et al.  A Compositional Semantics for Logic Programs , 1994, Theor. Comput. Sci..

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

[16]  Michael J. Maher,et al.  Unification Revisited , 1988, Foundations of Deductive Databases and Logic Programming..

[17]  Pascal Van Hentenryck,et al.  Groundness analysis for Prolog: implementation and evaluation of domain prop , 1993, PEPM '93.

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

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

[20]  Jack Minker Foundations of deductive databases and logic programming , 1988 .

[21]  Roberto Giacobazzi,et al.  Compositional analysis of modular logic programs , 1993, POPL '93.

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

[23]  Roberto Giacobazzi,et al.  A Generalized Semantics for Constraint Logic Programs , 1992, Fifth Generation Computer Systems.

[24]  A. Cortesi,et al.  Prop revisited: propositional formula as abstract domain for groundness analysis , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[25]  Maurizio Gabbrielli,et al.  Contributions to the Semantics of Open Logic Programs , 1992, FGCS.

[26]  M. Bruynooghe Compile-time garbage collection or How to transform programs in an assignment-free language into code with assignments , 1986 .

[27]  Divesh Srivastava,et al.  Rule Ordering in Bottom-Up Fixpoint Evaluation of Logic Programs , 1990, IEEE Trans. Knowl. Data Eng..

[28]  Jeffrey D. Uuman Principles of database and knowledge- base systems , 1989 .

[29]  Maurizio Gabbrielli,et al.  Goal independency and call patterns in the analysis of logic programs , 1994, SAC '94.

[30]  Dale Miller Logic Programming, Proceedings of the 1993 International Symposium, Vancouver, British Columbia, Canada, October 26-29, 1993 , 1993, ILPS.

[31]  Maurice Bruynooghe,et al.  Tutorial on abstract interpretation of logic programs , 1988 .

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

[33]  Philip W. Dart On Derived Dependencies and Connected Databases , 1991, J. Log. Program..

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

[35]  Giorgio Levi,et al.  Models, Unfolding Rules and Fixpoint Semantics , 1988, ICLP/SLP.

[36]  Saumya K. Debray,et al.  Detection and Optimization of Functional Computations in Prolog , 1986, ICLP.