Skip to content

Validate EMV2 transition branch target tokens 馃 - #3252

Merged
lwrage merged 2 commits into
masterfrom
2814_validate_transition_branch_tokens
Sep 18, 2026
Merged

lwrage merged 2 commits into
masterfrom
2814_validate_transition_branch_tokens

Conversation

@lwrage

@lwrage lwrage commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #2814

Transition branches now report an error when a target token lists multiple error types or references a type set. The branch validator previously checked only target-state containment and omitted the single-token checks already applied to ordinary transitions.

Issue2814Test reproduces both omissions through an external AADL model and checks the diagnostics on the two branches. A separate valid model covers a single type, a type product, an omitted token, and a steady-state branch. The regression failed before the fix because the expected diagnostic was absent; both tests pass afterward.

Validation:

  • Focused offline Tycho clean verify for the EMV2 runtime, tests, and feature with -Dtest=Issue2814Test: 2 tests passed.
  • Clean offline root-reactor clean install: 1677 tests, 0 failures, 0 errors, 0 skipped; all reactor projects passed.
  • git diff --check passed.

Build flags: mvn -o -T5 -s releng/osate.releng/settings.xml -Plocal -Dpr.build=true -Dsign=false -Dspotbugs=false -Dcodecoverage=false -Djavadoc=false -DfailIfNoTests=false. The focused run uses -pl :org.osate.xtext.aadl2.errormodel,:org.osate.aadl2.errormodel.tests,:org.osate.xtext.aadl2.errormodel.feature -Dtycho.localArtifacts=default; the root run uses -Dtycho.localArtifacts=ignore clean install.

No dependency on another PR. The change is limited to the two missing branch checks; existing type-containment behavior is preserved.

Exercise component transition branches with multiple target types and a named type set, asserting the missing single-type diagnostics. Cover valid single types, a type product, omitted tokens, and steady-state branches in a separate model.
Apply the existing single-target-token checks to EMV2 transition branches. Reject multiple target types and named type sets while retaining legal type products and the existing target-state containment checks.
@lwrage
lwrage merged commit 02fde6b into master Sep 18, 2026
1 check passed
@lwrage
lwrage deleted the 2814_validate_transition_branch_tokens branch September 18, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing validation for TransitionBranch.targetToken

2 participants