diff --git a/ba/doc/conformance.md b/ba/doc/conformance.md index e0c10c5040..a187d348f0 100644 --- a/ba/doc/conformance.md +++ b/ba/doc/conformance.md @@ -28,9 +28,9 @@ The user directed that the report findings be treated as valid and filed without | G14 | [#3178](https://github.com/osate/osate2/issues/3178) | V11 | [#3192](https://github.com/osate/osate2/issues/3192) | | G18 | [#3199](https://github.com/osate/osate2/issues/3199) | | | -Closed since the review: G01 ([#3165](https://github.com/osate/osate2/issues/3165), internal conditions), G03 ([#3167](https://github.com/osate/osate2/issues/3167), frozen-port parentheses), G04 ([#3168](https://github.com/osate/osate2/issues/3168), timeout reset ports), G08 ([#3172](https://github.com/osate/osate2/issues/3172), `self` property references), G10 ([#3174](https://github.com/osate/osate2/issues/3174), internal port actions), G11 ([#3175](https://github.com/osate/osate2/issues/3175), numeric literals), G16 ([#3180](https://github.com/osate/osate2/issues/3180), loop-variable assignment targets), V01 ([#3182](https://github.com/osate/osate2/issues/3182), declaration naming rules), and V02 ([#3183](https://github.com/osate/osate2/issues/3183), otherwise-transition rules). G12 ([#3176](https://github.com/osate/osate2/issues/3176), array extents) is addressed on a branch whose pull request is still open, so it is the one row below whose fix is not yet on `master`. +Closed since the review: G01 ([#3165](https://github.com/osate/osate2/issues/3165), internal conditions), G03 ([#3167](https://github.com/osate/osate2/issues/3167), frozen-port parentheses), G04 ([#3168](https://github.com/osate/osate2/issues/3168), timeout reset ports), G08 ([#3172](https://github.com/osate/osate2/issues/3172), `self` property references), G10 ([#3174](https://github.com/osate/osate2/issues/3174), internal port actions), G11 ([#3175](https://github.com/osate/osate2/issues/3175), numeric literals), G16 ([#3180](https://github.com/osate/osate2/issues/3180), loop-variable assignment targets), V01 ([#3182](https://github.com/osate/osate2/issues/3182), declaration naming rules), and V02 ([#3183](https://github.com/osate/osate2/issues/3183), otherwise-transition rules). G12 ([#3176](https://github.com/osate/osate2/issues/3176), array extents) and its follow-ups [#3208](https://github.com/osate/osate2/issues/3208) and [#3210](https://github.com/osate/osate2/issues/3210) are addressed on branches not yet merged into `master`. -That work opened four defects the review itself did not name. [#3195](https://github.com/osate/osate2/issues/3195), a bare `on dispatch` losing its condition unless exactly one space separated the keywords, is closed. Three are open: [#3205](https://github.com/osate/osate2/issues/3205), the dequeue form of the G16 rule, which the assignment check did not reach; and [#3208](https://github.com/osate/osate2/issues/3208) and [#3210](https://github.com/osate/osate2/issues/3210), both from G12 and both described in that row. Each row's assessment below still describes the state at the review date unless it says otherwise. +That work opened four defects the review itself did not name: [#3195](https://github.com/osate/osate2/issues/3195), a bare `on dispatch` losing its condition unless exactly one space separated the keywords; [#3205](https://github.com/osate/osate2/issues/3205), the dequeue form of the G16 rule, which the assignment check did not reach; and [#3208](https://github.com/osate/osate2/issues/3208) and [#3210](https://github.com/osate/osate2/issues/3210), both from G12 and both described in that row. Each row's assessment below still describes the state at the review date unless it says otherwise. ## Reference and review method @@ -109,7 +109,7 @@ Consequently, source inspection establishes that a real such as `1.25` becomes z **Impact:** Rank is retained but extent is lost. A declaration of a ten-element behavior variable is not represented as a ten-element strict variable. Add direct extent and referenced-size assertions; tree-shape goldens cannot catch this. -**Addressed by [#3176](https://github.com/osate/osate2/issues/3176), whose pull request is still open:** `translateVariables` now translates each declared size, so a literal extent becomes the `ArraySize` extent through the same core AADL literal reader the other literals use, and a reference to a property constant becomes the dimension's size property, which is how core AADL represents that size and what `AadlUtil.getElementCount` resolves. Each dimension and each size also traces to the syntax that supplied it rather than to the dimension. `Issue3176Test` asserts extents, the resolved element count, and both traces; the resolved-model goldens record containment only and cannot see an extent. What remains, both confirmed by external models that are accepted with zero diagnostics and translate to a zero extent: `aadl2::ArraySize` carries a literal or a property constant only, so a size written as any other property reference loses its extent even where the element carrying the value is named, which is a representation gap tracked as [#3210](https://github.com/osate/osate2/issues/3210); and the relaxed grammar also accepts a size that names a variable, which D.3 does not admit for an integer value constant, so that is a missing legality check tracked as [#3208](https://github.com/osate/osate2/issues/3208). The two share one grammar node: a `ReferenceExpression` with a property tail is the admissible property reference, without one it is the inadmissible variable. +**Addressed by [#3176](https://github.com/osate/osate2/issues/3176), [#3208](https://github.com/osate/osate2/issues/3208), and [#3210](https://github.com/osate/osate2/issues/3210):** `translateVariables` now translates each declared size, so a literal extent becomes the `ArraySize` extent through the same core AADL literal reader the other literals use, and a reference to a property constant becomes the dimension's size property, which is how core AADL represents that size and what `AadlUtil.getElementCount` resolves. Each dimension and each size also traces to the syntax that supplied it rather than to the dimension. `Issue3176Test` asserts extents, the resolved element count, and both traces; the resolved-model goldens record containment only and cannot see an extent. Validation rejects an ordinary reference expression such as a behavior variable, which D.3 does not admit for an integer value constant. An element-prefixed property reference with one non-modal integer value is evaluated into the strict extent; a property reference without an unambiguous value, including a bare property definition with no value owner, is reported on the size and kept out of the strict-model checkers rather than becoming a zero extent. `Issue3208Test` and `Issue3210Test` assert the rejected forms alongside accepted literal, property-constant, and unambiguous prefixed-property controls. ### G13 — Expression precedence, admissible forms, and grouping are inconsistent diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorBooleanLiteral.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorBooleanLiteral.gif new file mode 100644 index 0000000000..e0a45416a6 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorBooleanLiteral.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorIntegerLiteral.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorIntegerLiteral.gif new file mode 100644 index 0000000000..35b22bb9c9 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorIntegerLiteral.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorPropertyConstant.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorPropertyConstant.gif new file mode 100644 index 0000000000..d065203095 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorPropertyConstant.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorRealLiteral.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorRealLiteral.gif new file mode 100644 index 0000000000..b7adb367b9 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorRealLiteral.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorStringLiteral.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorStringLiteral.gif new file mode 100644 index 0000000000..da5f95c146 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorStringLiteral.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorVariableHolder.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorVariableHolder.gif new file mode 100644 index 0000000000..28de654b29 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_BehaviorVariableHolder.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_ClassifierFeaturePropertyReference.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_ClassifierFeaturePropertyReference.gif new file mode 100644 index 0000000000..1329dce960 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_ClassifierFeaturePropertyReference.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_ClassifierPropertyReference.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_ClassifierPropertyReference.gif new file mode 100644 index 0000000000..bee2a07517 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_ClassifierPropertyReference.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataAccessHolder.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataAccessHolder.gif new file mode 100644 index 0000000000..53810673cf Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataAccessHolder.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataAccessPrototypeHolder.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataAccessPrototypeHolder.gif new file mode 100644 index 0000000000..9e35a4ed49 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataAccessPrototypeHolder.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataComponentReference.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataComponentReference.gif new file mode 100644 index 0000000000..4f7ee52acf Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataComponentReference.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataPortHolder.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataPortHolder.gif new file mode 100644 index 0000000000..b9cd878de7 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataPortHolder.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataSubcomponentHolder.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataSubcomponentHolder.gif new file mode 100644 index 0000000000..b7adb367b9 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_DataSubcomponentHolder.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_EventDataPortHolder.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_EventDataPortHolder.gif new file mode 100644 index 0000000000..b98197751d Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_EventDataPortHolder.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_EventPortHolder.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_EventPortHolder.gif new file mode 100644 index 0000000000..6f74245406 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_EventPortHolder.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_FeaturePrototypeHolder.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_FeaturePrototypeHolder.gif new file mode 100644 index 0000000000..e88df1ce2b Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_FeaturePrototypeHolder.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_IterativeVariableHolder.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_IterativeVariableHolder.gif new file mode 100644 index 0000000000..9a2424e4ee Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_IterativeVariableHolder.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_ParameterHolder.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_ParameterHolder.gif new file mode 100644 index 0000000000..84f99e615d Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_ParameterHolder.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortCountValue.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortCountValue.gif new file mode 100644 index 0000000000..c022715faf Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortCountValue.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortDequeueValue.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortDequeueValue.gif new file mode 100644 index 0000000000..5fe40c460d Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortDequeueValue.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortFreezeAction.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortFreezeAction.gif new file mode 100644 index 0000000000..0cf27b2923 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortFreezeAction.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortFreshValue.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortFreshValue.gif new file mode 100644 index 0000000000..fa814dc54f Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortFreshValue.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortPrototypeHolder.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortPrototypeHolder.gif new file mode 100644 index 0000000000..d4cb25e96e Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PortPrototypeHolder.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PropertySetPropertyReference.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PropertySetPropertyReference.gif new file mode 100644 index 0000000000..f66fdd6f68 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_PropertySetPropertyReference.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_StructUnionElementHolder.gif b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_StructUnionElementHolder.gif new file mode 100644 index 0000000000..fa814dc54f Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/ctool16/CreateBehaviorArraySize_integerValue_StructUnionElementHolder.gif differ diff --git a/ba/org.osate.ba.edit/icons/full/obj16/BehaviorArraySize.gif b/ba/org.osate.ba.edit/icons/full/obj16/BehaviorArraySize.gif new file mode 100644 index 0000000000..338fb8d9a7 Binary files /dev/null and b/ba/org.osate.ba.edit/icons/full/obj16/BehaviorArraySize.gif differ diff --git a/ba/org.osate.ba.edit/plugin.properties b/ba/org.osate.ba.edit/plugin.properties index 7c50f862c2..f59112020d 100644 --- a/ba/org.osate.ba.edit/plugin.properties +++ b/ba/org.osate.ba.edit/plugin.properties @@ -359,3 +359,5 @@ _UI_InternalCondition_type = Internal Condition _UI_InternalCondition_internalPorts_feature = Internal Ports _UI_TimeoutResetPort_type = Timeout Reset Port _UI_CompletionRelativeTimeout_resetPorts_feature = Reset Ports +_UI_BehaviorArraySize_type = Behavior Array Size +_UI_BehaviorArraySize_integerValue_feature = Integer Value diff --git a/ba/org.osate.ba.edit/src/org/osate/ba/aadlba/provider/AadlBaItemProviderAdapterFactory.java b/ba/org.osate.ba.edit/src/org/osate/ba/aadlba/provider/AadlBaItemProviderAdapterFactory.java index bb3a444c2a..89c3fef7b5 100644 --- a/ba/org.osate.ba.edit/src/org/osate/ba/aadlba/provider/AadlBaItemProviderAdapterFactory.java +++ b/ba/org.osate.ba.edit/src/org/osate/ba/aadlba/provider/AadlBaItemProviderAdapterFactory.java @@ -248,6 +248,29 @@ public Adapter createBehaviorAnnexAdapter() { return behaviorAnnexItemProvider; } + /** + * This keeps track of the one adapter used for all {@link org.osate.ba.aadlba.BehaviorArraySize} instances. + * + * + * @generated + */ + protected BehaviorArraySizeItemProvider behaviorArraySizeItemProvider; + + /** + * This creates an adapter for a {@link org.osate.ba.aadlba.BehaviorArraySize}. + * + * + * @generated + */ + @Override + public Adapter createBehaviorArraySizeAdapter() { + if (behaviorArraySizeItemProvider == null) { + behaviorArraySizeItemProvider = new BehaviorArraySizeItemProvider(this); + } + + return behaviorArraySizeItemProvider; + } + /** * This keeps track of the one adapter used for all {@link org.osate.ba.aadlba.BehaviorBooleanLiteral} instances. * @@ -2191,6 +2214,9 @@ public void dispose() { if (behaviorAnnexItemProvider != null) { behaviorAnnexItemProvider.dispose(); } + if (behaviorArraySizeItemProvider != null) { + behaviorArraySizeItemProvider.dispose(); + } if (behaviorBooleanLiteralItemProvider != null) { behaviorBooleanLiteralItemProvider.dispose(); } diff --git a/ba/org.osate.ba.edit/src/org/osate/ba/aadlba/provider/BehaviorArraySizeItemProvider.java b/ba/org.osate.ba.edit/src/org/osate/ba/aadlba/provider/BehaviorArraySizeItemProvider.java new file mode 100644 index 0000000000..692fa4f96e --- /dev/null +++ b/ba/org.osate.ba.edit/src/org/osate/ba/aadlba/provider/BehaviorArraySizeItemProvider.java @@ -0,0 +1,238 @@ +/** + * 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 + * program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the Eclipse Public License for + * more details. You should have received a copy of the Eclipse Public License + * along with this program. If not, see + * https://www.eclipse.org/legal/epl-2.0/ + */ +package org.osate.ba.aadlba.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.osate.aadl2.provider.ArraySizeItemProvider; +import org.osate.ba.aadlba.AadlBaFactory; +import org.osate.ba.aadlba.AadlBaPackage; +import org.osate.ba.aadlba.BehaviorArraySize; + +/** + * This is the item provider adapter for a {@link org.osate.ba.aadlba.BehaviorArraySize} object. + * + * + * @generated + */ +public class BehaviorArraySizeItemProvider extends ArraySizeItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public BehaviorArraySizeItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * 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 + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns BehaviorArraySize.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/BehaviorArraySize")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + BehaviorArraySize behaviorArraySize = (BehaviorArraySize) object; + return getString("_UI_BehaviorArraySize_type") + " " + behaviorArraySize.getSize(); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(BehaviorArraySize.class)) { + case AadlBaPackage.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createBehaviorBooleanLiteral())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createBehaviorIntegerLiteral())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createBehaviorPropertyConstant())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createBehaviorRealLiteral())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createBehaviorStringLiteral())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createBehaviorVariableHolder())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createClassifierFeaturePropertyReference())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createClassifierPropertyReference())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createDataAccessHolder())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createDataAccessPrototypeHolder())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createDataComponentReference())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createDataPortHolder())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createDataSubcomponentHolder())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createEventDataPortHolder())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createEventPortHolder())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createFeaturePrototypeHolder())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createIterativeVariableHolder())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createParameterHolder())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createPortCountValue())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createPortDequeueValue())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createPortFreezeAction())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createPortFreshValue())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createPortPrototypeHolder())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createPropertySetPropertyReference())); + + newChildDescriptors.add(createChildParameter(AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + AadlBaFactory.eINSTANCE.createStructUnionElementHolder())); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return AadlbaEditPlugin.INSTANCE; + } + +} diff --git a/ba/org.osate.ba.tests/expected/diagnostics-validated/org.osate.ba.tests_models_issue3208_Issue3208.txt b/ba/org.osate.ba.tests/expected/diagnostics-validated/org.osate.ba.tests_models_issue3208_Issue3208.txt new file mode 100644 index 0000000000..b65cc9ee34 --- /dev/null +++ b/ba/org.osate.ba.tests/expected/diagnostics-validated/org.osate.ba.tests_models_issue3208_Issue3208.txt @@ -0,0 +1 @@ +error | semantic | 40 | 16 | 5 | Array size 'slots' must be an integer literal or a property reference diff --git a/ba/org.osate.ba.tests/expected/diagnostics-validated/org.osate.ba.tests_models_issue3210_BareProperty.txt b/ba/org.osate.ba.tests/expected/diagnostics-validated/org.osate.ba.tests_models_issue3210_BareProperty.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ba/org.osate.ba.tests/expected/diagnostics-validated/org.osate.ba.tests_models_issue3210_ContainedProperty.txt b/ba/org.osate.ba.tests/expected/diagnostics-validated/org.osate.ba.tests_models_issue3210_ContainedProperty.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ba/org.osate.ba.tests/expected/diagnostics-validated/org.osate.ba.tests_models_issue3210_Issue3210.txt b/ba/org.osate.ba.tests/expected/diagnostics-validated/org.osate.ba.tests_models_issue3210_Issue3210.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ba/org.osate.ba.tests/expected/diagnostics/org.osate.ba.tests_models_issue3208_Issue3208.txt b/ba/org.osate.ba.tests/expected/diagnostics/org.osate.ba.tests_models_issue3208_Issue3208.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ba/org.osate.ba.tests/expected/diagnostics/org.osate.ba.tests_models_issue3210_BareProperty.txt b/ba/org.osate.ba.tests/expected/diagnostics/org.osate.ba.tests_models_issue3210_BareProperty.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ba/org.osate.ba.tests/expected/diagnostics/org.osate.ba.tests_models_issue3210_ContainedProperty.txt b/ba/org.osate.ba.tests/expected/diagnostics/org.osate.ba.tests_models_issue3210_ContainedProperty.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ba/org.osate.ba.tests/expected/diagnostics/org.osate.ba.tests_models_issue3210_Issue3210.txt b/ba/org.osate.ba.tests/expected/diagnostics/org.osate.ba.tests_models_issue3210_Issue3210.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ba/org.osate.ba.tests/expected/positions/org.osate.ba.tests_models_issue3208_Issue3208.txt b/ba/org.osate.ba.tests/expected/positions/org.osate.ba.tests_models_issue3208_Issue3208.txt new file mode 100644 index 0000000000..13e0969134 --- /dev/null +++ b/ba/org.osate.ba.tests/expected/positions/org.osate.ba.tests_models_issue3208_Issue3208.txt @@ -0,0 +1,33 @@ +annex[0] owner=Issue3208::sizer.impl + (ArrayDimension, , 2022, 3) + (ArrayDimension, , 2063, 32) + (ArrayDimension, , 2133, 7) + (BehaviorAnnex, behavior_specification, 1966, 365) + (BehaviorCondition, , 2303, 19) + (BehaviorIntegerLiteral, , 2023, 1) + (BehaviorState, done, 2233, 4) + (BehaviorState, ready, 2205, 5) + (BehaviorState, start, 2178, 5) + (BehaviorStateGroup, , 2178, 22) + (BehaviorStateGroup, , 2205, 23) + (BehaviorStateGroup, , 2233, 19) + (BehaviorTransition, , 2272, 18) + (BehaviorTransition, , 2295, 36) + (BehaviorVariable, byConstant, 2053, 42) + (BehaviorVariable, byLiteral, 2013, 12) + (BehaviorVariable, byVariable, 2123, 17) + (BehaviorVariable, slots, 1980, 5) + (BehaviorVariableGroup, , 1980, 28) + (BehaviorVariableGroup, , 2013, 35) + (BehaviorVariableGroup, , 2053, 65) + (BehaviorVariableGroup, , 2123, 40) + (DispatchCondition, , 2306, 16) + (DispatchConjunction, , 2315, 7) + (DispatchTriggerCondition, , 2315, 7) + (DispatchTriggerLogicalExpression, , 2315, 7) + (HashPropertyReference, , 2064, 30) + (Reference, , 2134, 5) + (Reference, , 2315, 7) + (ReferenceExpression, , 2134, 5) + (ReferenceSegment, slots, 2134, 5) + (ReferenceSegment, trigger, 2315, 7) diff --git a/ba/org.osate.ba.tests/expected/positions/org.osate.ba.tests_models_issue3210_BareProperty.txt b/ba/org.osate.ba.tests/expected/positions/org.osate.ba.tests_models_issue3210_BareProperty.txt new file mode 100644 index 0000000000..1cde3e6ed0 --- /dev/null +++ b/ba/org.osate.ba.tests/expected/positions/org.osate.ba.tests_models_issue3210_BareProperty.txt @@ -0,0 +1,21 @@ +annex[0] owner=BareProperty::sizer.impl + (ArrayDimension, , 1993, 40) + (BehaviorAnnex, behavior_specification, 1969, 255) + (BehaviorCondition, , 2196, 19) + (BehaviorState, done, 2126, 4) + (BehaviorState, ready, 2098, 5) + (BehaviorState, start, 2071, 5) + (BehaviorStateGroup, , 2071, 22) + (BehaviorStateGroup, , 2098, 23) + (BehaviorStateGroup, , 2126, 19) + (BehaviorTransition, , 2165, 18) + (BehaviorTransition, , 2188, 36) + (BehaviorVariable, byProperty, 1983, 50) + (BehaviorVariableGroup, , 1983, 73) + (DispatchCondition, , 2199, 16) + (DispatchConjunction, , 2208, 7) + (DispatchTriggerCondition, , 2208, 7) + (DispatchTriggerLogicalExpression, , 2208, 7) + (HashPropertyReference, , 1994, 38) + (Reference, , 2208, 7) + (ReferenceSegment, trigger, 2208, 7) diff --git a/ba/org.osate.ba.tests/expected/positions/org.osate.ba.tests_models_issue3210_ContainedProperty.txt b/ba/org.osate.ba.tests/expected/positions/org.osate.ba.tests_models_issue3210_ContainedProperty.txt new file mode 100644 index 0000000000..7d7300e941 --- /dev/null +++ b/ba/org.osate.ba.tests/expected/positions/org.osate.ba.tests_models_issue3210_ContainedProperty.txt @@ -0,0 +1,24 @@ +annex[0] owner=ContainedProperty::sizer.impl + (ArrayDimension, , 2043, 18) + (BehaviorAnnex, behavior_specification, 2024, 228) + (BehaviorCondition, , 2224, 19) + (BehaviorState, done, 2154, 4) + (BehaviorState, ready, 2126, 5) + (BehaviorState, start, 2099, 5) + (BehaviorStateGroup, , 2099, 22) + (BehaviorStateGroup, , 2126, 23) + (BehaviorStateGroup, , 2154, 19) + (BehaviorTransition, , 2193, 18) + (BehaviorTransition, , 2216, 36) + (BehaviorVariable, sized, 2038, 23) + (BehaviorVariableGroup, , 2038, 46) + (DispatchCondition, , 2227, 16) + (DispatchConjunction, , 2236, 7) + (DispatchTriggerCondition, , 2236, 7) + (DispatchTriggerLogicalExpression, , 2236, 7) + (PropertyReferenceTail, , 2049, 11) + (Reference, , 2044, 5) + (Reference, , 2236, 7) + (ReferenceExpression, , 2044, 16) + (ReferenceSegment, input, 2044, 5) + (ReferenceSegment, trigger, 2236, 7) diff --git a/ba/org.osate.ba.tests/expected/positions/org.osate.ba.tests_models_issue3210_Issue3210.txt b/ba/org.osate.ba.tests/expected/positions/org.osate.ba.tests_models_issue3210_Issue3210.txt new file mode 100644 index 0000000000..b5110ddb12 --- /dev/null +++ b/ba/org.osate.ba.tests/expected/positions/org.osate.ba.tests_models_issue3210_Issue3210.txt @@ -0,0 +1,32 @@ +annex[0] owner=Issue3210::sizer.impl + (ArrayDimension, , 2060, 3) + (ArrayDimension, , 2101, 32) + (ArrayDimension, , 2171, 18) + (BehaviorAnnex, behavior_specification, 2037, 343) + (BehaviorCondition, , 2352, 19) + (BehaviorIntegerLiteral, , 2061, 1) + (BehaviorState, done, 2282, 4) + (BehaviorState, ready, 2254, 5) + (BehaviorState, start, 2227, 5) + (BehaviorStateGroup, , 2227, 22) + (BehaviorStateGroup, , 2254, 23) + (BehaviorStateGroup, , 2282, 19) + (BehaviorTransition, , 2321, 18) + (BehaviorTransition, , 2344, 36) + (BehaviorVariable, byConstant, 2091, 42) + (BehaviorVariable, byLiteral, 2051, 12) + (BehaviorVariable, byPrefixed, 2161, 28) + (BehaviorVariableGroup, , 2051, 35) + (BehaviorVariableGroup, , 2091, 65) + (BehaviorVariableGroup, , 2161, 51) + (DispatchCondition, , 2355, 16) + (DispatchConjunction, , 2364, 7) + (DispatchTriggerCondition, , 2364, 7) + (DispatchTriggerLogicalExpression, , 2364, 7) + (HashPropertyReference, , 2102, 30) + (PropertyReferenceTail, , 2177, 11) + (Reference, , 2172, 5) + (Reference, , 2364, 7) + (ReferenceExpression, , 2172, 16) + (ReferenceSegment, input, 2172, 5) + (ReferenceSegment, trigger, 2364, 7) diff --git a/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_covering_syntax_aadlBaTest001.txt b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_covering_syntax_aadlBaTest001.txt index 2bc149e8e4..871b4b09da 100644 --- a/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_covering_syntax_aadlBaTest001.txt +++ b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_covering_syntax_aadlBaTest001.txt @@ -20,15 +20,19 @@ annex[1] owner=NamesResolutionTest::thread1.impl variables[3] : BehaviorVariable name=tmp0 variables[4] : BehaviorVariable name=tab arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral variables[5] : BehaviorVariable name=squareTab arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral arrayDimension[1] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral variables[6] : BehaviorVariable name=tab2 arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorPropertyConstant variables[7] : BehaviorVariable name=tmp1 variables[8] : BehaviorVariable name=tmp2 variables[9] : BehaviorVariable name=tmp3 diff --git a/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_covering_syntax_aadlBaTest002.txt b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_covering_syntax_aadlBaTest002.txt index 62f7db5432..18bd3d17fb 100644 --- a/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_covering_syntax_aadlBaTest002.txt +++ b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_covering_syntax_aadlBaTest002.txt @@ -11,7 +11,8 @@ annex[0] owner=DataTypeCheckerTest::concreteThread.impl variables[8] : BehaviorVariable name=int3 variables[9] : BehaviorVariable name=tab arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral variables[10] : BehaviorVariable name=nat1 variables[11] : BehaviorVariable name=nat2 variables[12] : BehaviorVariable name=nat3 diff --git a/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_covering_syntax_aadlBaTest003.txt b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_covering_syntax_aadlBaTest003.txt index 2a01fed9a6..d887de6297 100644 --- a/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_covering_syntax_aadlBaTest003.txt +++ b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_covering_syntax_aadlBaTest003.txt @@ -5,7 +5,8 @@ annex[0] owner=DataStructPrototypeTest::concreteThread.impl variables[2] : BehaviorVariable name=localMyStruct_A variables[3] : BehaviorVariable name=localArrayMyStruct_A arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral variables[4] : BehaviorVariable name=localMyStruct_B variables[5] : BehaviorVariable name=localMyArray_Integer_A variables[6] : BehaviorVariable name=localMyArray_Integer_B @@ -15,23 +16,30 @@ annex[0] owner=DataStructPrototypeTest::concreteThread.impl variables[10] : BehaviorVariable name=localMyIntegerArray_B variables[11] : BehaviorVariable name=localMyIntegerArray_C arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral arrayDimension[1] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral variables[12] : BehaviorVariable name=localOtherMyIntegerArray_B arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral arrayDimension[1] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral arrayDimension[2] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral variables[13] : BehaviorVariable name=localMyEnum variables[14] : BehaviorVariable name=localDay variables[15] : BehaviorVariable name=squareTab arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral arrayDimension[1] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorPropertyConstant states[0] : BehaviorState name=uniqueState states[1] : BehaviorState name=a transitions[0] : BehaviorTransition @@ -799,7 +807,8 @@ annex[1] owner=DataStructPrototypeTest::MySubProgConcrete variables[0] : BehaviorVariable name=localMyStruct_B variables[1] : BehaviorVariable name=tab arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral states[0] : BehaviorState name=uniqueState states[1] : BehaviorState name=a transitions[0] : BehaviorTransition diff --git a/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue2459_issue2459.txt b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue2459_issue2459.txt index 1b44e707fe..8de4fdaf9d 100644 --- a/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue2459_issue2459.txt +++ b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue2459_issue2459.txt @@ -2,7 +2,8 @@ annex[0] owner=issue2459::top parsedAnnexSubclause : BehaviorAnnex name=behavior_specification variables[0] : BehaviorVariable name=bool1 arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral states[0] : BehaviorState name=s3 transitions[0] : BehaviorTransition name=t1 condition : ValueExpression diff --git a/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3176_Issue3176.txt b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3176_Issue3176.txt index bff2c897b4..486268c674 100644 --- a/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3176_Issue3176.txt +++ b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3176_Issue3176.txt @@ -2,28 +2,36 @@ annex[0] owner=Issue3176::collector.impl parsedAnnexSubclause : BehaviorAnnex name=behavior_specification variables[0] : BehaviorVariable name=samples arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral variables[1] : BehaviorVariable name=window arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral variables[2] : BehaviorVariable name=history arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral variables[3] : BehaviorVariable name=grid arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral arrayDimension[1] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral variables[4] : BehaviorVariable name=left arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral variables[5] : BehaviorVariable name=right arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral variables[6] : BehaviorVariable name=total variables[7] : BehaviorVariable name=buffer arrayDimension[0] : ArrayDimension - size : ArraySize + size : BehaviorArraySize + integerValue : BehaviorPropertyConstant states[0] : BehaviorState name=start states[1] : BehaviorState name=ready states[2] : BehaviorState name=done diff --git a/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3208_Issue3208.txt b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3208_Issue3208.txt new file mode 100644 index 0000000000..d23f50d8b0 --- /dev/null +++ b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3208_Issue3208.txt @@ -0,0 +1,24 @@ +annex[0] owner=Issue3208::sizer.impl + parsedAnnexSubclause : BehaviorAnnex name=behavior_specification + variables[0] : BehaviorVariable name=slots + variables[1] : BehaviorVariable name=byLiteral + arrayDimension[0] : ArrayDimension + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral + variables[2] : BehaviorVariable name=byConstant + arrayDimension[0] : ArrayDimension + size : BehaviorArraySize + integerValue : BehaviorPropertyConstant + variables[3] : BehaviorVariable name=byVariable + arrayDimension[0] : ArrayDimension + size : BehaviorArraySize + integerValue : BehaviorVariableHolder element=slots [BehaviorVariable] + states[0] : BehaviorState name=start + states[1] : BehaviorState name=ready + states[2] : BehaviorState name=done + transitions[0] : BehaviorTransition + transitions[1] : BehaviorTransition + condition : DispatchCondition + dispatchTriggerCondition : DispatchTriggerLogicalExpression + dispatchConjunctions[0] : DispatchConjunction + dispatchTriggers[0] : EventPortHolder element=Issue3208::sizer.trigger [EventPort] diff --git a/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3210_BareProperty.txt b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3210_BareProperty.txt new file mode 100644 index 0000000000..f6e31df6b6 --- /dev/null +++ b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3210_BareProperty.txt @@ -0,0 +1,17 @@ +annex[0] owner=BareProperty::sizer.impl + parsedAnnexSubclause : BehaviorAnnex name=behavior_specification + variables[0] : BehaviorVariable name=byProperty + arrayDimension[0] : ArrayDimension + size : BehaviorArraySize + integerValue : PropertySetPropertyReference + properties[0] : PropertyNameHolder + property : PropertyExpressionHolder element=IntegerLiteral [IntegerLiteral] + states[0] : BehaviorState name=start + states[1] : BehaviorState name=ready + states[2] : BehaviorState name=done + transitions[0] : BehaviorTransition + transitions[1] : BehaviorTransition + condition : DispatchCondition + dispatchTriggerCondition : DispatchTriggerLogicalExpression + dispatchConjunctions[0] : DispatchConjunction + dispatchTriggers[0] : EventPortHolder element=BareProperty::sizer.trigger [EventPort] diff --git a/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3210_ContainedProperty.txt b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3210_ContainedProperty.txt new file mode 100644 index 0000000000..df90e4f638 --- /dev/null +++ b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3210_ContainedProperty.txt @@ -0,0 +1,18 @@ +annex[0] owner=ContainedProperty::sizer.impl + parsedAnnexSubclause : BehaviorAnnex name=behavior_specification + variables[0] : BehaviorVariable name=sized + arrayDimension[0] : ArrayDimension + size : BehaviorArraySize + integerValue : ClassifierFeaturePropertyReference + properties[0] : PropertyNameHolder + property : BasicPropertyHolder element=Communication_Properties::Queue_Size [Property] + component : EventDataPortHolder element=ContainedProperty::sizer.input [EventDataPort] + states[0] : BehaviorState name=start + states[1] : BehaviorState name=ready + states[2] : BehaviorState name=done + transitions[0] : BehaviorTransition + transitions[1] : BehaviorTransition + condition : DispatchCondition + dispatchTriggerCondition : DispatchTriggerLogicalExpression + dispatchConjunctions[0] : DispatchConjunction + dispatchTriggers[0] : EventPortHolder element=ContainedProperty::sizer.trigger [EventPort] diff --git a/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3210_Issue3210.txt b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3210_Issue3210.txt new file mode 100644 index 0000000000..fe3a35c743 --- /dev/null +++ b/ba/org.osate.ba.tests/expected/resolved-model/org.osate.ba.tests_models_issue3210_Issue3210.txt @@ -0,0 +1,26 @@ +annex[0] owner=Issue3210::sizer.impl + parsedAnnexSubclause : BehaviorAnnex name=behavior_specification + variables[0] : BehaviorVariable name=byLiteral + arrayDimension[0] : ArrayDimension + size : BehaviorArraySize + integerValue : BehaviorIntegerLiteral + variables[1] : BehaviorVariable name=byConstant + arrayDimension[0] : ArrayDimension + size : BehaviorArraySize + integerValue : BehaviorPropertyConstant + variables[2] : BehaviorVariable name=byPrefixed + arrayDimension[0] : ArrayDimension + size : BehaviorArraySize + integerValue : ClassifierFeaturePropertyReference + properties[0] : PropertyNameHolder + property : PropertyAssociationHolder element=PropertyAssociation [PropertyAssociation] + component : EventDataPortHolder element=Issue3210::sizer.input [EventDataPort] + states[0] : BehaviorState name=start + states[1] : BehaviorState name=ready + states[2] : BehaviorState name=done + transitions[0] : BehaviorTransition + transitions[1] : BehaviorTransition + condition : DispatchCondition + dispatchTriggerCondition : DispatchTriggerLogicalExpression + dispatchConjunctions[0] : DispatchConjunction + dispatchTriggers[0] : EventPortHolder element=Issue3210::sizer.trigger [EventPort] diff --git a/ba/org.osate.ba.tests/expected/unparse/org.osate.ba.tests_models_issue3208_Issue3208.txt b/ba/org.osate.ba.tests/expected/unparse/org.osate.ba.tests_models_issue3208_Issue3208.txt new file mode 100644 index 0000000000..8c9158523a --- /dev/null +++ b/ba/org.osate.ba.tests/expected/unparse/org.osate.ba.tests_models_issue3208_Issue3208.txt @@ -0,0 +1,17 @@ +===== annex[0] owner=Issue3208::sizer.impl ===== + +\t\t\tvariables +\t\t\t\tslots : Base_Types::Integer; +\t\t\t\tbyLiteral[8] : Base_Types::Integer; +\t\t\t\tbyConstant[# AADL_Project::Max_Queue_Size] : Base_Types::Integer; +\t\t\t\tbyVariable[slots] : Base_Types::Integer; +\t\t\tstates +\t\t\t\tstart : initial state; +\t\t\t\tready : complete state; +\t\t\t\tdone : final state; +\t\t\ttransitions +\t\t\t\tstart -[]-> ready; +\t\t\t\tready -[on dispatch trigger]-> done; +\t\t +----- Xtext reparse ----- +reparsed diff --git a/ba/org.osate.ba.tests/expected/unparse/org.osate.ba.tests_models_issue3210_BareProperty.txt b/ba/org.osate.ba.tests/expected/unparse/org.osate.ba.tests_models_issue3210_BareProperty.txt new file mode 100644 index 0000000000..69606f19a3 --- /dev/null +++ b/ba/org.osate.ba.tests/expected/unparse/org.osate.ba.tests_models_issue3210_BareProperty.txt @@ -0,0 +1,14 @@ +===== annex[0] owner=BareProperty::sizer.impl ===== + +\t\t\tvariables +\t\t\t\tbyProperty[# Communication_Properties::Queue_Size] : Base_Types::Integer; +\t\t\tstates +\t\t\t\tstart : initial state; +\t\t\t\tready : complete state; +\t\t\t\tdone : final state; +\t\t\ttransitions +\t\t\t\tstart -[]-> ready; +\t\t\t\tready -[on dispatch trigger]-> done; +\t\t +----- Xtext reparse ----- +reparsed diff --git a/ba/org.osate.ba.tests/expected/unparse/org.osate.ba.tests_models_issue3210_ContainedProperty.txt b/ba/org.osate.ba.tests/expected/unparse/org.osate.ba.tests_models_issue3210_ContainedProperty.txt new file mode 100644 index 0000000000..4f1013919e --- /dev/null +++ b/ba/org.osate.ba.tests/expected/unparse/org.osate.ba.tests_models_issue3210_ContainedProperty.txt @@ -0,0 +1,14 @@ +===== annex[0] owner=ContainedProperty::sizer.impl ===== + +\t\t\tvariables +\t\t\t\tsized[input#Queue_Size] : Base_Types::Integer; +\t\t\tstates +\t\t\t\tstart : initial state; +\t\t\t\tready : complete state; +\t\t\t\tdone : final state; +\t\t\ttransitions +\t\t\t\tstart -[]-> ready; +\t\t\t\tready -[on dispatch trigger]-> done; +\t\t +----- Xtext reparse ----- +reparsed diff --git a/ba/org.osate.ba.tests/expected/unparse/org.osate.ba.tests_models_issue3210_Issue3210.txt b/ba/org.osate.ba.tests/expected/unparse/org.osate.ba.tests_models_issue3210_Issue3210.txt new file mode 100644 index 0000000000..7a01b0d09e --- /dev/null +++ b/ba/org.osate.ba.tests/expected/unparse/org.osate.ba.tests_models_issue3210_Issue3210.txt @@ -0,0 +1,16 @@ +===== annex[0] owner=Issue3210::sizer.impl ===== + +\t\t\tvariables +\t\t\t\tbyLiteral[8] : Base_Types::Integer; +\t\t\t\tbyConstant[# AADL_Project::Max_Queue_Size] : Base_Types::Integer; +\t\t\t\tbyPrefixed[input#Queue_Size] : Base_Types::Integer; +\t\t\tstates +\t\t\t\tstart : initial state; +\t\t\t\tready : complete state; +\t\t\t\tdone : final state; +\t\t\ttransitions +\t\t\t\tstart -[]-> ready; +\t\t\t\tready -[on dispatch trigger]-> done; +\t\t +----- Xtext reparse ----- +reparsed diff --git a/ba/org.osate.ba.tests/models/issue3208/.gitignore b/ba/org.osate.ba.tests/models/issue3208/.gitignore new file mode 100644 index 0000000000..afce51184c --- /dev/null +++ b/ba/org.osate.ba.tests/models/issue3208/.gitignore @@ -0,0 +1,2 @@ +/.aadlbin-gen/ +/instances/ diff --git a/ba/org.osate.ba.tests/models/issue3208/.project b/ba/org.osate.ba.tests/models/issue3208/.project new file mode 100644 index 0000000000..06fbed9bf3 --- /dev/null +++ b/ba/org.osate.ba.tests/models/issue3208/.project @@ -0,0 +1,18 @@ + + + issue3208 + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + org.osate.core.aadlnature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/ba/org.osate.ba.tests/models/issue3208/Issue3208.aadl b/ba/org.osate.ba.tests/models/issue3208/Issue3208.aadl new file mode 100644 index 0000000000..d744333960 --- /dev/null +++ b/ba/org.osate.ba.tests/models/issue3208/Issue3208.aadl @@ -0,0 +1,50 @@ +-- Copyright (c) 2004-2026 Carnegie Mellon University and others. (see Contributors file). +-- All Rights Reserved. +-- +-- NO WARRANTY. ALL MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY +-- KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE +-- OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT +-- MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT. +-- +-- This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 +-- which is available at https://www.eclipse.org/legal/epl-2.0/ +-- SPDX-License-Identifier: EPL-2.0 +-- +-- Created, in part, with funding and support from the United States Government. (see Acknowledgments file). +-- +-- This program includes and/or can make use of certain third party source code, object code, documentation and other +-- files ("Third Party Software"). The Third Party Software that is used by this program is dependent upon your system +-- configuration. By using this program, You agree to comply with any and all relevant Third Party Software terms and +-- conditions contained in any such Third Party Software or separate license file distributed with such Third Party +-- Software. The parties who own the Third Party Software ("Third Party Licensors") are intended third party benefici- +-- aries to this license with respect to the terms applicable to their Third Party Software. Third Party Software li- +-- censes only apply to the Third Party Software and not any other portion of this program or this program as a whole. + +package Issue3208 +public + with Base_Types; + + thread sizer + features + trigger : in event port; + properties + Dispatch_Protocol => Sporadic; + end sizer; + + thread implementation sizer.impl + annex behavior_specification {** + variables + slots : Base_Types::Integer; + byLiteral[8] : Base_Types::Integer; + byConstant[# AADL_Project::Max_Queue_Size] : Base_Types::Integer; + byVariable[slots] : Base_Types::Integer; + states + start : initial state; + ready : complete state; + done : final state; + transitions + start -[]-> ready; + ready -[on dispatch trigger]-> done; + **}; + end sizer.impl; +end Issue3208; diff --git a/ba/org.osate.ba.tests/models/issue3210/.gitignore b/ba/org.osate.ba.tests/models/issue3210/.gitignore new file mode 100644 index 0000000000..afce51184c --- /dev/null +++ b/ba/org.osate.ba.tests/models/issue3210/.gitignore @@ -0,0 +1,2 @@ +/.aadlbin-gen/ +/instances/ diff --git a/ba/org.osate.ba.tests/models/issue3210/.project b/ba/org.osate.ba.tests/models/issue3210/.project new file mode 100644 index 0000000000..7bf7e9eec3 --- /dev/null +++ b/ba/org.osate.ba.tests/models/issue3210/.project @@ -0,0 +1,18 @@ + + + issue3210 + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + org.osate.core.aadlnature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/ba/org.osate.ba.tests/models/issue3210/BareProperty.aadl b/ba/org.osate.ba.tests/models/issue3210/BareProperty.aadl new file mode 100644 index 0000000000..e9e10df14c --- /dev/null +++ b/ba/org.osate.ba.tests/models/issue3210/BareProperty.aadl @@ -0,0 +1,47 @@ +-- Copyright (c) 2004-2026 Carnegie Mellon University and others. (see Contributors file). +-- All Rights Reserved. +-- +-- NO WARRANTY. ALL MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY +-- KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE +-- OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT +-- MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT. +-- +-- This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 +-- which is available at https://www.eclipse.org/legal/epl-2.0/ +-- SPDX-License-Identifier: EPL-2.0 +-- +-- Created, in part, with funding and support from the United States Government. (see Acknowledgments file). +-- +-- This program includes and/or can make use of certain third party source code, object code, documentation and other +-- files ("Third Party Software"). The Third Party Software that is used by this program is dependent upon your system +-- configuration. By using this program, You agree to comply with any and all relevant Third Party Software terms and +-- conditions contained in any such Third Party Software or separate license file distributed with such Third Party +-- Software. The parties who own the Third Party Software ("Third Party Licensors") are intended third party benefici- +-- aries to this license with respect to the terms applicable to their Third Party Software. Third Party Software li- +-- censes only apply to the Third Party Software and not any other portion of this program or this program as a whole. + +package BareProperty +public + with Base_Types; + + thread sizer + features + trigger : in event port; + properties + Dispatch_Protocol => Sporadic; + end sizer; + + thread implementation sizer.impl + annex behavior_specification {** + variables + byProperty[# Communication_Properties::Queue_Size] : Base_Types::Integer; + states + start : initial state; + ready : complete state; + done : final state; + transitions + start -[]-> ready; + ready -[on dispatch trigger]-> done; + **}; + end sizer.impl; +end BareProperty; diff --git a/ba/org.osate.ba.tests/models/issue3210/ContainedProperty.aadl b/ba/org.osate.ba.tests/models/issue3210/ContainedProperty.aadl new file mode 100644 index 0000000000..2b045f565a --- /dev/null +++ b/ba/org.osate.ba.tests/models/issue3210/ContainedProperty.aadl @@ -0,0 +1,64 @@ +-- Copyright (c) 2004-2026 Carnegie Mellon University and others. (see Contributors file). +-- All Rights Reserved. +-- +-- NO WARRANTY. ALL MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY +-- KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE +-- OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT +-- MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT. +-- +-- This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 +-- which is available at https://www.eclipse.org/legal/epl-2.0/ +-- SPDX-License-Identifier: EPL-2.0 +-- +-- Created, in part, with funding and support from the United States Government. (see Acknowledgments file). +-- +-- This program includes and/or can make use of certain third party source code, object code, documentation and other +-- files ("Third Party Software"). The Third Party Software that is used by this program is dependent upon your system +-- configuration. By using this program, You agree to comply with any and all relevant Third Party Software terms and +-- conditions contained in any such Third Party Software or separate license file distributed with such Third Party +-- Software. The parties who own the Third Party Software ("Third Party Licensors") are intended third party benefici- +-- aries to this license with respect to the terms applicable to their Third Party Software. Third Party Software li- +-- censes only apply to the Third Party Software and not any other portion of this program or this program as a whole. + +package ContainedProperty +public + with Base_Types; + + thread sizer + features + input : in event data port Base_Types::Integer; + trigger : in event port; + properties + Dispatch_Protocol => Sporadic; + end sizer; + + thread implementation sizer.impl + annex behavior_specification {** + variables + sized[input#Queue_Size] : Base_Types::Integer; + states + start : initial state; + ready : complete state; + done : final state; + transitions + start -[]-> ready; + ready -[on dispatch trigger]-> done; + **}; + end sizer.impl; + + process outer + features + feed_in : in event data port Base_Types::Integer; + end outer; + + -- The extent of the array above is declared here, two path elements away from the port it applies to. Only the + -- instance model resolves that association, so the declarative model supplies the property default instead. + process implementation outer.impl + subcomponents + worker : thread sizer.impl; + connections + feed : port feed_in -> worker.input; + properties + Queue_Size => 16 applies to worker.input; + end outer.impl; +end ContainedProperty; diff --git a/ba/org.osate.ba.tests/models/issue3210/Issue3210.aadl b/ba/org.osate.ba.tests/models/issue3210/Issue3210.aadl new file mode 100644 index 0000000000..e71a26cc69 --- /dev/null +++ b/ba/org.osate.ba.tests/models/issue3210/Issue3210.aadl @@ -0,0 +1,50 @@ +-- Copyright (c) 2004-2026 Carnegie Mellon University and others. (see Contributors file). +-- All Rights Reserved. +-- +-- NO WARRANTY. ALL MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY +-- KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE +-- OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT +-- MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT. +-- +-- This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 +-- which is available at https://www.eclipse.org/legal/epl-2.0/ +-- SPDX-License-Identifier: EPL-2.0 +-- +-- Created, in part, with funding and support from the United States Government. (see Acknowledgments file). +-- +-- This program includes and/or can make use of certain third party source code, object code, documentation and other +-- files ("Third Party Software"). The Third Party Software that is used by this program is dependent upon your system +-- configuration. By using this program, You agree to comply with any and all relevant Third Party Software terms and +-- conditions contained in any such Third Party Software or separate license file distributed with such Third Party +-- Software. The parties who own the Third Party Software ("Third Party Licensors") are intended third party benefici- +-- aries to this license with respect to the terms applicable to their Third Party Software. Third Party Software li- +-- censes only apply to the Third Party Software and not any other portion of this program or this program as a whole. + +package Issue3210 +public + with Base_Types; + + thread sizer + features + input : in event data port Base_Types::Integer { Queue_Size => 8; }; + trigger : in event port; + properties + Dispatch_Protocol => Sporadic; + end sizer; + + thread implementation sizer.impl + annex behavior_specification {** + variables + byLiteral[8] : Base_Types::Integer; + byConstant[# AADL_Project::Max_Queue_Size] : Base_Types::Integer; + byPrefixed[input#Queue_Size] : Base_Types::Integer; + states + start : initial state; + ready : complete state; + done : final state; + transitions + start -[]-> ready; + ready -[on dispatch trigger]-> done; + **}; + end sizer.impl; +end Issue3210; diff --git a/ba/org.osate.ba.tests/src/org/osate/ba/tests/Issue3208Test.java b/ba/org.osate.ba.tests/src/org/osate/ba/tests/Issue3208Test.java new file mode 100644 index 0000000000..ccc276ad50 --- /dev/null +++ b/ba/org.osate.ba.tests/src/org/osate/ba/tests/Issue3208Test.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2004-2026 Carnegie Mellon University and others. (see Contributors file). + * All Rights Reserved. + * + * NO WARRANTY. ALL MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY + * KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE + * OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT + * MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT. + * + * This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * SPDX-License-Identifier: EPL-2.0 + * + * Created, in part, with funding and support from the United States Government. (see Acknowledgments file). + * + * This program includes and/or can make use of certain third party source code, object code, documentation and other + * files ("Third Party Software"). The Third Party Software that is used by this program is dependent upon your system + * configuration. By using this program, You agree to comply with any and all relevant Third Party Software terms and + * conditions contained in any such Third Party Software or separate license file distributed with such Third Party + * Software. The parties who own the Third Party Software ("Third Party Licensors") are intended third party benefici- + * aries to this license with respect to the terms applicable to their Third Party Software. Third Party Software li- + * censes only apply to the Third Party Software and not any other portion of this program or this program as a whole. + */ +package org.osate.ba.tests; + +import static org.junit.Assert.assertEquals; + +import org.eclipse.xtext.diagnostics.Severity; +import org.eclipse.xtext.nodemodel.util.NodeModelUtils; +import org.eclipse.xtext.testing.InjectWith; +import org.eclipse.xtext.testing.XtextRunner; +import org.eclipse.xtext.testing.validation.ValidationTestHelper; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.osate.aadl2.AadlPackage; +import org.osate.testsupport.TestHelper; + +import com.google.inject.Inject; + +/** Verifies that a behavior-variable array size is the integer value constant required by AS5506/3 Rev A D.3. */ +@RunWith(XtextRunner.class) +@InjectWith(BehaviorAnnexInjectorProvider.class) +public class Issue3208Test { + private static final String MODEL = "org.osate.ba.tests/models/issue3208/Issue3208.aadl"; + + @Inject + private TestHelper testHelper; + + @Inject + private ValidationTestHelper validationHelper; + + @Test + public void arraySizeCannotNameABehaviorVariable() throws Exception { + var root = testHelper.parseFile(MODEL); + var source = NodeModelUtils.getNode(root).getRootNode().getText(); + var issues = validationHelper.validate(root); + assertEquals(issues.toString(), 1, issues.size()); + var issue = issues.getFirst(); + assertEquals(Severity.ERROR, issue.getSeverity()); + assertEquals("Array size 'slots' must be an integer literal or a property reference", issue.getMessage()); + assertEquals("slots", source.substring(issue.getOffset(), issue.getOffset() + issue.getLength())); + } +} diff --git a/ba/org.osate.ba.tests/src/org/osate/ba/tests/Issue3210Test.java b/ba/org.osate.ba.tests/src/org/osate/ba/tests/Issue3210Test.java new file mode 100644 index 0000000000..09ac805554 --- /dev/null +++ b/ba/org.osate.ba.tests/src/org/osate/ba/tests/Issue3210Test.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2004-2026 Carnegie Mellon University and others. (see Contributors file). + * All Rights Reserved. + * + * NO WARRANTY. ALL MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY + * KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE + * OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT + * MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT. + * + * This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * SPDX-License-Identifier: EPL-2.0 + * + * Created, in part, with funding and support from the United States Government. (see Acknowledgments file). + * + * This program includes and/or can make use of certain third party source code, object code, documentation and other + * files ("Third Party Software"). The Third Party Software that is used by this program is dependent upon your system + * configuration. By using this program, You agree to comply with any and all relevant Third Party Software terms and + * conditions contained in any such Third Party Software or separate license file distributed with such Third Party + * Software. The parties who own the Third Party Software ("Third Party Licensors") are intended third party benefici- + * aries to this license with respect to the terms applicable to their Third Party Software. Third Party Software li- + * censes only apply to the Third Party Software and not any other portion of this program or this program as a whole. + */ +package org.osate.ba.tests; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.util.List; + +import org.eclipse.xtext.testing.InjectWith; +import org.eclipse.xtext.testing.XtextRunner; +import org.eclipse.xtext.testing.validation.ValidationTestHelper; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.osate.aadl2.AadlPackage; +import org.osate.aadl2.Element; +import org.osate.aadl2.NamedElement; +import org.osate.aadl2.PropertyAssociation; +import org.osate.annexsupport.AnnexUtil; +import org.osate.ba.aadlba.BehaviorAnnex; +import org.osate.ba.aadlba.BehaviorArraySize; +import org.osate.ba.aadlba.BehaviorIntegerLiteral; +import org.osate.ba.aadlba.BehaviorPropertyConstant; +import org.osate.ba.aadlba.BehaviorVariable; +import org.osate.ba.aadlba.ClassifierFeaturePropertyReference; +import org.osate.ba.aadlba.PropertyReference; +import org.osate.ba.aadlba.PropertySetPropertyReference; +import org.osate.testsupport.TestHelper; +import org.osate.xtext.aadl2.ba.util.BehaviorAnnexUtil; + +import com.google.inject.Inject; + +/** + * AS5506/3 Rev A D.3 writes a behavior variable array size as an integer value constant, which D.7 spells as an integer + * literal or a property reference. Verifies that translation keeps the integer value that was written, that a property + * reference keeps its own form instead of the value the declarative model happens to supply for it, and that validation + * accepts a property reference without asking whether that model can supply a value at all. + */ +@RunWith(XtextRunner.class) +@InjectWith(BehaviorAnnexInjectorProvider.class) +public class Issue3210Test { + private static final String MODELS = "org.osate.ba.tests/models/issue3210/"; + + @Inject + private TestHelper testHelper; + + @Inject + private ValidationTestHelper validationHelper; + + /** + * A literal and an unindexed property constant are the two array sizes core AADL can express, so those extents also + * reach the inherited {@code aadl2::ArraySize} that consumers of a core array dimension read. + */ + @Test + public void aLiteralAndAPropertyConstantAlsoKeepTheCoreExtent() throws Exception { + var variables = strictAnnex("Issue3210.aadl").getVariables(); + + var literal = arraySize(variables.get(0)); + assertEquals("byLiteral", variables.get(0).getName()); + assertEquals(8L, literal.getSize()); + assertTrue(describe(literal), literal.getIntegerValue() instanceof BehaviorIntegerLiteral); + assertEquals(8L, ((BehaviorIntegerLiteral) literal.getIntegerValue()).getValue()); + + var constant = arraySize(variables.get(1)); + assertEquals("byConstant", variables.get(1).getName()); + assertEquals("Max_Queue_Size", ((NamedElement) constant.getSizeProperty()).getName()); + assertTrue(describe(constant), constant.getIntegerValue() instanceof BehaviorPropertyConstant); + assertEquals("Max_Queue_Size", + ((BehaviorPropertyConstant) constant.getIntegerValue()).getProperty().getName()); + } + + /** + * The prefixed feature declares {@code Queue_Size => 8}, so a translation that read the property would have frozen + * that 8 into the dimension. + */ + @Test + public void aPrefixedPropertyReferenceKeepsItsOwnForm() throws Exception { + var variable = strictAnnex("Issue3210.aadl").getVariables().get(2); + assertEquals("byPrefixed", variable.getName()); + var size = arraySize(variable); + var value = size.getIntegerValue(); + assertTrue(describe(size), value instanceof ClassifierFeaturePropertyReference); + var reference = (ClassifierFeaturePropertyReference) value; + assertEquals("input", reference.getComponent().getElement().getName()); + assertEquals(List.of("Queue_Size"), propertyNames(reference)); + assertNotEvaluated(size); + } + + /** + * A property definition with no element prefix denotes no single value, and no rule of D.3 says otherwise, so the + * reference is kept and the declaration is accepted. + */ + @Test + public void aBarePropertyDefinitionIsAcceptedAndKept() throws Exception { + var variable = strictAnnex("BareProperty.aadl").getVariables().getFirst(); + assertEquals("byProperty", variable.getName()); + var size = arraySize(variable); + var value = size.getIntegerValue(); + assertTrue(describe(size), value instanceof PropertySetPropertyReference); + assertEquals("Communication_Properties", + ((PropertySetPropertyReference) value).getPropertySet().getName()); + assertNotEvaluated(size); + } + + /** + * The extent of this dimension comes from a contained property association two path elements away, which belongs to + * the instance model. Reading the declarative model would have missed it and frozen the property default instead. + */ + @Test + public void aContainedPropertyAssociationIsNotReadFromTheDeclarativeModel() throws Exception { + var variable = strictAnnex("ContainedProperty.aadl").getVariables().getFirst(); + assertEquals("sized", variable.getName()); + var size = arraySize(variable); + var value = size.getIntegerValue(); + assertTrue(describe(size), value instanceof ClassifierFeaturePropertyReference); + assertEquals(List.of("Queue_Size"), propertyNames((PropertyReference) value)); + assertNotEvaluated(size); + } + + /** Asserts that no value was read for the size, leaving the core extent unset. */ + private static void assertNotEvaluated(final BehaviorArraySize size) { + assertEquals("Extent read from the declarative model", 0L, size.getSize()); + assertNull("Size property", size.getSizeProperty()); + } + + private static BehaviorArraySize arraySize(final BehaviorVariable variable) { + return (BehaviorArraySize) variable.getArrayDimensions().getFirst().getSize(); + } + + /** Names the properties a reference reads, taking the property of an association the reference resolved to. */ + private static List propertyNames(final PropertyReference reference) { + return reference.getProperties().stream().map(holder -> propertyName(holder.getProperty().getElement())).toList(); + } + + private static String propertyName(final Element element) { + if (element instanceof PropertyAssociation association) { + return association.getProperty().getName(); + } + return element instanceof NamedElement named ? named.getName() : String.valueOf(element); + } + + /** Describes a size by its parts, so a failing run reports the translated size instead of only a class cast. */ + private static String describe(final BehaviorArraySize size) { + var value = size.getIntegerValue(); + return "size=" + size.getSize() + ", sizeProperty=" + size.getSizeProperty() + ", integerValue=" + + (value == null ? "" : value.eClass().getName()); + } + + private BehaviorAnnex strictAnnex(final String model) throws Exception { + var root = testHelper.parseFile(MODELS + model); + validationHelper.assertNoIssues(root); + return BehaviorAnnexUtil.getStrictModel(AnnexUtil.getAllDefaultAnnexSubclauses(root).getFirst()); + } +} diff --git a/ba/org.osate.ba/model/aadlba.ecore b/ba/org.osate.ba/model/aadlba.ecore index 041dad305e..2e3fe7811d 100644 --- a/ba/org.osate.ba/model/aadlba.ecore +++ b/ba/org.osate.ba/model/aadlba.ecore @@ -68,6 +68,13 @@ + + +
+ + + diff --git a/ba/org.osate.ba/model/aadlba.genmodel b/ba/org.osate.ba/model/aadlba.genmodel index 3d585f5a35..ef9d1190fa 100644 --- a/ba/org.osate.ba/model/aadlba.genmodel +++ b/ba/org.osate.ba/model/aadlba.genmodel @@ -185,6 +185,9 @@ + + + diff --git a/ba/org.osate.ba/src/org/osate/ba/aadlba/AadlBaFactory.java b/ba/org.osate.ba/src/org/osate/ba/aadlba/AadlBaFactory.java index fb76410af9..941be9b0c6 100644 --- a/ba/org.osate.ba/src/org/osate/ba/aadlba/AadlBaFactory.java +++ b/ba/org.osate.ba/src/org/osate/ba/aadlba/AadlBaFactory.java @@ -101,6 +101,15 @@ public interface AadlBaFactory extends EFactory { */ BehaviorAnnex createBehaviorAnnex(); + /** + * Returns a new object of class 'Behavior Array Size'. + * + * + * @return a new object of class 'Behavior Array Size'. + * @generated + */ + BehaviorArraySize createBehaviorArraySize(); + /** * Returns a new object of class 'Behavior Boolean Literal'. * diff --git a/ba/org.osate.ba/src/org/osate/ba/aadlba/AadlBaPackage.java b/ba/org.osate.ba/src/org/osate/ba/aadlba/AadlBaPackage.java index 78321f5e1c..eaa3ecbee3 100644 --- a/ba/org.osate.ba/src/org/osate/ba/aadlba/AadlBaPackage.java +++ b/ba/org.osate.ba/src/org/osate/ba/aadlba/AadlBaPackage.java @@ -83,7 +83,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorElement() * @generated */ - int BEHAVIOR_ELEMENT = 14; + int BEHAVIOR_ELEMENT = 15; /** * The feature id for the 'Owned Element' reference list. @@ -120,7 +120,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getIndexableElement() * @generated */ - int INDEXABLE_ELEMENT = 61; + int INDEXABLE_ELEMENT = 62; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.PortHolderImpl Port Holder}' class. @@ -130,7 +130,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPortHolder() * @generated */ - int PORT_HOLDER = 81; + int PORT_HOLDER = 82; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.ActualPortHolderImpl Actual Port Holder}' class. @@ -190,7 +190,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getValue() * @generated */ - int VALUE = 110; + int VALUE = 111; /** * The feature id for the 'Owned Element' reference list. @@ -227,7 +227,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getValueExpression() * @generated */ - int VALUE_EXPRESSION = 112; + int VALUE_EXPRESSION = 113; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.AnyImpl Any}' class. @@ -297,7 +297,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorBooleanLiteral() * @generated */ - int BEHAVIOR_BOOLEAN_LITERAL = 12; + int BEHAVIOR_BOOLEAN_LITERAL = 13; /** * The meta object id for the '{@link org.osate.ba.aadlba.BehaviorCondition Behavior Condition}' class. @@ -307,7 +307,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorCondition() * @generated */ - int BEHAVIOR_CONDITION = 13; + int BEHAVIOR_CONDITION = 14; /** * The meta object id for the '{@link org.osate.ba.aadlba.ValueConstant Value Constant}' class. @@ -317,7 +317,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getValueConstant() * @generated */ - int VALUE_CONSTANT = 111; + int VALUE_CONSTANT = 112; /** * The meta object id for the '{@link org.osate.ba.aadlba.Literal Literal}' class. @@ -327,7 +327,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getLiteral() * @generated */ - int LITERAL = 68; + int LITERAL = 69; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.BehaviorIntegerLiteralImpl Behavior Integer Literal}' class. @@ -337,7 +337,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorIntegerLiteral() * @generated */ - int BEHAVIOR_INTEGER_LITERAL = 15; + int BEHAVIOR_INTEGER_LITERAL = 16; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.BehaviorNamedElementImpl Behavior Named Element}' class. @@ -347,7 +347,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorNamedElement() * @generated */ - int BEHAVIOR_NAMED_ELEMENT = 16; + int BEHAVIOR_NAMED_ELEMENT = 17; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.BehaviorPropertyConstantImpl Behavior Property Constant}' class. @@ -357,7 +357,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorPropertyConstant() * @generated */ - int BEHAVIOR_PROPERTY_CONSTANT = 17; + int BEHAVIOR_PROPERTY_CONSTANT = 18; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.BehaviorRealLiteralImpl Behavior Real Literal}' class. @@ -367,7 +367,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorRealLiteral() * @generated */ - int BEHAVIOR_REAL_LITERAL = 18; + int BEHAVIOR_REAL_LITERAL = 19; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.BehaviorStateImpl Behavior State}' class. @@ -377,7 +377,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorState() * @generated */ - int BEHAVIOR_STATE = 19; + int BEHAVIOR_STATE = 20; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.BehaviorStringLiteralImpl Behavior String Literal}' class. @@ -387,7 +387,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorStringLiteral() * @generated */ - int BEHAVIOR_STRING_LITERAL = 20; + int BEHAVIOR_STRING_LITERAL = 21; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.BehaviorTimeImpl Behavior Time}' class. @@ -397,7 +397,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorTime() * @generated */ - int BEHAVIOR_TIME = 21; + int BEHAVIOR_TIME = 22; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.BehaviorTransitionImpl Behavior Transition}' class. @@ -407,7 +407,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorTransition() * @generated */ - int BEHAVIOR_TRANSITION = 22; + int BEHAVIOR_TRANSITION = 23; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.BehaviorVariableImpl Behavior Variable}' class. @@ -417,7 +417,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorVariable() * @generated */ - int BEHAVIOR_VARIABLE = 23; + int BEHAVIOR_VARIABLE = 24; /** * The meta object id for the '{@link org.osate.ba.aadlba.ElementHolder Element Holder}' class. @@ -427,7 +427,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getElementHolder() * @generated */ - int ELEMENT_HOLDER = 45; + int ELEMENT_HOLDER = 46; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.DataHolderImpl Data Holder}' class. @@ -437,7 +437,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getDataHolder() * @generated */ - int DATA_HOLDER = 35; + int DATA_HOLDER = 36; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.BehaviorVariableHolderImpl Behavior Variable Holder}' class. @@ -447,7 +447,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorVariableHolder() * @generated */ - int BEHAVIOR_VARIABLE_HOLDER = 24; + int BEHAVIOR_VARIABLE_HOLDER = 25; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.CalledSubprogramHolderImpl Called Subprogram Holder}' class. @@ -457,7 +457,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getCalledSubprogramHolder() * @generated */ - int CALLED_SUBPROGRAM_HOLDER = 25; + int CALLED_SUBPROGRAM_HOLDER = 26; /** * The meta object id for the '{@link org.osate.ba.aadlba.CommunicationAction Communication Action}' class. @@ -467,7 +467,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getCommunicationAction() * @generated */ - int COMMUNICATION_ACTION = 29; + int COMMUNICATION_ACTION = 30; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.CompletionRelativeTimeoutImpl Completion Relative Timeout}' class. @@ -477,7 +477,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getCompletionRelativeTimeout() * @generated */ - int COMPLETION_RELATIVE_TIMEOUT = 30; + int COMPLETION_RELATIVE_TIMEOUT = 31; /** * The meta object id for the '{@link org.osate.ba.aadlba.CondStatement Cond Statement}' class. @@ -487,7 +487,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getCondStatement() * @generated */ - int COND_STATEMENT = 31; + int COND_STATEMENT = 32; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.DataAccessHolderImpl Data Access Holder}' class. @@ -497,7 +497,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getDataAccessHolder() * @generated */ - int DATA_ACCESS_HOLDER = 32; + int DATA_ACCESS_HOLDER = 33; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.DataAccessPrototypeHolderImpl Data Access Prototype Holder}' class. @@ -507,7 +507,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getDataAccessPrototypeHolder() * @generated */ - int DATA_ACCESS_PROTOTYPE_HOLDER = 33; + int DATA_ACCESS_PROTOTYPE_HOLDER = 34; /** * The meta object id for the '{@link org.osate.ba.aadlba.ElementValues Element Values}' class. @@ -517,7 +517,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getElementValues() * @generated */ - int ELEMENT_VALUES = 46; + int ELEMENT_VALUES = 47; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.DataComponentReferenceImpl Data Component Reference}' class. @@ -527,7 +527,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getDataComponentReference() * @generated */ - int DATA_COMPONENT_REFERENCE = 34; + int DATA_COMPONENT_REFERENCE = 35; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.DataPortHolderImpl Data Port Holder}' class. @@ -537,7 +537,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getDataPortHolder() * @generated */ - int DATA_PORT_HOLDER = 36; + int DATA_PORT_HOLDER = 37; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.DataSubcomponentHolderImpl Data Subcomponent Holder}' class. @@ -547,7 +547,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getDataSubcomponentHolder() * @generated */ - int DATA_SUBCOMPONENT_HOLDER = 37; + int DATA_SUBCOMPONENT_HOLDER = 38; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.DispatchConditionImpl Dispatch Condition}' class. @@ -557,7 +557,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getDispatchCondition() * @generated */ - int DISPATCH_CONDITION = 38; + int DISPATCH_CONDITION = 39; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.DispatchConjunctionImpl Dispatch Conjunction}' class. @@ -567,7 +567,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getDispatchConjunction() * @generated */ - int DISPATCH_CONJUNCTION = 39; + int DISPATCH_CONJUNCTION = 40; /** * The meta object id for the '{@link org.osate.ba.aadlba.DispatchTriggerCondition Dispatch Trigger Condition}' class. @@ -577,7 +577,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getDispatchTriggerCondition() * @generated */ - int DISPATCH_TRIGGER_CONDITION = 42; + int DISPATCH_TRIGGER_CONDITION = 43; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.DispatchRelativeTimeoutImpl Dispatch Relative Timeout}' class. @@ -587,7 +587,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getDispatchRelativeTimeout() * @generated */ - int DISPATCH_RELATIVE_TIMEOUT = 40; + int DISPATCH_RELATIVE_TIMEOUT = 41; /** * The meta object id for the '{@link org.osate.ba.aadlba.DispatchTrigger Dispatch Trigger}' class. @@ -597,7 +597,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getDispatchTrigger() * @generated */ - int DISPATCH_TRIGGER = 41; + int DISPATCH_TRIGGER = 42; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.DispatchTriggerConditionStopImpl Dispatch Trigger Condition Stop}' class. @@ -607,7 +607,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getDispatchTriggerConditionStop() * @generated */ - int DISPATCH_TRIGGER_CONDITION_STOP = 43; + int DISPATCH_TRIGGER_CONDITION_STOP = 44; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.DispatchTriggerLogicalExpressionImpl Dispatch Trigger Logical Expression}' class. @@ -617,7 +617,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getDispatchTriggerLogicalExpression() * @generated */ - int DISPATCH_TRIGGER_LOGICAL_EXPRESSION = 44; + int DISPATCH_TRIGGER_LOGICAL_EXPRESSION = 45; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.ElseStatementImpl Else Statement}' class. @@ -627,7 +627,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getElseStatement() * @generated */ - int ELSE_STATEMENT = 47; + int ELSE_STATEMENT = 48; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.EventDataPortHolderImpl Event Data Port Holder}' class. @@ -637,7 +637,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getEventDataPortHolder() * @generated */ - int EVENT_DATA_PORT_HOLDER = 49; + int EVENT_DATA_PORT_HOLDER = 50; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.EventPortHolderImpl Event Port Holder}' class. @@ -647,7 +647,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getEventPortHolder() * @generated */ - int EVENT_PORT_HOLDER = 50; + int EVENT_PORT_HOLDER = 51; /** * The meta object id for the '{@link org.osate.ba.aadlba.ExecuteCondition Execute Condition}' class. @@ -657,7 +657,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getExecuteCondition() * @generated */ - int EXECUTE_CONDITION = 51; + int EXECUTE_CONDITION = 52; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.ExecutionTimeoutCatchImpl Execution Timeout Catch}' class. @@ -667,7 +667,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getExecutionTimeoutCatch() * @generated */ - int EXECUTION_TIMEOUT_CATCH = 52; + int EXECUTION_TIMEOUT_CATCH = 53; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.FactorImpl Factor}' class. @@ -677,7 +677,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getFactor() * @generated */ - int FACTOR = 53; + int FACTOR = 54; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.FeaturePrototypeHolderImpl Feature Prototype Holder}' class. @@ -687,7 +687,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getFeaturePrototypeHolder() * @generated */ - int FEATURE_PROTOTYPE_HOLDER = 55; + int FEATURE_PROTOTYPE_HOLDER = 56; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.LoopStatementImpl Loop Statement}' class. @@ -697,7 +697,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getLoopStatement() * @generated */ - int LOOP_STATEMENT = 70; + int LOOP_STATEMENT = 71; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.ForOrForAllStatementImpl For Or For All Statement}' class. @@ -707,7 +707,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getForOrForAllStatement() * @generated */ - int FOR_OR_FOR_ALL_STATEMENT = 56; + int FOR_OR_FOR_ALL_STATEMENT = 57; /** * The meta object id for the '{@link org.osate.ba.aadlba.GroupableElement Groupable Element}' class. @@ -717,7 +717,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getGroupableElement() * @generated */ - int GROUPABLE_ELEMENT = 57; + int GROUPABLE_ELEMENT = 58; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.GroupHolderImpl Group Holder}' class. @@ -727,7 +727,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getGroupHolder() * @generated */ - int GROUP_HOLDER = 58; + int GROUP_HOLDER = 59; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.GroupPrototypeHolderImpl Group Prototype Holder}' class. @@ -737,7 +737,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getGroupPrototypeHolder() * @generated */ - int GROUP_PROTOTYPE_HOLDER = 59; + int GROUP_PROTOTYPE_HOLDER = 60; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.IfStatementImpl If Statement}' class. @@ -747,7 +747,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getIfStatement() * @generated */ - int IF_STATEMENT = 60; + int IF_STATEMENT = 61; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.IntegerRangeImpl Integer Range}' class. @@ -757,7 +757,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getIntegerRange() * @generated */ - int INTEGER_RANGE = 62; + int INTEGER_RANGE = 63; /** * The meta object id for the '{@link org.osate.ba.aadlba.IntegerValue Integer Value}' class. @@ -767,7 +767,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getIntegerValue() * @generated */ - int INTEGER_VALUE = 63; + int INTEGER_VALUE = 64; /** * The meta object id for the '{@link org.osate.ba.aadlba.IntegerValueConstant Integer Value Constant}' class. @@ -777,7 +777,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getIntegerValueConstant() * @generated */ - int INTEGER_VALUE_CONSTANT = 64; + int INTEGER_VALUE_CONSTANT = 65; /** * The meta object id for the '{@link org.osate.ba.aadlba.IntegerValueVariable Integer Value Variable}' class. @@ -787,7 +787,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getIntegerValueVariable() * @generated */ - int INTEGER_VALUE_VARIABLE = 65; + int INTEGER_VALUE_VARIABLE = 66; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.IterativeVariableImpl Iterative Variable}' class. @@ -797,7 +797,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getIterativeVariable() * @generated */ - int ITERATIVE_VARIABLE = 66; + int ITERATIVE_VARIABLE = 67; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.IterativeVariableHolderImpl Iterative Variable Holder}' class. @@ -807,7 +807,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getIterativeVariableHolder() * @generated */ - int ITERATIVE_VARIABLE_HOLDER = 67; + int ITERATIVE_VARIABLE_HOLDER = 68; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.SharedDataActionImpl Shared Data Action}' class. @@ -817,7 +817,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getSharedDataAction() * @generated */ - int SHARED_DATA_ACTION = 94; + int SHARED_DATA_ACTION = 95; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.LockActionImpl Lock Action}' class. @@ -827,7 +827,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getLockAction() * @generated */ - int LOCK_ACTION = 69; + int LOCK_ACTION = 70; /** * The meta object id for the '{@link org.osate.ba.aadlba.NumericLiteral Numeric Literal}' class. @@ -837,7 +837,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getNumericLiteral() * @generated */ - int NUMERIC_LITERAL = 72; + int NUMERIC_LITERAL = 73; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.OtherwiseImpl Otherwise}' class. @@ -847,7 +847,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getOtherwise() * @generated */ - int OTHERWISE = 73; + int OTHERWISE = 74; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.ParameterHolderImpl Parameter Holder}' class. @@ -857,7 +857,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getParameterHolder() * @generated */ - int PARAMETER_HOLDER = 74; + int PARAMETER_HOLDER = 75; /** * The meta object id for the '{@link org.osate.ba.aadlba.ParameterLabel Parameter Label}' class. @@ -867,7 +867,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getParameterLabel() * @generated */ - int PARAMETER_LABEL = 75; + int PARAMETER_LABEL = 76; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.PortCountValueImpl Port Count Value}' class. @@ -877,7 +877,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPortCountValue() * @generated */ - int PORT_COUNT_VALUE = 76; + int PORT_COUNT_VALUE = 77; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.PortDequeueActionImpl Port Dequeue Action}' class. @@ -887,7 +887,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPortDequeueAction() * @generated */ - int PORT_DEQUEUE_ACTION = 77; + int PORT_DEQUEUE_ACTION = 78; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.PortDequeueValueImpl Port Dequeue Value}' class. @@ -897,7 +897,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPortDequeueValue() * @generated */ - int PORT_DEQUEUE_VALUE = 78; + int PORT_DEQUEUE_VALUE = 79; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.PortFreezeActionImpl Port Freeze Action}' class. @@ -907,7 +907,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPortFreezeAction() * @generated */ - int PORT_FREEZE_ACTION = 79; + int PORT_FREEZE_ACTION = 80; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.PortFreshValueImpl Port Fresh Value}' class. @@ -917,7 +917,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPortFreshValue() * @generated */ - int PORT_FRESH_VALUE = 80; + int PORT_FRESH_VALUE = 81; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.PortPrototypeHolderImpl Port Prototype Holder}' class. @@ -927,7 +927,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPortPrototypeHolder() * @generated */ - int PORT_PROTOTYPE_HOLDER = 82; + int PORT_PROTOTYPE_HOLDER = 83; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.PortSendActionImpl Port Send Action}' class. @@ -937,7 +937,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPortSendAction() * @generated */ - int PORT_SEND_ACTION = 83; + int PORT_SEND_ACTION = 84; /** * The meta object id for the '{@link org.osate.ba.aadlba.PrototypeHolder Prototype Holder}' class. @@ -947,7 +947,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPrototypeHolder() * @generated */ - int PROTOTYPE_HOLDER = 92; + int PROTOTYPE_HOLDER = 93; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.RelationImpl Relation}' class. @@ -957,7 +957,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getRelation() * @generated */ - int RELATION = 93; + int RELATION = 94; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.SimpleExpressionImpl Simple Expression}' class. @@ -967,7 +967,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getSimpleExpression() * @generated */ - int SIMPLE_EXPRESSION = 95; + int SIMPLE_EXPRESSION = 96; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.StructUnionElementImpl Struct Union Element}' class. @@ -977,7 +977,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getStructUnionElement() * @generated */ - int STRUCT_UNION_ELEMENT = 96; + int STRUCT_UNION_ELEMENT = 97; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.StructUnionElementHolderImpl Struct Union Element Holder}' class. @@ -987,7 +987,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getStructUnionElementHolder() * @generated */ - int STRUCT_UNION_ELEMENT_HOLDER = 97; + int STRUCT_UNION_ELEMENT_HOLDER = 98; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.SubprogramAccessHolderImpl Subprogram Access Holder}' class. @@ -997,7 +997,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getSubprogramAccessHolder() * @generated */ - int SUBPROGRAM_ACCESS_HOLDER = 99; + int SUBPROGRAM_ACCESS_HOLDER = 100; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.SubprogramCallActionImpl Subprogram Call Action}' class. @@ -1007,7 +1007,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getSubprogramCallAction() * @generated */ - int SUBPROGRAM_CALL_ACTION = 100; + int SUBPROGRAM_CALL_ACTION = 101; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.SubprogramHolderImpl Subprogram Holder}' class. @@ -1017,7 +1017,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getSubprogramHolder() * @generated */ - int SUBPROGRAM_HOLDER = 101; + int SUBPROGRAM_HOLDER = 102; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.SubprogramHolderProxyImpl Subprogram Holder Proxy}' class. @@ -1027,7 +1027,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getSubprogramHolderProxy() * @generated */ - int SUBPROGRAM_HOLDER_PROXY = 102; + int SUBPROGRAM_HOLDER_PROXY = 103; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.SubprogramPrototypeHolderImpl Subprogram Prototype Holder}' class. @@ -1037,7 +1037,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getSubprogramPrototypeHolder() * @generated */ - int SUBPROGRAM_PROTOTYPE_HOLDER = 103; + int SUBPROGRAM_PROTOTYPE_HOLDER = 104; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.TargetImpl Target}' class. @@ -1047,7 +1047,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getTarget() * @generated */ - int TARGET = 105; + int TARGET = 106; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.TermImpl Term}' class. @@ -1057,7 +1057,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getTerm() * @generated */ - int TERM = 106; + int TERM = 107; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.TimedActionImpl Timed Action}' class. @@ -1067,7 +1067,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getTimedAction() * @generated */ - int TIMED_ACTION = 107; + int TIMED_ACTION = 108; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.UnlockActionImpl Unlock Action}' class. @@ -1077,7 +1077,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getUnlockAction() * @generated */ - int UNLOCK_ACTION = 108; + int UNLOCK_ACTION = 109; /** * The meta object id for the '{@link org.osate.ba.aadlba.ValueVariable Value Variable}' class. @@ -1087,7 +1087,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getValueVariable() * @generated */ - int VALUE_VARIABLE = 113; + int VALUE_VARIABLE = 114; /** * The feature id for the 'Owned Element' reference list. @@ -1448,7 +1448,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPropertyElementHolder() * @generated */ - int PROPERTY_ELEMENT_HOLDER = 85; + int PROPERTY_ELEMENT_HOLDER = 86; /** * The feature id for the 'Owned Element' reference list. @@ -1820,6 +1820,70 @@ public interface AadlBaPackage extends EPackage { */ int BEHAVIOR_ANNEX_FEATURE_COUNT = Aadl2Package.ANNEX_SUBCLAUSE_FEATURE_COUNT + 6; + /** + * The meta object id for the '{@link org.osate.ba.aadlba.impl.BehaviorArraySizeImpl Behavior Array Size}' class. + * + * + * @see org.osate.ba.aadlba.impl.BehaviorArraySizeImpl + * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorArraySize() + * @generated + */ + int BEHAVIOR_ARRAY_SIZE = 12; + + /** + * The feature id for the 'Owned Element' reference list. + * + * + * @generated + * @ordered + */ + int BEHAVIOR_ARRAY_SIZE__OWNED_ELEMENT = Aadl2Package.ARRAY_SIZE__OWNED_ELEMENT; + + /** + * The feature id for the 'Owned Comment' containment reference list. + * + * + * @generated + * @ordered + */ + int BEHAVIOR_ARRAY_SIZE__OWNED_COMMENT = Aadl2Package.ARRAY_SIZE__OWNED_COMMENT; + + /** + * The feature id for the 'Size' attribute. + * + * + * @generated + * @ordered + */ + int BEHAVIOR_ARRAY_SIZE__SIZE = Aadl2Package.ARRAY_SIZE__SIZE; + + /** + * The feature id for the 'Size Property' reference. + * + * + * @generated + * @ordered + */ + int BEHAVIOR_ARRAY_SIZE__SIZE_PROPERTY = Aadl2Package.ARRAY_SIZE__SIZE_PROPERTY; + + /** + * The feature id for the 'Integer Value' containment reference. + * + * + * @generated + * @ordered + */ + int BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE = Aadl2Package.ARRAY_SIZE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Behavior Array Size' class. + * + * + * @generated + * @ordered + */ + int BEHAVIOR_ARRAY_SIZE_FEATURE_COUNT = Aadl2Package.ARRAY_SIZE_FEATURE_COUNT + 1; + /** * The feature id for the 'Owned Element' reference list. * @@ -2665,7 +2729,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getClassifierFeatureHolder() * @generated */ - int CLASSIFIER_FEATURE_HOLDER = 26; + int CLASSIFIER_FEATURE_HOLDER = 27; /** * The feature id for the 'Owned Element' reference list. @@ -2711,7 +2775,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getWhileOrDoUntilStatement() * @generated */ - int WHILE_OR_DO_UNTIL_STATEMENT = 114; + int WHILE_OR_DO_UNTIL_STATEMENT = 115; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.PropertyReferenceImpl Property Reference}' class. @@ -2721,7 +2785,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPropertyReference() * @generated */ - int PROPERTY_REFERENCE = 89; + int PROPERTY_REFERENCE = 90; /** * The feature id for the 'Owned Element' reference list. @@ -2767,7 +2831,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPropertySetPropertyReference() * @generated */ - int PROPERTY_SET_PROPERTY_REFERENCE = 90; + int PROPERTY_SET_PROPERTY_REFERENCE = 91; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.SubcomponentHolderImpl Subcomponent Holder}' class. @@ -2777,7 +2841,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getSubcomponentHolder() * @generated */ - int SUBCOMPONENT_HOLDER = 98; + int SUBCOMPONENT_HOLDER = 99; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.SubprogramSubcomponentHolderImpl Subprogram Subcomponent Holder}' class. @@ -2787,7 +2851,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getSubprogramSubcomponentHolder() * @generated */ - int SUBPROGRAM_SUBCOMPONENT_HOLDER = 104; + int SUBPROGRAM_SUBCOMPONENT_HOLDER = 105; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.FeatureHolderImpl Feature Holder}' class. @@ -2797,7 +2861,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getFeatureHolder() * @generated */ - int FEATURE_HOLDER = 54; + int FEATURE_HOLDER = 55; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.ClassifierPropertyReferenceImpl Classifier Property Reference}' class. @@ -2807,7 +2871,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getClassifierPropertyReference() * @generated */ - int CLASSIFIER_PROPERTY_REFERENCE = 28; + int CLASSIFIER_PROPERTY_REFERENCE = 29; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.ClassifierFeaturePropertyReferenceImpl Classifier Feature Property Reference}' class. @@ -2817,7 +2881,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getClassifierFeaturePropertyReference() * @generated */ - int CLASSIFIER_FEATURE_PROPERTY_REFERENCE = 27; + int CLASSIFIER_FEATURE_PROPERTY_REFERENCE = 28; /** * The feature id for the 'Owned Element' reference list. @@ -3583,7 +3647,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getEnumLiteralHolder() * @generated */ - int ENUM_LITERAL_HOLDER = 48; + int ENUM_LITERAL_HOLDER = 49; /** * The feature id for the 'Owned Element' reference list. @@ -4646,7 +4710,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPropertyNameField() * @generated */ - int PROPERTY_NAME_FIELD = 87; + int PROPERTY_NAME_FIELD = 88; /** * The feature id for the 'Owned Element' reference list. @@ -4683,7 +4747,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getUpperBound() * @generated */ - int UPPER_BOUND = 109; + int UPPER_BOUND = 110; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.LowerBoundImpl Lower Bound}' class. @@ -4693,7 +4757,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getLowerBound() * @generated */ - int LOWER_BOUND = 71; + int LOWER_BOUND = 72; /** * The feature id for the 'Owned Element' reference list. @@ -5243,7 +5307,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPropertyNameHolder() * @generated */ - int PROPERTY_NAME_HOLDER = 88; + int PROPERTY_NAME_HOLDER = 89; /** * The meta object id for the '{@link org.osate.ba.aadlba.impl.PropertyAssociationHolderImpl Property Association Holder}' class. @@ -5253,7 +5317,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPropertyAssociationHolder() * @generated */ - int PROPERTY_ASSOCIATION_HOLDER = 84; + int PROPERTY_ASSOCIATION_HOLDER = 85; /** * The feature id for the 'Owned Element' reference list. @@ -5308,7 +5372,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPropertyExpressionHolder() * @generated */ - int PROPERTY_EXPRESSION_HOLDER = 86; + int PROPERTY_EXPRESSION_HOLDER = 87; /** * The feature id for the 'Owned Element' reference list. @@ -5408,7 +5472,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getPropertyTypeHolder() * @generated */ - int PROPERTY_TYPE_HOLDER = 91; + int PROPERTY_TYPE_HOLDER = 92; /** * The feature id for the 'Owned Element' reference list. @@ -6399,7 +6463,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getModeSwitchTriggerCondition() * @generated */ - int MODE_SWITCH_TRIGGER_CONDITION = 116; + int MODE_SWITCH_TRIGGER_CONDITION = 117; /** * The feature id for the 'Owned Element' reference list. @@ -6436,7 +6500,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getModeSwitchTriggerLogicalExpression() * @generated */ - int MODE_SWITCH_TRIGGER_LOGICAL_EXPRESSION = 115; + int MODE_SWITCH_TRIGGER_LOGICAL_EXPRESSION = 116; /** * The feature id for the 'Owned Element' reference list. @@ -6483,7 +6547,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getModeSwitchConjunction() * @generated */ - int MODE_SWITCH_CONJUNCTION = 117; + int MODE_SWITCH_CONJUNCTION = 118; /** * The feature id for the 'Owned Element' reference list. @@ -6529,7 +6593,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getModeSwitchTrigger() * @generated */ - int MODE_SWITCH_TRIGGER = 118; + int MODE_SWITCH_TRIGGER = 119; /** * The feature id for the 'Owned Element' reference list. @@ -6566,7 +6630,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getInternalPortHolder() * @generated */ - int INTERNAL_PORT_HOLDER = 119; + int INTERNAL_PORT_HOLDER = 120; /** * The feature id for the 'Owned Element' reference list. @@ -6612,7 +6676,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getEventSourceHolder() * @generated */ - int EVENT_SOURCE_HOLDER = 120; + int EVENT_SOURCE_HOLDER = 121; /** * The feature id for the 'Owned Element' reference list. @@ -6658,7 +6722,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getEventDataSourceHolder() * @generated */ - int EVENT_DATA_SOURCE_HOLDER = 121; + int EVENT_DATA_SOURCE_HOLDER = 122; /** * The feature id for the 'Owned Element' reference list. @@ -6704,7 +6768,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getInternalPortSendAction() * @generated */ - int INTERNAL_PORT_SEND_ACTION = 122; + int INTERNAL_PORT_SEND_ACTION = 123; /** * The feature id for the 'Owned Element' reference list. @@ -6759,7 +6823,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getInternalCondition() * @generated */ - int INTERNAL_CONDITION = 123; + int INTERNAL_CONDITION = 124; /** * The feature id for the 'Owned Element' reference list. @@ -6805,7 +6869,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getTimeoutResetPort() * @generated */ - int TIMEOUT_RESET_PORT = 124; + int TIMEOUT_RESET_PORT = 125; /** * The feature id for the 'Owned Element' reference list. @@ -6842,7 +6906,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorFeatureType() * @generated */ - int BEHAVIOR_FEATURE_TYPE = 125; + int BEHAVIOR_FEATURE_TYPE = 126; /** * The meta object id for the '{@link org.osate.ba.aadlba.BinaryAddingOperator Binary Adding Operator}' enum. @@ -6852,7 +6916,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBinaryAddingOperator() * @generated */ - int BINARY_ADDING_OPERATOR = 126; + int BINARY_ADDING_OPERATOR = 127; /** * The meta object id for the '{@link org.osate.ba.aadlba.BinaryNumericOperator Binary Numeric Operator}' enum. @@ -6862,7 +6926,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBinaryNumericOperator() * @generated */ - int BINARY_NUMERIC_OPERATOR = 127; + int BINARY_NUMERIC_OPERATOR = 128; /** * The meta object id for the '{@link org.osate.ba.aadlba.DataRepresentation Data Representation}' enum. @@ -6872,7 +6936,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getDataRepresentation() * @generated */ - int DATA_REPRESENTATION = 128; + int DATA_REPRESENTATION = 129; /** * The meta object id for the '{@link org.osate.ba.aadlba.FeatureType Feature Type}' enum. @@ -6882,7 +6946,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getFeatureType() * @generated */ - int FEATURE_TYPE = 129; + int FEATURE_TYPE = 130; /** * The meta object id for the '{@link org.osate.ba.aadlba.LogicalOperator Logical Operator}' enum. @@ -6892,7 +6956,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getLogicalOperator() * @generated */ - int LOGICAL_OPERATOR = 130; + int LOGICAL_OPERATOR = 131; /** * The meta object id for the '{@link org.osate.ba.aadlba.MultiplyingOperator Multiplying Operator}' enum. @@ -6902,7 +6966,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getMultiplyingOperator() * @generated */ - int MULTIPLYING_OPERATOR = 131; + int MULTIPLYING_OPERATOR = 132; /** * The meta object id for the '{@link org.osate.ba.aadlba.RelationalOperator Relational Operator}' enum. @@ -6912,7 +6976,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getRelationalOperator() * @generated */ - int RELATIONAL_OPERATOR = 132; + int RELATIONAL_OPERATOR = 133; /** * The meta object id for the '{@link org.osate.ba.aadlba.UnaryAddingOperator Unary Adding Operator}' enum. @@ -6922,7 +6986,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getUnaryAddingOperator() * @generated */ - int UNARY_ADDING_OPERATOR = 133; + int UNARY_ADDING_OPERATOR = 134; /** * The meta object id for the '{@link org.osate.ba.aadlba.UnaryBooleanOperator Unary Boolean Operator}' enum. @@ -6932,7 +6996,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getUnaryBooleanOperator() * @generated */ - int UNARY_BOOLEAN_OPERATOR = 134; + int UNARY_BOOLEAN_OPERATOR = 135; /** * The meta object id for the '{@link org.osate.ba.aadlba.UnaryNumericOperator Unary Numeric Operator}' enum. @@ -6942,7 +7006,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getUnaryNumericOperator() * @generated */ - int UNARY_NUMERIC_OPERATOR = 135; + int UNARY_NUMERIC_OPERATOR = 136; /** * The meta object id for the 'Boolean' data type. @@ -6951,7 +7015,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBoolean() * @generated */ - int BOOLEAN = 136; + int BOOLEAN = 137; /** * The meta object id for the 'Integer' data type. @@ -6960,7 +7024,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getInteger() * @generated */ - int INTEGER = 137; + int INTEGER = 138; /** * The meta object id for the 'Real' data type. @@ -6969,7 +7033,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getReal() * @generated */ - int REAL = 138; + int REAL = 139; /** * The meta object id for the 'String' data type. @@ -6979,7 +7043,7 @@ public interface AadlBaPackage extends EPackage { * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getString() * @generated */ - int STRING = 139; + int STRING = 140; /** * Returns the meta object for class '{@link org.osate.ba.aadlba.ActualPortHolder Actual Port Holder}'. @@ -7222,6 +7286,27 @@ public interface AadlBaPackage extends EPackage { */ EReference getBehaviorAnnex_InitialState(); + /** + * Returns the meta object for class '{@link org.osate.ba.aadlba.BehaviorArraySize Behavior Array Size}'. + * + * + * @return the meta object for class 'Behavior Array Size'. + * @see org.osate.ba.aadlba.BehaviorArraySize + * @generated + */ + EClass getBehaviorArraySize(); + + /** + * Returns the meta object for the containment reference '{@link org.osate.ba.aadlba.BehaviorArraySize#getIntegerValue Integer Value}'. + * + * + * @return the meta object for the containment reference 'Integer Value'. + * @see org.osate.ba.aadlba.BehaviorArraySize#getIntegerValue() + * @see #getBehaviorArraySize() + * @generated + */ + EReference getBehaviorArraySize_IntegerValue(); + /** * Returns the meta object for class '{@link org.osate.ba.aadlba.BehaviorBooleanLiteral Behavior Boolean Literal}'. * @@ -9628,6 +9713,24 @@ interface Literals { */ EReference BEHAVIOR_ANNEX__INITIAL_STATE = eINSTANCE.getBehaviorAnnex_InitialState(); + /** + * The meta object literal for the '{@link org.osate.ba.aadlba.impl.BehaviorArraySizeImpl Behavior Array Size}' class. + * + * + * @see org.osate.ba.aadlba.impl.BehaviorArraySizeImpl + * @see org.osate.ba.aadlba.impl.AadlBaPackageImpl#getBehaviorArraySize() + * @generated + */ + EClass BEHAVIOR_ARRAY_SIZE = eINSTANCE.getBehaviorArraySize(); + + /** + * The meta object literal for the 'Integer Value' containment reference feature. + * + * + * @generated + */ + EReference BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE = eINSTANCE.getBehaviorArraySize_IntegerValue(); + /** * The meta object literal for the '{@link org.osate.ba.aadlba.impl.BehaviorBooleanLiteralImpl Behavior Boolean Literal}' class. * diff --git a/ba/org.osate.ba/src/org/osate/ba/aadlba/BehaviorArraySize.java b/ba/org.osate.ba/src/org/osate/ba/aadlba/BehaviorArraySize.java new file mode 100644 index 0000000000..a429969508 --- /dev/null +++ b/ba/org.osate.ba/src/org/osate/ba/aadlba/BehaviorArraySize.java @@ -0,0 +1,63 @@ +/** + * 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 + * program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the Eclipse Public License for + * more details. You should have received a copy of the Eclipse Public License + * along with this program. If not, see + * https://www.eclipse.org/legal/epl-2.0/ + */ +package org.osate.ba.aadlba; + +import org.osate.aadl2.ArraySize; + +/** + * + * A representation of the model object 'Behavior Array Size'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.osate.ba.aadlba.BehaviorArraySize#getIntegerValue Integer Value}
  • + *
+ * + * @see org.osate.ba.aadlba.AadlBaPackage#getBehaviorArraySize() + * @model annotation="Documentation documentation='The size of one behavior variable array dimension. The size is the integer value that was written, held without evaluation. The inherited size and sizeProperty carry the extent only for the two forms core AADL can express, an integer literal and a property constant.'" + * @generated + */ +public interface BehaviorArraySize extends ArraySize, BehaviorElement { + /** + * Returns the value of the 'Integer Value' containment reference. + * + * + * @return the value of the 'Integer Value' containment reference. + * @see #setIntegerValue(IntegerValue) + * @see org.osate.ba.aadlba.AadlBaPackage#getBehaviorArraySize_IntegerValue() + * @model containment="true" required="true" + * @generated + */ + IntegerValue getIntegerValue(); + + /** + * Sets the value of the '{@link org.osate.ba.aadlba.BehaviorArraySize#getIntegerValue Integer Value}' containment reference. + * + * + * @param value the new value of the 'Integer Value' containment reference. + * @see #getIntegerValue() + * @generated + */ + void setIntegerValue(IntegerValue value); + +} // BehaviorArraySize diff --git a/ba/org.osate.ba/src/org/osate/ba/aadlba/impl/AadlBaFactoryImpl.java b/ba/org.osate.ba/src/org/osate/ba/aadlba/impl/AadlBaFactoryImpl.java index 9ca8176ebf..af98b9ee14 100644 --- a/ba/org.osate.ba/src/org/osate/ba/aadlba/impl/AadlBaFactoryImpl.java +++ b/ba/org.osate.ba/src/org/osate/ba/aadlba/impl/AadlBaFactoryImpl.java @@ -85,6 +85,8 @@ public EObject create(EClass eClass) { return createBehaviorActionSet(); case AadlBaPackage.BEHAVIOR_ANNEX: return createBehaviorAnnex(); + case AadlBaPackage.BEHAVIOR_ARRAY_SIZE: + return createBehaviorArraySize(); case AadlBaPackage.BEHAVIOR_BOOLEAN_LITERAL: return createBehaviorBooleanLiteral(); case AadlBaPackage.BEHAVIOR_INTEGER_LITERAL: @@ -411,6 +413,17 @@ public BehaviorAnnex createBehaviorAnnex() { return behaviorAnnex; } + /** + * + * + * @generated + */ + @Override + public BehaviorArraySize createBehaviorArraySize() { + BehaviorArraySizeImpl behaviorArraySize = new BehaviorArraySizeImpl(); + return behaviorArraySize; + } + /** * * diff --git a/ba/org.osate.ba/src/org/osate/ba/aadlba/impl/AadlBaPackageImpl.java b/ba/org.osate.ba/src/org/osate/ba/aadlba/impl/AadlBaPackageImpl.java index 424eafc063..68a34bbf7e 100644 --- a/ba/org.osate.ba/src/org/osate/ba/aadlba/impl/AadlBaPackageImpl.java +++ b/ba/org.osate.ba/src/org/osate/ba/aadlba/impl/AadlBaPackageImpl.java @@ -121,6 +121,13 @@ public class AadlBaPackageImpl extends EPackageImpl implements AadlBaPackage { */ private EClass behaviorAnnexEClass = null; + /** + * + * + * @generated + */ + private EClass behaviorArraySizeEClass = null; + /** * * @@ -1315,6 +1322,26 @@ public EReference getBehaviorAnnex_InitialState() { return (EReference) behaviorAnnexEClass.getEStructuralFeatures().get(5); } + /** + * + * + * @generated + */ + @Override + public EClass getBehaviorArraySize() { + return behaviorArraySizeEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getBehaviorArraySize_IntegerValue() { + return (EReference) behaviorArraySizeEClass.getEStructuralFeatures().get(0); + } + /** * * @@ -3471,6 +3498,9 @@ public void createPackageContents() { createEReference(behaviorAnnexEClass, BEHAVIOR_ANNEX__CONDITIONS); createEReference(behaviorAnnexEClass, BEHAVIOR_ANNEX__INITIAL_STATE); + behaviorArraySizeEClass = createEClass(BEHAVIOR_ARRAY_SIZE); + createEReference(behaviorArraySizeEClass, BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE); + behaviorBooleanLiteralEClass = createEClass(BEHAVIOR_BOOLEAN_LITERAL); behaviorConditionEClass = createEClass(BEHAVIOR_CONDITION); @@ -3847,6 +3877,8 @@ public void initializePackageContents() { behaviorActionSetEClass.getESuperTypes().add(getBehaviorActionCollection()); behaviorAnnexEClass.getESuperTypes().add(theAadl2Package.getAnnexSubclause()); behaviorAnnexEClass.getESuperTypes().add(getBehaviorElement()); + behaviorArraySizeEClass.getESuperTypes().add(theAadl2Package.getArraySize()); + behaviorArraySizeEClass.getESuperTypes().add(getBehaviorElement()); behaviorBooleanLiteralEClass.getESuperTypes().add(theAadl2Package.getBooleanLiteral()); behaviorBooleanLiteralEClass.getESuperTypes().add(getLiteral()); behaviorConditionEClass.getESuperTypes().add(getBehaviorElement()); @@ -4119,6 +4151,12 @@ public void initializePackageContents() { BehaviorAnnex.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(behaviorArraySizeEClass, BehaviorArraySize.class, "BehaviorArraySize", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getBehaviorArraySize_IntegerValue(), getIntegerValue(), null, "integerValue", null, 1, 1, + BehaviorArraySize.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(behaviorBooleanLiteralEClass, BehaviorBooleanLiteral.class, "BehaviorBooleanLiteral", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -4982,21 +5020,35 @@ public void initializePackageContents() { createResource(eNS_URI); // Create annotations - // http://www.topcased.org/documentation - createDocumentationAnnotations(); // Documentation + createDocumentationAnnotations(); + // http://www.topcased.org/documentation createDocumentation_1Annotations(); // documentation createDocumentation_2Annotations(); } /** - * Initializes the annotations for http://www.topcased.org/documentation. + * Initializes the annotations for Documentation. * * * @generated */ protected void createDocumentationAnnotations() { + String source = "Documentation"; + addAnnotation(behaviorArraySizeEClass, source, new String[] { "documentation", + "The size of one behavior variable array dimension. The size is the integer value that was written, held without evaluation. The inherited size and sizeProperty carry the extent only for the two forms core AADL can express, an integer literal and a property constant." }); + addAnnotation(lockActionEClass, source, new String[] { "documentation", + "A null data name means that all shared data are locked while in the critical section" }); + } + + /** + * Initializes the annotations for http://www.topcased.org/documentation. + * + * + * @generated + */ + protected void createDocumentation_1Annotations() { String source = "http://www.topcased.org/documentation"; addAnnotation(booleanEDataType, source, new String[] { "documentation", "A Boolean type is used for logical expression, consisting of the predefined values true and false." }); @@ -5008,18 +5060,6 @@ protected void createDocumentationAnnotations() { "A string is a sequence of characters in some suitable character set used to display information about the model. Character sets may include non-Roman alphabets and characters." }); } - /** - * Initializes the annotations for Documentation. - * - * - * @generated - */ - protected void createDocumentation_1Annotations() { - String source = "Documentation"; - addAnnotation(lockActionEClass, source, new String[] { "documentation", - "A null data name means that all shared data are locked while in the critical section" }); - } - /** * Initializes the annotations for documentation. * diff --git a/ba/org.osate.ba/src/org/osate/ba/aadlba/impl/BehaviorArraySizeImpl.java b/ba/org.osate.ba/src/org/osate/ba/aadlba/impl/BehaviorArraySizeImpl.java new file mode 100644 index 0000000000..5193bf9625 --- /dev/null +++ b/ba/org.osate.ba/src/org/osate/ba/aadlba/impl/BehaviorArraySizeImpl.java @@ -0,0 +1,210 @@ +/** + * 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 + * program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the Eclipse Public License for + * more details. You should have received a copy of the Eclipse Public License + * along with this program. If not, see + * https://www.eclipse.org/legal/epl-2.0/ + */ +package org.osate.ba.aadlba.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.osate.aadl2.impl.ArraySizeImpl; +import org.osate.ba.aadlba.AadlBaPackage; +import org.osate.ba.aadlba.BehaviorArraySize; +import org.osate.ba.aadlba.IntegerValue; +import org.osate.ba.utils.AadlBaLocationReference; + +/** + * + * An implementation of the model object 'Behavior Array Size'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.osate.ba.aadlba.impl.BehaviorArraySizeImpl#getIntegerValue Integer Value}
  • + *
