Repository navigation
fix(export,semantics): a state body's then x; and a decision's branch own the Membership naming the member before them and their transitionLinkSource parameter ahead of their guard, as the pilot exports a TargetTransitionUsage - #2245
Conversation
…ip naming the state before it and its link parameter on the native walk, ahead of its succession, as the pilot exports a TargetTransitionUsage Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
… Membership naming their positional source and an in link parameter ahead of their guard in the RDF conversion, as the pilot exports a TargetTransitionUsage; the query leg reads their ids Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ership naming that state in the RDF conversion; a round-trip test covers the state-body, guarded and decision-branch heads Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…erential for the positional transitions' head members; changelog Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…rived census for the positional transition heads 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)".
|
|
Three small requests, none of them blocking:
#2228 (pilot pin to 2026-09.1) re-records the same census files and the api-json differential and is planned to land first, followed by #2242 if both stay open. After that this branch will need one merge of |
…the naming table, so the element ids record a positional source Membership without a conversion The RDF writer derived what a `then x;`, a guarded `transition if g then x;` after a state or a decision's branch sequences from while writing each body's members, so NewElementIDs — which writes nothing — recorded no `_psourcemember` id for a guarded transition's positional source, though the conversion wrote the Membership. The naming table's walk over each body's kept members now records Preceding and Introduced for the writer and the ids alike. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
There was a problem hiding this comment.
Devin Review found 1 finding. Devin automatically fixed it.
Fixed by Devin (1)
- Missing IDs for positional source memberships — Real: NewElementIDs never populated the writer's e.preceding, so a guarded transition after a state recorded no psourcemember id though the conversion wrote the Membership. The derivation (Preceding/Introduced) moved to the naming table's walk over each body's kept members, which the writer and the ids both read; a new test compares NewElementIDs with the written graph over all four positional forms and fails on the reviewed head.
|
Answering the three requests above:
Gate on 8093039: |
|
#2228 merged; develop is now 99e4dcd. Running
When you next update this branch, do one |
…d-memberships-positional Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov> # Conflicts: # docs/project/api-json-differential.md # docs/project/api-json-differential/index.json # internal/semantic/metamodel/derived_census_baseline.json # internal/semantic/metamodel/derived_census_records.tsv
…ial on develop at the 2026-09.1 pilot pin After merging develop (the pilot pin at 2026-09.1 and the census recorded under JDK 21), the positional transition heads change re-records to the same shape: every matched-element and property-family count holds and only unkeyableElements.ours grows (19397 → 19791); the census moves only the elements and implied columns. The record paragraph states the new counts. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…d-memberships-positional Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov> # Conflicts: # docs/project/api-json-differential/examples/action-executor-demo.sysml.json # docs/project/api-json-differential/examples/runtime-showcase/mission-sequence.sysml.json # docs/project/api-json-differential/examples/runtime-showcase/spacecraft-comms.sysml.json # docs/project/api-json-differential/examples/self-model/behavior.sysml.json # docs/project/api-json-differential/examples/self-model/identity.sysml.json # docs/project/api-json-differential/examples/self-model/surfaces.sysml.json # docs/project/api-json-differential/examples/views-demo.sysml.json # docs/project/api-json-differential/index.json # docs/project/api-json-differential/pilot-examples/Arrowhead Framework Example/AHFNorwayTopics.sysml.json # docs/project/api-json-differential/pilot-examples/Interaction Sequencing Examples/ServerSequenceOutsideRealization-3.sysml.json # docs/project/api-json-differential/pilot-examples/Interaction Sequencing Examples/ServerSequenceRealization-3.sysml.json # docs/project/api-json-differential/pilot-examples/Simple Tests/ActionTest.sysml.json # docs/project/api-json-differential/pilot-examples/Simple Tests/DecisionTest.sysml.json # docs/project/api-json-differential/pilot-examples/Simple Tests/StateTest.sysml.json # docs/project/api-json-differential/pilot-validation/05-State-based Behavior/5-State-based Behavior-2.sysml.json # docs/project/api-json-differential/pilot-validation/06-Individual and Snapshots/6-Individual and Snapshots.sysml.json # docs/project/api-json-differential/pilot-validation/10-Analysis and Trades/10c-Fuel Economy Analysis.sysml.json # docs/project/api-json-differential/spec-examples/sysml/7.17.10/2.sysml.json # docs/project/api-json-differential/spec-examples/sysml/7.17.5/3.sysml.json # docs/project/api-json-differential/spec-examples/sysml/7.18.3/5.sysml.json # docs/project/api-json-differential/spec-examples/sysml/7.18.3/6.sysml.json # docs/project/api-json-differential/training/16. Conditional Succession/Conditional Succession Example-2.sysml.json # docs/project/api-json-differential/training/17. Control/Decision Example.sysml.json # docs/project/api-json-differential/training/23. State Definitions/State Definition Example-2.sysml.json # docs/project/api-json-differential/training/24. States/State Actions.sysml.json # docs/project/api-json-differential/training/24. States/State Decomposition-1.sysml.json # docs/project/api-json-differential/training/24. States/State Decomposition-2.sysml.json # docs/project/api-json-differential/training/25. Transitions/Change and Time Triggers.sysml.json # docs/project/api-json-differential/training/25. Transitions/Local Clock Example.sysml.json # docs/project/api-json-differential/training/25. Transitions/Transition Actions.sysml.json # docs/project/api-json-differential/training/31. Constraints/Time Constraints.sysml.json # internal/semantic/metamodel/derived_census_baseline.json # internal/semantic/metamodel/derived_census_records.tsv # internal/semantic/semantics/state_then_transition_test.go # internal/semantic/semantics/transition_memberships_test.go # internal/translate/export/testdata/structure_differential_expected.txt # tests/export/testdata/convert/decision_branches.golden.ttl.sha256 # tests/export/testdata/convert/then_after_members.golden.ttl.sha256
…s precede the transitionLink After merging develop at #2242 (a transition owns its transitionLink last), a state body's `then x;` and a decision's branch own their source Membership and link parameter ahead of the succession and the transitionLink after it, on both legs — the pilot's order. The goldens, structure differential, derived census and api-json differential re-record to develop plus this change's own movement, with six census rows more: the state-body link parameters become Type::ownedFeature, Type::ownedFeatureMembership and Usage::nestedReference carriers (2 in pilot-examples, 4 in pilot-validation) deriving the empty value the pilot has, now that the transition parts cover the SuccessionEdge form. The api-json record states the new counts (unkeyableElements.ours 19987 → 20381). Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
What and why
No tracking issue.
The pilot exports a state body's
then x;written after a state and a decision'sif g then x;/else x;branch as a TargetTransitionUsage that owns, ahead of its guard and succession, theMembershipnaming the member before it (its source) and itstransitionLinkSourcelink parameter (aninReferenceUsagethrough aParameterMembership,isVariable/mayTimeVarytrue) — as atransition first a then balready does on both legs. Neither leg owned them for these forms.internal/translate/export/behavior.go):encodeTargetTransitionandencodeGuardedTargetwrite the sourceMembership(_psourcemember) and the link parameter (_linkparam,_linkparam_om) first, in the pilot's order. A guardedtransition if g then x;written after a state also owns theMembershipnaming that state, the source the conversion already states since fix(export): the succession a transition owns states its relatedFeature, relatedElement, sourceFeature, source, targetFeature and target — the transition's source and target, as the pilot derives them — and a guarded transition written after a state leaves that state #2221.element_ids.go):recordTransitionHeadrecords those ids for a state-bodySuccessionEdgeand a decision'sControlFlowEdgeas it does for aTransitionMember.reflective_transitions.go,reflective_memberships.go): a state body'sthen x;owns the same two members. A decision branch has no native symbol yet, so it is conversion-only for now. A guarded transition after a state also gets no native source yet, because the native succession derivation answers only its target. Both are separate follow-ups.Specification basis
SysML v2 textual notation,
TargetTransitionUsage(SysML.xtext): a transition written withoutfirstleaves the member before it, andTransitionUsage::transitionLinkSourceis its first parameter. No spec-compliance row moves.How it was verified
tests/export/transition_head_positional_test.gocovers the state-body, guarded and decision-branch forms. It checks ownership order, the parameter'sisVariable/mayTimeVary, and notation and graph-only round trips. The updated semantic tests (state_then_transition_test.go,transition_memberships_test.go) expect the pilot's orderMembership:StateUsage ParameterMembership:ReferenceUsage OwningMembership:SuccessionAsUsage FeatureMembership:ReferenceUsage(thetransitionLinklast, since fix(semantics,export): a transition owns its transitionLink on the native walk and in the RDF conversion — a ReferenceUsage through a FeatureMembership after its succession, however the transition is written, as the pilot exports TransitionUsage::transitionLink #2242).decision_branches.golden.ttlwent over 200 KiB with the new members and is now a digest.equalrows grow, from the new memberships and parameters. Nodifferentrow grows. On develop at fix(semantics,export): a transition owns its transitionLink on the native walk and in the RDF conversion — a ReferenceUsage through a FeatureMembership after its succession, however the transition is written, as the pilot exports TransitionUsage::transitionLink #2242 the new members precede the succession and thetransitionLinkfollows it, the pilot's order (Membership ParameterMembership OwningMembership FeatureMembership).elements/impliedgrow on the pilot roots.Membership::memberElementId/OwningMembership::ownedMemberElementIdnot-derived grows by the new minted members: they are in the unminted-id family the census already counts.Type::ownedFeature,Type::ownedFeatureMembershipandUsage::nestedReferencegain the six state-body link parameters as carriers (2 pilot-examples, 4 pilot-validation), deriving the empty value the pilot has — the transition parts cover theSuccessionEdgeform there.Feature::isVariablenot-derived grows by 6: the state-body link parameters, whose owning Type the structuralmayTimeVarypath cannot resolve yet. The semanticFeatureIsVariablealready answers true for them; this is a follow-up.unkeyableElements.oursgrows (19987 → 20381 on develop at fix(semantics,export): a transition owns its transitionLink on the native walk and in the RDF conversion — a ReferenceUsage through a FeatureMembership after its succession, however the transition is written, as the pilot exports TransitionUsage::transitionLink #2242, the 2026-09.1 pilot pin), for the nameless minted members. The record is indocs/project/api-json-differential.md.tests/export,tests/hygiene,make docs-counts,make lint,go vet,go build ./...,gofmt -l ., the changelog check, doc-ids and the comment gate are all clean.make test-short: 135 packages ok;cmd/sysml,internal/exec/smt,tests/codegen,tests/exportandtests/wasmhit the usual 10-minute package timeout and pass alone with-timeout 30m.Checklist
make testandmake lintpass locally (make test-short, the timeout packages alone; lint)changes/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