Abstract
In the version of logic programming (LP) based on interpretations where variables occur in atoms, a goal reduction via unification can be seen as a transition labelled by the most general unifier. Categorically, it is thus natural to model a logic program as a coalgebra. In the paper we represent: (i) goals as the substitutive monoid freely generated by the predicate symbols; (ii) the LTS as the structured coalgebra defined by the SOS rules implicit in the LP semantics; (iii) the bisimulation semantics of a logic program as its image on the final coalgebra.
Research supported by the MIUR PRINs 201784YSZ5 ASPRA: Analysis of program analyses and by University of Pisa PRA_2018_66 DECLWARE: Metodologie dichiarative per la progettazione e il deployment di applicazioni.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Adamek, J., Rosicky, J.: Locally Presentable and Accessible Categories. London Mathematical Society Lecture Note Series. Cambridge University Press, Cambridge (1994)
Amato, G., Lipton, J., McGrail, R.: On the algebraic structure of declarative programming languages. Theor. Comp. Sci. 410(46), 4626–4671 (2009)
Barr, M.: Terminal coalgebras in well-founded set theory. Theor. Comp. Sci. 114(2), 299–315 (1993)
Bonchi, F., Montanari, U.: Reactive systems, (semi-)saturated semantics and coalgebras on presheaves. Theor. Comput. Sci. 410(41), 4044–4066 (2009). Festschrift for Mogens Nielsen’s 60th birthday
Bonchi, F., Zanasi, F.: Bialgebraic semantics for logic programming. Logical Methods Comput. Sci. 11(1), 1–47 (2015)
Bonsangue, M.M., Hansen, H.H., Kurz, A., Rot, J.: Presenting distributive laws. In: Heckel, R., Milius, S. (eds.) CALCO 2013. LNCS, vol. 8089, pp. 95–109. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40206-7_9
Bruni, R., Montanari, U., Rossi, F.: An interactive semantics of logic programming. Theory Pract. Logic Program. 1(6), 647–690 (2001)
Corradini, A., Asperti, A.: A categorical model for logic programs: indexed monoidal categories. In: de Bakker, J.W., de Roever, W.-P., Rozenberg, G. (eds.) REX 1992. LNCS, vol. 666, pp. 110–137. Springer, Heidelberg (1993). https://doi.org/10.1007/3-540-56596-5_31
Corradini, A., Heckel, R., Montanari, U.: From SOS specifications to structured coalgebras: how to make bisimulation a congruence. ENTCS 19, 118–141 (1999)
Corradini, A., Montanari, U.: An algebraic semantics for structured transition systems and its applications to logic programs. Theor. Comput. Sci. 103(1), 51–106 (1992)
de Simone, R.: Higher-level synchronising devices in meije-sccs. Theor. Comput. Sci. 37, 245–267 (1985)
Falaschi, M., Levi, G., Palamidessi, C., Martelli, M.: Declarative modeling of the operational behavior of logic languages. Theor. Comput. Sci. 69(3), 289–318 (1989)
Finkelstein, S.E., Freyd, P., Lipton, J.: Logic programming in tau categories. In: Pacholski, L., Tiuryn, J. (eds.) CSL 1994. LNCS, vol. 933, pp. 249–263. Springer, Heidelberg (1995). https://doi.org/10.1007/BFb0022261
Gray, J.: The category of sketches as a model for algebraic semantics. In: Categories in Computer Science and Logic. Contemporary Mathematics, vol. 92. AMS (1989)
Komendantskaya, E., Power, J.: Coalgebraic semantics for derivations in logic programming. In: Corradini, A., Klin, B., Cîrstea, C. (eds.) CALCO 2011. LNCS, vol. 6859, pp. 268–282. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-22944-2_19
Komendantskaya, E., Power, J.: Logic programming: laxness and saturation. J. Log. Algebr. Meth. Program. 101, 1–21 (2018)
Komendantskaya, E., Power, J., Schmidt, M.: Coalgebraic logic programming: from semantics to implementation. J. Log. Comput. 26(2), 745–783 (2016)
Kowalski, R.A.: Algorithm = logic + control. Comm. ACM 22(7), 424–436 (1979)
Lanese, I., Montanari, U.: Mapping fusion and synchronized hyperedge replacement into logic programming. Theory Pract. Logic Program. 7(1–2), 123–151 (2007)
Leifer, J.J., Milner, R.: Deriving bisimulation congruences for reactive systems. In: Palamidessi, C. (ed.) CONCUR 2000. LNCS, vol. 1877, pp. 243–258. Springer, Heidelberg (2000). https://doi.org/10.1007/3-540-44618-4_19
Levi, G., Palamidessi, C.: Contributions to the semantics of logic perpetual processes. Acta Inf. 25(6), 691–711 (1988)
Lloyd, J.W.: Foundations of Logic Programming, 2nd edn. Springer, Heidelberg (1987). https://doi.org/10.1007/978-3-642-83189-8
Montanari, U., Rossi, F.: Perfect relaxation in constraint logic programming. In: ICLP 1991, pp. 223–237. MIT Press (1991)
Montanari, U., Sammartino, M., Tcheukam, A.: Decomposition structures for soft constraint evaluation problems: an algebraic approach. In: Heckel, R., Taentzer, G. (eds.) Graph Transformation, Specifications, and Nets. LNCS, vol. 10800, pp. 179–200. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-75396-6_10
Turi, D., Plotkin, G.D.: Towards a mathematical operational semantics. In: LICS 1997, pp. 280–291. IEEE Computer Society (1997)
Acknowledgement
We thank Andrea Corradini who read a preliminary version of this paper and helped us to improve the presentation. We also thank the anonymous referees for their useful remarks and pointers to the literature.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Bruni, R., Montanari, U., Mossa, G. (2019). A Coalgebraic Approach to Unification Semantics of Logic Programming. In: Alvim, M., Chatzikokolakis, K., Olarte, C., Valencia, F. (eds) The Art of Modelling Computational Systems: A Journey from Logic and Concurrency to Security and Privacy. Lecture Notes in Computer Science(), vol 11760. Springer, Cham. https://doi.org/10.1007/978-3-030-31175-9_13
Download citation
DOI: https://doi.org/10.1007/978-3-030-31175-9_13
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-31174-2
Online ISBN: 978-3-030-31175-9
eBook Packages: Computer ScienceComputer Science (R0)