All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface jtelos.Attribute

public interface Attribute
extends Proposition
This interface represents Telos attributes. These are first class objects in Telos. They can be declared by any non-primitive proposition (omega class, token, simple class, metaclass, metametaclass, etc.).

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'. For attributes the label component is a String which holds the label of the attribute. The label may be the empty String.

Like all Telos propositions, each Telos attribute has a level of (Telos) instantiation. The level of instantiation of an attribute is defined to be the minimum of the levels of instantiation of its source and target (i.e., the minimum of the levels of instantiation of the attribute's from and to propositions). The rationale behind this convention stems from consideration of the Telos Instantiation Constraint: If 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 be instantiated no more times than either its source of target can.

Like all Telos propositions, each Telos attribute may have ancestor, instance, child and parent relationships with other Telos propositions contained in the same KB as the attribute. Note that attributes need not only have attributes as ancestors. Indeed, all attributes are instances of the built-in Omega level individual Proposition as well as instances of one of the "level" built-in individuals (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 created using 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.

See Also:
Proposition, Individual, OmegaClass, OmegaAttributeClass, OmegaIndividualClass


All Packages  Class Hierarchy  This Package  Previous  Next  Index