Skip to content

Support all Behavior Annex external-condition logical expressions 馃 - #3219

Merged
lwrage merged 2 commits into
masterfrom
3166_support_external_condition_expressions
Sep 12, 2026
Merged

Support all Behavior Annex external-condition logical expressions 馃#3219
lwrage merged 2 commits into
masterfrom
3166_support_external_condition_expressions

Conversation

@lwrage

@lwrage lwrage commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #3166

Behavior Annex external conditions now accept and preserve xor, and then, or else, and recursively parenthesized event-trigger expressions.

Cause and correction

ModeSwitchCondition previously represented only OR-separated conjunctions of reference leaves. It therefore could not parse grouping or retain the complete D.7 logical-operator set.

The grammar now stores the operator at both precedence levels and introduces recursive mode-switch triggers. The strict BA model mirrors that structure, and DeclarativeToStrictTranslator preserves each operator and nested group while resolving event and event-data ports. EMF and Xtext artifacts were regenerated, and the #3166 conformance expectations and characterization goldens are updated.

Regression coverage

Issue3166Test models one external condition combining ordinary, exclusive, and short-circuit operators with a parenthesized group. It verifies:

  • exact declarative expression structure;
  • exact strict-model structure and operator values;
  • event and event-data port resolution;
  • unparse and reparse preservation.

The existing ExternalConditionXor.aadl and ExternalConditionGrouping.aadl conformance expectations are enabled.

Validation

All Maven commands used -T5.

  • Focused Issue3166Test: 2 tests, 0 failures, 0 errors, 0 skipped.
  • BehaviorAnnexConformanceTest: 12 tests, 0 failures, 0 errors, 2 existing tracked skips.
  • Full org.osate.ba.tests suite: 133 tests, 0 failures, 0 errors, 2 existing tracked skips.
  • Clean root reactor with -Dtycho.localArtifacts=ignore: all 143 modules succeeded in 2:15.

Dependencies and residual risk

No dependent PRs; this branch is based directly on origin/master at 7fb3251c3a. The broad generated-parser diff is the output of the manual Xtext generation step. Downstream BA, Xtext integration, graphical editor, and complete root-reactor validation passed.

Model an external condition that combines ordinary, exclusive, and short-circuit logical operators with a parenthesized event-trigger group. Assert exact declarative and strict expression structure, event and event-data port resolution, and serializer round-trip preservation.
Accept xor, short-circuit operators, and recursive parenthesized groups in mode-switch conditions. Preserve operator choices and nested group structure in the declarative and strict models, regenerate the EMF and Xtext artifacts, and update the conformance characterization baselines.
@lwrage
lwrage merged commit de416ea into master Sep 12, 2026
1 check passed
@lwrage
lwrage deleted the 3166_support_external_condition_expressions branch September 12, 2026 14:53
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.

Support all Behavior Annex external-condition logical expressions 馃

2 participants