This library handled tabled execution of predicates using the
characteristics if the SLG WAM. The required suspension is realised
using delimited continuations implemented by reset/3 and shift/1. The
table space and work lists are part of the SWI-Prolog core.
- - Benoit Desouter, Jan Wielemaker and Fabrizio Riguzzi
- table :PredicateIndicators
- Prepare the given PredicateIndicators for tabling. This predicate is
normally used as a directive, but SWI-Prolog also allows runtime
conversion of non-tabled predicates to tabled predicates by calling
table/1. The example below prepares the predicate edge/2 and the
non-terminal statement//1 for tabled execution.
:- table edge/2, statement//1.
In addition to using predicate indicators, a predicate can be
declared for mode directed tabling using a term where each
argument declares the intended mode. For example:
:- table connection(_,_,min).
Mode directed tabling is discussed in the general introduction
section about tabling.
- untable(M:PIList) is det
- Remove tabling for the predicates in PIList. This can be used to
undo the effect of table/1 at runtime. In addition to removing the
tabling instrumentation this also removes possibly associated tables
|PIList||- is a comma-list that is compatible ith table/1.|
- Tabled negation.
- $wfs_call(:Goal, :Delays)
- Call Goal and provide WFS delayed goals as a conjunction in Delays.
This predicate is teh internal version of call_delays/2 from
- Remove all tables. This is normally used to free up the space or
recompute the result after predicates on which the result for
some tabled predicates depend.
Abolishes both local and shared tables. Possibly incomplete tables
are marked for destruction upon completion.
- abolish_table_subgoals(:Subgoal) is det
- Abolish all tables that unify with SubGoal.
- To be done
- - : SubGoal must be callable. Should we allow for more general
- abolish_module_tables(+Module) is det
- Abolish all tables for predicates associated with the given module.
- abolish_nonincremental_tables is det
- Abolish all tables that are not related to incremental predicates.
- Allow for skipping incomplete tables while abolishing.
- To be done
- - Mark tables for destruction such that they are abolished when
- current_table(:Variant, -Trie) is nondet
- True when Trie is the answer table for Variant.
- $wrap_incremental(:Head) is det
- Wrap an incremental dynamic predicate to be added to the IDG.
- $unwrap_incremental(:Head) is det
- Remove dynamic predicate incremenal forwarding, reset the possible
abstract property and remove possible tables.
- Expresses the value bottom from the well founded semantics.
The following predicates are exported, but not or incorrectly documented.
- $moded_wrap_tabled(Arg1, Arg2, Arg3, Arg4)
- $wrap_tabled(Arg1, Arg2)
- start_subsumptive_tabling(Arg1, Arg2, Arg3)
- start_tabling(Arg1, Arg2, Arg3)
- start_tabling(Arg1, Arg2, Arg3, Arg4, Arg5)