SysML v2 Release: What’s inside?

SysML v2 Release: What’s inside?

SysML v2 Logo

This article gives an overview of the regularly published SysML v2 releases containing the current status of the language and pilot implementation development. It is based on the script of the MBSE podcast #3: Unboxing SysML v2.

Most of what you see in the SysML v2 releases is a look under the hood. For example, most examples are textual, but the SysML v2 will not be a pure textual language. The textual notation will be a new, additional view on the model. In some cases, a textual notation might be a better way to create or review a model. The current SysML v2 releases focus on the textual notation, but the graphical syntax will be added later.

The SysML v2 is developed by the SysML submission team (SST). It is a collaborative initiative of over 70 organizations and 170 people. The SST works on submission documents that specify the next-generation modeling language SysML v2 as a response to the RFP published by the OMG. See also the blogpost series about the SysML v2 RFP.

The SST also works on a pilot implementation of SysML v2 and SysML v2 API & Services. The SysML v2 specifications and the pilot implementations are part of regular SysML v2 releases which are available on GitHub: https://github.com/Systems-Modeling/SysML-v2-Release/releases.

The release is a zip (or tar.gz) file containing several folders and files. This blogpost is based on the release 2020-11.

In the root directory you find:

  • a readme file (PDF and markdown format)
  • License files
  • Folders:
    • Doc
    • Install
    • Kerml
    • Sysml
    • Sysml.library

License

Let’s start with the legal stuff: the licenses. The specification documents are copyrighted by the SST member organizations listed in those documents under the terms given there. The introduction presentation to the SysML v2 language is copyrighted by Model Driven Solutions, Inc., and licensed under the Creative Commons Attribution 4.0 International License. The Jupyter and Eclipse software and all included SysML v2 models are licensed by the respective copyright holders under the GNU Lesser General.

Documentation

In the folder “Doc”, you can find the current status of the SysML v2 submission documents. There are three parts. In addition, the folder also includes a PDF of a presentation that introduces the SysML v2 language. It mainly describes the textual syntax of SysML v2.

Part 1 of the submission documents is the specification of KerML. KerML is the new metamodel of SysML v2. While SysML v1 is based on UML, SysML v2 gets a brand new metamodel.

KerML is independent of the systems engineering domain. The scope chapter in the document states:

“The Kernel Modeling Language (KerML) provides an application-independent syntax and semantics for creating more specific modeling languages.”

For example, KerML specifies the concept of types and features. In chapter 7.3.2.3.1 of the document, you can see a figure of the abstract syntax of the types and feature definition. In the diagram, you can see that a Feature is a kind of a Type. That is new in SysML v2. Features, for example, properties, can also be types. In the diagram you also see the element FeatureMembership which specifies, for example, that a Feature is a member of a Type.

We will see these elements again later when we have a look at the pilot implementation.

The second part of the submission documents specifies the SysML based on KerML, which is application-independent.

The third part of the submission documents specifies the Systems Modeling API and Services.

Installation of the pilot implementation

The folder “install” contains two subfolders: eclipse and jupyter.

The release contains two different implementations: a Eclipse-based and a Jupyter-based pilot implementation.

Eclipse

In the eclipse folder, you find a README file that explains how to install the SysML v2 pilot. First, you need Eclipse. You can download it from eclipse.org/downloads. The eclipse installer asks for the edition you would like to install. The editions a predefined sets of Eclipse tools. I always select the Eclipse Modeling Tools package, but it should work also with the other ones if they include a Java Development Kit.

Once you’ve installed Eclipse you can follow the guideline in the README file. The last time I did it, it works exactly like it is described.

If you are not familiar with Eclipse, you may be desperate to find the Preferences menu item mentioned in the ReadMe file: it is located under the Windows menu entry.

When you have installed everything, you can have a look at the example models or training models. You can find them in the sysml project.

You can also create your own SysML v2 modeling project. The ReadMe file describes how to create the project. The introduction PDF in the folder “doc” mentioned before explains how to write the SysML v2 textual syntax.

I created a small SysML v2 model. It contains a part definition which is a block in SysML v1.

 /**
  * Example MBSE4U Blogpost: What's inside the SysML v2 Releases 
  **/
  
 package MBSE4U {
  
   import ScalarValues::*;
  
   part def SimpleSystem {
     attribute mass:Real;
   }
 
   part mySystem : SimpleSystem {
     part p1 : SimpleSystem;
     part p2 : SimpleSystem;
     part p3 : SimpleSystem;
   }
 } 

The part definition named SimpleSystem contains one attribute mass. Additionally, the model defines a part named mySystem of type SimpleSystem that contains three more parts p1 to p3 each of type SimpleSystem.

The outline view in Eclipse shows the structure of the model. If the outline view is not already open, you can open it by selecting it in the Windows | Views menu.

Coming back to the KerML elements Type, Feature, and FeatureMembership from KerML specification document: In the outline view you see, for example, the PartDefinition SimpleSystem, and the AttributeUsage mass which is a special feature, and in between the FeatureMembership.

The Eclipse implementation also provides a graphical view of the model. If you have installed PlantUML, you can select the PlantUML view in the Windows | Views menu. The view depicts the simple model in a graphical notation. It is already the planned SysML v2 notation in a preliminary version.

Jupyter

Let’s switch to the other SysML v2 pilot implementation in the folder “jupyter”. There is also a README file in the folder that explains very well how to install jupyter lab. When everything has been installed, you can start jupyter lab by typing jupyter lab in the console.

When jupyter lab has started, you immediately see the SysML button. If you click on it, you can start writing SysML v2 code. I copy & paste the code from the example above.

What can we do with it?

You can call the show command, to get an output of the model structure similar to the outline view in Eclipse. That is a very deep insight, and you need a good knowledge of the SysML v2 metamodel to understand it.

You can call the viz command to get a graphical visualization of the model.

You can also call the publish command, to publish the model to a SysML v2 repository server provided by intercax:

The repository server provides a pilot implementation of the new SysML v2 API & Services standard. In addition to the language SysML v2, there will also be a standard for an API. That’s pretty cool and a game changer. The API enables tool interoperability and you can access a SysML v2 model independent of the tool that stores it.

You can access the pilot implementation of the API with a web browser at: sysmlv2.intercax.com:9000/docs.

The pilot implementation is based on REST/HTTP and is comfortable accessible via Swagger. The SysML v2 API standard will also include an OSLC binding.

Now, for example, you can get the list of projects on the serve: click on Get /projects and then on the button “Try it out”. The project list also includes the unique ids of the projects.

With the project ID, you can send another request to the API to get the list of commits. Each commit has again an ID. With the project ID and the commit ID, you can access the elements. And so on.

To ask questions about using the SysML v2 releases or to provide feedback, you can use the comment form below or join the SysML v2 Release Google Group: while logged into a Google account, select “Apply for Membership”, provide your full name, organizational affiliation and interest in SysML. Once your application has been accepted, you can post to the group using the email sysml-v2-release@googlegroups.com.

 

9 Responses

  1. […] Lektüre sucht, kann sich in den Feiertagen mit der SysML v2-Spezifikation auseinandersetzen. Tim Weilkiens hat auf seinem Blog eine schöne Übersicht veröffentlicht. Diese ist ein guter Einstiegspunkt für diejenigen, die sich noch tiefer in die Materie […]

  2. Gorenje says:

    If you want to run SysML + Jupyter in Docker then checkout the Dockerfile –> https://gist.github.com/gorenje/1799777e28bd68c473ac83df3f0e157a

  3. Luis says:

    In SysML 1.6 the trend seemed to be that bdds were going to disappear, as they were no longer needed to define part-whole relationships.
    However Bdds seemed to me the place to represent other information that is organized hierachically. For example:
    * Inheritance
    * Functional hierarchies, required by some MBSE methodologies.

    However this preliminary notation created by Jupyter is similar to a bdd, isn’t it? Which for me is kind of relieving 🙂

    What will happen in your opinion with this kind of tree-like diagrams? Will they still be part of SysML2 ?

    Best wishes,
    Luis.

  4. Luis says:

    Many thanks for the link, which eventually has taken me to the FAS method and plugin which I am sorry to say I didn’t know before.

    Please forgive me if this is not the right place to ask:

    In SysML 1.X I have had difficulties at understanding the relationship between activity trees and activity diagrams. On paper I think I understand: a composition (or at least its end role) in an activity diagram corresponds to a call behaviour action in an activity diagram. This is a very nice parallelism with block use in ibds.

    However the tool I use does not seem to implement this feature: I would expect, once a composition is drawn between Activivy F1 and Activity F1.1, that the tool can automatically create the corresponding call behaviour action in an activity diagram of F1. This seems to be because F1.1. just appears as an “attribute” of F1 in the model. Not as a call behaviour action.

    I’ve always wondered if this was a bug of the tool or rather bug of the SysML metamodel, and if so, is this ‘fixed’ in SysML2 with action definitions and actions?

    Many thanks and best wishes,

    Luis.

    • Tim Weilkiens says:

      The tool could create the corresponding call behavior action if you model the composition between activities. It is important that the part property created by the composition relationship is an adjunct property. That is a stereotype of SysML that has a property called principal which points to the call behavior action.

      The principal is a mandatory field, which means, the tool must create/link a call behavior action if it conforms to the standard.
      The tools are often a bit weak regarding adjunct properties. It is also a special, rarely used area of SysML. The adjunct properties are a helpful construct to overcome the separation of behavior and structure, which is given in SysML by the underlying UML. This will no longer be the case with SysML v2.

      • Luis says:

        Many thanks!

        I checked if my tool implemented adjunct properties. Turns out it does, but apparently won’t create the call behaviour action from the adjunct property automatically. It will just warn that there the principal is empty, saying that the adjunct property is out of sync. I still have to create the call action manually and tell the tool to use it as principal.

        Perhaps a bit obscure to be taught in an introductory course on SysML (I am the teacher btw!)

        Best wishes and thanks again,

        Luis.

  5. Hi again,
    I cannot seem to find actors and use cases in the Release. Are they finally ‘dead’ as you had predicted years ago?
    Many thanks,
    Luis

    • Tim Weilkiens says:

      Hi Luis,

      The use cases will be part of SysML v2, but they are not yet part of the current release. I assume that there will be no explicit model element for actors. So, finally they are dead 🙂

      To be more precise and as written years ago: the concept is still alive, but there is no need for a model element. Like the parts of a system, the actors are part of the environment from the viewpoint of that system, but could be part of another system.

Leave a Reply

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