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.

 

One Response

  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 […]

Leave a Reply

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