Git Product home page Git Product logo

systems-modeling / sysml-v2-pilot-implementation Goto Github PK

View Code? Open in Web Editor NEW
122.0 30.0 24.0 538.87 MB

Proof-of-concept pilot implementation of the SysML v2 textual notation and visualization

License: GNU Lesser General Public License v3.0

Java 92.29% GAP 6.57% Xtend 0.91% JavaScript 0.05% Batchfile 0.01% Shell 0.01% Python 0.10% TypeScript 0.06%
eclipse-installer sysml xtext plantuml eclipse-modeling mbse systems-engineering

sysml-v2-pilot-implementation's Introduction

SysML v2 Pilot Implementation Protoyping

This software is licensed under the GNU Lesser General Public License. See the files LICENSE and LICENSE-GPL.

Installation Instructions

Development Environment

Install using Oomph Installer

The project provides a configuration file for the Eclipse Installer which eases the creation of reproducible development environments.

  1. Download the Eclipse Installer from https://www.eclipse.org/downloads/packages/installer.

  2. Clone our GitHub repository from the URL below.

  3. Open Eclipse Installer and switch to Advanced mode:

    switch to advanced mode

  4. In the product list, select "Eclipse Modeling Tools" with Product Version: 2024-03.

  5. In the Projects window, to the right of the text box, click the "+" to the add the Sysml2 project as user project. In the dialog, choose Catalog: Github Projects and browse the file system to select the setup file from the local git repository.

    • e.g. file:/C:/git/sysml/SysML-v2-Pilot-Implementation/org.omg.sysml.installer/SysML2.setup

    • Note: If you have installed the SysML v2 Pilot Implementation previously, this may already be pre-selected.

  6. Select SysML2 in the Projects list:

    oomph projects

  7. On the next page, update the following variables, then press Next.

    • Git clone location rule: Select "Located in specific absolute folder location" and browse to the directory for the SysML git repository.

    • Root install folder: Change this if you wish the installation to be under a specific folder.

    • Workspace location rule: Change this if you wish to place the workspace at a specific location.

  8. On the Confirmation page, press Finish.

  9. (Optional) For PlantUML visualization, GraphViz is needed. Visit https://www.graphviz.org/download/ and download the appropriate package for your environment.

    • In the menu of Window > Preferences > PlantUML in Eclipse environment, you may set up the path to GraphViz executable if Eclipse cannot automatically find it. For detail, visit https://plantuml.com/en/eclipse

Manual installation

  1. Install Eclipse 2024-03 (4.25) and Xtext.

  2. Clone our GitHub repository from the URL below.

  3. Import projects from the repository into your Eclipse workspace. This should include at least the projects:

    • org.omg.sysml

    • org.omg.kerml.expressions.xtext

    • org.omg.kerml.expressions.xtext.ide

    • org.omg.kerml.expressions.xtext.ui

    • org.kerml.xtext

    • org.kerml.xtext.ide

    • org.kerml.xtext.ui

    • org.sysml.xtext

    • org.sysml.xtext.ide

    • org.sysml.xtext.ui

Note:

  • Gradle is used to build project org.omg.sysml.jupyter.

  • Maven is used to perform a coordinated build of all projects (including packaging the SysML Interactive JAR file that is used by org.omg.sysml.jupyter).

  • To build the repository, invoke mvn clean package from the base SysML-v2-Pilot-Implementation directory.

  • If you have M2Eclipse installed (with the Tycho Project Configurators connector), it can also launch a Maven build in Eclipse using the launch configuration in SysML-v2-Pilot-Implementation/launch.

Prototype SysML Implementation

Getting Started

  1. Find the file org.omg.kerml.expressions.xtext/src/org.omg.kerml.expressions.xtext/KerMLExpressions.xtext, right click on it, and select Run As > Generate Xtext Artifacts, to execute the Xtext generator. Repeat with org.omg.kerml.xtext/src/org.omg.kerml.xtext/KerML.xtext and org.omg.sysml.xtext/src/org.omg.sysml.xtext/SysML.xtext.

  2. Once the generation is complete, right click on project org.omg.sysml, and select Run As > Eclipse Application. This should launch a new runtime Eclipse instance.

  3. Add the SysML-v2-Pilot-Implementation Git repository (already cloned previously) to the runtime Eclipse instance.

  4. Turn off Project > Build Automatically.

  5. Import the projects kerml, sysml and sysml.library into the runtime Eclipse workspace. (See the following section if you wish to create additional projects.)

  6. Execute Project > Clean with the following settings:

    • Clean all projects: Not selected

    • sysml.library: Selected

    • Start a build immediately: Selected

    • Build only the selected projects: Selected

  7. Repeat Project > Clean as above for kerml and sysml.

    • Important: Be sure to first build only sysml.library before building kerml or sysml.

  8. Double clicking on any .kerml or .sysml file will open it in the generated Xtext KerML or SysML editor.

  9. (Optional) To show SysML diagrams, in Window > Show View > Other…​ menu, you can enable PlantUML view.

Initializing New SysML Model Projects

  1. Open the New project wizard by selecting File > New > Project…​ menu item.

  2. Select General/Project.

  3. Give the project its expected name (and location if necessary), then press Next.

  4. On the Project References page, check the sysml.library project. This step tells Eclipse which other projects should be visible for resolving cross-references.

    project wizard

  5. Right-click the new project and select Configure > Convert to an Xtext project. This step sets up the indexing infrastructure necessary for resolving references between different files.

  6. Create any text files with .kerml or .sysml extensions to start working with a new file.

Note: Adding the project references to an existing project can be done in the project Properties dialog available from the popup menu on the project in the Project References page.

Note: If the Xtext setup (step 5) is missing, opening the KerML or SysML editor shows a dialog asking to convert the project to an Xtext project. Accepting this has the same results as manually selecting the menu item on the project.

For new code

Set up a Java code template as follows:

  1. Window > Preferences (Mac-OS: Eclipse > Preferences)

  2. Java > Code Style > Code Templates

  3. Code > New Java files > Edit

  4. Prepend (insert above the existing content) the following and modify the second line:

    /**
     * SysML 2 Pilot Implementation
     * Copyright (C) 2020  California Institute of Technology ("Caltech")
     *
     * This program is free software: you can redistribute it and/or modify
     * it under the terms of the GNU Lesser General Public License as published by
     * the Free Software Foundation, either version 3 of the License, or
     * (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU Lesser General Public License for more details.
     *
     * You should have received a copy of the GNU Lesser General Public License
     * along with this program.  If not, see <https://www.gnu.org/licenses/>.
     *
     * @license LGPL-3.0-or-later <http://spdx.org/licenses/LGPL-3.0-or-later>
     */
  5. Apply > OK

For existing code

  • When modifying existing code created by someone in a different organization, add a new copyright line, without changing anything else in the header.

  • When modifying existing code for the first time in a new year, add the year as the latest year in the appropriate copy right line. (E.g., in 2021, "Copyright © 2020" becomes "Copyright © 2020-2021" and in 2022 it becomes "Copyright © 2020-2022".)

sysml-v2-pilot-implementation's People

Contributors

arminzavada avatar arshad1990 avatar balazsgrill avatar borzi avatar capsulecorplab avatar conradbock avatar dependabot[bot] avatar grafandreas avatar himi avatar hpdekoning avatar ivan-gomes avatar kris7t avatar miyakowilson avatar seidewitz avatar thekorpos avatar tiloschreiber avatar ujhelyiz avatar wpiers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sysml-v2-pilot-implementation's Issues

Fork visualization correct?

Dear Developers,

When I visualize the following sysml code,

package ForkVisualization1 {
	action Example {
		// actions
		action A;
		action B;
				
		// synchronization points
		fork fork1;
		join join1;
		
		// order
		first start then fork1;
		
		first fork1 then A;
		first fork1 then B;
		
		first A then join1;
		first B then join1;
		
		first join1 then done;  
	}	
}

I get
image

This visualization is as expected.

However, when I visualize the following sysml code [which imho is equivalent to the earlier code]

package ForkVisualization2 {
	action Example {	
		// actions
		action A;
		action B;
				
		// synchronization points
		fork fork1;
		join join1;
		
		// order
		first start then fork1;
		
		first fork1;
			then A;
			then B;
		
		first A then join1;
		first B then join1;
		
		first join1 then done;
	}	
}

I get
image

I get an additional and unexpected extra synchronization bar.
Is this a bug in the visualization?
If not, could the documentation better explain why this is ok?

Thanks in advance,

Pierre

NullPointerException when Loading Resource in Standalone Transpiler

I am attempting to write a standalone "transpiler" for SysMLv2. The idea is to traverse the generated model to automatically generate some configuration files. I'm new to Xtext as a whole, so I haven't made much progress. Currently, I'm just trying to load a SysML file and dump the model.

My code is:

package io.github.ammrat13.sysml.test;

import org.eclipse.emf.common.util.URI;
import org.eclipse.xtext.resource.XtextResourceSet;
import org.omg.sysml.lang.sysml.SysMLPackage;
import org.omg.sysml.xtext.SysMLStandaloneSetup;

public class Test {

	public static void main(String[] args) {

		// Register file extensions for SysML, as well as the actual EMF package
		// See: https://wiki.eclipse.org/EMF/FAQ#How_do_I_use_EMF_in_standalone_applications_.28such_as_an_ordinary_main.29.3F
		SysMLStandaloneSetup.doSetup();
		SysMLPackage.eINSTANCE.eClass();

		// Create the resource set we're going to use for compiling
		XtextResourceSet resourceSet = new XtextResourceSet();

		// Load all the files given in the arguments as resources
		for (String arg : args) {
			// Dump the file we're loading
			System.err.println("Loading: " + arg);
			// Create the resource
			URI uri = URI.createFileURI(arg);
			resourceSet.getResource(uri, true);
		}
	}

}

The printout is:

Loading: /home/ammrat13/Desktop/test.sysml
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.eclipse.emf.ecore.EStructuralFeature$Internal$DynamicValueHolder.dynamicGet(int)" because "settings" is null
	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateSingleEObject.dynamicSet(EStructuralFeatureImpl.java:2664)
	at org.omg.sysml.lang.sysml.impl.OwningMembershipImpl.setOwnedMemberElement(OwningMembershipImpl.java:276)
	at org.omg.sysml.lang.sysml.impl.OwningMembershipImpl.setMemberElement(OwningMembershipImpl.java:238)
	at org.omg.sysml.lang.sysml.impl.MembershipImpl.eUnset(MembershipImpl.java:596)
	at org.omg.sysml.lang.sysml.impl.OwningMembershipImpl.eUnset(OwningMembershipImpl.java:465)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eUnset(BasicEObjectImpl.java:1197)
	at org.eclipse.xtext.linking.impl.AbstractCleaningLinker.clearReference(AbstractCleaningLinker.java:120)
	at org.omg.kerml.xtext.scoping.KerMLLinker.clearReference(KerMLLinker.java:77)
	at org.eclipse.xtext.linking.impl.AbstractCleaningLinker.clearReferences(AbstractCleaningLinker.java:115)
	at org.omg.kerml.xtext.scoping.KerMLLinker.clearReferences(KerMLLinker.java:42)
	at org.eclipse.xtext.linking.lazy.LazyLinker.access$200(LazyLinker.java:63)
	at org.eclipse.xtext.linking.lazy.LazyLinker$2.process(LazyLinker.java:102)
	at org.eclipse.xtext.linking.lazy.LazyLinker$2.process(LazyLinker.java:94)
	at org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:38)
	at org.eclipse.xtext.util.OnChangeEvictingCache.execWithoutCacheClear(OnChangeEvictingCache.java:145)
	at org.eclipse.xtext.linking.lazy.LazyLinker.doLinkModel(LazyLinker.java:94)
	at org.eclipse.xtext.linking.impl.AbstractCleaningLinker.linkModel(AbstractCleaningLinker.java:52)
	at org.eclipse.xtext.resource.XtextResource.doLinking(XtextResource.java:353)
	at org.eclipse.xtext.linking.lazy.LazyLinkingResource.doLinking(LazyLinkingResource.java:122)
	at org.eclipse.xtext.resource.XtextResource.updateInternalState(XtextResource.java:304)
	at org.eclipse.xtext.resource.DerivedStateAwareResource.updateInternalState(DerivedStateAwareResource.java:171)
	at org.eclipse.xtext.resource.XtextResource.updateInternalState(XtextResource.java:292)
	at org.eclipse.xtext.resource.DerivedStateAwareResource.updateInternalState(DerivedStateAwareResource.java:163)
	at org.eclipse.xtext.resource.XtextResource.doLoad(XtextResource.java:182)
	at org.eclipse.xtext.linking.lazy.LazyLinkingResource.doLoad(LazyLinkingResource.java:115)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1563)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1342)
	at org.eclipse.xtext.resource.persistence.StorageAwareResource.load(StorageAwareResource.java:95)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
	at org.eclipse.xtext.resource.XtextResourceSet.getResource(XtextResourceSet.java:266)
	at org.aerospace.sysml.test.Test.main(Test.java:26)

I don't know if this is an issue with SysML's code. I believe it is since the code for OwningMembershipImpl.java calls:

@Override
public void setOwnedMemberElement(Element newOwnedMemberElement) {
    OWNED_MEMBER_ELEMENT__ESETTING_DELEGATE.dynamicSet(this, null, 0, newOwnedMemberElement);
}

while the callee assumes that the second parameter settings is not null. It is likely not a version issue since I'm using Eclipse 2022-09 with SysMLv2 Release 2023-02. Most likely though is that I'm not registering something that I'm supposed to. What might that be?

Function parameters should be owned via ParameterMemberships

According to the KerML specification (§8.3.4.6.4 ParameterMembership):

The Feature that is identified as a parameter by this ParameterMembership, which is always owned by the
ParameterMembership.

However, at least in the KerML libraries it looks like it's the case for the return parameters only. E.g. the function "RationalFunction::rat"
has two inputs parameters defined using classical FeatureMemberships in the corresponding XMI (RationalFunctions.kermlx)

So, it looks like a XMI serialization bug.

KerML::Element vs KerML::Root::Element

Installing extensions with jupyter labextension install is deprecated

Installing jupyter lab extensions should now be done with pip or conda:

~$ jupyter labextension install "@systems-modeling/jupyterlab-sysml"

(Deprecated) Installing extensions with the jupyter labextension install command is now deprecated and will be removed in a future major version of JupyterLab.

Users should manage prebuilt extensions with package managers like pip and conda, and extension authors are encouraged to distribute their extensions as prebuilt packages

please update the readme

i believe this is what it looks like JRE had to be installed to make it run
Screenshot_2022-11-09_10-55-38
this what it looks like

Decision node plantUML issue

I am using the Eclipse pilot implementation. What is the proper syntax for a decision node / if clause to be visualized in PlantUML?

Even the decision node example of the Intro PDF (p. 43) is not working.

Any ideas?

Thx

Thoughts on language tooling? i.e. Language Server Protocol/tree-sitter

Hello SysML Team!

Please feel free to transfer this issue over to another repo as you see fit.

I was wondering if there are plans to create a Language Server Protocol (LSP) implementation for SysML v2 or creating a tree-sitter parser. Both of these tools will allow sysmlv2 integration to any editor that has support for these tools (which is pretty much any popular editor such as vscode, neo/vim, among others including our pilot implementations of jupyterlab and Eclipse IDE.

If you want to learn a bit more history about the LSP: https://www.eclipse.org/community/eclipse_newsletter/2017/may/article1.php

Also a tldr in case it helps: Tree-sitter provides syntax detail at the source file level in a quick manner (i.e. as you are entering keystrokes), LSP provides semantic detail at the project level at a slightly longer timescale.

Clarify %viz arguments in Intro to SysML and Jupyter console

I'm using SysML v2 Release 2020-12 and trialing SysML v2 on Jupyter Labs and wanted to visualize connections. I copied and pasted the code for ./sysml/src/training/10. Connections/Connections Example.sysml to my jupyter notebook.

I ran %viz Namespace::Element which gave a tree view. It took me some searching to figure out that %viz takes the --view argument.

Suggestions:

  1. In the Intro to SysML v2 document to include a slide that explains how to realize the different views in Jupyter.
  2. Give %viz an argument of --help or something similarly intuitive that can output to Jupyter console a short description on how to use the %viz command.

For other people taking SysML v2 for a trial run they are:

For a tree view or similar view to BDD
%viz --view=tree Namespace::Element
For a state view
%viz --view=state Namespace::Element
For a view of interconnections or similar view to IBD
%viz --view=interconnection Namespace::Element
For a view of actions
%viz --view=action Namespace::Element
For a view of sequences
%viz --view=sequence Namespace::Element
For a default view (I assume that SysML takes the element type to infer the type of view)
%viz --view=default Namespace::Element which is the same as %viz Namespace::Element

202208Release cannot display connection symbol correctly

Hello, I installed 202208 SysML-v2-Release in both eclipse and jupyter, and found some connection/flow symbol cannot display. However the same .sysml file can be rendered in 202207 version. The test file was "sysml/src/training/14. Action Definitions/Action Succession Example-2.sysml".

202208:
ActionSuccessionExample2

202207:
ActionSuccessionExample2-2207

So how can I display the connection/flow symbol in 202208 version?

Updating the Xtext Community Website

Hello SysML-v2-Pilot-Implementation team,

The Xtext team would like to update the Xtext community website listing all the cool projects people are building around Xtext/Xtend.

See also the corresponding eclipse/xtext#1541 and Bugzilla ticket.

If you are interested that the SysML-v2-Pilot-Implementation project is listed there, please provide the following information as a comment to this issue:

project_name project_description_max_2_sentences license category author(s)

We will then update the Xtext community website and get it online as soon as possible.

Thanks!
Tamás

[jupyter kernel] Feature request: add more magic commands

It would be nice to have more magic commands in jupyter for managing a SysML project, for instance:

  • Not only committing to a SysMLV2 API server, but also pulling from it
  • Specifying a custom server URL to the %commit magic, not only using the default intercax.com servers.

Possible readme typo and Xtext generation issue

Possible typo in the Getting Started section

The Getting Started section says that Xtext artifacts must be generated from this file org.omg.kerml.xtext.expressions/src/org.omg.kerml.expressions.xtext/KerMLExpressions.xtext. But, that file does not exist! The file org.omg.kerml.expressions.xtext/src/org.omg.kerml.expressions.xtext/KerMLExpressions.xtext does exist, is this what is meant?

Error in Xtext artifact generation

When running the artifact generation for any of the Xtext files mentioned in Getting Started, the following error is produced. I used the Oomph installer method with a fresh install of both Java and Eclipse to set up my environment...

0    [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Registering platform uri 'C:\repos\sysml\SySML-v2-Pilot-Implementation'
103  [main] WARN  lipse.emf.mwe.utils.StandaloneSetup  - Skipping conflicting project .antlr-generator at 'archive:file:/C:/repos/sysml/SySML-v2-Pilot-Implementation/org.omg.kerml.expressions.xtext/.antlr-generator-3.2.0-patch.jar!/' and using 'archive:file:/C:/repos/sysml/SySML-v2-Pilot-Implementation/org.omg.kerml.owl/.antlr-generator-3.2.0-patch.jar!/' instead.
178  [main] WARN  lipse.emf.mwe.utils.StandaloneSetup  - Skipping conflicting project .antlr-generator at 'archive:file:/C:/repos/sysml/SySML-v2-Pilot-Implementation/org.omg.kerml.owl/.antlr-generator-3.2.0-patch.jar!/' and using 'archive:file:/C:/repos/sysml/SySML-v2-Pilot-Implementation/org.omg.kerml.xtext/.antlr-generator-3.2.0-patch.jar!/' instead.
222  [main] WARN  lipse.emf.mwe.utils.StandaloneSetup  - Skipping conflicting project .antlr-generator at 'archive:file:/C:/repos/sysml/SySML-v2-Pilot-Implementation/org.omg.kerml.xtext/.antlr-generator-3.2.0-patch.jar!/' and using 'archive:file:/C:/repos/sysml/SySML-v2-Pilot-Implementation/org.omg.sysml/.antlr-generator-3.2.0-patch.jar!/' instead.
1181 [main] WARN  lipse.emf.mwe.utils.StandaloneSetup  - Skipping conflicting project .antlr-generator at 'archive:file:/C:/repos/sysml/SySML-v2-Pilot-Implementation/org.omg.sysml/.antlr-generator-3.2.0-patch.jar!/' and using 'archive:file:/C:/repos/sysml/SySML-v2-Pilot-Implementation/org.omg.sysml.xtext/.antlr-generator-3.2.0-patch.jar!/' instead.
[Fatal Error] :1:1: Content is not allowed in prolog.
1260 [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - Problems instantiating module org.omg.kerml.expressions.xtext.GenerateKerMLExpressions: java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: Problems instantiating module org.omg.kerml.expressions.xtext.GenerateKerMLExpressions: java.lang.reflect.InvocationTargetException
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:96)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:63)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:53)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Caused by: org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
	at org.eclipse.emf.mwe2.language.factory.SettingProviderImpl$1$1.setValue(SettingProviderImpl.java:60)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalApplyAssignments(Mwe2ExecutionEngine.java:147)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.inCase(Mwe2ExecutionEngine.java:118)
	at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:303)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalSwitch(Mwe2ExecutionEngine.java:70)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalApplyAssignments(Mwe2ExecutionEngine.java:146)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.inCase(Mwe2ExecutionEngine.java:118)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:303)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalSwitch(Mwe2ExecutionEngine.java:70)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.inCase(Mwe2ExecutionEngine.java:84)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:303)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalSwitch(Mwe2ExecutionEngine.java:70)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.create(Mwe2ExecutionEngine.java:66)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:94)
	... 4 more
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.emf.mwe2.language.factory.SettingProviderImpl$1$1.setValue(SettingProviderImpl.java:58)
	... 28 more
Caused by: java.lang.RuntimeException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
	at org.eclipse.emf.mwe.utils.StandaloneSetup.handleException(StandaloneSetup.java:398)
	at org.eclipse.emf.mwe.utils.StandaloneSetup.registerProject(StandaloneSetup.java:436)
	at org.eclipse.emf.mwe.utils.StandaloneSetup.scanFolder(StandaloneSetup.java:327)
	at org.eclipse.emf.mwe.utils.StandaloneSetup.scanFolder(StandaloneSetup.java:316)
	at org.eclipse.emf.mwe.utils.StandaloneSetup.scanFolder(StandaloneSetup.java:316)
	at org.eclipse.emf.mwe.utils.StandaloneSetup.scanFolder(StandaloneSetup.java:316)
	at org.eclipse.emf.mwe.utils.StandaloneSetup.scanFolder(StandaloneSetup.java:298)
	at org.eclipse.emf.mwe.utils.StandaloneSetup.setPlatformUri(StandaloneSetup.java:258)
	... 33 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
	at java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:261)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
	at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
	at org.eclipse.emf.mwe.utils.StandaloneSetup.registerProject(StandaloneSetup.java:429)
	... 39 more

Different Id generated in one generated .sysmlx file.

Hello SysML Team~
image
As we can see , the two IDs are different in one same sysmlx file. And the previous one correspons to the id in ISQMechanics.sysmlx, but the latter one can't find in ISQMechanics.sysmlx.
Best regards.

pom.xml cannot be processed by tycho-versions-pluging

As suggested below, raising this as an issue.

Originally posted by @seidewitz in #309 (comment)

A demonstrator Dockerfile:
https://github.com/Rots/SysML-v2-Pilot-Implementation/blob/illegal-xml/Dockerfile

Context for the issue:
I'm trying to use the pilot implementation libraries as a dependency.
To get the released libraries, I could pull them from the Github package repository, but for some reason GitHub package repository does not allow anonymous access to the repositories.
An (at first thought easy) alternative is to just clone and build from source (and not need to authenticate).
Unfortunately there is no tagged version in the repository where the packages would be with the final release versions instead of the -SNAPSHOT, so to get the release version it is necessary to run the upversioning before deploying them to our internal repository.
With the environment as seen from the Dockerfile: Maven 3.6 and AdoptOpenJDK 11 the error occurs:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-versions-plugin:2.5.0:update-eclipse-metadata (default-cli) on project org.omg.sysml.parent: Execution default-cli of goal org.eclipse.tycho:tycho-versions-plugin:2.5.0:update-eclipse-metadata failed: This Pom /repo/pom.xml is in the Wrong Format: Line 217, column 50: Illegal character in attribute value: '>' -> [Help 1]

Error installing jupyter notebook

At MBSE22 De Koning presented yesterday the usage of SysMLv2 code->graphic translator using Jupyter Notebooks.

Looking at the Pilot Implementation Repo, I guess I would have to use the jupyter notebook installer

Cloning the complete pilot repo and then following the README in the mentioned directory offers me the following error:

$ ./install.sh
./install.sh: 24: Bad substitution

The referred line in the install script:

SYSML_VERSION="${project.version.unqualified}"

Any help in visualising sysml code into graphics is highly welcomed!

problem about sysml v2 language textual notation.pdf

From the Root-Root syntactic elements section in the Four-Layer Language Architecture on the fourth page of your sysml v2 language textual notation, we can see the TextualAnnotation element. However, no matter in sysml v2 release or from sysml ecore of piloat, we only found TextualRepresentation, so, is it changed to TextualRepresentation?

Xtext hint feature in sysml textual editor

Dear SysML Team,

I am currently working on enabling XText’s text hint feature for SysML’s text editor and have encountered some challenges.
In the GenerateKerMLExpressions.mwe2 file, my initial attempt involved commenting out the line “fragment = ui.contentAssist.ContentAssistFragment2 {}” and uncommenting “fragment = NoContentAssistAntlrGeneratorFragment {}“. However, this resulted in the parser not being generated.

Subsequently, I attempted to address the issue by uncommenting “fragment = ui.contentAssist.ContentAssistFragment2 {}” and adding “fragment = parser.antlr.XtextAntlrGeneratorFragment2 {}“. Unfortunately, this led to an error in InternalSysMLParser.java stating that “The code for the static initializer is exceeding the 65535 bytes limit.”

I am seeking guidance on how to resolve this issue. Alternatively, I would appreciate any suggestions on alternative methods to incorporate the hint feature into the SysML textual editor.

Thank you in advance for your assistance.

Best regards,
Levent

Missing documentation on various eStructuralFeatures in the SysML.ecore file

While using the SysML.ecore file for codegeneration purposes i have noticed that a number of properties in classes are missing documentation, see list below:

Feature:isNonunique
MetadataUsage:metadataDefinition
OperatorExpression:operand
ViewRenderingMembership:ownedRendering

Perhaps you would like to include some docs in the source UML model and regenerate the Ecore model including the missing docs.

commit ab0a3b7 throw compilation error and warning

The latest changes to KerML.kerml and SysML.sysml threw an error and a warning respectively, is it a trivial error?

Errors

Description Resource Path Location Type
Couldn't resolve reference to Type 'double'. KerML.kerml /sysml.library/Kernel Libraries/Kernel Semantic Library line: 388 /sysml.library/Kernel Libraries/Kernel Semantic Library/KerML.kerml KerML Problem

Warnings

Description Resource Path Location Type
Redefining feature should not have smaller multiplicity lower bound SysML.sysml /sysml.library/Systems Library line: 338 /sysml.library/Systems Library/SysML.sysml SysML Problem

Migrate to PlantUML 2023

Hi

At present eclipse pilot implementation depends on plantuml 2022 and this adds problems with the eclipse plugin updates.
Manifest allows Eclipse to update PlantUML core to 2023 which breaks the editor.

Install of Jupyter failed on Windows because digital envelope routines are unsupported

Running install\jupyter\install.bat for release 2022-05 on my Windows 10.0.19044 computer resulted in failure

