Algebraic methods in the compositional analysis of logic programs

  • Fernando Orejas
  • Elvira Pino
  • Hartmut Ehrig
Invited Papers
Part of the Lecture Notes in Computer Science book series (LNCS, volume 841)


The compositionality of the semantics of logic programs with respect to (different varieties of) program union has been studied recently by a number of researchers. The approaches used can be considered quite ad-hoc in the sense that they provide, from scratch, the semantic constructions needed to ensure compositionality and, in some cases, full abstraction in the given framework. In this paper, we study the application of general algebraic methods for obtaining, systematically, this kind of results. In particular, the method proposed consists in defining the adequate institution for describing the given class of logic programs and, then, in using general institution-independent results to prove compositionality and full abstraction. This is done in detail for the class of definite logic programs, where the associated institution is defined in such a way that initial algebra semantics is equivalent to computed answer substitution semantics. Then a similar solution is sketched for definite logic programs with constraints and equality and for normal logic programs with constructive negation.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    K. R. Apt. Logic Programming. Handbook of Theoretical Computer Science, Vol B, chapter 10. 1990.Google Scholar
  2. [2]
    A. Bossi, M. Gabbrielli, G. Levi, and M. C. Meo. Contributions to the Semantics of Open Logics Programs. in Proc. 5th Gen. Comp. Syst. (1992) pp. 570–580.Google Scholar
  3. [3]
    M. Barr, C. Wells. Category Theory for Computing Science. Pretince Hall. 1990.Google Scholar
  4. [4]
    Burstall, R.M.; Goguen, J.A.: The semantics of Clear, a specification language, Proc. Copenhagen Winter School on Abstract Software Specification, Springer LNCS 86, pp. 292–332, 1980.Google Scholar
  5. [5]
    D. Chan. Constructive Negation Based on the Completed Database. In Proc. 5th Int. Conf. and Symp. on Logic Programming, Seattle, pp.111–125. 1988.Google Scholar
  6. [6]
    Ehrig, H.; Baldamus, M.; Cornelius, F.; Orejas, F.: Theory of Algebraic Module Specifications including Behavioural Semantics and Constraints, Proc. AMAST'91, to appear in Springer LNCS 1991Google Scholar
  7. [7]
    Ehrig, H.; Baldamus, M.; Orejas, F.: New concepts for amalgamation and extension in the framework of specification logics, in Current Trends in Theoretical Computer Science G. Rozenberg, A. Salomaa (eds.), Word Scientific (1993)Google Scholar
  8. [8]
    H. Ehrig, B. Mahr: Fundamentals of Algebraic Specification 1, Springer 1985.Google Scholar
  9. [9]
    H. Ehrig, B. Mahr: Fundamentals of Algebraic Specification 2, Springer 1989.Google Scholar
  10. [10]
    H. Ehrig, F. Orejas, F. Cornelius, M. Baldamus: Abstract and Behaviour Module Specifications, Report 93–25, Tech. Univ. Berlin, 1993.Google Scholar
  11. [11]
    Ehrig, H.; Pepper, P.; Orejas, F.: On Recent Trends in Algebraic Specification, Proc. ICALP'89, Springer LNCS 372 (1989), pp. 263–288Google Scholar
  12. [12]
    M. Falaschi, G. Levi, M. Martelli, and C. Palamidessi. Declarative Modeling of the Operational Behaviour of Logic Languages. Th Comp. Sc. 69, pp. 289–318, 1989.Google Scholar
  13. [13]
    J.A. Goguen, R.M. Burstall: Introducing institutions. Proc. Logics of Programming Workshop, Carnegie-Mellon. Springer LNCS 164, 221–256 (1984).Google Scholar
  14. [14]
    J.A. Goguen, R.M. Burstall, Institutions: Abstract model theory for specification and programming, Journ. of the ACM 39, 1 (1992) 95–146.Google Scholar
  15. [15]
    M. Gabbrielli, G. Levi. On the semantics of Logic Programs. Proc. ICALP 91, J. Leach, B. Monien, M. Rodriguez-Artalejo (eds.), Springer LNCS 510 (1991) 1–19.Google Scholar
  16. [16]
    J. A. Goguen, J. Meseguer. Models and Equality for Logical Programming. In Proc. TAPSOFT'87 vol.2, Springer LNCS 250 (1987), pp. 1–22.Google Scholar
  17. [17]
    H. Gaifman, and E. Shapiro. Fully abstract compositional semantics for logics programs. In Proc. Sixteenth Annual ACM Symp. on Principles of Programming Languages, (1989) pp. 134–142.Google Scholar
  18. [18]
    H. Gaifman, and E. Shapiro. Proof Theory and Semantics of Logic Programs. In Proc. Fourth IEEE Symp. on Logic In Computer Science, (1989) pp. 50–62Google Scholar
  19. [19]
    J. Jaffar, and J-L. Lassez. Constraint Logic Programming. In Proc. 1987 ACM Conf. on Principles of Programming Languages. Munich, pp.111–119, 1987.Google Scholar
  20. [20]
    J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag. 1987.Google Scholar
  21. [21]
    D. Miller. A Logical Analysis of Modules in Logic Programing. In Journal of Logic Programming, pp.79–108. 1989.Google Scholar
  22. [22]
    L. Monteiro, and A.Porto. A Language for Contextual Logic Programming. In Logic Programing Languages. Constraints, Functions, and Object, MIT Press, (1993).Google Scholar
  23. [23]
    D.T. Sannella, L.A. Wallen. A calculus for the construction of modular Prolog programs, in Proc. 1987 IEEE Symp. on Logic Programming (1987), pp. 368–378.Google Scholar
  24. [24]
    P. J. Stuckey. Constructive Negation for Constraint Logic Programming. In Proc. of Sixth IEEE Symp. on Logic in Computer Science. 1991.Google Scholar
  25. [25]
    Wirsing, M. Algebraic Specification. Handbook of Theoretical Computer Science, Vol 2: Formal Models and Semantics, Elsevier (1990) 675–788.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1994

Authors and Affiliations

  • Fernando Orejas
    • 1
  • Elvira Pino
    • 1
  • Hartmut Ehrig
    • 2
  1. 1.Dept. de L.S.I.Universitat Politècnica de CatalunyaBarcelonaSpain
  2. 2.Dept of Computer ScienceTechnical University of BerlinBerlinGermany

Personalised recommendations