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
2 changes: 2 additions & 0 deletions ba/doc/conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ These are bounded findings from the inspected grammar/translator/checker path. E

Some checker comments identify their source as **AADL Behavior Annex draft 0.94**. This matters: names such as `D_3_L1_And_L2_Check` and diagnostics labelled `D.3.(L3)` cannot be assumed to correspond one-for-one to the supplied Rev. A rule ordering. `D_3_L4_Check` is explicitly suspended and returns true with its body commented out. The Rev. A text makes explicit initialization/finalization modeling optional, so suspension of an older check is not automatically a Rev. A defect. Update the traceability by rule meaning before reviving old checks.

**Complete states in modal components ([#2279](https://github.com/osate/osate2/issues/2279)):** D.3 requires initial and complete states in threads, devices, and other components that can suspend awaiting dispatch or a mode transition. `D_3_L3_Check` previously checked only threads, devices, and virtual processors. It now also checks non-subprogram classifiers with modes, including inherited modes. The driver runs the required-state checks even when the entire states section is omitted, including the initial/final-state requirements for subprograms; empty and variables-only annexes are covered by the regression. This does not require memory state names to match mode names: mode refinement remains optional, with the existing all-or-none rule applying once a complete state represents a mode. `Issue2279Test` covers missing states across modal component categories, inherited memory modes, legal external transitions between mode-representing complete states, and complete states that do not represent modes. The corrected device-dispatch example from #2279 already validates successfully and is retained as a positive control; its historical intermittent property-resolution failure was not reproduced.

## What the existing tests do and do not prove

1. ~~**The conformance diagnostic assertions are ineffective.**~~ `BehaviorAnnexConformanceTest.assertDiagnostics` took an `expected` list but never used it; it checked only `result.getIssues() != null`, so nine active diagnostic-based tests could not fail, and their expected strings had drifted to messages the current parser no longer produces. **Repaired in step 1** (see below): that method is gone, the class states standard outcomes only, and exact diagnostics are compared by the golden suites.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
error | semantic | 38 | 2 | 94 | Issue2279::brain.missing_complete has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 62 | 2 | 34 | Issue2279::inherited.missing_initial has no initial state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 69 | 2 | 37 | Issue2279::brain.extended has no complete state : Behavior Annex D.3.(L3) legality rule failed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
error | semantic | 1 | 1 | 0 | MissingStates::routine has no final state : Behavior Annex D.3.(L1) legality rule failed.
error | semantic | 1 | 1 | 0 | MissingStates::routine has no initialstate : Behavior Annex D.3.(L1) legality rule failed.
error | semantic | 1 | 1 | 0 | MissingStates::scheduler has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 1 | 1 | 0 | MissingStates::scheduler has no initial state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 1 | 1 | 0 | MissingStates::sensor has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 1 | 1 | 0 | MissingStates::sensor has no initial state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 1 | 1 | 0 | MissingStates::storage has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 1 | 1 | 0 | MissingStates::storage has no initial state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 1 | 1 | 0 | MissingStates::worker has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 1 | 1 | 0 | MissingStates::worker has no initial state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 48 | 2 | 45 | MissingStates::storage.impl has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 48 | 2 | 45 | MissingStates::storage.impl has no initial state : Behavior Annex D.3.(L3) legality rule failed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
error | semantic | 101 | 2 | 37 | ModalCategories::memory_behavior.impl has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 110 | 2 | 37 | ModalCategories::process_behavior has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 117 | 2 | 37 | ModalCategories::process_behavior.impl has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 126 | 2 | 37 | ModalCategories::processor_behavior has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 133 | 2 | 37 | ModalCategories::processor_behavior.impl has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 142 | 2 | 37 | ModalCategories::system_behavior has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 149 | 2 | 37 | ModalCategories::system_behavior.impl has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 158 | 2 | 37 | ModalCategories::thread_behavior has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 165 | 2 | 37 | ModalCategories::thread_behavior.impl has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 174 | 2 | 37 | ModalCategories::thread_group_behavior has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 181 | 2 | 37 | ModalCategories::thread_group_behavior.impl has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 190 | 2 | 37 | ModalCategories::virtual_bus_behavior has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 197 | 2 | 37 | ModalCategories::virtual_bus_behavior.impl has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 206 | 2 | 37 | ModalCategories::virtual_processor_behavior has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 213 | 2 | 37 | ModalCategories::virtual_processor_behavior.impl has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 30 | 2 | 37 | ModalCategories::abstract_behavior has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 37 | 2 | 37 | ModalCategories::abstract_behavior.impl has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 46 | 2 | 37 | ModalCategories::bus_behavior has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 53 | 2 | 37 | ModalCategories::bus_behavior.impl has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 62 | 2 | 37 | ModalCategories::data_behavior has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 69 | 2 | 37 | ModalCategories::data_behavior.impl has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 78 | 2 | 37 | ModalCategories::device_behavior has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 85 | 2 | 37 | ModalCategories::device_behavior.impl has no complete state : Behavior Annex D.3.(L3) legality rule failed.
error | semantic | 94 | 2 | 37 | ModalCategories::memory_behavior has no complete state : Behavior Annex D.3.(L3) legality rule failed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
annex[0] owner=Controls::stomach
(BehaviorAnnex, behavior_specification, 1995, 152)
(BehaviorCondition, <null>, 2083, 11)
(BehaviorCondition, <null>, 2125, 11)
(BehaviorIntegerLiteral, <null>, 2093, 1)
(BehaviorState, hungry, 2004, 6)
(BehaviorState, not_hungry, 2030, 10)
(BehaviorStateGroup, <null>, 2004, 23)
(BehaviorStateGroup, <null>, 2030, 28)
(BehaviorTransition, <null>, 2074, 35)
(BehaviorTransition, <null>, 2112, 35)
(BinaryExpression, <null>, 2083, 11)
(DispatchCondition, <null>, 2128, 8)
(ExecuteCondition, <null>, 2083, 11)
(Reference, <null>, 2083, 7)
(ReferenceExpression, <null>, 2083, 7)
(ReferenceSegment, food_in, 2083, 7)
annex[1] owner=Controls::brain
(BehaviorAnnex, behavior_specification, 2312, 94)
(BehaviorState, finished, 2346, 8)
(BehaviorState, start, 2321, 5)
(BehaviorStateGroup, <null>, 2321, 22)
(BehaviorStateGroup, <null>, 2346, 23)
(BehaviorTransition, <null>, 2385, 21)
annex[2] owner=Controls::routine
(BehaviorAnnex, behavior_specification, 2577, 94)
(BehaviorState, finished, 2611, 8)
(BehaviorState, start, 2586, 5)
(BehaviorStateGroup, <null>, 2586, 22)
(BehaviorStateGroup, <null>, 2611, 23)
(BehaviorTransition, <null>, 2650, 21)
annex[3] owner=Controls::controller
(BehaviorAnnex, behavior_specification, 2855, 103)
(BehaviorState, finished, 2889, 8)
(BehaviorState, start, 2864, 5)
(BehaviorStateGroup, <null>, 2864, 22)
(BehaviorStateGroup, <null>, 2889, 32)
(BehaviorTransition, <null>, 2937, 21)
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
annex[0] owner=Issue2279::brain.missing_complete
(BehaviorAnnex, behavior_specification, 2068, 94)
(BehaviorState, finished, 2102, 8)
(BehaviorState, start, 2077, 5)
(BehaviorStateGroup, <null>, 2077, 22)
(BehaviorStateGroup, <null>, 2102, 23)
(BehaviorTransition, <null>, 2141, 21)
annex[1] owner=Issue2279::brain.corrected
(BehaviorAnnex, behavior_specification, 2368, 113)
(BehaviorCondition, <null>, 2463, 7)
(BehaviorState, active, 2413, 6)
(BehaviorState, resting, 2377, 7)
(BehaviorStateGroup, <null>, 2377, 33)
(BehaviorStateGroup, <null>, 2413, 24)
(BehaviorTransition, <null>, 2453, 28)
(ModeSwitchCondition, <null>, 2466, 4)
(ModeSwitchConjunction, <null>, 2466, 4)
(ModeSwitchTrigger, <null>, 2466, 4)
(Reference, <null>, 2466, 4)
(ReferenceSegment, wake, 2466, 4)
annex[2] owner=Issue2279::inherited.missing_initial
(BehaviorAnnex, behavior_specification, 2638, 34)
(BehaviorState, resting, 2647, 7)
(BehaviorStateGroup, <null>, 2647, 25)
annex[3] owner=Issue2279::brain.extended
(BehaviorAnnex, behavior_specification, 2805, 37)
(BehaviorState, start, 2814, 5)
(BehaviorStateGroup, <null>, 2814, 28)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
annex[0] owner=MissingStates::worker
(BehaviorAnnex, behavior_specification, 0, 1835)
annex[1] owner=MissingStates::sensor
(BehaviorAnnex, behavior_specification, 0, 1900)
annex[2] owner=MissingStates::scheduler
(BehaviorAnnex, behavior_specification, 0, 1979)
annex[3] owner=MissingStates::storage
(BehaviorAnnex, behavior_specification, 0, 2078)
annex[4] owner=MissingStates::storage.impl
(BehaviorAnnex, behavior_specification, 2252, 45)
(BehaviorIntegerLiteral, <null>, 2295, 1)
(BehaviorVariable, value, 2264, 5)
(BehaviorVariableGroup, <null>, 2264, 33)
annex[5] owner=MissingStates::routine
(BehaviorAnnex, behavior_specification, 0, 2492)
annex[6] owner=MissingStates::nonmodal
(BehaviorAnnex, behavior_specification, 0, 2624)
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
annex[0] owner=ModalCategories::abstract_behavior
(BehaviorAnnex, behavior_specification, 1864, 37)
(BehaviorState, start, 1873, 5)
(BehaviorStateGroup, <null>, 1873, 28)
annex[1] owner=ModalCategories::abstract_behavior.impl
(BehaviorAnnex, behavior_specification, 2012, 37)
(BehaviorState, start, 2021, 5)
(BehaviorStateGroup, <null>, 2021, 28)
annex[2] owner=ModalCategories::bus_behavior
(BehaviorAnnex, behavior_specification, 2165, 37)
(BehaviorState, start, 2174, 5)
(BehaviorStateGroup, <null>, 2174, 28)
annex[3] owner=ModalCategories::bus_behavior.impl
(BehaviorAnnex, behavior_specification, 2298, 37)
(BehaviorState, start, 2307, 5)
(BehaviorStateGroup, <null>, 2307, 28)
annex[4] owner=ModalCategories::data_behavior
(BehaviorAnnex, behavior_specification, 2448, 37)
(BehaviorState, start, 2457, 5)
(BehaviorStateGroup, <null>, 2457, 28)
annex[5] owner=ModalCategories::data_behavior.impl
(BehaviorAnnex, behavior_specification, 2584, 37)
(BehaviorState, start, 2593, 5)
(BehaviorStateGroup, <null>, 2593, 28)
annex[6] owner=ModalCategories::device_behavior
(BehaviorAnnex, behavior_specification, 2739, 37)
(BehaviorState, start, 2748, 5)
(BehaviorStateGroup, <null>, 2748, 28)
annex[7] owner=ModalCategories::device_behavior.impl
(BehaviorAnnex, behavior_specification, 2881, 37)
(BehaviorState, start, 2890, 5)
(BehaviorStateGroup, <null>, 2890, 28)
annex[8] owner=ModalCategories::memory_behavior
(BehaviorAnnex, behavior_specification, 3038, 37)
(BehaviorState, start, 3047, 5)
(BehaviorStateGroup, <null>, 3047, 28)
annex[9] owner=ModalCategories::memory_behavior.impl
(BehaviorAnnex, behavior_specification, 3180, 37)
(BehaviorState, start, 3189, 5)
(BehaviorStateGroup, <null>, 3189, 28)
annex[10] owner=ModalCategories::process_behavior
(BehaviorAnnex, behavior_specification, 3339, 37)
(BehaviorState, start, 3348, 5)
(BehaviorStateGroup, <null>, 3348, 28)
annex[11] owner=ModalCategories::process_behavior.impl
(BehaviorAnnex, behavior_specification, 3484, 37)
(BehaviorState, start, 3493, 5)
(BehaviorStateGroup, <null>, 3493, 28)
annex[12] owner=ModalCategories::processor_behavior
(BehaviorAnnex, behavior_specification, 3648, 37)
(BehaviorState, start, 3657, 5)
(BehaviorStateGroup, <null>, 3657, 28)
annex[13] owner=ModalCategories::processor_behavior.impl
(BehaviorAnnex, behavior_specification, 3799, 37)
(BehaviorState, start, 3808, 5)
(BehaviorStateGroup, <null>, 3808, 28)
annex[14] owner=ModalCategories::system_behavior
(BehaviorAnnex, behavior_specification, 3959, 37)
(BehaviorState, start, 3968, 5)
(BehaviorStateGroup, <null>, 3968, 28)
annex[15] owner=ModalCategories::system_behavior.impl
(BehaviorAnnex, behavior_specification, 4101, 37)
(BehaviorState, start, 4110, 5)
(BehaviorStateGroup, <null>, 4110, 28)
annex[16] owner=ModalCategories::thread_behavior
(BehaviorAnnex, behavior_specification, 4258, 37)
(BehaviorState, start, 4267, 5)
(BehaviorStateGroup, <null>, 4267, 28)
annex[17] owner=ModalCategories::thread_behavior.impl
(BehaviorAnnex, behavior_specification, 4400, 37)
(BehaviorState, start, 4409, 5)
(BehaviorStateGroup, <null>, 4409, 28)
annex[18] owner=ModalCategories::thread_group_behavior
(BehaviorAnnex, behavior_specification, 4569, 37)
(BehaviorState, start, 4578, 5)
(BehaviorStateGroup, <null>, 4578, 28)
annex[19] owner=ModalCategories::thread_group_behavior.impl
(BehaviorAnnex, behavior_specification, 4729, 37)
(BehaviorState, start, 4738, 5)
(BehaviorStateGroup, <null>, 4738, 28)
annex[20] owner=ModalCategories::virtual_bus_behavior
(BehaviorAnnex, behavior_specification, 4902, 37)
(BehaviorState, start, 4911, 5)
(BehaviorStateGroup, <null>, 4911, 28)
annex[21] owner=ModalCategories::virtual_bus_behavior.impl
(BehaviorAnnex, behavior_specification, 5059, 37)
(BehaviorState, start, 5068, 5)
(BehaviorStateGroup, <null>, 5068, 28)
annex[22] owner=ModalCategories::virtual_processor_behavior
(BehaviorAnnex, behavior_specification, 5243, 37)
(BehaviorState, start, 5252, 5)
(BehaviorStateGroup, <null>, 5252, 28)
annex[23] owner=ModalCategories::virtual_processor_behavior.impl
(BehaviorAnnex, behavior_specification, 5418, 37)
(BehaviorState, start, 5427, 5)
(BehaviorStateGroup, <null>, 5427, 28)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
annex[0] owner=InModesExecuteCondition::controller.impl
(BehaviorAnnex, behavior_specification, 1919, 93)
(BehaviorAnnex, behavior_specification, 1919, 102)
(BehaviorState, running, 1954, 7)
(BehaviorState, waiting, 1927, 7)
(BehaviorStateGroup, <null>, 1927, 24)
(BehaviorStateGroup, <null>, 1954, 22)
(BehaviorTransition, <null>, 1990, 22)
(BehaviorStateGroup, <null>, 1954, 31)
(BehaviorTransition, <null>, 1999, 22)
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
annex[0] owner=InModesExternalCondition::controller.impl
(BehaviorAnnex, behavior_specification, 1950, 98)
(BehaviorCondition, <null>, 2031, 5)
(BehaviorAnnex, behavior_specification, 1950, 107)
(BehaviorCondition, <null>, 2040, 5)
(BehaviorState, running, 1985, 7)
(BehaviorState, waiting, 1958, 7)
(BehaviorStateGroup, <null>, 1958, 24)
(BehaviorStateGroup, <null>, 1985, 22)
(BehaviorTransition, <null>, 2021, 27)
(ModeSwitchCondition, <null>, 2034, 2)
(ModeSwitchConjunction, <null>, 2034, 2)
(ModeSwitchTrigger, <null>, 2034, 2)
(Reference, <null>, 2034, 2)
(ReferenceSegment, go, 2034, 2)
(BehaviorStateGroup, <null>, 1985, 31)
(BehaviorTransition, <null>, 2030, 27)
(ModeSwitchCondition, <null>, 2043, 2)
(ModeSwitchConjunction, <null>, 2043, 2)
(ModeSwitchTrigger, <null>, 2043, 2)
(Reference, <null>, 2043, 2)
(ReferenceSegment, go, 2043, 2)
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
annex[0] owner=ModalSubclauses::modal.impl
(BehaviorAnnex, behavior_specification, 1914, 35)
(BehaviorAnnex, behavior_specification, 1914, 44)
(BehaviorState, whennormal, 1922, 10)
(BehaviorStateGroup, <null>, 1922, 27)
(BehaviorStateGroup, <null>, 1922, 36)
annex[1] owner=ModalSubclauses::modal.impl
(BehaviorAnnex, behavior_specification, 2006, 35)
(BehaviorState, whenbackup, 2014, 10)
(BehaviorStateGroup, <null>, 2014, 27)
(BehaviorAnnex, behavior_specification, 2015, 44)
(BehaviorState, whenbackup, 2023, 10)
(BehaviorStateGroup, <null>, 2023, 36)
annex[2] owner=ModalSubclauses::modal.always
(BehaviorAnnex, behavior_specification, 2198, 32)
(BehaviorState, anymode, 2206, 7)
(BehaviorStateGroup, <null>, 2206, 24)
(BehaviorAnnex, behavior_specification, 2216, 41)
(BehaviorState, anymode, 2224, 7)
(BehaviorStateGroup, <null>, 2224, 33)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
annex[0] owner=Controls::stomach
parsedAnnexSubclause : BehaviorAnnex name=behavior_specification
states[0] : BehaviorState name=hungry
states[1] : BehaviorState name=not_hungry
transitions[0] : BehaviorTransition
condition : ValueExpression
relations[0] : Relation
firstExpression : SimpleExpression
terms[0] : Term
factors[0] : Factor
firstValue : EventDataPortHolder element=Controls::stomach.food_in [EventDataPort]
secondExpression : SimpleExpression
terms[0] : Term
factors[0] : Factor
firstValue : BehaviorIntegerLiteral
transitions[1] : BehaviorTransition
condition : DispatchCondition
annex[1] owner=Controls::brain
parsedAnnexSubclause : BehaviorAnnex name=behavior_specification
states[0] : BehaviorState name=start
states[1] : BehaviorState name=finished
transitions[0] : BehaviorTransition
annex[2] owner=Controls::routine
parsedAnnexSubclause : BehaviorAnnex name=behavior_specification
states[0] : BehaviorState name=start
states[1] : BehaviorState name=finished
transitions[0] : BehaviorTransition
annex[3] owner=Controls::controller
parsedAnnexSubclause : BehaviorAnnex name=behavior_specification
states[0] : BehaviorState name=start
states[1] : BehaviorState name=finished
transitions[0] : BehaviorTransition
Loading