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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.6 Aggregates 81<br />

Therefore a complex system can be visualised as a hierarchy, where entities on a particular<br />

level in the hierarchy fall apart into parts on the next lower level. Analysis <strong>of</strong><br />

whole-part relations between entities is therefore an important issue for revealing the<br />

structure <strong>of</strong> a system. This is not only true for the implementation <strong>of</strong> a system. On the<br />

conceptual level objects appear to have whole-part relations too. During analysis <strong>of</strong> a<br />

problem domain such relations must be revealed.<br />

4.6.2 Whole-Part Relations<br />

Class B<br />

Attributes<br />

Messages<br />

Class A<br />

Attributes<br />

Messages<br />

Class C<br />

Attributes<br />

Messages<br />

Whole class<br />

Whole-part<br />

symbol<br />

Part class<br />

Figure 4.18: Whole-Part Relation between Classes<br />

Clusters have been introduced in the previous subsection, as a mechanism for hierarchical<br />

composition <strong>of</strong> finer granules into more coarse granules. Traditional object-oriented<br />

methods do not <strong>of</strong>fer nested clusters. When they need to express that an entity is composed<br />

<strong>of</strong> objects they define a ’whole- part relationship’ between classes, also called<br />

WPA (Whole-Part Association), or aggregation relation. An aggregation relation is defined<br />

between a whole class and one or more part classes in an Object Class Diagrams. We<br />

disapprove <strong>of</strong> the name aggregation relation. After all, an aggregate is a special kind <strong>of</strong><br />

composite, and a whole-part relation denotes a composite. Figure 4.18 shows a whole<br />

class, called Class A, that has a whole-part relation with both Class B and Class C. Figure<br />

4.19 shows how an aggregate <strong>of</strong> instances corresponding to the class model <strong>of</strong> Figure<br />

4.18 can look. The whole object is an instance from the whole class. The part objects objB<br />

and objC are instances <strong>of</strong> Class B, and Class C respectively. Notice that a whole (aggregate<br />

object) needs its parts. In contrast a part may be instantiated as an independent object,<br />

it does not necessarily need the whole.<br />

An aggregate with many kinds <strong>of</strong> parts must have many whole-part relationships. By<br />

defining individual whole-part relationships per whole-part class pair we can specify<br />

the multiplicity <strong>of</strong> each component within the composite. For such details we refer to<br />

[R 91]. A tree <strong>of</strong> classes with whole-part relations may have more than two levels, so a<br />

part may again be an aggregation <strong>of</strong> parts, etcetera.

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

Saved successfully!

Ooh no, something went wrong!