Skip to content

Bind Behavior Annex complete states to AADL modes 馃 - #3221

Open
lwrage wants to merge 2 commits into
masterfrom
3178_bind_complete_states
Open

Bind Behavior Annex complete states to AADL modes 馃#3221
lwrage wants to merge 2 commits into
masterfrom
3178_bind_complete_states

Conversation

@lwrage

@lwrage lwrage commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #3178

Cause

The Xtext declarative-to-strict translator copied behavior-state names and qualifiers but never populated bindedMode. As a result, ordinary embedded AADL input could not activate the existing D.3 C4 mode-transition consistency checker. The declarative validator also did not enforce the D.3 all-or-none rule for complete states that represent modes.

Correction

  • Detect mode refinement only for subclauses without an in modes statement, checking both the parsed annex and the enclosing DefaultAnnexSubclause used by embedded parsing.
  • Bind complete states case-insensitively to visible same-named modes from the containing classifier.
  • Enforce the all-or-none complete-state rule before strict semantic checking so invalid declarations receive one focused diagnostic without checker cascades.
  • Refresh affected characterization fixtures and mark G14 implemented in ba/doc/conformance.md.

This matches AS5506/3 Rev. A D.3: same-named complete states may reflect modes only without in modes; once one complete state names a mode, all complete states must do so; and transitions from reflected modes must be consistent with core mode-transition triggers.

Regression coverage

Issue3178Test uses external AADL model projects and ordinary embedded validation. It covers:

  • positive source and destination state bindings;
  • matching and mismatching transition triggers;
  • every expansion of a multiple-source transition;
  • the all-or-none complete-state diagnostic;
  • the in modes boundary; and
  • no test-side mutation of the strict model.

The regression was run before the production change and failed with four failures and one error across its five tests.

Validation

Every Maven invocation used -T5.

  • Focused Issue3178Test reactor: 5 tests, 0 failures, 0 errors.
  • Related Issue3154Test and Issue3182Test reactor: 13 tests, 0 failures, 0 errors.
  • Complete BA suite: 149 tests, 0 failures, 0 errors, 2 skipped.
  • Clean root reactor with -Dtycho.localArtifacts=ignore: all 143 modules succeeded.
  • git diff --check passed.

Generation

No Ecore, GenModel, Xtext grammar, src-gen, xsemantics-gen, or xtend-gen files changed. Eclipse model or grammar generation was intentionally left untouched; the normal Maven lifecycle produced only target-directory build output.

Dependencies and residual risk

This branch is based directly on master at 638ec7c and has no PR dependency.

The authoritative text constrains corresponding transition triggers, so this change binds destination states but does not introduce a destination-equality rule. The separate V05 gaps around component-category restrictions and external conditions remain out of scope and are still recorded in the conformance report.

Model mode-refining Behavior Annex subclauses through ordinary embedded AADL input. Assert same-name source and destination bindings, matching and mismatching triggers, multi-source transitions, the all-or-none rule, and the in-modes boundary without mutating the strict model.
Bind complete Behavior Annex states to visible same-named AADL modes only when the subclause has no in-modes applicability. Enforce the AS5506/3 all-or-none legality rule before strict checking, refresh affected characterization fixtures, and mark G14 implemented in the conformance report.
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.

Bind Behavior Annex complete states to corresponding AADL modes 馃

2 participants