Standard library

The vendored SysML v2 standard library (Stage D).

A curated subset of the official SysML-v2-Release model library ships with this package (see longeron/_stdlib/README.md): the complete Systems Library, the core Quantities-and-Units files, the Analysis domain-library files (AnalysisTooling, TradeStudies), and a small shim for the KerML kernel names (ScalarValues::Real, …). Longeron-authored extension libraries (LongeronSurfaces) ship beside the vendored content in _stdlib/extensions/ – self-declaring, and never labeled standard.

Loading the library cold takes minutes with the ANTLR Python runtime, so a prebuilt serialization ships alongside the sources and the content-addressed workspace cache backs it up: after the first build, loads take milliseconds. The prebuilt is plain JSON in the same lossless schema as longeron.to_json() – inspectable text, no pickles.

model = longeron.loads(”…user model…”) longeron.add_standard_library(model) interp = longeron.Interpreter(model) interp.resolve(“Parts::Part”) interp.evaluate(“ISQ::mass”) # resolvable now

longeron.stdlib.standard_library_model(*, cache=True)[source]

A fresh Model of the vendored library.

Each call returns independent objects (safe to merge into user models).

Return type:

Model

longeron.stdlib.add_standard_library(model, *, cache=True)[source]

Add the standard-library packages to model (idempotent).

Return type:

Model