浏览代码

Added state vector that defines the required size for storing active states. The state vector will be calculated by the ModelSequecer

terfloth@itemis.de 14 年之前
父节点
当前提交
df37d9a5e2
共有 21 个文件被更改,包括 1007 次插入1 次删除
  1. 二进制
      plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateExecutionFlow_stateVector_StateVector.gif
  2. 二进制
      plugins/org.yakindu.sct.model.sexec.edit/icons/full/obj16/StateVector.gif
  3. 4 0
      plugins/org.yakindu.sct.model.sexec.edit/plugin.properties
  4. 7 0
      plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/ExecutionFlowItemProvider.java
  5. 24 0
      plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/SexecItemProviderAdapterFactory.java
  6. 183 0
      plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/StateVectorItemProvider.java
  7. 8 0
      plugins/org.yakindu.sct.model.sexec/model/sexec.ecore
  8. 27 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/ExecutionFlow.java
  9. 9 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/SexecFactory.java
  10. 125 1
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/SexecPackage.java
  11. 83 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/StateVector.java
  12. 67 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/ExecutionFlowImpl.java
  13. 11 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/SexecFactoryImpl.java
  14. 54 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/SexecPackageImpl.java
  15. 221 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/StateVectorImpl.java
  16. 11 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/ModelSequencer.xtend
  17. 33 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/StatechartExtensions.xtend
  18. 18 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/util/SexecAdapterFactory.java
  19. 21 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/util/SexecSwitch.java
  20. 94 0
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerTest.java
  21. 7 0
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/SCTTestUtil.java

二进制
plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateExecutionFlow_stateVector_StateVector.gif


二进制
plugins/org.yakindu.sct.model.sexec.edit/icons/full/obj16/StateVector.gif


+ 4 - 0
plugins/org.yakindu.sct.model.sexec.edit/plugin.properties

@@ -50,3 +50,7 @@ _UI_Unknown_feature = Unspecified
 _UI_If_thenStep_feature = Then Step
 _UI_If_elseStep_feature = Else Step
 _UI_ExecutionFlow_enterSequence_feature = Enter Sequence
+_UI_StateVector_type = State Vector
+_UI_ExecutionFlow_stateVector_feature = State Vector
+_UI_StateVector_size_feature = Size
+_UI_StateVector_offset_feature = Offset

+ 7 - 0
plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/ExecutionFlowItemProvider.java

@@ -110,6 +110,7 @@ public class ExecutionFlowItemProvider
 			childrenFeatures.add(SexecPackage.Literals.EXECUTION_FLOW__STATES);
 			childrenFeatures.add(SexecPackage.Literals.EXECUTION_FLOW__SEQUENCES);
 			childrenFeatures.add(SexecPackage.Literals.EXECUTION_FLOW__ENTER_SEQUENCE);
+			childrenFeatures.add(SexecPackage.Literals.EXECUTION_FLOW__STATE_VECTOR);
 		}
 		return childrenFeatures;
 	}
@@ -170,6 +171,7 @@ public class ExecutionFlowItemProvider
 			case SexecPackage.EXECUTION_FLOW__STATES:
 			case SexecPackage.EXECUTION_FLOW__SEQUENCES:
 			case SexecPackage.EXECUTION_FLOW__ENTER_SEQUENCE:
+			case SexecPackage.EXECUTION_FLOW__STATE_VECTOR:
 				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
 				return;
 		}
