Click on the image below to view it full size in an image viewer !
Box.bdd: composition

Amongst the Webel props are a variety of boxes that can be used as containers of things, to construct a containment hierarchy (not to be confused with the containment operator or containment of model elements in a model repository or browser).

This is more formally known in UML as aggregation (or sometimes as "composition"), where the AggregationKind can be one of (none, shared, composite), for which SysML™ has, in the case where the composed element is a plain Block, the special (implicit, not stereotyped) property types 'part property' and 'reference property' (which covers both cases of 'shared' and 'none' aggregation). We'll see later how these might all be used, for now we will be using only the accessible 'part property' concept, which is usually interpreted to mean that if an instance of the aggregating Block is destroyed, so will the instances it composes/aggregates.

The Box block shown has a content:ColoredThing part property, and lower multiplicity 0 (empty), and maximum multiplicity 1 (full), which must be explicitly indicated because of the special rules for default multiplicities introduced by SysML™. (For simplicity, it will be assumed that a Boxcan't contain more than one thing, which assumption works quite well with most of the Webel props.)

Since a Ball is a ColoredThing, a Box may contain a Ball. And since a Box is also a ColoredThing, a Box may also contain a Box.

But what happens if 2 boxes are the same size ? Surely they can't fit inside each other !
This a situation where the systems engineering aspect, as opposed to "just" software engineering, enters; just as well the Box has been left abstract (so that nonsense can't be instantiated). One can do a lot of things with software objects that don't work with physical objects in the real world.

It might be tempting to introduce a UML-style contraint, but what would it target ? It would have to say something like:

"If the instance content:ColoredThing of a Box instance is itself a Box then its length must be smaller than that of the containing Box"

It quickly becomes clumsy, and it can't preempt all possible types of contained things anyway. One way of addressing this is through subclassing (inheriting Blocks), as we'll see soon.

First however, a quick look at the matching IBD for abstract Box ..

Parsing snippets