next up previous contents index
Next: Attribute types Up: No Title Previous: Other parameters

Base Classes

Classes that can be used to create components without definition are called base classes. Each base class has several attributes and each attribute has a type, a name, and possibly a constraint that restricts the domain of values for the attribute.  

We use DJ-like syntax to specify the base classes. A base class consists of several attribute declarations, each of which takes the following form:

       dj Type Identifier [R Expression];
where the Type is a type, Identifier is the name of the attribute, and R Expression is a constraint that restricts the domain of values. For instance, consider the following two the attribute declarations:
       dj int a in 0..500;
       dj int b == a;
The first line declares an integer attribute a and constrains its domain to be the set of integers between 0 and 500, inclusive. The second line declares an integer attribute, called b, and enforces it to be equal to a.



 

Neng-Fa Zhou
1999-02-16