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
8 changes: 4 additions & 4 deletions ba/doc/conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,23 @@ The review itself was a source and test-artifact audit. No Maven tests, simulato
| Section | Implemented capability and evidence | Assessment |
| --- | --- | --- |
| D.1–D.2: scope and concepts | Embedded `behavior_specification` parser, linker, serializer, and strict-model translation are registered. | Supports the language-tooling role; execution semantics require separate consumer evidence. |
| D.3: behavior specification | Variables, grouped states, state kinds, named/prioritized and multiple-source transitions, execute conditions, and a subset of dispatch/external conditions. State and transition legality checks have dedicated tests. | Partial. Internal conditions were absent (G01, since fixed) and the naming and otherwise-transition rules unenforced (V01 and V02, since fixed); mode binding is explicitly missing; multiple subprogram final states are rejected unconditionally; several consistency obligations lack demonstrated enforcement. |
| D.3: behavior specification | Variables, grouped states, state kinds, named/prioritized and multiple-source transitions, execute conditions, and dispatch/external conditions. State and transition legality checks have dedicated tests. | Partial. Internal conditions (G01) and complete external-condition expressions (G02) were absent, both since fixed, and the naming and otherwise-transition rules were unenforced (V01 and V02, since fixed); mode binding is explicitly missing; multiple subprogram final states are rejected unconditionally; several consistency obligations lack demonstrated enforcement. |
| D.4: thread dispatch | Dispatch conjunction/disjunction, `stop`, bare timeout, timeout with a duration, and an unparenthesized frozen-port list. Selected timeout/stop checks exist. | Partial. Required frozen-list parentheses were missing (G03) and timeout reset ports absent (G04), both since fixed. Full protocol/trigger compatibility and core-property consistency are not demonstrated. |
| D.5: component interactions | Port send/dequeue/freeze, count/fresh/updated, shared-data lock/unlock syntax, and subprogram-call syntax/model classes. | Partial. `updated` was absent (G07) and internal events were represented incorrectly (G10), both since fixed; call-signature and direction/category checks need additional coverage. Input/output timing consistency is not established. |
| D.6: action language | Assignment/`any`, sequences and sets, blocks, conditionals, explicit-type loops, timed actions and processor bindings. Conflicting assignments in action sets and static minimum/maximum computation-time checks exist. | Partial. Type conformance is disabled outright, so no assignment, send, dequeue, range, or parameter type mismatch is reported (G18). Optional loop classifiers are missing; loop-variable assignment rejection was not enforced by the existing covering-test expectation (G16, since fixed, though the dequeue form is still open as [#3205](https://github.com/osate/osate2/issues/3205)); action-timeout catch and combination rules are now checked (V03), while resource-release and signature obligations remain incomplete or unverified. |
| D.7: expressions | Boolean/numeric/string syntax, arithmetic/relational/logical operators, property references, indexing, and operator applicability checks per operand data representation. | Partial, with semantic preservation defects. Operand consistency between the two operands is not checked, only applicability of the operator to the first one (G18). Short-circuit logical operators and `updated` are now supported (#3169 and G07, since fixed); expression grouping/precedence and numeric translation differ from the document; initialization analysis is not demonstrated. |
| D.7: expressions | Boolean/numeric/string syntax, arithmetic/relational/logical operators, property references, indexing, and operator applicability checks per operand data representation. | Partial, with semantic preservation defects. Operand consistency between the two operands is not checked, only applicability of the operator to the first one (G18). Short-circuit logical operators, including in external conditions, and `updated` are now supported (#3166, #3169, and G07, since fixed); value-expression grouping/precedence and numeric translation differ from the document; initialization analysis is not demonstrated. |
| D.8: synchronization | `Behavior_Properties::Subprogram_Call_Protocol` declares HSER/LSER/ASER and defaults to HSER, matching the supplied document. A client/server example exists. | Property definition conforms. Enforcement of the two LSER/ASER legality rules and execution of the protocols are not established. |

Useful positive evidence includes [CoveringSyntaxTest](../../ba/org.osate.ba.tests/src/org/osate/ba/tests/CoveringSyntaxTest.xtend), [CoveringSemanticTest](../../ba/org.osate.ba.tests/src/org/osate/ba/tests/CoveringSemanticTest.xtend), [GrammarHazards.aadl](../../ba/org.osate.ba.tests/models/characterization/GrammarHazards.aadl), [BehaviorAnnexIntegrationTest](../../ba/org.osate.xtext.aadl2.ba.tests/src/org/osate/xtext/aadl2/ba/tests/BehaviorAnnexIntegrationTest.java), and [Issue3153Test](../../ba/org.osate.ba.tests/src/org/osate/ba/tests/Issue3153Test.java), [Issue3154Test](../../ba/org.osate.ba.tests/src/org/osate/ba/tests/Issue3154Test.java), and [Issue3155Test](../../ba/org.osate.ba.tests/src/org/osate/ba/tests/Issue3155Test.java). The latter tests establish specific diagnostic behavior and source locations, rather than general standard coverage.

## Ten gaps already identified by the conformance tests

All ten categories appear in [BehaviorAnnexConformanceTest](../../ba/org.osate.ba.tests/src/org/osate/ba/tests/characterization/BehaviorAnnexConformanceTest.java). At the review date its ten standard-outcome tests were all `@Ignore("Issue #2445: ...")`. After step 1 the class holds standard outcomes only: each skip names its own tracking issue instead of the umbrella #2445, and the paired "current failure" tests are gone because the golden suites compare the same diagnostics exactly. Step 1 left G03 as the single active expectation; seven are active now, as G01, G04, G05, G07, G08, and G10 were fixed, and the three that remain skipped are held against #3166, #3170, and #3173 by the class's `TRACKED_SKIPS` list. Twelve AADL fixtures are under [models/characterization/conformance](../../ba/org.osate.ba.tests/models/characterization/conformance).
All ten categories appear in [BehaviorAnnexConformanceTest](../../ba/org.osate.ba.tests/src/org/osate/ba/tests/characterization/BehaviorAnnexConformanceTest.java). At the review date its ten standard-outcome tests were all `@Ignore("Issue #2445: ...")`. After step 1 the class holds standard outcomes only: each skip names its own tracking issue instead of the umbrella #2445, and the paired "current failure" tests are gone because the golden suites compare the same diagnostics exactly. Step 1 left G03 as the single active expectation; eight are active now, as G01, G02, G04, G05, G07, G08, and G10 were fixed, and the two that remain skipped are held against #3170 and #3173 by the class's `TRACKED_SKIPS` list. Twelve AADL fixtures are under [models/characterization/conformance](../../ba/org.osate.ba.tests/models/characterization/conformance).

| ID | Standard requirement | Current implementation and test evidence | Status |
| --- | --- | --- | --- |
| G01 | D.3 `internal_condition`: `on internal` followed by internal ports separated by `or`. | `BehaviorCondition` has dispatch, mode-switch/external, and execute alternatives only. `InternalCondition.aadl` has recorded syntax errors. | Source-confirmed missing syntax. **Addressed by [#3165](https://github.com/osate/osate2/issues/3165):** the grammar gained an `InternalCondition` alternative, the strict model an `InternalCondition` class holding `InternalPortHolder`s, and the checkers the D.3 execution-state rule and D.6.(L11). The fixture needed one correction to be a legal positive case: its internal condition left an initial state, which the D.3 rule this work implements forbids. |
| G02 | D.3 `trigger_logical_expression` permits the D.7 logical operators and parenthesized event triggers. | `ModeSwitchCondition` only represents ORs of AND conjunctions, with reference leaves. `ExternalConditionXor.aadl` and `ExternalConditionGrouping.aadl` record syntax errors. | Source-confirmed incomplete syntax; also lacks short-circuit forms in external conditions. |
| G02 | D.3 `trigger_logical_expression` permits the D.7 logical operators and parenthesized event triggers. | **Addressed by [#3166](https://github.com/osate/osate2/issues/3166):** both levels of the external-condition grammar now retain their logical operators, parenthesized groups recursively contain a complete external condition, and the strict model mirrors that recursive structure. | Covered by the conformance fixtures and `Issue3166Test`, including every logical operator, event and event-data port resolution, strict-model preservation, and unparse/reparse of a parenthesized group. |
| G03 | D.4 `dispatch_condition` spells the optional list `frozen ( frozen_ports )`. | `DispatchCondition` requires references directly after `frozen`. `FrozenPortParentheses.aadl` records an error at `(`. | Source-confirmed rejection of standard syntax and acceptance of a nonstandard spelling. **Addressed by [#3167](https://github.com/osate/osate2/issues/3167):** the dispatch condition now requires a nonempty parenthesized, comma-separated frozen-port list and rejects the unparenthesized spelling it used to accept, so the fixture's expectation is active. Making every assignment in that rule optional had also left a bare `on dispatch` with no condition object at all, which the translator recovered by matching node text; that separate defect is [#3195](https://github.com/osate/osate2/issues/3195), also closed. |
| G04 | D.4 completion-relative timeout permits `timeout (p or q) behavior_time`. | `DispatchTriggerCondition` permits `timeout` and an optional time, without reset-port storage or syntax. `TimeoutResetPorts.aadl` records syntax errors. | Source-confirmed missing syntax and representation. **Addressed by [#3168](https://github.com/osate/osate2/issues/3168):** the grammar gained the parenthesized reset-port list, the strict model a `TimeoutResetPort` interface that `EventPortHolder` and `EventDataPortHolder` implement and a `resetPorts` list on `CompletionRelativeTimeout`, and the validator the two checks the new syntax makes reachable: a listed name that is not an event or event data port, and a reset-port list with no behavior time, which is neither D.4 timeout form. D.4 states no legality rule about reset ports themselves, and the existing D.4.(L1) and D.4.(L2) checks continue to apply to the timeout that carries them. |
| G05 | D.7 logical operators include `and then` and `or else`, with short-circuit meaning. | **Addressed by [#3169](https://github.com/osate/osate2/issues/3169):** dedicated grammar rules retain each multiword operator as one declarative value, and distinct strict-model literals preserve the short-circuit choice through translation and serialization. The existing logical-operator type check requires Boolean operands for both forms. `ShortCircuitOperators.aadl` now parses and validates without diagnostics. | Covered by the conformance fixture and `Issue3169Test`, including declarative/strict-model preservation, unparse/reparse, and invalid operand diagnostics. |
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions ba/org.osate.ba.edit/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -364,3 +364,5 @@ _UI_CompletionRelativeTimeout_resetPorts_feature = Reset Ports
_UI_BehaviorArraySize_type = Behavior Array Size
_UI_BehaviorArraySize_integerValue_feature = Integer Value
_UI_PortUpdatedValue_type = Port Updated Value
_UI_ModeSwitchTriggerLogicalExpression_logicalOperators_feature = Logical Operators
_UI_ModeSwitchConjunction_logicalOperators_feature = Logical Operators
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.osate.ba.aadlba.AadlBaFactory;
import org.osate.ba.aadlba.AadlBaPackage;
Expand Down Expand Up @@ -59,10 +61,27 @@ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);

addLogicalOperatorsPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}

/**
* This adds a property descriptor for the Logical Operators feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addLogicalOperatorsPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_ModeSwitchConjunction_logicalOperators_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_ModeSwitchConjunction_logicalOperators_feature", "_UI_ModeSwitchConjunction_type"),
AadlBaPackage.Literals.MODE_SWITCH_CONJUNCTION__LOGICAL_OPERATORS, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}

/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
Expand Down Expand Up @@ -127,6 +146,9 @@ public void notifyChanged(Notification notification) {
updateChildren(notification);

switch (notification.getFeatureID(ModeSwitchConjunction.class)) {
case AadlBaPackage.MODE_SWITCH_CONJUNCTION__LOGICAL_OPERATORS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case AadlBaPackage.MODE_SWITCH_CONJUNCTION__MODE_SWITCH_TRIGGERS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
Expand All @@ -152,6 +174,10 @@ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors
newChildDescriptors
.add(createChildParameter(AadlBaPackage.Literals.MODE_SWITCH_CONJUNCTION__MODE_SWITCH_TRIGGERS,
AadlBaFactory.eINSTANCE.createEventPortHolder()));

newChildDescriptors
.add(createChildParameter(AadlBaPackage.Literals.MODE_SWITCH_CONJUNCTION__MODE_SWITCH_TRIGGERS,
AadlBaFactory.eINSTANCE.createModeSwitchTriggerLogicalExpression()));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.osate.ba.aadlba.AadlBaFactory;
import org.osate.ba.aadlba.AadlBaPackage;
Expand Down Expand Up @@ -59,10 +61,28 @@ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);

addLogicalOperatorsPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}

/**
* This adds a property descriptor for the Logical Operators feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addLogicalOperatorsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(),
getString("_UI_ModeSwitchTriggerLogicalExpression_logicalOperators_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_ModeSwitchTriggerLogicalExpression_logicalOperators_feature",
"_UI_ModeSwitchTriggerLogicalExpression_type"),
AadlBaPackage.Literals.MODE_SWITCH_TRIGGER_LOGICAL_EXPRESSION__LOGICAL_OPERATORS, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}

/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
Expand Down Expand Up @@ -128,6 +148,9 @@ public void notifyChanged(Notification notification) {
updateChildren(notification);

switch (notification.getFeatureID(ModeSwitchTriggerLogicalExpression.class)) {
case AadlBaPackage.MODE_SWITCH_TRIGGER_LOGICAL_EXPRESSION__LOGICAL_OPERATORS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case AadlBaPackage.MODE_SWITCH_TRIGGER_LOGICAL_EXPRESSION__MODE_SWITCH_CONJUNCTIONS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
error | linking | 17 | 17 | 11 | Couldn't resolve reference to BehaviorState 'first_event'.
error | linking | 17 | 32 | 12 | Couldn't resolve reference to BehaviorState 'second_event'.
error | syntax | 17 | 16 | 1 | no viable alternative at input '('
error | syntax | 17 | 17 | 11 | missing ']->' at 'first_event'
error | syntax | 17 | 29 | 2 | mismatched input 'or' expecting ';'
error | syntax | 17 | 44 | 1 | mismatched input ')' expecting '-['
error | syntax | 17 | 56 | 1 | mismatched input ';' expecting '-['
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
error | linking | 17 | 32 | 12 | Couldn't resolve reference to BehaviorState 'second_event'.
error | syntax | 17 | 28 | 3 | mismatched input 'xor' expecting ']->'
error | syntax | 17 | 45 | 3 | missing '-[' at ']->'
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
error | linking | 17 | 17 | 11 | Couldn't resolve reference to BehaviorState 'first_event'.
error | linking | 17 | 32 | 12 | Couldn't resolve reference to BehaviorState 'second_event'.
error | syntax | 17 | 16 | 1 | no viable alternative at input '('
error | syntax | 17 | 17 | 11 | missing ']->' at 'first_event'
error | syntax | 17 | 29 | 2 | mismatched input 'or' expecting ';'
error | syntax | 17 | 44 | 1 | mismatched input ')' expecting '-['
error | syntax | 17 | 56 | 1 | mismatched input ';' expecting '-['
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
error | linking | 17 | 32 | 12 | Couldn't resolve reference to BehaviorState 'second_event'.
error | syntax | 17 | 28 | 3 | mismatched input 'xor' expecting ']->'
error | syntax | 17 | 45 | 3 | missing '-[' at ']->'
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
annex[0] owner=ExternalConditionGrouping::component.i
(BehaviorAnnex, behavior_specification, 324, 126)
(BehaviorCondition, <null>, 406, 32)
(BehaviorState, finish, 359, 6)
(BehaviorState, start, 334, 5)
(BehaviorStateGroup, <null>, 334, 21)
(BehaviorStateGroup, <null>, 359, 20)
(BehaviorTransition, <null>, 397, 27)
(BehaviorTransition, <null>, 425, 17)
(BehaviorTransition, <null>, 443, 7)
(BehaviorTransition, <null>, 397, 53)
(ModeSwitchCondition, <null>, 409, 29)
(ModeSwitchCondition, <null>, 410, 27)
(ModeSwitchConjunction, <null>, 409, 29)
(ModeSwitchConjunction, <null>, 410, 11)
(ModeSwitchConjunction, <null>, 425, 12)
(ModeSwitchTrigger, <null>, 409, 29)
(ModeSwitchTrigger, <null>, 410, 11)
(ModeSwitchTrigger, <null>, 425, 12)
(Reference, <null>, 410, 11)
(Reference, <null>, 425, 12)
(ReferenceSegment, first_event, 410, 11)
(ReferenceSegment, second_event, 425, 12)
Loading
Loading