@@ -211,6 +213,11 @@ public class ExecutionFlowItemProvider
 			(createChildParameter
 				(SexecPackage.Literals.EXECUTION_FLOW__ENTER_SEQUENCE,
 				 SexecFactory.eINSTANCE.createCycle()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(SexecPackage.Literals.EXECUTION_FLOW__STATE_VECTOR,
+				 SexecFactory.eINSTANCE.createStateVector()));
 	}
 
 	/**

+ 24 - 0
plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/SexecItemProviderAdapterFactory.java

@@ -305,6 +305,29 @@ public class SexecItemProviderAdapterFactory extends SexecAdapterFactory impleme
 		return sequenceExecutionItemProvider;
 	}
 
+	/**
+	 * This keeps track of the one adapter used for all {@link org.yakindu.sct.model.sexec.StateVector} instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected StateVectorItemProvider stateVectorItemProvider;
+
+	/**
+	 * This creates an adapter for a {@link org.yakindu.sct.model.sexec.StateVector}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Adapter createStateVectorAdapter() {
+		if (stateVectorItemProvider == null) {
+			stateVectorItemProvider = new StateVectorItemProvider(this);
+		}
+
+		return stateVectorItemProvider;
+	}
+
 	/**
 	 * This returns the root adapter factory that contains this factory.
 	 * <!-- begin-user-doc -->
@@ -414,6 +437,7 @@ public class SexecItemProviderAdapterFactory extends SexecAdapterFactory impleme
 		if (enterStateItemProvider != null) enterStateItemProvider.dispose();
 		if (exitStateItemProvider != null) exitStateItemProvider.dispose();
 		if (sequenceExecutionItemProvider != null) sequenceExecutionItemProvider.dispose();
+		if (stateVectorItemProvider != null) stateVectorItemProvider.dispose();
 	}
 
 }

+ 183 - 0
plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/StateVectorItemProvider.java

@@ -0,0 +1,183 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.yakindu.sct.model.sexec.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.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.yakindu.sct.model.sexec.SexecPackage;
+import org.yakindu.sct.model.sexec.StateVector;
+
+/**
+ * This is the item provider adapter for a {@link org.yakindu.sct.model.sexec.StateVector} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class StateVectorItemProvider
+	extends ItemProviderAdapter
+	implements
+		IEditingDomainItemProvider,
+		IStructuredItemContentProvider,
+		ITreeItemContentProvider,
+		IItemLabelProvider,
+		IItemPropertySource {
+	/**
+	 * This constructs an instance from a factory and a notifier.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public StateVectorItemProvider(AdapterFactory adapterFactory) {
+		super(adapterFactory);
+	}
+
+	/**
+	 * This returns the property descriptors for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+		if (itemPropertyDescriptors == null) {
+			super.getPropertyDescriptors(object);
+
+			addSizePropertyDescriptor(object);
+			addOffsetPropertyDescriptor(object);
+		}
+		return itemPropertyDescriptors;
+	}
+
+	/**
+	 * This adds a property descriptor for the Size feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addSizePropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_StateVector_size_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_StateVector_size_feature", "_UI_StateVector_type"),
+				 SexecPackage.Literals.STATE_VECTOR__SIZE,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Offset feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addOffsetPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_StateVector_offset_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_StateVector_offset_feature", "_UI_StateVector_type"),
+				 SexecPackage.Literals.STATE_VECTOR__OFFSET,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This returns StateVector.gif.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object getImage(Object object) {
+		return overlayImage(object, getResourceLocator().getImage("full/obj16/StateVector"));
+	}
+
+	/**
+	 * This returns the label text for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String getText(Object object) {
+		StateVector stateVector = (StateVector)object;
+		return getString("_UI_StateVector_type") + " " + stateVector.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}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void notifyChanged(Notification notification) {
+		updateChildren(notification);
+
+		switch (notification.getFeatureID(StateVector.class)) {
+			case SexecPackage.STATE_VECTOR__SIZE:
+			case SexecPackage.STATE_VECTOR__OFFSET:
+				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+				return;
+		}
+		super.notifyChanged(notification);
+	}
+
+	/**
+	 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+	 * that can be created under this object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+		super.collectNewChildDescriptors(newChildDescriptors, object);
+	}
+
+	/**
+	 * Return the resource locator for this item provider's resources.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public ResourceLocator getResourceLocator() {
+		return SexecEditPlugin.INSTANCE;
+	}
+
+}

+ 8 - 0
plugins/org.yakindu.sct.model.sexec/model/sexec.ecore

@@ -10,6 +10,8 @@
         eType="#//Sequence" containment="true"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="enterSequence" eType="#//Sequence"
         containment="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="stateVector" eType="#//StateVector"
+        containment="true"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="ExecutionState" eSuperTypes="#//NamedElement">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="simpleName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
@@ -45,4 +47,10 @@
   <eClassifiers xsi:type="ecore:EClass" name="SequenceExecution" eSuperTypes="#//Step">
     <eStructuralFeatures xsi:type="ecore:EReference" name="sequence" eType="#//Sequence"/>
   </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="StateVector">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="size" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
+        defaultValueLiteral="1"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="offset" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
+        defaultValueLiteral="0"/>
+  </eClassifiers>
 </ecore:EPackage>

+ 27 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/ExecutionFlow.java

@@ -22,6 +22,7 @@ import org.eclipse.emf.ecore.EObject;
  *   <li>{@link org.yakindu.sct.model.sexec.ExecutionFlow#getStates <em>States</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sexec.ExecutionFlow#getSequences <em>Sequences</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sexec.ExecutionFlow#getEnterSequence <em>Enter Sequence</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sexec.ExecutionFlow#getStateVector <em>State Vector</em>}</li>
  * </ul>
  * </p>
  *
@@ -88,4 +89,30 @@ public interface ExecutionFlow extends ScopedElement, NamedElement {
 	 */
 	void setEnterSequence(Sequence value);
 
+	/**
+	 * Returns the value of the '<em><b>State Vector</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>State Vector</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>State Vector</em>' containment reference.
+	 * @see #setStateVector(StateVector)
+	 * @see org.yakindu.sct.model.sexec.SexecPackage#getExecutionFlow_StateVector()
+	 * @model containment="true"
+	 * @generated
+	 */
+	StateVector getStateVector();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.sct.model.sexec.ExecutionFlow#getStateVector <em>State Vector</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>State Vector</em>' containment reference.
+	 * @see #getStateVector()
+	 * @generated
+	 */
+	void setStateVector(StateVector value);
+
 } // ExecutionFlow

