Skip to content

Reject duplicate Behavior Annex completion-relative timeouts 馃 - #3276

Merged
lwrage merged 2 commits into
masterfrom
3266_reject_duplicate_completion_timeouts
Sep 20, 2026
Merged

lwrage merged 2 commits into
masterfrom
3266_reject_duplicate_completion_timeouts

Conversation

@lwrage

@lwrage lwrage commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • reject a second outgoing completion-relative timeout from the same complete state
  • check every source produced by a multi-source transition expansion without repeating declaration-level validation
  • add external AADL regressions for separate duplicates, overlapping multi-source declarations, and a legal distinct-source control

Fixes #3266

Cause and correction

D_4_L2_Check queried a Map<BehaviorState, BehaviorTransition> with the entire source-state list, although entries were stored under individual states. Separately written duplicate timeouts therefore never matched. Multi-source conditions are shared across strict transition expansions and intentionally validated once, which also skipped uniqueness checks for non-first sources.

The checker now records completion-relative timeout ownership for each expanded complete source state before shared-condition deduplication. Period/value and other declaration-level checks still run once per written condition.

Regression coverage

Issue3266Test validates three external model fixtures:

  • two separate timeout transitions from one state report exactly one D.4(L2) error on the second timeout
  • overlapping multi-source declarations report exactly one error at their shared state
  • distinct complete states may each have one timeout without diagnostics

The fixtures include the standard diagnostics, resolved-model, source-position, and unparse characterization goldens. Existing covering-syntax goldens now record the two newly detected duplicate timeout transitions.

Validation

  • focused Issue3266Test: 3 tests, 0 failures, 0 errors
  • CoveringSemanticTest: 11 tests, 0 failures, 0 errors
  • Issue3184Test: 5 tests, 0 failures, 0 errors
  • complete org.osate.ba.tests bundle: 228 tests, 0 failures, 0 errors
  • clean root reactor with -Dtycho.localArtifacts=ignore: 143 modules, build success

Dependencies and residual risk

This PR is based directly on current master after #3274 and #3275 and has no PR dependency. The change is confined to BA legality checking and its regression assets; grammar, metamodel, generated sources, and serialization logic are unchanged.

Model separate and overlapping multi-source completion-relative timeout declarations, and assert that the duplicate timeout is diagnosed. Include a clean distinct-source control to ensure each complete state may still own one timeout.
Track timeout ownership by each complete source state so a second outgoing completion-relative timeout is diagnosed. Run the uniqueness check for every strict transition expansion while preserving once-per-declaration checks for shared multi-source conditions.
@lwrage
lwrage added this pull request to stack #3278 September 20, 2026 20:09
@lwrage
lwrage merged commit 6f244ac into master Sep 20, 2026
1 check passed
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.

Reject multiple Behavior Annex completion-relative timeouts from one state 馃

2 participants