Skip to content

ST6RI-926 org.omg.sysml.logic module#754

Open
AxelRICHARD wants to merge 2 commits into
masterfrom
ST6RI-926
Open

ST6RI-926 org.omg.sysml.logic module#754
AxelRICHARD wants to merge 2 commits into
masterfrom
ST6RI-926

Conversation

@AxelRICHARD
Copy link
Copy Markdown
Contributor

@AxelRICHARD AxelRICHARD commented May 13, 2026

Summary

This PR extracts model-independent SysML runtime logic from org.omg.sysml into new standalone modules, org.omg.sysml.logic and org.omg.sysml.logic.bundle, and updates dependent projects to consume that logic through explicit bundle and Maven dependencies.

The change also introduces a standalone bootstrap for EMF delegate registration and library resolution, so core SysML logic can run outside Eclipse/Xtext startup, and adds plain-EMF regression tests for that standalone path.

Language Features

  1. Standalone runtime logic extraction.
    The model-independent SysML runtime layer has been split out of org.omg.sysml into a dedicated org.omg.sysml.logic module. This includes:
    • invocation delegates
    • setting delegates
    • adapters
    • expression evaluators
    • library function infrastructure
    • shared runtime utilities
  2. Namespace resolution delegates hardened.
    The extracted runtime now carries the delegate implementations for Namespace::resolve, resolveLocal, resolveVisible, and resolveGlobal, with runtime behavior aligned to the intended standalone delegation flow.
  3. Standalone delegate bootstrap.
    A new SysMLLogicStandaloneSetup class registers the SysML derived-property setting delegates and invocation delegates directly with EMF, allowing runtime use without requiring the Xtext runtime modules to be initialized first.

Model Libraries

  1. Standalone library resolution support.
    The commit introduces SysMLLibraryUtil and IModelLibraryProvider as runtime-facing abstractions for library lookup, together with a standalone ResourceSetModelLibraryProvider implementation that resolves library elements from the EMF ResourceSet.
  2. Runtime-module provider wiring.
    KerML and SysML Xtext runtime modules and XMI runtime modules are updated to install the provider lookup used by the shared library utility, so both Eclipse/Xtext and standalone EMF runtimes rely on the same library resolution entry point.

Backward Incompatibilities

  1. Package/module relocation for runtime logic.
    Code that previously referenced runtime logic classes from org.omg.sysml must now resolve them from org.omg.sysml.logic or from the exported org.omg.sysml.logic.bundle plugin.
  2. Removed legacy utility entry points from org.omg.sysml.
    The following legacy classes/interfaces are deleted from the old location and replaced by logic-module equivalents:
    • SysMLLibraryUtil
    • IModelLibraryProvider
    • ISysMLScope
    • SysMLScopeUtil
  3. Bundle wiring changes.
    Downstream Eclipse plugins now depend explicitly on org.omg.sysml.logic.bundle, and Maven builds now include the new org.omg.sysml.logic module in the reactor.

Technical Updates

  1. New modules.
    Added:
    • org.omg.sysml.logic
    • org.omg.sysml.logic.bundle
  2. Large-scale source relocation.
    Moved the SysML runtime implementation out of org.omg.sysml into org.omg.sysml.logic, including:
    • org.omg.sysml.adapter.*
    • org.omg.sysml.delegate.invocation.*
    • org.omg.sysml.delegate.setting.*
    • org.omg.sysml.expressions.*
    • org.omg.sysml.util.*
  3. Consumer rewiring.
    Updated KerML/SysML Xtext, execution, interactive, and test modules to import and require the extracted logic module/bundle instead of relying on the previous monolithic placement.
  4. Standalone regression coverage.
    Added plain-EMF tests validating:
    • standalone setup registration
    • library lookup without Xtext bootstrap
    • namespace resolution delegate behavior in the extracted runtime
  5. Build and packaging updates.
    Updated:
    • Maven reactor structure
    • Eclipse bundle manifests
    • feature inclusion wiring
    • classpath/build metadata for projects that now depend on the logic bundle

@AxelRICHARD AxelRICHARD added the enhancement New feature or request label May 13, 2026
@seidewitz seidewitz marked this pull request as draft May 13, 2026 15:09
Split model-independent SysML logic out of org.omg.sysml into the new
org.omg.sysml.logic and org.omg.sysml.logic.bundle modules, move the
delegate/adapter/expression utility code there, and update bundle/build
wiring to use explicit logic dependencies.

Add standalone bootstrap support for library resolution and EMF delegate
registration without requiring Eclipse/Xtext startup, together with
plain-EMF regression coverage and supporting Javadoc updates.

Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
@seidewitz
Copy link
Copy Markdown
Member

@AxelRICHARD
This PR is hard to review as one big commit. In the future, please avoid using force push and provide multiple more granular commits for the PR.

@seidewitz seidewitz added this to the 2026-05 milestone May 28, 2026
@seidewitz
Copy link
Copy Markdown
Member

seidewitz commented May 28, 2026

  1. I found the unit tests in org.omg.sysml.logic/src/test/java. Why is this not in the .classpath as a source folder?
  2. As previously discussed, copyright notices for Obeo need to be added to all new or altered code files (see Copyright License Header). (Be sure the licensing is the EPL, not the LGPL. The LGPL seems to have reappeared in some copyright headers, even though it was all changed to EPL in the 2026-04 release.)

@seidewitz seidewitz changed the title ST6RI-926 Extract SysML logic into standalone runtime modules ST6RI-926 org.omg.sysml.logic module May 28, 2026
- Added Junit test in DerivedPropertyAndOperationTest.java.
- Current implementation passes.
@seidewitz
Copy link
Copy Markdown
Member

I have added the test method DerivedPropertyAndOperationTest::testNamespaceResolve in project org.omg.sysml.interactive.test to test the functionality of the implementations of Namespace::resolveLocal, resolveGlobal and resolve. This will now be included in the build CI tests. The test passes on the current implementations without change.

return null;
}

String[] segments = name.split("::");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though the qualified names expected here are currently limited, you should still use ElementUtil::parseQualifiedName, for consistency and to ensure that, at lease, single-quoted operator names are handled correctly.

* the configured model library path or the conventional {@code sysml.library}
* folder name in the URI.
*/
private boolean isLibraryResource(Resource resource) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also a isModelLibrary method in KerMLValidation.xtext. Please check that these methods are consistent. Ideally, there should be one method (probably in SysMLLibraryUtil) that is used in both places.

*
* 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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be EPL, not LGPL.

*
* 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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be EPL, not LGPL.

*
* 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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be EPL, not LGPL.

*
* 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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be EPL, not LGPL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants