PublicShow -- Tabled execution (SLG WAM)

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
Source table(+PredicateIndicators)
Prepare the given PredicateIndicators for tabling. Can only be used as a directive. 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.

Source start_tabling(+Variant, +Implementation)
Execute Implementation using tabling. This predicate should not be called directly. The table/1 directive causes a predicate to be translated into a renamed implementation and a wrapper that involves this predicate.
- This interface may change or disappear without notice from future versions.
Source abolish_all_tables
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.
- permission_error(abolish, table, all) if tabling is in progress.
Source abolish_table_subgoals(:Subgoal) is det
Abolish all tables that unify with SubGoal.
Source current_table(:Variant, -Trie) is nondet
True when Trie is the answer table for Variant.
Source prolog:rename_predicate(:Head0, :Head) is semidet[multifile]
Hook into term_expansion for post processing renaming of the generated predicate.
Source sandbox:safe_directive(+Directive) is semidet[multifile]
Allow tabling directives that affect locally defined predicates.