Promotes your MBSE Future

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.

 

48 Responses

  1. Gorenje says:

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

  2. 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.

    • Tim Weilkiens says:

      It will be possible to create similar diagrams with SysML v2 as in SysML v1. It is also still possible to define parts. Instead of blocks, the model element is named PartDefinition.

      I’ve started playing around with SysML v2 to explore the new features and their impact on methodologies: https://nbviewer.jupyter.org/github/MBSE4U/SysMLv2JupyterBook/blob/master/SysMLv2JupyterBook.ipynb

      • Joshua Roth says:

        Thanks a lot for the link, it was very helpful for getting started with SysML V2 after switching from SysML V1.6.
        When making requirement constraints, is it possible to somehow visualize whether or not a system does fulfill certain requirements?

        Many thanks

        • Tim Weilkiens says:

          Hi Joshua!

          You can model that requirements are satisfied by something. A tool could validate and visualize it.

          Cheers,
          Tim

          • Joshua Roth says:

            Hi again, thanks for your reply.
            In a scenario where there is a car which consists only of a motor and a chassis (it probably wouldn’t drive), and each of them have a specific mass value, and the car itself has a totalMassLimit. Your answer makes me think that is it impossible to see whether or not the totalMassLimit is exceeded by the actual mass while only using jupyter. Is that right?
            If yes, which tool do you recommend to visualize if a specific car meets the requirements?

            Thanks again,
            Joshua

            • Tim Weilkiens says:

              You can model that totalMass is the sum of the mass of the parts. However, the calculation does not happen in the current SysML v2 pilot implementation. Maybe it will be part in the future, and I am pretty sure that future commercial SysML v2 tools will provide that capability.

              The same can be modelled with SysML v1, and some of the existing SysML v1 modeling tools can automatically calculate it.

              • Christoph Grimm says:

                We are doing this calculation in our tool SysMD that is based on a rather small KerML/SysMLv2 subset.

                We are about to publish this tool in the near future on GitHub.

  3. 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.

  4. 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.

  5. Ashitha says:

    Could you please tell me how it can be compared to C4 model? Or could you please explain what SysML v2 does in simple terms?

    • Tim Weilkiens says:

      SysML v2 is a modeling language for systems engineering. The specification sets the scope

      “SysML is a general-purpose modeling language for modeling systems that is intended to facilitate a model-based systems engineering (MBSE) approach to engineer systems. It provides the capability to create and visualize models that represent many different aspects of a system including its requirements, structure, behavior, and the constraints on its system properties to support engineering analysis.” (SysML v2 Specification)

      C4 is a special modeling language for software architectures.

  6. Badreddine Rhannou says:

    https://github.com/Systems-Modeling/SysML-v2-Release/blob/master/doc/2-OMG_Systems_Modeling_Language_(SysML).pdf

    When I oppen it, it’s says “404 Page not found”. I’m looking for “SysML v2 Specification” (your fist reply to Ashita : SysML v2 is a modeling language for systems engineering. The specification sets the scope

    “SysML is a general-purpose modeling language for modeling systems that is intended to facilitate a model-based systems engineering (MBSE) approach to engineer systems. It provides the capability to create and visualize models that represent many different aspects of a system including its requirements, structure, behavior, and the constraints on its system properties to support engineering analysis.” (SysML v2 Specification)

    C4 is a special modeling language for software architectures.”
    Thank you again

  7. Sudhir says:

    Hello Tim Could you please explain in few words how C4 model and sphinx needs can be compared.

  8. At RHEA we are very excited at SysML2, and because of that we are developing an open-source implementation of SySML2 in .NET (C#) so it is also available in that ecosystem next to the Java / Python implementation. Visit the source repository at https://github.com/RHEAGROUP/SysML2.NET.

  9. R Wright says:

    Hi Tim,
    I have a simple question. To put it in context I looked at SysML 1 a couple of years ago and concluded it was not going to add value to a software project. Others had pointed out its limitations, so I decided to wait for SysML 2. Having looked at the new language it’s clearly very different which, by inference, supports my concerns about SysML 1. It was clearly half-baked. Given the same people were involved in 1 and 2 I am now concerned SysML 2 will be another turkey. I could be wrong, and proof is in the pudding, so can someone cite an application that was successfully developed using SysML 2? One that is public about its use case and how SysML 2 was used.

  10. Ann-Christin Loth says:

    Hi Tim,

    I have a question regarding the semantics of actions. I heard that it is not based on petri net semantics anymore but dont really understand how it will be solved in SysML v2 to get the exact mathematical definition of the petri net semantic. And how will this change affect modelers in their daily work? Could you help me with that?
    Many thanks in advance!
    Ann-Christin

    • Oddly enough, your comment has only just reached me via email, even though it’s from May. So I apologize for my late reply.

      The SysML v2 actions are not based on petri net semantics. A SysML v2 action is an occurrence usage. The actions can be ordered by successions which define that one action happens before another action.

      What’s missing from your point of view?

      Cheers,
      Tim

Leave a Reply

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