Repository navigation
Give every SysML2 package a unique name and parenthesize the view filter - #77
Merged
Merged
Conversation
SysML v2 has no package merging: the OMG Pilot reports duplicate owned member names for the same-named packages split across files. Mirror SysML2Tools PR #143: one uniquely named package per file (<System>_<Name>), private imports from the system/subsystem packages, qualified exposes in the view, and filter not (@sysml::Documentation). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The broad cross-file SysML namespace migration depends on unavailable external parser and rendering tools, so the reported validation and 143-label comparison cannot be independently reproduced.
No open issues 🎉
What changed in this PR
This PR makes the SysML2 architecture model portable to spec-conforming tools by giving packages unique names, adding explicit private imports, updating view exposures, and correcting the view-filter syntax.
Changes:
- Renames subsystem and unit packages using unique
<System>_<Name>namespaces. - Connects system packages to their child packages with private imports.
- Updates
SoftwareStructureViewand documents the new package organization.
| File | Description |
|---|---|
| docs/sysml2/views/design-views.sysml | Updates the software-structure view to expose qualified definitions and uses the parenthesized documentation filter syntax. |
| docs/sysml2/model/rendering/options.sysml | Assigns the options package a unique name. |
| docs/sysml2/model/rendering/layout-tree.sysml | Assigns the layout-tree package a unique name. |
| docs/sysml2/model/rendering/layout-graph.sysml | Assigns the layout-graph package a unique name. |
| docs/sysml2/model/rendering.sysml | Privately imports the rendering model's child packages. |
| docs/sysml2/model/rendering-svg/svg-renderer.sysml | Assigns the SVG renderer package a unique name. |
| docs/sysml2/model/rendering-svg.sysml | Privately imports the SVG renderer package. |
| docs/sysml2/model/rendering-layout/layered-layout-algorithm.sysml | Assigns the layered layout algorithm package a unique name. |
| docs/sysml2/model/rendering-layout/hierarchical-layout-algorithm.sysml | Assigns the hierarchical layout algorithm package a unique name. |
| docs/sysml2/model/rendering-layout/engine/orthogonal-edge-router.sysml | Assigns the orthogonal edge router package a unique name. |
| docs/sysml2/model/rendering-layout/engine/layout-tree-packer.sysml | Assigns the layout-tree packer package a unique name. |
| docs/sysml2/model/rendering-layout/engine/layered-pipeline.sysml | Assigns the layered pipeline package a unique name. |
| docs/sysml2/model/rendering-layout/engine/interconnection-layout-engine.sysml | Assigns the interconnection layout engine package a unique name. |
| docs/sysml2/model/rendering-layout/engine/engine.sysml | Assigns the engine package a unique name and imports its child packages. |
| docs/sysml2/model/rendering-layout/engine/edge-count-gap-widener.sysml | Assigns the edge-count gap widener package a unique name. |
| docs/sysml2/model/rendering-layout/engine/containment-packer.sysml | Assigns the containment packer package a unique name. |
| docs/sysml2/model/rendering-layout/engine/canvas-fitter.sysml | Assigns the canvas fitter package a unique name. |
| docs/sysml2/model/rendering-layout/edge-routing-option.sysml | Assigns the edge-routing option package a unique name. |
| docs/sysml2/model/rendering-layout/default-layout.sysml | Assigns the default layout package a unique name. |
| docs/sysml2/model/rendering-layout/containment-layout.sysml | Assigns the containment layout package a unique name. |
| docs/sysml2/model/rendering-layout/containment-layout-algorithm.sysml | Assigns the containment layout algorithm package a unique name. |
| docs/sysml2/model/rendering-layout/connector-router.sysml | Assigns the connector router package a unique name. |
| docs/sysml2/model/rendering-layout/auto-layout-algorithm.sysml | Assigns the auto-layout algorithm package a unique name. |
| docs/sysml2/model/rendering-layout.sysml | Privately imports the layout system's child packages. |
| docs/sysml2/model/rendering-canvasnet/png-renderer.sysml | Assigns the PNG renderer package a unique name. |
| docs/sysml2/model/rendering-canvasnet/jpeg-renderer.sysml | Assigns the JPEG renderer package a unique name. |
| docs/sysml2/model/rendering-canvasnet/canvasnet-raster-renderer.sysml | Assigns the CanvasNet raster renderer package a unique name. |
| docs/sysml2/model/rendering-canvasnet.sysml | Privately imports the CanvasNet renderer packages and the OTS dependency. |
| docs/sysml2/model/rendering-abstractions/theme.sysml | Assigns the theme package a unique name. |
| docs/sysml2/model/rendering-abstractions/rendering-contracts.sysml | Assigns the rendering contracts package a unique name. |
| docs/sysml2/model/rendering-abstractions/registries.sysml | Assigns the registries package a unique name. |
| docs/sysml2/model/rendering-abstractions/port-label-width-estimator.sysml | Assigns the port label width estimator package a unique name. |
| docs/sysml2/model/rendering-abstractions/notation-metrics.sysml | Assigns the notation metrics package a unique name. |
| docs/sysml2/model/rendering-abstractions/connector-label-placer.sysml | Assigns the connector label placer package a unique name. |
| docs/sysml2/model/rendering-abstractions/box-metrics.sysml | Assigns the box metrics package a unique name. |
| docs/sysml2/model/rendering-abstractions.sysml | Privately imports the abstractions system's child packages. |
| docs/design/introduction.md | Documents the unique package naming convention and updated package organization. |
Review effort: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
SysML v2 has no package merging, but
docs/sysml2/split same-named packages across files (RenderingLayoutx17,RenderingAbstractionsx8,RenderingCanvasNetx4,RenderingModelx4,RenderingSvgx2). The OMG Pilot reports "Duplicate of other owned member name" for each one, and cross-file references fail. SysML2Tools only accepts this because it is lenient (demaconsulting/SysML2Tools#146).filter not @X;is also a syntax error under the spec grammar (demaconsulting/SysML2Tools#147).This change follows the pattern of demaconsulting/SysML2Tools#143 (see also demaconsulting/Agents#64 and demaconsulting/Agents#65):
<System>_<Name>(for exampleRenderingLayout_Engine,RenderingAbstractions_Theme). The five system packages keep their names.private import. No import cycles exist.SoftwareStructureViewexposes each system part def and each unit part def by qualified name.filter not (@SysML::Documentation);..reviewmark.yamland the lint globs usedocs/sysml2/**/*.sysmland need no change.docs/design/introduction.mddescribes the new naming.Validation
dotnet sysml2tools lint 'docs/sysml2/**/*.sysml': 0 diagnostics.pwsh ./fix.ps1,pwsh ./lint.ps1,pwsh ./build.ps1pass (9095 tests).Rendering difference: the per-system package frames are gone
The rendered
SoftwareStructureViewis not byte-identical. Every part def, label, and composition edge is still present (all 143 text labels match). The five system package frames (RenderingModel,RenderingAbstractions,RenderingLayout,RenderingSvg,RenderingCanvasNet) are no longer drawn. TheOtsDependenciesframe is unchanged.A package cannot span files, so a system's units can no longer share one package frame with the system part def. A frame-preserving alternative would be to
public importthe unit packages andexpose System::*. SysML2Tools does not follow that import today (demaconsulting/SysML2Tools#148), although the Pilot does.Type of Change
Related Issues
Refs demaconsulting/SysML2Tools#146, demaconsulting/SysML2Tools#147, demaconsulting/SysML2Tools#148, demaconsulting/Agents#64, demaconsulting/Agents#65
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
pwsh ./build.ps1Code Quality
Quality Checks
Please run the following checks before submitting:
pwsh ./lint.ps1Testing
Documentation
Additional Notes
Only SysML2 model files, the view, and
docs/design/introduction.mdchanged. No source or test changes.