Go to the first, previous, next, last section, table of contents.


Attributed variables

Author(s): Christian Holzbaur, Daniel Cabeza, Manuel Carro.

Version: 1.7#144 (2001/11/12, 17:57:47 CET)

Version of last change: 1.5#157 (2000/5/30, 13:4:47 CEST)

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 and interface (attributes)

Documentation on exports (attributes)

PREDICATE: attach_attribute/2:

Usage 1: attach_attribute(Var,Attr)

Usage 2: attach_attribute(Var,Attr)

PREDICATE: get_attribute/2:

Usage 1: get_attribute(Var,Attr)

Usage 2: get_attribute(Var,Attr)

PREDICATE: update_attribute/2:

Usage 1: update_attribute(Var,Attr)

Usage 2: update_attribute(Var,Attr)

PREDICATE: detach_attribute/1:

Usage 1: detach_attribute(Var)

Usage 2: detach_attribute(Var)

Documentation on multifiles (attributes)

PREDICATE: verify_attribute/2:

The predicate is multifile.

Usage: verify_attribute(Attr,Term)

PREDICATE: combine_attributes/2:

The predicate is multifile.

Usage: combine_attributes(Var1,Var2)

Other information (attributes)

Note that combine_attributes/2 and verify_attribute/2 are not called with the attributed variables involved, but with the corresponding attributes instead. The reasons are:

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.


Go to the first, previous, next, last section, table of contents.