> node C:\Users\byron\miniconda3\lib\site-packages\jupyterlab\staging\yarn.js run build:prod:minimize
yarn run v1.21.1
$ ensure-max-old-space webpack --config webpack.prod.minimize.config.js
node:internal/crypto/hash:67
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (C:\Users\byron\miniconda3\share\jupyter\lab\staging\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Users\byron\miniconda3\share\jupyter\lab\staging\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (C:\Users\byron\miniconda3\share\jupyter\lab\staging\node_modules\webpack\lib\NormalModule.js:471:10)
    at C:\Users\byron\miniconda3\share\jupyter\lab\staging\node_modules\webpack\lib\NormalModule.js:503:5

Derived feature related type filtering problem in DefinitionImpl

In class DefinitionImpl, the implementation of method getOwnedConnection filters and returns objects of type ConnectionUsage even though the method signature specifies EList<ConnectorAsUsage> as return value type:

The code works as ConnectorAsUsage is a super interface of ConnectionUsage, but this way, owned objects of other classes implementing other subinterfaces of ConnectorAsUsage, e.g., BindingConnectorAsUsage, cannot be retrieved via this method, or any other method of this class.

Field qualifiedNameConverter in KerMLScope is always null

Class KerMLScope depends on injection to set field qualifiedNameConverter. However, instances of KerMLScope are created using new (KerMLScopeProvider line 160), so nothing is injected.
One effect is that calling Namespace.resolve() results in a NullPointerException.

Relationship/target unmodifiable in MembershipImpl

In the ecore definition the Relationship/target feature should be changeable (and is meant to be persisted):

<eStructuralFeatures xsi:type="ecore:EReference" name="target" upperBound="-1"
eType="#//Element">
<eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName">
<details key="body" value="targetRelationship"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;p>The &lt;code>relatedElements&lt;/code> to which this Relationship is considered to be directed.&lt;/p>&#xA;"/>
</eAnnotations>
<eAnnotations source="subsets" references="#//Relationship/relatedElement"/>
</eStructuralFeatures>

(defaults to changeable=true, derived=false, transient=false)

But in MembershipImpl, the getTarget() is overridden from RelationsshipImpl and it returns a list which is unmodifiable:

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EList<Element> getTarget() {
EList<Element> target = new UniqueEList<Element>();
Element memberElement = getMemberElement();
if (memberElement != null) {
target.add(memberElement);
}
return new UnionEObjectEList<Element>(this, SysMLPackage.Literals.RELATIONSHIP__TARGET, target.size(), target.toArray());
}

Is this the intended behaviour? I'm trying to programmatically process the EMF object tree (using a third party library), but with this issue, the logic is not sound. Is the SysML v2 library not fully compatible with EMF semantics? Is there an overview of known discrepancies?

PlantUML Visualization limited to 4096 pixel?

I am testing the implementation with eclipse. When having a certain amount of code, PlantUML just cuts the visualization at 4096 pixel width? So I cannot see my full model, and when exporting to png, it is also not showing the full model.

Any ideas how to see the full model, or export the full view?

start and done symbol don't display

It seems that sysml\src\training\17. Control\Decision Example.sysml doesn't show start and done element in diagram, other control node works well.

SysML SVG internal structure

Hello,

I tried to use your SysML Interactive utils to generate diagram SVG basing from my SysML model file.
My question is about the SVG's internal structure.
At the moment it looks just like graphics, so it performs its role - represent the diagram visually.
But if I want to interact with the diagram via JS for example I will face with the absence of any "anchors" - ids, classes or data-* attributes which could be used to precisely indicate the parts of the diagram and so interact with them.

Do you have any plans to support such kind of attributes?

Thank you.

Unable Import Package Directly Under Root Accross .sysml Files With Short Name

(Using 2024-05 Release) I am getting an error when trying to import a package in a separate .sysml file when using the package's short name, but only when that package is directly under the root node. In the example screenshot below, Package <b1> B1 in TestB.sysml is trying to import package <a1> A1 in TestA.sysml with statement "import a1;", but this results in the error "Couldn't resolve reference to Membership a1".

Note, I do not get an error when trying importing package <a1> A1 using its non-short name, A1. This can be seen with package <b2> B2 in TestB.sysml successfully importing package <a1> A1 with the statement "import A1;").

I also do not see this error when trying to import a package across .sysml files using the package's short name in the case when it is nested deeper into the .sysml file. This can be seen with package <b1> B1 in TestB.sysml successfully importing package <'a1.1'> A1.1 in TestA.sysml with the statement "import A1::'a1.1';".

image

Derived feature related method naming problems in RequirementUsageImpl

In class RequirementUsageImpl, the implementation of methods getRequiredConstraint() and getAssumedConstraint() is probably swapped, as the former references the ˙RequirementConstraintKind.ASSUMPTION literal, and the latter the RequirementConstraintKind.REQUIREMENT for filtering ConstraintUsages:

A potential solution could be to swap the method names or the implementations.

Ecore model serialization to textual notation fails

SysMLv2 Pilot Implementation version: 2023-08

I have created an eclipse plugin that serialize a SysML v2 ecore model instance (created programmatically) into its SysML v2 textual notation. However whenever the model instance contains a Usage (port, part, attribute) the serialization fails with the following error:

java.lang.NullPointerException: Cannot invoke "org.eclipse.xtext.serializer.analysis.IGrammarConstraintProvider$IFeatureInfo.getFeature()" because "feature" is null
	at org.eclipse.xtext.serializer.diagnostic.SequencerDiagnosticProvider.createBacktrackingFailedDiagnostic(SequencerDiagnosticProvider.java:75)
	at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:514)
	at org.omg.sysml.xtext.serializer.AbstractSysMLSemanticSequencer.sequence_BasicUsagePrefix_DefinitionBodyItem_Identification_MultiplicityPart_OccurrenceUsagePrefix_Redefines_Redefinitions_RefPrefix_References_Subsets_Subsettings_TypedBy_Typings_UsageExtensionKeyword_ValuePart(AbstractSysMLSemanticSequencer.java:7012)
	at org.omg.sysml.xtext.serializer.AbstractSysMLSemanticSequencer.sequence(AbstractSysMLSemanticSequencer.java:1419)
	at org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer.createSequence(AbstractSemanticSequencer.java:68)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:327)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:354)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:265)
	at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:445)
	at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:512)
	at org.omg.sysml.xtext.serializer.AbstractSysMLSemanticSequencer.sequence_MemberPrefix_PackageMember(AbstractSysMLSemanticSequencer.java:10088)
	at org.omg.sysml.xtext.serializer.AbstractSysMLSemanticSequencer.sequence(AbstractSysMLSemanticSequencer.java:1325)
	at org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer.createSequence(AbstractSemanticSequencer.java:68)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:327)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:354)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:265)
	at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:445)
	at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:512)
	at org.omg.sysml.xtext.serializer.AbstractSysMLSemanticSequencer.sequence_Identification_Package_PackageBody(AbstractSysMLSemanticSequencer.java:9729)
	at org.omg.sysml.xtext.serializer.AbstractSysMLSemanticSequencer.sequence(AbstractSysMLSemanticSequencer.java:1356)
	at org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer.createSequence(AbstractSemanticSequencer.java:68)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:327)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:354)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:265)
	at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:445)
	at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:512)
	at org.omg.sysml.xtext.serializer.AbstractSysMLSemanticSequencer.sequence_MemberPrefix_PackageMember(AbstractSysMLSemanticSequencer.java:10088)
	at org.omg.sysml.xtext.serializer.AbstractSysMLSemanticSequencer.sequence(AbstractSysMLSemanticSequencer.java:1325)
	at org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer.createSequence(AbstractSemanticSequencer.java:68)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:327)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:354)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:265)
	at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:445)
	at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:512)
	at org.omg.sysml.xtext.serializer.AbstractSysMLSemanticSequencer.sequence_PackageBodyElement_RootNamespace(AbstractSysMLSemanticSequencer.java:10540)
	at org.omg.sysml.xtext.serializer.AbstractSysMLSemanticSequencer.sequence(AbstractSysMLSemanticSequencer.java:1173)
	at org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer.createSequence(AbstractSemanticSequencer.java:68)
	at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:122)
	at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:135)
	at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:205)
	at org.eclipse.xtext.resource.XtextResource.doSave(XtextResource.java:399)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1475)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1044)

Here is the code where I am trying to create programmatically the model instance and then trying to serialize it:

private void createModel() {
      Injector injector = XtextActivator.getInstance().getInjector(XtextActivator.ORG_OMG_SYSML_XTEXT_SYSML);
      ResourceSet resourceSet = injector.getInstance(ResourceSet.class);
      
      var path = Paths.get("test", "sysml_dummy.sysml");
      URI uri = URI.createPlatformResourceURI(path.toString(), true);
      var dummy_resource = resourceSet.createResource(uri);
      
      // Namespace Creation
      var root = SysMLFactory.eINSTANCE.createNamespace();
      dummy_resource.getContents().add(root);
      
      // Package Creation
      var my_package = SysMLFactory.eINSTANCE.createPackage();
      my_package.setDeclaredName("my_package");
      NamespaceUtil.addOwnedMemberTo(root, my_package);
      
      // Part Definition Creation
      var part_def = SysMLFactory.eINSTANCE.createPartDefinition();
      part_def.setDeclaredName("my_part_def");
      NamespaceUtil.addOwnedMemberTo(my_package, part_def);
      
      // Part Usage Creation
      var part_usage = SysMLFactory.eINSTANCE.createPartUsage();
      part_usage.setDeclaredName("my_part_usage");
      NamespaceUtil.addOwnedMemberTo(my_package, part_usage);
      
      // Set Part Definition
      var feature_typing = SysMLFactory.eINSTANCE.createFeatureTyping();
      feature_typing.setType(part_def);
      feature_typing.setTypedFeature(part_usage);
      part_usage.getOwnedRelationship().add(feature_typing);
      
      try {
	      // Serialize
	      dummy_resource.save(null);
      } catch (IOException e) {
	      e.printStackTrace();
      }
}

