Repository navigation
fix(symbols,semantics): a then x; succession without a body is the SuccessionAsUsage its action or state owns — the semantic model, the symbol structure and the query leg's ownedRelationship list it, as the pilot exports it and the RDF writer states it - #2121
Conversation
… its action or state owns — bodiless as with a body, as the pilot exports it and the RDF writer states it; the tree view draws it as a `then x` succession row The symbol builder registered a SuccessionEdge only when it carried a body, so Model.OwnedRelationships (and so the query leg's ownedRelationship, the structure, the census) listed no membership for a bare `then acquire;` where the RDF writer, walking the notation, states one owning a SuccessionAsUsage. Every edge is now an anonymous succession usage of its owner; the symbols test that pinned the old shape counts one scope per then. The tree view's successions compartment reads the edge as `then x` (its source only where written). Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ssions Every root moves the same way: the bodiless then successions now exist as symbols and match the graph's elements by id (examples matched 30060 -> 30252), so Element::ownedRelationship (equal 28619 -> 28744), Element::ownedElement, Definition::ownedUsage, Definition::usage (different 27 -> 16) and Connector::connectorEnd (equal 372 -> 468) gain equal rows. The new different rows are the successions' own properties the symbol structure does not derive yet: their ends (Connector::relatedFeature/sourceFeature/targetFeature symbol-missing 111 -> 178) and Feature::isComposite (different 229 -> 325), the next sub-family. No row that was equal moved away. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Each root counts the bodiless then successions as elements now (training 7926 -> 8036): every moved row is growth — the rules a SuccessionAsUsage answers (owner, owningMembership, owningType, isComposite, featuringType, the Relationship ends, Type::feature and the like) gain carriers and values; no value count shrank. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…tion or state Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
A then edge whose production ends in ';' (SysML.xtext EntryTransitionMember, a DefinitionBodyItem's then) has no body to state a Route or Style in and no name to state one about. Now that the edge is a symbol of its own, the editor refused nothing and wrote a body the parser rejects; parser.SuccessionAdmitsBody states the grammar once, the editor refuses the inline annotation with FailureNotNamed, and the state view leaves the entry edge unsteered so a draw.io import notes the re-route instead of offering it. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…y's done, and is unanswered for a member no element stands for The grammar fact a then edge's production ends in ';' moves to ast.SuccessionAdmitsBody, which the parser, the view and the editor share: the runtime must not depend on the parser. A then done; now relates to the inherited done (a then start likewise), and a succession whose end is a statement or an entry action — members the symbol model has no element for yet — answers no relatedFeature rather than one feature short, so the self-check reports validateConnectorRelatedFeatures unevaluated for it instead of failing every model with a bare then. A record keeps such an end as a zero position. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Merge coordination: this PR is held from CI until it is re-based by merge. Its base is stale — it does not contain develop 98d8eca (#2117 touched internal/semantic/semantics/annotations.go and model.go). Please fix the open Devin Review findings locally, then do one --no-ff merge of origin/develop (regenerate derived_census_baseline.json and structure_differential_expected.txt with the repository tooling on the merged tree), run the full gate, and push exactly once. No rebase or force-push, no CI re-runs or labels: CI-optimization PRs #2118/#2120 currently have runner priority and the watcher starts only released heads. |
… then done A then action b; or then done; is an edge whose notation is the then alone (its target is the member after it): a body opened on it lands on another member, so SuccessionAdmitsBody refuses it and the editor refuses the inline Route; the tree view labels a FinalNode-targeted edge then done. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
|
FYI: the run on 192355c is green on every job except "Go static and integrity checks", which fails in govulncheck on GO-2026-6859 (net/http in go1.27.3). That is a toolchain issue, not this branch; #2126 moves the toolchain to go1.27.4. Once #2126 is in develop, a single |
|
FYI: #2084 just merged into develop (def12d6) and re-recorded internal/semantic/metamodel/derived_census_baseline.json, so this branch now conflicts with develop on that file. Resolve by merging origin/develop and regenerating the derived census with the repository tooling (tools/census/derived, then its -check) rather than hand-merging the JSON. #2124, which splits that baseline into a header + one-record-per-line TSV, is in flight too; whichever of the two lands second regenerates again. |
… body as the parser reads one — SuccessionAdmitsBody mirrors each kind's body parser, so the editor accepts a Route there and refuses one in a behavior or step body
The predicate answered by a list of action-like kinds that disagreed with the body parsers both ways: a case, analysis, verification, use case, calculation, expression, constraint, predicate or bool body carries ActionBodyItems and reads `then x { … }` clean, yet the editor refused an inline Route there; a behavior or step body is a feature body whose `then` takes no body, yet the predicate admitted one and the editor wrote notation the parser rejects. DefinitionKind/UsageKind.HasActionBodyItems state the kinds once; TestSuccessionAdmitsBodyAgreesWithTheParser drives every definition and usage kind through the parser and fails on the old predicate for the thirteen kinds that disagreed.
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ent, not between it and its function Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ofmt) Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
What and why
A
then x;succession written without a body —then action acquire;,then done;— is theSuccessionAsUsageits action or state owns through aFeatureMembership(SysML.xtextActionTargetSuccession/TargetSuccessionMember), as the pilot exports it and the RDF writer already states it. The symbol builder made a succession an anonymous symbol only when it had a body, so the semantic model, the symbol structure and the query leg'sDescendants(relationships = true)walk listed no membership for a bodiless one — the QVTS cross ledger'sActionUsage/StateUsageownedRelationshipcells disagreed on exactly these members.Every succession edge is now an anonymous
SymbolSuccessionUsage; one with a body still declares its own features in its scope. A state body'sthen x;is one too —EntryTransitionMemberandTargetSuccessionMemberboth end in aSuccessionAsUsage(SysML.xtext:1796, :1703). The tree view, which now meets these symbols, draws them in the successions compartment as written —then off, orfirst running then offwhere the source was named — and names the member athen action bsequences to.The new symbols reach the editor too. An entry transition's
then idle;ends in;by its production (:1796-1801) and has no name, so no Route or Style can be stated about it, inline or in a view; the editor had refused nothing and writtenthen idle { @Route … }, which the parser rejects.ast.SuccessionAdmitsBodystates the grammar once (the parser reads it too; the runtime must not depend on the parser): the editor refuses the inline annotation (FailureNotNamed, "ends in ';' where no body is written"), and the state view leaves the entry edge unsteered, so a draw.io import notes the re-route as it does for other edges no Route steers.The new symbols are subjects of the self-check too.
SysMLValidation::validateConnectorRelatedFeaturesasks a succession for two related features; athen done;found none fordone(its target is theFinalNodemarker the edge absorbs) and athen assign t := …;or an entry transition'sthen idle;reaches a member the symbol model has no element for yet (the statement, theentryaction), so every model with a barethenfailed the rule. NowrelatedFeaturereaches the inherited librarydone/start, and where an end names a member no element stands for it is unanswered —ReflectiveElementssays so, the self-check reports the constraint unevaluated as it does for any underived feature, and a library record keeps the end as a zero position. The structure differential already classed these ends symbol-missing; it, the census and the snapshot reproduce.Known limitation, out of this PR's scope:
first x then y;written with both ends in an action body is read as anInitialNodewith a successor and has noSuccessionAsUsagesymbol yet, where the RDF writer and the pilot state one (action def A { action x; action y; first x then y; }lists two memberships, not three). A state body'sfirst a then b;already does.Specification basis
SysML v2 8.2.2.16.2 (action successions:
thentarget succession members), 7.17.4/8.3.16SuccessionAsUsage; KerML 8.3.4.6Succession. No compliance row moves.How it was verified
internal/semantic/semanticsTestThenSuccessionIsAnOwnedMemberfails on develop:observe'sOwnedRelationshipsreadMembership, ActionUsage, ActionUsagethere,Membership+ threeSuccessionAsUsageand twoActionUsagememberships now.TestSuccessionBodyScoperestated: eachthenhas a scope of its own, only the bodied one has a member.internal/semantic/semanticsTestThenSuccessionRelatedFeatures:then donerelatesacquire done;then assign's and the followingthen done'srelatedFeatureare unanswered;tests/grpcTestGRPCConformance/self_check_holds(athen assign …; then done;action) holds again.internal/syntax/parserTestSuccessionAdmitsBody(action, state after a state: yes; entry transition, definition body: no);internal/check/editTestSetRouteAtOfEntryTransitionIsRefusedfails before the view/edit change with "the edited model does not parse";TestDrawioRoundTrippicks the steerable transition again, as on develop.state-forms-*) re-recorded: each gains its succession rows.Element::ownedRelationshipequal 28619 → 28744,Definition::usagedifferent 27 → 16,Connector::connectorEndequal 372 → 468. The new successions also surface rows of their own that later sub-families address:Connector::relatedFeature/sourceFeature/targetFeaturesymbol-missing 111 → 178 (athensuccession's implied source end) andFeature::isCompositedifferent 229 → 325.SuccessionAsUsageanswers; no value shrank.pilot-apijson-diff -check,make stdlib-snapshotandmake docs-countsreproduce unchanged.make lintgreen; fullgo test ./...with the training, pilot, spec-example, PSSM and library-XMI corpora.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/18ad47adf36f44e9b6824a4472f9678d
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/18ad47adf36f44e9b6824a4472f9678d?variant=devin
Requested by: @NicolasRouquette
🟢 Devin Review found nothing to fix · View findings · Follow Devin's work