Skip to main content Accesibility Help
×
×
Home

Tabling as a library with delimited control

  • BENOIT DESOUTER (a1), MARKO VAN DOOREN (a1) and TOM SCHRIJVERS (a2)
Abstract

Tabling is probably the most widely studied extension of Prolog. But despite its importance and practicality, tabling is not implemented by most Prolog systems. Existing approaches require substantial changes to the Prolog engine, which is an investment out of reach of most systems. To enable more widespread adoption, we present a new implementation of tabling in under 600 lines of Prolog code. Our lightweight approach relies on delimited control and provides reasonable performance.

    • Send article to Kindle

      To send this article to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about sending to your Kindle. Find out more about sending to your Kindle.

      Note you can select to send to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be sent to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

      Find out more about the Kindle Personal Document Service.

      Tabling as a library with delimited control
      Available formats
      ×
      Send article to Dropbox

      To send this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Dropbox.

      Tabling as a library with delimited control
      Available formats
      ×
      Send article to Google Drive

      To send this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Google Drive.

      Tabling as a library with delimited control
      Available formats
      ×
Copyright
References
Hide All
Ceri, S., Gottlob, G. and Tanca, L. 1989. What you always wanted to know about Datalog (and never dared to ask). IEEE Trans. on Knowl. and Data Eng. 1, 1, 146166.
Chen, W. and Warren, D. S. 1996. Tabled evaluation with delaying for general logic programs. J. ACM 43, 1, 2074.
Danvy, O. and Filinski, A. 1990. Abstracting control. In Proceedings of the 1990 ACM conference on LISP and functional programming. LFP '90. ACM, 151–160.
de Guzmán, P. C., Carro, M., Hermenegildo, M. V., Silva, C. and Rocha, R. 2008. An improved continuation call-based implementation of tabling. In Practical Aspects of Declarative Languages, 10th International Symposium. Lecture Notes in Computer Science, vol. 4902. Springer, 197213.
Demoen, B. and Sagonas, K. 1998a. Cat: The copying approach to tabling. In Principles of Declarative Programming, Palamidessi, C., Glaser, H., and Meinke, K., Eds. Lecture Notes in Computer Science, vol. 1490. Springer Berlin Heidelberg, 2135.
Demoen, B. and Sagonas, K. 1998b. Chat: The copy-hybrid approach to tabling. In Practical Aspects of Declarative Languages, Gupta, G., Ed. Lecture Notes in Computer Science, vol. 1551. Springer Berlin Heidelberg, 106121.
Fan, C. and Dietrich, S. W. 1992. Extension table built-ins for Prolog. Software: Practice and Experience 22, 7, 573597.
Felleisen, M. 1988. The theory and practice of first-class prompts. In Proceedings of the 15th ACM SIGPLAN-SIGACT symposium on Principles of programming languages. POPL '88. ACM, 180–190.
Guo, H. and Gupta, G. 2008. Simplifying dynamic programming via mode-directed tabling. Softw., Pract. Exper. 38, 1, 7594.
Guo, H.-F. and Gupta, G. 2001. A simple scheme for implementing tabled logic programming systems based on dynamic reordering of alternatives. In Proceedings of ICLP'01. Springer, 181–196.
Guo, H.-F. and Gupta, G. 2004. An efficient and flexible engine for computing fixed points. CoRR abs/cs/0412041.
Hermenegildo, M. V., Bueno, F., Carro, M., Lípez-García, P., Mera, E., Morales, J. F. and Puebla, G. 2012. An overview of Ciao and its design philosophy. Theory Pract. Log. Program. 12, 1–2 (Jan.), 219252.
Plotkin, G. D. and Pretnar, M. 2013. Handling algebraic effects. Logical Methods in Computer Science 9, 4.
Raimundo, J. and Rocha, R. 2011. Global trie for subterms. Online Proceedings of the 11th International Colloquium on Implementation of Constraint Logic Programming Systems (CICLOPS 2011).
Ramesh, R. and Chen, W. 1994. A portable method for integrating SLG resolution into Prolog systems. In Proceedings of the 1994 International Symposium on Logic Programming. ILPS '94. MIT Press, Cambridge, MA, USA, 618632.
Rocha, R., Silva, F. and Santos Costa, V. 2000. YapTab: A tabling engine designed to support parallelism. In Conference on Tabulation in Parsing and Deduction. 77–87.
Santos, J. and Rocha, R. 2013. On the efficient implementation of mode-directed tabling. In Practical Aspects of Declarative Languages - 15th International Symposium, PADL 2013. Lecture Notes in Computer Science, vol. 7752. Springer, 141156.
Santos Costa, V., Rocha, R. and Damas, L. 2012. The YAP Prolog system. TPLP 12, 1–2, 534.
Schrijvers, T., Demoen, B. and Desouter, B. 2013. Delimited continuations in Prolog: Semantics, use and implementation in the WAM. Report CW 631, Dept. of Computer Science, KU Leuven.
Schrijvers, T., Demoen, B., Desouter, B. and Wielemaker, J. 2013. Delimited continuations for Prolog. Theory and Practice of Logic Programming (TPLP). Proceedings of the International Conference on Logic Programming (ICLP).
Swift, T. and Warren, D. S. 2012. XSB: Extending Prolog with tabled logic programming. Theory Pract. Log. Program. 12, 1–2 (Jan.), 157187.
Tarau, P. 2012. The BinProlog experience: Architecture and implementation choices for continuation passing Prolog and first-class logic engines. TPLP 12, 1–2, 97126.
Tarau, P. and Dahl, V. 1994. Logic programming and logic grammars with first-order continuations. In LOPSTR '94. Vol. 883.
Zhou, N. 2012. The language features and architecture of B-Prolog. TPLP 12, 1–2, 189218.
Zhou, N.-F., Shen, Y.-D., Yuan, L.-Y. and You, J.-H. 2000. Implementation of a linear tabling mechanism. In Practical Aspects of Declarative Languages, Pontelli, E. and Santos Costa, V., Eds. Lecture Notes in Computer Science, vol. 1753. Springer Berlin Heidelberg, 109123.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Theory and Practice of Logic Programming
  • ISSN: 1471-0684
  • EISSN: 1475-3081
  • URL: /core/journals/theory-and-practice-of-logic-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
×

Keywords

Type Description Title
PDF
Supplementary materials

Desouter supplementary material
Online Appendix

 PDF (149 KB)
149 KB

Metrics

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed