Skip to content

Restrict BA property references to unitless or time values 馃 - #3243

Merged
lwrage merged 2 commits into
masterfrom
3191_restrict_property_reference_units
Sep 18, 2026
Merged

lwrage merged 2 commits into
masterfrom
3191_restrict_property_reference_units

Conversation

@lwrage

@lwrage lwrage commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Behavior Annex property references accepted non-time units because validation checked the value representation without enforcing the D.7 unit-category restriction. Check the declared type of referenced properties, constants, and selected record fields, accepting unitless values and AADL_Project::Time_Units and reporting other units at the source reference.

Fixes #3191.

The external issue3191 models exercise integer and real properties, constants, record fields, self and port prefixes, properties without defaults, and a custom units type whose literal is named ms. Before the fix, the negative regression expected nine diagnostics and received none. All three regression tests now pass, including preservation of written time units and symbolic owner/property references. The regression commit precedes the production fix.

Validation on the branch rebased onto current master:

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

All 143 reactor projects passed. Surefire reports contain 1,650 tests across 15 bundles, with zero failures, errors, or skips, including 190 BA tests and all three Issue3191Test cases. git diff --check passes.

There are no dependencies on unmerged PRs. The change adds a diagnostic for previously accepted non-time units. Effective instance-value selection remains part of #3229; translation continues to preserve prefixed references symbolically.

Exercise unitless and time-valued Behavior Annex property references, including preservation of literal units and symbolic prefixed references. Cover disallowed integer, real, constant, record-field, and nonstandard unit types with valid external AADL models.

The negative regression currently fails because all nine disallowed references produce no diagnostics. Include corpus baselines and property-set loading for the new model project.
Check declared property, constant, and selected record-field types in BehaviorAnnexValidator and report non-time units at the source reference. Preserve default literal units and symbolic prefixed references for later instance-value selection, and update the conformance record and diagnostic baseline for issue #3191.

The regression now reports all nine disallowed references. After rebasing onto master with the build-version fixes, the clean root reactor passes all 143 projects and 1,650 tests with no failures, errors, or skips.
@lwrage
lwrage merged commit 7a2396d into master Sep 18, 2026
1 check passed
@lwrage
lwrage deleted the 3191_restrict_property_reference_units branch September 18, 2026 14:24
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.

Restrict Behavior Annex property references to allowed unit types 馃

2 participants