Skip to content

v0.0.9: Optimization release

Choose a tag to compare

@HuiJun HuiJun released this 17 Aug 05:10
· 428 commits to main since this release
fbcb430

Systemica 0.0.9

Behavior, tooling and performance release. 52 pull requests since 0.0.8. Nothing is removed
and no model that worked before needs editing; two Python names are renamed with the old
spellings kept as deprecating aliases. Ships with pysysml 0.2.0.

Highlights

  • The VS Code extension can start the language server. sysml-lsp accepts --stdio
    and implements the shutdown/exit lifecycle, so the shipped client no longer
    crash-loops the shipped server. If 0.0.8's extension never worked for you, this is why.
  • State machines behave correctly around composite states. A transition out of a
    composite state fires while a substate is active, and a transition between sibling regions
    exits only its source rather than the whole composite state.
  • a then b and transition endpoints resolve like the names they are — in the scope
    they were written in, with a diagnostic when an endpoint names a vertex of another machine
    or a first/then marker, instead of silently dropping the edge.
  • The Python client starts ~31× faster: 509 ms → 16.5 ms, and a cold model load on the
    service dropped from ~110 ms to under 1 ms, so short-lived scripts and per-call
    calculations are practical.
  • A valueless feature of a value type reads as <unset> on every surface, instead of an
    empty object.

Language and semantics

  • Messages route by port direction, conjugation and the performing part; a state machine
    inside a part reaches that part.
  • Blocks own their token flow: for iterates every collection it is given, outputs the
    block's own flow assigns are counted, and a for over a non-collection is reported.
  • Library evaluation: string operators and StringFunctions, VectorFunctions and
    ComplexFunctions, @/@@ classification, a queryable exposed set for views, library
    feature values by name (TrigFunctions::pi, deg/rad) and includingAt insertion.
  • Enumeration literals are values, in the runtime and across the API.
  • Multi-valued defaults are honoured when they conform and reported when they do not; a
    default with no declared multiplicity is held to the assumed 1..1.
  • Calc bodies with an implicit result are type-checked, and calc recursion runs under a
    budget rather than exhausting the stack.
  • The subject of a check or evaluation is chosen deterministically and named in verdicts,
    labels and over the wire, including a nested one.
  • A member chain from that (= that.a) resolves; a root-level private import X::*;
    serves its own document — the spelling OMG's training files use.
  • Parser: keyword-named parameters and loop variables, modifier-driven usage kinds, a
    classifier specializing any definition, and KerML classifier/datatype classification.

Tools

  • REPL: unclosed submissions, load diagnostics, object-resolved subjects, %view,
    ranked suggestions, quoted qualified names and a pinned %eval context. A piped session
    whose command could not materialize a slot exits 2, so scripts detect it.
  • CLI: materialization diagnostics are reported instead of swallowed, and an undecided
    check is reported under one prefix.
  • gRPC: quantities cross in both directions with magnitude, written unit and reduced
    term preserved; enumeration literals cross as literals; unreduced, zero-scale or
    reduction-less units are rejected; Value.unset is a new arm the service sends and
    refuses to accept.

pysysml 0.2.0

  • Startup 509 ms → ~17 ms, with the same bounded START_TIMEOUT and ConnectionError.
  • pysysml.UNSET for a slot holding no value — falsy, distinct from None.
  • Quantities can be sent, not only read.
  • pysysml.evalpysysml.evaluate, pysysml.RuntimeErrorpysysml.ExecutionError;
    the old names still resolve with a DeprecationWarning and are out of __all__.
  • UnpinnedReleaseError for a release no digest is pinned for, subclassing
    ChecksumMismatchError; only it may be answered from a cached binary.
  • pysysml.__version__ reports the declaration shipped beside the module; the generated
    protobuf stubs ship type annotations, so mypy is clean.
  • Owns only services it spawned, authenticates them by pid, and pins release digests.

Quality gates

Measured on the released commit; the per-figure home is
docs/project/spec-compliance.md.

Gate Result
Tests and subtests 4,447 — 4,440 pass, 7 self-skip
Execution conformance 297 cases, all passing
Golden execution traces 98
Golden AST fixtures / negative parser subtests 86 / 129
Robustness 165 runtime cases, 8 gRPC cases
gRPC conformance 14 cases
Standard library parse 95/95 files clean
OMG training corpus 98/100 files clean (2 files / 4 errors, pinned OMG source bugs)
Python suite 514 passed, 17 skipped

cmd/sysml-grpc now has a process-lifecycle gate; it was at 0% coverage in 0.0.8 despite
being a published artifact.

Known limitations

  • A port that accepts TCP but never answers gRPC fails after ~9 s of wall clock rather than
    the nominal 2.5 s START_TIMEOUT. Bounded, and it raises a clear ConnectionError.
  • that inside a nested action/constraint/transition-guard body binds to the innermost
    usage, so that.k naming a member of the enclosing part is unresolved. This follows the
    spec text as written; say so if you need the outward binding.
  • Unqualified standard-library names still require an import (private import ScalarValues::*;). This is spec-conformant — only public top-level elements of a root
    namespace are globally visible ([SysML, 7.2] over [KerML, 8.2.3.5]) — and is recorded as
    won't-do rather than open.
  • RDF/Turtle interchange remains partial: expressions are not emitted as triples, and some
    example models do not convert. Treat the RDF path as experimental.
  • macOS binaries are unsigned and un-notarized; the VS Code extension is not on the
    marketplace.
  • The release tag pipeline does not run the OMG corpus gate — it was run locally for this
    release.