% This LaTeX document was generated using the LaTeX backend of PlDoc, % The SWI-Prolog documentation system \section{library(increval): Incremental dynamic predicate modification} \label{sec:increval} \begin{tags} \tag{Compatibility} XSB \end{tags} This module emulates the XSB module \const{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 \textit{Incremental Depency Graph} (IDG). The change propagation for incremental dynamic predicates. SWI-Prolog relies in \predref{prolog_listen}{2} to forward any change to dynamic predicates to the table IDG and \predref{incr_assert}{1} and friends thus simply call the corresponding database update.\vspace{0.7cm} \begin{description} \predicate[nondet]{is_incremental_subgoal}{1}{?SubGoal} This predicate non-deterministically unifies Subgoal with incrementally tabled subgoals that are currently table entries. \predicate[nondet]{incr_directly_depends}{2}{:Goal1, :Goal2} True if \arg{Goal1} depends on \arg{Goal2} in the IDG. \begin{tags} \tag{Compatibility} : In XSB, at least one of Goal 1 or Goal 2 must be bound. This implementation may be used with both arguments unbound. \end{tags} \predicate[nondet]{incr_trans_depends}{2}{:Goal1, Goal2} True for each pair in the transitive closure of \verb$incr_directly_depends(G1, G2)$. \predicate[det]{incr_invalid_subgoals}{1}{-List} \arg{List} is a sorted list (set) of the incremental subgoals that are currently invalid. \predicate[semidet]{incr_is_invalid}{1}{:Subgoal} True when \arg{Subgoal}'s table is marked as invalid. \predicate[det]{incr_invalidate_calls}{1}{:Goal} Invalidate all tables for subgoals of \arg{Goal} as well as tables that are affected by these. \predicate[det]{incr_invalidate_call}{1}{:Goal} This is the XSB name, but the manual says \predref{incr_invalidate_calls}{1} and the comment with the code suggests this is misnamed. \begin{tags} \tag{deprecated} Use \predref{incr_invalidate_calls}{1}. \end{tags} \predicate{incr_table_update}{0}{} Updated all invalid tables \predicate[det]{incr_propagate_calls}{1}{:Answer} Activate the monotonic answer propagation similarly to when a new fact is asserted for a monotonic dynamic predicate. The \arg{Answer} term must match a monotonic dynamic predicate. \end{description}