Module trail

The system predicate sys_unbind/1 installs an unbind handler and immediately succeeds. The unbind handler is invoked during a redo or a close. In contrast to a cutter the unbind handler is not invoked when choice points are removed. When the unbind handlers are executed exceptions are accumulated that are possibly thrown by the unbind handlers. When unbind handler fails a directive failed error is thrown.

The predicate sys_freeze_var/2 will create a new reference object that captures the given variable. The reference object will have a stable hash, equal and lexical ordering for the du-ration of the continuation. The predicate sys_melt_var/2 allows retrieving the term the variable is currently instantiated to. The predicate sys_bound_var/1 allows checking whether the variable is currently instantiated or not..

The following trailed update predicates are provided:

sys_unbind(A):
The predicate installs an unbind handler A and immediately succeeds. The unbind handler is invoked during a redo or a close.
sys_freeze_var(V, R):
The predicate succeeds when R unifies with a new references object that captures the variable V.
sys_melt_var(R, T):
The predicate succeeds when T unifies with what the variable captured by the reference object R is currently instantiated.
sys_bound_var(R):
The predicate succeeds when the variable captured by the reference object R is currently instantiated.
sys_freezer(R):
The predicate succeeds when R is a reference to a variable.

Comments