This module provides a means to handle attributed variables. Note that attributes are private to the module from which the predicates implemented by attr_rt module are called. See package attr for more details about attributed variables.
Usage:attvar(Var)
Succeeds if Term is an attributed variable
Usage:put_attr_local(Var,Value)
If Var is a variable or attributed variable, set its attribute to Value. If an attribute is already associated with Var, the old value is replaced. Backtracking will restore the old value (i.e., an attribute is a mutable term. See also library mutables). This predicate raises a representation error if Var is not a variable and a type error if Module is not an atom.
Usage:get_attr_local(Var,Value)
Request the current value for the attribute associted to Var. If Var is not an attributed variable or the named attribute is not associated to Var this predicate fails silently.
Usage:del_attr_local(Var)
If Var has an attribute, deletes it, otherwise succeeds without side-effect.
Usage:copy_term(Term,Copy,Gs)
Creates a regular term Copy as a copy of Term (without any attributes), and a list Gs of goals that when executed reinstate all attributes onto Copy. The nonterminal attribute_goal/1, as defined in the modules the attributes stem from, is used to convert attributes to lists of goals.