Subject: Big deal about Tabling Predicates.

From: "Douglas Miles" <[email-masked]>
Date: Sun, 12 Nov 2000 21:19:00 -0800

SWI Community,

XSB Prolog has a mechanisms called 'Tabling'
<http://xsb.sourceforge.net/manual1/node48.html> it seems to be merely a way
of optimizing partially instantiated or fully instantiated predicates. (I am
still trying to understand how it works)  XSB keeps track of each subgoal in
some kind of table. A call can have a state of complete, incomplete or
not_yet_called. Calls that do have table entries may be either "complete"
or "incomplete". A subgoal in a table is marked "complete" only after it is
determined to be completely evaluated; otherwise the subgoal is "incomplete"
. If a tabled subgoal is not present in the table, it is termed
not_yet_called.

What would we do in SWI to accomplish this kind of optimization?  As a SWI
user I would like to think we have nearly everything we could ever want.  Is
this 'Tabling' ever useful?

Somehow it is also implied that this help take care of 'Cyclic Terms' and
that was a topic discussed earlier (except the discussion was "representing
them").

Douglas