Skip to content

2021-06 - SysML v2 Pilot Implementation

Compare
Choose a tag to compare
@seidewitz seidewitz released this 03 Aug 19:57
· 1733 commits to master since this release

This is an incremental update to the 2021-05 release. It corresponds to Eclipse plugin version 0.14.0.

Language features

KerML and SySML

  1. Import.
    a. Member Import. Single member import is no longer equivalent to aliasing. The notation importnamespaceQualifiedName::elementName; now imports the membership in the imported namespace given by namespaceQualifiedName whose member name is given by elementName. This works properly even if given elementName is an alias name. If namespaceQualifiedName is not given, then elementName is resolved in the containing scope of the import.
    b. Recursive Import. As previously, a recursive import of the form importnamspaceQualifiedName::**; includes the members of the namespace given by namespaceQualifiedName as well as members recursively imported from namespaces contained in the given namespace. There is now also a new form importnamspaceQualifiedName*::**; that recursively imports the members of namespaces contained in the the namespace given by namspaceQualifiedName, but does not include the direct members of the given namespace itself.
    c. Import All. Using the keywords import all rather than just import now imports memberships without regard to visibility.
  2. Implies operator. The symbol => can now be used as an alternative operator for implies.
  3. Feature Value Defaults. As previously, the feature value notation feature=expression; declares that a feature is bound to the result of the given expression (using a binding connector). This means that a redefinition of the feature that binds it to a different result will usually be semantically inconsistent. It is now possible to instead declare a default feature value using the form featuredefault=defaultExpression; or featuredefaultdefaultExpression;. In this case, unless the default is overridden, the actual binding of the feature to the result of the default expression is deferred until the containing type is instantiated. The default can be overridden in a redefinition of the feature, either with a new default or a non-default binding.
  4. Feature Chaining. A feature chain is a sequence of feature references represented using dot notation of the form f_1.f_2. ... .f_n (similar to a property path in SysML v1). Feature chains of this form can now be used as the targets of subsetting and redefinition relationships, as well as to specify the ends of connectors and the sources and targets of flows. (Dot notation can also still be used in expressions to represent the more general form of a path step expression.)

KerML Only

  1. Feature Chains. The notation featurememberNameisf_1.f_2. ... .f_n; can be used to declare a named feature specified by a feature chain.
  2. Negated Invariants. The syntax for Invariants has been extended to allow inv true and inv false, to declare Boolean expressions that are invariantly true or invariantly false, respectively. inv true is the default, corresponding to the current inv syntax.
  3. Disjoining. The notation disjoiningidentificationdisjointtypeDisjoinedfromdisjoiningType; indicates that type given by typeDisjoined is disjoint from the type given by disjoiningType (the disjoiningidentification part is optional). That is, it declares that no instance of typeDisjoined is also classified by disjoiningType. One or more such disjoining relationships can also be included directly in the declaration of the typeDisjoined, using the notation featuretypeDisjoineddisjoint fromdisjoiningType,disjoiningType... ; (the disjoint from part comes after any specialization part, but before a featured by part).
  4. Feature members. Adding the keyword member to the start of a feature declaration contained in a type now indicates that the feature is owned via a membership relationship, not a feature membership. That is, while the feature will be declared in the namespace of the containing type, it will not be featured by that type and will, instead, be featured by Anything, unless the feature declaration includes an explicit featured by part.

