Repository navigation
fix(semantics): classify a transition's effect that is named effect - #2326
Merged
NicolasRouquette merged 1 commit intoNov 16, 2026
Conversation
defineTransitionEffect returned at the existing-name guard before giving a declared effect the kind its declaration writes, so `do action effect : A`, and a declared effect beside any other member named `effect`, stayed a plain ActionUsage where the same effect under another name is a PerformActionUsage (SysML v2.1 §8.2.2.18.3 EffectBehaviorUsage). The kind is now set before the name is considered; the role name is still defined only when it is free. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
NicolasRouquette
approved these changes
Nov 16, 2026
NicolasRouquette
merged commit Nov 16, 2026
6117ddc
into
fix/declared-end-feature-membership-native
0 of 23 checks passed
6 tasks done
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.
What and why
Follow-up to #2274, addressing the review finding "Effects named effect retain old classification".
symbols/builder.godefineTransitionEffectreturned at its existing-name guard (scope.LookupLocal("effect")) before reachingeffectActionKind. A declared effect was therefore left a plainActionUsagewhenever the transition already had a member namedeffect:transition t first a do action effect : A then b;— the effect itself is namedeffect;transition t first a accept effect : Sig do action e then b;— another member (the trigger payload) is namedeffect.The same effect under any other name is a
PerformActionUsage. The kind is now set before the name is considered; the role nameeffectis still defined only when it is free, and a statement effect (do send …) still builds no role symbol when the name is taken, so no second symbol is created.Base branch. #2274 was merged into
fix/declared-end-feature-membership-native(the head of #2268), not intodevelop, so the code this corrects is not ondevelopyet. This PR is based on that branch so its diff is only the fix. Merge order: this PR intofix/declared-end-feature-membership-native, then that stack intodevelop; or retarget this PR todeveloponce the stack has landed.Specification basis
SysML v2.1 §8.2.2.18.3:⚠️ Approximate for the residuals its limitation text already names.
EffectBehaviorUsage : ActionUsage = … | TransitionPerformActionUsage | …, withTransitionPerformActionUsage : PerformActionUsage = PerformActionUsageDeclaration ( '{' ActionBodyItem* '}' )?. The metaclass follows from the production, not from the name the declaration gives the usage. No compliance row moves: the row "A transition's trigger, guard and effect are its owned features throughTransitionFeatureMemberships" staysHow it was verified
Regression cases, failing on the base branch (
… is a actionUsage, want performActionUsage) and passing here:internal/semantic/symbols/action_node_kind_test.goTestBuildClassifiesTransitionEffectsByTheirDeclaration— casest7(effect namedeffect) andt8(trigger payload namedeffect).internal/semantic/semantics/reflective_transition_ends_test.goTestTransitionReflectsItsEffectMetaclassAndEnds— casest9andt10, the same two shapes through the reflectiveeffectActionmetaclass, withsourceandtarget.Run locally on this head:
gofmt -l .(empty),go build ./...,go vet ./...,go test ./internal/semantic/...,go test ./tests/hygiene ./tests/export,make changelog-check— all passing. No export golden or baseline moved. The fullgo test ./...,make lint, the corpus sweep and the api-json differential were not re-run locally; CI covers them.No new changelog fragment: the behaviour is the one
changes/unreleased/transition-effect-perform-action.fixed.md(unreleased, from #2274) already describes.Checklist
make testandmake lintpass locally (not run in full locally; see above)Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/49d0e2e74ead418995773a1f6a0403a1
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/49d0e2e74ead418995773a1f6a0403a1?variant=devin
Requested by: @NicolasRouquette
🟢 Devin Review found nothing to fix · View findings