Skip to content

Enforce Behavior Annex variable initialization rules 🤖 #3190

Description

@lwrage

Summary

BA validation does not enforce the AS5506/3 Rev. A D.7 initialization rules: values read on the right-hand side must be initialized, declaration initialization overrides Data Modeling Initial_Value, and declaration initializers must themselves be valid for the variable type.

The translator copies declaration initializers, but checkBehaviorVariable validates only classifier and property resolution.

Reproduction

This issue comes from the source audit in ba/doc/conformance.md; no additional runtime reproduction was performed. Closed issue #2190 established syntax/model support for variable property associations but did not establish definite-initialization semantics.

Expected behavior

Validate initializer types and definite initialization before every read, including branch-dependent assignments, and apply the standard precedence between declaration and Data Modeling initial values.

Relevant code

  • ba/org.osate.ba/src/org/osate/ba/analyzers/AadlBaTypeChecker.javacheckBehaviorVariable, assignment, and expression checks.
  • ba/org.osate.xtext.aadl2.ba/src/org/osate/xtext/aadl2/ba/translation/DeclarativeToStrictTranslator.java — variable initialization translation.
  • Related historical issue: Property associations for behavior variables are not supported #2190.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions