[Next] [Previous] [Up] [Top] [Contents]

Section 1 - Clauses, Types and Rules

1.12 The Type Hierarchy


Types are arranged in a hierarchy. This saves programming as types lower in the hierarchy inherit definitions, rules and objects from those types it is below. It is as if the lower types automatically collected all the categories, definitions, rules and objects from all the types above them - all the way to the top!

From the Workbench: intro1-1 browser select browse module from the Browse menu. then select the Type Hierarchy tab at the bottom. (This takes a few seconds to display).It should look something like this.

The most important parts of this hierarchy (from a model builders point of view) are those below the Object and Agent types, for it is here that the modeller can define new types. If you scroll across to this part, you will already see the UniversalAgent and Producer types already there in bold (this is because they are defined in this module - more on modules tomorrow).

Click on the Object rectangle and press the command button on the mouse and select add subtype. A dialogue box appears for you to type the name of the type in. Type Consumer and click on OK (or press the Return key). After a brief pause it will redisplay the hierarchy with the new Consumer type. By convention types are named with a capital letter. The result should look something like this.

We have now defined the Consumer type.

General user-defined objects are little more than names. You can also define new types of agent anywhere in the hierarchy under Agent (depending on what kind of agent you want - more on agents on friday).

We will now define some clauses that use the Consumer type.


An introduction to SDML - Bruce Edmonds - 13 JUL 99
[Next] [Previous] [Up] [Top] [Contents]

Generated with CERN WebMaker