different sorts of domain definitions. The following sorts are
consists of a name followed by a ‘=’ character, followed by
the remaining part of the definition. The remaining part determines
the sort of the domain definition and is closed by a semicolon. The
order of domain definitions is not important. Text
between << and >> is comment.
In the following
sections the different sorts of domain definitions will be described.
Compound Domain definitions
compound domain definition is composed of references to other domain
definitions. These references are names of other domain definitions
and are called the elements of the compound domain. The elements are
separated by the ‘+’ character. For example, the following domain
definitions of Person, Name, Address, and Date are compound domain
Alternative Domain definitions
An alternative domain definition consists of a number of references to other domain definitions. The references are separated by the ‘|’ (or) character. For example, we take the concept of a customer. A customer of a company may be a person or an organization. This can be expressed in the following way:
In this example, Customer is an alternative domain. This definition may be read as: A customer is a person or an organization. If we assume that the domain of a Person is already defined, then only the domain of Organization need to be defined. This must be the name of another compound domain. For example, Organization can be defined as:
Collection Domain definitions
A collection domain definition specifies a collection of domains. In an earlier example we introduced Children as a collection of Persons:
The collection phrase may be read as “zero or more”, or as “some number of” Persons.
Let us use another example. We assume that a company consists of a number of divisions and that each division consists of a number of departments and that each department has a number of employees.
definitions may also be recursively defined. For example, a machine
consists of a number of parts; the parts themselves may consists of
other parts, and so on, as defined by:
Parts are recursively defined via subparts. The recursion stops as soon as a part has a partname but no subparts.
Enumeration Domain definitions
An enumeration domain represents a distinct number of elements. Those elements are enumerated by the domain definition. As an example of an enumeration domain we specify the main wind directions:
Note, that North, East, South, and West are names of elements of the Direction domain; they are not names of other domain definitions. As another example, let us assume that a person is also characterized by its Gender:
gender domain can be defined as an enumeration domain with only two
A sub-domain is a domain that represents a subset of all possible elements of a given domain. For example, money can be defined as a sub-domain of real numbers.
Based on these domain definitions we may define the dollar and the euro:
3.6 Equivalent Domain definitions
A domain can be defined to be equivalent to another domain. For example, client may be another name for customer. This may be expressed as:
In this example, the client domain is equivalent to the customer domain.
Caution: If clients are special customers then the domain of client is a sub-domain of customer and should be defined accordingly.
Predefined Domain definitions
Predefined domain definitions are domain definitions that can directly be represented in Elisa. Therefore they need no further definitions. The predefined domain definitions in our current implementation are:
This page was last modified on 19-05-2015 11:59:59