+ * + * @generated + */ +public class BehaviorArraySizeImpl extends ArraySizeImpl implements BehaviorArraySize { + /** + * The cached value of the '{@link #getIntegerValue() Integer Value}' containment reference. + * + * + * @see #getIntegerValue() + * @generated + * @ordered + */ + protected IntegerValue integerValue; + + /** + * + * + * @generated + */ + protected BehaviorArraySizeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return AadlBaPackage.Literals.BEHAVIOR_ARRAY_SIZE; + } + + /** + * + * + * @generated + */ + @Override + public IntegerValue getIntegerValue() { + return integerValue; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetIntegerValue(IntegerValue newIntegerValue, NotificationChain msgs) { + IntegerValue oldIntegerValue = integerValue; + integerValue = newIntegerValue; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + AadlBaPackage.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, oldIntegerValue, newIntegerValue); + if (msgs == null) { + msgs = notification; + } else { + msgs.add(notification); + } + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setIntegerValue(IntegerValue newIntegerValue) { + if (newIntegerValue != integerValue) { + NotificationChain msgs = null; + if (integerValue != null) { + msgs = ((InternalEObject) integerValue).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - AadlBaPackage.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, null, msgs); + } + if (newIntegerValue != null) { + msgs = ((InternalEObject) newIntegerValue).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - AadlBaPackage.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, null, msgs); + } + msgs = basicSetIntegerValue(newIntegerValue, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, AadlBaPackage.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE, + newIntegerValue, newIntegerValue)); + } + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case AadlBaPackage.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE: + return basicSetIntegerValue(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AadlBaPackage.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE: + return getIntegerValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AadlBaPackage.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE: + setIntegerValue((IntegerValue) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AadlBaPackage.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE: + setIntegerValue((IntegerValue) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AadlBaPackage.BEHAVIOR_ARRAY_SIZE__INTEGER_VALUE: + return integerValue != null; + } + return super.eIsSet(featureID); + } + + @Override + public AadlBaLocationReference getAadlBaLocationReference() { + return (AadlBaLocationReference) this.getLocationReference(); + } + +} // BehaviorArraySizeImpl diff --git a/ba/org.osate.ba/src/org/osate/ba/aadlba/util/AadlBaAdapterFactory.java b/ba/org.osate.ba/src/org/osate/ba/aadlba/util/AadlBaAdapterFactory.java index a7cdea46a7..3f9b1d85de 100644 --- a/ba/org.osate.ba/src/org/osate/ba/aadlba/util/AadlBaAdapterFactory.java +++ b/ba/org.osate.ba/src/org/osate/ba/aadlba/util/AadlBaAdapterFactory.java @@ -24,6 +24,7 @@ import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; import org.eclipse.emf.ecore.EObject; import org.osate.aadl2.AnnexSubclause; +import org.osate.aadl2.ArraySize; import org.osate.aadl2.ArrayableElement; import org.osate.aadl2.BooleanLiteral; import org.osate.aadl2.Data; @@ -153,6 +154,11 @@ public Adapter caseBehaviorAnnex(BehaviorAnnex object) { return createBehaviorAnnexAdapter(); } + @Override + public Adapter caseBehaviorArraySize(BehaviorArraySize object) { + return createBehaviorArraySizeAdapter(); + } + @Override public Adapter caseBehaviorBooleanLiteral(BehaviorBooleanLiteral object) { return createBehaviorBooleanLiteralAdapter(); @@ -738,6 +744,11 @@ public Adapter caseAnnexSubclause(AnnexSubclause object) { return createAnnexSubclauseAdapter(); } + @Override + public Adapter caseArraySize(ArraySize object) { + return createArraySizeAdapter(); + } + @Override public Adapter casePropertyExpression(PropertyExpression object) { return createPropertyExpressionAdapter(); @@ -970,6 +981,20 @@ public Adapter createBehaviorAnnexAdapter() { return null; } + /** + * Creates a new adapter for an object of class '{@link org.osate.ba.aadlba.BehaviorArraySize Behavior Array Size}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.osate.ba.aadlba.BehaviorArraySize + * @generated + */ + public Adapter createBehaviorArraySizeAdapter() { + return null; + } + /** * Creates a new adapter for an object of class '{@link org.osate.ba.aadlba.BehaviorBooleanLiteral Behavior Boolean Literal}'. * @@ -2524,6 +2549,20 @@ public Adapter createAnnexSubclauseAdapter() { return null; } + /** + * Creates a new adapter for an object of class '{@link org.osate.aadl2.ArraySize Array Size}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.osate.aadl2.ArraySize + * @generated + */ + public Adapter createArraySizeAdapter() { + return null; + } + /** * Creates a new adapter for an object of class '{@link org.osate.aadl2.PropertyExpression Property Expression}'. * diff --git a/ba/org.osate.ba/src/org/osate/ba/aadlba/util/AadlBaSwitch.java b/ba/org.osate.ba/src/org/osate/ba/aadlba/util/AadlBaSwitch.java index 43ff451b6f..3209222914 100644 --- a/ba/org.osate.ba/src/org/osate/ba/aadlba/util/AadlBaSwitch.java +++ b/ba/org.osate.ba/src/org/osate/ba/aadlba/util/AadlBaSwitch.java @@ -23,6 +23,7 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; import org.osate.aadl2.AnnexSubclause; +import org.osate.aadl2.ArraySize; import org.osate.aadl2.ArrayableElement; import org.osate.aadl2.BooleanLiteral; import org.osate.aadl2.Data; @@ -361,6 +362,23 @@ protected T doSwitch(int classifierID, EObject theEObject) { } return result; } + case AadlBaPackage.BEHAVIOR_ARRAY_SIZE: { + BehaviorArraySize behaviorArraySize = (BehaviorArraySize) theEObject; + T result = caseBehaviorArraySize(behaviorArraySize); + if (result == null) { + result = caseArraySize(behaviorArraySize); + } + if (result == null) { + result = caseBehaviorElement(behaviorArraySize); + } + if (result == null) { + result = caseElement(behaviorArraySize); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } case AadlBaPackage.BEHAVIOR_BOOLEAN_LITERAL: { BehaviorBooleanLiteral behaviorBooleanLiteral = (BehaviorBooleanLiteral) theEObject; T result = caseBehaviorBooleanLiteral(behaviorBooleanLiteral); @@ -3511,6 +3529,21 @@ public T caseBehaviorAnnex(BehaviorAnnex object) { return null; } + /** + * Returns the result of interpreting the object as an instance of 'Behavior Array Size'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Behavior Array Size'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseBehaviorArraySize(BehaviorArraySize object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'Behavior Boolean Literal'. * @@ -5176,6 +5209,21 @@ public T caseAnnexSubclause(AnnexSubclause object) { return null; } + /** + * Returns the result of interpreting the object as an instance of 'Array Size'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Array Size'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseArraySize(ArraySize object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'Property Expression'. * diff --git a/ba/org.osate.utils/src/org/osate/utils/internal/PropertyUtils.java b/ba/org.osate.utils/src/org/osate/utils/internal/PropertyUtils.java index 4df05d0fa4..5f45486dca 100755 --- a/ba/org.osate.utils/src/org/osate/utils/internal/PropertyUtils.java +++ b/ba/org.osate.utils/src/org/osate/utils/internal/PropertyUtils.java @@ -22,16 +22,12 @@ package org.osate.utils.internal; import java.util.ArrayList; -import java.util.List; import org.eclipse.emf.common.util.BasicEList; import org.eclipse.emf.common.util.EList; -import org.osate.aadl2.Aadl2Factory; import org.osate.aadl2.Aadl2Package; import org.osate.aadl2.BasicProperty; import org.osate.aadl2.BasicPropertyAssociation; -import org.osate.aadl2.BooleanLiteral; -import org.osate.aadl2.Classifier; import org.osate.aadl2.ClassifierValue; import org.osate.aadl2.ComponentImplementation; import org.osate.aadl2.ComponentType; @@ -42,18 +38,12 @@ import org.osate.aadl2.ListValue; import org.osate.aadl2.NamedElement; import org.osate.aadl2.NamedValue; -import org.osate.aadl2.NumberValue; -import org.osate.aadl2.ProcessorSubcomponent; import org.osate.aadl2.Property; import org.osate.aadl2.PropertyAssociation; import org.osate.aadl2.PropertyExpression; -import org.osate.aadl2.RangeValue; -import org.osate.aadl2.RealLiteral; import org.osate.aadl2.RecordValue; -import org.osate.aadl2.ReferenceValue; import org.osate.aadl2.RefinableElement; import org.osate.aadl2.StringLiteral; -import org.osate.aadl2.Subcomponent; import org.osate.aadl2.UnitLiteral; import org.osate.aadl2.instance.ComponentInstance; import org.osate.aadl2.instance.InstanceReferenceValue; @@ -183,49 +173,6 @@ private static PropertyAssociation isInAppliesTo(NamedElement owner, String prop return null; } - /** - * Extract integer value from a specified property. Convert it - * to a given unit. - * May return null - * - * @param i - * component instance. - * @param propertyName - * property name. - * @param unit - * target unit for conversion - * @return property value. - */ - public static Long getIntValue(NamedElement i, String propertyName, String targetUnit) { - var pa = findPropertyAssociation(propertyName, i); - - if (pa != null) { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - var expr = values.getFirst().getOwnedValue(); - - if (expr instanceof IntegerLiteral literal) { - var unit = literal.getUnit(); - if (unit != null) { - // Warning: the cast from double to long is licit - // only if the result of the conversion is an - // integer - return (long) literal.getScaledValue(targetUnit); - } - - return literal.getValue(); - } - } - } - } - - return null; - } - /** * Extract integer value from a specified property. May return null * @@ -255,252 +202,6 @@ public static Long getIntValue(NamedElement i, String propertyName) { return null; } - /** - * * TODO: DOC ME ! - * - * May return null - * - * @param i - * @param propertyName - * @return - */ - public static RecordValue getRecordValue(NamedElement i, String propertyName) { - var pa = findPropertyAssociation(propertyName, i); - - if (pa != null) { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - if (values.getFirst().getOwnedValue() instanceof RecordValue record) { - return record; - } - } - } - } - - return null; - } - - public static List getListRecordValue(NamedElement ne, String propertyName) { - List result = null; - - var lv = getListValue(ne, propertyName); - - if (lv != null) { - var pes = lv.getOwnedListElements(); - - if (!pes.isEmpty() && pes.getFirst() instanceof RecordValue) { - result = new ArrayList<>(pes.size()); - - for (var pe : pes) { - result.add((RecordValue) pe); - } - } - } - - return result; - } - - public static ListValue getListValue(NamedElement ne, String propertyName) { - var pa = findPropertyAssociation(propertyName, ne); - - if (pa != null) { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - if (values.getFirst().getOwnedValue() instanceof ListValue list) { - return list; - } - } - } - } - - return null; - } - - /** - * Extract float value from a specified property. May return null. - * - * @param i - * component instance. - * @param propertyName - * property name. - * @return property value. - */ - public static Float getFloatValue(NamedElement i, String propertyName, String unit) { - var pa = findPropertyAssociation(propertyName, i); - - if (pa != null) { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - if (values.getFirst().getOwnedValue() instanceof NumberValue number) { - float fVal = 0f; - - if (number instanceof IntegerLiteral integer) { - fVal = integer.getValue(); - } else if (number instanceof RealLiteral real) { - fVal = (float) real.getValue(); - } - - return UnitConversion.convertInMs(fVal, number.getUnit().getName()); - } - } - } - } - // try on a refined NamedElement - if (i instanceof RefinableElement refinable && refinable.getRefinedElement() != null) { - return getFloatValue(refinable.getRefinedElement(), propertyName, unit); - } - - return null; - } - - /** - * Extract float value from a specified property. May return null. - * - * @param i - * component instance. - * @param propertyName - * property name. - * @return property value. - */ - public static Float getFloatValue(NamedElement i, String propertyName) { - var pa = findPropertyAssociation(propertyName, i); - - if (pa != null) { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - var expr = values.getFirst().getOwnedValue(); - - if (expr instanceof IntegerLiteral integer) { - return (float) integer.getValue(); - } else if (expr instanceof RealLiteral real) { - return (float) real.getValue(); - } - } - } - } - // try on a refined NamedElement - if (i instanceof RefinableElement refinable && refinable.getRefinedElement() != null) { - return getFloatValue(refinable.getRefinedElement(), propertyName); - } - - return null; - } - - /** - * Extract boolean value from a specified property. May return null. - * - * @param i - * component instance. - * @param propertyName - * property name. - * @return property value. - */ - public static Boolean getBooleanValue(NamedElement i, String propertyName) { - var pa = findPropertyAssociation(propertyName, i); - - if (pa != null) { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - if (values.getFirst().getOwnedValue() instanceof BooleanLiteral literal) { - return literal.getValue(); - } - } - } - } - - return null; - } - - /** - * Extract String value from a specified property. May return null. - * - * @param i - * component instance. - * @param propertyName - * property name. - * @return property value. - */ - public static String getStringValue(NamedElement i, String propertyName) { - var pa = findPropertyAssociation(propertyName, i); - - if (pa != null) { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - if (values.getFirst().getOwnedValue() instanceof StringLiteral literal) { - return literal.getValue(); - } - } - } - } - - return null; - } - - /** - * Extract String list value from a specified property. May return null. - * - * @param i - * component instance. - * @param propertyName - * property name. - * @return property value. - */ - public static List getStringListValue(NamedElement i, String propertyName) { - var result = new ArrayList(); - var pa = findPropertyAssociation(propertyName, i); - - if (pa != null) { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - if (values.getFirst().getOwnedValue() instanceof ListValue list) { - for (var element : list.getOwnedListElements()) { - if (element instanceof StringLiteral literal) { - result.add(literal.getValue()); - } else if (element instanceof NamedValue named - && named.getNamedValue() instanceof EnumerationLiteral literal) { - result.add(literal.getName()); - } - } - - if (!result.isEmpty()) { - return result; - } - } - } - } - } - - return null; - } - /** * Extract enumeration value from a specified property. May return null. * @@ -539,379 +240,7 @@ public static String getEnumValue(NamedElement i, String propertyName) { return null; } - /** - * Extract range value from a specified property. May return null. - * - * @param i - * component instance. - * @param propertyName - * property name. - * @return property value. - */ - public static RangeValue getRangeValue(NamedElement i, String propertyName) { - var pa = findPropertyAssociation(propertyName, i); - - if (pa != null) { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - if (values.getFirst().getOwnedValue() instanceof RangeValue range) { - return range; - } - } - } - } - - return null; - } - - /** - * Extract minimum range value from a specified property. May return null. - * - * @param i - * component instance. - * @param propertyName - * property name. - * @return property value. - */ - public static NumberValue getMinRangeValue(NamedElement i, String propertyName) { - var pa = findPropertyAssociation(propertyName, i); - - if (pa != null) { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - var expr = values.getFirst().getOwnedValue(); - - if (expr instanceof RangeValue range) { - return range.getMinimumValue(); - } else if (expr instanceof NumberValue number) { - return number; - } - } - } - } - - return null; - } - - /** - * Extract maximum range value from a specified property. May return null. - * - * @param i - * component instance. - * @param propertyName - * property name. - * @return property value. - */ - public static NumberValue getMaxRangeValue(NamedElement i, String propertyName) { - var pa = findPropertyAssociation(propertyName, i); - - if (pa != null) { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - var expr = values.getFirst().getOwnedValue(); - - if (expr instanceof RangeValue range) { - return range.getMaximumValue(); - } else if (expr instanceof NumberValue number) { - return number; - } - } - } - } - - return null; - } - - /** - * Extract maximum range value from a specified property. - * - * @param i - * component instance. - * @param propertyName - * property name. - * @return property value. - */ - public static double getMaxRangeValue(NamedElement i, String propertyName, float defaultValue) { - var rl = (RealLiteral) getMaxRangeValue(i, propertyName); - if (rl != null) { - return rl.getValue(); - } else { - return defaultValue; - } - } - - /** - * TODO: DOC ME ! - * - * May return null. - * - * @param propertyName - * @param owner - * @return - */ - public static ComponentInstance getPropertyComponentRef(String propertyName, NamedElement owner) { - var val = getPropertyValue(propertyName, owner); - if (val != null) { - return (ComponentInstance) ((InstanceReferenceValue) val).getReferencedInstanceObject(); - } else { - return null; - } - } - - /** - * TODO: DOC ME ! - * - * May return null. - * - * @param propertyName - * @param owner - * @return - */ - public static PropertyExpression getPropertyValue(String propertyName, NamedElement owner) { - var assign = findPropertyAssociation(propertyName, owner); - - if (assign != null) { - return assign.getOwnedValues().get(0).getOwnedValue(); - } - - return null; - } - - /** - * TODO: DOC ME ! - * - * May return null. - * - * @param owner - * @param propertyName - * @return - */ - public static Classifier getClassifierValue(NamedElement owner, String propertyName) { - var pa = findPropertyAssociation(propertyName, owner); - - if (pa != null) { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - if (values.getFirst().getOwnedValue() instanceof ClassifierValue classifier) { - return classifier.getClassifier(); - } - } - } - } - - return null; - } - - public static PropertyAssociation createIntegerAssignment(String propertyName, long value) { - var property = Aadl2Factory.eINSTANCE.createProperty(); - var assignment = Aadl2Factory.eINSTANCE.createPropertyAssociation(); - var modalPropertyValue = Aadl2Factory.eINSTANCE.createModalPropertyValue(); - var propertyValue = Aadl2Factory.eINSTANCE.createIntegerLiteral(); - property.setName(propertyName); - propertyValue.setValue(value); - modalPropertyValue.setOwnedValue(propertyValue); - assignment.setProperty(property); - assignment.getOwnedValues().add(modalPropertyValue); - return assignment; - } - - public static boolean setFloatValue(NamedElement e, String propertyName, float value) { - var pa = findPropertyAssociation(propertyName, e); - - if (pa != null) { - var r = Aadl2Factory.eINSTANCE.createRealLiteral(); - r.setValue(value); - r.setUnit(getUnit(pa)); - pa.getOwnedValues().get(0).setOwnedValue(r); - return true; - } - - return false; - } - // May return null. - private static UnitLiteral getUnit(PropertyAssociation pa) { - var value = pa.getOwnedValues().getFirst().getOwnedValue(); - if (value instanceof NumberValue number) { - return number.getUnit(); - } else if (value instanceof RangeValue range) { - return range.getMaximumValue().getUnit(); - } else { - return null; - } - } - - /** - * TODO: DOC ME ! - * - * May return null. - * - * - * @param object - * @param propertyName - * @return - */ - public static List getComponentInstanceList(NamedElement object, String propertyName) { - List res = null; - var pa = findPropertyAssociation(propertyName, object); - - if (pa != null) { - res = new ArrayList<>(); - var p = pa.getProperty(); - - if (p.getName().equals(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - if (values.getFirst().getOwnedValue() instanceof ListValue list) { - for (var element : list.getOwnedListElements()) { - if (element instanceof InstanceReferenceValue reference) { - res.add((ComponentInstance) reference.getReferencedInstanceObject()); - } - } - } - } - } - } - - return res; - } - - /** - * May return an empty list. - * - * - * @param object - * @param propertyName - * @return - */ - public static List getSubcomponentList(NamedElement object, String propertyName) { - var result = new ArrayList(); - var pa = findPropertyAssociation(propertyName, object); - if (pa == null) { - return null; - } else { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - if (values.getFirst().getOwnedValue() instanceof ListValue list) { - for (var element : list.getOwnedListElements()) { - if (element instanceof ReferenceValue reference) { - for (var pathElement : reference.getContainmentPathElements()) { - result.add((Subcomponent) pathElement.getNamedElement()); - } - } - } - } - } - } - return result; - } - } - - /** - * - * TODO: DOC ME ! - * - * May return null. - * - * - * @param object - * @param propertyName - * @return - */ - public static List getIntListValue(NamedElement object, String propertyName) { - var result = new ArrayList(); - var pa = findPropertyAssociation(propertyName, object); - - if (pa == null) { - return null; - } else { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - if (values.getFirst().getOwnedValue() instanceof ListValue list) { - for (var element : list.getOwnedListElements()) { - if (element instanceof IntegerLiteral integer) { - result.add(integer.getValue()); - } - } - } - } - } - } - // try on a refined NamedElement - if (object instanceof RefinableElement refinable && refinable.getRefinedElement() != null) { - var inherited = getIntListValue(refinable.getRefinedElement(), propertyName); - if (inherited != null) { - result.addAll(inherited); - } - } - return result; - } - - /** - * May return an empty list. - * - * - * @param object - * @param propertyName - * @return - */ - public static List getSubcomponentList(ProcessorSubcomponent object, String propertyName) { - var result = new ArrayList(); - var pa = findPropertyAssociation(propertyName, object); - - if (pa != null) { - var p = pa.getProperty(); - - if (p.getName().equalsIgnoreCase(propertyName)) { - var values = pa.getOwnedValues(); - - if (values.size() == 1) { - if (values.getFirst().getOwnedValue() instanceof ListValue list) { - for (var element : list.getOwnedListElements()) { - if (element instanceof ReferenceValue reference) { - var pathElement = reference.getContainmentPathElements().getLast(); - result.add((Subcomponent) pathElement.getNamedElement()); - } - } - } - } - } - } - // try on a refined NamedElement - if (object.getRefinedElement() != null) { - var inherited = getSubcomponentList((ProcessorSubcomponent) object.getRefinedElement(), - propertyName); - if (!inherited.isEmpty()) { - result.addAll(inherited); - } - } - return result; - } /** * Returns the list of property expressions (PropertyExpression) associated diff --git a/ba/org.osate.xtext.aadl2.ba/src/org/osate/xtext/aadl2/ba/translation/DeclarativeToStrictTranslator.java b/ba/org.osate.xtext.aadl2.ba/src/org/osate/xtext/aadl2/ba/translation/DeclarativeToStrictTranslator.java index e2f4b1b096..ad9bb6598e 100644 --- a/ba/org.osate.xtext.aadl2.ba/src/org/osate/xtext/aadl2/ba/translation/DeclarativeToStrictTranslator.java +++ b/ba/org.osate.xtext.aadl2.ba/src/org/osate/xtext/aadl2/ba/translation/DeclarativeToStrictTranslator.java @@ -38,7 +38,6 @@ import org.osate.aadl2.Aadl2Factory; import org.osate.aadl2.AccessCategory; import org.osate.aadl2.AccessSpecification; -import org.osate.aadl2.ArraySize; import org.osate.aadl2.BasicProperty; import org.osate.aadl2.Classifier; import org.osate.aadl2.ClassifierValue; @@ -86,6 +85,7 @@ import org.osate.ba.aadlba.BehaviorAction; import org.osate.ba.aadlba.BehaviorActions; import org.osate.ba.aadlba.BehaviorAnnex; +import org.osate.ba.aadlba.BehaviorArraySize; import org.osate.ba.aadlba.BehaviorElement; import org.osate.ba.aadlba.BehaviorState; import org.osate.ba.aadlba.BehaviorVariable; @@ -323,14 +323,21 @@ private void translateVariables(final BehaviorAnnex strict) { /** * Translates the extent of one declared array dimension. AS5506/3 Rev A D.3 writes an array size as an integer - * value constant, and {@code aadl2::ArraySize} carries either a literal extent or the property constant that - * supplies one, so both of those forms keep the declared extent. Any other size the grammar accepts has - * nothing to carry it and keeps the model default; the size still traces to the syntax that was written. + * value constant, so the size becomes the strict integer value that was written, held without evaluation the way + * every other integer value position holds one. A property reference keeps its own form, including any element + * prefix, indexes, and fields; the value it denotes belongs to a component instance and is not a translation + * result. The inherited {@code aadl2::ArraySize} extent is set for the two forms core AADL can express, an + * integer literal and an unindexed property constant, so consumers that read a dimension the core way still see + * those extents. */ - private ArraySize toArraySize(final ArrayDimension dimension) { + private BehaviorArraySize toArraySize(final ArrayDimension dimension) { final var declaredSize = dimension.getSize(); - final var result = trace(Aadl2Factory.eINSTANCE.createArraySize(), + final var result = trace(FACTORY.createBehaviorArraySize(), declaredSize == null ? dimension : declaredSize); + if (declaredSize == null) { + return result; + } + result.setIntegerValue(toIntegerValue(declaredSize)); if (declaredSize instanceof BehaviorIntegerLiteral literal) { result.setSize(parseInteger(literal.getValue(), 0)); } else if (declaredSize instanceof HashPropertyReference reference && reference.getIndexes().isEmpty() diff --git a/ba/org.osate.xtext.aadl2.ba/src/org/osate/xtext/aadl2/ba/validation/BehaviorAnnexValidator.java b/ba/org.osate.xtext.aadl2.ba/src/org/osate/xtext/aadl2/ba/validation/BehaviorAnnexValidator.java index 625cc895d6..09d9af76cc 100644 --- a/ba/org.osate.xtext.aadl2.ba/src/org/osate/xtext/aadl2/ba/validation/BehaviorAnnexValidator.java +++ b/ba/org.osate.xtext.aadl2.ba/src/org/osate/xtext/aadl2/ba/validation/BehaviorAnnexValidator.java @@ -57,6 +57,7 @@ import org.osate.ba.analyzers.AadlBaTypeChecker; import org.osate.ba.analyzers.AdaLikeDataTypeChecker; import org.osate.xtext.aadl2.ba.behaviorAnnex.AssignmentAction; +import org.osate.xtext.aadl2.ba.behaviorAnnex.ArrayDimension; import org.osate.xtext.aadl2.ba.behaviorAnnex.BehaviorAnnex; import org.osate.xtext.aadl2.ba.behaviorAnnex.BehaviorAnnexPackage; import org.osate.xtext.aadl2.ba.behaviorAnnex.BehaviorIntegerLiteral; @@ -66,6 +67,7 @@ import org.osate.xtext.aadl2.ba.behaviorAnnex.ForStatement; import org.osate.xtext.aadl2.ba.behaviorAnnex.InternalCondition; import org.osate.xtext.aadl2.ba.behaviorAnnex.Reference; +import org.osate.xtext.aadl2.ba.behaviorAnnex.ReferenceExpression; import org.osate.xtext.aadl2.ba.translation.DeclarativeToStrictTranslator; import org.osate.xtext.aadl2.ba.translation.DeclarativeToStrictTranslator.TranslationResult; @@ -86,6 +88,7 @@ public final class BehaviorAnnexValidator extends AbstractBehaviorAnnexValidator public static final String TIMEOUT_RESET_PORT = "org.osate.xtext.aadl2.ba.timeoutResetPort"; public static final String TIMEOUT_RESET_PORT_TIME = "org.osate.xtext.aadl2.ba.timeoutResetPortTime"; public static final String ITERATIVE_VARIABLE_TARGET = "org.osate.xtext.aadl2.ba.iterativeVariableTarget"; + public static final String ARRAY_SIZE = "org.osate.xtext.aadl2.ba.arraySize"; private static final URI VALIDATION_RESOURCE_URI = URI.createURI("validation:/behavior-annex.aadlba"); @Inject @@ -112,7 +115,8 @@ public void checkBehaviorAnnex(final BehaviorAnnex source) { var translation = translator.translate(source, owner); // Each check describes a use no strict checker can reject, and a model can get each one wrong independently, // so report them all before deciding whether the strict checkers have a model to work on. - var representable = checkInternalPortUses(source, translation); + var representable = checkArraySizes(source); + representable &= checkInternalPortUses(source, translation); representable &= checkInternalConditionPorts(source, translation); representable &= checkTimeoutResetPorts(source, translation); representable &= checkIteratorTargets(source, translation); @@ -141,6 +145,33 @@ public void checkBehaviorAnnex(final BehaviorAnnex source) { } } + /** + * AS5506/3 Rev A D.3 requires each behavior-variable array size to be the integer value constant of D.7: an integer + * literal or a property reference. The shared integer-value grammar also accepts an ordinary reference expression, + * which names a value variable rather than a constant, and no strict checker constrains an array size. A reference + * expression with a property tail is a property reference, so reject only one without a tail. The value a property + * reference denotes belongs to a component instance, so whether it can be read from the declarative model says + * nothing about the legality of the declaration and is not checked here. + * + * @return {@code true} when every declared array size is an integer value constant + */ + private boolean checkArraySizes(final BehaviorAnnex source) { + var accepted = true; + for (var contents = source.eAllContents(); contents.hasNext();) { + if (!(contents.next() instanceof ArrayDimension dimension)) { + continue; + } + var size = dimension.getSize(); + if (size instanceof ReferenceExpression reference && reference.getProperty() == null) { + var written = NodeModelUtils.getTokenText(NodeModelUtils.findActualNodeFor(size)); + error("Array size '" + written + "' must be an integer literal or a property reference", size, null, + ValidationMessageAcceptor.INSIGNIFICANT_INDEX, ARRAY_SIZE); + accepted = false; + } + } + return accepted; + } + /** * AS5506/3 Rev A names an internal port in the D.3 internal_condition production and in the D.6 target and * communication_action productions only. The grammar accepts a generic reference everywhere else, so an internal