This module provides an XSB compatible library to access tables as
created by tabling (see table/1). The aim of this library is first of
all compatibility with XSB. This library contains some old and internal
XSB predicates that are marked deprecated.
- t not(:Goal)
- Tabled negation.
- - This is a synonym to tnot/1.
- tfindall(+Template, :Goal, -Answers)
- This predicate emerged in XSB in an attempt to provide a safer
alternative to findall/3. This doesn't really work in XSB and the
SWI-Prolog emulation is a simple call to findall/3. Note that Goal
may not be a variant of an incomplete table.
- - Use findall/3
- Dummy predicates for XSB compatibility.
- - These predicates have no effect.
- get_call(:CallTerm, -Trie, -Return) is semidet
- True when Trie is an answer trie for a variant of CallTerm. Return
is a term ret/N with N variables that share with variables in
CallTerm. The Trie contains zero or more instances of the Return
term. See also get_calls/3.
- get_calls(:CallTerm, -Trie, -Return) is nondet
- True when Trie is an answer trie for a variant that unifies with
CallTerm and Skeleton is the answer skeleton. See get_call/3 for
- get_returns(+ATrie, -Return) is nondet
- True when Return is an answer template for the AnswerTrie.
- get_returns(+AnswerTrie, -Return, -NodeID) is nondet
- True when Return is an answer template for the AnswerTrie and the
answer is represented by the trie node NodeID.
- get_returns_and_tvs(+AnswerTrie, -Return, -TruthValue) is nondet
- Identical to get_returns/2, but also obtains the truth value of a
given answer, setting TruthValue to
t if the answer is
unconditional and to
u if it is conditional. If a conditional
answer has multiple delay lists, this predicate will succeed only
once, so that using this predicate may be more efficient than
get_residual/2 (although less informative)
- get_returns_and_dls(+AnswerTrie, -Return, :DelayLists) is nondet
- True when Return appears in AnswerTrie with the given DelayLists.
DelayLists is a list of lists, where the inner lists expresses a
conjunctive condition and and outer list a disjunction.
- get_residual(:CallTerm, -DelayList) is nondet
- True if CallTerm appears in a table and has DelayList. SWI-Prolog's
representation for a delay is a body term, more specifically a
disjunction of conjunctions. The XSB representation is
non-deterministic and uses a list to represent the conjunction.
The delay condition is a disjunction of conjunctions and is
represented as such in the native SWI-Prolog interface as a nested
term of ;/2 and ,/2, using
true if the answer is unconditional.
This XSB predicate returns the associated conjunctions
non-deterministically as a list.
See also call_residual_program/2 from library(wfs).
- get_returns_for_call(:CallTerm, -AnswerTerm) is nondet
- True if AnswerTerm appears in the tables for the variant CallTerm.
- Invalidates all tabled subgoals for the predicate denoted by the
predicate or term indicator Pred.
- To be done
- - If Pred has a subgoal that contains a conditional answer, the
default behavior will be to transitively abolish any tabled
predicates with subgoals having answers that depend on any
conditional answers of S.
- abolish_table_call(+Head) is det
- abolish_table_call(+Head, +Options) is det
- Same as abolish_table_subgoals/1. See also abolish_table_pred/1.
- - Use abolish_table_subgoals/[1,2].
- abolish_table_subgoals(:Head, +Options)
- Behaves as abolish_table_subgoals/1, but allows the default
table_gc_action to be over-ridden with a flag, which can be either
- - Options is compatible with XSB, but does not follow the ISO
option handling conventions.
The following predicates are exported, but not or incorrectly documented.