Skip to content

Validate external condition triggers and preserve subcomponent context 馃 - #3239

Merged
lwrage merged 4 commits into
masterfrom
3232_validate_external_condition_triggers
Sep 17, 2026
Merged

lwrage merged 4 commits into
masterfrom
3232_validate_external_condition_triggers

Conversation

@lwrage

@lwrage lwrage commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #3232.

External conditions silently dropped triggers that were not event or event data ports, accepted incorrect directions, and lost the subcomponent qualifier of references such as first.p. This change reports invalid trigger kinds, directions, unresolved names, and unsupported paths. Strict checkers are gated when translation cannot represent a trigger; independent category diagnostics remain available for a fully represented port with the wrong direction.

As an intentional extension to D.3's incoming-port wording, outgoing event and event data ports of direct subcomponents are accepted. The optional ActualPortHolder.context records the subcomponent, while the existing ordered groupHolders list retains the feature-group path. Mode-refinement comparisons include both, distinguishing first.p from second.p when the subcomponents share a classifier. Model and edit code was regenerated manually in Eclipse; the BA grammar is unchanged.

Issue3232Test uses the separate models/issue3232 AADL project to check incoming and bidirectional owner ports, outgoing and bidirectional subcomponent ports, nested conditions, invalid names and directions, feature groups, thread-group contexts, XMI serialization, and matching versus mismatching mode triggers. The initial four tests reproduced three failures before the fix. The completed six-test regression and the full 183-test BA suite pass. The existing subprogram test now asserts both its category diagnostic and the added direction diagnostic.

Validation used offline Maven with -T5. The clean root command was:

mvn -o -T5 -s releng/osate.releng/settings.xml -Plocal \
  -Dtycho.localArtifacts=ignore -Dpr.build=true -Dsign=false \
  -Dspotbugs=false -Dcodecoverage=false -Djavadoc=false \
  -DfailIfNoTests=false clean install

Result: BUILD SUCCESS, 1,643 tests across 15 test bundles, with 0 failures, 0 errors, and 0 skips. The earlier root verify with -Dxtext.generator.skip=true also passed 1,643 tests. git diff --check passes.

Dependencies: none; targets master. The regression commit precedes the production fix. The issue comment has been updated to include outgoing subcomponent triggers.

Residual risk: consumers of the strict model must include the new optional context when identifying a subcomponent trigger. Serialization and mode-refinement regressions cover that distinction; unqualified ports retain a null context.

sei-lwrage and others added 4 commits September 17, 2026 11:45
Exercise external-condition triggers through standalone AADL model projects. Cover incoming owner ports, outgoing subcomponent ports, nested expressions, invalid kinds and directions, unresolved names, and mode refinement with two subcomponents of the same classifier.

The baseline run executes four tests: the legal owner-port case passes, while invalid-trigger diagnostics, retained subcomponent context, and context-sensitive mode refinement fail for the reported defects without unrelated model errors.
Diagnose invalid trigger kinds, unresolved names, unsupported paths, and incorrect port directions. Keep independent strict-model diagnostics for wrong-direction ports that are still fully represented.

Accept outgoing event and event data ports of direct subcomponents and retain their context in the strict metamodel, generated model and edit code, translation, and mode-refinement comparisons. Preserve feature-group paths and distinguish subcomponents that share a port declaration.

Extend the regression and corpus expectations to cover context serialization and grouped ports, and document the supported extension. The complete root-reactor verify passed with local Tycho artifacts ignored and Xtext generation disabled: 1,643 tests, including 183 BA tests, with no failures or skips.
Declare the terminal running states in the three valid issue #3232 models as final. The blocking-execution-state checker merged from master correctly rejects these states when they have no outgoing transition, causing PR #3239's integration tests to fail.

Update the corresponding position and unparse expectations. The complete Behavior Annex suite passes 186 tests, and the clean offline root reactor passes 1,646 tests with no failures, errors, or skips.
@lwrage
lwrage merged commit c3d57b3 into master Sep 17, 2026
1 check passed
@lwrage
lwrage deleted the 3232_validate_external_condition_triggers branch September 17, 2026 19:30
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.

External condition triggers that are not incoming event ports are silently dropped or accepted 馃

2 participants