An Algebraic Approach to Sharing Analysis of Logic Programs

This paper describes an algebraic approach to the sharing analysis of logic programs based on an abstract domain of set logic programs. Set logic programs are logic programs in which the terms are sets of variables and unification is based on an associative, commutative, and idempotent equality theory. We show that the proposed domain is isomorphic to the set-sharing domain of Jacobs and Langen and argue that there are good reasons to adopt our representation: (1) the abstract domain and the abstract operations defined are based on a theory for sets and set unification, resulting in a more intuitive approach to sharing analysis; (2) the abstract substitutions are like substitutions and can be applied to (abstract) atoms. This facilitates program analyses performed as abstract compilation. Finally (3) our representation makes explicit the “domain” of interest of an abstract substitution – which solves some technical problems in defining the domain of Jacobs and Langen.

[1]  C. R. Ramakrishnan,et al.  A symbolic constraint solving framework for analysis of logic programs , 1995, PEPM '95.

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

[3]  Thom W. Frühwirth,et al.  Logic programs as types for logic programs , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

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

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

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

[7]  Manuel V. Hermenegildo,et al.  &-Prolog and its Performance: Exploiting Independent And-Parallelism , 1990, ICLP.

[8]  Agostino Cortesi,et al.  Abstract interpretation of logic programs: an abstract domain for groundness, sharing, freeness and compoundness analysis , 1991, PEPM '91.

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

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

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

[12]  J. Lloyd Foundations of Logic Programming , 1984, Symbolic Computation.

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

[14]  Bart Demoen,et al.  XSB as the Natural Habitat for General Purpose Program Analysis , 1997, ICLP.

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

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

[17]  Roberto Giacobazzi,et al.  Generalized Semantics and Abstract Interpretation for Constraint Logic Programs , 1995, J. Log. Program..

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

[19]  Gerda Janssens,et al.  On the Practicality of Abstract Equation Systems , 1995, ICLP.

[20]  Patrick Lincoln,et al.  Adventures in Associative-Commutative Unification , 1989, J. Symb. Comput..

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

[22]  Michael Codish,et al.  Sharing Analysis for Logic Programs using Set Logic Programs , 1996, APPIA-GULP-PRODE.