Repository navigation
fix(parser): reject frame, filter and accept outside their bodies; declare extension libraries non-standard - #882
devin-ai-integration[bot] wants to merge 9 commits into
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 |
|
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. |
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.Behaviour change in
%view. Until now, conformance required the view to re-frame every concern of its viewpoint, and reportedviolated (framed by the viewpoint but not by the view)otherwise. Valid SysML can't write that, so the requirement is gone: each concern the satisfied viewpoint frames is evaluated directly against the elements the view exposes.ConcernConformance.FramedBy/FramedInand the view-framing matching (own, inherited, nested, by name) are removed, and their tests are replaced with tests of the new rule. The examples drop the redundant viewframe(the viewpoint already frames the same concern), as doesdisposal-robot-demo/robot.sysml.%view overviewoutput is unchanged for views-demo and the self-model.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 x11 (target succession outside an action body). Baseline is now 317 cases: 308 rejected by both, 0 pilot-only, 9 ours-only.views-demo.sysmlandself-model/views.sysmlnow agree fully;robot.sysmlkeeps its one adjudicated second-objective row. Thepilot-differential.mdnarrative and counts are updated.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