Relational Models for Tabling Logic Programs in a Database

  • Pedro Costa
  • Ricardo Rocha
  • Michel Ferreira
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5437)

Abstract

Resolution strategies based on tabling are considered to be particularly effective in Logic Programming. Unfortunately, when faced with applications that compute large and/or many answers, memory exhaustion is a potential problem. In such cases, table deletion is the most common approach to recover space. In this work, we propose a different approach, storing tables into a relational database. Subsequent calls to stored tables import answers from the database, rather than performing a complete re-computation. To validate this approach, we have extended the YapTab tabling system, providing engine support for exporting and importing tables to and from the MySQL RDBMS. Three different relational models for data storage and two recordset retrieval strategies are compared.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Michie, D.: Memo Functions and Machine Learning. Nature 218, 19–22 (1968)CrossRefGoogle Scholar
  2. 2.
    Tamaki, H., Sato, T.: OLDT Resolution with Tabulation. In: Shapiro, E. (ed.) ICLP 1986. LNCS, vol. 225, pp. 84–98. Springer, Heidelberg (1986)CrossRefGoogle Scholar
  3. 3.
    Chen, W., Warren, D.S.: Tabled Evaluation with Delaying for General Logic Programs. Journal of the ACM 43, 20–74 (1996)MathSciNetMATHCrossRefGoogle Scholar
  4. 4.
    Ramakrishnan, I.V., Rao, P., Sagonas, K., Swift, T., Warren, D.S.: Efficient Access Mechanisms for Tabled Logic Programs. Journal of Logic Programming 38, 31–54 (1999)MATHCrossRefGoogle Scholar
  5. 5.
    Rocha, R., Silva, F., Santos Costa, V.: YapTab: A Tabling Engine Designed to Support Parallelism. In: Conference on Tabulation in Parsing and Deduction, pp. 77–87 (2000)Google Scholar
  6. 6.
    Rocha, R.: On Improving the Efficiency and Robustness of Table Storage Mechanisms for Tabled Evaluation. In: Hanus, M. (ed.) PADL 2007. LNCS, vol. 4354, pp. 155–169. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  7. 7.
    Costa, P., Rocha, R., Ferreira, M.: DBTAB: a Relational Storage Model for the YapTab Tabling System. In: Colloquium on Implementation of Constraint and LOgic Programming Systems, pp. 95–109 (2006)Google Scholar
  8. 8.
    Fredkin, E.: Trie Memory. Communications of the ACM 3, 490–499 (1962)CrossRefGoogle Scholar
  9. 9.
    Bachmair, L., Chen, T., Ramakrishnan, I.V.: Associative Commutative Discrimination Nets. In: Gaudel, M.-C., Jouannaud, J.-P. (eds.) CAAP 1993, FASE 1993, and TAPSOFT 1993. LNCS, vol. 668, pp. 61–74. Springer, Heidelberg (1993)CrossRefGoogle Scholar
  10. 10.
    Soares, T., Ferreira, M., Rocha, R.: The MYDDAS Programmer’s Manual. Technical Report DCC-2005-10, Department of Computer Science, University of Porto (2005)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Pedro Costa
    • 1
  • Ricardo Rocha
    • 2
  • Michel Ferreira
    • 1
  1. 1.DCC-FC & LIACCUniversity of PortoPortugal
  2. 2.DCC-FC & CRACSUniversity of PortoPortugal

Personalised recommendations