Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ba/doc/conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ Signatures include every feature, including ports, in source declaration order.

**Addressed by [#3199](https://github.com/osate/osate2/issues/3199):** `AdaLikeDataTypeChecker.conformsTo` now checks assignment, send, dequeue, call-parameter, iterator, and binary-operand type compatibility. Declaration initializers use the same relation. `Issue3199Test` exercises these paths through external AADL models and the registered BA validator; its original four-transition reproduction reports one error per transition.

**Standard and tool policy:** D.6 explicitly requires assignment types and subprogram signatures to match; communication actions include implicit assignments through the D.5 service equivalences. D.5 itself has no legality rules. D.7 restricts operator applicability and derives the expression language from Ada95. Annex D does not define classifier substitutability. OSATE therefore uses case-insensitive qualified-name equality for classifier-typed operands, including classifiers with unknown representation. This deliberately rejects extension and type/implementation pairs. Integer literals match integer representations, while universal real literals match floating and fixed-point representations; classifier-typed numerics do not widen implicitly.
**Standard and tool policy:** D.6 explicitly requires assignment types and subprogram signatures to match; communication actions include implicit assignments through the D.5 service equivalences. D.5 itself has no legality rules. D.7 restricts operator applicability and derives the expression language from Ada95. Annex D does not define classifier substitutability. The follow-up [#3261](https://github.com/osate/osate2/issues/3261) accepts classifier-typed operands with the same case-insensitive qualified name, or with an ancestor/descendant extension relationship and the same data representation. Extension compatibility works in both directions and includes transitive type and implementation extensions. Sibling classifiers and type/implementation realization pairs remain distinct. Two related classifiers with unspecified representation are compatible, but an extension that changes an unspecified representation to a known one is not treated as equivalent. Integer literals match integer representations, while universal real literals match floating and fixed-point representations; classifier-typed numerics do not widen implicitly.

Array rank must agree when known, and each extent is compared only when both extents are statically known. Symbolic extents remain unknown. Expression results preserve their selected classifier, representation, and dimensions. Untyped features and unresolved classifier references do not establish a type mismatch; linking diagnostics retain responsibility for unresolved names.
Array rank must agree when known, and each extent is compared only when both extents are statically known. Symbolic extents remain unknown. Expression results preserve their selected classifier, representation, and dimensions. A mixed base/extension expression selects the base classifier independently of operand order. `Issue3261Test` covers bidirectional assignments, arithmetic and logical operands (including integer, real, and Boolean literals on either side), comparisons, port sends/dequeues, internal sends, call parameters, arrays, and iteration, while preserving representation and array-shape restrictions. Untyped features and unresolved classifier references do not establish a type mismatch; linking diagnostics retain responsibility for unresolved names.

**Corpus triage:** the grammar characterization fixture now consistently uses its custom integer classifier. Standard example 7 uses Boolean status literals and matching data implementation classifiers at its calls; comments record the corrections to the published example and the nominal type policy. The existing internal-port negative fixture now asserts its two formerly suppressed type errors. Type errors no longer suppress initialization and legality checking; unresolved holders, variable classifiers, and property associations still stop strict-model checks. The nested-array regression from #3226 remains accepted: an iterator retains its own declared classifier, and the array extent is read from the array classifier rather than its element classifier.

Expand Down
2 changes: 1 addition & 1 deletion ba/doc/properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This review covers the 19 issues carrying the `ba` label that were open on Septe
| [#2669 — action blocks not fully typechecked](https://github.com/osate/osate2/issues/2669) | The reproduction determines the port's enum type from `Data_Representation` and `Enumerators`, both property values that may be overridden on a feature instance. |
| [#3173 — omitted loop classifier](https://github.com/osate/osate2/issues/3173) | Grammar acceptance and integer-range inference are declarative. Inference from ports or arrays uses effective `Data_Representation`, `Base_Type`, and `Dimension` values and resolved prototype actuals, so that portion is instance-specific. |
| [#3181 — communication and call signatures](https://github.com/osate/osate2/issues/3181) | Target category, parameter count and order, and direction are structural. Actual/formal type compatibility becomes instance-specific wherever it uses Data Model representation, array, range, or feature properties. |
| [#3199 — declared type conformance](https://github.com/osate/osate2/issues/3199) | The source fix checks classifier identity, literal compatibility, and statically declared Data Model properties. It does not establish conformance after contained overrides or effective prototype bindings. Those checks, including instance-specific operator applicability, arrays, ranges, and property-reference values, remain [#3229](https://github.com/osate/osate2/issues/3229). |
| [#3199 — declared type conformance](https://github.com/osate/osate2/issues/3199) | The source fix checks classifier identity and [extension compatibility (#3261)](https://github.com/osate/osate2/issues/3261), literal compatibility, and statically declared Data Model properties. It does not establish conformance after contained overrides or effective prototype bindings. Those checks, including instance-specific operator applicability, arrays, ranges, and property-reference values, remain [#3229](https://github.com/osate/osate2/issues/3229). |

## Issues not inherently affected

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
error | semantic | 64 | 65 | 6 | type error for 'assignment', 'ClassifierIdentity::first_type' expected, found 'ClassifierIdentity::second_type'.
error | semantic | 65 | 58 | 5 | type error for 'assignment', 'ClassifierIdentity::first_type' expected, found 'ClassifierIdentity::child_type'.
error | semantic | 66 | 77 | 14 | type error for 'assignment', 'ClassifierIdentity::first_type' expected, found 'ClassifierIdentity::first_type.impl'.
error | semantic | 68 | 52 | 20 | type error for 'assignment', 'ClassifierIdentity::first_boolean' expected, found 'ClassifierIdentity::second_boolean'.
error | semantic | 69 | 53 | 20 | type error for 'assignment', 'ClassifierIdentity::first_boolean' expected, found 'ClassifierIdentity::second_boolean'.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
error | semantic | 100 | 61 | 17 | type error for 'assignment', 'IncompatibleExtensions::child_integer' expected, found 'IncompatibleExtensions::sibling_integer'.
error | semantic | 101 | 60 | 16 | type error for 'assignment', 'IncompatibleExtensions::real_type' expected, found 'IncompatibleExtensions::changed_representation'.
error | semantic | 102 | 61 | 16 | type error for 'assignment', 'IncompatibleExtensions::real_type' expected, found 'IncompatibleExtensions::changed_representation'.
error | semantic | 103 | 63 | 21 | type error for 'assignment', 'IncompatibleExtensions::unrelated_boolean' expected, found 'IncompatibleExtensions::child_boolean'.
error | semantic | 104 | 64 | 21 | type error for 'assignment', 'IncompatibleExtensions::unrelated_boolean' expected, found 'IncompatibleExtensions::child_boolean'.
error | semantic | 90 | 48 | 13 | type error for 'assignment', 'IncompatibleExtensions::child_integer' expected, found 'IncompatibleExtensions::sibling_integer'.
error | semantic | 91 | 55 | 27 | Invalid operand types for operator "+": left operand has type IncompatibleExtensions::child_integer, right operand has type IncompatibleExtensions::sibling_integer
error | semantic | 92 | 52 | 10 | type error for 'assignment', 'IncompatibleExtensions::integer_type' expected, found 'IncompatibleExtensions::changed_representation'.
error | semantic | 93 | 53 | 10 | type error for 'assignment', 'IncompatibleExtensions::changed_representation' expected, found 'IncompatibleExtensions::integer_type'.
error | semantic | 94 | 55 | 23 | Invalid operand types for operator "+": left operand has type IncompatibleExtensions::integer_type, right operand has type IncompatibleExtensions::changed_representation
error | semantic | 95 | 55 | 13 | type error for 'assignment', 'IncompatibleExtensions::opaque' expected, found 'IncompatibleExtensions::numeric_opaque'.
error | semantic | 96 | 76 | 12 | type error for 'assignment', 'IncompatibleExtensions::numeric_opaque' expected, found 'IncompatibleExtensions::opaque'.
error | semantic | 97 | 66 | 12 | type error for 'assignment', 'IncompatibleExtensions::integer_type[2]' expected, found 'IncompatibleExtensions::child_integer[3]'.
error | semantic | 98 | 58 | 6 | type error for 'assignment', 'IncompatibleExtensions::integer_type[2]' expected, found 'IncompatibleExtensions::child_integer[2][2]'.
error | semantic | 99 | 60 | 17 | type error for 'assignment', 'IncompatibleExtensions::child_integer' expected, found 'IncompatibleExtensions::sibling_integer'.
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
annex[0] owner=IncompatibleExtensions::host.impl
(ArrayDimension, <null>, 3083, 3)
(ArrayDimension, <null>, 3117, 3)
(ArrayDimension, <null>, 3128, 3)
(ArrayDimension, <null>, 3131, 3)
(AssignmentAction, <null>, 3252, 28)
(AssignmentAction, <null>, 3324, 41)
(AssignmentAction, <null>, 3406, 24)
(AssignmentAction, <null>, 3472, 24)
(AssignmentAction, <null>, 3540, 37)
(AssignmentAction, <null>, 3619, 29)
(AssignmentAction, <null>, 3689, 19)
(AssignmentAction, <null>, 3710, 29)
(AssignmentAction, <null>, 3773, 19)
(AssignmentAction, <null>, 3794, 26)
(AssignmentAction, <null>, 3852, 13)
(AssignmentAction, <null>, 3867, 20)
(AssignmentAction, <null>, 3935, 32)
(AssignmentAction, <null>, 4016, 32)
(AssignmentAction, <null>, 4093, 34)
(AssignmentAction, <null>, 4173, 34)
(AssignmentAction, <null>, 4255, 39)
(AssignmentAction, <null>, 4343, 39)
(BehaviorActionBlock, <null>, 3250, 32)
(BehaviorActionBlock, <null>, 3322, 45)
(BehaviorActionBlock, <null>, 3404, 28)
(BehaviorActionBlock, <null>, 3470, 28)
(BehaviorActionBlock, <null>, 3538, 41)
(BehaviorActionBlock, <null>, 3617, 33)
(BehaviorActionBlock, <null>, 3687, 54)
(BehaviorActionBlock, <null>, 3771, 51)
(BehaviorActionBlock, <null>, 3850, 39)
(BehaviorActionBlock, <null>, 3933, 36)
(BehaviorActionBlock, <null>, 4014, 36)
(BehaviorActionBlock, <null>, 4091, 38)
(BehaviorActionBlock, <null>, 4171, 38)
(BehaviorActionBlock, <null>, 4253, 43)
(BehaviorActionBlock, <null>, 4341, 43)
(BehaviorActionSequence, <null>, 3689, 50)
(BehaviorActionSequence, <null>, 3773, 47)
(BehaviorActionSequence, <null>, 3852, 35)
(BehaviorAnnex, behavior_specification, 2717, 1668)
(BehaviorBooleanLiteral, <null>, 3018, 4)
(BehaviorBooleanLiteral, <null>, 3064, 5)
(BehaviorBooleanLiteral, <null>, 4273, 4)
(BehaviorBooleanLiteral, <null>, 4377, 5)
(BehaviorIntegerLiteral, <null>, 2758, 1)
(BehaviorIntegerLiteral, <null>, 2794, 1)
(BehaviorIntegerLiteral, <null>, 2834, 1)
(BehaviorIntegerLiteral, <null>, 2944, 1)
(BehaviorIntegerLiteral, <null>, 3084, 1)
(BehaviorIntegerLiteral, <null>, 3118, 1)
(BehaviorIntegerLiteral, <null>, 3129, 1)
(BehaviorIntegerLiteral, <null>, 3132, 1)
(BehaviorIntegerLiteral, <null>, 3950, 1)
(BehaviorIntegerLiteral, <null>, 4047, 1)
(BehaviorRealLiteral, <null>, 2878, 3)
(BehaviorRealLiteral, <null>, 2979, 3)
(BehaviorRealLiteral, <null>, 4111, 3)
(BehaviorRealLiteral, <null>, 4204, 3)
(BehaviorState, done, 3187, 4)
(BehaviorState, start, 3162, 5)
(BehaviorStateGroup, <null>, 3162, 22)
(BehaviorStateGroup, <null>, 3187, 19)
(BehaviorTransition, boolean_literal_left, 4213, 84)
(BehaviorTransition, boolean_literal_right, 4300, 85)
(BehaviorTransition, changed_child, 3371, 62)
(BehaviorTransition, changed_operands, 3502, 78)
(BehaviorTransition, changed_parent, 3436, 63)
(BehaviorTransition, extent, 3745, 78)
(BehaviorTransition, integer_literal_left, 3893, 77)
(BehaviorTransition, integer_literal_right, 3973, 78)
(BehaviorTransition, rank, 3826, 64)
(BehaviorTransition, real_literal_left, 4054, 76)
(BehaviorTransition, real_literal_right, 4133, 77)
(BehaviorTransition, sibling_operands, 3286, 82)
(BehaviorTransition, siblings, 3222, 61)
(BehaviorTransition, unknown_child, 3654, 88)
(BehaviorTransition, unknown_parent, 3583, 68)
(BehaviorVariable, base_array, 3073, 13)
(BehaviorVariable, base_value, 2729, 10)
(BehaviorVariable, child_value, 2763, 11)
(BehaviorVariable, derived_flag, 2986, 12)
(BehaviorVariable, larger_array, 3105, 15)
(BehaviorVariable, matrix, 3122, 12)
(BehaviorVariable, numeric_value, 2910, 13)
(BehaviorVariable, opaque_value, 2885, 12)
(BehaviorVariable, real_value, 2839, 10)
(BehaviorVariable, sibling_value, 2799, 13)
(BehaviorVariable, unrelated_flag, 3026, 14)
(BehaviorVariable, unrelated_real, 2949, 14)
(BehaviorVariableGroup, <null>, 2729, 31)
(BehaviorVariableGroup, <null>, 2763, 33)
(BehaviorVariableGroup, <null>, 2799, 37)
(BehaviorVariableGroup, <null>, 2839, 43)
(BehaviorVariableGroup, <null>, 2885, 22)
(BehaviorVariableGroup, <null>, 2910, 36)
(BehaviorVariableGroup, <null>, 2949, 34)
(BehaviorVariableGroup, <null>, 2986, 37)
(BehaviorVariableGroup, <null>, 3026, 44)
(BehaviorVariableGroup, <null>, 3073, 29)
(BehaviorVariableGroup, <null>, 3105, 46)
(BinaryExpression, <null>, 3338, 27)
(BinaryExpression, <null>, 3554, 23)
(BinaryExpression, <null>, 3950, 17)
(BinaryExpression, <null>, 4031, 17)
(BinaryExpression, <null>, 4111, 16)
(BinaryExpression, <null>, 4191, 16)
(BinaryExpression, <null>, 4273, 21)
(BinaryExpression, <null>, 4361, 21)
(Reference, <null>, 3252, 11)
(Reference, <null>, 3267, 13)
(Reference, <null>, 3324, 10)
(Reference, <null>, 3338, 11)
(Reference, <null>, 3352, 13)
(Reference, <null>, 3406, 10)
(Reference, <null>, 3420, 10)
(Reference, <null>, 3472, 10)
(Reference, <null>, 3486, 10)
(Reference, <null>, 3540, 10)
(Reference, <null>, 3554, 10)
(Reference, <null>, 3567, 10)
(Reference, <null>, 3619, 12)
(Reference, <null>, 3635, 13)
(Reference, <null>, 3689, 12)
(Reference, <null>, 3710, 13)
(Reference, <null>, 3727, 12)
(Reference, <null>, 3773, 12)
(Reference, <null>, 3794, 10)
(Reference, <null>, 3808, 12)
(Reference, <null>, 3852, 6)
(Reference, <null>, 3867, 10)
(Reference, <null>, 3881, 6)
(Reference, <null>, 3935, 11)
(Reference, <null>, 3954, 13)
(Reference, <null>, 4016, 11)
(Reference, <null>, 4031, 13)
(Reference, <null>, 4093, 14)
(Reference, <null>, 4117, 10)
(Reference, <null>, 4173, 14)
(Reference, <null>, 4191, 10)
(Reference, <null>, 4255, 14)
(Reference, <null>, 4282, 12)
(Reference, <null>, 4343, 14)
(Reference, <null>, 4361, 12)
(ReferenceExpression, <null>, 3267, 13)
(ReferenceExpression, <null>, 3338, 11)
(ReferenceExpression, <null>, 3352, 13)
(ReferenceExpression, <null>, 3420, 10)
(ReferenceExpression, <null>, 3486, 10)
(ReferenceExpression, <null>, 3554, 10)
(ReferenceExpression, <null>, 3567, 10)
(ReferenceExpression, <null>, 3635, 13)
(ReferenceExpression, <null>, 3727, 12)
(ReferenceExpression, <null>, 3808, 12)
(ReferenceExpression, <null>, 3881, 6)
(ReferenceExpression, <null>, 3954, 13)
(ReferenceExpression, <null>, 4031, 13)
(ReferenceExpression, <null>, 4117, 10)
(ReferenceExpression, <null>, 4191, 10)
(ReferenceExpression, <null>, 4282, 12)
(ReferenceExpression, <null>, 4361, 12)
(ReferenceSegment, base_array, 3794, 10)
(ReferenceSegment, base_array, 3867, 10)
(ReferenceSegment, base_value, 3324, 10)
(ReferenceSegment, base_value, 3406, 10)
(ReferenceSegment, base_value, 3486, 10)
(ReferenceSegment, base_value, 3540, 10)
(ReferenceSegment, base_value, 3554, 10)
(ReferenceSegment, child_value, 3252, 11)
(ReferenceSegment, child_value, 3338, 11)
(ReferenceSegment, child_value, 3935, 11)
(ReferenceSegment, child_value, 4016, 11)
(ReferenceSegment, derived_flag, 4282, 12)
(ReferenceSegment, derived_flag, 4361, 12)
(ReferenceSegment, larger_array, 3773, 12)
(ReferenceSegment, larger_array, 3808, 12)
(ReferenceSegment, matrix, 3852, 6)
(ReferenceSegment, matrix, 3881, 6)
(ReferenceSegment, numeric_value, 3635, 13)
(ReferenceSegment, numeric_value, 3710, 13)
(ReferenceSegment, opaque_value, 3619, 12)
(ReferenceSegment, opaque_value, 3689, 12)
(ReferenceSegment, opaque_value, 3727, 12)
(ReferenceSegment, real_value, 3420, 10)
(ReferenceSegment, real_value, 3472, 10)
(ReferenceSegment, real_value, 3567, 10)
(ReferenceSegment, real_value, 4117, 10)
(ReferenceSegment, real_value, 4191, 10)
(ReferenceSegment, sibling_value, 3267, 13)
(ReferenceSegment, sibling_value, 3352, 13)
(ReferenceSegment, sibling_value, 3954, 13)
(ReferenceSegment, sibling_value, 4031, 13)
(ReferenceSegment, unrelated_flag, 4255, 14)
(ReferenceSegment, unrelated_flag, 4343, 14)
(ReferenceSegment, unrelated_real, 4093, 14)
(ReferenceSegment, unrelated_real, 4173, 14)
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
annex[0] owner=Issue3261::host.impl
(AssignmentAction, <null>, 2300, 30)
(AssignmentAction, <null>, 2338, 30)
(AssignmentAction, <null>, 2376, 43)
(AssignmentAction, <null>, 2427, 43)
(BehaviorActionBlock, <null>, 2292, 184)
(BehaviorActionSequence, <null>, 2300, 170)
(BehaviorAnnex, behavior_specification, 2103, 374)
(BehaviorIntegerLiteral, <null>, 2146, 1)
(BehaviorIntegerLiteral, <null>, 2194, 1)
(BehaviorState, done, 2237, 4)
(BehaviorState, start, 2210, 5)
(BehaviorStateGroup, <null>, 2210, 22)
(BehaviorStateGroup, <null>, 2237, 19)
(BehaviorTransition, <null>, 2275, 202)
(BehaviorVariable, base_value, 2117, 10)
(BehaviorVariable, grandchild_value, 2153, 16)
(BehaviorVariableGroup, <null>, 2117, 31)
(BehaviorVariableGroup, <null>, 2153, 43)
(BinaryExpression, <null>, 2390, 29)
(BinaryExpression, <null>, 2441, 29)
(Reference, <null>, 2300, 10)
(Reference, <null>, 2314, 16)
(Reference, <null>, 2338, 16)
(Reference, <null>, 2358, 10)
(Reference, <null>, 2376, 10)
(Reference, <null>, 2390, 10)
(Reference, <null>, 2403, 16)
(Reference, <null>, 2427, 10)
(Reference, <null>, 2441, 16)
(Reference, <null>, 2460, 10)
(ReferenceExpression, <null>, 2314, 16)
(ReferenceExpression, <null>, 2358, 10)
(ReferenceExpression, <null>, 2390, 10)
(ReferenceExpression, <null>, 2403, 16)
(ReferenceExpression, <null>, 2441, 16)
(ReferenceExpression, <null>, 2460, 10)
(ReferenceSegment, base_value, 2300, 10)
(ReferenceSegment, base_value, 2358, 10)
(ReferenceSegment, base_value, 2376, 10)
(ReferenceSegment, base_value, 2390, 10)
(ReferenceSegment, base_value, 2427, 10)
(ReferenceSegment, base_value, 2460, 10)
(ReferenceSegment, grandchild_value, 2314, 16)
(ReferenceSegment, grandchild_value, 2338, 16)
(ReferenceSegment, grandchild_value, 2403, 16)
(ReferenceSegment, grandchild_value, 2441, 16)
Loading