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

Section 1 - Clauses, Types and Rules

1.9 The Type Browser and Definitions


The SDML universe is itself (the sole) instance of type UniversalAgent. This type (and hence the instance) has many useful properties. Many of these are inspectable in another browser (a "type" browser) that is similar to the one you are using.

From the Browse menu (of the Agent: universe browser) select browse type and click on the screen to place the new window. It looks like this.

This is the type browser on the UniversalAgent type. I have already placed a general comment on it. It is on such type browsers that you do almost all the programming (just as almost all the testing is done on instance browsers).

Click on the Definitions tag.

This is a summary of all the primitives available for use by the universe. For convenience it is grouped into categories (such as agents, choices etc.) at the top left.

Scroll down to the producer category and select it. I have grouped all the definitions of clauses I have defined for the producers here. Select fixedCost from the top right panel. It should look something like this.

There are three (or four) panes for each definition: Comment, Properties and Syntax (and sometimes Rulebases). The Comment is supposed to describe the purpose and use of the keyword (in SDML they are called predicates). Properties determines its type and read-write permissions. Syntax determines the syntax for the use of the keyword in a diagrammatic form. fixedCost is a user-defined clause, defined in UniversalAgent which is why it is in bold. In general anything directly programmed in a type is displayed in bold there. You will see that in the Syntax pane the fixedCost clause takes an object of type Producer as the first argument and a Number as the second. In its Properties you will see that it is a forward (chaining) clause. This is one of the two types of user-defined clause.

Scroll up the top-left pane to the numerical category and then scroll down and select inInterval from the top right pane.

You will see in the Properties page that this is a primitive. This is not a user-defined clause but one that comes with SDML. Broadly, only user-defined clauses can be stored on databases. The primitives are there to aid programming.

In the Syntax pane you can see that inInterval has several numerical arguments. They are all of type Number. The first just says "Number" the rest say "inst Number" which is short for instantiated number. This means that if a variable is used at this argument then it must be bound by another part of the clause to some definite value. Notice that the fourth argument (the step value) is an optional argument.


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

Generated with CERN WebMaker