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 @@ -140,6 +140,8 @@ The AST precedence error and the strict-model flattening error must be assessed

**Implemented for [#3178](https://github.com/osate/osate2/issues/3178):** for a subclause without an `in modes` statement, translation now binds each complete state to a visible same-named mode case-insensitively. A subclause with an `in modes` statement does not create those bindings. The validator enforces D.3's all-or-none rule before strict checking, so a non-mode complete state is reported when another complete state represents a mode. `Issue3178Test` exercises source and destination bindings, matching and mismatching transition triggers, every source of a multi-source transition, the all-or-none diagnostic, and the `in modes` boundary through embedded AADL models without mutating the strict model.

**External trigger validation and context ([#3232](https://github.com/osate/osate2/issues/3232)):** external conditions require incoming event or event data ports of the containing component. OSATE also deliberately accepts outgoing event or event data ports of direct subcomponents; bidirectional ports satisfy either direction. The validator reports invalid trigger kinds, directions, unresolved names, and paths that the strict model cannot represent, and keeps the strict checkers out of an incomplete condition. `ActualPortHolder.context` retains the subcomponent separately from the port and its feature-group path. Mode-refinement comparisons include the context, so `first.p` and `second.p` remain distinct even when both subcomponents share a classifier. `Issue3232Test` covers these checks, nested expressions, feature groups, and strict-model serialization.

### G15 — Multiple final states in subprogram behavior are always rejected

**Standard:** D.3's description explicitly allows several final states when specifying intended behavior; a deterministic implementation representation is distinguished as requiring one final state.
Expand Down
1 change: 1 addition & 0 deletions ba/org.osate.ba.edit/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -366,3 +366,4 @@ _UI_BehaviorArraySize_integerValue_feature = Integer Value
_UI_PortUpdatedValue_type = Port Updated Value
_UI_ModeSwitchTriggerLogicalExpression_logicalOperators_feature = Logical Operators
_UI_ModeSwitchConjunction_logicalOperators_feature = Logical Operators
_UI_ActualPortHolder_context_feature = Context
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* AADL-BA-FrontEnd
*
*
* Copyright (c) 2011-2021 TELECOM ParisTech and CNRS
*
*
* TELECOM ParisTech/LTCI
*
*
* Authors: see AUTHORS
*
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the Eclipse Public License as published by Eclipse, either
* version 2.0 of the License, or (at your option) any later version. This
Expand All @@ -24,7 +24,9 @@

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.osate.ba.aadlba.AadlBaPackage;

/**
* This is the item provider adapter for a {@link org.osate.ba.aadlba.ActualPortHolder} object.
Expand Down Expand Up @@ -54,10 +56,26 @@ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);

addContextPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}

/**
* This adds a property descriptor for the Context feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addContextPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_ActualPortHolder_context_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ActualPortHolder_context_feature",
"_UI_ActualPortHolder_type"),
AadlBaPackage.Literals.ACTUAL_PORT_HOLDER__CONTEXT, true, false, true, null, null, null));
}

/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
error | semantic | 37 | 10 | 5 | subprogram components cannot use an external condition: an execute or internal condition must be used instead: Behavior Annex D.3 consistency rule failed.
error | semantic | 37 | 13 | 2 | 'go' is not an external-condition trigger: expected an incoming event or event data port of the component, or an outgoing event or event data port of a subcomponent
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
error | semantic | 53 | 15 | 5 | 'value' is not an external-condition trigger: expected an incoming event or event data port of the component, or an outgoing event or event data port of a subcomponent
error | semantic | 53 | 38 | 6 | 'stored' is not an external-condition trigger: expected an incoming event or event data port of the component, or an outgoing event or event data port of a subcomponent
error | semantic | 53 | 49 | 11 | 'local_value' is not an external-condition trigger: expected an incoming event or event data port of the component, or an outgoing event or event data port of a subcomponent
error | semantic | 54 | 15 | 8 | 'outgoing' is not an external-condition trigger: expected an incoming event or event data port of the component, or an outgoing event or event data port of a subcomponent
error | semantic | 54 | 27 | 13 | 'outgoing_data' is not an external-condition trigger: expected an incoming event or event data port of the component, or an outgoing event or event data port of a subcomponent
error | semantic | 55 | 15 | 14 | 'child.incoming' is not an external-condition trigger: expected an incoming event or event data port of the component, or an outgoing event or event data port of a subcomponent
error | semantic | 55 | 34 | 19 | 'child.incoming_data' is not an external-condition trigger: expected an incoming event or event data port of the component, or an outgoing event or event data port of a subcomponent
error | semantic | 55 | 57 | 11 | 'child.value' is not an external-condition trigger: expected an incoming event or event data port of the component, or an outgoing event or event data port of a subcomponent
error | semantic | 56 | 15 | 7 | 'unknown' is not an external-condition trigger: expected an incoming event or event data port of the component, or an outgoing event or event data port of a subcomponent
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
error | semantic | 63 | 9 | 18 | The behavior transition tries to refine a transition mode but it is not consisting with any transition mode of ModeTriggers::controller.mismatching component: Behavior Annex D.3.(C4) consistency rule failed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
annex[0] owner=GroupedTriggers::controller.impl
(BehaviorAnnex, behavior_specification, 2222, 159)
(BehaviorCondition, <null>, 2302, 67)
(BehaviorState, running, 2256, 7)
(BehaviorState, waiting, 2230, 7)
(BehaviorStateGroup, <null>, 2230, 24)
(BehaviorStateGroup, <null>, 2256, 22)
(BehaviorTransition, <null>, 2292, 89)
(ModeSwitchCondition, <null>, 2305, 64)
(ModeSwitchConjunction, <null>, 2305, 64)
(ModeSwitchTrigger, <null>, 2305, 17)
(ModeSwitchTrigger, <null>, 2327, 24)
(ModeSwitchTrigger, <null>, 2356, 13)
(Reference, <null>, 2305, 17)
(Reference, <null>, 2327, 24)
(Reference, <null>, 2356, 13)
(ReferenceSegment, child, 2327, 5)
(ReferenceSegment, grouped, 2356, 7)
(ReferenceSegment, input_group, 2305, 11)
(ReferenceSegment, output_group, 2333, 12)
(ReferenceSegment, ready, 2317, 5)
(ReferenceSegment, ready, 2346, 5)
(ReferenceSegment, ready, 2364, 5)
(ReferenceTail, <null>, 2316, 6)
(ReferenceTail, <null>, 2332, 13)
(ReferenceTail, <null>, 2345, 6)
(ReferenceTail, <null>, 2363, 6)
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
annex[0] owner=InvalidTriggers::controller.impl
(BehaviorAnnex, behavior_specification, 2302, 347)
(BehaviorCondition, <null>, 2422, 49)
(BehaviorCondition, <null>, 2495, 28)
(BehaviorCondition, <null>, 2547, 56)
(BehaviorCondition, <null>, 2627, 10)
(BehaviorState, running, 2382, 7)
(BehaviorState, waiting, 2356, 7)
(BehaviorStateGroup, <null>, 2356, 24)
(BehaviorStateGroup, <null>, 2382, 16)
(BehaviorTransition, <null>, 2412, 71)
(BehaviorTransition, <null>, 2485, 50)
(BehaviorTransition, <null>, 2537, 78)
(BehaviorTransition, <null>, 2617, 32)
(BehaviorVariable, local_value, 2313, 11)
(BehaviorVariableGroup, <null>, 2313, 34)
(ModeSwitchCondition, <null>, 2425, 46)
(ModeSwitchCondition, <null>, 2448, 22)
(ModeSwitchCondition, <null>, 2498, 25)
(ModeSwitchCondition, <null>, 2550, 53)
(ModeSwitchCondition, <null>, 2630, 7)
(ModeSwitchConjunction, <null>, 2425, 18)
(ModeSwitchConjunction, <null>, 2447, 24)
(ModeSwitchConjunction, <null>, 2448, 22)
(ModeSwitchConjunction, <null>, 2498, 8)
(ModeSwitchConjunction, <null>, 2510, 13)
(ModeSwitchConjunction, <null>, 2550, 38)
(ModeSwitchConjunction, <null>, 2592, 11)
(ModeSwitchConjunction, <null>, 2630, 7)
(ModeSwitchTrigger, <null>, 2425, 5)
(ModeSwitchTrigger, <null>, 2435, 8)
(ModeSwitchTrigger, <null>, 2447, 24)
(ModeSwitchTrigger, <null>, 2448, 6)
(ModeSwitchTrigger, <null>, 2459, 11)
(ModeSwitchTrigger, <null>, 2498, 8)
(ModeSwitchTrigger, <null>, 2510, 13)
(ModeSwitchTrigger, <null>, 2550, 14)
(ModeSwitchTrigger, <null>, 2569, 19)
(ModeSwitchTrigger, <null>, 2592, 11)
(ModeSwitchTrigger, <null>, 2630, 7)
(Reference, <null>, 2425, 5)
(Reference, <null>, 2435, 8)
(Reference, <null>, 2448, 6)
(Reference, <null>, 2459, 11)
(Reference, <null>, 2498, 8)
(Reference, <null>, 2510, 13)
(Reference, <null>, 2550, 14)
(Reference, <null>, 2569, 19)
(Reference, <null>, 2592, 11)
(Reference, <null>, 2630, 7)
(ReferenceSegment, child, 2550, 5)
(ReferenceSegment, child, 2569, 5)
(ReferenceSegment, child, 2592, 5)
(ReferenceSegment, incoming, 2435, 8)
(ReferenceSegment, incoming, 2556, 8)
(ReferenceSegment, incoming_data, 2575, 13)
(ReferenceSegment, local_value, 2459, 11)
(ReferenceSegment, outgoing, 2498, 8)
(ReferenceSegment, outgoing_data, 2510, 13)
(ReferenceSegment, stored, 2448, 6)
(ReferenceSegment, unknown, 2630, 7)
(ReferenceSegment, value, 2425, 5)
(ReferenceSegment, value, 2598, 5)
(ReferenceTail, <null>, 2555, 9)
(ReferenceTail, <null>, 2574, 14)
(ReferenceTail, <null>, 2597, 6)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
annex[0] owner=Issue3232::controller.impl
(BehaviorAnnex, behavior_specification, 2088, 163)
(BehaviorCondition, <null>, 2168, 71)
(BehaviorState, running, 2122, 7)
(BehaviorState, waiting, 2096, 7)
(BehaviorStateGroup, <null>, 2096, 24)
(BehaviorStateGroup, <null>, 2122, 22)
(BehaviorTransition, <null>, 2158, 93)
(ModeSwitchCondition, <null>, 2171, 68)
(ModeSwitchCondition, <null>, 2202, 36)
(ModeSwitchConjunction, <null>, 2171, 26)
(ModeSwitchConjunction, <null>, 2201, 38)
(ModeSwitchConjunction, <null>, 2202, 36)
(ModeSwitchTrigger, <null>, 2171, 8)
(ModeSwitchTrigger, <null>, 2184, 13)
(ModeSwitchTrigger, <null>, 2201, 38)
(ModeSwitchTrigger, <null>, 2202, 13)
(ModeSwitchTrigger, <null>, 2220, 18)
(Reference, <null>, 2171, 8)
(Reference, <null>, 2184, 13)
(Reference, <null>, 2202, 13)
(Reference, <null>, 2220, 18)
(ReferenceSegment, bidirectional, 2202, 13)
(ReferenceSegment, bidirectional_data, 2220, 18)
(ReferenceSegment, incoming, 2171, 8)
(ReferenceSegment, incoming_data, 2184, 13)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
annex[0] owner=ModeTriggers::controller.matching
(BehaviorAnnex, behavior_specification, 2086, 113)
(BehaviorCondition, <null>, 2171, 17)
(BehaviorState, active, 2126, 6)
(BehaviorState, idle, 2094, 4)
(BehaviorStateGroup, <null>, 2094, 30)
(BehaviorStateGroup, <null>, 2126, 24)
(BehaviorTransition, <null>, 2164, 35)
(ModeSwitchCondition, <null>, 2174, 14)
(ModeSwitchConjunction, <null>, 2174, 14)
(ModeSwitchTrigger, <null>, 2174, 14)
(Reference, <null>, 2174, 14)
(ReferenceSegment, first, 2174, 5)
(ReferenceSegment, outgoing, 2180, 8)
(ReferenceTail, <null>, 2179, 9)
annex[1] owner=ModeTriggers::controller.mismatching
(BehaviorAnnex, behavior_specification, 2451, 114)
(BehaviorCondition, <null>, 2536, 18)
(BehaviorState, active, 2491, 6)
(BehaviorState, idle, 2459, 4)
(BehaviorStateGroup, <null>, 2459, 30)
(BehaviorStateGroup, <null>, 2491, 24)
(BehaviorTransition, <null>, 2529, 36)
(ModeSwitchCondition, <null>, 2539, 15)
(ModeSwitchConjunction, <null>, 2539, 15)
(ModeSwitchTrigger, <null>, 2539, 15)
(Reference, <null>, 2539, 15)
(ReferenceSegment, outgoing, 2546, 8)
(ReferenceSegment, second, 2539, 6)
(ReferenceTail, <null>, 2545, 9)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
annex[0] owner=SubcomponentTriggers::controller.impl
(BehaviorAnnex, behavior_specification, 2191, 238)
(BehaviorCondition, <null>, 2271, 146)
(BehaviorState, running, 2225, 7)
(BehaviorState, waiting, 2199, 7)
(BehaviorStateGroup, <null>, 2199, 24)
(BehaviorStateGroup, <null>, 2225, 22)
(BehaviorTransition, <null>, 2261, 168)
(ModeSwitchCondition, <null>, 2274, 143)
(ModeSwitchCondition, <null>, 2315, 44)
(ModeSwitchCondition, <null>, 2367, 49)
(ModeSwitchConjunction, <null>, 2274, 34)
(ModeSwitchConjunction, <null>, 2314, 46)
(ModeSwitchConjunction, <null>, 2315, 44)
(ModeSwitchConjunction, <null>, 2366, 51)
(ModeSwitchConjunction, <null>, 2367, 49)
(ModeSwitchTrigger, <null>, 2274, 14)
(ModeSwitchTrigger, <null>, 2293, 15)
(ModeSwitchTrigger, <null>, 2314, 46)
(ModeSwitchTrigger, <null>, 2315, 19)
(ModeSwitchTrigger, <null>, 2339, 20)
(ModeSwitchTrigger, <null>, 2366, 51)
(ModeSwitchTrigger, <null>, 2367, 19)
(ModeSwitchTrigger, <null>, 2391, 25)
(Reference, <null>, 2274, 14)
(Reference, <null>, 2293, 15)
(Reference, <null>, 2315, 19)
(Reference, <null>, 2339, 20)
(Reference, <null>, 2367, 19)
(Reference, <null>, 2391, 25)
(ReferenceSegment, bidirectional, 2373, 13)
(ReferenceSegment, bidirectional_data, 2398, 18)
(ReferenceSegment, first, 2274, 5)
(ReferenceSegment, first, 2315, 5)
(ReferenceSegment, first, 2367, 5)
(ReferenceSegment, outgoing, 2280, 8)
(ReferenceSegment, outgoing, 2300, 8)
(ReferenceSegment, outgoing_data, 2321, 13)
(ReferenceSegment, outgoing_data, 2346, 13)
(ReferenceSegment, second, 2293, 6)
(ReferenceSegment, second, 2339, 6)
(ReferenceSegment, second, 2391, 6)
(ReferenceTail, <null>, 2279, 9)
(ReferenceTail, <null>, 2299, 9)
(ReferenceTail, <null>, 2320, 14)
(ReferenceTail, <null>, 2345, 14)
(ReferenceTail, <null>, 2372, 14)
(ReferenceTail, <null>, 2397, 19)
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
annex[0] owner=GroupedTriggers::controller.impl
parsedAnnexSubclause : BehaviorAnnex name=behavior_specification
states[0] : BehaviorState name=waiting
states[1] : BehaviorState name=running
transitions[0] : BehaviorTransition
condition : ModeSwitchTriggerLogicalExpression
modeSwitchConjunctions[0] : ModeSwitchConjunction
modeSwitchTriggers[0] : EventPortHolder element=GroupedTriggers::signals.ready [EventPort]
groupHolders[0] : GroupHolder element=GroupedTriggers::controller.input_group [FeatureGroup]
modeSwitchTriggers[1] : EventPortHolder element=GroupedTriggers::signals.ready [EventPort] context=GroupedTriggers::controller.impl.child
groupHolders[0] : GroupHolder element=GroupedTriggers::worker.output_group [FeatureGroup]
modeSwitchTriggers[2] : EventPortHolder element=GroupedTriggers::workers.ready [EventPort] context=GroupedTriggers::controller.impl.grouped
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
annex[0] owner=InvalidTriggers::controller.impl
parsedAnnexSubclause : BehaviorAnnex name=behavior_specification
variables[0] : BehaviorVariable name=local_value
states[0] : BehaviorState name=waiting
states[1] : BehaviorState name=running
transitions[0] : BehaviorTransition
condition : ModeSwitchTriggerLogicalExpression
modeSwitchConjunctions[0] : ModeSwitchConjunction
modeSwitchTriggers[0] : EventPortHolder element=InvalidTriggers::controller.incoming [EventPort]
modeSwitchConjunctions[1] : ModeSwitchConjunction
modeSwitchTriggers[0] : ModeSwitchTriggerLogicalExpression
modeSwitchConjunctions[0] : ModeSwitchConjunction
transitions[1] : BehaviorTransition
condition : ModeSwitchTriggerLogicalExpression
modeSwitchConjunctions[0] : ModeSwitchConjunction
modeSwitchTriggers[0] : EventPortHolder element=InvalidTriggers::controller.outgoing [EventPort]
modeSwitchConjunctions[1] : ModeSwitchConjunction
modeSwitchTriggers[0] : EventDataPortHolder element=InvalidTriggers::controller.outgoing_data [EventDataPort]
transitions[2] : BehaviorTransition
condition : ModeSwitchTriggerLogicalExpression
modeSwitchConjunctions[0] : ModeSwitchConjunction
modeSwitchTriggers[0] : EventPortHolder element=InvalidTriggers::worker.incoming [EventPort] context=InvalidTriggers::controller.impl.child
modeSwitchTriggers[1] : EventDataPortHolder element=InvalidTriggers::worker.incoming_data [EventDataPort] context=InvalidTriggers::controller.impl.child
modeSwitchConjunctions[1] : ModeSwitchConjunction
transitions[3] : BehaviorTransition
condition : ModeSwitchTriggerLogicalExpression
modeSwitchConjunctions[0] : ModeSwitchConjunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
annex[0] owner=Issue3232::controller.impl
parsedAnnexSubclause : BehaviorAnnex name=behavior_specification
states[0] : BehaviorState name=waiting
states[1] : BehaviorState name=running
transitions[0] : BehaviorTransition
condition : ModeSwitchTriggerLogicalExpression
modeSwitchConjunctions[0] : ModeSwitchConjunction
modeSwitchTriggers[0] : EventPortHolder element=Issue3232::controller.incoming [EventPort]
modeSwitchTriggers[1] : EventDataPortHolder element=Issue3232::controller.incoming_data [EventDataPort]
modeSwitchConjunctions[1] : ModeSwitchConjunction
modeSwitchTriggers[0] : ModeSwitchTriggerLogicalExpression
modeSwitchConjunctions[0] : ModeSwitchConjunction
modeSwitchTriggers[0] : EventPortHolder element=Issue3232::controller.bidirectional [EventPort]
modeSwitchTriggers[1] : EventDataPortHolder element=Issue3232::controller.bidirectional_data [EventDataPort]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
annex[0] owner=ModeTriggers::controller.matching
parsedAnnexSubclause : BehaviorAnnex name=behavior_specification
states[0] : BehaviorState name=idle
states[1] : BehaviorState name=active
transitions[0] : BehaviorTransition
condition : ModeSwitchTriggerLogicalExpression
modeSwitchConjunctions[0] : ModeSwitchConjunction
modeSwitchTriggers[0] : EventPortHolder element=ModeTriggers::worker.outgoing [EventPort] context=ModeTriggers::controller.matching.first
annex[1] owner=ModeTriggers::controller.mismatching
parsedAnnexSubclause : BehaviorAnnex name=behavior_specification
states[0] : BehaviorState name=idle
states[1] : BehaviorState name=active
transitions[0] : BehaviorTransition
condition : ModeSwitchTriggerLogicalExpression
modeSwitchConjunctions[0] : ModeSwitchConjunction
modeSwitchTriggers[0] : EventPortHolder element=ModeTriggers::worker.outgoing [EventPort] context=ModeTriggers::controller.mismatching.second
Loading