Validate repair event initiator types 馃 - #3249
Merged
Merged
Conversation
Exercise repair and recover event initiators through external AADL models. Require one diagnostic for each invalid mode or subcomponent reference, and accept ports, internal events, mode transitions, and absent when clauses. Before the fix, repair events report no initiator errors and recover events report each error twice. The valid model passes validation without unrelated issues.
Register the repair-event check for RepairEvent instead of RecoverEvent and share trigger type validation between both event kinds. This rejects invalid repair initiators and eliminates duplicate recover diagnostics while preserving the accepted initiator types. Fixes #2807. The three focused regression tests and all 296 EMV2 tests pass.
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.
Fixes #2807.
Repair-event
whenclauses currently accept invalid initiators, while recover events report each invalid initiator twice. Both Xtext checks were registered forRecoverEvent. Register the repair check forRepairEventand share the existing initiator type validation, retaining ports, internal events, and mode transitions as accepted types.The first commit adds
Issue2807Testand external AADL fixtures; the second fixes the validator. The regression verifies rejection of mode and subcomponent references, exactly one diagnostic per invalid initiator, and acceptance of valid initiators and absentwhenclauses. Before the fix, two tests failed for the reported behavior and the valid-model test passed.Validation
Focused regression: 3 tests passed. Full EMV2 bundle: 296 tests passed. Both used:
For the full EMV2 bundle run, omitted
-Dtestand-DfailIfNoTests.Clean root reactor: all 143 projects succeeded; Surefire reports contain 1,671 tests with no failures, errors, or skips.
git diff --checkpassed and the worktree is clean.Dependencies and risk
No dependencies on unmerged PRs; targets
master. The change is limited to event-initiator validation. Existing models with invalid repair-event initiators will now receive the intended errors.