All Packages Class Hierarchy This Package Previous Next Index
Like all Telos propositions, each attribute is made up of the three primary
components source, label and destination. These
three components may be retrieved by the methods from()
,
label()
and to()
inherited from the interface
Proposition
. For attributes, the source component is always
another proposition and can be thought of as the declarer of the
attribute. The destination component of an attribute is either a proposition
or a primitive literal and can be thought of as the value of the
attribute. Note that as with all propositions, the level of instantiation of
an attribute's source component need not be the same as the level of
instantiation of the attribute's destination component (note that by
convention, a primitive literal is considered to be at the token level of
instantiation. In particular, this means that a token could declare, say, an
attribute whose value is an M4Class, and an M2Class could declare an attribute
whose value is a primitive literal such as the integer `5'.
Like all Telos propositions, each Attribute has a level of (Telos)
instantiation. By convention, the level of instantiation for an attribute is
given by the level of instantiation of its target. The rationalle behind this
convention derives from the Instantiation Constraint in Telos: If a
proposition p
is an instance of proposition q
then
from(p)
must be an instance of from(q)
and
to(p)
must be an instance of to(q)
. Hence, an
attribute may only be instantiated as many times as its target can be
instantiated. Strictly speaking the level of instantiation of an attribute
should be the minimum of the level of instantiation of its source and target
(i.e., its from
and to
propositions); however, this
convention has not been adopted. Note that attributes need not be instances
of only other attributes. Indeed, all attributes are instances of the Omega
level individual Proposition
as well as instances of the
appropriate "level" builtin individual (e.g., Token
,
SClass
, M1Class
, etc) as determined by the level of
instantiation for the attribute.
We now introduce the concept of inherited attributes in Telos.
The Telos "Specialization Postulate" says that if a class P
is a
specialization of a class Q
and p
is an instance of
P
, then p
is an instance of Q
. It
follows by the specialization postulate that an instance of a class
P
can declare attributes that instantiate class level attributes
from P
's parents. Accordingly, we say that a class "inherits"
all of its parents' class level attributes since the class's instances can
instantiate its parents class level attributes. To be more correct, a class
inherits those class level attributes declared by its parents that are not
specialized by any other attributes amongst the class's declared attributes
or amongst the class's parents' declared attributes. This is done to avoid
redundancy: if an attribute is an instance of some other attribute, then by
the specialization postulate it is also an instance of the other attribute's
parents.
Unlike individuals, attributes have categories. These are the
labels of all the attribute's ancestors. Consequently any implementation
of this interface must support the method categories
inherited
from the Proposition interface.
The Telos language allows attributes to themselves have attributes. Some implementations of this API may choose to not support this.
In this API, attributes are constructed by a method in the
KB
interface, not by a public constructor. The method is
called
newAttribute(Proposition,String[],String,PropositionOrLiteral)
.
Its documentation details how its semantics vary from a normal constuctor.
There are two builtin attribute classes that must be supported
in any implementation of this API. These are the Omega level attribute classes
Attribute
and AttributeClass
. See
OmegaAttributeClass for more details.
All Packages Class Hierarchy This Package Previous Next Index