Previous topic  Top  Next topic  Print this Topic
 

Subclass-of Statements

 

In order to define the class hierarchy in ObjectLogic the language provides the so-called subclass-F-atoms. The subclass relationship between two classes is denoted by a double colon. In the following example we present two subclass-F-atoms that state that the classes car and bike are subclasses of the class vehicle:

Car::Vehicle.

Bike::Vehicle.

In the subclass-F-atoms, the classes are denoted by id-terms. Hence, classes may have methods defined on them and may be instances of other classes, which serve as a kind of meta class. Furthermore, variables are also permitted in all positions of subclass-F-atoms.

A class may have several incomparable direct superclasses. Thus, the subclass relationship specifies a partial order on the set of classes, so that the class hierarchy may be considered as a directed acyclic (but not reflexive) graph with the classes as its nodes.

Note that in analogy to HiLog [CKW93] a class name does not denote the set of objects that are instances of that class.