Did you know ... Search Documentation:
increval.pl -- Incremental dynamic predicate modification
PublicShow source

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.

Compatibility
- XSB
Source is_incremental_subgoal(?SubGoal) is nondet
This predicate non-deterministically unifies Subgoal with incrementally tabled subgoals that are currently table entries.
Source incr_directly_depends(:Goal1, :Goal2) is nondet
True if Goal1 depends on Goal2 in the IDG.
Compatibility
- : In XSB, at least one of Goal 1 or Goal 2 must be bound. This implementation may be used with both arguments unbound.
Source incr_trans_depends(:Goal1, Goal2) is nondet
True for each pair in the transitive closure of incr_directly_depends(G1, G2).
Source incr_invalid_subgoals(-List) is det
List is a sorted list (set) of the incremental subgoals that are currently invalid.
Source incr_is_invalid(:Subgoal) is semidet
True when Subgoal's table is marked as invalid.
Source incr_invalidate_calls(:Goal) is det
Invalidate all tables for subgoals of Goal as well as tables that are affected by these.
Source 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.
deprecated
- Use incr_invalidate_calls/1.
Source incr_table_update
Updated all invalid tables
Source 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.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

Source incr_assert(Arg1)
Source incr_asserta(Arg1)
Source incr_assertz(Arg1)
Source incr_retractall(Arg1)
Source incr_retract(Arg1)