+ 9 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/SexecFactory.java

@@ -115,6 +115,15 @@ public interface SexecFactory extends EFactory {
 	 */
 	SequenceExecution createSequenceExecution();
 
+	/**
+	 * Returns a new object of class '<em>State Vector</em>'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return a new object of class '<em>State Vector</em>'.
+	 * @generated
+	 */
+	StateVector createStateVector();
+
 	/**
 	 * Returns the package supported by this factory.
 	 * <!-- begin-user-doc -->

+ 125 - 1
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/SexecPackage.java

@@ -115,6 +115,15 @@ public interface SexecPackage extends EPackage {
 	 */
 	int EXECUTION_FLOW__ENTER_SEQUENCE = SGraphPackage.SCOPED_ELEMENT_FEATURE_COUNT + 3;
 
+	/**
+	 * The feature id for the '<em><b>State Vector</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int EXECUTION_FLOW__STATE_VECTOR = SGraphPackage.SCOPED_ELEMENT_FEATURE_COUNT + 4;
+
 	/**
 	 * The number of structural features of the '<em>Execution Flow</em>' class.
 	 * <!-- begin-user-doc -->
@@ -122,7 +131,7 @@ public interface SexecPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int EXECUTION_FLOW_FEATURE_COUNT = SGraphPackage.SCOPED_ELEMENT_FEATURE_COUNT + 4;
+	int EXECUTION_FLOW_FEATURE_COUNT = SGraphPackage.SCOPED_ELEMENT_FEATURE_COUNT + 5;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.NamedElementImpl <em>Named Element</em>}' class.
@@ -522,6 +531,44 @@ public interface SexecPackage extends EPackage {
 	int SEQUENCE_EXECUTION_FEATURE_COUNT = STEP_FEATURE_COUNT + 1;
 
 
+	/**
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.StateVectorImpl <em>State Vector</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.StateVectorImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getStateVector()
+	 * @generated
+	 */
+	int STATE_VECTOR = 11;
+
+	/**
+	 * The feature id for the '<em><b>Size</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int STATE_VECTOR__SIZE = 0;
+
+	/**
+	 * The feature id for the '<em><b>Offset</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int STATE_VECTOR__OFFSET = 1;
+
+	/**
+	 * The number of structural features of the '<em>State Vector</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int STATE_VECTOR_FEATURE_COUNT = 2;
+
+
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.sct.model.sexec.ExecutionFlow <em>Execution Flow</em>}'.
 	 * <!-- begin-user-doc -->
@@ -565,6 +612,17 @@ public interface SexecPackage extends EPackage {
 	 */
 	EReference getExecutionFlow_EnterSequence();
 
+	/**
+	 * Returns the meta object for the containment reference '{@link org.yakindu.sct.model.sexec.ExecutionFlow#getStateVector <em>State Vector</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>State Vector</em>'.
+	 * @see org.yakindu.sct.model.sexec.ExecutionFlow#getStateVector()
+	 * @see #getExecutionFlow()
+	 * @generated
+	 */
+	EReference getExecutionFlow_StateVector();
+
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.sct.model.sexec.ExecutionState <em>Execution State</em>}'.
 	 * <!-- begin-user-doc -->
@@ -797,6 +855,38 @@ public interface SexecPackage extends EPackage {
 	 */
 	EReference getSequenceExecution_Sequence();
 
+	/**
+	 * Returns the meta object for class '{@link org.yakindu.sct.model.sexec.StateVector <em>State Vector</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>State Vector</em>'.
+	 * @see org.yakindu.sct.model.sexec.StateVector
+	 * @generated
+	 */
+	EClass getStateVector();
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.yakindu.sct.model.sexec.StateVector#getSize <em>Size</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Size</em>'.
+	 * @see org.yakindu.sct.model.sexec.StateVector#getSize()
+	 * @see #getStateVector()
+	 * @generated
+	 */
+	EAttribute getStateVector_Size();
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.yakindu.sct.model.sexec.StateVector#getOffset <em>Offset</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Offset</em>'.
+	 * @see org.yakindu.sct.model.sexec.StateVector#getOffset()
+	 * @see #getStateVector()
+	 * @generated
+	 */
+	EAttribute getStateVector_Offset();
+
 	/**
 	 * Returns the factory that creates the instances of the model.
 	 * <!-- begin-user-doc -->
@@ -853,6 +943,14 @@ public interface SexecPackage extends EPackage {
 		 */
 		EReference EXECUTION_FLOW__ENTER_SEQUENCE = eINSTANCE.getExecutionFlow_EnterSequence();
 
+		/**
+		 * The meta object literal for the '<em><b>State Vector</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EReference EXECUTION_FLOW__STATE_VECTOR = eINSTANCE.getExecutionFlow_StateVector();
+
 		/**
 		 * The meta object literal for the '{@link org.yakindu.sct.model.sexec.impl.ExecutionStateImpl <em>Execution State</em>}' class.
 		 * <!-- begin-user-doc -->
@@ -1049,6 +1147,32 @@ public interface SexecPackage extends EPackage {
 		 */
 		EReference SEQUENCE_EXECUTION__SEQUENCE = eINSTANCE.getSequenceExecution_Sequence();
 
+		/**
+		 * The meta object literal for the '{@link org.yakindu.sct.model.sexec.impl.StateVectorImpl <em>State Vector</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.yakindu.sct.model.sexec.impl.StateVectorImpl
+		 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getStateVector()
+		 * @generated
+		 */
+		EClass STATE_VECTOR = eINSTANCE.getStateVector();
+
+		/**
+		 * The meta object literal for the '<em><b>Size</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EAttribute STATE_VECTOR__SIZE = eINSTANCE.getStateVector_Size();
+
+		/**
+		 * The meta object literal for the '<em><b>Offset</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EAttribute STATE_VECTOR__OFFSET = eINSTANCE.getStateVector_Offset();
+
 	}
 
 } //SexecPackage

+ 83 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/StateVector.java

@@ -0,0 +1,83 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.yakindu.sct.model.sexec;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>State Vector</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.sexec.StateVector#getSize <em>Size</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sexec.StateVector#getOffset <em>Offset</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.yakindu.sct.model.sexec.SexecPackage#getStateVector()
+ * @model
+ * @generated
+ */
+public interface StateVector extends EObject {
+	/**
+	 * Returns the value of the '<em><b>Size</b></em>' attribute.
+	 * The default value is <code>"1"</code>.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Size</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Size</em>' attribute.
+	 * @see #setSize(int)
+	 * @see org.yakindu.sct.model.sexec.SexecPackage#getStateVector_Size()
+	 * @model default="1"
+	 * @generated
+	 */
+	int getSize();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.sct.model.sexec.StateVector#getSize <em>Size</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Size</em>' attribute.
+	 * @see #getSize()
+	 * @generated
+	 */
+	void setSize(int value);
+
+	/**
+	 * Returns the value of the '<em><b>Offset</b></em>' attribute.
+	 * The default value is <code>"0"</code>.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Offset</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Offset</em>' attribute.
+	 * @see #setOffset(int)
+	 * @see org.yakindu.sct.model.sexec.SexecPackage#getStateVector_Offset()
+	 * @model default="0"
+	 * @generated
+	 */
+	int getOffset();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.sct.model.sexec.StateVector#getOffset <em>Offset</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Offset</em>' attribute.
+	 * @see #getOffset()
+	 * @generated
+	 */
+	void setOffset(int value);
+
+} // StateVector

+ 67 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/ExecutionFlowImpl.java

@@ -27,6 +27,7 @@ import org.yakindu.sct.model.sexec.ExecutionState;
 import org.yakindu.sct.model.sexec.NamedElement;
 import org.yakindu.sct.model.sexec.Sequence;
 import org.yakindu.sct.model.sexec.SexecPackage;
+import org.yakindu.sct.model.sexec.StateVector;
 import org.yakindu.sct.model.sgraph.impl.ScopedElementImpl;
 
 /**
@@ -40,6 +41,7 @@ import org.yakindu.sct.model.sgraph.impl.ScopedElementImpl;
  *   <li>{@link org.yakindu.sct.model.sexec.impl.ExecutionFlowImpl#getStates <em>States</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sexec.impl.ExecutionFlowImpl#getSequences <em>Sequences</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sexec.impl.ExecutionFlowImpl#getEnterSequence <em>Enter Sequence</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sexec.impl.ExecutionFlowImpl#getStateVector <em>State Vector</em>}</li>
  * </ul>
  * </p>
  *
@@ -96,6 +98,16 @@ public class ExecutionFlowImpl extends ScopedElementImpl implements ExecutionFlo
 	 */
 	protected Sequence enterSequence;
 
+	/**
+	 * The cached value of the '{@link #getStateVector() <em>State Vector</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getStateVector()
+	 * @generated
+	 * @ordered
+	 */
+	protected StateVector stateVector;
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -203,6 +215,49 @@ public class ExecutionFlowImpl extends ScopedElementImpl implements ExecutionFlo
 			eNotify(new ENotificationImpl(this, Notification.SET, SexecPackage.EXECUTION_FLOW__ENTER_SEQUENCE, newEnterSequence, newEnterSequence));
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public StateVector getStateVector() {
+		return stateVector;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetStateVector(StateVector newStateVector, NotificationChain msgs) {
+		StateVector oldStateVector = stateVector;
+		stateVector = newStateVector;
+		if (eNotificationRequired()) {
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SexecPackage.EXECUTION_FLOW__STATE_VECTOR, oldStateVector, newStateVector);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setStateVector(StateVector newStateVector) {
+		if (newStateVector != stateVector) {
+			NotificationChain msgs = null;
+			if (stateVector != null)
+				msgs = ((InternalEObject)stateVector).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SexecPackage.EXECUTION_FLOW__STATE_VECTOR, null, msgs);
+			if (newStateVector != null)
+				msgs = ((InternalEObject)newStateVector).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SexecPackage.EXECUTION_FLOW__STATE_VECTOR, null, msgs);
+			msgs = basicSetStateVector(newStateVector, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SexecPackage.EXECUTION_FLOW__STATE_VECTOR, newStateVector, newStateVector));
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -217,6 +272,8 @@ public class ExecutionFlowImpl extends ScopedElementImpl implements ExecutionFlo
 				return ((InternalEList<?>)getSequences()).basicRemove(otherEnd, msgs);
 			case SexecPackage.EXECUTION_FLOW__ENTER_SEQUENCE:
 				return basicSetEnterSequence(null, msgs);
+			case SexecPackage.EXECUTION_FLOW__STATE_VECTOR:
+				return basicSetStateVector(null, msgs);
 		}
 		return super.eInverseRemove(otherEnd, featureID, msgs);
 	}
