Full Support for SysML v2
Is your feature request related to a problem?
The SysML v2 Request for Proposal was released in December 2017. The final submission is expected in 2022Q2, with the final release probably in 2023.
This feature request states our intent to upgrade to SysML v2, with work starting once the final submission is made. Ideally, we can beat the bigger commercial tools and be the first out of the gate.
API Services are also being tracked in #1188 Text entry of diagrams are also being tracked in #615
Hello guys, we just had some discussion on the systems engineering discord server, and actually this would be a great feature, because SysML V2 really lacks an editor. What I found that everything they made is based on EMF, and actually there are some libraries capable of handling EMF. What do you think, should we make some steps towards SysML V2 support?
@sz332 Ready to help us figure out how to do that?
https://github.com/Systems-Modeling/SysML-v2-Release this is the release page for SysML-v2. https://github.com/Systems-Modeling/SysML-v2-Pilot-Implementation is the location for a reference implementation.
SysML V2 is based on KerML instead of just being an UML profile. KerML is implemented on top of EMF metamodel and there is a Jupiter support so theoretically we could import KerML / SysML v2 from Python, that part is expected to be implemented.
So the model can be read and probably extended, but the part on how to actually display a diagram is totally missing. That would be a huge, HUGE advantage of Gaphor.
All this SysML code is Java. They support a Jupyter kernel (in Java), but that only allows for interacting with it through the notebooks.
Anyway we need a SysML V2 model in Gaphor, so we need to have the model available to Gaphor and create presentation element on top of those.
I think the relevant documentation is in the sysml github repo, in particular 2-OMG_Systems_Modeling_Language.pdf.
It looks like KerML has a lot of overlap with the UML core modules.
I found that there are libraries that can work with ecore files. Might it help?
We'll have to figure that out. Our data model has some features not present in (for example PyEcore), such as event emission. We may be able to use them to generate (part of) the data model, though, since they contain the same constructs.
I started looking at this more recently. The current KerML Spec is 383 pages. It is divided into Root, Core, and Kernel.
The root is the syntactic foundation of KerML (lowest level). I think the first step is would have to build a way to convert the Concrete Syntax in to Python by creating a lexical and syntactic parser using pyparsing or similar.
I started looking into using textx to parse the model. The hope is, that a significant amount of the available xtext grammar could be reused. Unfortunately I‘m not familiar with DSL‘s and the respective tooling which will make this a very lengthy effort.
@henkelma Cool, I started looking at this too, but glad to have help!
We could probably move this under the Gaphor organization, but I started converting the xtext to textx here: https://github.com/danyeaw/textx-sysmlv2. Since the xtext is licensed with LGPL, it probably doesn't make sense to put it in the main Gaphor repo.
Since a lot of the definitions depend on other definitions, for now I commented out a lot of it and then we can slowly start uncommenting things.
There is a talk about SysML v2 that OMG just released: https://www.brighttalk.com/webcast/12231/589959