Browse Source

refactored Execution context to use composite slots

Andreas Mülder 12 years ago
parent
commit
64114b347b
20 changed files with 549 additions and 338 deletions
  1. 29 7
      plugins/org.yakindu.sct.simulation.core.sexec/src/org/yakindu/sct/simulation/core/sexec/container/DefaultExecutionContextInitializer.xtend
  2. 3 3
      plugins/org.yakindu.sct.simulation.core.sexec/src/org/yakindu/sct/simulation/core/sexec/interpreter/DefaultExecutionFlowInterpreter.xtend
  3. 7 6
      plugins/org.yakindu.sct.simulation.core.sexec/src/org/yakindu/sct/simulation/core/sexec/interpreter/StextStatementInterpreter.xtend
  4. 4 9
      plugins/org.yakindu.sct.simulation.core/model/sruntime.ecore
  5. 6 4
      plugins/org.yakindu.sct.simulation.core/model/sruntime.genmodel
  6. 17 52
      plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/sruntime/ExecutionContext.java
  7. 18 7
      plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/sruntime/ExecutionSlot.java
  8. 36 84
      plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/sruntime/SRuntimePackage.java
  9. 282 91
      plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/sruntime/impl/ExecutionContextImpl.java
  10. 40 12
      plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/sruntime/impl/ExecutionSlotImpl.java
  11. 11 39
      plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/sruntime/impl/SRuntimePackageImpl.java
  12. 2 0
      plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/sruntime/util/SRuntimeSwitch.java
  13. 0 4
      plugins/org.yakindu.sct.simulation.ui/src/org/yakindu/sct/simulation/ui/view/ExecutionContextContentProvider.java
  14. 19 1
      plugins/org.yakindu.sct.simulation.ui/src/org/yakindu/sct/simulation/ui/view/ExecutionContextViewerFactory.java
  15. 46 0
      plugins/org.yakindu.sct.simulation.ui/src/org/yakindu/sct/simulation/ui/view/TimeEventViewerFilter.java
  16. 21 16
      test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src/org/yakindu/sct/model/sexec/interpreter/test/STextInterpreterTest.java
  17. 2 1
      test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src/org/yakindu/sct/model/sexec/interpreter/test/util/AbstractExecutionFlowTest.java
  18. 3 1
      test-plugins/org.yakindu.sct.model.stext.test/META-INF/MANIFEST.MF
  19. 2 1
      test-plugins/org.yakindu.sct.model.stext.test/src/org/yakindu/sct/model/stext/test/util/STextInjectorProvider.java
  20. 1 0
      test-plugins/org.yakindu.sct.model.stext.test/src/org/yakindu/sct/model/stext/test/util/STextRuntimeTestModule.java

+ 29 - 7
plugins/org.yakindu.sct.simulation.core.sexec/src/org/yakindu/sct/simulation/core/sexec/container/DefaultExecutionContextInitializer.xtend

@@ -24,6 +24,10 @@ import org.yakindu.sct.simulation.core.sruntime.EventDirection
 import org.yakindu.sct.simulation.core.sruntime.ExecutionContext
 import org.yakindu.sct.simulation.core.sruntime.impl.ExecutionEventImpl
 import org.yakindu.sct.simulation.core.sruntime.impl.ExecutionVariableImpl
