These predicates allow the manipulation of attributed variables. Attributes are special terms which are attached to a (free) variable, and are hidden from the normal Prolog computation. They can only be treated by using the predicates below.
Usage:attach_attribute(Var,Attr)
Attach attribute Attr to Var.
Usage:get_attribute(Var,Attr)
Unify Attr with the attribute of Var, or fail if Var has no attribute.
Usage:update_attribute(Var,Attr)
Change the attribute of attributed variable Var to Attr.
Usage:detach_attribute(Var)
Take out the attribute from the attributed variable Var.
Usage:verify_attribute(Attr,Term)
A user defined predicate. This predicate is called when an attributed variable with attribute Attr is about to be unified with the non-variable term Term. The user should define this predicate (as multifile) in the modules implementing special unification.
Usage:combine_attributes(Var1,Var2)
A user defined predicate. This predicate is called when two attributed variables with attributes Var1 and Var2 are about to be unified. The user should define this predicate (as multifile) in the modules implementing special unification.
However, future improvements may change or extend the interface to attributed variables in order to provide a richer and more expressive interface.
For customized output of attributed variables, please refer to the documentation of the predicate portray_attribute/2.