The attributed variable is a special ECLiPSedata type which represents a variable together with attached attributes. In the literature, attributed variables are sometimes referred to as “metaterms”. The name metaterm originates from its application in meta-programming: for an object-level program, a metaterm looks like a variable, but for a meta-program the same variable is just a piece of data which, possibly together with additional meta-level information, forms the metaterm.
The attributed variable is a powerful means to implement various extensions of the plain Prolog language. In particular, it allows the system’s behaviour on unification to be customised. In most situations an attributed variable behaves like a normal variable, e.g., it can be unified with other terms and var/1 succeeds on it. The differences in comparison to a plain variable are: