Analysis of Pure PROLOG Programs

We deene a new xpoint semantics for pure PROLOG, which is obtained as an instance of the generalized semantics of CLP and is oriented towards abstract interpretation. The concrete semantics is obtained by attaching to goals and constraints a history component that remembers the sequence of choices made during the derivation, and resorting to the notion of divergent constraint to represent partial computations. The semantics is then used as the foundation of a framework for the (bottom-up, goal-independent) abstract interpretation of pure PROLOG programs. The abstract semantic domain is composed of sequences of standard and divergent constraints. Two conceptually new problems arise in modelling the depth-rst search strategy of PROLOG: both upper and lower approximations are needed and the length of the sequences need to be kept bounded in order to guarantee the niteness of the approach. Lower approximations are needed because of the negative role played by divergent constraints. Our solution is based on a diierent set-theoretic interpretation of the same constraints used for upper approximations. We discuss the conditions under which the length of the sequences of abstract constraints remains bounded, guaranteeing the termination of the abstract xpoint computation.

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

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

[3]  Maurizio Gabbrielli,et al.  Compositional analysis for concurrent constraint programming , 1993, [1993] Proceedings Eighth Annual IEEE Symposium on Logic in Computer Science.

[4]  Catuscia Palamidessi,et al.  A Logical Denotational Semantics for Constraint Logic Programming , 1994, ESOP.

[5]  Brian A. Davey,et al.  An Introduction to Lattices and Order , 1989 .

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

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

[8]  Roberto Bagnara,et al.  An application of constraint propagation to data-flow analysis , 1993, Proceedings of 9th IEEE Conference on Artificial Intelligence for Applications.

[9]  Roberto Giacobazzi,et al.  Abstracting Synchronization in Concurrent Constraint Programming , 1994, J. Funct. Log. Program..

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

[11]  Giorgio Delzanno,et al.  A Bottom-Up Characterization of Finite Success , 1993, ILPS.

[12]  Roberto Giacobazzi,et al.  Joining Abstract and Concrete Computations in Constraint Logic Programming , 1993, AMAST.

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

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

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

[16]  Roberto Barbuti,et al.  Modelling Prolog control , 1992, POPL '92.

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

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

[19]  Elena Marchiori,et al.  A Theory of First-Order Built-in's of Prolog , 1992, ALP.

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

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

[22]  John Potter,et al.  Characterisation of Terminating Logic Programs , 1986, SLP.

[23]  Michael J. Maher,et al.  Oracle Semantics for Prolog , 1992, Inf. Comput..

[24]  Giorgio Levi,et al.  An Algebraic Theory of Observables , 1994, ILPS.

[25]  Maurizio Gabbrielli,et al.  Observational Equivalences for Logic Programs , 1992, Joint International Conference and Symposium on Logic Programming.

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