Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Prolog
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Tabling === {{main|Tabled logic programming}} Some Prolog systems, ([[B-Prolog]], [[XSB]], [[SWI-Prolog]], [[YAP (Prolog)|YAP]], and [[Ciao (programming language)|Ciao]]), implement a [[memoization]] method called ''tabling'', which frees the user from manually storing intermediate results. Tabling is a [[spaceβtime tradeoff]]; execution time can be reduced by using more memory to store intermediate results:<ref>{{Cite journal |last1=Swift |first1=T. |journal=Annals of Mathematics and Artificial Intelligence |volume=25 |issue=3/4 |pages=201β240|title=Tabling for non-monotonic programming |year=1999 |doi=10.1023/A:1018990308362 |s2cid=16695800}}</ref><ref>{{cite journal|last1=Zhou|first1=Neng-Fa|last2=Sato|first2=Taisuke|title=Efficient Fixpoint Computation in Linear Tabling|journal=Proceedings of the 5th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming|date=2003|pages=275β283|url=http://www.sci.brooklyn.cuny.edu/~zhou/papers/ppdp03.pdf}}</ref> <blockquote>Subgoals encountered in a query evaluation are maintained in a table, along with answers to these subgoals. If a subgoal is re-encountered, the evaluation reuses information from the table rather than re-performing resolution against program clauses.<ref>{{Cite journal |doi=10.1017/S1471068411000500 |title=XSB: Extending Prolog with Tabled Logic Programming |journal=Theory and Practice of Logic Programming |volume=12 |issue=1β2 |pages=157β187 |year=2011 |last1=Swift |first1=T. |last2=Warren |first2=D. S. |arxiv=1012.5123 |s2cid=6153112}}</ref></blockquote> Tabling can be extended in various directions. It can support recursive predicates through '''SLG resolution''' or linear tabling. In a multi-threaded Prolog system tabling results could be kept private to a thread or shared among all threads. And in incremental tabling, tabling might react to changes.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)