+import org.yakindu.sct.simulation.core.sruntime.impl.CompositeSlotImpl
+import org.yakindu.sct.model.stext.stext.InternalScope
+import org.yakindu.sct.model.stext.stext.InterfaceScope
+import org.yakindu.sct.model.sgraph.Scope
 
 /**
  * 
@@ -37,31 +41,49 @@ class DefaultExecutionContextInitializer implements IExecutionContextInitializer
 	@Inject extension ISTextTypeInferrer
 
 	override initialize(ExecutionContext context, ExecutionFlow flow) {
-		flow.scopes.forEach[declarations.forEach[context.slots += it.transform]]
+		flow.scopes.forEach[context.slots += transform]
+		print("")
 	}
-
+	
+	def dispatch create new CompositeSlotImpl() transform(InternalScope scope){
+		it.name = "internal"
+		scope.declarations.forEach[decl | it.slots += decl.transform]
+	}
+	
+	def dispatch create new CompositeSlotImpl() transform(Scope scope){
+		it.name = "time events"
+		scope.declarations.forEach[decl | it.slots += decl.transform]
+	}
+	
+	def dispatch create new CompositeSlotImpl() transform(InterfaceScope scope){
+		if(scope.name != null) it.name = scope.name else it.name = "default" 
+		scope.declarations.forEach[decl | it.slots += decl.transform]
+	}
+	
 	def dispatch create new ExecutionVariableImpl() transform(VariableDefinition variable) {
-		var qualifiedName = variable.fullyQualifiedName
-		qualifiedName.segments
-		it.name = variable.fullyQualifiedName.toString
+		it.name = variable.fullyQualifiedName.lastSegment
+		it.fqName = variable.fullyQualifiedName.toString
 		it.type = variable.inferType.type
 		it.value = it.type.defaultValue
 	}
 
 	def dispatch create new ExecutionEventImpl() transform(EventDefinition event) {
-		it.name = event.fullyQualifiedName.toString
+		it.name = event.fullyQualifiedName.lastSegment
+		it.fqName = event.fullyQualifiedName.toString
 		it.type = event.inferType.type
 		it.value = it.type.defaultValue
 		it.direction = EventDirection.get(event.direction.value)
 	}
 
 	def dispatch create new ExecutionVariableImpl() transform(OperationDefinition op) {
-		it.name = op.fullyQualifiedName.toString
+		it.name = op.fullyQualifiedName.lastSegment
+		it.fqName = op.fullyQualifiedName.toString
 		it.type = new InferredType(op.type)
 		it.value = it.type.defaultValue
 	}
 
 	def dispatch create new ExecutionEventImpl() transform(TimeEvent event) {
+		it.name = event.fullyQualifiedName.lastSegment
 		it.name = event.fullyQualifiedName.toString
 		it.type = new InferredType(integerType)
 		it.value = defaultValue(it.type)

+ 3 - 3
plugins/org.yakindu.sct.simulation.core.sexec/src/org/yakindu/sct/simulation/core/sexec/interpreter/DefaultExecutionFlowInterpreter.xtend

@@ -84,18 +84,18 @@ class DefaultExecutionFlowInterpreter implements IExecutionFlowInterpreter {
 
 	override runCycle() {
 		//Raise all schedules events
-		executionContext.events.filter[scheduled].forEach[raised = true scheduled = false]
+		executionContext.allEvents.filter[scheduled].forEach[raised = true scheduled = false]
 		activeStateIndex = 0
 		executionContext.executedElements.clear
 		//Clear all out events
-		executionContext.events.filter[direction == EventDirection.OUT].forEach[raised = false]
+		executionContext.allEvents.filter[direction == EventDirection.OUT].forEach[raised = false]
 		while (activeStateIndex < activeStateConfiguration.size) {
 			var state = activeStateConfiguration.get(activeStateIndex)
 			state?.reactSequence?.scheduleAndRun
 			activeStateIndex = activeStateIndex + 1
 		}
 		//clear all local and in events
-		executionContext.events.filter[direction == EventDirection.IN || direction == EventDirection.LOCAL].forEach[
+		executionContext.allEvents.filter[direction == EventDirection.IN || direction == EventDirection.LOCAL].forEach[
 			raised = false]
 	}
 

+ 7 - 6
plugins/org.yakindu.sct.simulation.core.sexec/src/org/yakindu/sct/simulation/core/sexec/interpreter/StextStatementInterpreter.xtend

@@ -75,12 +75,12 @@ class StextStatementInterpreter extends AbstractStatementInterpreter {
 		var scopeVariable = context.getVariable(assignment.varRef.variable.getFullyQualifiedName.toString)
 		var result = assignment.expression.execute
 		if (assignment.operator == AssignmentOperator::ASSIGN) {
-			context.getVariable(scopeVariable.getName).value = result
+			scopeVariable.value = result
 		} else {
 			var operator = AbstractStatementInterpreter::assignFunctionMap.get(assignment.operator.getName())
-			context.getVariable(scopeVariable.name).value = evaluate(operator, scopeVariable.getValue, result)
+			scopeVariable.value = evaluate(operator, scopeVariable.getValue, result)
 		}
-		context.getVariable(scopeVariable.name).value
+		scopeVariable.value
 	}
 
 	def dispatch EObject variable(ElementReferenceExpression e) {
@@ -138,7 +138,7 @@ class StextStatementInterpreter extends AbstractStatementInterpreter {
 
 	def dispatch Object execute(EventValueReferenceExpression expression) {
 		for (event : context.raisedEvents) {
-			if (event.getName.equals(expression.value.qname)) {
+			if (event.fqName.equals(expression.value.qname)) {
 				return event.getValue;
 			};
 		}
@@ -157,8 +157,9 @@ class StextStatementInterpreter extends AbstractStatementInterpreter {
 		e.reference.getFullyQualifiedName.toString
 	}
 
-	def dispatch Object execute(ActiveStateReferenceExpression expression) {
-		return context.allActiveStates.contains(expression.value)
+	def dispatch Object execute(ActiveStateReferenceExpression expression) {
+		var state = expression.value
+		return context.allActiveStates.contains(state)
 	}
 
 	def dispatch Object execute(LogicalAndExpression expression) {

+ 4 - 9
plugins/org.yakindu.sct.simulation.core/model/sruntime.ecore

@@ -2,7 +2,7 @@
 <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="sruntime" nsURI="http://www.yakindu.org/sct/sruntime/2.0.0"
     nsPrefix="sruntime">
-  <eClassifiers xsi:type="ecore:EClass" name="ExecutionContext" eSuperTypes="../../org.yakindu.base.types/model/base.ecore#//NamedElement">
+  <eClassifiers xsi:type="ecore:EClass" name="ExecutionContext" eSuperTypes="../../org.yakindu.base.types/model/base.ecore#//NamedElement #//CompositeSlot">
     <eOperations name="getRaisedEvents" upperBound="-1" eType="#//ExecutionEvent"/>
     <eOperations name="getScheduledEvents" upperBound="-1" eType="#//ExecutionEvent"/>
     <eOperations name="getVariable" eType="#//ExecutionVariable">
@@ -12,16 +12,12 @@
       <eParameters name="qualifiedName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
     </eOperations>
     <eOperations name="getAllActiveStates" upperBound="-1" eType="ecore:EClass ../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//RegularState"/>
+    <eOperations name="getAllEvents" upperBound="-1" eType="#//ExecutionEvent"/>
+    <eOperations name="getAllVariables" upperBound="-1" eType="#//ExecutionVariable"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="activeStates" upperBound="-1"
         eType="ecore:EClass ../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//RegularState"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="events" upperBound="-1"
-        eType="#//ExecutionEvent" volatile="true" transient="true" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="variables" upperBound="-1"
-        eType="#//ExecutionVariable" volatile="true" transient="true" derived="true"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="executedElements" upperBound="-1"
         eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="slots" upperBound="-1"
-        eType="#//ExecutionSlot" containment="true"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="suspendedElements" upperBound="-1"
         eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="snapshot" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
@@ -34,8 +30,7 @@
   <eClassifiers xsi:type="ecore:EClass" name="ExecutionSlot" abstract="true" eSuperTypes="../../org.yakindu.base.types/model/base.ecore#//NamedElement">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="#//InferredType"/>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="#//JavaObject"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="qualifiedName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
-        changeable="false" volatile="true" transient="true" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="fqName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EDataType" name="InferredType" instanceClassName="org.yakindu.base.types.ITypeSystem.InferredType"/>
   <eClassifiers xsi:type="ecore:EClass" name="ExecutionVariable" eSuperTypes="#//ExecutionSlot"/>

+ 6 - 4
plugins/org.yakindu.sct.simulation.core/model/sruntime.genmodel

@@ -15,12 +15,12 @@
       <genEnumLiterals ecoreEnumLiteral="sruntime.ecore#//EventDirection/OUT"/>
     </genEnums>
     <genDataTypes ecoreDataType="sruntime.ecore#//InferredType"/>
+    <genDataTypes ecoreDataType="sruntime.ecore#//JavaObject"/>
     <genClasses ecoreClass="sruntime.ecore#//ExecutionContext">
       <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference sruntime.ecore#//ExecutionContext/activeStates"/>
-      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference sruntime.ecore#//ExecutionContext/events"/>
-      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference sruntime.ecore#//ExecutionContext/variables"/>
       <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference sruntime.ecore#//ExecutionContext/executedElements"/>
-      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference sruntime.ecore#//ExecutionContext/slots"/>
+      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference sruntime.ecore#//ExecutionContext/suspendedElements"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute sruntime.ecore#//ExecutionContext/snapshot"/>
       <genOperations ecoreOperation="sruntime.ecore#//ExecutionContext/getRaisedEvents"/>
       <genOperations ecoreOperation="sruntime.ecore#//ExecutionContext/getScheduledEvents"/>
       <genOperations ecoreOperation="sruntime.ecore#//ExecutionContext/getVariable">
@@ -30,6 +30,8 @@
         <genParameters ecoreParameter="sruntime.ecore#//ExecutionContext/getEvent/qualifiedName"/>
       </genOperations>
       <genOperations ecoreOperation="sruntime.ecore#//ExecutionContext/getAllActiveStates"/>
+      <genOperations ecoreOperation="sruntime.ecore#//ExecutionContext/getAllEvents"/>
+      <genOperations ecoreOperation="sruntime.ecore#//ExecutionContext/getAllVariables"/>
     </genClasses>
     <genClasses ecoreClass="sruntime.ecore#//ExecutionEvent">
       <genFeatures createChild="false" ecoreFeature="ecore:EAttribute sruntime.ecore#//ExecutionEvent/raised"/>
@@ -39,7 +41,7 @@
     <genClasses image="false" ecoreClass="sruntime.ecore#//ExecutionSlot">
       <genFeatures createChild="false" ecoreFeature="ecore:EAttribute sruntime.ecore#//ExecutionSlot/type"/>
       <genFeatures createChild="false" ecoreFeature="ecore:EAttribute sruntime.ecore#//ExecutionSlot/value"/>
-      <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute sruntime.ecore#//ExecutionSlot/qualifiedName"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute sruntime.ecore#//ExecutionSlot/fqName"/>
     </genClasses>
     <genClasses ecoreClass="sruntime.ecore#//ExecutionVariable"/>
     <genClasses ecoreClass="sruntime.ecore#//CompositeSlot">

+ 17 - 52
plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/sruntime/ExecutionContext.java

@@ -27,10 +27,7 @@ import org.yakindu.sct.model.sgraph.RegularState;
  * The following features are supported:
  * <ul>
  *   <li>{@link org.yakindu.sct.simulation.core.sruntime.ExecutionContext#getActiveStates <em>Active States</em>}</li>
- *   <li>{@link org.yakindu.sct.simulation.core.sruntime.ExecutionContext#getEvents <em>Events</em>}</li>
- *   <li>{@link org.yakindu.sct.simulation.core.sruntime.ExecutionContext#getVariables <em>Variables</em>}</li>
  *   <li>{@link org.yakindu.sct.simulation.core.sruntime.ExecutionContext#getExecutedElements <em>Executed Elements</em>}</li>
- *   <li>{@link org.yakindu.sct.simulation.core.sruntime.ExecutionContext#getSlots <em>Slots</em>}</li>
  *   <li>{@link org.yakindu.sct.simulation.core.sruntime.ExecutionContext#getSuspendedElements <em>Suspended Elements</em>}</li>
  *   <li>{@link org.yakindu.sct.simulation.core.sruntime.ExecutionContext#isSnapshot <em>Snapshot</em>}</li>
  * </ul>
@@ -40,7 +37,7 @@ import org.yakindu.sct.model.sgraph.RegularState;
  * @model
  * @generated
  */
-public interface ExecutionContext extends NamedElement {
+public interface ExecutionContext extends NamedElement, CompositeSlot {
 	/**
 	 * Returns the value of the '<em><b>Active States</b></em>' reference list.
 	 * The list contents are of type {@link org.yakindu.sct.model.sgraph.RegularState}.
@@ -57,38 +54,6 @@ public interface ExecutionContext extends NamedElement {
 	 */
 	List<RegularState> getActiveStates();
 
-	/**
-	 * Returns the value of the '<em><b>Events</b></em>' reference list.
-	 * The list contents are of type {@link org.yakindu.sct.simulation.core.sruntime.ExecutionEvent}.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Events</em>' reference list isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Events</em>' reference list.
-	 * @see org.yakindu.sct.simulation.core.sruntime.SRuntimePackage#getExecutionContext_Events()
-	 * @model transient="true" volatile="true" derived="true"
-	 * @generated
-	 */
-	List<ExecutionEvent> getEvents();
-
-	/**
-	 * Returns the value of the '<em><b>Variables</b></em>' reference list.
-	 * The list contents are of type {@link org.yakindu.sct.simulation.core.sruntime.ExecutionVariable}.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Variables</em>' reference list isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Variables</em>' reference list.
-	 * @see org.yakindu.sct.simulation.core.sruntime.SRuntimePackage#getExecutionContext_Variables()
-	 * @model transient="true" volatile="true" derived="true"
-	 * @generated
-	 */
-	List<ExecutionVariable> getVariables();
-
 	/**
 	 * Returns the value of the '<em><b>Executed Elements</b></em>' reference list.
 	 * The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
@@ -105,22 +70,6 @@ public interface ExecutionContext extends NamedElement {
 	 */
 	List<EObject> getExecutedElements();
 
-	/**
-	 * Returns the value of the '<em><b>Slots</b></em>' containment reference list.
-	 * The list contents are of type {@link org.yakindu.sct.simulation.core.sruntime.ExecutionSlot}.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Slots</em>' containment reference list isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Slots</em>' containment reference list.
-	 * @see org.yakindu.sct.simulation.core.sruntime.SRuntimePackage#getExecutionContext_Slots()
-	 * @model containment="true"
-	 * @generated
-	 */
-	List<ExecutionSlot> getSlots();
-
 	/**
 	 * Returns the value of the '<em><b>Suspended Elements</b></em>' reference list.
 	 * The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
@@ -203,4 +152,20 @@ public interface ExecutionContext extends NamedElement {
 	 */
 	List<RegularState> getAllActiveStates();
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @model kind="operation"
+	 * @generated
+	 */
+	List<ExecutionEvent> getAllEvents();
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @model kind="operation"
+	 * @generated
+	 */
+	List<ExecutionVariable> getAllVariables();
+
 } // ExecutionContext

+ 18 - 7
plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/sruntime/ExecutionSlot.java

@@ -24,7 +24,7 @@ import org.yakindu.base.types.ITypeSystem.InferredType;
  * <ul>
  *   <li>{@link org.yakindu.sct.simulation.core.sruntime.ExecutionSlot#getType <em>Type</em>}</li>
  *   <li>{@link org.yakindu.sct.simulation.core.sruntime.ExecutionSlot#getValue <em>Value</em>}</li>
- *   <li>{@link org.yakindu.sct.simulation.core.sruntime.ExecutionSlot#getQualifiedName <em>Qualified Name</em>}</li>
+ *   <li>{@link org.yakindu.sct.simulation.core.sruntime.ExecutionSlot#getFqName <em>Fq Name</em>}</li>
  * </ul>
  * </p>
  *
@@ -86,18 +86,29 @@ public interface ExecutionSlot extends NamedElement {
 	void setValue(Object value);
 
 	/**
-	 * Returns the value of the '<em><b>Qualified Name</b></em>' attribute.
+	 * Returns the value of the '<em><b>Fq Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <p>
-	 * If the meaning of the '<em>Qualified Name</em>' attribute isn't clear,
+	 * If the meaning of the '<em>Fq Name</em>' attribute isn't clear,
 	 * there really should be more of a description here...
 	 * </p>
 	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Qualified Name</em>' attribute.
-	 * @see org.yakindu.sct.simulation.core.sruntime.SRuntimePackage#getExecutionSlot_QualifiedName()
-	 * @model transient="true" changeable="false" volatile="true" derived="true"
+	 * @return the value of the '<em>Fq Name</em>' attribute.
+	 * @see #setFqName(String)
+	 * @see org.yakindu.sct.simulation.core.sruntime.SRuntimePackage#getExecutionSlot_FqName()
+	 * @model
 	 * @generated
 	 */
-	String getQualifiedName();
+	String getFqName();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.sct.simulation.core.sruntime.ExecutionSlot#getFqName <em>Fq Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Fq Name</em>' attribute.
+	 * @see #getFqName()
+	 * @generated
+	 */
+	void setFqName(String value);
 
 } // ExecutionSlot

+ 36 - 84
plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/sruntime/SRuntimePackage.java

@@ -87,49 +87,58 @@ public interface SRuntimePackage extends EPackage {
 	int EXECUTION_CONTEXT__NAME = BasePackage.NAMED_ELEMENT__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Active States</b></em>' reference list.
+	 * The feature id for the '<em><b>Type</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int EXECUTION_CONTEXT__ACTIVE_STATES = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 0;
+	int EXECUTION_CONTEXT__TYPE = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 0;
 
 	/**
-	 * The feature id for the '<em><b>Events</b></em>' reference list.
+	 * The feature id for the '<em><b>Value</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int EXECUTION_CONTEXT__EVENTS = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 1;
+	int EXECUTION_CONTEXT__VALUE = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 1;
 
 	/**
-	 * The feature id for the '<em><b>Variables</b></em>' reference list.
+	 * The feature id for the '<em><b>Fq Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int EXECUTION_CONTEXT__VARIABLES = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 2;
+	int EXECUTION_CONTEXT__FQ_NAME = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 2;
 
 	/**
-	 * The feature id for the '<em><b>Executed Elements</b></em>' reference list.
+	 * The feature id for the '<em><b>Slots</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int EXECUTION_CONTEXT__EXECUTED_ELEMENTS = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 3;
+	int EXECUTION_CONTEXT__SLOTS = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 3;
 
 	/**
-	 * The feature id for the '<em><b>Slots</b></em>' containment reference list.
+	 * The feature id for the '<em><b>Active States</b></em>' reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int EXECUTION_CONTEXT__ACTIVE_STATES = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>Executed Elements</b></em>' reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int EXECUTION_CONTEXT__SLOTS = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 4;
+	int EXECUTION_CONTEXT__EXECUTED_ELEMENTS = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 5;
 
 	/**
 	 * The feature id for the '<em><b>Suspended Elements</b></em>' reference list.
@@ -138,7 +147,7 @@ public interface SRuntimePackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int EXECUTION_CONTEXT__SUSPENDED_ELEMENTS = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 5;
+	int EXECUTION_CONTEXT__SUSPENDED_ELEMENTS = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 6;
 
 	/**
 	 * The feature id for the '<em><b>Snapshot</b></em>' attribute.
@@ -147,7 +156,7 @@ public interface SRuntimePackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int EXECUTION_CONTEXT__SNAPSHOT = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 6;
+	int EXECUTION_CONTEXT__SNAPSHOT = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 7;
 
 	/**
 	 * The number of structural features of the '<em>Execution Context</em>' class.
@@ -156,7 +165,7 @@ public interface SRuntimePackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int EXECUTION_CONTEXT_FEATURE_COUNT = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 7;
+	int EXECUTION_CONTEXT_FEATURE_COUNT = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 8;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionSlotImpl <em>Execution Slot</em>}' class.
@@ -196,13 +205,13 @@ public interface SRuntimePackage extends EPackage {
 	int EXECUTION_SLOT__VALUE = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 1;
 
 	/**
-	 * The feature id for the '<em><b>Qualified Name</b></em>' attribute.
+	 * The feature id for the '<em><b>Fq Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int EXECUTION_SLOT__QUALIFIED_NAME = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 2;
+	int EXECUTION_SLOT__FQ_NAME = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 2;
 
 	/**
 	 * The number of structural features of the '<em>Execution Slot</em>' class.
@@ -251,13 +260,13 @@ public interface SRuntimePackage extends EPackage {
 	int EXECUTION_EVENT__VALUE = EXECUTION_SLOT__VALUE;
 
 	/**
-	 * The feature id for the '<em><b>Qualified Name</b></em>' attribute.
+	 * The feature id for the '<em><b>Fq Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int EXECUTION_EVENT__QUALIFIED_NAME = EXECUTION_SLOT__QUALIFIED_NAME;
+	int EXECUTION_EVENT__FQ_NAME = EXECUTION_SLOT__FQ_NAME;
 
 	/**
 	 * The feature id for the '<em><b>Raised</b></em>' attribute.
@@ -333,13 +342,13 @@ public interface SRuntimePackage extends EPackage {
 	int EXECUTION_VARIABLE__VALUE = EXECUTION_SLOT__VALUE;
 
 	/**
-	 * The feature id for the '<em><b>Qualified Name</b></em>' attribute.
+	 * The feature id for the '<em><b>Fq Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int EXECUTION_VARIABLE__QUALIFIED_NAME = EXECUTION_SLOT__QUALIFIED_NAME;
+	int EXECUTION_VARIABLE__FQ_NAME = EXECUTION_SLOT__FQ_NAME;
 
 	/**
 	 * The number of structural features of the '<em>Execution Variable</em>' class.
@@ -388,13 +397,13 @@ public interface SRuntimePackage extends EPackage {
 	int COMPOSITE_SLOT__VALUE = EXECUTION_SLOT__VALUE;
 
 	/**
-	 * The feature id for the '<em><b>Qualified Name</b></em>' attribute.
+	 * The feature id for the '<em><b>Fq Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int COMPOSITE_SLOT__QUALIFIED_NAME = EXECUTION_SLOT__QUALIFIED_NAME;
+	int COMPOSITE_SLOT__FQ_NAME = EXECUTION_SLOT__FQ_NAME;
 
 	/**
 	 * The feature id for the '<em><b>Slots</b></em>' containment reference list.
@@ -467,28 +476,6 @@ public interface SRuntimePackage extends EPackage {
 	 */
 	EReference getExecutionContext_ActiveStates();
 
-	/**
-	 * Returns the meta object for the reference list '{@link org.yakindu.sct.simulation.core.sruntime.ExecutionContext#getEvents <em>Events</em>}'.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @return the meta object for the reference list '<em>Events</em>'.
-	 * @see org.yakindu.sct.simulation.core.sruntime.ExecutionContext#getEvents()
-	 * @see #getExecutionContext()
-	 * @generated
-	 */
-	EReference getExecutionContext_Events();
-
-	/**
-	 * Returns the meta object for the reference list '{@link org.yakindu.sct.simulation.core.sruntime.ExecutionContext#getVariables <em>Variables</em>}'.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @return the meta object for the reference list '<em>Variables</em>'.
-	 * @see org.yakindu.sct.simulation.core.sruntime.ExecutionContext#getVariables()
-	 * @see #getExecutionContext()
-	 * @generated
-	 */
-	EReference getExecutionContext_Variables();
-
 	/**
 	 * Returns the meta object for the reference list '{@link org.yakindu.sct.simulation.core.sruntime.ExecutionContext#getExecutedElements <em>Executed Elements</em>}'.
 	 * <!-- begin-user-doc -->
@@ -500,17 +487,6 @@ public interface SRuntimePackage extends EPackage {
 	 */
 	EReference getExecutionContext_ExecutedElements();
 
-	/**
-	 * Returns the meta object for the containment reference list '{@link org.yakindu.sct.simulation.core.sruntime.ExecutionContext#getSlots <em>Slots</em>}'.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @return the meta object for the containment reference list '<em>Slots</em>'.
-	 * @see org.yakindu.sct.simulation.core.sruntime.ExecutionContext#getSlots()
-	 * @see #getExecutionContext()
-	 * @generated
-	 */
-	EReference getExecutionContext_Slots();
-
 	/**
 	 * Returns the meta object for the reference list '{@link org.yakindu.sct.simulation.core.sruntime.ExecutionContext#getSuspendedElements <em>Suspended Elements</em>}'.
 	 * <!-- begin-user-doc -->
@@ -609,15 +585,15 @@ public interface SRuntimePackage extends EPackage {
 	EAttribute getExecutionSlot_Value();
 
 	/**
-	 * Returns the meta object for the attribute '{@link org.yakindu.sct.simulation.core.sruntime.ExecutionSlot#getQualifiedName <em>Qualified Name</em>}'.
+	 * Returns the meta object for the attribute '{@link org.yakindu.sct.simulation.core.sruntime.ExecutionSlot#getFqName <em>Fq Name</em>}'.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @return the meta object for the attribute '<em>Qualified Name</em>'.
-	 * @see org.yakindu.sct.simulation.core.sruntime.ExecutionSlot#getQualifiedName()
+	 * @return the meta object for the attribute '<em>Fq Name</em>'.
+	 * @see org.yakindu.sct.simulation.core.sruntime.ExecutionSlot#getFqName()
 	 * @see #getExecutionSlot()
 	 * @generated
 	 */
-	EAttribute getExecutionSlot_QualifiedName();
+	EAttribute getExecutionSlot_FqName();
 
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.sct.simulation.core.sruntime.ExecutionVariable <em>Execution Variable</em>}'.
@@ -722,22 +698,6 @@ public interface SRuntimePackage extends EPackage {
 		 */
 		EReference EXECUTION_CONTEXT__ACTIVE_STATES = eINSTANCE.getExecutionContext_ActiveStates();
 
-		/**
-		 * The meta object literal for the '<em><b>Events</b></em>' reference list feature.
-		 * <!-- begin-user-doc -->
-		 * <!-- end-user-doc -->
-		 * @generated
-		 */
-		EReference EXECUTION_CONTEXT__EVENTS = eINSTANCE.getExecutionContext_Events();
-
-		/**
-		 * The meta object literal for the '<em><b>Variables</b></em>' reference list feature.
-		 * <!-- begin-user-doc -->
-		 * <!-- end-user-doc -->
-		 * @generated
-		 */
-		EReference EXECUTION_CONTEXT__VARIABLES = eINSTANCE.getExecutionContext_Variables();
-
 		/**
 		 * The meta object literal for the '<em><b>Executed Elements</b></em>' reference list feature.
 		 * <!-- begin-user-doc -->
@@ -746,14 +706,6 @@ public interface SRuntimePackage extends EPackage {
 		 */
 		EReference EXECUTION_CONTEXT__EXECUTED_ELEMENTS = eINSTANCE.getExecutionContext_ExecutedElements();
 
-		/**
-		 * The meta object literal for the '<em><b>Slots</b></em>' containment reference list feature.
-		 * <!-- begin-user-doc -->
-		 * <!-- end-user-doc -->
-		 * @generated
-		 */
-		EReference EXECUTION_CONTEXT__SLOTS = eINSTANCE.getExecutionContext_Slots();
-
 		/**
 		 * The meta object literal for the '<em><b>Suspended Elements</b></em>' reference list feature.
 		 * <!-- begin-user-doc -->
@@ -831,12 +783,12 @@ public interface SRuntimePackage extends EPackage {
 		EAttribute EXECUTION_SLOT__VALUE = eINSTANCE.getExecutionSlot_Value();
 
 		/**
-		 * The meta object literal for the '<em><b>Qualified Name</b></em>' attribute feature.
+		 * The meta object literal for the '<em><b>Fq Name</b></em>' attribute feature.
 		 * <!-- begin-user-doc -->
 		 * <!-- end-user-doc -->
 		 * @generated
 		 */
-		EAttribute EXECUTION_SLOT__QUALIFIED_NAME = eINSTANCE.getExecutionSlot_QualifiedName();
+		EAttribute EXECUTION_SLOT__FQ_NAME = eINSTANCE.getExecutionSlot_FqName();
 
 		/**
 		 * The meta object literal for the '{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionVariableImpl <em>Execution Variable</em>}' class.

+ 282 - 91
plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/sruntime/impl/ExecutionContextImpl.java

@@ -13,6 +13,7 @@ package org.yakindu.sct.simulation.core.sruntime.impl;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
+
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.common.notify.NotificationChain;
@@ -26,14 +27,16 @@ import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.EObjectResolvingEList;
 import org.eclipse.emf.ecore.util.InternalEList;
 import org.yakindu.base.base.impl.NamedElementImpl;
+import org.yakindu.base.types.ITypeSystem.InferredType;
 import org.yakindu.sct.model.sgraph.RegularState;
 import org.yakindu.sct.model.sgraph.State;
-import org.yakindu.sct.model.sgraph.util.DerivedSubsetEObjectEList;
+import org.yakindu.sct.simulation.core.sruntime.CompositeSlot;
 import org.yakindu.sct.simulation.core.sruntime.ExecutionContext;
 import org.yakindu.sct.simulation.core.sruntime.ExecutionEvent;
 import org.yakindu.sct.simulation.core.sruntime.ExecutionSlot;
 import org.yakindu.sct.simulation.core.sruntime.ExecutionVariable;
 import org.yakindu.sct.simulation.core.sruntime.SRuntimePackage;
+
 import com.google.common.base.Predicate;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
@@ -44,11 +47,12 @@ import com.google.common.collect.Lists;
  * <p>
  * The following features are implemented:
  * <ul>
+ *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionContextImpl#getType <em>Type</em>}</li>
+ *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionContextImpl#getValue <em>Value</em>}</li>
+ *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionContextImpl#getFqName <em>Fq Name</em>}</li>
+ *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionContextImpl#getSlots <em>Slots</em>}</li>
  *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionContextImpl#getActiveStates <em>Active States</em>}</li>
- *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionContextImpl#getEvents <em>Events</em>}</li>
- *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionContextImpl#getVariables <em>Variables</em>}</li>
  *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionContextImpl#getExecutedElements <em>Executed Elements</em>}</li>
- *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionContextImpl#getSlots <em>Slots</em>}</li>
  *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionContextImpl#getSuspendedElements <em>Suspended Elements</em>}</li>
  *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionContextImpl#isSnapshot <em>Snapshot</em>}</li>
  * </ul>
@@ -58,35 +62,90 @@ import com.google.common.collect.Lists;
  */
 public class ExecutionContextImpl extends NamedElementImpl implements ExecutionContext {
 	/**
-	 * The cached value of the '{@link #getActiveStates() <em>Active States</em>}' reference list.
-	 * <!-- begin-user-doc --> <!--
-	 * end-user-doc -->
-	 * @see #getActiveStates()
+	 * The default value of the '{@link #getType() <em>Type</em>}' attribute.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * @see #getType()
 	 * @generated
 	 * @ordered
 	 */
-	protected EList<RegularState> activeStates;
+	protected static final InferredType TYPE_EDEFAULT = null;
 
 	/**
-	 * The cached value of the '{@link #getExecutedElements() <em>Executed Elements</em>}' reference list.
+	 * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * @see #getType()
+	 * @generated
+	 * @ordered
+	 */
+	protected InferredType type = TYPE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * @see #getValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Object VALUE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * @see #getValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected Object value = VALUE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getFqName() <em>Fq Name</em>}' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see #getExecutedElements()
+	 * @see #getFqName()
 	 * @generated
 	 * @ordered
 	 */
-	protected EList<EObject> executedElements;
+	protected static final String FQ_NAME_EDEFAULT = null;
 
 	/**
-	 * The cached value of the '{@link #getSlots() <em>Slots</em>}' containment reference list.
+	 * The cached value of the '{@link #getFqName() <em>Fq Name</em>}' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
+	 * @see #getFqName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String fqName = FQ_NAME_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getSlots() <em>Slots</em>}' containment reference list.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @see #getSlots()
 	 * @generated
 	 * @ordered
 	 */
 	protected EList<ExecutionSlot> slots;
 
+	/**
+	 * The cached value of the '{@link #getActiveStates() <em>Active States</em>}' reference list.
+	 * <!-- begin-user-doc --> <!--
+	 * end-user-doc -->
+	 * @see #getActiveStates()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<RegularState> activeStates;
+
+	/**
+	 * The cached value of the '{@link #getExecutedElements() <em>Executed Elements</em>}' reference list.
+	 * <!-- begin-user-doc --> <!--
+	 * end-user-doc -->
+	 * @see #getExecutedElements()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<EObject> executedElements;
+
 	/**
 	 * The cached value of the '{@link #getSuspendedElements() <em>Suspended Elements</em>}' reference list.
 	 * <!-- begin-user-doc -->
@@ -99,8 +158,7 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 
 	/**
 	 * The default value of the '{@link #isSnapshot() <em>Snapshot</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @see #isSnapshot()
 	 * @generated
 	 * @ordered
@@ -109,8 +167,7 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 
 	/**
 	 * The cached value of the '{@link #isSnapshot() <em>Snapshot</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @see #isSnapshot()
 	 * @generated
 	 * @ordered
@@ -138,31 +195,70 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
 	 */
-	public List<RegularState> getActiveStates() {
-		if (activeStates == null) {
-			activeStates = new EObjectResolvingEList<RegularState>(RegularState.class, this, SRuntimePackage.EXECUTION_CONTEXT__ACTIVE_STATES);
-		}
-		return activeStates;
+	public InferredType getType() {
+		return type;
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
-	 * @generated NOT
+	 * @generated
 	 */
-	public List<ExecutionEvent> getEvents() {
-		return new DerivedSubsetEObjectEList<ExecutionEvent>(ExecutionEvent.class, this,
-				SRuntimePackage.EXECUTION_CONTEXT__EVENTS, SRuntimePackage.EXECUTION_CONTEXT__SLOTS);
+	public void setType(InferredType newType) {
+		InferredType oldType = type;
+		type = newType;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SRuntimePackage.EXECUTION_CONTEXT__TYPE, oldType, type));
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
-	 * @generated NOT
+	 * @generated
 	 */
-	public List<ExecutionVariable> getVariables() {
-		return new DerivedSubsetEObjectEList<ExecutionVariable>(ExecutionVariable.class, this,
-				SRuntimePackage.EXECUTION_CONTEXT__VARIABLES, SRuntimePackage.EXECUTION_CONTEXT__SLOTS);
+	public Object getValue() {
+		return value;
+	}
+
+	/**
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setValue(Object newValue) {
+		Object oldValue = value;
+		value = newValue;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SRuntimePackage.EXECUTION_CONTEXT__VALUE, oldValue, value));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getFqName() {
+		return fqName;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setFqName(String newFqName) {
+		String oldFqName = fqName;
+		fqName = newFqName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SRuntimePackage.EXECUTION_CONTEXT__FQ_NAME, oldFqName, fqName));
+	}
+
+	/**
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * @generated
+	 */
+	public List<RegularState> getActiveStates() {
+		if (activeStates == null) {
+			activeStates = new EObjectResolvingEList<RegularState>(RegularState.class, this, SRuntimePackage.EXECUTION_CONTEXT__ACTIVE_STATES);
+		}
+		return activeStates;
 	}
 
 	/**
@@ -177,8 +273,7 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
 	 */
 	public List<ExecutionSlot> getSlots() {
@@ -189,8 +284,7 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
 	 */
 	public List<EObject> getSuspendedElements() {
@@ -201,8 +295,7 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
 	 */
 	public boolean isSnapshot() {
@@ -210,8 +303,7 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
 	 */
 	public void setSnapshot(boolean newSnapshot) {
@@ -227,7 +319,7 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 	 * @generated NOT
 	 */
 	public List<ExecutionEvent> getRaisedEvents() {
-		Iterable<ExecutionEvent> raisedEvents = Iterables.filter(getEvents(), new Predicate<ExecutionEvent>() {
+		Iterable<ExecutionEvent> raisedEvents = Iterables.filter(getAllEvents(), new Predicate<ExecutionEvent>() {
 			public boolean apply(ExecutionEvent input) {
 				return input.isRaised();
 			}
@@ -243,7 +335,7 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 	 * @generated NOT
 	 */
 	public List<ExecutionEvent> getScheduledEvents() {
-		Iterable<ExecutionEvent> raisedEvents = Iterables.filter(getEvents(), new Predicate<ExecutionEvent>() {
+		Iterable<ExecutionEvent> raisedEvents = Iterables.filter(getAllEvents(), new Predicate<ExecutionEvent>() {
 			public boolean apply(ExecutionEvent input) {
 				return input.isScheduled();
 			}
@@ -258,30 +350,31 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 	 * 
 	 * @generated NOT
 	 */
-	public ExecutionVariable getVariable(final String name) {
-		Assert.isNotNull(name);
-		for (ExecutionVariable var : getVariables()) {
-			if (name.equals(var.getName()))
+	public ExecutionVariable getVariable(final String fqName) {
+		Assert.isNotNull(fqName);
+		for (ExecutionVariable var : getAllVariables()) {
+			if (fqName.equals(var.getFqName()))
 				return var;
 		}
+		System.out.println("No variable found: " + fqName + " " + getAllVariables());
 		return null;
 	}
 
 	/**
-	 *Returns the event by its qualified name
+	 * Returns the event by its qualified name
 	 * 
 	 * @generated NOT
 	 */
-	public ExecutionEvent getEvent(final String name) {
-		Assert.isNotNull(name);
-		
-		for (ExecutionEvent event : getEvents()) {
-			if (name.equals(event.getName()))
+	public ExecutionEvent getEvent(final String fqName) {
+		Assert.isNotNull(fqName);
+		for (ExecutionEvent event : getAllEvents()) {
+			if (fqName.equals(event.getFqName()))
 				return event;
 		}
+		System.out.println("No event found: " + fqName + " " + getAllEvents());
 		return null;
 	}
-	
+
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * 
@@ -296,10 +389,49 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 		return result;
 	}
 
+	/**
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * @generated NOT
+	 */
+	public List<ExecutionEvent> getAllEvents() {
+		List<ExecutionEvent> result = new BasicEList<ExecutionEvent>();
+		addEvents(result, slots);
+		return result;
+	}
+
+	protected void addEvents(List<ExecutionEvent> event, List<ExecutionSlot> slots) {
+		for (ExecutionSlot slot : slots) {
+			if (slot instanceof ExecutionEvent) {
+				event.add((ExecutionEvent) slot);
+			} else if (slot instanceof CompositeSlot) {
+				addEvents(event, ((CompositeSlot) slot).getSlots());
+			}
+		}
+	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated NOT
+	 */
+	public List<ExecutionVariable> getAllVariables() {
+		List<ExecutionVariable> result = new BasicEList<ExecutionVariable>();
+		addVariables(result, slots);
+		return result;
+	}
+
+	protected void addVariables(List<ExecutionVariable> variables, List<ExecutionSlot> slots) {
+		for (ExecutionSlot slot : slots) {
+			if (slot instanceof ExecutionVariable) {
+				variables.add((ExecutionVariable) slot);
+			} else if (slot instanceof CompositeSlot) {
+				addVariables(variables, ((CompositeSlot) slot).getSlots());
+			}
+		}
+	}
+
+	/**
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
 	 */
 	@Override
@@ -331,16 +463,18 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 	@Override
 	public Object eGet(int featureID, boolean resolve, boolean coreType) {
 		switch (featureID) {
+			case SRuntimePackage.EXECUTION_CONTEXT__TYPE:
+				return getType();
+			case SRuntimePackage.EXECUTION_CONTEXT__VALUE:
+				return getValue();
+			case SRuntimePackage.EXECUTION_CONTEXT__FQ_NAME:
+				return getFqName();
+			case SRuntimePackage.EXECUTION_CONTEXT__SLOTS:
+				return getSlots();
 			case SRuntimePackage.EXECUTION_CONTEXT__ACTIVE_STATES:
 				return getActiveStates();
-			case SRuntimePackage.EXECUTION_CONTEXT__EVENTS:
-				return getEvents();
-			case SRuntimePackage.EXECUTION_CONTEXT__VARIABLES:
-				return getVariables();
 			case SRuntimePackage.EXECUTION_CONTEXT__EXECUTED_ELEMENTS:
 				return getExecutedElements();
-			case SRuntimePackage.EXECUTION_CONTEXT__SLOTS:
-				return getSlots();
 			case SRuntimePackage.EXECUTION_CONTEXT__SUSPENDED_ELEMENTS:
 				return getSuspendedElements();
 			case SRuntimePackage.EXECUTION_CONTEXT__SNAPSHOT:
@@ -357,26 +491,27 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 	@Override
 	public void eSet(int featureID, Object newValue) {
 		switch (featureID) {
+			case SRuntimePackage.EXECUTION_CONTEXT__TYPE:
+				setType((InferredType)newValue);
+				return;
+			case SRuntimePackage.EXECUTION_CONTEXT__VALUE:
+				setValue(newValue);
+				return;
+			case SRuntimePackage.EXECUTION_CONTEXT__FQ_NAME:
+				setFqName((String)newValue);
+				return;
+			case SRuntimePackage.EXECUTION_CONTEXT__SLOTS:
+				getSlots().clear();
+				getSlots().addAll((Collection<? extends ExecutionSlot>)newValue);
+				return;
 			case SRuntimePackage.EXECUTION_CONTEXT__ACTIVE_STATES:
 				getActiveStates().clear();
 				getActiveStates().addAll((Collection<? extends RegularState>)newValue);
 				return;
-			case SRuntimePackage.EXECUTION_CONTEXT__EVENTS:
-				getEvents().clear();
-				getEvents().addAll((Collection<? extends ExecutionEvent>)newValue);
-				return;
-			case SRuntimePackage.EXECUTION_CONTEXT__VARIABLES:
-				getVariables().clear();
-				getVariables().addAll((Collection<? extends ExecutionVariable>)newValue);
-				return;
 			case SRuntimePackage.EXECUTION_CONTEXT__EXECUTED_ELEMENTS:
 				getExecutedElements().clear();
 				getExecutedElements().addAll((Collection<? extends EObject>)newValue);
 				return;
-			case SRuntimePackage.EXECUTION_CONTEXT__SLOTS:
-				getSlots().clear();
-				getSlots().addAll((Collection<? extends ExecutionSlot>)newValue);
-				return;
 			case SRuntimePackage.EXECUTION_CONTEXT__SUSPENDED_ELEMENTS:
 				getSuspendedElements().clear();
 				getSuspendedElements().addAll((Collection<? extends EObject>)newValue);
@@ -395,21 +530,24 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 	@Override
 	public void eUnset(int featureID) {
 		switch (featureID) {
-			case SRuntimePackage.EXECUTION_CONTEXT__ACTIVE_STATES:
-				getActiveStates().clear();
+			case SRuntimePackage.EXECUTION_CONTEXT__TYPE:
+				setType(TYPE_EDEFAULT);
 				return;
-			case SRuntimePackage.EXECUTION_CONTEXT__EVENTS:
-				getEvents().clear();
+			case SRuntimePackage.EXECUTION_CONTEXT__VALUE:
+				setValue(VALUE_EDEFAULT);
 				return;
-			case SRuntimePackage.EXECUTION_CONTEXT__VARIABLES:
-				getVariables().clear();
-				return;
-			case SRuntimePackage.EXECUTION_CONTEXT__EXECUTED_ELEMENTS:
-				getExecutedElements().clear();
+			case SRuntimePackage.EXECUTION_CONTEXT__FQ_NAME:
+				setFqName(FQ_NAME_EDEFAULT);
 				return;
 			case SRuntimePackage.EXECUTION_CONTEXT__SLOTS:
 				getSlots().clear();
 				return;
+			case SRuntimePackage.EXECUTION_CONTEXT__ACTIVE_STATES:
+				getActiveStates().clear();
+				return;
+			case SRuntimePackage.EXECUTION_CONTEXT__EXECUTED_ELEMENTS:
+				getExecutedElements().clear();
+				return;
 			case SRuntimePackage.EXECUTION_CONTEXT__SUSPENDED_ELEMENTS:
 				getSuspendedElements().clear();
 				return;
@@ -427,16 +565,18 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 	@Override
 	public boolean eIsSet(int featureID) {
 		switch (featureID) {
+			case SRuntimePackage.EXECUTION_CONTEXT__TYPE:
+				return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
+			case SRuntimePackage.EXECUTION_CONTEXT__VALUE:
+				return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+			case SRuntimePackage.EXECUTION_CONTEXT__FQ_NAME:
+				return FQ_NAME_EDEFAULT == null ? fqName != null : !FQ_NAME_EDEFAULT.equals(fqName);
+			case SRuntimePackage.EXECUTION_CONTEXT__SLOTS:
+				return slots != null && !slots.isEmpty();
 			case SRuntimePackage.EXECUTION_CONTEXT__ACTIVE_STATES:
 				return activeStates != null && !activeStates.isEmpty();
-			case SRuntimePackage.EXECUTION_CONTEXT__EVENTS:
-				return !getEvents().isEmpty();
-			case SRuntimePackage.EXECUTION_CONTEXT__VARIABLES:
-				return !getVariables().isEmpty();
 			case SRuntimePackage.EXECUTION_CONTEXT__EXECUTED_ELEMENTS:
 				return executedElements != null && !executedElements.isEmpty();
-			case SRuntimePackage.EXECUTION_CONTEXT__SLOTS:
-				return slots != null && !slots.isEmpty();
 			case SRuntimePackage.EXECUTION_CONTEXT__SUSPENDED_ELEMENTS:
 				return suspendedElements != null && !suspendedElements.isEmpty();
 			case SRuntimePackage.EXECUTION_CONTEXT__SNAPSHOT:
@@ -446,8 +586,53 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+		if (baseClass == ExecutionSlot.class) {
+			switch (derivedFeatureID) {
+				case SRuntimePackage.EXECUTION_CONTEXT__TYPE: return SRuntimePackage.EXECUTION_SLOT__TYPE;
+				case SRuntimePackage.EXECUTION_CONTEXT__VALUE: return SRuntimePackage.EXECUTION_SLOT__VALUE;
+				case SRuntimePackage.EXECUTION_CONTEXT__FQ_NAME: return SRuntimePackage.EXECUTION_SLOT__FQ_NAME;
+				default: return -1;
+			}
+		}
+		if (baseClass == CompositeSlot.class) {
+			switch (derivedFeatureID) {
+				case SRuntimePackage.EXECUTION_CONTEXT__SLOTS: return SRuntimePackage.COMPOSITE_SLOT__SLOTS;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+		if (baseClass == ExecutionSlot.class) {
+			switch (baseFeatureID) {
+				case SRuntimePackage.EXECUTION_SLOT__TYPE: return SRuntimePackage.EXECUTION_CONTEXT__TYPE;
+				case SRuntimePackage.EXECUTION_SLOT__VALUE: return SRuntimePackage.EXECUTION_CONTEXT__VALUE;
+				case SRuntimePackage.EXECUTION_SLOT__FQ_NAME: return SRuntimePackage.EXECUTION_CONTEXT__FQ_NAME;
+				default: return -1;
+			}
+		}
+		if (baseClass == CompositeSlot.class) {
+			switch (baseFeatureID) {
+				case SRuntimePackage.COMPOSITE_SLOT__SLOTS: return SRuntimePackage.EXECUTION_CONTEXT__SLOTS;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
 	 */
 	@Override
@@ -455,7 +640,13 @@ public class ExecutionContextImpl extends NamedElementImpl implements ExecutionC
 		if (eIsProxy()) return super.toString();
 
 		StringBuffer result = new StringBuffer(super.toString());
-		result.append(" (snapshot: ");
+		result.append(" (type: ");
+		result.append(type);
+		result.append(", value: ");
+		result.append(value);
+		result.append(", fqName: ");
+		result.append(fqName);
+		result.append(", snapshot: ");
 		result.append(snapshot);
 		result.append(')');
 		return result.toString();

+ 40 - 12
plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/sruntime/impl/ExecutionSlotImpl.java

@@ -32,7 +32,7 @@ import org.yakindu.sct.simulation.core.sruntime.SRuntimePackage;
  * <ul>
  *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionSlotImpl#getType <em>Type</em>}</li>
  *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionSlotImpl#getValue <em>Value</em>}</li>
- *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionSlotImpl#getQualifiedName <em>Qualified Name</em>}</li>
+ *   <li>{@link org.yakindu.sct.simulation.core.sruntime.impl.ExecutionSlotImpl#getFqName <em>Fq Name</em>}</li>
  * </ul>
  * </p>
  *
@@ -80,14 +80,24 @@ public abstract class ExecutionSlotImpl extends NamedElementImpl implements Exec
 	protected Object value = VALUE_EDEFAULT;
 
 	/**
-	 * The default value of the '{@link #getQualifiedName() <em>Qualified Name</em>}' attribute.
+	 * The default value of the '{@link #getFqName() <em>Fq Name</em>}' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see #getQualifiedName()
+	 * @see #getFqName()
 	 * @generated
 	 * @ordered
 	 */
-	protected static final String QUALIFIED_NAME_EDEFAULT = null;
+	protected static final String FQ_NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getFqName() <em>Fq Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getFqName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String fqName = FQ_NAME_EDEFAULT;
 
 	/**
 	 * <!-- begin-user-doc -->
@@ -155,10 +165,20 @@ public abstract class ExecutionSlotImpl extends NamedElementImpl implements Exec
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public String getQualifiedName() {
-		// TODO: implement this method to return the 'Qualified Name' attribute
-		// Ensure that you remove @generated or mark it @generated NOT
-		throw new UnsupportedOperationException();
+	public String getFqName() {
+		return fqName;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setFqName(String newFqName) {
+		String oldFqName = fqName;
+		fqName = newFqName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SRuntimePackage.EXECUTION_SLOT__FQ_NAME, oldFqName, fqName));
 	}
 
 	/**
@@ -173,8 +193,8 @@ public abstract class ExecutionSlotImpl extends NamedElementImpl implements Exec
 				return getType();
 			case SRuntimePackage.EXECUTION_SLOT__VALUE:
 				return getValue();
-			case SRuntimePackage.EXECUTION_SLOT__QUALIFIED_NAME:
-				return getQualifiedName();
+			case SRuntimePackage.EXECUTION_SLOT__FQ_NAME:
+				return getFqName();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -193,6 +213,9 @@ public abstract class ExecutionSlotImpl extends NamedElementImpl implements Exec
 			case SRuntimePackage.EXECUTION_SLOT__VALUE:
 				setValue(newValue);
 				return;
+			case SRuntimePackage.EXECUTION_SLOT__FQ_NAME:
+				setFqName((String)newValue);
+				return;
 		}
 		super.eSet(featureID, newValue);
 	}
@@ -211,6 +234,9 @@ public abstract class ExecutionSlotImpl extends NamedElementImpl implements Exec
 			case SRuntimePackage.EXECUTION_SLOT__VALUE:
 				setValue(VALUE_EDEFAULT);
 				return;
+			case SRuntimePackage.EXECUTION_SLOT__FQ_NAME:
+				setFqName(FQ_NAME_EDEFAULT);
+				return;
 		}
 		super.eUnset(featureID);
 	}
@@ -227,8 +253,8 @@ public abstract class ExecutionSlotImpl extends NamedElementImpl implements Exec
 				return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
 			case SRuntimePackage.EXECUTION_SLOT__VALUE:
 				return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
-			case SRuntimePackage.EXECUTION_SLOT__QUALIFIED_NAME:
-				return QUALIFIED_NAME_EDEFAULT == null ? getQualifiedName() != null : !QUALIFIED_NAME_EDEFAULT.equals(getQualifiedName());
+			case SRuntimePackage.EXECUTION_SLOT__FQ_NAME:
+				return FQ_NAME_EDEFAULT == null ? fqName != null : !FQ_NAME_EDEFAULT.equals(fqName);
 		}
 		return super.eIsSet(featureID);
 	}
@@ -247,6 +273,8 @@ public abstract class ExecutionSlotImpl extends NamedElementImpl implements Exec
 		result.append(type);
 		result.append(", value: ");
 		result.append(value);
+		result.append(", fqName: ");
+		result.append(fqName);
 		result.append(')');
 		return result.toString();
 	}

+ 11 - 39
plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/sruntime/impl/SRuntimePackageImpl.java

@@ -175,40 +175,13 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 		return (EReference)executionContextEClass.getEStructuralFeatures().get(0);
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EReference getExecutionContext_Events() {
-		return (EReference)executionContextEClass.getEStructuralFeatures().get(1);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EReference getExecutionContext_Variables() {
-		return (EReference)executionContextEClass.getEStructuralFeatures().get(2);
-	}
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
 	public EReference getExecutionContext_ExecutedElements() {
-		return (EReference)executionContextEClass.getEStructuralFeatures().get(3);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EReference getExecutionContext_Slots() {
-		return (EReference)executionContextEClass.getEStructuralFeatures().get(4);
+		return (EReference)executionContextEClass.getEStructuralFeatures().get(1);
 	}
 
 	/**
@@ -217,7 +190,7 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 	 * @generated
 	 */
 	public EReference getExecutionContext_SuspendedElements() {
-		return (EReference)executionContextEClass.getEStructuralFeatures().get(5);
+		return (EReference)executionContextEClass.getEStructuralFeatures().get(2);
 	}
 
 	/**
@@ -226,7 +199,7 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 	 * @generated
 	 */
 	public EAttribute getExecutionContext_Snapshot() {
-		return (EAttribute)executionContextEClass.getEStructuralFeatures().get(6);
+		return (EAttribute)executionContextEClass.getEStructuralFeatures().get(3);
 	}
 
 	/**
@@ -297,7 +270,7 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EAttribute getExecutionSlot_QualifiedName() {
+	public EAttribute getExecutionSlot_FqName() {
 		return (EAttribute)executionSlotEClass.getEStructuralFeatures().get(2);
 	}
 
@@ -385,10 +358,7 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 		// Create classes and their features
 		executionContextEClass = createEClass(EXECUTION_CONTEXT);
 		createEReference(executionContextEClass, EXECUTION_CONTEXT__ACTIVE_STATES);
-		createEReference(executionContextEClass, EXECUTION_CONTEXT__EVENTS);
-		createEReference(executionContextEClass, EXECUTION_CONTEXT__VARIABLES);
 		createEReference(executionContextEClass, EXECUTION_CONTEXT__EXECUTED_ELEMENTS);
-		createEReference(executionContextEClass, EXECUTION_CONTEXT__SLOTS);
 		createEReference(executionContextEClass, EXECUTION_CONTEXT__SUSPENDED_ELEMENTS);
 		createEAttribute(executionContextEClass, EXECUTION_CONTEXT__SNAPSHOT);
 
@@ -400,7 +370,7 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 		executionSlotEClass = createEClass(EXECUTION_SLOT);
 		createEAttribute(executionSlotEClass, EXECUTION_SLOT__TYPE);
 		createEAttribute(executionSlotEClass, EXECUTION_SLOT__VALUE);
-		createEAttribute(executionSlotEClass, EXECUTION_SLOT__QUALIFIED_NAME);
+		createEAttribute(executionSlotEClass, EXECUTION_SLOT__FQ_NAME);
 
 		executionVariableEClass = createEClass(EXECUTION_VARIABLE);
 
@@ -448,6 +418,7 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 
 		// Add supertypes to classes
 		executionContextEClass.getESuperTypes().add(theBasePackage.getNamedElement());
+		executionContextEClass.getESuperTypes().add(this.getCompositeSlot());
 		executionEventEClass.getESuperTypes().add(this.getExecutionSlot());
 		executionSlotEClass.getESuperTypes().add(theBasePackage.getNamedElement());
 		executionVariableEClass.getESuperTypes().add(this.getExecutionSlot());
@@ -456,10 +427,7 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 		// Initialize classes and features; add operations and parameters
 		initEClass(executionContextEClass, ExecutionContext.class, "ExecutionContext", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getExecutionContext_ActiveStates(), theSGraphPackage.getRegularState(), null, "activeStates", null, 0, -1, ExecutionContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEReference(getExecutionContext_Events(), this.getExecutionEvent(), null, "events", null, 0, -1, ExecutionContext.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
-		initEReference(getExecutionContext_Variables(), this.getExecutionVariable(), null, "variables", null, 0, -1, ExecutionContext.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
 		initEReference(getExecutionContext_ExecutedElements(), ecorePackage.getEObject(), null, "executedElements", null, 0, -1, ExecutionContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEReference(getExecutionContext_Slots(), this.getExecutionSlot(), null, "slots", null, 0, -1, ExecutionContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getExecutionContext_SuspendedElements(), ecorePackage.getEObject(), null, "suspendedElements", null, 0, -1, ExecutionContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEAttribute(getExecutionContext_Snapshot(), ecorePackage.getEBoolean(), "snapshot", null, 0, 1, ExecutionContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
@@ -475,6 +443,10 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 
 		addEOperation(executionContextEClass, theSGraphPackage.getRegularState(), "getAllActiveStates", 0, -1, IS_UNIQUE, IS_ORDERED);
 
+		addEOperation(executionContextEClass, this.getExecutionEvent(), "getAllEvents", 0, -1, IS_UNIQUE, IS_ORDERED);
+
+		addEOperation(executionContextEClass, this.getExecutionVariable(), "getAllVariables", 0, -1, IS_UNIQUE, IS_ORDERED);
+
 		initEClass(executionEventEClass, ExecutionEvent.class, "ExecutionEvent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getExecutionEvent_Raised(), ecorePackage.getEBoolean(), "raised", null, 0, 1, ExecutionEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEAttribute(getExecutionEvent_Scheduled(), ecorePackage.getEBoolean(), "scheduled", null, 0, 1, ExecutionEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -483,7 +455,7 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 		initEClass(executionSlotEClass, ExecutionSlot.class, "ExecutionSlot", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getExecutionSlot_Type(), this.getInferredType(), "type", null, 0, 1, ExecutionSlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEAttribute(getExecutionSlot_Value(), this.getJavaObject(), "value", null, 0, 1, ExecutionSlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEAttribute(getExecutionSlot_QualifiedName(), ecorePackage.getEString(), "qualifiedName", null, 0, 1, ExecutionSlot.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+		initEAttribute(getExecutionSlot_FqName(), ecorePackage.getEString(), "fqName", null, 0, 1, ExecutionSlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(executionVariableEClass, ExecutionVariable.class, "ExecutionVariable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 

+ 2 - 0
plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/sruntime/util/SRuntimeSwitch.java

@@ -79,6 +79,8 @@ public class SRuntimeSwitch<T> extends Switch<T> {
 			case SRuntimePackage.EXECUTION_CONTEXT: {
 				ExecutionContext executionContext = (ExecutionContext)theEObject;
 				T result = caseExecutionContext(executionContext);
+				if (result == null) result = caseCompositeSlot(executionContext);
+				if (result == null) result = caseExecutionSlot(executionContext);
 				if (result == null) result = caseNamedElement(executionContext);
 				if (result == null) result = defaultCase(theEObject);
 				return result;

+ 0 - 4
plugins/org.yakindu.sct.simulation.ui/src/org/yakindu/sct/simulation/ui/view/ExecutionContextContentProvider.java

@@ -87,10 +87,6 @@ public class ExecutionContextContentProvider implements ITreeContentProvider, IP
 		return SimulationActivator.getDefault().getPreferenceStore();
 	}
 
-	private boolean hideTimeEvents() {
-		return getStore().getBoolean(HideTimeEventsAction.HIDE_KEY);
-	}
-
 	public void propertyChange(PropertyChangeEvent event) {
 		if (event.getProperty() == HideTimeEventsAction.HIDE_KEY) {
 			if (viewer != null && !viewer.getControl().isDisposed())

+ 19 - 1
plugins/org.yakindu.sct.simulation.ui/src/org/yakindu/sct/simulation/ui/view/ExecutionContextViewerFactory.java

@@ -1,7 +1,18 @@
+/**
+ * Copyright (c) 2013 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
 package org.yakindu.sct.simulation.ui.view;
 
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.viewers.TreeViewerColumn;
+import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
 import org.yakindu.sct.simulation.ui.view.editing.BooleanEditingSupport;
@@ -11,13 +22,20 @@ import org.yakindu.sct.simulation.ui.view.editing.MultiEditingSupport;
 import org.yakindu.sct.simulation.ui.view.editing.RealEditingSupport;
 import org.yakindu.sct.simulation.ui.view.editing.StringEditingSupport;
 
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
 public class ExecutionContextViewerFactory {
 
+	
 	public static TreeViewer createViewer(Composite parent, boolean readOnly) {
 		TreeViewer viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
 		viewer.getTree().setHeaderVisible(true);
 		viewer.getTree().setLinesVisible(true);
 		viewer.setContentProvider(new ExecutionContextContentProvider());
+		viewer.setFilters(new ViewerFilter[] { new TimeEventViewerFilter() });
 		TreeViewerColumn nameColumn = new TreeViewerColumn(viewer, SWT.DEFAULT);
 		nameColumn.getColumn().setText("Name");
 		nameColumn.getColumn().setMoveable(true);
@@ -32,7 +50,7 @@ public class ExecutionContextViewerFactory {
 			valueColumn.setEditingSupport(new MultiEditingSupport(viewer, new BooleanEditingSupport(viewer),
 					new IntegerEditingSupport(viewer), new RealEditingSupport(viewer),
 					new StringEditingSupport(viewer), new EnumerationEditingSupport(viewer)));
-		
+
 		valueColumn.setLabelProvider(new ExecutionContextLabelProvider(1));
 
 		return viewer;

+ 46 - 0
plugins/org.yakindu.sct.simulation.ui/src/org/yakindu/sct/simulation/ui/view/TimeEventViewerFilter.java

@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2013 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.simulation.ui.view;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.yakindu.sct.simulation.core.sruntime.CompositeSlot;
+import org.yakindu.sct.simulation.ui.SimulationActivator;
+import org.yakindu.sct.simulation.ui.view.actions.HideTimeEventsAction;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public class TimeEventViewerFilter extends ViewerFilter {
+	@Override
+	public boolean select(Viewer viewer, Object parentElement, Object element) {
+		if (hideTimeEvents()) {
+			if (element instanceof CompositeSlot) {
+				if ("time events".equals(((CompositeSlot) element).getName())) {
+					return false;
+				}
+			}
+		}
+		return true;
+	}
+
+	private IPreferenceStore getStore() {
+		return SimulationActivator.getDefault().getPreferenceStore();
+	}
+
+	private boolean hideTimeEvents() {
+		return getStore().getBoolean(HideTimeEventsAction.HIDE_KEY);
+	}
+
+}

+ 21 - 16
test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src/org/yakindu/sct/model/sexec/interpreter/test/STextInterpreterTest.java

@@ -478,32 +478,37 @@ public class STextInterpreterTest extends AbstractSTextTest {
 		// var realVar : real
 		ExecutionVariable intVar = new ExecutionVariableImpl();
 		intVar.setName("intVar");
+		intVar.setFqName("intVar");
 		intVar.setType(new InferredType(typeSystem.getIntegerType()));
 		intVar.setValue(0);
-		context.getVariables().add(intVar);
+		context.getSlots().add(intVar);
 		
 		ExecutionVariable boolVar = new ExecutionVariableImpl();
-		intVar.setName("boolVar");
-		intVar.setType(new InferredType(typeSystem.getBooleanType()));
-		intVar.setValue(false);
-		context.getVariables().add(boolVar);
+		boolVar.setName("boolVar");
+		boolVar.setFqName("boolVar");
+		boolVar.setType(new InferredType(typeSystem.getBooleanType()));
+		boolVar.setValue(false);
+		context.getSlots().add(boolVar);
 		
 		ExecutionVariable realVar = new ExecutionVariableImpl();
-		intVar.setName("realVar");
-		intVar.setType(new InferredType(typeSystem.getRealType()));
-		intVar.setValue(0.0f);
-		context.getVariables().add(realVar);
+		realVar.setName("realVar");
+		realVar.setFqName("realVar");
+		realVar.setType(new InferredType(typeSystem.getRealType()));
+		realVar.setValue(0.0f);
+		context.getSlots().add(realVar);
 		
 		ExecutionVariable stringVar = new ExecutionVariableImpl();
-		intVar.setName("stringVar");
-		intVar.setType(new InferredType(typeSystem.getStringType()));
-		intVar.setValue("");
-		context.getVariables().add(stringVar);
+		stringVar.setName("stringVar");
+		stringVar.setFqName("stringVar");
+		stringVar.setType(new InferredType(typeSystem.getStringType()));
+		stringVar.setValue("");
+		context.getSlots().add(stringVar);
 		
 		ExecutionEvent event = new ExecutionEventImpl();
-		intVar.setName("abc");
-		intVar.setType(new InferredType(typeSystem.getIntegerType()));
-		context.getEvents().add(event);
+		event.setName("abc");
+		event.setFqName("abc");
+		event.setType(new InferredType(typeSystem.getIntegerType()));
+		context.getSlots().add(event);
 	}
 
 	protected Object getBoolValue() {

+ 2 - 1
test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src/org/yakindu/sct/model/sexec/interpreter/test/util/AbstractExecutionFlowTest.java

@@ -111,8 +111,9 @@ public abstract class AbstractExecutionFlowTest {
 	}
 
 	protected void raiseEvent(String eventName, Object value) {
-		context().getEvent(eventName).setRaised(true);
 		context().getEvent(eventName).setValue(value);
+		context().getEvent(eventName).setRaised(true);
+		
 	}
 
 	protected boolean isRaised(String eventName) {

+ 3 - 1
test-plugins/org.yakindu.sct.model.stext.test/META-INF/MANIFEST.MF

@@ -16,7 +16,9 @@ Require-Bundle: org.eclipse.xtext.junit4;bundle-version="2.0.1",
  org.eclipse.ui.workbench;resolution:=optional,
  org.yakindu.sct.model.stext.resource;bundle-version="1.0.0",
  org.eclipse.gmf.runtime.emf.core;bundle-version="1.4.1",
- org.yakindu.sct.test.models;bundle-version="2.1.0"
+ org.yakindu.sct.test.models;bundle-version="2.1.0",
+ org.yakindu.sct.simulation.core.sexec;bundle-version="2.1.2",
+ org.yakindu.sct.simulation.core;bundle-version="2.1.2"
 Export-Package: org.yakindu.sct.model.stext.test,
  org.yakindu.sct.model.stext.test.util,
  org.yakindu.sct.model.stext

+ 2 - 1
test-plugins/org.yakindu.sct.model.stext.test/src/org/yakindu/sct/model/stext/test/util/STextInjectorProvider.java

@@ -11,6 +11,7 @@
 package org.yakindu.sct.model.stext.test.util;
 
 import org.eclipse.xtext.junit4.IInjectorProvider;
+import org.yakindu.sct.simulation.core.sexec.SimulationModule;
 
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -23,7 +24,7 @@ import com.google.inject.Injector;
 public class STextInjectorProvider implements IInjectorProvider {
 
 	public Injector getInjector() {
-		return Guice.createInjector(new STextRuntimeTestModule());
+		return Guice.createInjector(new STextRuntimeTestModule(), new SimulationModule());
 	}
 
 }

+ 1 - 0
test-plugins/org.yakindu.sct.model.stext.test/src/org/yakindu/sct/model/stext/test/util/STextRuntimeTestModule.java

@@ -24,4 +24,5 @@ public class STextRuntimeTestModule extends STextRuntimeModule {
 	public Class<? extends IScopeProvider> bindIScopeProvider() {
 		return STextTestScopeProvider.class;
 	}
+	
 }