This content is for DEMONSTRATION
This content area is UNDER CONSTRUCTION or MIGRATION
Click on the image below to view it full size in an image viewer !
PsychoMediumBoxWithSmallBallBox (IBD): the initial values compartment

And so we come to one of the potentially most confusing and least understood aspects of SysML, the infamous IBD initialValues compartment1

Although a SmallBallBox normally has by default (and so will usually be constructed with) ball oBall:Ball with color orange, in the context of the PsychoMediumBoxWithSmallBallBox (which endows some elements with psychedlic colours), the ball:Ball will become red, because the InstanceSpecification psycho_sbb:SmallBallBox (which is assigned via an InstanceValue as the Property.defaultValue: ValueSpecification [0..1] of sbb:SmallBallBox within PsychoMediumBoxWithSmallBallBox) has a red Ball in its ball:Ball Slot. Phew !

The related SysML1.2 specification snippets are:

In addition to the form of default value specifications that SysML supports on properties of a block (with an optional “=” <value-specification> string following the rest of a property definition), SysML supports an additional form ..

..

If a property belonging to a block has a specification of initial values for any of the properties belonging to its type, then the default value of that property must be a UML InstanceValue element. This element must reference a UML InstanceSpecification element created to hold the initial values of the individual properties within its usage context.

This last part can be "translated" to the case above thus:

If a property [psycho_sbb:SmallBallBox] belonging to a block [PsychoMediumBallBoxWithSmallBallBox] has a specification of initial values for any of the properties [ball:Ball, color:Color, length:mm] belonging to its type [SmallBallBox], then the default value of that property [psycho_sbb:SmallBallBox] must be a UML InstanceValue element. This [InstanceValue] element must reference a UML InstanceSpecification element [psycho_sbb:SmallBallBox] created to hold the initial values [ball=rBall, color=purple] of the individual properties [ball:Ball, color:Color, length:mm] within its usage context [PsychoMediumBallBoxWithSmallBallBox].

  • 1. Since SysML1.2 known as initialValues compartment, previously known as the defaultValue compartment, which was too easily confused with the UML Property.defaultValue, which acts at one context level higher up, and in fact carries the initial values.
Parsing snippets
randomness