Skip to content

2022-05 - SysML v2 Pilot Implementation

Choose a tag to compare

@seidewitz seidewitz released this 15 Jun 22:00
· 2029 commits to master since this release

This is an incremental update to the 2022-04 release. It corresponds to Eclipse plugin version 0.24.0.

Language Features

  1. Feature inverses (KerML only). A new feature inverting relationship has been added. The basic notation for this relationship is

    invertingnameinversefeatureInvertedofinvertingFeature;

    The invertingname part may be omitted.

    A feature inverting that is owned by its featureInverted may be specified in the declaration of that Feature:

    featurefeatureInverted inverse ofinvertingFeature;

    The inverse ofinvertingFeature part must come after any specialization or conjugation part in the Feature declaration. However, it is now allowable to specify the chaining, disjoining, inverting and featuring parts of a Feature declaration in any order.

    Two features related by a feature inverting relationship are asserted to be inverses of each other. The features can be arbitrarily nested. So, for example, given

    classifier A {
        feature b1 :B {
            feature c1 : C;
        }
    }
    

    and

    classifier C  {
        feature b2 : B {
            feature a2 : A inverse of A::b1::c1;
        }
    }
    

    then it must always be the case that, for any a1 : A, a1.b1.c1.b2.a2 == a1.
    [PR #361] [PR #366]

Model Library

Kernel Library

  1. Base. A new that feature has been added as a nested feature of things, the base for all features. It is constrained in Anything (the base type of everything) such that the that reference for all values reached by navigating through any nested feature of anything is the nesting thing.

    For example, given

    classifier Example {
        feature f;
    }
    feature x : Example[1];
    

    the value of x.f.that is x.
    [PR #365]

  2. Occurrences. Space modeling additions:

    • inner and outer space boundaries. In Occurrence, inner and outer occurrence references have been added, nested under spaceBoundary. These are space slices that also have no spaceBoundary, where the outer one surrounds the inner ones (see SurroundedBy below).
    • OutsideOf associations. The following new associations from Occurrence to itself (indirectly) specialize the existing association OutsideOf:
      • JustOutsideOf, linking occurrences that have space slices with no space between them (MatesWith).
      • MatesWith, specializing JustOutsideOf, linking occurrences that have no space between them.
      • InnerSpaceOf, linking an occurrence to another that completely occupies the space surrounded by an inner space boundary of the first occurrence. Added Occurrence::innerSpaceOccurrences as the cross-navigation feature for this.
      • SurroundedBy, linking an occurrence that is included in space by an innerSpaceOccurrence of the other. Types additional connectors in Occurrence that ensure spaceBoundary surrounds spaceInterior and spaceInterior surrounds inner space boundaries.

    [PR #360]

  3. Performances. A new this feature provides a context for performances similar to the "this" pointer in object-oriented programming languages such as C++, Java and JavaScript. For all occurrences that are not performances (such as items and parts in SysML), this defaults to self. For performances that are owned via composite features of an object (including owned actions of a part), this is the owning object. For performances that are owned via composite features of a performance (such as subactions in SysML), this defaults to the same value as for the owning performance.

    So, for example, an action declared at "package level" will be the this reference for all subactions in the composition tree it roots:

    package Example1 {
        action def A {
            action b {
                action c;
            }
        }
    
        action a : A;
        // a.b.c.this == a
    }
    

    On the other hand, an action declared within a part definition will have an instance of that part definition as the this reference for itself and all subactions within it:

    package Example2 {
        part def C {
           action a {
                action b;
           }
        }
    
        part c : C;
        // c.a.b.this == c
    }
    

    [PR #365]

Systems Library

  1. Items. Space modeling additions:

    • Generalized Item::envelopingShapes to cover curves and surfaces enveloping two dimensional shapes.
    • Added Item::boundingShapes specializing envelopingShapes as StructuredSpaceObjects in which every face/edge intersects the item.
    • Added Item::voids as the SysML name for innerSpaceOccurrences. Defined isSolid as having no voids.

    [PR #360]

  2. Actions. AcceptAction has a receiver parameter that references the occurrence via which an incomingTransfer may be accepted. The declaration for AcceptAction has been updated so that the default receiver is this (see description above). In the concrete syntax for accept actions, the receiver is specified using a via clause. The default is used if no via clause is given. For example, in

    part def Device {
        state Device_Behavior {
            state off;
            transition
                first off
                accept On_Signal
                then on;
            state on;
        }
    }
    

    the default receiver for accept On_Signal is the instance of Device owning the Device_Behavior performance. (Note that this is similar to the concept of the "context object" for event pooling in UML/SysML v1.)

    Note. Performed actions and exhibited states are always referential, not composite. Therefore, the subactions of a performed action or exhibited state do not have the performing or exhbiiting part as their this reference. Instead, this is determined by the composite structure that actually contains the action or state being performed/exhibited.
    [PR #365]

Backward Incompatibilities

  1. Reserved words (KerML). Added: inverting inverse
  2. this and that. The new feature this is inherited by all kinds of occurrences (e.g. SysML items, parts, actions, etc.). The feature that is inherited by all nested features (SysML usages). Therefore, the names this or that for features in user models.
    [PR #365]
  3. MeasurementReferences. The Quantities and Units Domain LIbrary package UnitsAndScales has been renamed to MeasurementReferences, which better reflects what it contains (units and scales are kinds of measurement references). References to the package in all other library and example models in the repository have been updated to the new name.
    [PR #369]
  4. Subsetting validation. The validation of the owner of a subsetted feature has been tightened. This may cause some new warnings in existing models. This can usually be corrected using the dot notation.
    [PR #368]

Jupyter

None.

Visualization

  1. PlantUML
    • Improved the rendering of features whose types are vector quantities.
      [PR #362 ]
  2. Tom Sawyer
    None.

Technical Updates

  1. Security advisories. Removed yarn.lock and prevented it from being recommitted for the JupyterLab extension. This eliminates security advisory notifications related to declared version dependencies.
    [PR #363]

Bug Fixes

  1. Inherited memberships. Corrected the traversal of general types in TypeImpl::addInheritedMemberships.
    [PR #367]
  2. Variation usages. Corrected the implicit subsetting for variant usages of a variation usage.
    [PR #368]
  3. PlantUML. Fixed visualization of specializations of feature chains.
    [PR #364]