Custodial update, realigning docs and tests - #46
Merged
Conversation
…formance cases Re-counts the stale numbers in docs/SPEC_COMPLIANCE.md and docs/TRAINING_EXAMPLES.md from actual runs (execution conformance 43/43, corpus 81/100, robustness 27, golden AST 24, negative parser 19) and records that the corpus gate skips in CI. Resolves the standing gRPC Layer 2 gap instead of leaving it as a to-do: internal/grpc/conformance_test.go drives Evaluate, Instantiate, ExecuteAction and ExecuteState from .sysml + .expected.json pairs through the ParseFile RPC, adopting the two fixtures that were checked in but never consumed by any test. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
Add ast.IfBranchNode so each branch of an if action is an element that can own a scope. Declarations in a branch body are members of the branch: they resolve inside it, do not escape to the enclosing behavior or the sibling branch, and are body-local (excluded from recursive imports and the REPL scope-tree search), matching loop bodies. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…f clause Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…s and checksums Root cause is the com.apple.quarantine attribute, not a missing signature: Go's linker already emits an ad-hoc (linker-signed) signature for darwin/arm64 even when cross-compiling from Linux. - README/QUICKSTART: curl and go install paths, quarantine escape hatch - build-release: systemica-<os>-<arch> bundles + SHA256SUMS.txt - packaging/homebrew: formula template + render script (no tap created) - docs/MACOS_DISTRIBUTION.md: notarization decision record Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
… deferred events Declare history (shallow/deep), entry/exit point pseudostates and event deferral in a state body, lowered onto the existing runtime support. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
A parameter of a behavior or step implicitly redefines the parameter at the same position of each behavior or step its owner specializes (KerML 7.4.7.2, 7.4.7.3; SysML v2 7.17.2), and a result parameter redefines the general calculation's result whatever its position (SysML v2 7.19.2). Redefinition is a generalization, so the parameter takes the redefined parameter's type when it declares none: 'out item image;' in 'action focus : Focus' is now typed by 'Image' and 'focus.image.isWellFocused' resolves. Replaces the name-based rule in implicitBase, which left any usage shadowing a like-named inherited feature untyped; the specification has no such rule, and a like-named nested usage is a name conflict, so it now takes the standard library base of its kind like any other untyped usage. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
A `perform` action usage relates the action it performs by a reference subsetting (SysML 7.17.6, KerML 8.3.3.3.9), so the referenced action's members are visible on the performing usage. Model that as a distinct member-contribution relation (`Model.ReferencedFeature` / `Model.MemberSources`) consumed by member lookup, deliberately outside `DirectSupertypes` so conformance and implicit typing are unaffected. An unnamed usage takes the effective name of the feature it references, and that name is bound in the scope the reference itself resolves in, so reference targets resolve outside their own binding (`resolve.Resolver.ReferenceScope`). Also distinguishes the `via`, `about` and `by` clauses, which named related elements through the same relationship kind without being subsettings, and parses `allocate a to b` as an anonymous binary allocation. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…t tap formula - packaging/homebrew/Formula/systemica.rb: real formula (renderable) with per-platform urls/checksums, install of both binaries, and a test block - packaging/homebrew/README.md: exact steps to create Open-MBEE/homebrew-tap and to bump the formula each release - render script: reads the formula source, fails on leftover placeholders - README/QUICKSTART: brew tap Open-MBEE/tap first, direct download + xattr fallback Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…c-conformance Re-counts the stale numbers in docs/SPEC_COMPLIANCE.md and docs/TRAINING_EXAMPLES.md from actual runs (execution conformance 43/43, corpus 81/100, robustness 27, golden AST 24, negative parser 19) and records that the corpus gate skips in CI. Resolves the standing gRPC Layer 2 gap instead of leaving it as a to-do: internal/grpc/conformance_test.go drives Evaluate, Instantiate, ExecuteAction and ExecuteState from .sysml + .expected.json pairs through the ParseFile RPC, adopting the two fixtures that were checked in but never consumed by any test. Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: jason.han <jason.han@jpl.nasa.gov>
…ng it Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…spaces Add ast.IfBranchNode so each branch of an if action is an element that can own a scope. Declarations in a branch body are members of the branch: they resolve inside it, do not escape to the enclosing behavior or the sibling branch, and are body-local (excluded from recursive imports and the REPL scope-tree search), matching loop bodies. Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: jason.han <jason.han@jpl.nasa.gov>
Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…own name Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…ember * fix(parser,resolve): register the payload a message declares in its of clause Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(parser): give a declared flow payload its own source span Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: jason.han <jason.han@jpl.nasa.gov>
* docs(release): document macOS Gatekeeper install path; publish bundles and checksums Root cause is the com.apple.quarantine attribute, not a missing signature: Go's linker already emits an ad-hoc (linker-signed) signature for darwin/arm64 even when cross-compiling from Linux. - README/QUICKSTART: curl and go install paths, quarantine escape hatch - build-release: systemica-<os>-<arch> bundles + SHA256SUMS.txt - packaging/homebrew: formula template + render script (no tap created) - docs/MACOS_DISTRIBUTION.md: notarization decision record Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * docs(packaging): make brew the recommended macOS path; ready-to-commit tap formula - packaging/homebrew/Formula/systemica.rb: real formula (renderable) with per-platform urls/checksums, install of both binaries, and a test block - packaging/homebrew/README.md: exact steps to create Open-MBEE/homebrew-tap and to bump the formula each release - render script: reads the formula source, fails on leftover placeholders - README/QUICKSTART: brew tap Open-MBEE/tap first, direct download + xattr fallback Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: jason.han <jason.han@jpl.nasa.gov>
Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…reference * fix(parser,passes): satisfy references a requirement usage, not a type Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(passes): resolve aliases for satisfy reference targets Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: jason.han <jason.han@jpl.nasa.gov>
Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…notation * feat(parser): add textual notation for history, entry/exit points and deferred events Declare history (shallow/deep), entry/exit point pseudostates and event deferral in a state body, lowered onto the existing runtime support. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(lower): report a defer written in a region body instead of dropping it Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: jason.han <jason.han@jpl.nasa.gov>
Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…ones and drop provisional reference caching Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…ition The invocation checker matched a declaration with no ':>>' target to an inherited parameter of the same name before falling back to position, which disagrees with the positional rule in semantics/redefinition.go (KerML 7.4.7.2) whenever a specialization reorders the names it redeclares. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
… declaration Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
The invocation checker positioned a redeclared parameter within the declared 'in' parameters only, so an 'out' declared before an 'in' shifted it relative to semantics/redefinition.go, which numbers positions over all parameters. Merging now runs over every directed feature, with the signature restricted to the inputs afterwards, and a position whose directions disagree is not treated as a redefinition. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…efines parametersOf appended the general behavior's parameters beyond the count of owned ones, which claims the wrong parameter when an owned one redefines a general parameter at another position explicitly: the redefined parameter was inherited and the un-redefined one dropped. The inherited tail is now the parameters no owned parameter claims, by ':>>' target or by position. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…e scope A perform statement's borrowed effective name was hidden by skipping the enclosing scope entirely, which also skipped that scope's inherited members and imports, so performing an action a part inherits from its type reported an unresolved reference. A refFilter now hides just those bindings during the lookup, with Model.LookupContributedMember supplying the inherited half. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
mergeParameters replaced inherited entries in place, keeping the general behavior's order, while semantics.Model.parametersOf puts the declared parameters first and appends what none of them redefines (KerML 7.4.7.2). The two orders diverged as soon as a ':>>' named a parameter at another position, so a model could be typed against one parameter and argument-checked against another. The list is now built declared-first, with the same claiming rule. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
The editor looked up the last segment of `perform a.b;` in the enclosing scope, where the perform statement itself is now bound under that borrowed name, so definition/references/rename pointed at the perform statement. resolve.Reference carries the chain, so the segment resolves as a member of the operand as the document walk does. The chain member's span was also the empty span after it, which hid the segment from the editor entirely. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…nce-subsetting * feat(semantics): resolve members contributed by reference subsetting A `perform` action usage relates the action it performs by a reference subsetting (SysML 7.17.6, KerML 8.3.3.3.9), so the referenced action's members are visible on the performing usage. Model that as a distinct member-contribution relation (`Model.ReferencedFeature` / `Model.MemberSources`) consumed by member lookup, deliberately outside `DirectSupertypes` so conformance and implicit typing are unaffected. An unnamed usage takes the effective name of the feature it references, and that name is bound in the scope the reference itself resolves in, so reference targets resolve outside their own binding (`resolve.Resolver.ReferenceScope`). Also distinguishes the `via`, `about` and `by` clauses, which named related elements through the same relationship kind without being subsettings, and parses `allocate a to b` as an anonymous binary allocation. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(lsp): resolve perform references outside the perform statement's own name Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(runtime,lower): run the action a bare perform statement names Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(resolve,symbols,semantics): prefer declared names over effective ones and drop provisional reference caching Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(resolve,symbols): let effective names never shadow or ambiguate a declaration Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(resolve): hide only a reference's own borrowed name, not its whole scope A perform statement's borrowed effective name was hidden by skipping the enclosing scope entirely, which also skipped that scope's inherited members and imports, so performing an action a part inherits from its type reported an unresolved reference. A refFilter now hides just those bindings during the lookup, with Model.LookupContributedMember supplying the inherited half. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(lsp,parser): resolve a feature chain's member through its operand The editor looked up the last segment of `perform a.b;` in the enclosing scope, where the perform statement itself is now bound under that borrowed name, so definition/references/rename pointed at the perform statement. resolve.Reference carries the chain, so the segment resolves as a member of the operand as the document walk does. The chain member's span was also the empty span after it, which hid the segment from the editor entirely. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: jason.han <jason.han@jpl.nasa.gov>
mergeParameters advanced a cursor past an explicitly claimed index, so a following declaration was paired with the next unclaimed inherited parameter instead of the one at its own position, leaving an extra entry in the list. semantics.claimedParameters uses the declaration index; both now do. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…ot redefine A position whose directions disagree is not a redefinition, but it still counted as a positional claim, so the general behavior's parameter there was dropped from the effective list: it was neither redefined nor inherited, and a specialization that only added an output lost one of its inherited inputs. Claiming now requires the directions to match, in both tiers. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…ining parameter An implicit parameter redefinition counted as a declared generalization, so it suppressed the standard library base of the parameter's kind. A parameter redefining an untyped general parameter therefore lost Items::Item and the members reachable through it. The two rules are independent: the base is now applied whenever the declaration itself specializes nothing. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
…eter-redefinition * feat(semantics): implicit redefinition of behavior and step parameters A parameter of a behavior or step implicitly redefines the parameter at the same position of each behavior or step its owner specializes (KerML 7.4.7.2, 7.4.7.3; SysML v2 7.17.2), and a result parameter redefines the general calculation's result whatever its position (SysML v2 7.19.2). Redefinition is a generalization, so the parameter takes the redefined parameter's type when it declares none: 'out item image;' in 'action focus : Focus' is now typed by 'Image' and 'focus.image.isWellFocused' resolves. Replaces the name-based rule in implicitBase, which left any usage shadowing a like-named inherited feature untyped; the specification has no such rule, and a like-named nested usage is a name conflict, so it now takes the standard library base of its kind like any other untyped usage. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(passes): match a redeclared parameter to the inherited one by position The invocation checker matched a declaration with no ':>>' target to an inherited parameter of the same name before falling back to position, which disagrees with the positional rule in semantics/redefinition.go (KerML 7.4.7.2) whenever a specialization reorders the names it redeclares. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(passes): number parameter positions over every directed feature The invocation checker positioned a redeclared parameter within the declared 'in' parameters only, so an 'out' declared before an 'in' shifted it relative to semantics/redefinition.go, which numbers positions over all parameters. Merging now runs over every directed feature, with the signature restricted to the inputs afterwards, and a position whose directions disagree is not treated as a redefinition. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(semantics): inherit the general parameters no owned parameter redefines parametersOf appended the general behavior's parameters beyond the count of owned ones, which claims the wrong parameter when an owned one redefines a general parameter at another position explicitly: the redefined parameter was inherited and the un-redefined one dropped. The inherited tail is now the parameters no owned parameter claims, by ':>>' target or by position. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(passes): order the parameter list as the semantic model does mergeParameters replaced inherited entries in place, keeping the general behavior's order, while semantics.Model.parametersOf puts the declared parameters first and appends what none of them redefines (KerML 7.4.7.2). The two orders diverged as soon as a ':>>' named a parameter at another position, so a model could be typed against one parameter and argument-checked against another. The list is now built declared-first, with the same claiming rule. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(passes): claim the inherited parameter at the declaration's position mergeParameters advanced a cursor past an explicitly claimed index, so a following declaration was paired with the next unclaimed inherited parameter instead of the one at its own position, leaving an extra entry in the list. semantics.claimedParameters uses the declaration index; both now do. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(semantics,passes): keep an inherited parameter a declaration cannot redefine A position whose directions disagree is not a redefinition, but it still counted as a positional claim, so the general behavior's parameter there was dropped from the effective list: it was neither redefined nor inherited, and a specialization that only added an output lost one of its inherited inputs. Claiming now requires the directions to match, in both tiers. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> * fix(semantics): keep the standard library base of an implicitly redefining parameter An implicit parameter redefinition counted as a declared generalization, so it suppressed the standard library base of the parameter's kind. A parameter redefining an untyped general parameter therefore lost Items::Item and the members reachable through it. The two rules are independent: the base is now applied whenever the declaration itself specializes nothing. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: jason.han <jason.han@jpl.nasa.gov>
HuiJun
added a commit
that referenced
this pull request
Aug 11, 2026
F2: the reported parse-time loss of all but the first end does not reproduce for a named connection; add regression coverage at every layer and record the anonymous inline form's binary-only limitation. Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: jason.han <jason.han@jpl.nasa.gov>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upstreams the work done on the
JPL-Devin/Systemicafork since it was resynced fromOpen-MBEE/Systemica@97b5edd: 41 commits, 8 already-reviewed-and-merged changes on the fork, fast-forwardable (fork is 41 ahead / 0 behind). Six of the eight are semantic or parser correctness fixes; the corpus gate moves 81/100 → 88/100 clean as a result.Resolution and semantics (the substance)
perform/referencescontribute members. A usage that references another feature (perform a;,ref x ::> y) now contributes that feature's members to resolution, instead of the reference being a dead end.satisfyusages are not typed by the referenced requirement. The type checker was reporting false positives on legalsatisfy/SatisfyRequirementUsagemodels; per the spec the usage's type comes from the standard library element, not from the referenced requirement.Implicit redefinition of behavior/step parameters is positional, not name-based (KerML 7.4.7.2/7.4.7.3). The old name-matching guard is deleted rather than patched, and a test that encoded the name-based behavior was rewritten:
A parameter that a declaration cannot legally redefine now stays inherited, and an implicitly redefining parameter keeps its standard-library base.
if/elsebranch bodies are namespaces, so features declared in a branch resolve inside it.Message payload features declared in an
ofclause are registered, soflow of Payload …payload members resolve.Notation
history/shallow history/deep history), deferred events (defer E1, E2;) and entry/exit point pseudostates, wired through the parser, lowering and the runtime. The OMG textual grammar has no production for any pseudostate or for deferral, so these are documented as a Systemica extension indocs/grammar/README.md, not as standard notation.pointis matched contextually rather than reserved, since models routinely declare features namedpoint.Test coverage and docs
internal/grpc/conformance_test.go): two fixtures were checked in but read by no test. Now 5 fixture pairs coverEvaluate/Instantiate/ExecuteAction/ExecuteState, asserting the protobuf oneof arm and payload, slots, outputs, state visitation and expected errors.docs/SPEC_COMPLIANCE.mdanddocs/TRAINING_EXAMPLES.mdrecounted against reality, with a per-file verdict recorded for every corpus expectation change (training_examples_expected.txtwas adjudicated file-by-file, never regenerated).macOS distribution
docs/MACOS_DISTRIBUTION.mddocuments the actual cause of the install prompt: it iscom.apple.quarantine, not a missing signature — Go's linker already ad-hoc signsdarwin/arm64even when cross-compiled from Linux (verifiedflags=0x20002in the Mach-O CodeDirectory of a binary built the waybuild-releasedoes), so ad-hoccodesign -s -in CI would fix nothing. Removing the prompt entirely requires Developer ID signing + notarization, recorded as a decision record with the exact credentials and runner it needs.SHA256SUMS.txtand per-platform bundles;packaging/homebrew/carries a formula template andscripts/render-homebrew-formula.sh. Homebrew is the interim low-friction path (Homebrew-installed binaries are not quarantined) and targets a tap the maintainer will create; nothing here creates or assumes that repo exists.Verification
CI was unavailable on the fork, so every one of the 8 changes was gated locally, and the merge result at
6bd3ea4was re-verified end to end:Note that the corpus gate does not run in CI on either repo — neither workflow downloads the corpus, so
TestTrainingExamplessilently skips there. The 88/100 above is local evidence; adding the download to CI is a recommended follow-up.Other gates at
6bd3ea4: stdlib parser conformance 94/94, execution conformance 51 cases, golden execution traces 22, runtime robustness 29 subtests, gRPC conformance 5 cases, golden AST fixtures 30, negative parser subtests 32.Known issues in this branch
docs/SPEC_COMPLIANCE.md/docs/TRAINING_EXAMPLES.mdstate 81/100 in places; the later merges took the corpus to 88/100 and the recount has not landed yet.start/donevsstartShot/endShot; thealternativetypo), so 95/100 is the material ceiling without changing upstream files.Verification Case Definition Exampleare likely ours, not the file's: itsprivate import VerificationCases::*;sits inside theverification defbody and imports owned by a non-package namespace do not appear to be applied. The checked-in verdict currently blames the file and needs re-adjudication.entry <actionName>;(an entry action by reference, rather than an inline body) still fails to parse:expected a body member.