Support Behavior Annex short-circuit logical operators 馃 - #3218
Merged
Conversation
Model both short-circuit logical operators with Boolean and invalid integer operands. Assert that the declarative and strict representations preserve each spelling, that copied annexes serialize and reparse without degrading the operators, and that the operators retain Boolean-only type checking. Activate the existing conformance expectation while preserving pre-fix corpus baselines.
Parse and then and or else as distinct logical operators while canonicalizing hidden text between each keyword in the declarative value. Preserve both forms as dedicated strict-model enum literals during translation and keep the existing Boolean operand validation behavior. Regenerate the runtime and content-assist grammars, refresh the affected characterization goldens, and mark the conformance expectation for issue #3169 active.
lwrage
force-pushed
the
3169_support_short_circuit_operators
branch
from
September 11, 2026 22:38
0da367a to
9b06d0d
Compare
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 #3169
Cause and correction
The Behavior Annex expression grammar accepted only the single-word logical operators
and,or, andxor. Consequently,and thenandor elsefailed during parsing and could not be represented distinctly in either the declarative or strict model.This change:
and thenandor elsethrough datatype rules that produce the canonical declarative values"and then"and"or else", regardless of hidden whitespace or comments between the keywords;AndThenandOrElseliterals to the strict-modelLogicalOperatorenum;Regression coverage
Issue3169Testuses external AADL model fixtures and verifies:andoror; andBefore the production change, the regression failed because
thenandelsewere rejected by the parser.Validation
Focused regression, 3 tests passed:
Complete BA reactor, 13 modules successful; 128 BA tests passed with 4 tracked skips, and 15 BA Xtext tests passed:
Clean root reactor, all 143 modules successful:
Dependencies and residual risk
This branch is based directly on the current
origin/masterand has no PR dependencies.Adding the
thenkeyword shifts generated ANTLR token identifiers, so the generated parser diff is substantial. The explicit MWE2 generation, complete BA reactor, and clean root reactor all succeeded. Downstream code that switches exhaustively overLogicalOperatormay need to distinguish the two new literals; the complete reactor found no uncompilable consumers.