| Did you know ... | Search Documentation: |
| attvar.pl -- Attributed variable handling |
Attributed variable and coroutining support based on attributed variables. This module is complemented with C-defined predicates defined in pl-attvar.c
$wakeup(+List)
uhook(+AttributeName, +AttributeValue, +Value)[private]This predicate deals with reserved attribute names to avoid the meta-call overhead.
unfreeze(+ConjunctionOrGoal)[private]freeze(X, (a, !, b)).
freeze(@Var, :Goal)
frozen(@Term, -Goal)Note that attribute_goals//1 may destructively update attributes, often used to simplify the produced attributes. For frozen/2 however we must keep the original variables. Ideally we would demand attribute_goals//1 to not modify any attributes. As that is hard given where we are we now copy the result and fail, restoring the bindings. This is a simplified version of bagof/3.
rebind_vars(+Keep, +Kept) is det[private]processed. We do not rebind such variables as
that would trigger constraints. These variables should not appear in
the produced goal anyway. If both are attvars, unifying may also
re-trigger. Therefore, we remove the variables from the copy before
rebinding. This should be ok as all variable identifies are properly
restored.
portray_attvar(@Var)attributes(portray) or
when the prolog flag write_attributes equals portray. Its task
is the write the attributes in a human readable format.
call_residue_vars(:Goal, -Vars)
copy_term(+Term, -Copy, -Gs) is det
frozen_residuals(+FreezeAttr, +Var)// is det[private]freeze(X, a), freeze(X, !) would create freeze(X,
(a,!)), which is fundamentally different. We could create
freeze(X, (call(a), call(!))) or preform a more eleborate
analysis to validate the semantics are not changed.