A General Implementation Framework for Tabled CLP

  • Pablo Chico de Guzmán
  • Manuel Carro
  • Manuel V. Hermenegildo
  • Peter Stuckey
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7294)


This paper describes a framework to combine tabling evaluation and constraint logic programming (TCLP). While this combination has been studied previously from a theoretical point of view and some implementations exist, they either suffer from a lack of efficiency, flexibility, or generality, or have inherent limitations with respect to the programs they can execute to completion (either with success or failure). Our framework addresses these issues directly, including the ability to check for answer / call entailment, which allows it to terminate in more cases than other approaches. The proposed framework is experimentally compared with existing solutions in order to provide evidence of the mentioned advantages.


Constraint Logic Programming Tabling Implementation Performance 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Tamaki, H., Sato, M.: OLD Resolution with Tabulation. In: Shapiro, E. (ed.) ICLP 1986. LNCS, vol. 225, pp. 84–98. Springer, Heidelberg (1986)CrossRefGoogle Scholar
  2. 2.
    Warren, D.S.: Memoing for Logic Programs. CACM 35(3), 93–111 (1992)Google Scholar
  3. 3.
    Sagonas, K., Swift, T.: An Abstract Machine for Tabled Execution of Fixed-Order Stratified Logic Programs. ACM TOPLAS 20(3), 586–634 (1998)CrossRefGoogle Scholar
  4. 4.
    Jaffar, J., Maher, M.: Constraint LP: A Survey. JLP 19/20, 503–581 (1994)MathSciNetCrossRefGoogle Scholar
  5. 5.
    Kanellakis, P.C., Kuper, G.M., Revesz, P.Z.: Constraint Query Languages. J. Comput. Syst. Sci. 51(1), 26–52 (1995)MathSciNetCrossRefGoogle Scholar
  6. 6.
    Toman, D.: Memoing Evaluation for Constraint Extensions of Datalog. Constraints 2(3/4), 337–359 (1997)MathSciNetzbMATHCrossRefGoogle Scholar
  7. 7.
    Alur, R., Dill, D.L.: A Theory of Timed Automata. TCS 126, 183–235 (1994)MathSciNetzbMATHCrossRefGoogle Scholar
  8. 8.
    Bengtsson, J., Yi, W.: Timed Automata: Semantics, Algorithms and Tools. In: Desel, J., Reisig, W., Rozenberg, G. (eds.) ACPN 2003. LNCS, vol. 3098, pp. 87–124. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  9. 9.
    Hermenegildo, M., Puebla, G., Marriott, K., Stuckey, P.: Incremental Analysis of Constraint Logic Programs. ACM TOPLAS 22(2), 187–223 (2000)CrossRefGoogle Scholar
  10. 10.
    Toman, D.: Constraint Databases and Program Analysis Using Abstract Interpretation. In: Gaede, V., Vianu, V., Brodsky, A., Srivastava, D., Günther, O., Wallace, M. (eds.) CP-WS 1996 and CDB 1997. LNCS, vol. 1191, pp. 246–262. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  11. 11.
    Miné, A.: The Octagon Abstract Domain. HOSC 19(1), 31–100 (2006)zbMATHGoogle Scholar
  12. 12.
    Codognet, P.: A Tabulation Method for Constraint Logic Programming. In: INAP 1995, Tokyo, Japan (October 1995)Google Scholar
  13. 13.
    Frigioni, D., Marchetti-Spaccamela, A., Nanni, U.: Fully Dynamic Shortest Paths and Negative Cycles Detection on Digraphs with Arbitrary Arc Weights. In: Bilardi, G., Pietracaprina, A., Italiano, G.F., Pucci, G. (eds.) ESA 1998. LNCS, vol. 1461, pp. 320–331. Springer, Heidelberg (1998)Google Scholar
  14. 14.
    Chico de Guzmán, P., Carro, M., Warren, D.S.: Swapping Evaluation: A Memory-Scalable Solution for Answer-On-Demand Tabling. TPLP 10(4-6), 401–416 (2010)Google Scholar
  15. 15.
    Ramakrishnan, I., Rao, P., Sagonas, K., Swift, T., Warren, D.: Efficient Tabling Mechanisms for Logic Programs. In: ICLP, pp. 697–711 (1995)Google Scholar
  16. 16.
    Demoen, B., Sagonas, K.: CHAT: the copy-hybrid approach to tabling. Future Generation Computer Systems 16, 809–830 (2000)CrossRefGoogle Scholar
  17. 17.
    Rao, P., Ramakrishnan, C.R., Ramakrishnan, I.: A Thread in Time Saves Tabling Time. In: JICSLP. MIT Press (1996)Google Scholar
  18. 18.
    Holzbaur, C.: Metastructures vs. Attributed Variables in the Context of Extensible Unification. In: Bruynooghe, M., Wirsing, M. (eds.) PLILP 1992. LNCS, vol. 631, pp. 260–268. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  19. 19.
    Cruz, F., Rocha, R.: Retroactive Subsumption-Based Tabled Evaluation of Logic Programs. In: Janhunen, T., Niemelä, I. (eds.) JELIA 2010. LNCS, vol. 6341, pp. 130–142. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  20. 20.
    Schulte, C.: Comparing trailing and copying for constraint programming. In: International Conference on Logic Programming, pp. 275–289 (1999)Google Scholar
  21. 21.
    David, A.: Merging DBMs Efficiently. In: 17th Nordic Workshop on Programming Theory, NWPT 2005, pp. 54–56. DIKU, University of Copenhagen (2005)Google Scholar
  22. 22.
    Schrijvers, T., Demoen, B., Warren, D.S.: TCHR: a Framework for Tabled CLP. TPLP 8(4), 491–526 (2008)MathSciNetzbMATHGoogle Scholar
  23. 23.
    Larsen, K.G., Pettersson, P., Yi, W.: UPPAAL in a Nutshell. STTT 1 (1997)Google Scholar
  24. 24.
    Sagonas, K., Swift, T., Warren, D.: The XSB Programming System. In: ILPS - PLD, Number TR #1183, p. 164. U. of Wisconsin (October 1993)Google Scholar
  25. 25.
    Cui, B., Warren, D.S.: A System for Tabled Constraint Logic Programming. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 478–492. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  26. 26.
    Hermenegildo, M.V., Bueno, F., Carro, M., López, P., Mera, E., Morales, J., Puebla, G.: An Overview of Ciao and its Design Philosophy. TPLP 12(1-2), 219–252 (2012), Google Scholar
  27. 27.
    Pemmasani, G., Ramakrishnan, C.R., Ramakrishnan, I.V.: Efficient Real-Time Model Checking Using Tabled Logic Programming and Constraints. In: Stuckey, P.J. (ed.) ICLP 2002. LNCS, vol. 2401, pp. 100–114. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  28. 28.
    Du, X., Ramakrishnan, C.R., Smolka, S.A.: Tabled Resolution + Constraints: A Recipe for Model Checking Real-Time Systems. In: IEEE Real-Time Systems Symposium, pp. 175–184. IEEE Computer Society (2000)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Pablo Chico de Guzmán
    • 1
  • Manuel Carro
    • 1
    • 2
  • Manuel V. Hermenegildo
    • 1
    • 2
  • Peter Stuckey
    • 3
    • 4
  1. 1.IMDEA Software InstituteSpain
  2. 2.School of Computer ScienceUniv. Politécnica de MadridSpain
  3. 3.NICTA Victoria Research LaboratoryAustralia
  4. 4.Department of Computing and Information SystemsUniversity of MelbourneAustralia

Personalised recommendations