I also tried to load the ecore model instance from a manually written model in SysML v2 textual language (to be sure that the problem was not related to the programmatically created model) and then trying to serialize it in a different file but I encountered the same problem.

The manual written file:.

package a {
	part def b;
	part c : b;
}

The code:

private void testSerialization(IFile f) {
      Injector injector = XtextActivator.getInstance().getInjector(XtextActivator.ORG_OMG_SYSML_XTEXT_SYSML);
      ResourceSet resourceSet = injector.getInstance(ResourceSet.class);
      
      File file = GUIResource.getFile(f);
      Path wks_path = Paths.get(GUIResource.getWorkspaceLocation());
      String rel_file_path = wks_path.relativize(file.toPath()).toString();
      URI uri =URI.createPlatformResourceURI(rel_file_path, true);
      
      // Get the ecore model instance
      Resource res = resourceSet.getResource(uri, true);
      EList<EObject> res_contents = res.getContents();
      EObject root = res_contents.get(0);
      if (root instanceof Element) {
	      // Serialize the model in a new file
	      Path path = Paths.get("test", "dummy.sysml");
	      URI new_uri = URI.createPlatformResourceURI(path.toString(), true);
	      Resource new_res = resourceSet.createResource(new_uri);
	      new_res.getContents().add(root);
	      try {
		      new_res.save(null);
	      } catch (IOException e) {
		      e.printStackTrace();
	      }
      }
}

Serializing the models in XMI format works fine.

Am I doing something wrong or currently the automatic serialization is not supported ?

jupyterlab>=4 fails building jupyterlab-sysml extension

It looks like jupyterlab version >= 4 does not manage to build the jupyterlab-sysml extension.

I just tested with my old jupyterlab version 3.6.6 , it built the extension successfully. After upgrading to version 4.0.10 however, I get the following error when jupyterlab tries to build the extension (this is from the jupyterlab debug log):

[LabBuildApp] Building in /opt/conda/share/jupyter/lab
[LabBuildApp] Node v20.9.0

[LabBuildApp] Yarn configuration loaded.
[LabBuildApp] Building jupyterlab assets (production, minimized)
[LabBuildApp] > node /opt/conda/lib/python3.11/site-packages/jupyterlab/staging/yarn.js install
[LabBuildApp] ➤ YN0000: ┌ Resolution step
➤ YN0002: │ @jupyterlab/application-top@workspace:. doesn't provide codemirror (pa58b9), requested by @systems-modeling/jupyterlab-sysml
➤ YN0002: │ @jupyterlab/cell-toolbar-extension@npm:4.0.9 doesn't provide react (pf2141), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/console-extension@npm:4.0.9 doesn't provide react (pc2341), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/csvviewer-extension@npm:4.0.9 doesn't provide react (pf2b83), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/debugger-extension@npm:4.0.9 doesn't provide react (p42cf6), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/documentsearch-extension@npm:4.0.9 doesn't provide react (p5b112), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/extensionmanager-extension@npm:4.0.9 doesn't provide react (p2812f), requested by @jupyterlab/settingregistry
➤ YN0060: │ @jupyterlab/extensionmanager@npm:4.0.9 provides react (pa03d2) with version 18.2.0, which doesn't satisfy what react-paginate requests
➤ YN0002: │ @jupyterlab/filebrowser-extension@npm:4.0.9 doesn't provide react (p70a5b), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/fileeditor-extension@npm:4.0.9 doesn't provide react (p02cb1), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/htmlviewer-extension@npm:4.0.9 doesn't provide react (pb6ffe), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/json-extension@npm:4.0.9 doesn't provide @types/react (p0b2d9), requested by react-json-tree
➤ YN0002: │ @jupyterlab/mainmenu-extension@npm:4.0.9 doesn't provide react (p73fdb), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/markdownviewer-extension@npm:4.0.9 doesn't provide react (p0800d), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/metadataform-extension@npm:4.0.9 doesn't provide react (p98121), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/metadataform@npm:4.0.9 doesn't provide @rjsf/utils (peac99), requested by @rjsf/core
➤ YN0002: │ @jupyterlab/metadataform@npm:4.0.9 doesn't provide @rjsf/utils (p69871), requested by @rjsf/validator-ajv8
➤ YN0002: │ @jupyterlab/services@npm:7.0.9 doesn't provide react (p89091), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/settingeditor-extension@npm:4.0.9 doesn't provide react (p30a92), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/statusbar-extension@npm:4.0.9 doesn't provide react (p8e383), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/terminal-extension@npm:4.0.9 doesn't provide react (p7976c), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/toc-extension@npm:6.0.9 doesn't provide react (p0efb9), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/translation-extension@npm:4.0.9 doesn't provide react (pd0328), requested by @jupyterlab/settingregistry
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 493ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 576ms
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed in 0s 710ms
➤ YN0000: Done with warnings in 1s 911ms

[LabBuildApp] > node /opt/conda/lib/python3.11/site-packages/jupyterlab/staging/yarn.js dlx yarn-berry-deduplicate -s fewerHighest --fail
[LabBuildApp] ➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 5s 853ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed in 1s 341ms
➤ YN0000: Done in 7s 369ms

No duplicates found, yarn.lock identical

[LabBuildApp] > node /opt/conda/lib/python3.11/site-packages/jupyterlab/staging/yarn.js run build:prod:minimize
[LabBuildApp] [webpack-cli] ModuleNotFoundError: Module not found: Error: Can't resolve 'codemirror' in '/opt/conda/share/jupyter/lab/staging/node_modules/@systems-modeling/jupyterlab-sysml/build'
at /opt/conda/share/jupyter/lab/staging/node_modules/webpack/lib/Compilation.js:2016:28
at /opt/conda/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:798:13
at eval (eval at create (/opt/conda/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), :10:1)
at /opt/conda/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:270:22
at eval (eval at create (/opt/conda/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), :9:1)
at /opt/conda/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:434:22
at /opt/conda/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:116:11
at /opt/conda/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:670:25
at /opt/conda/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:855:8
at /opt/conda/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:975:5
resolve 'codemirror' in '/opt/conda/share/jupyter/lab/staging/node_modules/@systems-modeling/jupyterlab-sysml/build'
Parsed request is a module
using description file: /opt/conda/share/jupyter/lab/staging/node_modules/@systems-modeling/jupyterlab-sysml/package.json (relative path: ./build)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
/opt/conda/share/jupyter/lab/staging/node_modules/@systems-modeling/jupyterlab-sysml/build/node_modules doesn't exist or is not a directory
/opt/conda/share/jupyter/lab/staging/node_modules/@systems-modeling/jupyterlab-sysml/node_modules doesn't exist or is not a directory
/opt/conda/share/jupyter/lab/staging/node_modules/@systems-modeling/node_modules doesn't exist or is not a directory
/opt/conda/share/jupyter/lab/staging/node_modules/node_modules doesn't exist or is not a directory
looking for modules in /opt/conda/share/jupyter/lab/staging/node_modules
single file module
using description file: /opt/conda/share/jupyter/lab/staging/package.json (relative path: ./node_modules/codemirror)
no extension
Field 'browser' doesn't contain a valid alias configuration
/opt/conda/share/jupyter/lab/staging/node_modules/codemirror doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/opt/conda/share/jupyter/lab/staging/node_modules/codemirror.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/opt/conda/share/jupyter/lab/staging/node_modules/codemirror.json doesn't exist
.wasm
Field 'browser' doesn't contain a valid alias configuration
/opt/conda/share/jupyter/lab/staging/node_modules/codemirror.wasm doesn't exist
/opt/conda/share/jupyter/lab/staging/node_modules/codemirror doesn't exist
/opt/conda/share/jupyter/lab/node_modules doesn't exist or is not a directory
/opt/conda/share/jupyter/node_modules doesn't exist or is not a directory
/opt/conda/share/node_modules doesn't exist or is not a directory
/opt/conda/node_modules doesn't exist or is not a directory
/opt/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory

[LabBuildApp] JupyterLab failed to build
[LabBuildApp] ERROR | Build failed.
Troubleshooting: If the build failed due to an out-of-memory error, you
may be able to fix it by disabling the dev_build and/or minimize options.

If you are building via the jupyter lab build command, you can disable
these options like so:

jupyter lab build --dev-build=False --minimize=False

You can also disable these options for all JupyterLab builds by adding these
lines to a Jupyter config file named jupyter_config.py:

c.LabBuildApp.minimize = False
c.LabBuildApp.dev_build = False

If you don't already have a jupyter_config.py file, you can create one by
adding a blank file of that name to any of the Jupyter config directories.
The config directories can be listed by running:

jupyter --paths

