Efficient Tabling of Structured Data Using Indexing and Program Transformation

  • Christian Theil Have
  • Henning Christiansen
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7149)

Abstract

Tabling of structured data is important to support dynamic programming in logic programs. Several existing tabling systems for Prolog do not efficiently deal with structured data, but duplicate part of the structured data in different instances of tabled goals. As a consequence, time and space complexity may often be significantly higher than the theoretically optimal. A simple program transformation is proposed which uses an indexing of structured data that eliminates this problem, and drastic improvements of time and space complexity can be demonstrated. The technique is demonstrated for dynamic programming examples expressed in Prolog and in PRISM.

Keywords

Hide Markov Model Logic Program Space Complexity Edit Distance Probabilistic Inference 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Bellman, R.: Dynamic Programming. Princeton University Press (1957)Google Scholar
  2. 2.
    Christiansen, H., Gallagher, J.P.: Non-discriminating Arguments and Their Uses. In: Hill, P.M., Warren, D.S. (eds.) ICLP 2009. LNCS, vol. 5649, pp. 55–69. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  3. 3.
    Christiansen, H., Have, C.T., Lassen, O.T., Petit, M.: Taming the zoo of discrete HMM subspecies & some of their relatives. In: Biology, Computation and Linguistics, New Interdisciplinary Paradigms. Frontiers in Artificial Intelligence and Applications, vol. 228, pp. 28–42. IOS Press (2011)Google Scholar
  4. 4.
    Henderson, F., Conway, T., Somogyi, Z., Jeffery, D., Schachte, P., Taylor, S., Speirs, C., Dowd, T., Becket, R., Brown, M., Wang, P.: The Mercury Language Reference Manual. Version 11.01 (2011), http://www.mercury.cs.mu.oz.au/information/documentation.html
  5. 5.
    Rabiner, L.R.: A tutorial on Hidden Markov Models and selected applications in speech recognition. Proceedings of the IEEE 77(2), 257–286 (1989)CrossRefGoogle Scholar
  6. 6.
    Raimundo, J., Rocha, R.: Global Trie for Subterms. In: Abreu, S., Costa, V.S. (eds.) Proceedings of the 11th Colloquium on Implementation of Constraint and Logic Programming Systems, CICLOPS 2011, Lexington, Kentucky, USA, pp. 34–48 (July 2011)Google Scholar
  7. 7.
    Rocha, R., Silva, F., Costa, V.S.: A tabling engine for the Yap Prolog system. In: Proceedings of the 2000 APPIA-GULP-PRODE Joint Conference on Declarative Programming (AGP 2000), La Habana, Cuba (December 2000)Google Scholar
  8. 8.
    Sato, T., Kameya, Y.: PRISM: A language for symbolic-statistical modeling. In: IJCAI, pp. 1330–1339 (1997)Google Scholar
  9. 9.
    Sato, T., Kameya, Y.: New advances in logic-based probabilistic modeling (2007)Google Scholar
  10. 10.
    Sato, T., Zhou, N.-F., Kameya, Y., Izumi, Y.: PRISM User’s Manual, Version 2.0 (2010)Google Scholar
  11. 11.
    Somogyi, Z., Sagonas, K.F.: Tabling in Mercury: Design and Implementation. In: Van Hentenryck, P. (ed.) PADL 2006. LNCS, vol. 3819, pp. 150–167. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  12. 12.
    Swift, T.: Design Patterns for Tabled Logic Programming. In: Abreu, S., Seipel, D. (eds.) INAP 2009. LNCS, vol. 6547, pp. 1–19. Springer, Heidelberg (2011)Google Scholar
  13. 13.
    Swift, T., Warren, D.S.: XSB: Extending prolog with tabled logic programming. Theory and Practice of Logic Programming (to appear, 2011)Google Scholar
  14. 14.
    Swift, T., Warren, D.S.: The XSB Programmer’s Manual. Version 3.3 (June 2011)Google Scholar
  15. 15.
    Tamaki, H., Sato, T.: OLD Resolution with Tabulation. In: Shapiro, E. (ed.) ICLP 1986. LNCS, vol. 225, pp. 84–98. Springer, Heidelberg (1986)CrossRefGoogle Scholar
  16. 16.
    Wong, C.K., Chandra, A.K.: Bounds for the string editing problem. J. ACM 23(1), 13–16 (1976)MathSciNetCrossRefMATHGoogle Scholar
  17. 17.
    Zhou, N.-F.: The language features and architecture of B-Prolog. Theory and Practice of Logic Programming (to appear, 2011)Google Scholar
  18. 18.
    Zhou, N.-F., Shen, Y.-D., Yuan, L.-Y., You, J.-H.: Implementation of a Linear Tabling Mechanism. In: Pontelli, E., Santos Costa, V. (eds.) PADL 2000. LNCS, vol. 1753, pp. 109–123. Springer, Heidelberg (2000)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Christian Theil Have
    • 1
  • Henning Christiansen
    • 1
  1. 1.Research group PLIS: Programming, Logic and Intelligent Systems, Department of Communication, Business and Information TechnologiesRoskilde UniversityRoskildeDenmark

Personalised recommendations