This module emulates the XSB module
module serves two goals: (1) provide alternatives for the dynamic clause
manipulation predicates that propagate into the incremental tables and
(2) query the dynamically maintained Incremental Depency Graph
The change propagation for incremental dynamic predicates. SWI-Prolog
relies in prolog_listen/2
to forward any change to dynamic predicates to the table IDG and incr_assert/1
and friends thus simply call the corresponding database update.
- This predicate non-deterministically unifies Subgoal with incrementally
tabled subgoals that are currently table entries.
- True if Goal1 depends on Goal2 in the IDG.
- : In XSB, at least one of Goal 1 or Goal 2 must be bound. This
implementation may be used with both arguments unbound.
- True for each pair in the transitive closure of
- List is a sorted list (set) of the incremental subgoals that
are currently invalid.
- True when Subgoal’s table is marked as invalid.
- Invalidate all tables for subgoals of Goal as well as tables
that are affected by these.
- This is the XSB name, but the manual says incr_invalidate_calls/1
and the comment with the code suggests this is misnamed.
- Use incr_invalidate_calls/1.
- Updated all invalid tables
- Activate the monotonic answer propagation similarly to when a new fact
is asserted for a monotonic dynamic predicate. The Answer
term must match a monotonic dynamic predicate.