Abstract
We present a declarative framework for the compilation of constraint logic programs into variable-free relational theories which are then executed by rewriting. This translation provides an algebraic formulation of the abstract syntax of logic programs. Logic variables, unification, and renaming apart are completely elided in favor of manipulation of variable-free relation expressions. In this setting, term rewriting not only provides an operational semantics for logic programs, but also a simple framework for reasoning about program execution. We prove the translation sound, and the rewriting system complete with respect to traditional SLD semantics.
Similar content being viewed by others
References
Amato G, Lipton J, McGrail R (2009) On the algebraic structure of declarative programming languages. Theor Comput Sci 410(46):4626–4671. (Abstract of professor Giorgio Levi)
Asperti A, Martini S (1989) Projections instead of variables: a category theoretic interpretation of logic programs. In: ICLP, pp 337–352
Broome P, Lipton J (1994) Combinatory logic programming: computing in relation calculi. In: Proceedings of the 1994 international symposium on logic programming (ILPS’94). MIT Press, Cambridge, pp 269–285
Bellia M, Occhiuto ME (1993) C-expressions: a variable-free calculus for equational logic programming. Theor Comput Sci 107(2): 209–252
Clark KL (1977) Negation as failure. In: Gallaire H, Minker J (eds) Logic and data bases. Plenum Press, New York, pp 293–322
Cheney J, Urban C (2004) Alpha-Prolog: A logic programming language with names, binding and alpha-equivalence. In: Demoen B,Lifschitz V(eds) Proceedings of the 20th Conference on Logic Programming ICLP2004. Lecture Notes in Computer Science, vol 3132. Springer, New York, pp 269–283
Finkelstein SE, Freyd PJ, Lipton J (2003) A new framework for declarative programming. Theor Comput Sci 300(1–3): 91–160
Freyd PJ, Scedrov A (1991) Categories, allegories. North Holland Publishing Company, Amsterdam
Gallego Arias E, Lipton J (2012) Logic programming in tabular allegories. In: Dovier A, Santos Costa (eds) Technical communications of the 28th international conference on logic programming (ICLP’12), Budapest. LIPIcs, vol 17, pp 334–347. Schloss Dagstuhl—Leibniz-Zentrum fuer Informatik
Gallego Arias E, Lipton J, Mariño J, Nogueira P (2011) First-order unification using variable-free relational algebra. Log J IGPL 19(6): 790–820
Gallego Arias E, Lipton J, Mariño J (2015) Declarative compilation for constraint logic programming. In: Proietti M, Seki H (eds) Logic-based program synthesis and transformation. Lecture notes in computer science, vol 8981. Springer, New York, pp 299–316
Hamfelt A, Fischer Nilsson J (1998) Inductive synthesis of logic programs by composition of combinatory program schemes. In: Flener P (ed) 8th international workshop on logic-based program synthesis and transformation (LOPSTR’98). Lecture notes in computer science, vol 1559. Springer, New York, pp 143–158
Hamfelt A, Nilsson JF, Vitoria A (1998) A combinatory form of pure logic programs and its compositional semantics. Technical report
Jaffar J, Maher MJ (1994) Constraint logic programming: a survey. J Log Program, 19/20:503–581
Kinoshita Y, John Power A (1996) A fibrational semantics for logic programs. In: Dyckhoff R, Herre H, Schroeder-Heister P (eds) ELP. Lecture notes in computer science, vol 1050. Springer, New York, pp 177–191
Komendantskaya E, Power J (2011) Coalgebraic derivations in logic programming. In: Bezem M (ed) CSL. LIPIcs, vol 12, pp 352–366. Schloss Dagstuhl—Leibniz-Zentrum fuer Informatik
Lipton J, Chapman E (1998) Some notes on logic programming with a relational machine. In: Jaoua A, Kempf P, Schmidt G (eds) Using relational methods in computer science. Technical report Nr. 1998-03, pp 1–34. Fakultät fär Informatik, Universität der Bundeswehr Mänchen
Lloyd JW (1984) Foundations of logic programming. Springer, New York
Miller D, Nadathur G, Pfenning F, Scedrov A (1991) Uniform proofs as a foundation for logic programming. Ann Pure Appl Log 51(1–2): 125–157
Nilsson JF (1990) Combinatory logic programming. In: Procs. of the 2nd workshop on meta-programming in logic. K.U. Leuven, Belgium
Pfenning F, Elliot C (1988) Higher-order abstract syntax. In: Proceedings of the ACM SIGPLAN 1988 conference on programming language design and implementation (PLDI’88). ACM, New York, pp 199–208
Rydeheard DE, Burstall RM (1986) A categorical unification algorithm. In: Proceedings of a tutorial and workshop on category theory and computer programming. Springer, New York, pp 493–505
Tarski A, Givant S (1987) A formalization of set theory without variables. In: Colloquium publications, vol 41. American Mathematical Society, Providence
Urban C, Pitts AM, Gabbay MJ (2004) Nominal unification. Theor Comput Sci 323(1–3): 473–497
Author information
Authors and Affiliations
Corresponding author
Additional information
Maurizio Proietti, Hirohisa Seki, and Jim Woodcock
Electronic Supplementary Material
The Below is the Electronic Supplementary Material.
Rights and permissions
About this article
Cite this article
Gallego Arias, E.J., Lipton, J. & Mariño, J. Constraint logic programming with a relational machine. Form Asp Comp 29, 97–124 (2017). https://doi.org/10.1007/s00165-016-0369-z
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00165-016-0369-z