increval.pl -- Incremental dynamic predicate modification
This module emulates the XSB module
increval. This 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 (IDG).
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.
- is_incremental_subgoal(?SubGoal) is nondet
- This predicate non-deterministically unifies Subgoal with incrementally tabled subgoals that are currently table entries.
- incr_directly_depends(:Goal1, :Goal2) is nondet
- True if Goal1 depends on Goal2 in the IDG.
- incr_trans_depends(:Goal1, Goal2) is nondet
- True for each pair in the transitive closure of
- incr_invalid_subgoals(-List) is det
- List is a sorted list (set) of the incremental subgoals that are currently invalid.
- incr_is_invalid(:Subgoal) is semidet
- True when Subgoal's table is marked as invalid.
- incr_invalidate_calls(:Goal) is det
- Invalidate all tables for subgoals of Goal as well as tables that are affected by these.
- incr_invalidate_call(:Goal) is det
- This is the XSB name, but the manual says incr_invalidate_calls/1 and the comment with the code suggests this is misnamed.
- Updated all invalid tables
- incr_propagate_calls(:Answer) is det
- 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.
The following predicates are exported, but not or incorrectly documented.