Skip to main content

Relational Models for Tabling Logic Programs in a Database

  • Conference paper
Applications of Declarative Programming and Knowledge Management (INAP 2007, WLP 2007)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Michie, D.: Memo Functions and Machine Learning. Nature 218, 19–22 (1968)

    Article  Google Scholar 

  2. Tamaki, H., Sato, T.: OLDT Resolution with Tabulation. In: Shapiro, E. (ed.) ICLP 1986. LNCS, vol. 225, pp. 84–98. Springer, Heidelberg (1986)

    Chapter  Google Scholar 

  3. Chen, W., Warren, D.S.: Tabled Evaluation with Delaying for General Logic Programs. Journal of the ACM 43, 20–74 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  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)

    Article  MATH  Google Scholar 

  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. 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)

    Chapter  Google Scholar 

  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. Fredkin, E.: Trie Memory. Communications of the ACM 3, 490–499 (1962)

    Article  Google Scholar 

  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)

    Chapter  Google Scholar 

  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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Costa, P., Rocha, R., Ferreira, M. (2009). Relational Models for Tabling Logic Programs in a Database. In: Seipel, D., Hanus, M., Wolf, A. (eds) Applications of Declarative Programming and Knowledge Management. INAP WLP 2007 2007. Lecture Notes in Computer Science(), vol 5437. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-00675-3_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-00675-3_7

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-00674-6

  • Online ISBN: 978-3-642-00675-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics