Skip to content

feat: import the OpenSysML extension libraries with their history, plus pilot-pinned validation CI - #1

Merged
HuiJun merged 177 commits into
mainfrom
feature/import-extension-libraries
Oct 4, 2026
Merged

HuiJun merged 177 commits into
mainfrom
feature/import-extension-libraries

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Moves OpenSysML's 14 non-normative SysML v2/KerML extension libraries into this repository, with their history. OpenSysML and any other SysML v2 tool can then consume them from one place.

  • History: git filter-repo on a fresh clone of Open-MBEE/OpenSysML develop (source commit 49d7d1350c4347425ed23dae872186dce357563e).

    • The filter keeps every path these files have lived at: internal/workspace/libs/stdlib/OpenSysML Libraries/, internal/core/libs/stdlib/OpenSysML Libraries/ and internal/core/libs/stdlib/Systemica Libraries/SystemicaMathFunctions.kerml, which was later renamed OpenSysMLMathFunctions.kerml. That is 170 commits.
    • #N references in commit messages are rewritten to Open-MBEE/OpenSysML#N, so they don't link to this repository's issues.
    • The import lands as a merge with --allow-unrelated-histories (42dc1f7). The imported libraries/ is byte-identical to the source commit's directory.
    • Merge this PR with a merge commit, not squash or rebase, or the history is lost.
  • Layout: a flat libraries/<Name>.sysml|.kerml, one top-level library package per file, with the file stem equal to the package name. SysML resolves libraries by package name, not by path, so any tool can load the directory as-is. scripts/check-readme-table.sh enforces the stem/package rule and keeps the README table complete.

  • License: Apache-2.0 for every file. All were authored in OpenSysML; OpenSysML's internal/workspace/libs/stdlib/NOTICE already excludes OpenSysML Libraries/ from the OMG EPL-2.0 material, and no OMG library text is copied.

  • Validation CI (.github/workflows/ci.yml):

    • scripts/pilot-pin.sh pins the OMG pilot at tag 2026-08 = 692170b71867353b8f90341e61556f49a5beb0e5, the same pin OpenSysML uses. scripts/verify-pilot-pin.sh fails if that tag no longer resolves to that commit.
    • scripts/validate-libraries.sh builds the pilot batch validator and requires 0 errors and 0 warnings over libraries/.
    • Allow-list: exactly 4 warnings are allowed for now, listed in validation/allowed-warnings.txt. These are "User library packages should not be marked as standard" on DiagramLayout, IdentityMetadata, MigrationMetadata and SysMLValidation. They are not fixed here, because an open OpenSysML PR changes those declarations to library package; once it merges, the change is ported here and the entries are deleted. A stale allow-list entry fails the gate, so the list can only shrink.
  • .kpar: scripts/build-kpar.py writes a deterministic KerML 10.3 project archive (.project.json + .meta.json with a SHA-256 per unit, in the format sysml-toolkit reads). CI uploads it as an artifact. release.yml attaches it to every vX.Y.Z tag's GitHub release.

  • Engine contract (engine-contract.json): the 125 qualified names OpenSysML binds to, so these names are an API. Each entry has a kind and the OpenSysML consumers that use it, plus migratorEmitted on names the SysML v1 migrator writes into user models:

    • function (10): parameters in order;
    • metadata (26): the attributes the engine reads;
    • document (45), element (38) and package (7).

    scripts/check-engine-contract.sh runs in CI in two parts:

    • check-engine-contract.py checks the schema, sort order and uniqueness.
    • engine-contract/CheckEngineContract.java loads the libraries on the pinned pilot and resolves every entry: a namespace for package, a Function with exactly those parameters for function, and a Metaclass with those features for metadata.

    On a PR it also diffs against the base's manifest. Removing an entry, changing its kind or parameters, or dropping an attribute fails unless contract is bumped, which means a MAJOR release and a coordinated OpenSysML re-pin (CONTRIBUTING.md).

  • Advisory job: OpenSysML against these libraries checks out OpenSysML develop, syncs this PR's libraries in with scripts/sync-extension-libraries.sh --source, and runs the library-dependent Go test packages. It is continue-on-error and not a required check. Until the companion OpenSysML PR lands on develop, it has no sync script to call and skips.

  • Docs: README.md covers purpose, the library table with portability, loading in the pilot/Eclipse/SysON/sysml-toolkit/OpenSysML, and semver policy. CONTRIBUTING.md covers how to propose, name, document and validate a library, and how review works.

Merge order

  1. Merge this PR first, with a merge commit.
  2. Then the companion Open-MBEE/OpenSysML PR. It vendors these libraries pinned to this branch's commit. After this PR merges, its pin is bumped to the merged commit on main.

Verification

  • validate-libraries.sh passes locally with 0 errors and the 4 allow-listed warnings.
  • Each of these fails the gate: an injected syntax error, adding standard to a fifth file, deleting an allow-list entry, and adding a stale allow-list entry.
  • Each of these fails the contract check (scratch edits, reverted):
    • renaming OpenSysMLMathFunctions::log in its library;
    • swapping log's parameters;
    • renaming a metadata attribute;
    • an invalid kind;
    • removing Simulation::MonteCarlo from the manifest. That one passes with contract: 2 and prints the MAJOR notice.
  • build-kpar.py produces byte-identical output across two builds. sysmlv2 check --lib <sysml.library> <the .kpar> (sysml-toolkit) reads the archive and verifies its checksums.

Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/bf0cf4d7769a49a8adfee6bfd87860f3
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/bf0cf4d7769a49a8adfee6bfd87860f3?variant=devin
Requested by: @HuiJun

devin-ai-integration Bot and others added 30 commits August 11, 2026 23:50
…a extension library

The OMG Kernel Function Library declares no signature for any of them, and the
vendored files stay byte-identical, so a non-normative Systemica extension
package declares them and the runtime registry supplies the implementations.
…15264-rename-opensysml

* refactor: move Go module path to github.com/Open-MBEE/OpenSysML

Co-Authored-By: jason.han <[email protected]>

* refactor(rdf): move the extension namespace to urn:opensysml:sysml:

Co-Authored-By: jason.han <[email protected]>

* refactor(libs): rename the non-normative math library to OpenSysMLMathFunctions

Co-Authored-By: jason.han <[email protected]>

* refactor: rename SYSTEMICA_* environment variables to OPENSYSML_*

Co-Authored-By: jason.han <[email protected]>

* refactor(vscode): rename the extension and its settings to opensysml

Co-Authored-By: jason.han <[email protected]>

* build: rename release archives and the Homebrew formula to opensysml

Co-Authored-By: jason.han <[email protected]>

* docs: rename the product to OpenSysML across docs, comments and fixtures

Co-Authored-By: jason.han <[email protected]>

* docs: fix article before OpenSysML

Co-Authored-By: jason.han <[email protected]>

* docs(changelog): record the OpenSysML rename and its migration steps

Co-Authored-By: jason.han <[email protected]>

* fix(rdf): refuse a graph in the pre-rename extension namespace

Co-Authored-By: jason.han <[email protected]>

* docs(skills): rename the solver env vars in the merged REPL skill notes

Co-Authored-By: jason.han <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: jason.han <[email protected]>
…03803-related-elements-traversal

* feat(queryexec): execute named relationship traversal in document queries

Co-Authored-By: jason.han <[email protected]>

* fix(queryexec): traverse declared satisfy/verify requirements and charge edge indexing to the visit budget

Co-Authored-By: jason.han <[email protected]>

* fix(queryexec): mark satisfy requirement declarations in the AST and scope the objective climb to verification

Co-Authored-By: jason.han <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: jason.han <[email protected]>
…04415-document-plan-ir

* feat(docplan): native document planning and backend-agnostic document IR

Co-Authored-By: jason.han <[email protected]>

* fix(docplan): enumerate effective members including inherited and anonymous declarations

Co-Authored-By: jason.han <[email protected]>

* fix(docplan,docir): reject uncompiled plans, follow redefinition lineage, validate inherited structure

Co-Authored-By: jason.han <[email protected]>

* fix(docplan): reject unresolved explicit query types instead of inheriting

Co-Authored-By: jason.han <[email protected]>

* test(docir): expect unknown-relationship failure kind from merged traversal

Co-Authored-By: jason.han <[email protected]>

* fix(docplan): accept unary-signed numeric literals in query bindings

Co-Authored-By: jason.han <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: jason.han <[email protected]>
Adds a Diagram content block to the DocumentQueries vocabulary that
references a declared view or an element with a stated rendering kind,
carries caption and flow direction, and renders through the existing
view engine: fenced Mermaid for graph kinds, pipe tables for table
kinds, with typed diagnostics at planning, evaluation and rendering.

Co-Authored-By: jason.han <[email protected]>
…38656-authoring-richness

* feat(docplan): inline runs, cross-references and grouped tables in native documents

Co-Authored-By: jason.han <[email protected]>

* fix(docplan): bind inherited references to redefined content; keep anchors and tab-padded emphasis in Markdown

Co-Authored-By: jason.han <[email protected]>

* fix(queryexec): keep projected columns when a filter selects no rows

Co-Authored-By: jason.han <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: jason.han <[email protected]>
A projection may pair declared properties with named Column(name,
expression) computed columns evaluated once per row: arithmetic,
string concatenation, unary +/- and ?? defaults over the row
element's features. Names are explicit, visible to OrderBy, groupBy
validation and docplan's static projection inspection. A failing
expression fails the query with a typed, provenance-carrying error;
?? is the deliberate absent-value mechanism. Planning validates
column forms, unknown features, unsupported operators, static type
mismatches, duplicates and empty projections with source spans.

Co-Authored-By: jason.han <[email protected]>
… feature reads to conforming rows, and fail typed on bare absent columns

Co-Authored-By: jason.han <[email protected]>
…orce scalar computed results, and read qualified features from declarations

Co-Authored-By: jason.han <[email protected]>
A query-backed paragraph or list may nest SpanColumn/LinkColumn column
runs mapping projected columns - declared properties and computed
Column names alike - to emphasis/strong/code spans (fixed style or a
per-row style column) and external links (a target column). Plans stay
immutable, unknown columns and invalid styles are typed planning
errors with source spans when the projection is statically known and
typed runtime errors naming query, column and row otherwise, and each
generated run keeps its projected value's provenance.

Co-Authored-By: jason.han <[email protected]>
…58029-cross-document-refs

* feat(docgen): cross-document Ref targets with linked multi-document rendering

Co-Authored-By: jason.han <[email protected]>

* fix(docgen): multi-file models, incoming anchors, derived-document chains, atomic output

Co-Authored-By: jason.han <[email protected]>

* fix(docgen): qualified inherited targets and fully restorable document-set commits

Co-Authored-By: jason.han <[email protected]>

* fix(docgen): write through special destinations, stop staging leaks, inherit document typings via redefinition

Co-Authored-By: jason.han <[email protected]>

* fix(docgen): sync staged documents and directories so a crash cannot lose the rendered set

Co-Authored-By: jason.han <[email protected]>

* docs: regenerate derived documentation counts after merging main

Co-Authored-By: jason.han <[email protected]>

* fix(cli): keep destinations in place through -render-documents commits and reject case-colliding file names

Co-Authored-By: jason.han <[email protected]>

* fix(cli): reject aliased -render-documents destinations and restore backups on Windows rollback

Co-Authored-By: jason.han <[email protected]>

* fix(cli): keep rollback restores atomic and catch dangling directory aliases

Co-Authored-By: jason.han <[email protected]>

* fix(cli): replace existing documents portably and catch case-aliased targets

Co-Authored-By: jason.han <[email protected]>

* fix(cli): restore a backup when a failed replacement removed its destination

Co-Authored-By: jason.han <[email protected]>

* docs(cli): tighten restoreBackup comment

Co-Authored-By: jason.han <[email protected]>

* chore: retrigger CI after transient module proxy failure

Co-Authored-By: jason.han <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: jason.han <[email protected]>
…lidation pass

Implements phases 1-3 of docs/project/element-identity-annotations.md:
the IdentityMetadata stdlib extension, an identity side table computing
effective element ids and ProjectRef scopes, and a constraint-tier pass
validating id shape, scope binding, and uniqueness over the generated
id space.

Co-Authored-By: jason.han <[email protected]>
…33617-identity-metadata-library

* feat(identity): IdentityMetadata library, identity side table, and validation pass

Implements phases 1-3 of docs/project/element-identity-annotations.md:
the IdentityMetadata stdlib extension, an identity side table computing
effective element ids and ProjectRef scopes, and a constraint-tier pass
validating id shape, scope binding, and uniqueness over the generated
id space.

