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

Section 3 - Agents and some user facilities

3.3 Container constraints


Also we can get sub-agents to inherit definitions from their container. This is very useful - it enables the sub-agents to directly access information available throughout the container. We enable them to do this by adding container type constraints to the agents type. First we are going to alter the module hierarchy to add some of the clause definitions we will need.

Select the exit workbench command from the Workbench browser and then browse the module hierarchy. Select standard and use the command button to load an SDML file. Enter the filename intro3-1.sdm. A submodule called intro3-1 will appear, select this and use the add submodule command and enter intro3. The module hierarchy will now look something like this.

Notice how the intro3 hierarchy now inherits from intro3-1 as well as standard.

Re-enter the sdml-intro3 workbench and browse the Producer type.

You will notice two extra categories in the Definitions page: changeable properties and fixed properties each containing clause definitions. These are not in bold because they have been inherited from the intro3-1 module and so are not defined directly in this module.

Browse the Container page of the Producer type and use the add constraint command in the Constraining types: pane to add ModelAgent as a constraint.. Now browse the Definitions page of Producer again.

Now you can see extra categories of clauses inherited via this constraint.

Create an identical container constraint for the type Consumer.

Thus there are three ways in which a type in a module can inherit a clause:

If you browse the Properties page of an particular clause definition you will see that it tells you where the definition comes from in the Defining type: pane. From that pane you can also use the browse type command to browse the original type in the original module.


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

Generated with CERN WebMaker