The SysML v2 Specialization Kinds

The SysML v2 Specialization Kinds

Specialization is an important concept in modeling languages. The upcoming SysML v2 has a solid foundation of different kinds of specializations. This article provides an overview. In SysML v1 (and UML) the concept is called Generalization – just upside down.. It is basically the same, although the details are different.

SysML v2 has four different specialization relationships: subclassification, subsetting, redefinition, and definition. All of them are important mechanisms to enable the reuse of elements. A specialization relationship links a specialized element to a more general element. The specialized elements inherit the features from the general ones and can add additional or change existing features.

The following figure shows the various specialization relationships between definition and usage model elements. The relationships are described in more detail below. The first description of the definition relationship also briefly explains the SysML v2 concepts of Definition and Usage.

Definition (defined by)

The defined-by relationship between a usage and a definition element is very common in modeling languages.

part engine1 : Engine;
part def Engine;

The model element “Engine” is a SysML v2 part definition (similar to a block in SysML v1). It specifies a part usage “engine1” (similar to a part property in SysML v1). The part definition is a blueprint independent of the context where an engine can be used. The underlying mechanism is a kind of specialization. “engine1” inherits all features from its definition “Engine” and can add additional features or redefine inherited ones. The concept of definition and usage is broadly used in SysML v2. It also provides, for example, ActionDefinition, ActionUsage, RequirementDefinition, RequirementUsage, PortDefinition, PortUsage, StateDefinition, StateUsage, and so forth.

Subclassification (specializes)

Subclassification is a specialization relationship between definition elements. The following example shows a subclassification between the part definition “DroneEngine” and a more general part definition “Engine”.

part def DroneEngine :> Engine {
  attribute prop : PropKinds;
part def Engine {
  attribute power;

The part definition “DroneEngine” has a total of two attributes: the inherited attribute “power” and the attribute “prop”. The textual syntax of subclassification is the “smiley” symbol“:>”. Alternatively, you can write the keyword “specializes”.

part def DroneEngine specializes Engine { …

Subsetting (subsets)

Subsetting is similar to subclassification but a specialization relationship between usage elements. The subsetting part specifies elements that are a subset of the elements specified by the subsetted part. Subsetting includes the subsetting element inheriting all the features from the subsetted element. For example, a part “engine1” is a subset of the part “engines” and is therefore also defined by the part definition “Engine”.

part engines[4] : Engine;
part engine1 :> engines;
part engine2 :> engines;

Since the mechanism is similar to the subclassification, it uses the same smiley symbol. Alternatively, the keyword “subsets” can be used.

part engine3 subsets engines;
part engine4 subsets engines;

Redefinition (redefines)

Instead of subsetting a usage, it can be redefined by a new usage in a specific context. The drone has engines of the type “Engine”. The specialized drone “ForestFireObsersationDrone” has engines of type “DroneEngine”. The part “propEngines” with the new type redefines the inherited part engines.

The textual syntax of the redefinition is the “sergeant” symbol “:>>”.

part def Drone {
  part engines[4..8] : Engine;
  attribute vendor : ScalarValues::String;
part def ForestFireObservationDrone :> Drone {
  part propEngines[4] : DroneEngine :>> engines;
  :>> vendor = "MBSE4U";

Instead of “:>>”, you can write the keyword “redefines”. The redefinition of the attribute “vendor” is a shorthand notation of

attribute vendor redefines vendor = "MBSE4U";


Leave a Reply

Your email address will not be published. Required fields are marked *