Attributed variables runtime

Author(s): Rémy Haemmerlé, Christian Holzbaur, Daniel Cabeza, Manuel Carro.

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 and interface

Documentation on exports

PREDICATEattvar/1

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.

      PREDICATEput_attr/3
      No further documentation available for this predicate.

      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.

        PREDICATEget_attr/3
        No further documentation available for this predicate.

        Usage:del_attr_local(Var)

        If Var has an attribute, deletes it, otherwise succeeds without side-effect.

          PREDICATEdel_attr/2
          No further documentation available for this predicate.

          PREDICATEcopy_term/3

          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.

            Documentation on imports

            This module has the following direct dependencies: