Validate EMV2 composite state target tokens 馃 - #3255
Merged
Merged
Conversation
Exercise invalid composite target tokens with incoming-propagation and others conditions, and require one diagnostic for a compound subcomponent condition. Cover legal single types, type products, and omitted target tokens in a separate external model.
Run the existing target-token restriction once per composite state instead of once per subcomponent condition. This validates incoming-propagation and others conditions, removes duplicate compound-condition diagnostics, and preserves optional tokens and legal type products.
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 #2858
Composite error states now reject target tokens containing multiple types or a named type set, regardless of the condition used. The check previously ran from each subcomponent-state condition, so incoming-propagation and
othersconditions skipped it, and compound state conditions could report the same error twice.Move the existing check to a
CompositeStatevalidator and remove it from condition validation. Each invalid target now receives one diagnostic. Single error types, type products, and omitted target tokens remain valid.Issue2858Testuses external AADL models to cover the reported omissions,others, diagnostic duplication for a compound condition, and valid targets. Before the fix, the missing-diagnostic and duplicate-diagnostic assertions failed; the valid controls passed.Validation:
clean verifywith-Dtest=Issue2858Test: 3 tests passed.Issue2604Testtests; no failures/errors/skips.clean install: 1,688 tests, 0 failures/errors/skips; all reactor projects passed.git diff --checkpassed.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 and EMV2 suite runs use-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 unmerged PR. The change preserves the existing target-type restriction and condition-type checks; models previously missed by validation will now receive the required error.