@@ -237,6 +294,8 @@ public class ExecutionFlowImpl extends ScopedElementImpl implements ExecutionFlo
 				return getSequences();
 			case SexecPackage.EXECUTION_FLOW__ENTER_SEQUENCE:
 				return getEnterSequence();
+			case SexecPackage.EXECUTION_FLOW__STATE_VECTOR:
+				return getStateVector();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -264,6 +323,9 @@ public class ExecutionFlowImpl extends ScopedElementImpl implements ExecutionFlo
 			case SexecPackage.EXECUTION_FLOW__ENTER_SEQUENCE:
 				setEnterSequence((Sequence)newValue);
 				return;
+			case SexecPackage.EXECUTION_FLOW__STATE_VECTOR:
+				setStateVector((StateVector)newValue);
+				return;
 		}
 		super.eSet(featureID, newValue);
 	}
@@ -288,6 +350,9 @@ public class ExecutionFlowImpl extends ScopedElementImpl implements ExecutionFlo
 			case SexecPackage.EXECUTION_FLOW__ENTER_SEQUENCE:
 				setEnterSequence((Sequence)null);
 				return;
+			case SexecPackage.EXECUTION_FLOW__STATE_VECTOR:
+				setStateVector((StateVector)null);
+				return;
 		}
 		super.eUnset(featureID);
 	}
@@ -308,6 +373,8 @@ public class ExecutionFlowImpl extends ScopedElementImpl implements ExecutionFlo
 				return sequences != null && !sequences.isEmpty();
 			case SexecPackage.EXECUTION_FLOW__ENTER_SEQUENCE:
 				return enterSequence != null;
+			case SexecPackage.EXECUTION_FLOW__STATE_VECTOR:
+				return stateVector != null;
 		}
 		return super.eIsSet(featureID);
 	}

+ 11 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/SexecFactoryImpl.java

@@ -70,6 +70,7 @@ public class SexecFactoryImpl extends EFactoryImpl implements SexecFactory {
 			case SexecPackage.ENTER_STATE: return createEnterState();
 			case SexecPackage.EXIT_STATE: return createExitState();
 			case SexecPackage.SEQUENCE_EXECUTION: return createSequenceExecution();
+			case SexecPackage.STATE_VECTOR: return createStateVector();
 			default:
 				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
 		}
