Re: aggregation and states



Date view Thread view Subject view Author view Attachment view

From: Ulf Schuenemann (ulf@cs.mun.ca)
Date: Mon 03 Jun 2002 - 22:58:41 BST


On 29 May Jon wrote:
> Is there any work out there on how aggregations constrain behavioral states?

Sorry, for my part I can only say I haven't see such work on UML
*aggregation*. I can remember only one article affirming that in
UML *composition*, the composite object's state is the product
of its components' states:

    S Vauttier, M Magan, C Oussalah:
    Extended Specification of Composite Objects in UML;
    JOOP 12(2) May 1999.

Why this makes sense to me, I would still like to see how/whether
decomposition of objects/classes in the object/class model shows up in
in the state model.

Maybe you mean composition? What example do you have in mind?
The Wheel-Car example mentioned by Les seems to be rather a case of
composition than aggregation. One has to be careful, since some
authors seem to say "aggregation" for what UML calls composition (this
has a history in philosophy and in data models).

IMHO the essential difference between the two is:

. a composite object/class *is* a whole, its parts are shown nested in
  it, and are hidden in a high-level view
  -> the whole is model element.

. an aggregate object/class *represents* a whole (cf UML glossary)
  -> this whole might be a non-model-element.

My favorite example is sets: there are many sets made of the objects
in your model. Only some of these sets you may chose to represent in
the model as aggregate objects (set objects, in this case).
Since a set's state does not depend on its elements' states, there
seems to be in general no constraint between the state of an aggregate
object and the state of its parts.


Just my $.02

Ulf

Date view Thread view Subject view Author view Attachment view