Skip to main content Accessibility help
×
Home
Hostname: page-component-79b67bcb76-x7pwn Total loading time: 0.41 Render date: 2021-05-14T14:01:50.516Z Has data issue: true Feature Flags: { "shouldUseShareProductTool": true, "shouldUseHypothesis": true, "isUnsiloEnabled": true, "metricsAbstractViews": false, "figures": false, "newCiteModal": false, "newCitedByModal": true, "newEcommerce": true }

Top-down and Bottom-up Evaluation Procedurally Integrated

Published online by Cambridge University Press:  10 August 2018

DAVID S. WARREN
Affiliation:
Stony Brook University, Stony Brook, NY, 11794-4400USA (e-mail: warren@cs.stonybrook.edu) XSB Inc., Setauket, NY, 11733USA (e-mail: warren@xsb.com)
Corresponding
Rights & Permissions[Opens in a new window]

Abstract

This paper describes how the Logic Programming System XSB combines top-down and bottom-up computation through the mechanisms of variant tabling and subsumptive tabling with abstraction, respectively.

It is well known that top-down evaluation of logical rules in Prolog has a procedural interpretation as recursive procedure invocation (Kowalski 1986). Tabling adds the intuition of short-circuiting redundant computations (Warren 1992). This paper shows how to introduce into tabled logic program evaluation a bottom-up component, whose procedural intuition is the initialization of a data structure, in which a relation is initially computed and filled, on first demand, and then used throughout the remainder of a larger computation for efficient lookup. This allows many Prolog programs to be expressed fully declaratively, programs which formerly required procedural features, such as assert, to be made efficient.

Type
Original Article
Copyright
Copyright © Cambridge University Press 2018 

References

Aref, M., ten Cate, B., Green, T. J., Kimelfeld, B., Olteanu, D., Pasalic, E., Veldhuizen, T. L., and Washburn, G. 2015. Design and implementation of the logicblox system. In Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data. SIGMOD '15. ACM, New York, NY, USA, 13711382.Google Scholar
Arni, F., Ong, K., Tsur, S., Wang, H., and Zaniolo, C. 2003. The deductive database system L++. Theory and Practice of Logic Programming 3, 1 (Jan.), 6194.CrossRefGoogle Scholar
Bry, F. 1990. Query evaluation in deductive databases: Bottom-up and top-down reconciled. Data Knowledge Engineering 5, 289312.CrossRefGoogle Scholar
Cruz, F. and Rocha, R. 2011. Efficient instance retrieval of subgoals for subsumptive tabled evaluation of logic programs. CoRR abs/1107.5556.Google Scholar
Dowling, W. F. and Gallier, J. H. 1984. Linear-time algorithms for testing the satisfiability of propositional horn formulae. J. Log. Program. 1, 267284.CrossRefGoogle Scholar
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. TPLP 12, 1–2, 219252.Google Scholar
Johnson, E. 2000. Interfacing a tabled-wam engine to a tabling subsystem supporting both variant and subsumption checks. In 2nd Workshop on Tabulation in Parsing and Deduction. Vigo, Spain.Google Scholar
Johnson, E. 2002. A system supporting both variant- and subsumption-based tabled evaluations of logic programs. Ph.D. thesis, Stony Brook University, Stony Brook, NY, 11794-4400.Google Scholar
Johnson, E., Ramakrishnan, C. R., Ramakrishnan, I. V., and Rao, P. 1999. A space efficient engine for subsumption-based tabled evaluation of logic programs. In Functional and Logic Programming: 4th Fuji International Symposium, FLOPS'99 Tsukuba, Japan, November 11-13, 1999 Proceedings, Middeldorp, A. and Sato, T., Eds. Springer Berlin Heidelberg, Berlin, Heidelberg, 284299.CrossRefGoogle Scholar
Kowalski, R. 1986. Logic for Problem-solving. North-Holland Publishing Co., Amsterdam, The Netherlands, The Netherlands.Google Scholar
Lloyd, J. W. 1993. Foundations of Logic Programming, 2nd ed. Springer-Verlag New York, Inc., Secaucus, NJ, USA.Google Scholar
Ramakrishnan, I. V., Rao, P., Sagonas, K., Swift, T., and Warren, D. S. 1999. Efficient access mechanisms for tabled logic programs. Journal of Logic Programming 38, 1 (Jan), 3154.CrossRefGoogle Scholar
Ramakrishnan, R., Srivastava, D., Sudarshan, S., and Seshadri, P. 1994. The CORAL deductive system. VLDB J. 3, 2, 161210.CrossRefGoogle Scholar
Santos Costa, V., Rocha, R., and Damas, L. 2012. The YAP prolog system. TPLP 12, 1–2, 534.Google Scholar
Swift, T. and Warren, D. S. 2012. XSB: Extending Prolog with tabled logic programming. The Theory and Practice of Logic Programming 12, 1–2 (January), 157187. (http://journals.cambridge.org/repo_A84WadE7).CrossRefGoogle Scholar
Tekle, K. T. and Liu, Y. A. 2011. More efficient datalog queries: Subsumptive tabling beats magic sets. In Proceedings of the 2011 ACM SIGMOD International Conference on Management of Data. SIGMOD '11. ACM, New York, NY, USA, 661672.CrossRefGoogle Scholar
Toman, D. 1995. Top-down beats bottom-up for constraint extensions of datalog. In In Proc. Intl. Logic Programming Symposium. MIT Press, 98114.Google Scholar
Ullman, J. D. 1989. Bottom-up beats top-down for datalog. In Proceedings of the Eighth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems. PODS '89. ACM, New York, NY, USA, 140149.CrossRefGoogle Scholar
Warren, D. S. 1992. Memoing for logic programs. CACM 35, 3 (Mar), 93111.CrossRefGoogle Scholar
Warren, D. S., Swift, T., and Sagonas, K. F. 2007. The XSB programmer's manual. Tech. rep., Department of Computer Science, State University of New York at Stony Brook, Stony Brook, New York, 11794-4400. Mar. The XSB System, current version 3.8.0, Nov 2017, is available from xsb.sourceforge.net, and the system and manual are continually updated.Google Scholar
Weilemaker, J., Frehwirth, T. and de Koninck, L. 2017. SWI-Prolog reference manual. Tech. rep. Tabling library available at http://www.swi-prolog.org/pldoc/man?section=tabling.Google Scholar
Zhou, N. 2012. The language features and architecture of B-Prolog. TPLP 12, 1–2, 189218.Google Scholar
You have Access

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.

Top-down and Bottom-up Evaluation Procedurally Integrated
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.

Top-down and Bottom-up Evaluation Procedurally Integrated
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.

Top-down and Bottom-up Evaluation Procedurally Integrated
Available formats
×
×

Reply to: Submit a response


Your details


Conflicting interests

Do you have any conflicting interests? *