An algebraic approach to sharing analysis of logic programs

  • Michael Codish
  • Vitaly Lagoon
  • Francisco Bueno
Logic Programming I
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1302)

Abstract

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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    F. Baader and J. Siekmann. Unification theory. In D. Gabbay, C. Hogger, and J. Robinson, editors, Handbook of Logic in Artificial Intelligence and Logic Programming, volume 2, pages 41–126. Oxford Science Publications, 1994.Google Scholar
  2. 2.
    M. Codish and B. Demoen. Analysing logic programs using “prop”-ositional logic programs and a magic wand. The Journal of Logic Programming, 25(3):249–274, December 1995.Google Scholar
  3. 3.
    M. Codish, B. Demoen, and K. Sagonas. Xsb as the natural habitat for general purpose program analysis. Technical report, Ben-Gurion University of the Negev, 1997. ftp://ftp.cs.bgu.ac.il/pub/people/codish/absxsb.ps.Google Scholar
  4. 4.
    M. Codish and V. Lagoon.Type dependencies for logic programs using aciunification. In Proceedings of the 1996 Israeli Symposium on Theory of Computing and Systems, pages 136–145. IEEE Press, June 1996.Google Scholar
  5. 5.
    M. Codish, V. Lagoon, and F. Bueno. Sharing analysis for logic programs using set logic programs. In Proceedings of the 1996 Conference on Declarative Programming — APPIA-GULP-PRODE, pages 29–40, July 1996.Google Scholar
  6. 6.
    A. Cortesi, B. L. Charlier, and P. V. Hentenryck. Combinations of abstract domains for logic programming. In 21ST ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 227–239. ACM Press, 1994.Google Scholar
  7. 7.
    A. Cortesi and G. FiIé. Abstract interpretation of logic programs: An abstract domain for groundness, sharing, freeness and compoundness analysis. In Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation. SIGPLAN NOTICES 26 (9), pages 52–61. ACM Press, 1991.Google Scholar
  8. 8.
    P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proc., Fourth ACM Symp. on Principles of Programming Languages, pages 238–252. ACM Press, January 1977.Google Scholar
  9. 9.
    S. Dawson, C. Ramakrishnan, and D. Warren. Practical Program Analysis Using General Purpose Logic Programming Systems — A Case Study. In Proceedings of the ACM SIGPLAN'96 Conference on Programming Language Design and Implementation, pages 117–126, New York, USA, 1996. ACM Press.Google Scholar
  10. 10.
    M. Falaschi, G. Levi, M. Martelli, and C. Palamidessi. Declarative modeling of the operational behavior of logic languages. Theoretical Computer Science, 69(3):289–318, 1989.Google Scholar
  11. 11.
    T. Frühwirth, E. Shapiro, M. Y. Vardi, and E. Yardeni. Logic programs as types for logic programs. In Proceedings, Sixth Annual IEEE Symposium on Logic in Computer Science, pages 300–309, Amsterdam, The Netherlands, July 15-18 1991. IEEE Computer Society Press.Google Scholar
  12. 12.
    J. P. Gallagher and D. A. Waal. Fast and precise regular approximations of logic programs. In P. Van Hentenryck, editor, Logic Programming — Proceedings of the Eleventh International Conference on Logic Programming, pages 599–613, Massachusetts Institute of Technology, 1994. The MIT Press.Google Scholar
  13. 13.
    R. Giacobazzi, S. Debray, and G. Levi. Generalized Semantics and Abstract Interpretation for Constraint Logic Programs. Journal of Logic Programming, 25(3):191–248, 1995.Google Scholar
  14. 14.
    M. V. Hermenegildo and K. J. Greene. &-Prolog and its performance: Exploiting independent And-Parallelism. In David H. D. Warren and Peter Szeredi, editors, Proceedings of the Seventh International Conference on Logic Programming, pages 253–268, Jerusalem, 1990. The MIT Press.Google Scholar
  15. 15.
    M. V. Hermenegildo, R. Warren, and S. K. Debray. Global flow analysis as a practical compilation tool. The Journal of Logic Programming, 13(1, 2, 3 and 4):349–366, 1992.Google Scholar
  16. 16.
    D. Jacobs and A. Langen. Static analysis of logic programs for independent and parallelism. The Journal of Logic Programming, 13(2 and 3):291–314, 1992.Google Scholar
  17. 17.
    P. Lincoln and T. Christian. Adventures in associative-commutative unification. Journal of Symbolic Computation, 8(1,2):217–240, 1989.Google Scholar
  18. 18.
    J. Lloyd. Foundations of Logic Programming. Springer-Verlag, 2nd edition, 1987.Google Scholar
  19. 19.
    A. Mulkers, W. Simoens, G. Janssens, and M. Bruynooghe. On the practicality of abstract equation systems. In International Conference on Logic Programming. MIT Press, June 1995.Google Scholar
  20. 20.
    K. Muthukumar and M. Hermenegildo. Compile-time derivation of variable dependency using abstract interpretation. The Journal of Logic Programming, 13(2 and 3):315–347, 1992.Google Scholar
  21. 21.
    D. A. Plaisted. The occur-check problem in Prolog. In Proceedings of the International Symposium on Logic Programming, pages 272–280, Atlantic City, 1984. IEEE, Computer Society Press.Google Scholar
  22. 22.
    C. Ramakrishnan, I. Ramakrishnan, and R. Sekar. A symbolic constraint solving framework for analysis of logic programs. In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 12–23, New York, USA, 1995. ACM Press.Google Scholar
  23. 23.
    H. Søndergaard. An application of abstract interpretation of logic programs: Occur-check reduction. In Proceedings of ESOP 86, volume 213 of Lecture Notes in Computer Science, pages 327–338. Springer-Verlag, 1986. (Extended Abstract).Google Scholar

Copyright information

© Springer-Verlag 1997

Authors and Affiliations

  • Michael Codish
    • 1
  • Vitaly Lagoon
    • 1
  • Francisco Bueno
    • 2
  1. 1.Department of Mathematics and Computer ScienceBen-Gurion University of the NegevBeer-ShebaIsrael
  2. 2.Department of Artificial IntelligenceUniversidad Politécnica de Madrid (UPM), Campus de MontegancedoMadridSpain

Personalised recommendations