Co-Authored-By: jason.han <[email protected]>

* fix(identity): reject empty declared ids and validate uniqueness across workspace documents

Co-Authored-By: jason.han <[email protected]>

* fix(identity): only flag _p ids whose suffix decodes as expression positions

Co-Authored-By: jason.han <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: jason.han <[email protected]>
Release 0.4.3: element identity in the notation, sound solver verdicts, exercised clients
Bundles a non-normative OOSEM vocabulary (definitions, base usages and
semantic-metadata keywords for enterprise, requirement, logical, physical
and node modelling) that reuses ParametersOfInterestMetadata, TradeStudies,
RequirementDerivation and CauseAndEffect, plus a wildfire-watch example.
Fixes leadingPrefixIsDefUsage so '#kw use case ...' dispatches. Rebaselines
the pilot differential and RDF round-trip ratchets for the new example.

Co-Authored-By: jason.han <[email protected]>
…s prose

Queries gain the KerML Element features shortName, declaredShortName and documentation as projectable properties, wired through Project, OrderBy, WhereFeature, Column expressions (Element::...), the gRPC and OSLC surfaces and reflective access. documentation is the normalized body of each doc comment in declaration order, read through a source-text lookup the semantic model now carries; the LSP hover shares the normalizer.

Documents gain the Definitions content kind: one term/description entry per row of the bound query, rendered as "**term** — description" paragraphs in Markdown (and so PDF) and as a <dl> of <dt>/<dd> pairs in HTML. Missing or unprojected columns are typed errors at planning time when the projection is static, otherwise at evaluation.

Co-Authored-By: jason.han <[email protected]>
Adds five OOSEM viewpoints and eight view definitions that specialise the
standard view definitions with the method's filters and renderings, so a
model writes only the view usage and what it exposes. Adds OOSEMMethodPass,
constraint-tier warnings that a requirement derives from the level above and
is satisfied, that a logical component is allocated, and that a use case's
subject is the system context or enterprise; each rule waits until the
model declares the level it traces to.

Fixes Resolver.importAdmits so a view usage's expose honours the filter
conditions inherited from its view definition and that definition's
supertypes. Rebaselines the pilot differential for the grown example.

Co-Authored-By: jason.han <[email protected]>
devin-ai-integration Bot and others added 20 commits October 1, 2026 08:38
…er -render-ports full

An interconnection now draws on each part the ports a connector, interface, flow or binding of the view ends at and no other, each named alone: in DOT a small square on the part's border with the name beside it (an HTML-table node whose body cell is the part's box), in PlantUML a `port "name"`, in Mermaid a pin node `n1.0["durationIn"]`, in text a `port name` line. A part none of whose ports is connected draws as a part without ports, so a crowded diagram shows what it connects and nothing more.

The new `view.Options.Ports` display — `minimal`, the default, or `full`, every port a part has labelled `name : Type` as before — is chosen with `-render-ports` on `-render` and `-render-all`, a `minimal|full` word of `%render`, `"ports"` on `opensysml/render` (the displays listed by the new `openSysmlRenderPorts` capability) and `Diagram::ports` in a document (`invalid-ports`, `unsupported-ports` errors). The display filters what a form draws; the node keeps every port and the edges their pins, and an action's pins are drawn whole whatever the display.

Co-Authored-By: jason.han <[email protected]>
…n-typed-ports

Co-Authored-By: jason.han <[email protected]>

# Conflicts:
#	internal/workspace/libs/stdlib.snapshot
…n-typed-ports

Co-Authored-By: jason.han <[email protected]>

# Conflicts:
#	internal/workspace/libs/stdlib.snapshot
…egers

Co-Authored-By: jason.han <[email protected]>

# Conflicts:
#	docs/project/pilot-differential-baseline.json
#	internal/workspace/libs/stdlib.snapshot
…ded-integers

* feat(runtime): unbounded KerML Integers with an int64 fast path

Integer, Natural and Positive values keep int64 while they fit and
promote to math/big when an exact result leaves it, demoting back when it
fits again. Equality, hashing, ordering and formatting are exact across
both representations. Wide results are bounded by a configurable
OPENSYSML_MAX_INTEGER_BITS budget, and a wide value used as an index,
multiplicity, dimension or count is a typed addressability error.

The wire carries a wide Integer in additive decimal-string arms
(Value.big_int_value, Quantity.big_int_magnitude,
DocumentValue.big_int_value); every client decodes it. Generated Go
computes exactly with math/big; generated C refuses a calc whose Integer
arithmetic may leave int64, naming the construct.

Co-Authored-By: jason.han <[email protected]>

* test: pin wide Integers across the gRPC wire and an RDF round trip

Co-Authored-By: jason.han <[email protected]>

* fix(runtime): fold constant Integer expressions under the run's size budget

Co-Authored-By: jason.han <[email protected]>

* fix(clients): carry wide Integers through Rust and Julia document values and encoders

Co-Authored-By: jason.han <[email protected]>

* feat(engine): carry wide Integers through the WebAssembly engine's JSON wire

Co-Authored-By: jason.han <[email protected]>

* fix(semantics): compare wide Integers with Reals exactly in element filters

Co-Authored-By: jason.han <[email protected]>

* fix(runtime): floor the Integer size budget at 64 bits so every int64 fits within it

Co-Authored-By: jason.han <[email protected]>

* fix(node): send Integer inputs beyond int64 as big_int_value after merging develop

Co-Authored-By: jason.han <[email protected]>

* fix(grpc): negotiate wide Integer wire arms through a big_int_values capability

Co-Authored-By: jason.han <[email protected]>

* fix(grpc): gate wide Integers in vectors and document queries on big_int_values

A vector holding an Integer beyond int64 is withheld whole, as unsupported,
from a client without big_int_values rather than sent with a null component.
A document query bound to or answering such an Integer is refused with
UNIMPLEMENTED naming the capability, since DocumentValue has no unsupported
arm, and every bundled client refuses such a binding before the call.

Co-Authored-By: jason.han <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: jason.han <[email protected]>
…n-typed-ports

Co-Authored-By: jason.han <[email protected]>

# Conflicts:
#	internal/workspace/libs/stdlib.snapshot
…lumns-loop-tables

Resolves the regenerated library snapshot, carries the connector-end position as the Integer constant the query value now holds, and gives the read action's result parameter the uniqueness argument shaped now takes.

Co-Authored-By: jason.han <[email protected]>
…n-typed-ports

Co-Authored-By: jason.han <[email protected]>

# Conflicts:
#	internal/workspace/libs/stdlib.snapshot
…rredKeeper annotation the migrator writes

The runtime recognized the keeping accept of a deferring state's do action by its shape — a root-level accept of a signal the state defers — so an ordinary accept of the same signal written at the do action's own level counted as a second keeper, and an occurrence arriving while both were parked could be kept instead of taken, depending on the schedule.

The standard encoding now declares its keeper: the shared deferred-signal writer, used by the SysML v1 migrator and the PSSM referee, marks each keeping loop's accept `#MigrationMetadata::DeferredKeeper`, a new definition of the bundled MigrationMetadata library. Lowering reads the annotation by resolved type into Accept.Keeper, and the runtime's keeps consults that alone; StateGraph.Deferred, which the shape inference read, is removed. The parser takes prefix metadata on an accept node, as PrefixMetadataMember allows, so the mark is ordinary notation.

A conformance case exercises a direct accept beside the keeping loop under every scheduling policy; the lowering test covers resolution by type against a homonymous definition.

Co-Authored-By: jason.han <[email protected]>
…-model-validation

Co-Authored-By: jason.han <[email protected]>

# Conflicts:
#	docs/project/pilot-differential-baseline.json
#	internal/workspace/libs/stdlib.snapshot
Scripts to verify the OMG pilot pin, provision the pinned pilot validator, validate libraries/ with a shrinking warning allow-list, check the README library table against libraries/, and build a deterministic KerML 10.3 project archive.

Co-Authored-By: jason.han <[email protected]>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

devin-ai-integration Bot and others added 2 commits October 4, 2026 02:38
…rlo is an element

Simulation: :MonteCarlo is an analysis case definition, not a metadata def, so the tightened Metaclass check reclassifies it as a bound element.
Co-Authored-By: jason.han <[email protected]>
@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review October 4, 2026 03:55
@HuiJun
HuiJun merged commit 4213d77 into main Oct 4, 2026
2 checks passed
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.

1 participant