Repository navigation
feat(sysml2): accept visibility modifiers, quoted names, alias and recursive import — official corpus 1 -> 16 of 310 - #489
Merged
Conversation
…cursive import — official corpus 1 -> 16 of 310 REQ-SYSML2-VISIBILITY-001. Visibility is KerML core and sits on almost every member of every real model, so the specification's own Annex A vehicle model failed at line 3. `public`/`private`/`protected` were lexed as keywords that no grammar rule consumed; `alias` likewise. - Visibility prefixes any member, at file level and in every namespace body (every definition body goes through `namespace_body`). A prefix with no member after it, or a second prefix, is an error, not silently accepted. - A KerML unrestricted name `'Application Layer'` (with `\'` escapes) lexes as IDENT, so every name position takes it. An unclosed one ends at the line break as ONE error token instead of swallowing the rest of the file. - `alias Name for QualifiedName (; | body)`; ALIAS_DECL is ignorable in lowering (no AADL equivalent, nothing lost). - Recursive import `Pkg::**` — Annex A's next blocker (line 17) once line 3 parsed. MEASURED: official corpus 1 -> 16 of 310, OFFICIAL_PARSING raised (two-sided ratchet). Three named conformance files flip to Parses; the other four move past the constructs they were recorded against, and the table now records their real first errors. The old estimate that these constructs "account for 258 of the 309 failures" counted files whose FIRST error was one of them — most carry further unsupported constructs behind it, so the real gain is 15. ACCEPTANCE AMENDED, deliberately: "Annex A parses" is not met. It now stops at 35:17, `perform action providePower;` — behaviour syntax, a different grammar area — and is split out as REQ-SYSML2-ANNEX-A-001 (backlog, no release), with the measured long tail of remaining first errors. ORACLE: `parse_private_import` / `parse_public_import` were VACUOUS — they asserted only that a PACKAGE node existed, with a comment conceding visibility "may cause a parse error". They now require a clean parse. New cases cover every level, dangling and duplicate visibility, alias with and without `for`, `::**`, the quoted-name lexer edges, and the first test of lowering's unsupported-construct diagnostic in both directions. In-diff mutants: 8 MISSED before the tests; after, 29 tested, 22 caught, 2 unviable, 5 timeouts (non-advancing parser/lexer stalls), 0 missed. NOT CLAIMED: any semantic effect of visibility — lowering ignores it, so a private member reaches AADL like a public one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BnBWxgVEUPdsBTLNKtrA6Z
Rivet verification gate✅ 20/20 passed
Filter: Failed artifacts(none) Updated automatically by |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
REQ-SYSML2-VISIBILITY-001 (v0.46.0). No tracking issue.
What it does
public/private/protectedwere lexed as keywords that no grammar rule consumed, so the SysML v2 spec's own Annex A model failed at line 3. Now accepted:'Application Layer'(with\'escapes). An unclosed one is one error token ending at the line break;alias Name for QualifiedName (; | body);Pkg::**.Measured
OFFICIAL_PARSINGratchet is raised to match.Acceptance amended, deliberately
"Annex A parses" is not met. It now stops at 35:17,
perform action providePower;, which is behaviour syntax. That is split into REQ-SYSML2-ANNEX-A-001 (backlog, no release), with the measured histogram of remaining first errors.Oracles
parse_private_import/parse_public_importwere vacuous: a comment in them conceded the keyword "may cause a parse error", and they passed anyway. They now require a clean parse.spar-analysis, so these numbers come from a local run.Not claimed
Any semantic effect of visibility. Lowering ignores it, so a
privatemember is still exported.🤖 Generated with Claude Code
https://claude.ai/code/session_01BnBWxgVEUPdsBTLNKtrA6Z