Formal Aspects of Computing

, Volume 29, Issue 1, pp 97–124 | Cite as

Constraint logic programming with a relational machine

  • Emilio Jesús Gallego Arias
  • James Lipton
  • Julio Mariño
Original Article
  • 54 Downloads

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.

Keywords

Logic programming Constraint programming Relation algebra Rewriting Semantics 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Supplementary material

165_2016_369_MOESM1_ESM.v (28 kb)
Supplementary material 1 (V 28.1 kb)

References

  1. ALM09.
    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)Google Scholar
  2. AM89.
    Asperti A, Martini S (1989) Projections instead of variables: a category theoretic interpretation of logic programs. In: ICLP, pp 337–352Google Scholar
  3. BL94.
    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–285Google Scholar
  4. BO93.
    Bellia M, Occhiuto ME (1993) C-expressions: a variable-free calculus for equational logic programming. Theor Comput Sci 107(2): 209–252MathSciNetCrossRefMATHGoogle Scholar
  5. Cla77.
    Clark KL (1977) Negation as failure. In: Gallaire H, Minker J (eds) Logic and data bases. Plenum Press, New York, pp 293–322Google Scholar
  6. CU04.
    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–283Google Scholar
  7. FFL03.
    Finkelstein SE, Freyd PJ, Lipton J (2003) A new framework for declarative programming. Theor Comput Sci 300(1–3): 91–160MathSciNetCrossRefMATHGoogle Scholar
  8. FS91.
    Freyd PJ, Scedrov A (1991) Categories, allegories. North Holland Publishing Company, AmsterdamMATHGoogle Scholar
  9. GAL12.
    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 InformatikGoogle Scholar
  10. GALMN11.
    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–820MathSciNetCrossRefMATHGoogle Scholar
  11. GALMn15.
    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–316Google Scholar
  12. HN98.
    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–158Google Scholar
  13. HNV98.
    Hamfelt A, Nilsson JF, Vitoria A (1998) A combinatory form of pure logic programs and its compositional semantics. Technical reportGoogle Scholar
  14. JM94.
    Jaffar J, Maher MJ (1994) Constraint logic programming: a survey. J Log Program, 19/20:503–581Google Scholar
  15. KP96.
    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–191Google Scholar
  16. KP11.
    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 InformatikGoogle Scholar
  17. LC98.
    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änchenGoogle Scholar
  18. Llo84.
    Lloyd JW (1984) Foundations of logic programming. Springer, New YorkCrossRefMATHGoogle Scholar
  19. MNPS91.
    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–157MathSciNetCrossRefMATHGoogle Scholar
  20. Nil90.
    Nilsson JF (1990) Combinatory logic programming. In: Procs. of the 2nd workshop on meta-programming in logic. K.U. Leuven, BelgiumGoogle Scholar
  21. PE88.
    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–208Google Scholar
  22. RB86.
    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–505Google Scholar
  23. TG87.
    Tarski A, Givant S (1987) A formalization of set theory without variables. In: Colloquium publications, vol 41. American Mathematical Society, ProvidenceGoogle Scholar
  24. UPG04.
    Urban C, Pitts AM, Gabbay MJ (2004) Nominal unification. Theor Comput Sci 323(1–3): 473–497MathSciNetCrossRefMATHGoogle Scholar

Copyright information

© British Computer Society 2016

Authors and Affiliations

  • Emilio Jesús Gallego Arias
    • 1
  • James Lipton
    • 2
  • Julio Mariño
    • 3
  1. 1.CRI, Mines ParisTechSeine-et-MarneFrance
  2. 2.Department of Mathematics and Computer ScienceMiddleTownUSA
  3. 3.ETSI InformáticosUniversidad Politécnica de MadridBoadilla del MonteSpain

Personalised recommendations