Manipulations of Domain Definitions
The translation of concepts into domain definitions is not always a straightforward process. In practical situations, domain definitions are rearranged, or redefined, before a satisfactory set of domain definitions is derived.
the key concepts of a program have been translated into corresponding
domain definitions, it is quite likely that you want to revise the set
of domain definitions, either by changing the original definitions or
by adding or deleting domain definitions. The result of these
manipulations should be a complete and consistent set of definitions.
Each definition must be compatible with the syntax of one of the sorts
of the listed domain definitions. This means, for example, that the +
operator and the | operator may not be mixed in the final
version of a domain definition. In this section we will examine two
techniques for formal manipulation of domain definitions.
Substitution of Domain Definitions
The name of a domain in the right hand part of a definition may be substituted by its definition. So, in a set of domain definitions for Person, we may substitute the definitions for Name, Address, and Birthdate:
We use parentheses to group domains together; they do not effect the result. The definition is equivalent to:
By means of this substitution we created a compound Person domain with 6 elements. However, we have lost by this substitution the concepts of Name, Address and Birthdate. Sometimes, this is what we want, because fewer concepts may help to simplify the model. But, sometimes substitution does not help to simplify the model; on the contrary, the loss of a domain name also means losing its semantic meaning. In our example, Date may be interpreted in many different ways, such as birth date, the date when moved to the current address, the date of marriage, and so on. Because Birthdate has a clear meaning, it should not have been substituted.
That substitution can be pushed too far will be even clearer if we continue our substitution process until all domain references have been replaced by their definitions. If we assume that the final domains are all text domains the result will be:
In this definition all semantic information has
disappeared. It is a domain definition without any meaning. So,
substitution at the level of the predefined domains makes no sense.
Introduction of New Domain Definitions
It is also possible to do the inverse of substitution: define new domain definitions and use these new domain names to simplify existing domain definitions. Suppose we have the following domain definitions:
These two domain definitions have a number of common domain definitions. We can introduce an additional domain representing the common domain definitions and rewrite the other domain definitions as follows:
This page was last modified on 19-05-2015 12:06:37