Skip to content

Give every SysML2 package a unique name and parenthesize the view filter - #77

Merged
Malcolmnixon merged 1 commit into
mainfrom
sysml2-unique-packages
Nov 20, 2026
Merged

Malcolmnixon merged 1 commit into
mainfrom
sysml2-unique-packages

Conversation

@Malcolmnixon

Copy link
Copy Markdown
Member

Pull Request

Description

SysML v2 has no package merging, but docs/sysml2/ split same-named packages across files (RenderingLayout x17, RenderingAbstractions x8, RenderingCanvasNet x4, RenderingModel x4, RenderingSvg x2). 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):

  • Each file declares exactly one uniquely named package: <System>_<Name> (for example RenderingLayout_Engine, RenderingAbstractions_Theme). The five system packages keep their names.
  • System and subsystem packages pull in their children with private import. No import cycles exist.
  • The SoftwareStructureView exposes each system part def and each unit part def by qualified name.
  • The view filter is now filter not (@SysML::Documentation);.
  • Model content (part defs, parts, metadata) is unchanged. .reviewmark.yaml and the lint globs use docs/sysml2/**/*.sysml and need no change. docs/design/introduction.md describes the new naming.

Validation

  • OMG Pilot (release 2026-09.1, kernel 0.63.1): all files concatenated with no package merging load with 0 errors and 0 warnings.
  • dotnet sysml2tools lint 'docs/sysml2/**/*.sysml': 0 diagnostics.
  • pwsh ./fix.ps1, pwsh ./lint.ps1, pwsh ./build.ps1 pass (9095 tests).

Rendering difference: the per-system package frames are gone

The rendered SoftwareStructureView is 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. The OtsDependencies frame 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 import the unit packages and expose System::*. SysML2Tools does not follow that import today (demaconsulting/SysML2Tools#148), although the Pilot does.

Before After
SoftwareStructureView before SoftwareStructureView after

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code quality improvement

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

  • Code builds successfully and all tests pass: pwsh ./build.ps1
  • Code produces zero warnings

Code Quality

  • New code has appropriate XML documentation comments
  • Static analyzer warnings have been addressed

Quality Checks

Please run the following checks before submitting:

  • All linters pass: pwsh ./lint.ps1

Testing

  • Added unit tests for new functionality
  • Updated existing tests if behavior changed
  • All tests follow the AAA (Arrange, Act, Assert) pattern
  • Test coverage is maintained or improved

Documentation

  • Updated README.md (if applicable)
  • Updated docs/ documentation (if applicable)
  • Added code examples for new features (if applicable)
  • Updated requirements.yaml (if applicable)

Additional Notes

Only SysML2 model files, the view, and docs/design/introduction.md changed. No source or test changes.

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>
Copilot AI lite review requested due to automatic review settings November 20, 2026 21:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 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 SoftwareStructureView and 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

@Malcolmnixon
Malcolmnixon merged commit 8f94ae8 into main Nov 20, 2026
7 checks passed
@Malcolmnixon
Malcolmnixon deleted the sysml2-unique-packages branch November 20, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants