Skip to content

CHANGELOG

0.106.1 (2026-11-14)

Packaging and presentation only — no library behaviour changed.

  • PyPI metadata was blank and is now filled. pyproject.toml had description = "", so the PyPI project page showed no summary at all, and it carried no keywords and no project.urls. It now has a real summary line, 11 keywords (sysml, sysml-v2, sysml-v2.1, kerml, mbse, systems-engineering, model-based-systems-engineering, antlr4, parser, plantuml, simulation), and Homepage / Repository / Documentation / Changelog / Issues URLs all pointing at https://github.com/mycr0ft/sysmlpy.
  • The boxes extra is now marked python = ">=3.10". diagramboxes requires Python >=3.10 while this project declares >=3.9, so a fresh dependency resolve was unsatisfiable — poetry lock could not complete at all. The marker keeps the 3.9 floor for the library itself and gates only the extra; the wheel now emits diagramboxes ; (python_version >= "3.10") and (extra == "boxes"). poetry.lock refreshed with the marker in place: additive only, no pinned version changed.
  • README states its target honestly. The description said "consistent with the SysML v2.0 standard"; it now targets SysML v2.1 (Beta 2) / KerML 1.1 on OMG release 2026-08, and the ## Conformance section became ## Standards status: the project aims at the specification and publishes test results (123/123 XPect, 31 in-house analyzer rules) instead of claiming conformance, because there is no accredited conformance-testing authority for SysML v2 tools — OMG's SysML v2 certification program examines practitioners (Model User exam), not implementations.
  • Repository presentation. Description and 12 topics set; on 2026-11-14 the repository was extracted from the Westfall-io/sysml2py fork network and is now the root of its own network, with its four child forks carried along, and its 33 issues, 11 pull requests and 141 releases intact.

0.106.0 (2026-11-09)

Issues #43 and #44 closed: allocation endpoints resolve, and concrete interfaces need two related elements. Repro set and report from Jon Fox, 2026-11-09, against a deployed SysML v2 model set on sysmlpy 0.105.0 / OpenSysML kernel 0.63.1 / SysON v2026.9.0.

  • Allocation endpoints are diagnosed (issue #43). analyze() never looked at allocate endpoints — they lived as dump text on grammar.connectorPart (issue #23) and no pass collected them, so allocate Nope to Target; was clean. Endpoints now resolve through the same machinery ordinary typings use; failure is an ALLOCATION_ENDPOINT_UNRESOLVED error, and every form is covered: binary, n-ary (allocate (a, b, c); — every end checked), chained (a.p), sibling-package qualified (Architecture::Source), and star-imported.
  • Qualified and chained endpoints resolve through the public API. _resolve_names_to_elements used to skip any name containing :: or . — allocation.source_elements was [] for the qualified repro. Paths now resolve depth-wise from the root (with the depth-1 retry that mirrors how a bare name resolves from an inner scope), unique match kept, ambiguous still fails closed.
  • Allocation-definition ends are typed and resolvable. The end :>> source : Architecture::Source; members of an allocation def are grammar-only (they do not load as children — only interface ends do, issue #29), so their typings never reached symbol collection: an unresolved end type now reports ALLOCATION_END_TYPE_UNRESOLVED, and a nested allocate source to target; resolves source/target through the end's declared type. The TypedAllocation repro is fully resolvable.
  • Concrete interfaces need two related elements (issue #44). Mirrors OpenSysML's w10b constraint pass (KerML 1.1 §8.3.3.5 / §8.3.4.7) with the message verbatim (Must have at least two related elements, code RELATED_ELEMENTS) so cross-tool runs diff cleanly. Zero- and one-end interface definitions (the deployed EthernetInterface shape) are errors; abstract and variation declarations are exempt, ends inherited through :> count. One-end connect and one-feature bind are grammar errors upstream — noted in the test module. Model-only scope: bundled library interfaces are never subjects.
  • Cross-tool portability pins. tests/portability_test.py + tests/fixtures/report_2026_11/ carry the four repro files verbatim; measured against OpenSysML 0.12.1-998-gddc4a547fe (origin/develop): qualified allocation rejected (connector-end-referent on both ends — including the imported form, whose "fixes it" claim in the report does not hold on current develop), SingleItemInterface rejected (related-elements), TypedAllocation accepted. sysmlpy and OpenSysML now agree on all four files.
  • 15 pins in tests/issue43_test.py, 14 in tests/issue44_test.py, 12 in tests/portability_test.py (4 skip without a built OpenSysML).

0.105.0 (2026-11-04)

Issue #42 closed: metadata bodies survive the dump, and their values are structured.

  • Applications with a body no longer vanish from dump(). element.annotations held them (issue #24) but the dump is generated from the grammar tree, which had no member for them — so @M { w = z; } disappeared on a round trip while @M { w = 1; } survived. _inject_annotations puts each application back into the annotated element's body, de-duplicated against applications the parsed body already carries, and skips prefix applications (#M part def Y; renders once, in the prefix).
  • The notation the author used is the notation dumped back. #M keeps its sigil, metadata app : M { … } keeps its keyword, @M binds to its type (@ M was the old spacing). declaredKeyword now survives MetadataFeature.get_definition(), which it previously dropped.
  • Values are structured. Each metadata body member is captured through the same expression path attribute defaults use (valuePart → FeatureValue → OwnedExpression → operator tree), exposed as Metadata.value_expressions[name] alongside the author's values[name] text. In the interchange graph each body member is a ReferenceUsage with declaredName + value and a FeatureValue/expression subtree (the OpenSysML shape), instead of an opaque "body": "{w=z;}" string — and import maps those nodes back, so values and value_expressions survive a graph round trip.
  • Pins: tests/issue42_test.py (22) — reference, literal, chain, arithmetic and empty bodies; #M, metadata app : M, nested usage bodies, about clauses; fixed-point round trips; graph structure and graph↔model equality.
  • Two pins updated because the old expectations encoded the defect: issue24's @ m1 : M … and class_test's canonical @ m1 : MD both assumed the dump normalized a metadata declaration to the sigil form.
  • Advisory gate unchanged: 1116 errors / 1678 warnings, PASS, 0 parse failures.

0.104.2 (2026-11-04)

  • Cold analyze: 190 s → 10.9 s (0.103.3 was 43.5 s). The snapshot was only consulted when lib_roots was None, but analyze(model, library=[...]) — the ordinary path — always passes explicit roots, so a cold analyze rebuilt the whole facts index (276 s with no DFA cache). The snapshot is now tried for any roots and accepted only when its digest matches theirs: a custom library fails the check and builds; the bundled library answers instantly however the caller spelled it. Measured on a fresh venv with no DFA and no facts cache: 190.5 s → 10.9 s, warm <0.1 s.

0.104.1 (2026-11-04)

  • Shipped facts snapshot: first run 276 s → 0.02 s. The library facts index is now packaged as src/sysmlpy/library_facts.json (564 KiB, generated by scripts/gen_library_facts.py), validated against build id + library content digest like any cache record — a stale snapshot is a miss, never wrong answers, and custom library roots never use it. The measured cold build from source is 276 s on a machine with no DFA cache (each parse pays DFA construction), which is why a snapshot is the difference between a usable first run and a four-minute wait. Same approach as OpenSysML's stdlib.snapshot.
  • tests/library_facts_test.py fails when the snapshot does not match the current build id or library digest, so a version bump or a library edit cannot silently ship a stale one.
  • Pool workers no longer touch the persistent DFA cache (ProcessPoolExecutor(initializer=_worker_init)): eight workers each loading and re-saving a tens-of-MB pickle was serialising the parallel extract.

0.104.0 (2026-11-04)

Issue #34 closed: the library answers as a model, not as a scrape.

  • Library facts index (src/sysmlpy/library_facts.py, tests/library_facts_test.py). One library-wide index of namespaces, members, imports and short names, with public star-imports expanded to a fixpoint — the shape OpenSysML derives in ExpandWildcardImports() and the OMG ships precomputed as sysml.library.xmi.implied. Facade packages now expose what they re-export: ISQ::mass (declared in ISQBase), ISQ::speed (ISQSpaceTime), ISQ::time (alias time for duration), SI::time (chained re-export), and short names such as SI::kg, ft, Btu_IT resolve instead of falling back to the scraped index.
  • Private imports stay private: ISQ::Real and SI::Real are False even though both files import ScalarValues::Real; only public import re-exports.
  • KerML half indexed too: names come from the visitor dict with quoting stripped (VectorFunctions::+), and imports are read lexically because the KerML dict does not carry them.
  • Persisted facts cache, keyed on library content digest + set digest + build id + format version (SYSMLPY_LIBRARY_CACHE, off disables). A stale or corrupt record is a miss, never a crash. Cold build 24.6 s on 8 cores (parallel per-file extract, SYSMLPY_LIBRARY_WORKERS overrides); warm load 0.02 s.
  • get_symbols() now reads the facts index: 29.6 s warm / 53.5 s cold → 0.02 s cached, and 11,225 symbols including re-exported members and short names. A file the parser rejects (a .kerml carrying SysML notation) still contributes its names through the tolerant lexical harvester, so custom libraries keep resolving.
  • exists_in_loaded_model() answers name-level truth from facts first; a lookup no longer loads a library model. library_namespace_table() stays model-backed (real elements, nested scopes) with facts as the fallback — that split is what keeps feature access like isq.L (through a short-named attribute's type) resolving; making the tables facts-only cost 2041 extra UNRESOLVED_EXPRESSION_IDENTIFIER findings before the ordering was fixed.
  • Advisory gate: 2794 findings (1116 errors / 1678 warnings) from 2853 (1146/1707) — every class improved and none moved up: IMPLICIT_LIBRARY_IMPORT 1343 → 1314, UNRESOLVED_EXPRESSION_IDENTIFIER 967 → 946, UNRESOLVED_IMPORT 17 → 12, UNDEFINED_SYMBOL 46 → 42. 0 parse failures, PASS.
  • Benchmarks (benchmarks/bench.py, docs/benchmarks.md, see 0.103.4): library.index 29.62 s → 0.021 s; library.exists (8 lookups) 16 ms.

0.103.4 (2026-11-04)

  • Benchmark suite (benchmarks/bench.py, docs/benchmarks.md). The v0.84.0 harness measured only parse cold/cached/warm on a synthetic model; this one measures every phase a caller pays for, on real corpora: parse, element build, load_files, analyze, dump, interchange export/round-trip, the library symbol index, per-namespace tables, qualified-name lookups, and the full gate scan (opt-in). Results are written to benchmarks/results/<version>-<mode>.json so releases diff against each other, and --cold runs each case in a fresh process with a throwaway DFA cache — the cost a first CLI invocation pays.

Baseline on 0.103.3 (Python 3.13.5, n=1): parse.library_all 17.8 s, model.library_all 18.3 s, dump.library_all 7.2 s, analyze.fixtures 1.8 s, interchange.export 0.54 s, and library.index 29.6 s warm / 53.5 s cold — the analyzer's library index, not the parser, is the dominant cost. That is the component #34 replaces, which is why its cache design matters more than the parser's.

0.103.3 (2026-11-03)

  • Issue #41: a succession vanished when its body had other members. part p { first a then b; } kept it; add one sibling — part p { attribute x : Real; first a then b; } — and it disappeared from the element tree and the dump. The parse tree and the visitor dict both carried it, so the loss was in the loader: no child element was built for a Succession, and Usage._ensure_body rebuilds a parsed body from self.children. Alone, the body had no other member and the grammar body survived by accident.

A succession is now a first-class element, modelled the way Binding already is (a non-occurrence usage kept in the tree, DefinitionBodyItem → NonOccurrenceUsageMember → NonOccurrenceUsageElement on the way back), with source / target / ends readable from the connector ends:

p.children                     # [Attribute('x'), Succession(None)]
p.children[1].source, .target  # ('a', 'b')   — chains too: ('a.b', 'c.d')

The succession keyword is preserved, multiple successions keep their order, and any position in the body works (first, middle, last).

  • Library sweep stays clean: 58 files, 0 parse failures, 0 non-idempotent, 0 raw dicts, 0 stdout noise.

  • Pins: tests/issue41_test.py (11).

0.103.2 (2026-11-03)

  • Issue #40: the last four defects keeping library dumps from round-tripping. With these fixed, all 58 .sysml files in src/sysmlpy/library load, dump, re-parse to identical text, contain no raw dicts, and print nothing. Measured on the 0.103.1 wheel against the 0.103.2 tree:
              before   after
parse failures    1       0      Actions.sysml (reparse returned None)
not idempotent    2       0      SampledFunctions, VerificationCases
raw dicts         0       0
stdout noise      2       0      AnalysisCases, Cases
  1. then perform body; lost its target (Actions.sysml — the one file that failed to re-parse at all). The visitor's behavior-member dispatch had no performActionUsage branch, so the member vanished and the dump emitted a bare then ;, which the grammar rejects. The member now loads as BehaviorUsageMember → BehaviorUsageElement → PerformActionUsage.
  2. Preserved text collapsed newlines (SampledFunctions.sysml). A constraint body with a trailing // comment was flattened onto one line, so on the next parse the comment swallowed the rest of the expression and the body fell back to captured text. _verbatim_text now collapses whitespace within lines and keeps the line breaks.
  3. Ternary re-spacing was not idempotent (VerificationCases.sysml). _respace_ternary_glue re-spaced already-spaced text, adding a space per round trip (if passing ? …). It now strips each part before re-joining.
  4. case/analysis usages were dropped and printed to stdout (AnalysisCases.sysml, Cases.sysml). Package.load_from_grammar had no CaseUsage/AnalysisCaseUsage branch ("Unknown class … skipping"), and the case-family declaration (name + typing) lives in a constraintUsageDeclaration that the name helper never read — case c1 : CD; came out as case;. Both now load with their names.

  5. Pins: tests/issue40_test.py (9), including the whole-library sweep as the acceptance criterion.

0.103.1 (2026-11-03)

  • Issue #36: metadata applications now state themselves in the @graph. Two shape decisions, both taken against what the implementations actually emit — the OMG metamodel generated into SysML-v2-API-Services (MetadataUsage extends ItemUsage, MetadataFeature; Annotation carries annotatedElement/annotatingElement), OpenSysML's docs/reference/rdf-mapping.md, and sysml-toolkit's INTEROP.md:
  • Metaclass (D'): an annotation node is now typed MetadataUsage, the SysML metaclass, instead of the bare KerML MetadataFeature. The two are related by inheritance, so a consumer keyed on either finds it.
  • Link (B'): the annotation node carries "annotatedElement": [{"@id": <the element it annotates>}] — the metaclass property, on the annotation (not a convenience edge on the anchor, which is what I first proposed and then withdrew after checking the tools). For the body form the anchor is the element whose body holds the application; for the #M prefix form, the element being prefixed; for nested elements, the nearest one.
  • Sigil: "declaredKeyword": "@" | "#" records which form the author wrote (the visitor now captures it; metadata m : M; normalises to @, which is what its own dump already did).
  • An annotation with an about clause keeps its Annotation nodes and gets no derived edge — that clause names its own targets, and the ownership edge would state something false.

Nothing enters the identity space: element ids are byte-identical to 0.103.0 (95/95 nodes on the probe model), stable_ids/doc_ids/reconcile_ids are untouched, explicit_terms=True picks the new terms up automatically, and a pre-0.103.1 document (typed MetadataFeature, no derived edge) still imports unchanged.

  • Pins: tests/issue36_test.py (11).

0.103.0 (2026-11-03)

  • Issue #39: binding connectors lost their binding keyword and multiplicity — the last blocker for a clean library. Three causes:
  • the connector's usage-declaration multiplicity ([1]) was never read by the visitor, so binding [1] bind … dumped as binding bind …;
  • BindingConnector.dump() appended the anonymous declaration as its own token, which is where the double space (and the "the keyword only survives by accident" look) came from;
  • a bare bind … was indistinguishable from binding bind …, so the dumper could invent the keyword. It now travels with the dict (hasBindingKeyword), and a bare bind stays bare.

The connector's usageBody was also hardcoded empty, so members inside binding … { members } were dropped; they load now.

  • Succession had the same two defects (dumped as succession first …, and the optional succession keyword was unconditional — first a then b; came back as succession first a then b;). Same fix, same flag. This is what made systems/Flows.sysml non-idempotent.

  • Library sweep (58 files) after the fix: 0 raw dicts, and the four Quantities/Geometry files plus systems/Flows.sysml are clean fixed points. Residual stragglers, each its own defect, are filed as #40: Actions.sysml (a succession's perform target is dropped → parse error), SampledFunctions.sysml (an indexed #(i) expression emits text the grammar rejects), VerificationCases.sysml (if cond ? whitespace not normalised), and the CaseUsage/AnalysisCaseUsage skips that print on dump.

  • Pins: tests/issue39_test.py (21).

0.102.9 (2026-11-03)

  • Issue #38: multiple redefinitions lost their comma separator. redefines is a comma list, but Redefinitions.dump() joined the targets with a plain space:
attribute :>> ThermodynamicTemperatureUnit::quantityDimension TemperatureDifferenceUnit::quantityDimension {

which the grammar rejects. The whole attribute line then failed to load, so SI.sysml, USCustomaryUnits.sysml and ShapeItems.sysml were never re-parseable — even after the last of their raw-dict leaks was removed. Now :>> A::x, B::x, matching the source.

  • References (::>) had the mirror-image bug, one step behind it: that operator repeats per target (::> A ::> B) and the grammar rejects a comma list there, so its dump now repeats the operator instead of joining with a space.

  • Library round-trip: 3 of 4 files fixed. SI.sysml, SIPrefixes.sysml and USCustomaryUnits.sysml now dump → parse → dump with no change and no raw dicts. ShapeItems.sysml still is not a fixed point, and the remaining diff is entirely binding connectors — filed as #39 (binding [1] bind … loses its binding keyword and multiplicity, a captured-text artifact that only looked correct on the first dump).

  • Pins: tests/issue38_test.py (16).

0.102.8 (2026-11-02)

  • Issue #33: grouped exponents were opaque text — calc bodies were unevaluable, and unit-expression exponents dumped raw dicts. A parenthesized group had no representation in the expression chain, so the emitter fell back to preserving the whole expression as one name: (x^(1/2)+0) reached the evaluator as the identifier (x^(1/2)+0). It is now represented structurally — a PrimaryExpression whose base is a SequenceExpression relationship, the shape BaseExpression.dump() already renders in parentheses — so the group is one operand of whatever encloses it:
  • (x^(1/2)+0) at x=9 → 3.0; (a+b)^2 → 25.0; (x*(1+y))^2 → 64.0; results stay pint-aware (x * 2 [m] → Quantity(6.0, 'meter')).
  • The #31 paren guards are gone: with a real paren node the emitter no longer needs a binding-power heuristic, and tp / (tm * v), -(2 - 5) and (a or b) and c all dump as written and are now structured rather than text.
  • Two dumper defects behind the raw-dict leak: ExponentiationExpression.dump() converted its right operand as another ExponentiationExpression (the grammar says unaryExpression), so x ^ 2 printed x ^ {'name': 'UnaryExpression', ...}; and MultiplicativeExpression.dump() joined operands with "" (tp/ (tm* v)). Both fixed.
  • const_fold folds through groups (nested OwnedExpression, SequenceExpression), and the evaluator accepts ^ (SysML spelling) as well as **.
  • Library effect: the four files that leaked dicts are clean — SI.sysml 1085 → 0, USCustomaryUnits 325 → 0, SIPrefixes 35 → 0, ShapeItems 104 → 0 — and dump without any stdout output.
  • Pins: tests/issue33_test.py (27).

  • Issue #32: keyword-less variant members kept their body at grammar level. variant 'six cyl' { attribute note : String; } built the variant element but loaded no children, because Reference.load_from_grammar returned before the shared body dispatch. The dispatch loop in Usage.load_from_grammar is now Usage._load_body_members, and the VariantReference branch unpacks its UsageBody → DefinitionBody members and loads them through it, so variant.children really holds the members.

  • Same gap in action bodies: variation action g : A { variant g1; } parsed as ActionBodyItem → VariantUsageMember, which neither the visitor nor Action.load_from_grammar dispatched — the variants existed only in the grammar. The visitor now visits VariantUsageMemberContext, and the action loader routes those members through the shared dispatch with the variant chain marked (is_variant True). On the OMG corpus this restores all four variant generateTorque*/amplifyTorque* members.
  • Pins: tests/issue32_test.py (9), including the OMG VehicleVariabilityModel round-trip.

  • New issue #38 filed (found here): multiple redefinitions are dumped space-joined without repeating :>>, which is why SI.sysml / USCustomaryUnits / ShapeItems still do not re-parse even with no raw dicts left.

0.102.7 (2026-11-02)

  • Issue #31: assert constraint bodies dumped glued operators and never reached a fixed point. Three separate defects in the expression emitter — only the third was in the report:
  • Wrong operand class for the loose boolean layers. _unwrap_to_layer handed OrExpression the And-layer, XorExpression the Or-layer and ImpliesExpression the tail of a ladder, but each layer's grammar class expects the layer immediately BELOW it (orExpression : xorExpression (OR xorExpression)*). Any expression using or/xor/implies therefore put a foreign chain dict into an operand slot and the dumper stringified it: a xor b → a xor {'name': 'OrExpression', 'operator': [], ...}. Corrected for OR (→ xor), XOR (→ and) and IMPLIES (→ or).
  • Parenthesized groups never entered the chain. (A and B) xor (C and D) matched no emitter branch, so the whole expression collapsed to one FeatureReference name. Groups are now unwrapped (_paren_inner_context, which follows the ownedExpression → primaryExpression → baseExpression → '(' sequenceExpressionList ')' wrappers). A group keeps its parens whenever its loosest operator binds no tighter than the enclosing operator — at equal precedence the parens still decide the grouping (tp / (tm * v) must not become tp / tm * v, -(2 - 5) must not become -2 - 5), and a unary prefix over a grouping stays text for the same reason.
  • The text fallback glued tokens. ctx.getText() concatenates tokens, so any preserved expression became unparseable ((a or b) and c → (aorb)andc). The fallback now slices the original source (_verbatim_text, whitespace-normalised) using the context's character interval, so preserved text is the source text.
  • Dumps no longer print on stdout. valid_definition printed the offending dict's name before raising — on a normal control-flow miss (probing an operand against several layer classes). It flooded sysmlpy ci with layer names; the raise stays, the print is gone.
  • Corpus: VehicleVariabilityModel.sysml (the reporting file) now reaches a fixed point with no language "English" capture and an operator sequence identical to the source (21 operators, ==/and/xor).
  • Gate: 0 parse failures, 1180 errors (was 1183) / 1706 warnings, PASS — the three former text-captured bodies now expose their identifiers to the resolver, retiring 5 UNRESOLVED_EXPRESSION_IDENTIFIER findings.
  • Pins: tests/issue31_test.py (11). Known and unchanged: unit-expression exponents (s ^ -1, 1024 ^ (1/1000)) still dump their UnaryExpression dict — a pre-existing leak tracked by issue #33, which the same machinery now makes tractable.

0.102.6 (2026-11-02)

  • Issue #34 step 7: the .kerml half of the library now answers on truth. KerML names were only ever scraped — exists_in_loaded_model returned False for them by design, library_namespace_table filtered its candidates to .sysml, and the regex index carried doc-comment words as names.
  • KerML has no public Model loader, but its parse_to_dict output is already name-shaped (name = the declaration KIND, declaredName / declaredShortName = identifiers, children = nested members). A symbol table is now built directly from that dict (LibrarySymbolIndex._kerml_table_for_file, process-cached), so VectorFunctions, VectorValues, ScalarValues, Collections … answer with their real members; declarations are represented by a minimal _LibrarySymbol (name, kind, typed_by, shortname) because there is no model element to hand back.
  • library_namespace_table accepts .kerml candidates, so private import VectorFunctions::* imports real members; the scraped index stays only as the callers' last fallback.
  • exists_in_loaded_model consults the KerML table for fingerprinted .kerml sources (nested members included), so exists_in_loaded_model( "VectorOf") is True instead of False-with-a-scraped-fallback.
  • The leaf fingerprint now harvests .kerml declarations lexically (_KERML_DECL_RE, leading modifiers included: abstract datatype VectorValue, in feature v), so the step-7 path works in a cold process that has not built the full symbol index. Before this the kerml leaves existed only as a side effect of the index walk, and a step-7 lookup in a fresh process silently found no candidates.
  • Gate unchanged by design: 0 parse failures, 1183 errors / 1706 warnings, PASS, identical per-code histogram to 0.102.5 — the scraped fallback was already resolving these names on the corpus, so step 7 changes how they resolve (truth, without doc-comment noise), not how many.
  • Pins: tests/issue34_step7_test.py (7 — member tables, kernel namespaces, the symbol stand-in, exists_in_loaded_model, nested members, absence of doc-comment words, and an import resolving through the table). Two older pins updated to the new truth (library_model_test, issue34_step5_test).

0.102.5 (2026-11-02)

  • Issue #34 step 5: imports resolve against the loaded library model. Phase 1+2 (0.102.0) made the existence question answer on truth; this release does the same for import visibility — a private import SI::* imports the members the loaded SI model really declares, including declared short names (attribute <kg> kilogram), which no scraped name list carried.
  • SymbolTable._walk_element registers declared short names for every element (not just library ones), so attribute <x> foo : Real; makes x a real name in its own namespace too.
  • SymbolTable.lookup_member/table descent unchanged; the library table is built shallow (direct members, no recursive import walk) and cached per namespace. A table that resolved its own imports walked the whole library closure: 248 s cold on a two-import model, which is why the earlier attempt was deferred. Shallow costs ~1–2 s per namespace (DFA-warm) and leaves a facade's re-exported members to exists_in_loaded_model — they still resolve as references (the residual is the import-suggestion warning for a re-exported name, documented below).
  • Re-entrancy guard (_namespace_table_building) so two library files that import each other cannot loop; .kerml-only namespaces (e.g. VectorFunctions) keep the scraped fallback unchanged (step 7 will model-load them).
  • Gate delta (bundled library + fixtures, 99 files): errors 3369 → 1183, warnings 2961 → 1706, PASS, 0 parse failures. Per-code: UNRESOLVED_EXPRESSION_IDENTIFIER 3180 → 1006, IMPLICIT_LIBRARY_IMPORT 2598 → 1343, UNDEFINED_SYMBOL 58 → 46; every other code unchanged (nothing increased, nothing suppressed).
  • Cost: a cold analyze on a library-importing model 28.9 s → 39.5 s (the table builds for the imported namespaces); warm analysis unchanged (~0.0 s). Persisting tables across processes (step 6) is now a cost-optimisation, not a prerequisite.
  • Pins: tests/issue34_step5_test.py (7 — unit short names, facade truth fallback, short names in the table, element-valued members, the .kerml fallback, user-model short names, and a namespace no library defines still warns).
  • Plan record updated: docs/v0.102-library-model-resolution.md.

0.102.4 (2026-11-02)

  • Issue #29: interface ends are first-class children and keep their typing. interface def I { end e1 : PD; end e2 : PD [1..*]; } built the Interface with zero children, kept the ends only in Interface.ends as (name, None, None), and dumped end e1; — the declared type, multiplicity and flags were gone from the model and the text.
  • New public element InterfaceEnd (also exported as sysmlpy.InterfaceEnd): name, typed_by_name, multiplicity (as written, e.g. [1..*] / [0..1] ordered nonunique), reference (the ::> a.b chain as written), plus typed_elements / reference_elements lazy resolution (the issue #23 *_elements rule: unambiguous names only). Ends appear in iface.children; iface.ends / iface.iface_connections keep their old shapes, now with the type filled in.
  • Interface.load_from_grammar reads the : T typing (Typings → TypedBy) and the multiplicity part (bounds plus ordered/nonunique) that it previously dropped.
  • The rebuild that serializes an interface body (Usage._ensure_body) emits each end through one shared builder (_interface_end_body_item) in the visitor's own shape (InterfaceBodyItem → InterfaceOccurrenceUsageMember → InterfaceOccurrenceUsageElement → DefaultInterfaceEnd → Usage), with the Typings and ::> chain specializations and a rebuilt MultiplicityPart — so the body no longer degrades on every dump and dump → parse → dump is a fixed point. Children take precedence; the self.ends path remains for programmatic add_end().
  • Dump glue: InterfaceUsageDeclaration carried a literal newline in its connect keyword, so interface ib connect a to b; came out as connect\\n a to b;.
  • Fixed en route (pre-existing, proved on 0.102.3): a programmatically built Interface raised AttributeError: 'NoneType' object has no attribute 'get_definition' from Model.dump() because Interface.grammar stayed None; Interface._get_definition now synthesizes a body-less grammar object.
  • Pins: tests/issue29_test.py (7 — reporter model, typing in the dump, multiplicity/flags round trip, ::> chain, usage-with-body, single-line connect, programmatic definitions and usages).
  • Gate unchanged: 0 parse failures, 3369 errors / 2961 warnings, PASS. Affected suites 713 passed; full suite 1822 passed / 79 skipped.

0.102.3 (2026-11-01)

  • Issue #35: the KerML parser shares the persistent DFA cache. dfa_cache covered only the SysML parser, so every KerML corpus run and every library-index walk re-derived the prediction structures cold (Occurrences.kerml ~14 s per parse, every process).
  • The cache is now per grammar family: each target has its own key and file, derived from its own serialized ATNs (plus ANTLR runtime + version), so a SysML grammar change can never invalidate or corrupt the KerML cache and vice versa. SysML keeps its historical dfa-<key>.pkl name (caches written by earlier releases stay valid); KerML writes dfa-kerml-<key>.pkl.
  • A target is only loaded/saved when its parser actually ran in the process (used), so a SysML-only run never imports the KerML classes or touches its file.
  • Exit-time re-save: the once-per-process save landed after the FIRST parse of a run, so a library-index walk persisted 558 of the 1,622 states it warmed. maybe_load/maybe_save now register an atexit hook that re-saves each used target when its in-process DFA is strictly warmer than the file — the multi-file walk converges instead of half-caching.
  • Measured (fresh processes, bundled library): LibrarySymbolIndex.get_symbols 51 s → 26 s; the analysis that follows a warm index 59 s → 1.7 s; Occurrences.kerml 13.7 s → 3.3 s; full test suite 34m44s → 23m04s.
  • dfa_cache API: cache_key/cache_file/load_dfa_cache/save_dfa_cache/ maybe_load/maybe_save/stats take an optional target ("sysml" default, so every existing call and cache stays valid); targets() lists the families. Cache problems still never break a parse (maybe_* swallow).
  • Fixed en route: the generated parsers define serializedATN() at MODULE level — keying on the class attribute raises AttributeError, which the new _serialized_atn() resolves (module first, class fallback).
  • Docs: README's "Parse Performance and the DFA Cache" now covers both grammars and the measured numbers.
  • Pins: tests/issue35_test.py (7 — per-target keys/files, save→load, the SysML/KerML file isolation, the disable flag, the never-raise contract, and a subprocess pin that the exit hook persists the whole corpus walk). The dfa_cache_test monkeypatch of cache_file accepts the new target keyword.
  • Gate unchanged: 0 parse failures, 3369 errors / 2961 warnings, PASS. Full suite 1815 passed / 79 skipped.

0.102.2 (2026-11-01)

  • Issue #30 (reported downstream by the CARTA team): allocation usages and definitions keep their body members. allocate p to q { attribute note : String; } built the Allocation element with zero children — the body member was absent from the model, and the dump kept it only by re-serializing the parsed grammar — so a consumer reading allocations (their repro_01) saw nothing inside them. No exception, no visitor warning.
  • Visitor: allocationUsage hardcoded an empty DefinitionBody — the same defect the connection fix closed in 0.99.5. It now fills the body through the shared usageBody helper (_connection_usage_body_items, whose docstring now records that allocationUsage has the same shape).
  • Loaders: all three sites assigned element.grammar directly instead of calling load_from_grammar, so nothing was ever flattened — the package-level definition and usage (definition.py), the nested usage in a definition body, and the behavior-body path (usage.py). All four now use the shared loader.
  • Dump: AllocationUsage.dump joined unstripped parts, emitting allocate p to q { (double space); it now strips like its base class.
  • Serialization safety: a parsed allocation keeps its parsed body authoritative (Allocation._ensure_body returns early), because rebuilding from children loses what no child models — redefinition-carrying ends (end :>> source : Wheel;, the 0.98.1/PR#18 pin) and inner allocate source.xs to target.y; statements. Programmatic elements still rebuild from children as before.
  • Pins: tests/issue30_test.py (6 — usage body, definition body, nested usage, visitor-dict body, dump→parse→dump fixed point, empty bodies unchanged).
  • LSP subprocess test budget 120 s → 300 s, with the cost documented. The end-to-end test spawns a cold server that pays the scraped library index (.kerml parse, ~55 s; #35 caches it) plus the first SI.sysml load (~60 s when the DFA cache has no entry for that family — the cache file is keyed by the sysmlpy version, so the first run after every release is cold). It passed at 119.9 s against a 120 s timeout: a latent flake, not a measurement. No analysis-cost change.
  • Verified: affected suites 527 passed; gate unchanged (0 parse failures, 3369 errors / 2961 warnings, PASS); full suite 1808 passed / 79 skipped.

0.102.1 (2026-10-31)

  • Issue #37 (reported by failys): qualified references into an IMPORTED namespace resolve. ::> type = InterfaceType::required; — with InterfaceType visible only through private import LIB::* — was reported as UNRESOLVED_EXPRESSION_IDENTIFIER, twice per use (the value-owning Port and the redefining Reference).
  • Root cause: the qualified-name descent resolved the head name, then asked _find_symbol_owner(head) — which answers where the name is visible (the importing scope) — and looked for the namespace in that scope's _children. An imported namespace's member table belongs to its DEFINING package (LIB::InterfaceType), so the descent never reached required.
  • Fix: SymbolTable records element → member-table at build time (_element_scopes, kept on the root table; _scope_for_member consults it after the existing child/owner lookups), and all three descents use it (_resolve_qualified_name, _find_namespace_table, _is_resolved). The final segment stays "the resolved element" — no child namespace is required for it.
  • Not leniency: a bogus member (E::nope) is still reported, and the reporter's model validates clean under Open-MBEE's OpenSysML (-validate -strict), confirming the finding was ours.
  • Pins: tests/issue37_test.py (5 — the reporter's model, named-import and same-package forms, the negative case, and a symbol-table pin that the resolver returns the EnumeratedValue member).
  • Gate unchanged: 0 parse failures, 3369 errors / 2961 warnings, PASS (identical per-code histogram — the pattern does not occur in the bundled corpus). Affected suites 372 passed; full suite 1802 passed / 79 skipped.

0.102.0 (2026-10-31)

  • Issue #34 (phase 1+2): the analyzer's library fallback resolves through loaded library MODELS, not the scraped name index.
  • LibrarySymbolIndex.exists_in_loaded_model(name) — a leaf → file fingerprint picks the smallest candidate set; each candidate loads once per process through the public pipeline and answers on truth: re-export facades (ISQ → ISQBase), star-imported members (import SI::* + bare kg SHORT names, <Gy> gray), and unit members classify correctly. Doc-scraped false leaves can no longer prove existence.
  • The fingerprint is lexical (packages, definitions, member usages, <short> names — one line scan, 0.3 s over the bundled library) and is shared with the index walk via _leaves_on_line, so the two cannot drift. A cold resolver need therefore no longer pays the scraped index's .kerml parse: facade-model analyze 56 s → 4 s cold, LSP diagnostics subprocess 120 s → 66 s (the residual is the .kerml index pass, #35), tests/library_model_test.py 156 s → 68 s.
  • Wired into both resolver fallbacks and the UNRESOLVED_IMPORT validators (leaf-level checks).
  • Gate deltas (baseline 7890 errors / 940 warnings → PASS; fresh run this release: 0 parse failures, 3369 errors / 2961 warnings): UNDEFINED_SYMBOL 2079 → 58, IMPLICIT_LIBRARY_IMPORT 577 → 2598 — the 2,021 moved findings are unimported library-type uses inside the bundled sources, re-classified from error (undefined symbol) to intentional-import warning (advisory); UNRESOLVED_EXPRESSION_ IDENTIFIER 5640 → 3180 (the last 102 are unit SHORT names — ft, lb, lbf, Btu_IT … — that the shared harvester now fingerprints); UNRESOLVED_IMPORT 57 → 17. Every other code unchanged. Nothing suppressed; parse failures 0.
  • Only .sysml sources model-load this phase; the .kerml half stays index-backed until its DFA cache (#35). Deferred follow-up (documented): model-resolved import visibility (fresh SymbolTables over library files) exploded warm analysis cost (~100 s/analysis warm) when wired; deferred until the tables persist across processes — docs/v0.102-library-model-resolution.md steps 5–7.
  • Pins: tests/library_model_test.py (6).

0.101.0 (2026-10-31)

  • Issue #27 (decision shipped): deterministic object-model identity. Anonymous members keep name=None — the per-parse uuid4() name mint (17 sites: Usage/Package defaults, six class overrides, the visitor's Requirement_/UseCase_/Interface_/Case_/AnalysisCase_ /VerificationCase_ prefixes) is gone; uuid churn in downstream identity maps is over. Durable identity is UUIDv5 in the ID slot:
  • sysmlpy.stable_ids(model) → {element: "sysml:<uuid5>"}, element.stable_id convenience; declared elements join through the stable export's #qn_registry and agree exactly with their @id in to_interchange(model, stable_ids=True) — nested members and same-name sibling groups included (pinned).
  • Anonymous members derive from the nearest declared ancestor + structural path (public-tree children:<index> version of the exporter's dict-tree path — documented bound: docs/stable-identities.md §6, option D).
  • The Model root keeps its documented per-parse uuid (not a member; never serialized as content).
  • Registry defect fixed en route: the #qn_registry side table stored a literal ... placeholder for same-name sibling groups' second+ occurrences, keyed by the raw dict-tree qn; it now keys "<deduped-qn>#<index>" with the actual node id (the object-model mirror relies on that join).
  • Pins: tests/issue27_id_test.py (no uuid names, no churn across parses, export agreement incl. nested members, stable_id property, distinct ids in name-collision groups, anonymous determinism).

0.100.1 (2026-10-31)

  • Issue #25 emission gaps, all fixed (downstream report):
  • Keyword-less variant members (variant automatic;, variant 'six cyl' { … } — grammar VariantUsageElement → VariantReference) dropped from the model. They now build Reference children of the variation with is_variant set and the referenced chain on variant_reference (naming follows the bare-reference convention: the chain makes the member addressable, exactly how the OpenSysML oracle resolves them), and re-emit the variant keyword.
  • Enumerated values (enum def Color { a; enum b; }, §7.8.2) reached the grammar dict but never the model — values are now EnumeratedValue children of the Enumeration (keyword preserved); serialization unchanged.
  • ref part r : X; had no is_reference — the BasicUsagePrefix REF token now sets Usage.is_reference; kind-less elements are referential by construction (§7.6.4).
  • Kind-less usages with a prefix chain (private ref #M z1;, abstract #M z2;, private #M z3;) dropped. They build Reference elements carrying the #M metadata annotations, and re-emit visibility + ref/flags + #M in source order (REF-less forms keep REF-less dumps; no spurious ref).
  • refPrefix flag tokens (abstract/variation/derived/constant) dropped from kind-less members on dump (abstract z2; → z2;). Also constant re-emits as constant — the textual keyword; the isReadOnly field name is a historical misnomer (readonly is not in the grammar; the OpenSysML oracle rejects readonly x;).
  • Member-level visibility rode to the semantic layer for these members (private on a body member was dropped); body-member visibility round-trips now.
  • The OMG Variability Examples/VehicleVariabilityModel.sysml corpus parses with the variant forms emitted (pinned in tests/issue25_test.py). Pre-existing, out of scope: assert-constraint expression bodies still glue on the first dump; whole-file dump identity is not asserted there.

0.100.0 (2026-10-30)

  • Relationship endpoints are on the object model (issue #23, downstream report from the CARTA team). All four relationship usages parsed with the endpoints on the grammar object only; the public elements now carry them.
  • Dependency.clients / .suppliers — name lists as written (the grammar kept them since issue #4 / PR #7; the loader never read them), plus client_elements / supplier_elements resolving lazily (unambiguous names only).
  • Allocation.source / .target — first/second end of a binary allocate a to b;; an n-ary allocate (a, b, c); reports all ends as source (grammar AllocationUsage.connectorPart, present since issue #5 / PR #6) plus source_elements / target_elements.
  • Requirement.requirement / .satisfying — the satisfy R by S; endpoints (ors / ssm) and is_satisfy / satisfy_elements(). The satisfy wrapper is now built through load_from_grammar (its endpoints were previously unreachable because the loader was bypassed).
  • VerificationCase.verified_requirements and a Verify child element per verify R; member (the only grammatical home for verify is the objective's requirement body). traceability.verified_by is populated from the same edges — previously always empty (issue #27 item 3).
  • Metadata applications (issue #24, same report).
  • metadata m : M about X, W; — Metadata.annotated (names as written), annotated_elements (lazy), type_name; the grammar carries these since the issue #3 work, the public element never read them.
  • @M { w = 1; } inside any definition/usage body attaches to the owning element via element.annotations (list of Metadata, each with type_name, values, value_text), never uuid-named, never a child.
  • #M part def Y; — the PrefixMetadataMember is captured on the occurrence prefix (prefixMetadata on both occurrence prefix grammar classes), attached like @, and re-emitted as #M on dump.
  • Serializer: @M { w = 1; } dumped as @ : M {w=1;}; (not re-parseable inside a definition body — the : belongs between a declared name and its type, and a braced metadata body carries no terminator); metadata m : M about X; dumped with a double terminator; #M part def Y; lost the prefix. All three fixed; annotations survive dump → parse → dump.
  • diff signatures and traceability unaffected except where noted in 0.99.7.
  • Multi-line doc comments aligned under their first line gained one indent level per dump → parse → dump cycle (CARTA round-trip finding, closing the last issue #26 item): Documentation.dump now renders continuation lines flush at the member indent, like anonymous block comments already did. Pinned as test_issue26_multiline_doc_indent_is_idempotent.
  • New example examples/metadata_and_endpoints.py (the acceptance script for #23/#24: endpoints, verification, traceability, all three metadata notations). to_interchange → from_interchange round-trips a model carrying all of them; annotations are deliberately not exported yet (@graph shape change deferred to the interop increment, see docs/v0.100-endpoints-and-metadata-plan.md).

0.99.7 (2026-10-30)

  • flow usages reach the model (issue #26, downstream report from the CARTA team). A package-level flow x from p to q; never became an element: Package.load_from_grammar's body navigation only unwrapped a wrapped usage member (PackageMember → UsageElement → …), while a flow member arrives bare (UsageElement → OccurrenceUsageElement → StructureUsageElement → FlowConnectionUsage), so it fell through to continue. Three more defects came out with it:
  • FlowEndSubsetting.dump appended a literal . to the end's qualified name, gluing flow x from p. to q.; (unparseable); the separator now lives in FlowEnd.dump and only before a feature-chain part.
  • Both flow builders hardcoded an empty DefinitionBody, so flow x from p to q { attribute note : String; } lost its members; the body is flattened from ctx.definitionBody().
  • The flow element was built by assigning grammar instead of calling load_from_grammar, which is what loads body members; the identifier is now read through FlowConnectionDeclaration (one level deeper than a plain UsageDeclaration), so the element carries its declared name instead of a uuid. to_interchange on a model with a flow now round-trips.
  • dfa_cache env var spelling (issue #27): read SYSSMLPY_DFA_CACHE (three S) only — a misspelling that never matched the package name. SYSMLPY_DFA_CACHE is canonical now; the old spelling stays as an alias.
  • traceability.satisfied_by carries qualified names (issue #27): it held the reference exactly as written (['S']) while qualified_name was qualified (P::R), so equal short names in different packages collided downstream. Unambiguous references are recorded qualified; ambiguous ones stay as written. as_traceability_matrix_view(elements=[...]) still accepts short names.
  • verified_by stays empty for verify inside an objective — there is no Verify element to read yet (issue #23).
  • diff signatures follow: a trace edge now reads satisfy:P::T::v (qualified) instead of satisfy:v, which makes the signature stable across packages with colliding short names.
  • Regression: tests/issue26_test.py (6), tests/issue27_test.py (6); two diff_test and four traceability_test pins updated to the qualified form (they documented the old behaviour).

0.99.6 (2026-10-30)

  • DUPLICATE_NAME no longer fires across namespaces (issue #22, Shamal Faily). A usage's body members were registered in the enclosing package's scope, so part aComposite : Composite { :>> description = …; } next to connection aConnection … { :>> description = …; } looked like two same-named members of ARCH. KerML's Type specializes Namespace: every typing element, usage included, is the namespace of the members it owns. A single predicate (owns_namespace) now decides this for all six walkers (symbol table, reference collector, expression-identifier and expression-type collectors, and the duplicate check), so table scopes and scope paths cannot drift apart. The finding also names the scope (Duplicate name 'x' in namespace 'P::A', previously a bare "in namespace").
  • The same leak was the single biggest source of analyzer noise on the bundled standard library: sysmlpy ci src/sysmlpy/library tests/fixtures goes from 1018 DUPLICATE_NAME findings to 0, and UNRESOLVED_EXPRESSION_IDENTIFIER from 5736 to 5643 (body-local names now resolve in their owner's scope instead of by accident). One new UNDEFINED_SYMBOL appears — unitConversion in domain/Quantities and Units/SI.sysml — which previously resolved to itself through the leak; it is a member of the library's Unit type, which the name-indexed library fallback cannot resolve (the known model-loading gap, unchanged).
  • Cross-checked against Open-MBEE's OpenSysML (Go, built from ~/proj/third_party/OpenSysML): sysml -validate on the reporter's file reports no duplicate-name diagnostic. It does report two genuine issues this analyzer does not check yet — a connection usage needs its own two ends (connection c : CD; is rejected even when CD declares ends), and a member redeclaring an inherited feature name needs :>> — logged for a follow-up increment.
  • Regression: tests/issue22_test.py (5: the reporter's model, same name in two usages, duplicate inside one usage body, duplicate in one definition, duplicate at package level).

0.99.5 (2026-10-30)

  • Connection-usage members no longer drop from the model (issue #21, Shamal Faily). connection aConnection subsets connectors : Connection { :>> description = "…"; ref template = sharedTemplate; } dumped as bare connection aConnection : Connection;, and connection connectors : Connector [1..*] lost its multiplicity. Three independent visitor gaps:
  • _make_nested_connection_usage_dict used _build_specialization_from_fsp, a duplicate partial builder that understood typings only and hardcoded multiplicity: None. Both connection builders now use the shared _build_full_specialization_from_fsp (typings / redefinitions / subsettings / references / multiplicity) and the duplicate helper is gone — the corpus reaches only one copy, so a second copy is latent divergence.
  • Both connection builders hardcoded an empty DefinitionBody. A connectionUsage hangs its body off ctx.usageBody() directly, which _get_usage_body_items never reaches; _connection_usage_body_items now flattens it.
  • _make_reference_usage_dict read usage.valuePart() although the value part rides on usage.usageCompletion() — ref template = sharedTemplate; lost its value everywhere, not just in connections. Semantic layer: a connection usage's body items were also dropped from the public tree (UsageBody nests its items one level down in body.body, and a usage-shaped member with no children was skipped by the body dispatch). Connection children now carry the body members.
  • Imports are visible inside the importing namespace (issue #20, same reporter). private import LIB::*; in package ARCH resolved at package level but reported UNDEFINED_SYMBOL for a type used inside part def ArchObjt — SymbolTable.lookup hid privately-imported members from every child scope. KerML 1.0 (7.2.5.4) restricts a private import's visibility outside the namespace, not inside its own body (import-re-export still propagates only public/protected imports, so a sibling package still sees nothing). Consequences: the explicit private import ScalarValues::*; also stops producing bogus IMPLICIT_LIBRARY_IMPORT warnings.
  • Semantic feature harvesting walks the wrapper chain instead of a fixed three-level descent, and understands usage-shaped members that carry their own declaration (ConnectionUsage, InterfaceUsage, …) — connection connectors : Connector; never entered Composite's feature set, so a legitimate subsets connectors reference reported UNDEFINED_SYMBOL once the visitor stopped hiding it.
  • A context-type member beats the library simple-name fallback: a user feature whose name also exists somewhere in the bundled library (e.g. VectorFunctions::VectorOf::components) is a model symbol, not an implicit standard-library reference. The IMPLICIT_LIBRARY_IMPORT message now names the real library package (Connections::Connection, not ScalarValues::Connection).
  • Dump glue (same family as the 0.99.3 serializer sweep): Subsettings.dump emits :> X (was :>X), SubclassificationPart no longer doubles the space after :>, DefaultReferenceUsage joins its terminator (= "x"; not = "x" ;), and ReferenceUsage no longer prefixes every ref … line with a space from an empty ref prefix.
  • Regression: tests/issue20_test.py (5) and tests/issue21_test.py (6, incl. the reporter's full reproducer and a re-parse idempotency check).

0.99.4 (2026-10-29)

  • part def-body feature-value members no longer drop from the model (issue #19, Shamal Faily). A :>> feature = value; member sharing its body with a sibling (the ARCH reproducer's :>> description = "ArchObjt"; next to part aTemplate subsets templates : RefinedTemplate;) parsed but vanished from model.dump() — the shared body flatten had no DefaultReferenceUsage dispatch, so the member was not rebuilt (bare members survived only by luck of an untouched rebuild). The shared body walker now builds a Reference child, and Reference.load_from_grammar handles the DefaultReferenceUsage shape (name/type from the :>> chain, value kept in the grammar for byte-faithful re-serialization).
  • Reference._typed_by_name for a bare redefinition member resolves to the redefined feature (find() navigation works).
  • Regression: tests/issue19_test.py (3, incl. the full ARCH reproducer and body-order permutations). Full suite 0 failed.

0.99.3 (2026-10-29)

  • Annex A dump round-trip (Vehicle Example, issues reported by Luciano Kruk — SYSMLPY_099_ANNEX_A_UPSTREAM_ISSUES.md): the dump of a model whose source parses emitted unparseable text in four shapes. Fixed in the grammar-class serializers:
  • Usage.dump / UsageCompletion.dump joined the declaration, default valuepart, and body with no separator — attribute :>> cargoMassdefault 0[kg]; (also the expression-valued and the subject ... default forms) — joins are space-separated now.
  • FeatureDeclaration.dump glued the identification onto the specialization (shankPort:>>, I: WheelHubInterface) — space separated.
  • InterfaceUsage.dump dropped the statement terminator for body-less usages (interface I : X unparseable on reparse).
  • InterfaceEnd.dump emitted connector-end cross multiplicities AFTER the feature chain; the grammar (connectorEnd : (ownedCrossMultiplicityMember)? (name (::>)? ownedReferenceSubsetting)) requires them FIRST — now [1] lugNutCompositePort ::> wheel1.lugNutCompositePort. Result: the complete Annex A model parses (no recovery warnings), its dump reparses cleanly, and 7 regression tests pin every form (tests/annex_a_roundtrip_test.py, incl. the withdrawn trailing-multiplicity form being rejected deterministically). Note: the report's issue 4 misquotes the source — the Annex A connect lines (640/642) already use the normative LEADING multiplicity form; the trailing form is upstream-withdrawn. Residual (cosmetic, not in scope): doc-comment text re-wraps whitespace on round trip.

0.99.2 (2026-10-29)

  • pyproject: the boxes extra's constraint broke Poetry/pip metadata — boxes = ["diagramboxes (>=0.15.1)"] violates Poetry's extras pattern (must be a bare name); it also referenced a dependency never declared. Fixed: diagramboxes = { version = ">=0.15.1", optional = true } plus boxes = ["diagramboxes"] — the first sysmlpy[boxes] install that actually pulls diagramboxes.
  • boxes_view: an actionable error for stale diagramboxes environments (issue #17). The v2 action-flow glyphs (chamfer= octagons, action_start() solid diamonds) need diagramboxes >= 0.15.1; the boxes extra used to be unconstrained, so stale environments surfaced 23 raw TypeError: Diagram.add_node() got an unexpected keyword argument 'chamfer' failures. as_action_flow_view_boxes now capability-checks Diagram.add_node and raises an ImportError with the upgrade line; the extra is pinned diagramboxes (>=0.15.1). Tests: boxes_view_test.py::TestDiagramboxesVersionGuard (2; the file is 71 green with diagramboxes 0.18.5).

0.99.0 (2026-10-28)

  • Variation / variant / abstract round-tripping (the SysML-v2-Release Vehicle Example, "SysML v2 Spec Annex A SimpleVehicleModel.sysml"): the usage-level abstract/ variation ref-prefixes were parsed but dropped (a bare abstract part family produced NO prefix dict at all) and every variant part/attribute x member inside a variation body was silently dropped — the same silent-loss shape as the earlier message-in-body bug. Fixed end to end: the ref-prefix extractors now carry isAbstract/isVariation for both the occurrence and usage dict paths; the definition/usage body walkers dispatch the VARIANT variantUsageElement alternative through a new VariantUsageMember wrapper (grammar class + dump emits variant); the semantic model carries is_variant / is_variation / is_abstract on Usage elements, and the dumps re-emit the keywords so parse -> dump -> reparse is stable.
  • Helper functions: Usage.variants() — the variant members of a variation; Usage.variant_types() — the types referenced by variant part x : T members, resolved against the model tree (mirrors the corpus' variant part transmissionAutomatic:TransmissionAutomatic).
  • Known pre-existing (unchanged): the Annex A full-dump reparse still fails at 0.98.0 — value parts concatenate (massActualdefault 0[kg]) and bind connectors serialize as [1] to ... [1] — tracked separately from this change.
  • tests/variation_variant_test.py: 9 tests incl. the corpus file.

0.98.1 (2026-10-28)

  • Interchange export keeps :>> redefinitions/typing on unnamed end features (PR #18): an allocation def re-exported through to_interchange/dump() dropped the end redefinition/typing and the dump reparse failed; the ANTLR dict builder (_make_end_feature_usage_dict) now extracts specialization from the direct featureDeclaration too (via _build_full_specialization_from_fsp, the typings/redefinitions/ subsettings/references builder) and merges in textual order. Regression: tests/interchange_test.py TestAllocationEndExport (round-trip, dump content, dump reparse, CLI exit code).
  • Includes 0.98.0 (the interaction def/usage grammar fix + the message ends/payload carrying).

0.98.0 (2026-10-28)

  • Interaction definitions/usages parse (the interaction def rule). The generated grammar's interaction rule (typePrefix INTERACTION classifierDeclaration typeBody) rejected every interaction def X { ... } form (and even a bare interaction T;) - the rule now follows the part/occurrence shape: interactionDefinition : occurrenceDefinitionPrefix INTERACTION DEF definition + interactionUsage : occurrenceUsagePrefix INTERACTION usage, dispatched in definitionElement/structureUsageElement; the parser regenerated with the bundled 4.13.2 jar.

0.97.1 (2026-10-16)

0.97.1 (2026-10-16)

  • Boxes action-flow view: v2-native glyphs (with diagramboxes 0.15.x-0.17.x): action usages/definitions render as chamfered octagons and succession starts as the solid v2 start diamond; named succession statements (succession s1 first start then b;) bind their keyword ends (start/done/terminate) to the control primitives, parented to the anchor action's owner box. Duplicate flow/succession edges from wrapper re-collection are deduped (_edge_once). Example: examples/v2_action_flow_poc.py (validated 10/10 against the Intro deck's providePower figure).
  • Fixes the stale __version__ string (shipped 0.96.4 inside the 0.97.0 wheel).

0.97.0 (2026-09-30)

  • CI integrations: GitHub Actions, GitLab CI, pre-commit (new sysmlpy ci subcommand). One engine (src/sysmlpy/ci_check.py) behind every integration, one exit-code contract: 0 clean, 1 findings at/above the failure level (parse failures always block), 2 operational error.
  • Parse gate (blocking, always on): every .sysml/.kerml file must parse (.kerml via the KerML grammar). Syntax errors carry file:line:col.
  • Semantic gate (advisory by default, --semantic strict opt-in): findings are reported and labeled, but never fail the check by default — the bundled standard library is symbol-indexed, not model-loaded, so re-export facades (ISQ) and unit usages (SI::*, kg, ['m/s²']) are known false-positive classes (28/71 valid-corpus files). Promote per-codebase once clean; the known_limitation flag in JSON output identifies the classes.
  • GitHub reusable workflow .github/workflows/sysml-check.yml (uses: mycr0ft/sysmlpy/.github/workflows/sysml-check.yml@vX.Y.Z) with DFA-cache restore for fast re-runs; also dogfoods on this repo's pushes/PRs (gating the bundled library + showcase fixtures).
  • GitLab template .gitlab/sysml-check.gitlab-ci.yml (include: project: mycr0ft/sysmlpy, file: .gitlab/sysml-check.gitlab-ci.yml, extend .sysml-check).
  • pre-commit hooks .pre-commit-hooks.yaml (sysmlpy-ci, sysmlpy-parse) — commit-time checks on changed files.
  • Docs: docs/ci-integration.md (full options + promote-to-strict path); README CI section. Tests: tests/ci_check_test.py (25).
  • Visitor fix: named multiplicity bounds ([nCauses], [wallNumber]) — two of the three _make_bound copies in antlr_visitor.py called int() on the bound text and crashed (invalid literal for int()) on non-numeric bounds; both now emit a FeatureReferenceExpression like the third copy. Found by dogfooding the new CI gate on the bundled library: CausationConnections.sysml and ShapeItems.sysml now parse (previously crashed at load).

  • qn_registry() (P3 Vee-join side table). Every to_interchange(stable_ids=True) document now carries "#qn_registry": deduped declared-QN path → stable @id (Identification nodes; doc-carried explicit ids included), readable with the new public helper of the same name — downstream consumers (pyoslc STEP domain) join SysML elements by qualified name without re-deriving hash chains. Empty for position-id exports. The registry is stable across export→import→export, survives JSON round-trips, and reconcile_ids adoption remaps it alongside the graph refs. Pinned by tests/qn_registry_test.py (11).

v0.96.4 (2026-09-30)

  • doc_ids=True on to_interchange (Phase 2b, L3 explicit identity) — doc /* @id: … */ comments inside an element's own braces fix its interchange @id (implies stable_ids): never re-minted over, surviving any edit (ancestor renames, re-nesting, cross-file moves) because the carrier rides the source text. Duplicate claims of one id raise at export. Placement contract (inside braces vs sibling-level bubbling) pinned by tests; end-to-end verified export → dump → re-parse → export. Scope record: docs/stable-identities.md §4 Phase 2b; demo: examples/element_identity.py section 6.
  • reconcile_ids / to_interchange(reconcile_with=...) carry forward from v0.96.3 (L3 registry reconciliation).

v0.96.3 (2026-09-28)

  • Stable element identities across edits (L2 + L3 idempotency).
  • to_interchange(stable_ids=True) / CLI sysmlpy export --stable-ids: content-addressed @ids — named elements hash their declared qualified-name path + metaclass type, unnamed elements hash the nearest named anchor + structural path. Inserting/reordering unrelated elements elsewhere leaves untouched ids unchanged. Default (stable_ids=False) stays byte-identical to the v0.63.0 position scheme.
  • reconcile_ids(document, registry) / CLI sysmlpy export --reconcile-with model.json -o model.json: the previous export doubles as an id registry — name-matched elements adopt registry ids, so ids survive ancestor renames and re-nesting (injective (declaredName, @type) matching keeps documents collision-free; nested {"@id"} refs are remapped so reconciled documents import cleanly; the CLI one-liner is an idempotent fixed point after the first export).
  • New public exports: reconcile_ids, STABLE_NAMESPACE, doc_ids=True (v0.96.4: explicit doc /* @id: … */ ids honored at export).
  • New demo: examples/element_identity.py — all identity layers (parse uuid4, position uuid5, content uuid5, registry reconciliation) runnable end to end.
  • New docs: docs/stable-identities.md (idempotency levels L0-L3, options analysis, design decision: declared-path not resolved-QN, Phase 1 + Phase 2 implementation records); README section "Element Identity: Stable Interchange IDs".
  • All gates green: interchange 59/59 (11 stable-id + 10 reconcile tests), fast suite 654 passed/1 skipped. (Grammar 168/168, XPect conformance 123/3 optional-dep skips, KerML 5/5 — unchanged from v0.96.2, untouched by this release.)

v0.96.2 (2026-09-28)

  • Grammar upgraded to OMG release 2026-08 — the vendored ANTLR4 grammar is now daltskin/sysml-v2-grammar v2026.08.1 (upstream 14b0d7a), replacing the 2026.05.0 base + local patches. Includes upstream #11's flat precedence-correct ownedExpression cascade and upstream #16's required import visibility (bare import X; is now a SysMLSyntaxError; use private/public/protected).
  • Non-normative forms removed (resolved against the OMG KEBNF and the pilot KerMLExpressions.xtext with daltskin): bare qualified identification (subject SystemGateway::System_Driver; — use the typed form subject : SystemGateway::System_Driver;) and connector-end trailing multiplicity (connect a[1] to b; — use the normative leading form connect [1] a to b;).
  • Visitor: structured expression chains re-emitted from the flat left-recursive parse tree (revived v0.52.0 splice machinery); symbol-form &/| operators structured; multi-segment FeatureChainMember (one context, many name segments) fully captured so feature-chain type resolution reports the whole chain.
  • ConnectorEnd preserves the normative leading cross-multiplicity and dumps it before the declared name.
  • All gates green: grammar 168/168, fast suite 595 passed/1 skipped, OMG XPect conformance 123 passed/3 skipped (optional-dep skips), KerML batteries 5/5.

  • (empty — Phase 2b released in v0.96.4, registry reconciliation in v0.96.3)

v0.96.1 (2026-09-25)

  • doc comments survive everywhere — doc /* ... */ on a package, on any part/item/port/action/... usage or definition, and inside interface bodies is captured as .doc on the API object (previously silently dropped whenever the comment shared its body with siblings; only Requirement carried doc). dump()/classtree() re-emits the doc alongside the other body items, and re-parsing the dumped text keeps .doc intact. New example examples/doc_ends_flows.py
  • 11 tests (doc_ends_flows 5/5).
  • interface ends captured — end <name>; and end <name> ::> part.port; members of an interface body now parse into Interface.ends (name/type/multiplicity) and Interface.iface_connections (the ::> targets as feature-path strings); previously the ends stayed in the grammar layer only and .ends was always empty. end ::> targets are re-emitted through the References/OwnedReferenceSubsetting/OwnedFeatureChain specialization chain, so they survive a dump round-trip (and re-parsing rebuilds iface_connections).
  • fix: round-trip of interface usages emitted a spurious connect keyword — InterfaceUsageDeclaration marked ANY part1 as the CONNECT form, but the visitor also emits an empty part1 for plain interface x : T { ... }; the resulting interface x: T connect {...} dump re-parsed with a syntax error. The connect keyword is now only set when the binary part actually carries the CONNECT-form ends (grammar tests 165/165).
  • flows — verified end-to-end (already working): flow a to b; parses into a Flow child of the owning part, dump() re-emits it, and the Interconnection View renders the flow edge.

  • perf: DFA cache supersede - save_dfa_cache() refused to update an existing cache file, so DFA states learned after the file was written (short-name <K> forms, [1..*] nonunique multiplicity chains, STRING short-names) were re-built by every fresh process: the OMG library files SI / ISQSpaceTime / MeasurementReferences / ShapeItems and Annex A SimpleVehicleModel took 60-200 s per parse. A strictly-warmer in-process cache now atomically replaces the file; after one absorbing run per construct family, all six slowest OMG files parse in 0.2-8 s per fresh CLI process. 2 new supersede tests (dfa_cache 16/16).

  • New loaders for package-less snippets: loads_wrapped() / load_wrapped() wrap bare top-level SysML (OMG Simple Tests / training-snippet style, e.g. part def Camera { ... } with no enclosing package) in a synthetic package and load normally. Content already carrying a top-level package / standard library package passes through untouched. Model.load's documented strictness ("Base Model must be encapsulated by a package") is unchanged. The corpus sweep helper (parse_one.py) now uses the wrapped loader, eliminating the 3 package-less rejections from the OMG release-repo sweep (DecisionTest, ControlNodeTest, Camera).

v0.96.0 (2026-09-23)

KerML parsing, OMG-corpus hardening, and community contributions (external PRs #10/#11/#12/#13).

  • New: KerML parser (src/sysmlpy/kerml/) - ANTLR4 grammar generated from the OMG KerML textual-notation KEBNF (Systems-Modeling/SysML-v2-Release, 2026-08 checkout) via the daltskin generator in KerML-only mode, plus parse/parse_file/ parse_to_dict and a SysML-shaped visitor-dict layer. 7 documented corpus corrections (generator dead-rule reverts, KEBNF-vs-example fixes) in src/sysmlpy/kerml/README.md. Corpus: 130/130 .kerml files parse and extract non-empty structure (OMG examples 58, OMG kernel libraries 36, bundled kernel 36). KerML imports carry no visibility keyword (unlike SysML). Tests: tests/kerml_test.py (3 pytest tests over standalone batteries).
  • LibrarySymbolIndex parses .kerml files (was regex-scraping): .kerml files now go through parse_to_dict; .sysml files keep the line-regex walk (shared as the parse-failure fallback). Library symbols 1,604 to 2,986; all 94 OMG .kerml files yield symbols. 3 regex-only names were false positives (keyword-collision in feature all ... and a doc-expression line).
  • fix: connect [N] with leading multiplicity through interface ends - _visit_multiplicity reads through ownedCrossMultiplicity().ownedMultiplicity(). Found by categorizing the OMG corpus-sweep failures; the Annex A SimpleVehicleModel now parses fully (241 elements).
  • fix: Port definitions lost is_definition (external PR #10) - Usage.load_from_grammar's __init__() reset cleared the flag; port defs rendered as <<port>> instead of <<port def>>.
  • IV: boundary ports (external PR #13) - ports render as PlantUML native port syntax on the hosting part's boundary, declared and inherited.
  • IV: interface-usage connections (external PR #12) - interface usages render as connection edges; top-level connect-form and body-declared end ... ::> part.port ends, nested interfaces scoped to their containing part.
  • IV: binding connectors (external PR #11) - bind p = A.p; is preserved in the public tree (was silently dropped) and renders as a thick binding edge between the referenced features.
  • fix: UseCase missing re-declaration chain fields - loading any model with a use case crashed with AttributeError (_specializes_names uninitialized).

Corpus status: the OMG release-repo sweep (404 files) now has zero correctness failures; what remains is 5 slow-but-finite large library files (42-94 s, perf tuning candidate) and 3 package-less snippet examples rejected by the loader's intentional package-wrapper guard.

Markdown tables column-align in monospace (sysmlpy.mdtables).

Every markdown table sysmlpy emits now lines up pipe-for-pipe when viewed in a monospace font:

  • new src/sysmlpy/mdtables.py: pretty_markdown_tables(text) post-processes arbitrary markdown (re-pads every pipe table that has a GFM separator; everything else passes through untouched) and format_table(header, rows, align) builds aligned tables directly. Widths follow the East Asian Width convention (Wide/ Fullwidth = 2, combining marks = 0, Ambiguous - including the satisfy check mark - = 1) and count escaped characters (\|) as the single character they render as; GFM alignment colons are preserved through re-padding (:-- left, --: right, :-: center).
  • wired into every markdown emitter: all PlantUML grid views (tabular, data-value, relationship matrix) via _format_table_rows_markdown, the traceability report (to_markdown) and as_traceability_matrix_view.
  • fixed a latent matrix-structure bug the alignment work surfaced: as_relationship_matrix_view data rows carried the row-label element name as the first cell but the header lacked the label column, so every row had one cell more than the header and GFM renderers silently dropped the last column. The header now carries the label column; the matrix CSV gains it too (header and rows now have equal field counts).

Honest limits (docstring): alignment cannot hold for cells whose rendered width differs from the measured one - emoji and other beyond-BMP glyphs (ambiguous across terminal fonts) or cells with embedded newlines (which GFM tables cannot carry anyway).

Test updates: new tests/mdtables_test.py (10 tests); alignment- sensitive exact-shape asserts in plantuml/traceability/cli/ spreadsheet tests updated to width-tolerant regexes; matrix CSV test now asserts the label column and equal field counts.

v0.95.0 (2026-09-18)

Interactive REPL (sysmlpy repl), runtime-showcase fixtures, and four silent-drop fixes found by them.

Inspired by Open-MBEE's OpenSysML REPL, built on machinery sysmlpy already had. See docs/COMPARISON.md for the three-way contrast (sysmlpy vs OpenSysML vs gosysml) that motivated the round.

  • New tool: sysmlpy repl (src/sysmlpy/repl.py, 28 tests in tests/repl_test.py). Declarations accumulate into a session model with member-granularity merge (re-declared member replaces the prior one, other members kept, note: line reports the replacement — the semantics ipython_magic.py has carried since v0.64.0, now shared). Multi-line submissions continue on ...> while brackets stay open; a non-declaration line falls back to expression evaluation. 19 %commands: %list/%show/%dump, %eval/%set/ %bindings/%calc/%check/%values (evaluator, pint-aware), %sim/%send/%step/%state (simulator session), %view (all 8 views), %load/%save/%reset/%quit, %help; readline completion over commands and element names; UUID names filtered from qualified-name display. Session core is I/O-injectable and headless-testable (same pattern as sim.run_tui).
  • Visitor: exhibit state no longer silently dropped. The grammar rule exhibitStateUsage had zero visitor handling — both spellings (exhibit state m { ... } and exhibit state m : M;) vanished from the visitor dict, the public tree, Model.dump(), the boxes view, and the simulator. Now emitted as a StateUsage dict with exhibit: True; StateUsage grammar class carries/dumps the exhibit keyword. Spacecraft-comms' dump went from lossy 1,177 chars to faithful 5,334.
  • Public-API: state def in part/item def bodies no longer dropped (no dispatch arm in the Usage body walk) and perform action m : M no longer dropped (no _load_behavior_child branch; PerformActionUsageDeclaration keeps name/typing in .children, now extracted — perform action mission : LunarMission { in budget = Flight::budget; } round-trips and surfaces as an Action child).
  • Evaluator: KerML math built-ins ln, exp, log, log2, log10 added (pint-aware, dimensionless results) — motivated by the showcase's rocket equation; positional calc-arg binding unchanged.
  • New fixtures: the five OpenSysML runtime-showcase models copied to tests/fixtures/runtime_showcase/ (Apache-2.0, attribution README; unchanged model text) with tests/runtime_showcase_test.py (18 tests). The evaluator reproduces OpenSysML's published showcase digits exactly (stage delta-v 3037.6966629706967 / 6432.955324716369 m/s, margin 70.65198768706614) and both showcase state machines build and drive.
  • Docs: README.md command table + REPL example; STATUS.md CLI section + test map; docs/COMPARISON.md.

Test totals at this release: 1,368 fast + 123 conformance passing (8 skipped for optional deps not installed).

v0.94.0 (2026-09-16)

Relationship Matrix View: verify cells — the Vee's V side.

verify <req>; relationships now land as V cells, closing the requirements loop in the cross-checking grid: satisfy (check) shows that a part claims to meet a requirement, verify (V) shows that a verification case demonstrates it.

  • new _extract_verifies recovers verify references from both placements: surfaced VerifyRequirementUsage wrappers (read directly, like satisfy) and members nested anywhere in a VerificationCase/Requirement grammar's definition dict (objectives included), recovered via an iterative get_definition() walk; qualified references (verify P::req;) resolve to the last segment, so usage-level and definition-level verifications both reach the requirement's axis name
  • vocabulary gains "verify": "V"; verify wrappers join satisfy/ allocation/connection usages in the cells-not-axes exclusion
  • 2 new tests (verify-in-definition-objective and qualified-ref-in-usage), 13/13 matrix tests, 158/158 plantuml_test.py

v0.93.0 (2026-09-16)