Repository navigation
fix(parser): reject frame, filter and accept outside their bodies; declare extension libraries non-standard - #882
Conversation
…es that own them Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…hen form Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ies precisely Co-Authored-By: jason.han <hanhuijun@gmail.com>
|
End-to-end testing of the CLI, REPL and pilot on ef0f402 (later commits changed only the changelog): all checks passed.
|
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…e-conformance Co-Authored-By: jason.han <hanhuijun@gmail.com>
…e-conformance Co-Authored-By: jason.han <hanhuijun@gmail.com>
|
This branch now conflicts with
To resolve: merge current Planned merge order for the view and docs PRs: #889 → #881 → #871 → #882 → #884 → #885 → #886. Each needs these files regenerated again after the one before it merges. Re-run the full gate ( |
…e-conformance Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
|
Hold on pushes: please don't push to this branch, including |
…e-conformance Co-Authored-By: jason.han <hanhuijun@gmail.com>
|
The push pause is lifted for this PR, for one push after the work below. Merge Source files: resolve by hand.
Generated files: do not hand-merge. Take develop's side, then regenerate:
Every row that moves in those two baselines must be adjudicated in Prose: Before pushing, run the full gate and confirm it passes:
Push once, without force-pushing. |
…e-conformance Co-Authored-By: jason.han <hanhuijun@gmail.com>
Restore the released 0.10.0 notes and record the change in the unreleased fragment instead. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…e-conformance Co-Authored-By: jason.han <hanhuijun@gmail.com>
… package Co-Authored-By: jason.han <hanhuijun@gmail.com>
…e-conformance Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…e-conformance Co-Authored-By: jason.han <hanhuijun@gmail.com>
What and why
The pinned OMG pilot validator (tag 2026-08) found two conformance gaps on
develop.1. Body members accepted in bodies whose grammar doesn't allow them.
frameinside aview(examples/views-demo.sysml:176,examples/self-model/views.sysml:197) parsed cleanly, even under-strict. I compared OpenSysML and the pilot on every body-specific member across view / view def / viewpoint / viewpoint def / rendering / rendering def bodies (222 fixtures) and found three more gaps of the same kind. Each now follows the project's existing classification:frame concern c : C;/frame c;RequirementBodyItem(requirement, concern, viewpoint)ownedMemberslikesubject/stakeholder/renderfilter …;PackageBodyElement, view and view def bodiesbodyPackagecontext for packages and the file root)accept …action nodeActionBodyItem(action, calc, case bodies)send/assign; state bodies are unchangedthen t;ActionBodyItem, plus the state body's target transitionnonstandard-notationoutside action/state bodies (warning by default, error under-strict), extending the existing target-succession check;if g then t;/else t;there were already parser errorsViewpoint
frames (views-demo.sysml:135,self-model/views.sysml:9) are valid and stay clean.Supersedes develop's warning for
framein view and view def bodies. Develop reported such aframeasnonstandard-notation(a warning by default, an error under-strict). It is now a parser error in every mode, codedframed-concern-membership-owning-type, becauseFramedConcernMemberappears only inRequirementBodyItem. The notation check that issued the warning is removed, so aframegets exactly one diagnostic. A misplacedfilteris codedelement-filter-membership-owning-type; both codes are indocs/reference/diagnostics.md. Develop's%viewrule, which evaluates each viewpoint concern directly against the view's exposed elements, matches this PR's and is kept as is.%view. Develop has since landed the same conformance rule (each concern the satisfied viewpoint frames is evaluated directly against the elements the view exposes; no view-local re-framing is required, since valid SysML can't write it). This PR takes develop's implementation, tests and example edits, and adds one test for an untypedframe concern mass;in a viewpoint.2. Extension libraries marked standard.
DiagramLayout,IdentityMetadata,MigrationMetadataandSysMLValidationare non-normative OpenSysML extensions, but were declaredstandard library package. They are nowlibrary package. What this changes:isStandard, and theOpenSysML Librariestier never had them.sysml:isStandard true(false flags aren't written).stdlib.snapshot: regenerated (make stdlib-snapshot).library/standardkeywords, so a copy now has to be writtenlibrary packageto stand in for the bundled file.Specification basis
SysML.xtext(tag 2026-08):ViewBodyItem,ViewDefinitionBodyItem,RequirementBodyItem(FramedConcernMember),PackageBodyElement(ElementFilterMember),ActionBodyItem(AcceptNode,TargetSuccessionMember).LibraryPackage::isStandard: only for standard / normative model libraries.docs/project/spec-compliance.md: the view-conformance row text is updated; its status is unchanged (How it was verified
Pilot results, before → after:
examples/self-model+OpenSysML Librariesviews.sysml:197), 4 "should not be marked as standard" warningsdocument.sysmlare unchanged)examples/views-demo.sysml+OpenSysML Libraries:176), 4 warningsOpenSysML Librariesaloneaccept/if…then/elsecases, every case the pilot rejects as a syntax error is now an error from us under-strict. The remaining mismatches are cases where both sides already report non-syntax errors.framein view / view def bodies,filteroutside a package or view,acceptoutside an action body) and x12 (target succession outside an action body), all rejected by both. Baseline is now 328 cases: 319 rejected by both, 0 pilot-only, 9 ours-only (develop: 323 / 314).frames.go build ./...,go vet ./...,gofmt -l .(empty),go test ./...,go test -C tools ./...,make docs-check,make stdlib-snapshot-check,make self-model,make docs-counts, man-check and changelog check all pass.tests/export/testdata/convert/imported_references.sysml(filterin a part def),accept_payload_test.go,event_feature_test.goandruntime/signal_test.go(acceptin a part def).Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)F4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/2c39248a684e49a4af9bd168ba90484e
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/2c39248a684e49a4af9bd168ba90484e?variant=devin
Requested by: @HuiJun