A categorical model for logic programs: Indexed monoidal categories

  • Andrea Corradini
  • Andrea Asperti
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 666)


We propose a simple notion of model for Logic Programs based on indexed monoidal categories. On the one hand our proposal is consistent with well-known techniques for providing a categorical semantics for logical systems. On the other hand, it allows us to keep the effectiveness of the Horn Clause Logic fragment of first order logic. This is shown by providing an effective construction of the initial model of a program, obtained through the application of a general methodology aimed at defining a categorical semantics for structured transition systems. Thus the declarative view (as logical theory) and the operational view (as structured transition system) of a logic program are reconciled in a highly formal framework, which provides interesting hints to possible generalizations of the logic programming paradigm.


Category Theory Logic Programming Categorical Logic Structured Transition Systems Model Theory 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [AL91]
    A. Asperti, G. Longo, Categories, Types and Structures, an Introduction to Category Theory for the Working Computer Scientist, Foundations of Computing Series (MIT Press, Cambridge, MA, 1991).Google Scholar
  2. [AM89]
    A. Asperti, S. Martini, Projections instead of variables, A category theoretic interpretation of logic programs, Proc. 6th Int. Conf. on Logic Programming, MIT Press, 1989, pp. 337–352.Google Scholar
  3. [AM92]
    A. Asperti, S. Martini, Categorical Models of Polymorphism, Information and Computation, 99 (1), 1992, pp. 1–79.Google Scholar
  4. [BE73]
    A. Bastiani, C. Ehresmann, Categories of sketched structures, Cahiers de Topologie et Géometrie Différentielle, 13, 1973, pp. 1–105.Google Scholar
  5. [Be75]
    D.B. Benson, The Basic Algebraic Structures in Categories of Derivations, Information and Control, 28 (1), 1975, pp. 1–29.Google Scholar
  6. [BGLM92]
    A. Bossi, M. Gabbrielli, G. Levi, and M. C. Meo, Contributions to the Semantics of Open Logic Programs, in Proceedings of the International Conference on Fifth Generation Computer Systems 1992, pp. 570–580.Google Scholar
  7. [BW85]
    M. Barr, C. Wells, Toposes, Triples and Theories, Grundlehren der mathematischen Wissenschaften 278, Springer Verlag, 1985.Google Scholar
  8. [BW90]
    M. Barr, C. Wells, Category Theory for Computing Science, Prentice Hall, 1990.Google Scholar
  9. [CM90a]
    A. Corradini, U. Montanari, Towards a Process Semantics in the Logic Programming Style, in Proc. 7th Symposium on Theoretical Aspects of Computer Science (STACS '90), LNCS 415, 1990, pp. 95–108.Google Scholar
  10. [CM90b]
    A. Corradini, U. Montanari, An Algebraic Semantics of Logic Programs as Structured Transition Systems, in Proc. of the North American Conference on Logic Programming (NACLP '90), MIT Press, 1990.Google Scholar
  11. [CM92]
    A. Corradini, U. Montanari, An Algebraic Semantics for Structured Transition Systems and its Application to Logic Programs, Theoretical Computer Science, 103, 1992, pp. 51–106.Google Scholar
  12. [Co82]
    A. Colmerauer, PROLOG II —Reference Manual and Theoretical Model, Internal Report, Groupe Intelligence Artificielle, Université Aix-Marseille II, October 1982.Google Scholar
  13. [Co90]
    A. Corradini, An Algebraic Semantics for Transition Systems and Logic Programming, Ph.D. Thesis TD-8/90, Dipartimento di Informatica, Università di Pisa, March '90.Google Scholar
  14. [Go79]
    R. Goldblatt, Topoi. The Categorical Analysis of Logic, Studies in Logic and the Foundations of Mathematics, 98, North-Holland, Amsterdam. 1979.Google Scholar
  15. [Gr89]
    J. W. Gray, The Category of Sketches as a Model for Algebraic Semantics, Contemporary Mathematics, 92, 1989, pp. 109–135.Google Scholar
  16. [JL87]
    Jaffar, J., Lassez, J.-L., Constraint Logic Programming, Proc. 12th ACM Symp. on Principles of Programming Languages, pp. 111–119, 1987.Google Scholar
  17. [Ke76]
    R. Keller, Formal Verification of Parallel Programs, Com. ACM, 7, 1976, pp. 371–384.Google Scholar
  18. [KW71]
    A. Kock, G.C. Wraith, Elementary Toposes, Aarhus Universitet, Matematisk Institut, Lecture Notes 30, September 1971.Google Scholar
  19. [La63]
    F. W. Lawvere, Functorial semantics of algebraic theories, Proc. National Academy of Sciences, U.S.A., 50, 1963, pp. 869–872. Summary of Ph.D. Thesis, Columbia University.Google Scholar
  20. [LI87]
    J.W. Lloyd, Foundations of Logic Programming, Springer Verlag, 1984, (2nd Edition 1987).Google Scholar
  21. [LS86]
    J. Lambek, P.J. Scott, Introduction to Higher-Order Categorical Logic, Cambridge University Press. 1986.Google Scholar
  22. [ML71]
    S. Mac Lane, Categories for the Working Mathematician, Springer Verlag, New York, 1971.Google Scholar
  23. [MM90]
    J. Meseguer, U. Montanari, Petri Nets are Monoids, Information and Computation, 88 (2), 1990, 105–155.Google Scholar
  24. [MR77]
    M. Makkai, G.E. Reyes, First Order Categorical Logic, Lecture Notes in Mathematics 611, 1977.Google Scholar
  25. [NM88]
    G. Nadathur, D. Miller, An overview of λProlog, Proc. of the Fifth Int. Conf. on Logic Programming, MIT Press, 1988, pp. 810–827.Google Scholar
  26. [NM90]
    G. Nadathur, D. Miller, Higher-Order Horn Clauses, Journal of the ACM, 37 (4), 1990, pp. 777–814.Google Scholar
  27. [Pl81]
    G. Plotkin, A Structural Approach to Operational Semantics, Technical Report DAIMI FN-19, Aarhus University, Department of Computer Science, Aarhus, 1981.Google Scholar
  28. [Re84]
    J. Reynolds, Polymorphism is not set-theoretic, Symposium on Semantics of Data Types; Khan, MacQueen, Plotkin eds., LNCS 173, Springer-Verlag, 1984.Google Scholar
  29. [Sh67]
    Shoenfield, J.R., Mathematical logic. Addison-Wesley Publishing Company, Reading, Massachusetts, 1967.Google Scholar
  30. [Se77]
    R.A.G. Seely, Hyperdoctrines and Natural Deduction, Ph.D. Thesis, University of Cambridge, 1977.Google Scholar
  31. [Se83]
    R.A.G. Seely, Hyperdoctrines, Natural Deduction and the Beck Condition, Zeitschrift für Math. Logik Grundlagen der Math., 29, 1983, pp. 505–542.Google Scholar
  32. [Se84]
    R.A.G. Seely, Locally cartesian closed categories and type theories, Math. Proc. Camb. Phil. Soc. 95, 1984, pp. 33–48.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1993

Authors and Affiliations

  • Andrea Corradini
    • 1
  • Andrea Asperti
    • 2
  1. 1.Dipartimento di InformaticaUniversità di PisaPisaItaly
  2. 2.INRIA - RocquencourtLe ChesnayFrance

Personalised recommendations