@@ -175,6 +176,16 @@ public class SexecFactoryImpl extends EFactoryImpl implements SexecFactory {
 		return sequenceExecution;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public StateVector createStateVector() {
+		StateVectorImpl stateVector = new StateVectorImpl();
+		return stateVector;
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

+ 54 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/SexecPackageImpl.java

@@ -23,6 +23,7 @@ import org.yakindu.sct.model.sexec.Sequence;
 import org.yakindu.sct.model.sexec.SequenceExecution;
 import org.yakindu.sct.model.sexec.SexecFactory;
 import org.yakindu.sct.model.sexec.SexecPackage;
+import org.yakindu.sct.model.sexec.StateVector;
 import org.yakindu.sct.model.sexec.Step;
 import org.yakindu.sct.model.sgraph.SGraphPackage;
 
@@ -110,6 +111,13 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 	 */
 	private EClass sequenceExecutionEClass = null;
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass stateVectorEClass = null;
+
 	/**
 	 * Creates an instance of the model <b>Package</b>, registered with
 	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
@@ -210,6 +218,15 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		return (EReference)executionFlowEClass.getEStructuralFeatures().get(2);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EReference getExecutionFlow_StateVector() {
+		return (EReference)executionFlowEClass.getEStructuralFeatures().get(3);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -408,6 +425,33 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		return (EReference)sequenceExecutionEClass.getEStructuralFeatures().get(0);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EClass getStateVector() {
+		return stateVectorEClass;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EAttribute getStateVector_Size() {
+		return (EAttribute)stateVectorEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EAttribute getStateVector_Offset() {
+		return (EAttribute)stateVectorEClass.getEStructuralFeatures().get(1);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -440,6 +484,7 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		createEReference(executionFlowEClass, EXECUTION_FLOW__STATES);
 		createEReference(executionFlowEClass, EXECUTION_FLOW__SEQUENCES);
 		createEReference(executionFlowEClass, EXECUTION_FLOW__ENTER_SEQUENCE);
+		createEReference(executionFlowEClass, EXECUTION_FLOW__STATE_VECTOR);
 
 		executionStateEClass = createEClass(EXECUTION_STATE);
 		createEAttribute(executionStateEClass, EXECUTION_STATE__SIMPLE_NAME);
@@ -472,6 +517,10 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 
 		sequenceExecutionEClass = createEClass(SEQUENCE_EXECUTION);
 		createEReference(sequenceExecutionEClass, SEQUENCE_EXECUTION__SEQUENCE);
+
+		stateVectorEClass = createEClass(STATE_VECTOR);
+		createEAttribute(stateVectorEClass, STATE_VECTOR__SIZE);
+		createEAttribute(stateVectorEClass, STATE_VECTOR__OFFSET);
 	}
 
 	/**
@@ -522,6 +571,7 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		initEReference(getExecutionFlow_States(), this.getExecutionState(), null, "states", null, 0, -1, ExecutionFlow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getExecutionFlow_Sequences(), this.getSequence(), null, "sequences", null, 0, -1, ExecutionFlow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getExecutionFlow_EnterSequence(), this.getSequence(), null, "enterSequence", null, 0, 1, ExecutionFlow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getExecutionFlow_StateVector(), this.getStateVector(), null, "stateVector", null, 0, 1, ExecutionFlow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(executionStateEClass, ExecutionState.class, "ExecutionState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getExecutionState_SimpleName(), ecorePackage.getEString(), "simpleName", null, 0, 1, ExecutionState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -555,6 +605,10 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		initEClass(sequenceExecutionEClass, SequenceExecution.class, "SequenceExecution", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getSequenceExecution_Sequence(), this.getSequence(), null, "sequence", null, 0, 1, SequenceExecution.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
+		initEClass(stateVectorEClass, StateVector.class, "StateVector", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getStateVector_Size(), ecorePackage.getEInt(), "size", "1", 0, 1, StateVector.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getStateVector_Offset(), ecorePackage.getEInt(), "offset", "0", 0, 1, StateVector.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
 		// Create resource
 		createResource(eNS_URI);
 	}

+ 221 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/StateVectorImpl.java

@@ -0,0 +1,221 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.yakindu.sct.model.sexec.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.yakindu.sct.model.sexec.SexecPackage;
+import org.yakindu.sct.model.sexec.StateVector;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>State Vector</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.sexec.impl.StateVectorImpl#getSize <em>Size</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sexec.impl.StateVectorImpl#getOffset <em>Offset</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class StateVectorImpl extends EObjectImpl implements StateVector {
+	/**
+	 * The default value of the '{@link #getSize() <em>Size</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSize()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final int SIZE_EDEFAULT = 1;
+
+	/**
+	 * The cached value of the '{@link #getSize() <em>Size</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSize()
+	 * @generated
+	 * @ordered
+	 */
+	protected int size = SIZE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getOffset() <em>Offset</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOffset()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final int OFFSET_EDEFAULT = 0;
+
+	/**
+	 * The cached value of the '{@link #getOffset() <em>Offset</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOffset()
+	 * @generated
+	 * @ordered
+	 */
+	protected int offset = OFFSET_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected StateVectorImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return SexecPackage.Literals.STATE_VECTOR;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public int getSize() {
+		return size;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setSize(int newSize) {
+		int oldSize = size;
+		size = newSize;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SexecPackage.STATE_VECTOR__SIZE, oldSize, size));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public int getOffset() {
+		return offset;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setOffset(int newOffset) {
+		int oldOffset = offset;
+		offset = newOffset;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SexecPackage.STATE_VECTOR__OFFSET, oldOffset, offset));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType) {
+		switch (featureID) {
+			case SexecPackage.STATE_VECTOR__SIZE:
+				return getSize();
+			case SexecPackage.STATE_VECTOR__OFFSET:
+				return getOffset();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue) {
+		switch (featureID) {
+			case SexecPackage.STATE_VECTOR__SIZE:
+				setSize((Integer)newValue);
+				return;
+			case SexecPackage.STATE_VECTOR__OFFSET:
+				setOffset((Integer)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case SexecPackage.STATE_VECTOR__SIZE:
+				setSize(SIZE_EDEFAULT);
+				return;
+			case SexecPackage.STATE_VECTOR__OFFSET:
+				setOffset(OFFSET_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case SexecPackage.STATE_VECTOR__SIZE:
+				return size != SIZE_EDEFAULT;
+			case SexecPackage.STATE_VECTOR__OFFSET:
+				return offset != OFFSET_EDEFAULT;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString() {
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (size: ");
+		result.append(size);
+		result.append(", offset: ");
+		result.append(offset);
+		result.append(')');
+		return result.toString();
+	}
+
+} //StateVectorImpl

+ 11 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/ModelSequencer.xtend

@@ -39,6 +39,7 @@ class ModelSequencer {
 	
 	@Inject extension IQualifiedNameProvider qfnProvider
 	@Inject extension FactoryExtension factory
+	@Inject extension StatechartExtensions sct
 
 
 	def ExecutionFlow transform(Statechart sc) {
@@ -47,6 +48,7 @@ class ModelSequencer {
 		sc.mapExecutionFlow(ef)
 		sc.mapScopes(ef)
 		
+		ef.defineStateVector(sc)
 		ef.defineEnterSequence(sc)
 		
 		return ef
@@ -167,6 +169,15 @@ class ModelSequencer {
 	}
 	
 	
+	/************** Calculating Structure information **************/
+
+	def defineStateVector(ExecutionFlow flow, Statechart sc) {
+		flow.stateVector = sexecFactory.createStateVector
+		flow.stateVector.offset = 0;
+		flow.stateVector.size = sc.maxOrthogonality		
+	}
+
+
 	/************** Calculating execution sequences **************/
 	
 	

+ 33 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/StatechartExtensions.xtend

@@ -0,0 +1,33 @@
+package org.yakindu.sct.model.sexec.transformation
+
+import org.yakindu.sct.model.sgraph.Statechart
+import org.yakindu.sct.model.sgraph.Region
+import org.yakindu.sct.model.sgraph.Vertex
+import org.yakindu.sct.model.sgraph.State
+
+class StatechartExtensions {
+	
+	
+	/** calculates the maximum orthogonality (maximum number of possible active leaf states) of the statechart */
+	def int maxOrthogonality(Statechart sc) {
+		sc.regions.fold(0, [o, r | r.maxOrthogonality + o])
+	}
+
+	/** calculates the maximum orthogonality (maximum number of possible active leaf states) of a region */
+	def int maxOrthogonality(Region r) {
+		r.vertices.fold(0, [s, v | {
+			val mo = v.maxOrthogonality
+			if (mo > s) mo else s }])
+	}
+
+	/** the maximum orthogonality of all pseudo states is 0 */
+	def dispatch int maxOrthogonality(Vertex v) { 0 }
+	
+	/** calculates the maximum orthogonality (maximum number of possible active leaf states) of a state */
+	def dispatch int maxOrthogonality(State s) { 
+		if ( s.subRegions.size > 0 ) {
+			s.subRegions.fold(0, [o, r | r.maxOrthogonality + o])		
+		} else 1
+	}
+
+}

+ 18 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/util/SexecAdapterFactory.java

@@ -117,6 +117,10 @@ public class SexecAdapterFactory extends AdapterFactoryImpl {
 				return createSequenceExecutionAdapter();
 			}
 			@Override
+			public Adapter caseStateVector(StateVector object) {
+				return createStateVectorAdapter();
+			}
+			@Override
 			public Adapter caseScopedElement(ScopedElement object) {
 				return createScopedElementAdapter();
 			}
@@ -294,6 +298,20 @@ public class SexecAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sexec.StateVector <em>State Vector</em>}'.
+	 * <!-- begin-user-doc -->
+	 * 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.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see org.yakindu.sct.model.sexec.StateVector
+	 * @generated
+	 */
+	public Adapter createStateVectorAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sgraph.ScopedElement <em>Scoped Element</em>}'.
 	 * <!-- begin-user-doc -->

+ 21 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/util/SexecSwitch.java

@@ -150,6 +150,12 @@ public class SexecSwitch<T> extends Switch<T> {
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
+			case SexecPackage.STATE_VECTOR: {
+				StateVector stateVector = (StateVector)theEObject;
+				T result = caseStateVector(stateVector);
+				if (result == null) result = defaultCase(theEObject);
+				return result;
+			}
 			default: return defaultCase(theEObject);
 		}
 	}
@@ -319,6 +325,21 @@ public class SexecSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>State Vector</em>'.
+	 * <!-- begin-user-doc -->
+	 * This implementation returns null;
+	 * returning a non-null result will terminate the switch.
+	 * <!-- end-user-doc -->
+	 * @param object the target of the switch.
+	 * @return the result of interpreting the object as an instance of '<em>State Vector</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseStateVector(StateVector object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>Scoped Element</em>'.
 	 * <!-- begin-user-doc -->

+ 94 - 0
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerTest.java

@@ -60,6 +60,7 @@ public class ModelSequencerTest {
 		assertEquals(sc.getName(), sequencer.transform(sc).getName());
 	}
 	
+	
 	/**
 	 * The event refs used in the trigger condition must refer to the event declarations in the flow model 
 	 * and not the sc source model.
@@ -279,5 +280,98 @@ public class ModelSequencerTest {
 
 	
 
+	/**
+	 * The state vector descriptor of the ExecutionFlow must have an offset of 0 and a size that is 
+	 * the maximum orthogonality of the statechart.
+	 */
+	@Test public void testSCStateVectorFlatNonOrthopgonal() {
+		SimpleFlatTSC tsc = new SimpleFlatTSC();
+		
+		ExecutionFlow flow = sequencer.transform(tsc.sc);
+		
+		assertNotNull(flow.getStateVector());
+		assertEquals(1, flow.getStateVector().getSize());
+		assertEquals(0, flow.getStateVector().getOffset());
+	}
+
+	/**
+	 * The state vector descriptor of the ExecutionFlow must have an offset of 0 and a size that is 
+	 * the maximum orthogonality of the statechart.
+	 */
+	@Test public void testSCStateVectorFlatOrthopgonal() {
+		OrthogonalFlatTSC tsc = new OrthogonalFlatTSC();
+		
+		ExecutionFlow flow = sequencer.transform(tsc.sc);
+		
+		assertNotNull(flow.getStateVector());
+		assertEquals(2, flow.getStateVector().getSize());
+		assertEquals(0, flow.getStateVector().getOffset());
+	}
+
+	
+	/**
+	 * The state vector descriptor of the ExecutionFlow must have an offset of 0 and a size that is 
+	 * the maximum orthogonality of the statechart.
+	 */
+	@Test public void testSCStateVectorDeepNonOrthopgonal() {
+		Statechart sc = _createStatechart("test");
+		Region r = _createRegion("sc_r", sc);
+		State s1 = _createState("s1", r);
+		State s2 = _createState("s2", r);
+		Region s2_r = _createRegion("s2_r", s2);
+		State s2_1 = _createState("s2_1", s2_r);
+		State s2_2 = _createState("s2_2", s2_r);
+		Region s2_1_r = _createRegion("s2_1_r", s2_1);
+		State s2_1_1 = _createState("s2_1_1", s2_1_r);
+		State s2_1_2 = _createState("s2_1_2", s2_1_r);
+
+		ExecutionFlow flow = sequencer.transform(sc);
+		
+		assertNotNull(flow.getStateVector());
+		assertEquals(1, flow.getStateVector().getSize());
+		assertEquals(0, flow.getStateVector().getOffset());
+	}
+
+	
+	/**
+	 * The state vector descriptor of the ExecutionFlow must have an offset of 0 and a size that is 
+	 * the maximum orthogonality of the statechart.
+	 */
+	@Test public void testSCStateVectorDeepOrthopgonal() {
+		Statechart sc = _createStatechart("test");
+		
+		{  // first top region 
+			Region r = _createRegion("sc_r1", sc);
+			State s1 = _createState("s1", r);
+			State s2 = _createState("s2", r);
+			{ // first sub region 
+				Region s2_r = _createRegion("s2_r", s2);
+				State s2_1 = _createState("s2_1", s2_r);
+				State s2_2 = _createState("s2_2", s2_r);
+				{ // first sub sub region
+					Region s2_1_r = _createRegion("s2_1_r", s2_1);
+					State s2_1_1 = _createState("s2_1_1", s2_1_r);
+					State s2_1_2 = _createState("s2_1_2", s2_1_r);
+				}
+				{ // second sub sub region
+					Region s2_2_r = _createRegion("s2_1_r2", s2_1);
+					State s2_1_3 = _createState("s2_1_3", s2_2_r);
+					State s2_1_4 = _createState("s2_2_4", s2_2_r);
+				}
+			}
+		}
+		{  // second top region 
+			Region r = _createRegion("sc_r2", sc);
+			State s1 = _createState("r2_s1", r);
+			State s2 = _createState("r2_s2", r);
+		}
+
+
+		ExecutionFlow flow = sequencer.transform(sc);
+		
+		assertNotNull(flow.getStateVector());
+		assertEquals(3, flow.getStateVector().getSize());
+		assertEquals(0, flow.getStateVector().getOffset());
+	}
 	
 }

+ 7 - 0
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/SCTTestUtil.java

@@ -89,6 +89,13 @@ public class SCTTestUtil {
 		return region;
 	}
 	
+	public static Region _createRegion(String name, State state) {
+		Region region = SGraphFactory.eINSTANCE.createRegion();
+		region.setName(name);
+		if (state != null ) state.getSubRegions().add(region);
+		return region;
+	}
+	
 	public static State _createState(String name, Region r) {
 		State state = SGraphFactory.eINSTANCE.createState();
 		state.setName(name);