Skip to content

Validate Behavior Annex communication and call signatures 馃 - #3247

Merged
lwrage merged 2 commits into
masterfrom
3181_validate_communication_call_signatures
Sep 18, 2026
Merged

lwrage merged 2 commits into
masterfrom
3181_validate_communication_call_signatures

Conversation

@lwrage

@lwrage lwrage commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

BA communication actions previously accepted invalid targets and directions, silently discarded extra send values, and did not validate subprogram signatures. This change diagnoses those errors and preserves writable record-field and port actuals during translation.

Fixes #3181 for structural communication and signature validation. Property-dependent type conformance remains deferred to #3199 and the instance-model pass.

Changes

  • Validate send, dequeue, freeze, and lock/unlock categories and directions, including inverse feature groups. Reject extra send values and data payloads on event-only ports.
  • Include every formal feature in declaration order, preserving inherited positions and refinements. Validate actual count, readable input expressions, writable output targets, and data-access/port categories across classifier, implementation, access, subcomponent, and prototype calls.
  • Route data actuals through the existing type checker and retain output record fields and ports as strict-model targets. Preserve calls through data objects and existing inverse-group locking behavior.
  • Add Issue3181Test and external fixtures under models/issue3181/, update affected characterization goldens, and document the remaining boundaries.

Validation

The initial seven regressions failed before the fix: invalid models produced no diagnostics, and a valid output record field was translated as a value expression. The final eight issue tests pass, including additional inheritance and prototype coverage.

The BA suite passed all 207 tests. The clean root reactor below passed all 143 projects and 1,668 tests across 15 test bundles, with zero failures, errors, or skips; characterization goldens were compared without regeneration.

mvn -o -T5 -s releng/osate.releng/settings.xml -Plocal \
  -pl :org.osate.ba,:org.osate.xtext.aadl2.ba,:org.osate.ba.tests,:org.osate.ba.feature \
  -Dtycho.localArtifacts=default -Dpr.build=true -Dsign=false \
  -Dspotbugs=false -Dcodecoverage=false -Djavadoc=false \
  -Dxtext.generator.skip=true -Dtest=Issue3181Test -DfailIfNoTests=false verify

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

git diff --check passed. The regression commit precedes the production-fix commit.

Dependencies and remaining boundaries

Targets master; no unmerged PR dependencies or merge-order requirements.

The production conformance comparison remains disabled under #3199. Effective access rights and property-derived representation, array, and range checks require instance validation. Unconstrained, unbound subprogram prototypes have no signature to check; formal categories that the strict model cannot represent receive an explicit unsupported-feature diagnostic. Invalid communication shapes gate subsequent strict checks, so the invalid-call characterization fixture now reports call errors before downstream operator diagnostics.

Exercise communication target categories and directions, send payload counts, and complete subprogram signatures through embedded BA validation. Check writable actuals and preserve record-field and port targets in otherwise valid calls.

The seven regressions fail on the current implementation: invalid actions and calls receive no diagnostics, and a valid out record-field argument is translated as a value expression. Keep property-dependent conformance separate under issue #3199.
Reject invalid communication targets, extra send values, and mismatched call arity or actual directions and categories. Include every formal feature in source order, preserving inherited positions and refinements across supported callable forms.

Retain writable record-field and port actuals as targets, and route call data actuals through the existing type checker. Property-dependent conformance and access rights remain deferred to issue #3199 and instance validation. Refresh the affected characterization goldens and document these boundaries.

Validation: all eight issue regressions and 207 BA tests pass. The clean offline root reactor passes 143 projects and 1,668 tests with no failures, errors, or skips.
@lwrage
lwrage merged commit 1fb89fd into master Sep 18, 2026
1 check passed
@lwrage
lwrage deleted the 3181_validate_communication_call_signatures branch September 18, 2026 16: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.

Validate Behavior Annex communication actions and subprogram call signatures 馃

2 participants