Advertisement

A Term-Based Global Trie for Tabled Logic Programs

  • Jorge Costa
  • João Raimundo
  • Ricardo Rocha
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5649)

Abstract

A critical component in the implementation of an efficient tabling system is the design of the data structures and algorithms to access and manipulate tabled data. Arguably, the most successful data structure for tabling is tries. However, when used in applications that pose many queries and/or have a large number of answers, tabling can build arbitrarily many and/or very large tables, quickly filling up memory. In this paper, we propose a new design for the table space organization where all terms in tabled subgoal calls and tabled answers are represented only once in a common global trie instead of being spread over several different trie data structures. Our initial experiments using the YapTab tabling system show significant reductions on memory usage without compromising running time.

Keywords

Tabling Logic Programming Table Space Implementation 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Sagonas, K., Swift, T.: An Abstract Machine for Tabled Execution of Fixed-Order Stratified Logic Programs. ACM Transactions on Programming Languages and Systems 20(3), 586–634 (1998)CrossRefGoogle Scholar
  2. 2.
    Ramakrishnan, I.V., Rao, P., Sagonas, K., Swift, T., Warren, D.S.: Efficient Access Mechanisms for Tabled Logic Programs. Journal of Logic Programming 38(1), 31–54 (1999)CrossRefzbMATHGoogle Scholar
  3. 3.
    Rocha, R., Fonseca, N.A., Santos Costa, V.: On Applying Tabling to Inductive Logic Programming. In: Gama, J., Camacho, R., Brazdil, P.B., Jorge, A.M., Torgo, L. (eds.) ECML 2005. LNCS (LNAI), vol. 3720, pp. 707–714. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  4. 4.
    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
  5. 5.
    Costa, P., Rocha, R., Ferreira, M.: Relational Models for Tabling Logic Programs in a Database. In: Seipel, D., Hanus, M., Wolf, A. (eds.) INAP and WLP 2007. LNCS (LNAI), vol. 5437, pp. 99–116. Springer, Heidelberg (2009)Google Scholar
  6. 6.
    Goto, E.: Monocopy and Associative Algorithms in Extended Lisp. Technical Report TR 74-03, University of Tokyo (1974)Google Scholar
  7. 7.
    Rocha, R., Silva, F., Santos Costa, V.: On applying or-parallelism and tabling to logic programs. Theory and Practice of Logic Programming 5(1-2), 161–205 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    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
  9. 9.
    Costa, J., Rocha, R.: One Table Fits All. In: Gill, A. (ed.) PADL 2009. LNCS, vol. 5418, pp. 195–208. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  10. 10.
    Fonseca, N.A., Silva, F., Camacho, R.: April - An Inductive Logic Programming System. In: Fisher, M., van der Hoek, W., Konev, B., Lisitsa, A. (eds.) JELIA 2006. LNCS (LNAI), vol. 4160, pp. 481–484. Springer, Heidelberg (2006)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Jorge Costa
    • 1
  • João Raimundo
    • 1
  • Ricardo Rocha
    • 1
  1. 1.DCC-FC & CRACSUniversity of PortoPortugal

Personalised recommendations