SysML Only

  1. Ports. Port definitions and usages are now considered to be kinds of occurrence definitions and usages. This allows then to, e.g., be used as the target of an event declaration.
  2. Perform Actions. Perform action usages are now considered to be kinds of event occurrence usages.
  3. Reference Usages. Previously, a usage declaration without a kind keyword defaulted to an attribute usage. For example mass : MassValue; was equivalent to attributemass : MassValue;. The default has now been changed to a reference usage, so that mass : MassValue; is now equivalent to refmass : MassValue; For a usage of an attribute definition this is semantically equivalent to the previous default (since attribute usages are always referential), but it also allows referential usages of any other kind of definition to be declared using the default form. (Composite usages must still be declared using the appropriate kind keyword.)
  4. Assert Constraint Usages. The notation for assert constraint usages has been extended to also allow assert not, meaning that the constraint is asserted to be false instead of true.
  5. Satisfy Requirement Usages. The notation for satisfy requirement usages has been extended to allow it to start with an optional assert keyword, to emphasize that it is a kind of constraint assertion. In addition, the not keyword can be added in front of satisfy to indicate that a requirement is not satisfied. That is, satisfyrequirementbysubject; and assert satisfyrequirementbysubject; both assert that subject satisfies requirement, while not satisfyrequirementbysubject; and assert not satisfyrequirementbysubject; assert that subject does not satisfy requirement.
  6. Multiplicity Defaults. Previously, when a usage was declared without an explicit multiplicity, the multiplicity was inherited from any implicit or explicit subsetted features. Since all the base features from the library have the most general multiplicity 0..*, this meant that 0..* was the effective default multiplicity if no more constraining multiplicity was given. Now, a default multiplicity of 1..1 is automatically added to attribute usages, item usages (including part usages, but not connection usages) and port usages, if both of the following conditions are met (if a default is not added, then the multiplicity is inherited, as previously):
    • The usage is owned by a type (i.e., a definition or usage, not a package).
    • The usage does not have any explicit subsettings or redefinitions.
  7. Parallel States. A state definition or usage can now be declared to be a parallel state by placing the keyword parallel before the start of its body, e.g., state defNameparallel{ ... } or statename:Definitionparallel{ ... }. A parallel state is one for which all its nested states run concurrently ("in parallel"). Therefore, a parallel state is not allowed to contain any successions or transitions that restrict the performance of its nested states.
  8. State Subactions. Previously, entry, do and exit actions had to appear at the very beginning of the body of a state definition or usage. Now they may appear anywhere in the body, in any order (but at most one of each).
  9. Use Cases. Use cases have now been added to the language as kinds of cases. Use case definitions and usages can be declared
    using the keywords use case def and use case, respectively. Included use case usages can be specified with a notation similar to perform action usages, but using the keyword include instead of perform. (The traditional use case "extend" relationship has not yet been implemented.)
  10. Actors. Actors can be declared as special parameters of requirements and cases (not just use cases), similarly to the way the subject of a requirement or case is declared. An actor parameter is declared as a part usage, but using the keyword actor instead of part, i.e., with the form actorusageDeclaration;. A requirement or case can have multiple actor parameters.
  11. Connections. Previously, binding connectors, successions and item flows were adopted into the SysML language directly from KerML. This has been updated so, when they are used in SysML, they are considered to be SysML usages. This means that these elements can now participate in variant modeling, individual modeling, etc, just like other SysML usages.

Model Library

Kernel Library

  1. Scalar Values. The Number types have been updated so that Real specializes Complex, Rational specializes Real and Integer specializes Rational. The relevant functions packages have also been updated to remove up-conversion functions that are no longer necessary.
  2. Exponentiation. Missing specializations of of '^' have been added to all those Kernel Library functions packages that already include '**'.

Systems Library

  1. Use Cases. A library package has been added forUseCases, with base definition UseCase and base usage useCases.
  2. Actors. An actors feature has been added to Cases::Case and Requirements::Requirement.
  3. Items and Parts. There have been updates to some of the features in the Item and Part definitions.
  4. Ports. Port now specializes Occurrence and ports now specializes occurrences.
  5. Transitions. There are technical updates to the modeling of transitions in both the Actions and States packages.
  6. Verification Method. The attribute definition VerificationMethod has been added to the VerificationCases package, for use as a metadata annotation type.

Domain Libraries

  1. Time. The Time package in the Quantities and Units Domain Library now supports the modeling of
    • Time instants
    • Time scales
    • The Coordinated Universal Time (UTC) scale
    • ISO 8601-1 date and time representation
  2. Metadata. A Metadata Domain Library has been added, with the following two packages containing attribute definitions intended for use as metadata annotation types:
    • ModelingMetadata with attribute definitions for StatusInfo, Rationale and Issue.
    • RiskMetadata with attribute definitions for RiskLevel and Risk.

Backward incompatibilities

  1. Keywords. The following new keywords have been added as reserved words:
    • KerML: conjugate default disjoining disjoint member
    • SysML: actor default include parallel use via (and the keyword affect has been removed)
  2. Aliases. The notation for an alias has been changed from aliasqualifiedNameasaliasName; to aliasaliasNameforqualifiedName;. The short form aliasqualifiedName; is no longer allowed. (Use importqualifiedName; instead.)
  3. Expose. expose now always imports elements without regard to visibility (like import all, see above).
  4. Literals. Literals for Booleans, strings and numbers are now recognized as having the appropriate library type (i.e., Boolean, String, Integer or Real). This may result in some additional validation warnings from type conformance checks not previously carried out.
  5. Unlimited Natural. The UnlimitedNatural type has been removed from the ScalarValues package and the associated UnlimitedNaturalFunctions library model has been removed from the Kernel Library. The value * is now considered to represent "positive infinity" in an extended number range, and it has type Positive.
  6. Invocation expressions. The symbol => has now been replaced with = in the named-argument notation for invocation expressions. For example, an invocation of the previously of the form ComputePosition(x_init => x_0, v_avg => v, delta_t => dt) is now written ComputePosition(x_init = x_0, v_avg = v, delta_t = dt).
  7. Connectors. The symbol => has now been replaced with :> in the named-connector end and n-ary connector notations. For example a binary connection previously of the form connectdevice => sensortobus => CAN_bus; is now written connectdevice :> sensortobus :> CAN_bus; and an n-ary connection previously of the form connect(consumer => c, server => s, publisher => p); is now written connect(consumer :> c, server :> s, publisher :> p); (The symbol :> is used here instead of = because = would indicate binding, and connector ends don't bind to their related elements, they subset them. Using binding connectors for connector ends would result in a circularity.)
  8. Feature Accessibility. A statically resolvable reference to a feature that is not semantically "accessible" will now produce a warning message. In many cases, such a warning is resolvable by using dot notation to reference the feature instead of using a qualified name.
  9. Conjugation. In the KerML conjugation relationship notation, the type keyword has been replaced with conjugate. This allows the conjugationidentification part to be optional in the notation conjugationidentificationconjugateconjugatedTypeconjugatesoriginalType;
  10. Stakeholders. Stakeholder definitions and usages have been removed from the SysML language. Instead, stakeholders can now be declared as special kinds of parameters of requirements (note that concerns and viewpoints are kinds of requirements), using the stakeholder keyword, e.g., concernsysStructure {stakeholdersysEng : Person; }. The keyword affect is no longer used.
  11. Transitions. To avoid ambiguity with the new freedom for positioning state subactions (see above), it is no longer possible to use the shorthand form doactionthentarget; for a transition usage that has an effect action but not a guard and whose source is implicitly the lexically preceding state. Instead the form transition doactionthentarget; must be used. (The transition keyword can now also be used if the transition has an accept and/or if clause, but it is then optional.)
  12. Accept actions. The for keyword has been replaced with via in the notation for accept action usages.
  13. Deprecated Functions. The following deprecated functions have been removed from the Kernel Library:
    • BaseFunctions:allInstances
    • BaseFunctions::instanceof
    • DataFunctions::'@[' (also removed in ScalarFunctions and QuantityCalculations)
    • StringFunctions::Size (use Length instead)
  14. SampledFunction. SampledFunction has been moved from the Kernel Library Collections package to a new SampledFunctions Analysis Domain Library package, and Sample and Interpolate functions (calculation definitions) have been added.

Visualization

  1. Tom Sawyer
    • Visualization of connectors whose ends are specified using feature chains.
  2. PlantUML
    • Visualization of connectors whose ends are specified using feature chains.
    • Metadata annotation visualization using note symbols.

Bug Fixes

  1. Default Specialization. Ensured that default specializations are added whenever necessary, even if the type being declared already has an owned specialization of the same kind (unless the specialization is of a type that is already a subtype of the default type).
  2. Alias members. Fixed the accidental exclusion of alias members from KerML Behavior and Function bodies.
  3. Successions. Updated the succession shorthand (then) notation to work correctly between messages/item flows that are not owned by an action definition or usage. (There are still special rules for this notation within actions.)
  4. Connections/Interfaces. Updated the Connections and Interfaces library models to add base BinaryConnection and BinaryInterface types, so that non-binary connections and interfaces can also be handled properly.
  5. Reflection. Corrected errors in the KerML and SysML reflective abstract syntax packages and updated them to the 2021-06 baseline (but still only including metaclasses with no properties).
  6. PlantUML. Fixed an error caused by expression text with line breaks.