Explanation:

  • dev-build: This option controls whether a dev or a more streamlined
    production build is used. This option will default to False (i.e., the
    production build) for most users. However, if you have any labextensions
    installed from local files, this option will instead default to True.
    Explicitly setting dev-build to False will ensure that the production
    build is used in all circumstances.

  • minimize: This option controls whether your JS bundle is minified
    during the Webpack build, which helps to improve JupyterLab's overall
    performance. However, the minifier plugin used by Webpack is very memory
    intensive, so turning it off may help the build finish successfully in
    low-memory environments.

[LabBuildApp] Traceback (most recent call last):

[LabBuildApp] File "/opt/conda/lib/python3.11/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
yield

[LabBuildApp] File "/opt/conda/lib/python3.11/site-packages/jupyterlab/labapp.py", line 206, in start
raise e

[LabBuildApp] File "/opt/conda/lib/python3.11/site-packages/jupyterlab/labapp.py", line 197, in start
build(

[LabBuildApp] File "/opt/conda/lib/python3.11/site-packages/jupyterlab/commands.py", line 507, in build
return handler.build(
^^^^^^^^^^^^^^

[LabBuildApp] File "/opt/conda/lib/python3.11/site-packages/jupyterlab/commands.py", line 723, in build
raise RuntimeError(msg)

[LabBuildApp] RuntimeError: JupyterLab failed to build

Environment:

  • Ubuntu 22.04 amd64
  • I tried both in a docker image and directly in Ubuntu
  • jupyterlab-sysml version 0.37.
  • conda environment:

# packages in environment at /opt/conda:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_gnu conda-forge
aiosqlite 0.19.0 pyhd8ed1ab_0 conda-forge
alembic 1.13.1 pyhd8ed1ab_0 conda-forge
alsa-lib 1.2.10 hd590300_0 conda-forge
anyio 4.2.0 pyhd8ed1ab_0 conda-forge
archspec 0.2.2 pyhd8ed1ab_0 conda-forge
argon2-cffi 23.1.0 pyhd8ed1ab_0 conda-forge
argon2-cffi-bindings 21.2.0 py311h459d7ec_4 conda-forge
arrow 1.3.0 pyhd8ed1ab_0 conda-forge
asttokens 2.4.1 pyhd8ed1ab_0 conda-forge
async-lru 2.0.4 pyhd8ed1ab_0 conda-forge
async_generator 1.10 py_0 conda-forge
atk-1.0 2.38.0 hd4edc92_1 conda-forge
attrs 23.1.0 pyh71513ae_1 conda-forge
babel 2.14.0 pyhd8ed1ab_0 conda-forge
beautifulsoup4 4.12.2 pyha770c72_0 conda-forge
bleach 6.1.0 pyhd8ed1ab_0 conda-forge
blinker 1.7.0 pyhd8ed1ab_0 conda-forge
boltons 23.1.1 pyhd8ed1ab_0 conda-forge
brotli-python 1.1.0 py311hb755f60_1 conda-forge
bzip2 1.0.8 hd590300_5 conda-forge
c-ares 1.24.0 hd590300_0 conda-forge
ca-certificates 2023.11.17 hbcca054_0 conda-forge
cached-property 1.5.2 hd8ed1ab_1 conda-forge
cached_property 1.5.2 pyha770c72_1 conda-forge
cairo 1.18.0 h3faef2a_0 conda-forge
certifi 2023.11.17 pyhd8ed1ab_0 conda-forge
certipy 0.1.3 py_0 conda-forge
cffi 1.16.0 py311hb3a22ac_0 conda-forge
charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
comm 0.1.4 pyhd8ed1ab_0 conda-forge
conda 23.11.0 py311h38be061_1 conda-forge
conda-libmamba-solver 23.12.0 pyhd8ed1ab_0 conda-forge
conda-package-handling 2.2.0 pyh38be061_0 conda-forge
conda-package-streaming 0.9.0 pyhd8ed1ab_0 conda-forge
configurable-http-proxy 4.6.1 h92b4e83_0 conda-forge
cryptography 41.0.7 py311hcb13ee4_1 conda-forge
debugpy 1.8.0 py311hb755f60_1 conda-forge
decorator 5.1.1 pyhd8ed1ab_0 conda-forge
defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
distro 1.8.0 pyhd8ed1ab_0 conda-forge
entrypoints 0.4 pyhd8ed1ab_0 conda-forge
exceptiongroup 1.2.0 pyhd8ed1ab_0 conda-forge
executing 2.0.1 pyhd8ed1ab_0 conda-forge
expat 2.5.0 hcb278e6_1 conda-forge
fmt 10.1.1 h00ab1b0_1 conda-forge
font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge
font-ttf-inconsolata 3.000 h77eed37_0 conda-forge
font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge
font-ttf-ubuntu 0.83 h77eed37_1 conda-forge
fontconfig 2.14.2 h14ed4e7_0 conda-forge
fonts-conda-ecosystem 1 0 conda-forge
fonts-conda-forge 1 0 conda-forge
fqdn 1.5.1 pyhd8ed1ab_0 conda-forge
freetype 2.12.1 h267a509_2 conda-forge
fribidi 1.0.10 h36c2ea0_0 conda-forge
gdk-pixbuf 2.42.10 h829c605_4 conda-forge
gettext 0.21.1 h27087fc_0 conda-forge
giflib 5.2.1 h0b41bf4_3 conda-forge
gitdb 4.0.11 pyhd8ed1ab_0 conda-forge
gitpython 3.1.40 pyhd8ed1ab_0 conda-forge
gmp 6.3.0 h59595ed_0 conda-forge
graphite2 1.3.13 h58526e2_1001 conda-forge
graphviz 9.0.0 h78e8752_1 conda-forge
greenlet 3.0.3 py311hb755f60_0 conda-forge
gtk2 2.24.33 h7f000aa_3 conda-forge
gts 0.7.6 h977cf35_4 conda-forge
harfbuzz 8.3.0 h3d44ed6_0 conda-forge
icu 73.2 h59595ed_0 conda-forge
idna 3.6 pyhd8ed1ab_0 conda-forge
importlib-metadata 7.0.1 pyha770c72_0 conda-forge
importlib_metadata 7.0.1 hd8ed1ab_0 conda-forge
importlib_resources 6.1.1 pyhd8ed1ab_0 conda-forge
ipykernel 6.26.0 pyhf8b6a83_0 conda-forge
ipython 8.19.0 pyh707e725_0 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
ipywidgets 8.1.1 pypi_0 pypi
isoduration 20.11.0 pyhd8ed1ab_0 conda-forge
jedi 0.19.1 pyhd8ed1ab_0 conda-forge
jinja2 3.1.2 pyhd8ed1ab_1 conda-forge
json5 0.9.14 pyhd8ed1ab_0 conda-forge
jsonpatch 1.33 pyhd8ed1ab_0 conda-forge
jsonpointer 2.4 py311h38be061_3 conda-forge
jsonschema 4.20.0 pyhd8ed1ab_0 conda-forge
jsonschema-specifications 2023.11.2 pyhd8ed1ab_0 conda-forge
jsonschema-with-format-nongpl 4.20.0 pyhd8ed1ab_0 conda-forge
jupyter-collaboration 2.0.1 pyhd8ed1ab_0 conda-forge
jupyter-lsp 2.2.1 pyhd8ed1ab_0 conda-forge
jupyter-server-mathjax 0.2.6 pyh5bfe37b_1 conda-forge
jupyter-sysml-kernel 0.37.0 pyhd8ed1ab_0 conda-forge
jupyter_client 8.6.0 pyhd8ed1ab_0 conda-forge
jupyter_core 5.5.1 py311h38be061_0 conda-forge
jupyter_events 0.9.0 pyhd8ed1ab_0 conda-forge
jupyter_server 2.12.1 pyhd8ed1ab_0 conda-forge
jupyter_server_fileid 0.9.1 pyhd8ed1ab_0 conda-forge
jupyter_server_terminals 0.5.0 pyhd8ed1ab_0 conda-forge
jupyter_telemetry 0.1.0 pyhd8ed1ab_1 conda-forge
jupyter_ydoc 2.0.1 pyhd8ed1ab_0 conda-forge
jupyterhub 4.0.2 pyh31011fe_0 conda-forge
jupyterhub-base 4.0.2 pyh31011fe_0 conda-forge
jupyterlab 4.0.9 pyhd8ed1ab_0 conda-forge
jupyterlab-git 0.50.0 pyhd8ed1ab_0 conda-forge
jupyterlab-widgets 3.0.9 pypi_0 pypi
jupyterlab_pygments 0.3.0 pyhd8ed1ab_0 conda-forge
jupyterlab_server 2.25.2 pyhd8ed1ab_0 conda-forge
keyutils 1.6.1 h166bdaf_0 conda-forge
krb5 1.21.2 h659d440_0 conda-forge
lcms2 2.16 hb7c19ff_0 conda-forge
ld_impl_linux-64 2.40 h41732ed_0 conda-forge
lerc 4.0.0 h27087fc_0 conda-forge
libarchive 3.7.2 h2aa1ff5_1 conda-forge
libcups 2.3.3 h4637d8d_4 conda-forge
libcurl 8.5.0 hca28451_0 conda-forge
libdeflate 1.19 hd590300_0 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libev 4.33 hd590300_2 conda-forge
libexpat 2.5.0 hcb278e6_1 conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc-ng 13.2.0 h807b86a_3 conda-forge
libgd 2.3.3 h119a65a_9 conda-forge
libglib 2.78.3 h783c2da_0 conda-forge
libgomp 13.2.0 h807b86a_3 conda-forge
libiconv 1.17 hd590300_2 conda-forge
libjpeg-turbo 3.0.0 hd590300_1 conda-forge
libmamba 1.5.6 had39da4_0 conda-forge
libmambapy 1.5.6 py311hf2555c7_0 conda-forge
libnghttp2 1.58.0 h47da74e_1 conda-forge
libnsl 2.0.1 hd590300_0 conda-forge
libpng 1.6.39 h753d276_0 conda-forge
librsvg 2.56.3 he3f83f7_1 conda-forge
libsodium 1.0.18 h36c2ea0_1 conda-forge
libsolv 0.7.27 hfc55251_0 conda-forge
libsqlite 3.44.2 h2797004_0 conda-forge
libssh2 1.11.0 h0841786_0 conda-forge
libstdcxx-ng 13.2.0 h7e041cc_3 conda-forge
libtiff 4.6.0 ha9c0a0a_2 conda-forge
libuuid 2.38.1 h0b41bf4_0 conda-forge
libuv 1.46.0 hd590300_0 conda-forge
libwebp 1.3.2 h658648e_1 conda-forge
libwebp-base 1.3.2 hd590300_0 conda-forge
libxcb 1.15 h0b41bf4_0 conda-forge
libxcrypt 4.4.36 hd590300_1 conda-forge
libxml2 2.12.3 h232c23b_0 conda-forge
libzlib 1.2.13 hd590300_5 conda-forge
lz4-c 1.9.4 hcb278e6_0 conda-forge
lzo 2.10 h516909a_1000 conda-forge
mako 1.3.0 pyhd8ed1ab_0 conda-forge
mamba 1.5.6 py311h3072747_0 conda-forge
markupsafe 2.1.3 py311h459d7ec_1 conda-forge
matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge
menuinst 2.0.1 py311h38be061_0 conda-forge
mistune 3.0.2 pyhd8ed1ab_0 conda-forge
nb_conda_kernels 2.3.1 py311h38be061_2 conda-forge
nbclassic 1.0.0 pyhb4ecaf3_1 conda-forge
nbclient 0.8.0 pyhd8ed1ab_0 conda-forge
nbconvert 7.13.1 pyhd8ed1ab_0 conda-forge
nbconvert-core 7.13.1 pyhd8ed1ab_0 conda-forge
nbconvert-pandoc 7.13.1 pyhd8ed1ab_0 conda-forge
nbdime 4.0.1 pyhd8ed1ab_0 conda-forge
nbformat 5.9.2 pyhd8ed1ab_0 conda-forge
nbgitpuller 1.2.0 pypi_0 pypi
nbgrader 0.9.1 pypi_0 pypi
ncurses 6.4 h59595ed_2 conda-forge
nest-asyncio 1.5.8 pyhd8ed1ab_0 conda-forge
nodejs 20.9.0 hb753e55_0 conda-forge
notebook 7.0.6 pyhd8ed1ab_0 conda-forge
notebook-shim 0.2.3 pyhd8ed1ab_0 conda-forge
oauthlib 3.2.2 pyhd8ed1ab_0 conda-forge
openjdk 21.0.1 haa376d0_0 conda-forge
openssl 3.2.0 hd590300_1 conda-forge
overrides 7.4.0 pyhd8ed1ab_0 conda-forge
packaging 23.2 pyhd8ed1ab_0 conda-forge
pamela 1.1.0 pyh1a96a4e_0 conda-forge
pandoc 3.1.3 h32600fe_0 conda-forge
pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge
pango 1.50.14 ha41ecd1_2 conda-forge
parso 0.8.3 pyhd8ed1ab_0 conda-forge
pcre2 10.42 hcad00b1_0 conda-forge
pexpect 4.9.0 pypi_0 pypi
pickleshare 0.7.5 py_1003 conda-forge
pip 23.3.2 pyhd8ed1ab_0 conda-forge
pixman 0.42.2 h59595ed_0 conda-forge
pkgutil-resolve-name 1.3.10 pyhd8ed1ab_1 conda-forge
platformdirs 4.1.0 pyhd8ed1ab_0 conda-forge
pluggy 1.3.0 pyhd8ed1ab_0 conda-forge
prometheus_client 0.19.0 pyhd8ed1ab_0 conda-forge
prompt-toolkit 3.0.42 pyha770c72_0 conda-forge
psutil 5.9.7 py311h459d7ec_0 conda-forge
pthread-stubs 0.4 h36c2ea0_1001 conda-forge
ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge
pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge
pybind11-abi 4 hd8ed1ab_3 conda-forge
pycosat 0.6.6 py311h459d7ec_0 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pycrdt 0.8.2 py311h46250e7_0 conda-forge
pycrdt-websocket 0.12.6 pyhd8ed1ab_0 conda-forge
pycurl 7.45.1 py311hae980a4_3 conda-forge
pygments 2.17.2 pyhd8ed1ab_0 conda-forge
pyjwt 2.8.0 pyhd8ed1ab_0 conda-forge
pyopenssl 23.3.0 pyhd8ed1ab_0 conda-forge
pysocks 1.7.1 pyha2e5f31_6 conda-forge
python 3.11.7 hab00c5b_1_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python-fastjsonschema 2.19.0 pyhd8ed1ab_0 conda-forge
python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge
python_abi 3.11 4_cp311 conda-forge
pytz 2023.3.post1 pyhd8ed1ab_0 conda-forge
pyyaml 6.0.1 py311h459d7ec_1 conda-forge
pyzmq 25.1.2 py311h34ded2d_0 conda-forge
rapidfuzz 3.6.1 pypi_0 pypi
readline 8.2 h8228510_1 conda-forge
referencing 0.32.0 pyhd8ed1ab_0 conda-forge
reproc 14.2.4.post0 hd590300_1 conda-forge
reproc-cpp 14.2.4.post0 h59595ed_1 conda-forge
requests 2.31.0 pyhd8ed1ab_0 conda-forge
rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge
rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge
rpds-py 0.15.2 py311h46250e7_0 conda-forge
ruamel.yaml 0.18.5 py311h459d7ec_0 conda-forge
ruamel.yaml.clib 0.2.7 py311h459d7ec_2 conda-forge
send2trash 1.8.2 pyh41d4057_0 conda-forge
setuptools 68.2.2 pyhd8ed1ab_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
smmap 5.0.1 pypi_0 pypi
sniffio 1.3.0 pyhd8ed1ab_0 conda-forge
soupsieve 2.5 pyhd8ed1ab_1 conda-forge
sqlalchemy 2.0.23 py311h459d7ec_0 conda-forge
stack_data 0.6.2 pyhd8ed1ab_0 conda-forge
tbx20py 0.1.0 pypi_0 pypi
terminado 0.18.0 pyh0d859eb_0 conda-forge
tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge
tk 8.6.13 noxft_h4845f30_101 conda-forge
tomli 2.0.1 pyhd8ed1ab_0 conda-forge
tornado 6.3.3 py311h459d7ec_1 conda-forge
tqdm 4.66.1 pyhd8ed1ab_0 conda-forge
traitlets 5.14.0 pyhd8ed1ab_0 conda-forge
truststore 0.8.0 pyhd8ed1ab_0 conda-forge
types-python-dateutil 2.8.19.14 pyhd8ed1ab_0 conda-forge
typing-extensions 4.9.0 hd8ed1ab_0 conda-forge
typing_extensions 4.9.0 pyha770c72_0 conda-forge
typing_utils 0.1.0 pyhd8ed1ab_0 conda-forge
tzdata 2023d h0c530f3_0 conda-forge
uri-template 1.3.0 pyhd8ed1ab_0 conda-forge
urllib3 2.1.0 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.12 pyhd8ed1ab_0 conda-forge
webcolors 1.13 pyhd8ed1ab_0 conda-forge
webencodings 0.5.1 pyhd8ed1ab_2 conda-forge
websocket-client 1.7.0 pyhd8ed1ab_0 conda-forge
wheel 0.42.0 pyhd8ed1ab_0 conda-forge
widgetsnbextension 4.0.9 pypi_0 pypi
xorg-fixesproto 5.0 h7f98852_1002 conda-forge
xorg-inputproto 2.3.2 h7f98852_1002 conda-forge
xorg-kbproto 1.0.7 h7f98852_1002 conda-forge
xorg-libice 1.1.1 hd590300_0 conda-forge
xorg-libsm 1.2.4 h7391055_0 conda-forge
xorg-libx11 1.8.7 h8ee46fc_0 conda-forge
xorg-libxau 1.0.11 hd590300_0 conda-forge
xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge
xorg-libxext 1.3.4 h0b41bf4_2 conda-forge
xorg-libxfixes 5.0.3 h7f98852_1004 conda-forge
xorg-libxi 1.7.10 h7f98852_0 conda-forge
xorg-libxrender 0.9.11 hd590300_0 conda-forge
xorg-libxt 1.3.0 hd590300_1 conda-forge
xorg-libxtst 1.2.3 h7f98852_1002 conda-forge
xorg-recordproto 1.14.2 h7f98852_1002 conda-forge
xorg-renderproto 0.11.1 h7f98852_1002 conda-forge
xorg-xextproto 7.3.0 h0b41bf4_1003 conda-forge
xorg-xproto 7.0.31 h7f98852_1007 conda-forge
xz 5.2.6 h166bdaf_0 conda-forge
yaml 0.2.5 h7f98852_2 conda-forge
yaml-cpp 0.8.0 h59595ed_0 conda-forge
zeromq 4.3.5 h59595ed_0 conda-forge
zipp 3.17.0 pyhd8ed1ab_0 conda-forge
zlib 1.2.13 hd590300_5 conda-forge
zstandard 0.22.0 py311haa97af0_0 conda-forge
zstd 1.5.5 hfc55251_0 conda-forge

PlantUML visualization skin not found

Hi, I am experimenting with the PlantUML visualization, and I am having problems rendering SysMLv2 diagrams without the Eclipse plugin.

Specifically, let's use the following vehicle definitions example:

	part def Axle {
		port leftMountingPoint: AxleMountIF;
		port rightMountingPoint: AxleMountIF;
	}

In the Eclipse, this gets rendered as expected:
Screenshot from 2023-03-02 17-09-58

The SysML plugin generates the following code (this function):

@startuml
skin sysmlbw
skinparam monochrome true
skinparam wrapWidth 300
hide circle

comp def "Axle" as E1  <<(T,blue) part  def>> [[psysml:6fb73ea9-9850-4b45-ba3c-48a845075c3d ]] {
}
comp usage "leftMountingPoint: AxleMountIF " as E2  <<(T,blue) port>> [[psysml:468ce2d7-14a1-4b1e-aca3-17e58044f0bf ]] {
}
comp usage "rightMountingPoint: AxleMountIF " as E3  <<(T,blue) port>> [[psysml:95d05009-6c72-415f-b3e6-f7d183c373f0 ]] {
}
E1 o-- E2 [[psysml:b2e8b17e-0e14-4633-b239-2a74eb2d6f74 ]] 
E1 o-- E3 [[psysml:538c18e7-e9da-4100-98cc-dcb91806c687 ]] 
@enduml

However, if I save this and try to pass the generated code to a standalone plantuml library (the same version as the plugin uses), I get two errors:

Cannot find skin sysmlbw

And when I remove skin sysmlbw I get a syntax error.

Where is sysmlbw defined? And what else needs to be defined to avoid the syntax error?

Package distributed in multiple files

SysMLv2 Pilot Implementation version: 2023-08

I am currently studying the SysML v2 language and experimenting its features leveraging the eclipse pilot implementation.

I was trying to create a package whose content is distributed on several files but it seems that this is not allowed by the tool (the content of only one file is found, in particular the file that comes first in the tree).
The possibility of distributing package content in multiple files would help me in handling for example separation of ownership, version control and IP protection for selective artifacts sharing.

You can find below a simple example of the use case.

Iron Man.sysml

package 'Marvel Films' {
	package 'The Infinity Saga' {
		package 'Phase One' {
			part def 'Iron Man';
			part def 'Iron Man 2';
		}
		package 'Phase Two' {
			part def 'Iron Man 3';
		}
	}
}

Thor.sysml

package 'Marvel Films' {
	package 'The Infinity Saga' {
		package 'Phase One' {
			part def 'Thor';
		}
		package 'Phase Two' {
			part def 'Thor: The Dark World';
		}
	}
}

Must see films.sysml

package must_see_films {
	import 'Marvel Films'::'The Infinity Saga'::'Phase One'::'Iron Man';
	import 'Marvel Films'::'The Infinity Saga'::'Phase One'::Thor; //  THIS WILL GIVE ERROR
}

I was not able to understand if such use case is allowed by the standard and this behavior is only a current limitation of the pilot implementation or if the standard itself does not allow this.

Include textx version of pilot implementation

I've been working on converting the xtext to textx so that I can generate a data model in Python for Gaphor. Would you be open to including this as part of pilot implementation?

SysML v2 parser

Hi,

I am currently delving into this new version of SysML to see if it would make sense to update some SysML v1 models to this new version of the language. I was wondering if there is a SysML v2 parser that could be used to load a SysML v2 model and integrate custom methodologies.

Thanks

API client inaccessible from dependent plugin project

SysMLv2 Pilot Implementation version: 2022-05 (commit: ST6RI-545 Updated constraint in RiskMetadata::Level to use "that". on June 15th, 2022)

Steps to reproduce:

  • Create an Eclipse plugin project that depends on the org.omg.sysml plugin.
  • Try to import and use any of the classes from the org.omg.sysml.api package.

The following project reproduces the problem: sysml.client.zip. The relevant part:

import org.omg.sysml.ApiClient;
import org.omg.sysml.ApiException;
import org.omg.sysml.Configuration;
import org.omg.sysml.api.CommitApi;
import org.omg.sysml.api.ProjectApi;
import org.omg.sysml.model.Commit;
import org.omg.sysml.model.Project;

//...

ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost:9000"); // the SysML v2 API and Services pilot implementation is used
ProjectApi projectApi = new ProjectApi(defaultClient);
CommitApi commitApi = new CommitApi(defaultClient);
try {
	Project project = projectApi.postProject(new Project());
	Commit commit = commitApi.postCommitByProject(project.getAtId(), new Commit(), null);
} catch (ApiException e) {
	// ...
}

Expected output: The code compiles and runs without an exception, the appropiate requests are sent.

Actual output: The code does not compile, instead the following compile errors arise:

ApiClient cannot be resolved to a type
ApiException cannot be resolved to a type
CommitApi cannot be resolved to a type
CommitApi cannot be resolved to a type
Commit cannot be resolved to a type
Commit cannot be resolved to a type
Configuration cannot be resolved
ProjectApi cannot be resolved to a type
ProjectApi cannot be resolved to a type
Project cannot be resolved to a type
Project cannot be resolved to a type
The import org.omg.sysml.api cannot be resolved
The import org.omg.sysml.api cannot be resolved
The import org.omg.sysml.ApiClient cannot be resolved
The import org.omg.sysml.ApiException cannot be resolved
The import org.omg.sysml.Configuration cannot be resolved
The import org.omg.sysml.model cannot be resolved
The import org.omg.sysml.model cannot be resolved

Additional info: Adding the API jar directly as a dependency will remove compile errors, but instead causes a LinkageError in runtime, revealing that the API classes are already loaded. This suggests that the API package isn't properly exported from the org.omg.sysml plugin.

We believe that the jar file should not be added as an extra classpath entry, and the api packages should be exported.

Stack Overflow during Serialization

Hello,

I try to read a xtext sysml file and afterward write it back using the Xtext serializer . The serializer is initialized as follow:

Injector injector = new SysMLStandaloneSetup().createInjectorAndDoEMFRegistration();
Serializer serializer = injector.getInstance(Serializer.class);

However, once I try to serialize the root Element of my resource I receive a stack overflow, which seems to appear during the org.eclipse.xtext.serializer.analysis.GrammarConstraintProvider.Constraint#computeUpperBound operation`:

java.lang.StackOverflowError
	at java.base/java.util.HashMap.hash(HashMap.java:338)
	at java.base/java.util.HashMap.getNode(HashMap.java:568)
	at java.base/java.util.HashMap.get(HashMap.java:556)
	at org.eclipse.xtext.serializer.analysis.GrammarConstraintProvider$Constraint.computeUpperBound(GrammarConstraintProvider.java:193)
	at org.eclipse.xtext.serializer.analysis.GrammarConstraintProvider$Constraint.computeUpperBound(GrammarConstraintProvider.java:218)
	at org.eclipse.xtext.serializer.analysis.GrammarConstraintProvider$Constraint.computeUpperBound(GrammarConstraintProvider.java:204)
	at org.eclipse.xtext.serializer.analysis.GrammarConstraintProvider$Constraint.computeUpperBound(GrammarConstraintProvider.java:218)
	at org.eclipse.xtext.serializer.analysis.GrammarConstraintProvider$Constraint.computeUpperBound(GrammarConstraintProvider.java:204)
	at org.eclipse.xtext.serializer.analysis.GrammarConstraintProvider$Constraint.computeUpperBound(GrammarConstraintProvider.java:218)
	at org.eclipse.xtext.serializer.analysis.GrammarConstraintProvider$Constraint.computeUpperBound(GrammarConstraintProvider.java:204)
	at org.eclipse.xtext.serializer.analysis.GrammarConstraintProvider$Constraint.computeUpperBound(GrammarConstraintProvider.java:218)
	at org.eclipse.xtext.serializer.analysis.GrammarConstraintProvider$Constraint.computeUpperBound(GrammarConstraintProvider.java:204)
	at org.eclipse.xtext.serializer.analysis.GrammarConstraintProvider$Constraint.computeUpperBound(GrammarConstraintProvider.java:218)

More precisely, this seems to happen during the resolvement of the multiplicity.

The example sysml model I use looks as follows:

library package Core {

	package Base {

	    item def Bar  {

         }

         item def Foo  {
             ref externalItemMappings: Bar [0..1];
         }

    }
}

This is my test code:

File  metaModelAsFile = getFile(FILE_NAME);
        ResourceSet rs = new ResourceSetImpl();
        Resource resource = rs.getResource(URI.createURI(metaModelAsFile.toURI().toString()), true);
        Element rootElement = (Element) resource.getContents().get(0);

        Injector injector = new SysMLStandaloneSetup().createInjectorAndDoEMFRegistration();
        Serializer serializer = injector.getInstance(Serializer.class);
        String serialize = serializer.serialize(rootElement);

Is this a known issue? Do I miss something during the initialization of the serializer? Do you have any example code or test which tries to achieve something similar? The overall use case we have, is that we try to export our sysmlv2 model to a xtext file for different usages.

Thanks and Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.