Skip to main content

Efficient Tabling of Structured Data Using Indexing and Program Transformation

  • Conference paper
Practical Aspects of Declarative Languages (PADL 2012)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7149))

Included in the following conference series:

  • 541 Accesses

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.

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. Bellman, R.: Dynamic Programming. Princeton University Press (1957)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  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. 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. Rabiner, L.R.: A tutorial on Hidden Markov Models and selected applications in speech recognition. Proceedings of the IEEE 77(2), 257–286 (1989)

    Article  Google Scholar 

  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. 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. Sato, T., Kameya, Y.: PRISM: A language for symbolic-statistical modeling. In: IJCAI, pp. 1330–1339 (1997)

    Google Scholar 

  9. Sato, T., Kameya, Y.: New advances in logic-based probabilistic modeling (2007)

    Google Scholar 

  10. Sato, T., Zhou, N.-F., Kameya, Y., Izumi, Y.: PRISM User’s Manual, Version 2.0 (2010)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  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. Swift, T., Warren, D.S.: XSB: Extending prolog with tabled logic programming. Theory and Practice of Logic Programming (to appear, 2011)

    Google Scholar 

  14. Swift, T., Warren, D.S.: The XSB Programmer’s Manual. Version 3.3 (June 2011)

    Google Scholar 

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

    Chapter  Google Scholar 

  16. Wong, C.K., Chandra, A.K.: Bounds for the string editing problem. J. ACM 23(1), 13–16 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  17. Zhou, N.-F.: The language features and architecture of B-Prolog. Theory and Practice of Logic Programming (to appear, 2011)

    Google Scholar 

  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)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Theil Have, C., Christiansen, H. (2012). Efficient Tabling of Structured Data Using Indexing and Program Transformation. In: Russo, C., Zhou, NF. (eds) Practical Aspects of Declarative Languages. PADL 2012. Lecture Notes in Computer Science, vol 7149. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-27694-1_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-27694-1_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-27693-4

  • Online ISBN: 978-3-642-27694-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics