Skip to content

2021-01 - SysML v2 Pilot Implementation

Compare
Choose a tag to compare
@seidewitz seidewitz released this 09 Feb 22:17
· 2195 commits to master since this release

This is an incremental update to the 2020-12 release. It corresponds to Eclipse plugin version 0.9.0.

Language features

  1. Recursive import. An import ending in ::** rather than ::* (i.e., of the form importnamespaceName::**;) will now not only import the public members of the named namespace, but will also, recursively, import the public members of all public owned members of the namespace.
  2. Element import filtering. It is now possible to filter the imported members of a package using a model-level evaluable Boolean expression, providing a basic "smart package" capability. Currently, such expressions can only query the metadata annotations of an element (and their attribute values), not the actual metamodel properties of the element.
    • A filter member can be included in a package using the syntax filterconditionExpression;. Any imported member included in the package must meet all the filter conditions for the package.
    • Filter members can also be included in view definitions and view usages. The exposed elements of a view usage are filtered by all the filter conditions of the view usage and those of its view definition.
    • A filter condition can be added to any import using the syntax importnamespaceName::*[conditionExpression];. This will result in the import of only elements that meet the given filter condition expression. A filtered import may also be recursive (using ::**), and it may include multiple filter condition expressions, all of which must be met by any imported element.
  3. Structures. Previously, a KerML Class classified Objects and a Behavior classified Performances. Objects and Performances are both kinds of Occurrences, but there was no abstract syntax for distinguishing Classifiers that classify any kind of Occurrence. This has been changed so that a Class can classify any kind of Occurrence, and a Structure (keyword struct) is used to specifically classify Objects. Structure and Behavior are now both peer subclasses of Class in the abstract syntax.
  4. Associations. Previously, a KerML Association was a subclass of Class in the abstract syntax, classifying Links that were kinds of Objects. This meant that all Links where Occurrences that existed over time. This was problematic for model-library Associations like HappensBefore and HappensDuring, which actually define time ordering and, therefore, cannot exist in time themselves. This has been changed so that Association is a kind of Classifier and a peer to Class and DataType, and Link is a direct specialization of Anything. An AssociationStructure is then both an Association and a Structure, classifying LinkObjects that are both Links and Objects, with the same Occurrence semantics that Link previously had. SysML ConnectionDefinitions are now kinds of AssociationStructures.

Backward incompatibilities

  1. Keywords. The following new keywords have been added as reserved words:
    • KerML: filter struct
    • SysML: filter
  2. Units operator. The units operator @[ is now a single token. This means that it is no longer legal to have a space between the @ and the [. For example, 1000@[kg] and 1000 @[kg] are both legal, but 1000@ [kg] is not.

Jupyter

  1. Magic command arguments. Arguments to Jupyter "magic" commands (such as %show and %publish) that name SysML elements will now resolve for pre-loaded library elements as well as for user-model elements.
    Note. The names used in magic commands still must always be fully qualified. Imports done within previous cells are not recognized. Due to the magic command syntax processing, any name that contains spaces or other special characters must be surrounded (in its entirety) in double quotes (e.g., "'Name with spaces'::nameWithoutSpaces").
  2. List command. A new %list command has been added.
    • Used without an argument (%list), the command lists all the top-level library packages that have been loaded.
    • Used with the name of an element (%listqualifiedName), the command lists the type, human Id (if any), primary name and UUID for the named element.
    • Used with import syntax (%listqualifiedNamespaceName::*), the command lists all the public members of the named namespace. Recursive import and filter condition syntax can also be used (%listqualifiedNamespaceName::**[conditionExpression]), giving a basic model query capability.

Visualization

  1. Tom Sawyer
    • Implemented a mechanism to add new views into the active diagram. This allows the creation of diagrams that have different kinds of views at the same time (at this moment decomposition and interconnection views).
  2. PlantUML
    • None.

Technical Improvements

  1. Implicit relationships. Similarly to implicit Generalizations (as implemented in 2020-11), implicit TypeFeaturing and BindingConnector relationships are no longer physically inserted into the model, but are recorded separately. This further improves improves performance with respect to Xtext lazy-linking proxy resolution. After normal processing is complete, the implicit TypeFeaturings and BindingConnectors can be explicitly inserted into the model using the Feature::addImplicitTypeFeaturing and Type::addImplicitBindingConnectors methods.
  2. Automatic Testing. The Maven build has been updated to automatically run unit tests.