23.08.2013 Views

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.13 Object Class Models 105<br />

<strong>of</strong> object models is presumably one <strong>of</strong> the largest problems in learning and understanding<br />

object-oriented analysis methods.<br />

Complex reactive and control-oriented systems tend to have a large artificial part that<br />

must be ’designed’ and cannot simply be ’found’ in the problem domain. Object class<br />

modelling is clearly a modern form <strong>of</strong> data analysis, directed to classifying data as<br />

objects in the problem domain. Most practical systems are a mix <strong>of</strong> data-oriented parts<br />

and control-oriented parts. Therefore an inventory <strong>of</strong> relationships will probably be<br />

necessary to make an analysis complete.<br />

We experienced it very hard to find adequate relationships. It is not an easy way to<br />

completeness. A major problem is the vagueness <strong>of</strong> the relationship concept. Even if<br />

one finds a relation, one still does not know what it is. A relationship may appear to be<br />

an object. A relationship may also become an attribute or an operation, or may appear<br />

to be superfluous. The traditional object-oriented modelling approach did not give<br />

the feeling to make progress when applied to analysis and design <strong>of</strong> complex reactive<br />

systems. It gave the feeling <strong>of</strong> using philosophy instead <strong>of</strong> craftsmanship for the creation<br />

<strong>of</strong> a product.<br />

4.13.2 Multiplicity<br />

Cardinality constraints specifies the multiplicity <strong>of</strong>, i.e. ’how many’ instances <strong>of</strong> one class<br />

can be associated with a single instance <strong>of</strong> a related class. OMT defines a notation to<br />

denote multiplicity. We refer to [R 91] for details. Besides ’one’ and ’many’, OMT allows<br />

the specification <strong>of</strong> numerical values, intervals, and sets <strong>of</strong> intervals in the diagrams at<br />

the end <strong>of</strong> a relationship symbol.<br />

4.13.3 Invariants<br />

Besides qualifiers that constrain multiplicity, there may be constraints on the relationship<br />

as a whole, or even across relationships. Textual annotations in the diagram, called<br />

invariants can be used to describe such constraints.<br />

4.13.4 Relationship Attributes<br />

Properties <strong>of</strong> objects are modelled as attributes in classes. Links between objects can<br />

have properties too. These can be modelled as attributes <strong>of</strong> relationships. It depends on<br />

the multiplicity <strong>of</strong> a relationship how these attributes are implemented in objects. They<br />

may become attributes <strong>of</strong> objects on either side. An alternative is that a relationship<br />

becomes an object class itself. In this case the attributes <strong>of</strong> the relationship become<br />

attributes <strong>of</strong> this class. If the name <strong>of</strong> the relationship is a verb, the name <strong>of</strong> such a class<br />

becomes a gerund <strong>of</strong> that verb.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!