Logic programming as hypergraph Rewriting

  • Andrea Corradini
  • Francesca Rossi
  • Francesco Parisi-Presicce
CAAP Colloquium On Trees In Algebra And Programming
Part of the Lecture Notes in Computer Science book series (LNCS, volume 493)


Logic Programming and (Hyper-)Graph Rewriting are two well known fields of Computer Science. In this paper we show how to model logic program computations through algebraic techniques familiar to the graph rewriting community. Clauses of a logic program are represented by graph productions, goals by suitable hypergraphs (called jungles), and resolution steps by an algebraic construction involving three pushouts. The correspondence between the two formalisms is further analyzed by providing a precise algebraic characterization of specialization and unfolding of clauses.


  1. [AM89]
    Asperti, A., Martini, S., Projections instead of variables, A category theoretic interpretation of logic programs, Proc. 6th Int. Conf. on Logic Programming, Lisboa, Portugal, 1989.Google Scholar
  2. [CER79]
    Claus, V., Ehrig, H., Rozenberg, G., (Eds.) Proceedings of the 1 st International Workshop on Graph-Grammars and Their Application to Computer Science and Biology, LNCS 73, 1979.Google Scholar
  3. [CMREL91]
    Corradini, A., Montanari, U., Rossi, F., Ehrig, H., Löwe, M., Logic Programming and Graph Grammars, to appear in [EKR91].Google Scholar
  4. [Eh83]
    Ehrig, H., Aspects of concurrency in graph grammars, in [ENR83], pp. 58–81.Google Scholar
  5. [Eh87]
    Ehrig, H., Tutorial introduction to the algebraic approach of graph-grammars, in [ENRR87], pp. 3–14.Google Scholar
  6. [EHKP91]
    H. Ehrig, A. Habel, H.-J. Kreowski, F. Parisi-Presicce, Parallelism and Concurrency in High-Level Replacement Systems, Technical Report, Technische Universität Berlin, September 1990.Google Scholar
  7. [EKR91]
    Ehrig, H., Kreowski, H.-J., Rozenberg, G., (Eds.) Proceedings of the 4 th International Workshop on Graph-Grammars and Their Application to Computer Science, LNCS, 1991, to appear.Google Scholar
  8. [ENR83]
    Ehrig, H., Nagl, M., Rozenberg, G., (Eds.) Proceedings of the 2 nd International Workshop on Graph-Grammars and Their Application to Computer Science, LNCS 153, 1983.Google Scholar
  9. [ENRR87]
    Ehrig, H., Nagl, M., Rozenberg, G., Rosenfeld, A., (Eds.) Proceedings of the 3 rd International Workshop on Graph-Grammars and Their Application to Computer Science, LNCS 291, 1987.Google Scholar
  10. [Go88]
    Goguen, J.A., What is Unification? A Categorical View of Substitution, Equation and Solution, SRI Research Report SRI-CSL-88-2R2, SRI International, Menlo Park, California, 1988.Google Scholar
  11. [Ha89]
    Habel, A., Hyperedge Replacement: Grammars and Languages, Ph.D. Thesis, University of Bremen, 1989.Google Scholar
  12. [HK87]
    Habel, A., Kreowski, H.-J., May we introduce to you: hyperedge replacement, in [ENRR87], pp. 15–26.Google Scholar
  13. [HKP88]
    Habel, A., Kreowski, H-J., Plump, D., Jungle evaluation, in Proc. Fifth Workshop od Specification of Abstract Data Types, LNCS 332, 1988, pp. 92–112.Google Scholar
  14. [Ke91]
    J.R. Kennaway, Graph rewriting in some categories of partial morphisms, in [EKR91].Google Scholar
  15. [Kr87]
    Kreowski, H.-J., Is parallelism already concurrency? Part 1: Derivations in graph grammars, in [ENRR87], pp. 343–360.Google Scholar
  16. [Le88]
    G. Levi, Models, Unfolding Rules and Fixpoint Semantics, in Proc. 5th Int. Conf. Symp. on Logic Programming, Seattle, MIT Press, pp. 1649–1665, 1988.Google Scholar
  17. [Ll87]
    Lloyd, J.W., Foundations of Logic Programming, Springer Verlag, 1984, (Second Edition 1987).Google Scholar
  18. [ML71]
    Mac Lane, S., Categories for the Working Mathematician, Springer Verlag, New York, 1971.Google Scholar
  19. [PEM87]
    Parisi-Presicce, F., Ehrig, H., Montanari, U., Graph Rewriting with Unification and Composition, in [ENRR87], p. 496–514.Google Scholar
  20. [RB85]
    Rydeheard, D.E., Burstall, R.M., The Unification of Terms: A Category-Theoretic Algorithm, Internal Report UMCS-85-8-1, Dept. Comp. Sci., University of Manchester, August 1985.Google Scholar
  21. [RM88]
    Rossi, F., Montanari, U., Hypergraph Grammars ad Network of Constraints versus Logic Programming and Metaprogramming, in Proc. META88, MIT Press, Bristol, June 1988.Google Scholar
  22. [RM90]
    Rossi, F., Montanari, U., Constraint Relaxation as Higher Order Logic Programming, to appear in Proc. META90, Leuven, April 1990. Also Proc. GULP '88, in italian.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • Andrea Corradini
    • 1
  • Francesca Rossi
    • 1
  • Francesco Parisi-Presicce
    • 2
  1. 1.Dipartimento di InformaticaUniversità di PisaPisaITALY
  2. 2.Dipartimento di MatematicaUniversità dell'AquilaL'AquilaITALY

Personalised recommendations