Sfoglia il codice sorgente

SCT type system supports variadic functions now. (#1187)

* SCT type system supports variadic functions now.

* simplyfy isVariadic function

* Allow definition of variadic functions, added basic validation & tests

* Added validation tests how to call variadic functions

* Added testmodel for varargs functions and java custom tests

* Added test case to Suite

* Added mockito to classpath

* Removed System.outs / pollutes the build log

* added mockito as maven dependency

* Consider POM Dependencies for target configuration (for mockito)

* Consider POM Dependencies for target configuration (for mockito)

* Added mockito as jar / removed pom dependencies
Andreas Mülder 9 anni fa
parent
commit
75e49f28b0
31 ha cambiato i file con 873 aggiunte e 64 eliminazioni
  1. 22 12
      plugins/org.yakindu.base.expressions/src/org/yakindu/base/expressions/inferrer/ExpressionsTypeInferrer.java
  2. 3 0
      plugins/org.yakindu.base.types.edit/plugin.properties
  3. 28 0
      plugins/org.yakindu.base.types.edit/src/org/yakindu/base/types/provider/OperationItemProvider.java
  4. 24 0
      plugins/org.yakindu.base.types.edit/src/org/yakindu/base/types/provider/ParameterItemProvider.java
  5. 5 0
      plugins/org.yakindu.base.types/model/types.ecore
  6. 24 0
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/Operation.java
  7. 28 0
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/Parameter.java
  8. 58 2
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/TypesPackage.java
  9. 37 0
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/OperationImpl.java
  10. 52 0
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/ParameterImpl.java
  11. 24 0
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/TypesPackageImpl.java
  12. 1 1
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/StatemachineRequiredHeader.xtend
  13. 2 2
      plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/Naming.xtend
  14. 1 1
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/StatemachineInterface.xtend
  15. 1 1
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/SText.xtext
  16. 18 13
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/validation/STextJavaValidator.java
  17. 2 1
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/validation/STextValidationMessages.java
  18. 1 0
      test-plugins/org.yakindu.sct.generator.java.test/.classpath
  19. 2 0
      test-plugins/org.yakindu.sct.generator.java.test/META-INF/MANIFEST.MF
  20. 2 1
      test-plugins/org.yakindu.sct.generator.java.test/build.properties
  21. BIN
      test-plugins/org.yakindu.sct.generator.java.test/lib/mockito-all-2.0.2-beta.jar
  22. 24 0
      test-plugins/org.yakindu.sct.generator.java.test/model/model.sgen
  23. 8 0
      test-plugins/org.yakindu.sct.generator.java.test/model/test.sgen
  24. 3 3
      test-plugins/org.yakindu.sct.generator.java.test/pom.xml
  25. 43 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/variadicfunctions/IVariadicFunctionsStatemachine.java
  26. 230 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/variadicfunctions/VariadicFunctionsStatemachine.java
  27. 2 1
      test-plugins/org.yakindu.sct.generator.java.test/src/org/yakindu/sct/generator/java/test/AllTestsTestCustom.java
  28. 75 0
      test-plugins/org.yakindu.sct.generator.java.test/src/org/yakindu/sct/generator/java/test/VariadicOperationsTestCustom.java
  29. 6 26
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/TreeNamingServiceTest.java
  30. 45 0
      test-plugins/org.yakindu.sct.model.stext.test/src/org/yakindu/sct/model/stext/test/validation/STextJavaValidatorTest.java
  31. 102 0
      test-plugins/org.yakindu.sct.test.models/testmodels/SCTUnit/VariadicFunctions.sct

+ 22 - 12
plugins/org.yakindu.base.expressions/src/org/yakindu/base/expressions/inferrer/ExpressionsTypeInferrer.java

@@ -205,9 +205,8 @@ public class ExpressionsTypeInferrer extends AbstractTypeSystemInferrer implemen
 	public InferenceResult doInfer(FeatureCall e) {
 		if (e.isOperationCall()) {
 			Operation operation = (Operation) e.getFeature();
-			EList<Parameter> parameters = operation.getParameters();
 			EList<Expression> args = e.getArgs();
-			inferParameter(parameters, args, e.getOwner());
+			inferParameter(operation, args, e.getOwner());
 		}
 		InferenceResult result = inferTypeDispatch(e.getFeature());
 		if (result != null && result.getType() instanceof TypeParameter) {
@@ -219,25 +218,36 @@ public class ExpressionsTypeInferrer extends AbstractTypeSystemInferrer implemen
 	public InferenceResult doInfer(ElementReferenceExpression e) {
 		if (e.isOperationCall()) {
 			Operation operation = (Operation) e.getReference();
-			EList<Parameter> parameters = operation.getParameters();
 			EList<Expression> args = e.getArgs();
-			inferParameter(parameters, args, null);
+			inferParameter(operation, args, null);
 		}
 		return inferTypeDispatch(e.getReference());
 	}
 
-	protected void inferParameter(EList<Parameter> parameters, EList<Expression> args, Expression operationOwner) {
-		if (parameters.size() == args.size()) {
+	protected void inferParameter(Operation operation, EList<Expression> args, Expression operationOwner) {
+		EList<Parameter> parameters = operation.getParameters();
+		if (parameters.size() <= args.size()) {
 			for (int i = 0; i < parameters.size(); i++) {
-				InferenceResult result1 = inferTypeDispatch(parameters.get(i));
-				if (operationOwner != null && result1 != null && result1.getType() instanceof TypeParameter) {
-					result1 = inferTypeParameter((TypeParameter) result1.getType(), inferTypeDispatch(operationOwner));
-				}
-				InferenceResult result2 = inferTypeDispatch(args.get(i));
-				assertCompatible(result2, result1, String.format(INCOMPATIBLE_TYPES, result2, result1));
+				assertArgumentIsCompatible(operationOwner, parameters.get(i), args.get(i));
+			}
+		}
+		if(operation.isVariadic() && args.size() - 1 >= operation.getVarArgIndex()){
+			Parameter parameter = operation.getParameters().get(operation.getVarArgIndex());
+			List<Expression> varArgs = args.subList(operation.getVarArgIndex(), args.size() - 1);
+			for (Expression expression : varArgs) {
+				assertArgumentIsCompatible(operationOwner, parameter, expression);
 			}
 		}
 	}
+
+	protected void assertArgumentIsCompatible(Expression operationOwner, Parameter parameter, Expression argument) {
+		InferenceResult result1 = inferTypeDispatch(parameter);
+		if (operationOwner != null && result1 != null && result1.getType() instanceof TypeParameter) {
+			result1 = inferTypeParameter((TypeParameter) result1.getType(), inferTypeDispatch(operationOwner));
+		}
+		InferenceResult result2 = inferTypeDispatch(argument);
+		assertCompatible(result2, result1, String.format(INCOMPATIBLE_TYPES, result2, result1));
+	}
 	
 	protected InferenceResult inferTypeParameter(TypeParameter typeParameter, InferenceResult ownerResult) {
 		if (ownerResult.getBindings().isEmpty() || !(ownerResult.getType() instanceof ParameterizedType)) {

+ 3 - 0
plugins/org.yakindu.base.types.edit/plugin.properties

@@ -208,3 +208,6 @@ _UI_Annotation_targets_feature = Targets
 _UI_AnnotatableElement_annotations_feature = Annotations
 _UI_ArrayTypeSpecifier_type = Array Type Specifier
 _UI_ArrayTypeSpecifier_size_feature = Size
+_UI_Parameter_varArgs_feature = Var Args
+_UI_Operation_isVariadic_feature = Is Variadic
+_UI_Operation_variadic_feature = Variadic

+ 28 - 0
plugins/org.yakindu.base.types.edit/src/org/yakindu/base/types/provider/OperationItemProvider.java

@@ -20,7 +20,9 @@ import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.common.util.URI;
 import org.eclipse.emf.ecore.EStructuralFeature;
 import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
 import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
 import org.eclipse.emf.edit.provider.ViewerNotification;
 import org.yakindu.base.types.Operation;
 import org.yakindu.base.types.Parameter;
@@ -57,10 +59,33 @@ public class OperationItemProvider extends DeclarationItemProvider {
 		if (itemPropertyDescriptors == null) {
 			super.getPropertyDescriptors(object);
 
+			addVariadicPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
 
+	/**
+	 * This adds a property descriptor for the Variadic feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addVariadicPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_Operation_variadic_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_Operation_variadic_feature", "_UI_Operation_type"),
+				 TypesPackage.Literals.OPERATION__VARIADIC,
+				 false,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
 	/**
 	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
 	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
@@ -152,6 +177,9 @@ public class OperationItemProvider extends DeclarationItemProvider {
 		updateChildren(notification);
 
 		switch (notification.getFeatureID(Operation.class)) {
+			case TypesPackage.OPERATION__VARIADIC:
+				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+				return;
 			case TypesPackage.OPERATION__PARAMETERS:
 				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
 				return;

+ 24 - 0
plugins/org.yakindu.base.types.edit/src/org/yakindu/base/types/provider/ParameterItemProvider.java

@@ -71,6 +71,7 @@ public class ParameterItemProvider
 			addTypePropertyDescriptor(object);
 			addNamePropertyDescriptor(object);
 			addAnnotationsPropertyDescriptor(object);
+			addVarArgsPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
@@ -141,6 +142,28 @@ public class ParameterItemProvider
 				 null));
 	}
 
+	/**
+	 * This adds a property descriptor for the Var Args feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addVarArgsPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_Parameter_varArgs_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_Parameter_varArgs_feature", "_UI_Parameter_type"),
+				 TypesPackage.Literals.PARAMETER__VAR_ARGS,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
 	/**
 	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
 	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
@@ -209,6 +232,7 @@ public class ParameterItemProvider
 
 		switch (notification.getFeatureID(Parameter.class)) {
 			case TypesPackage.PARAMETER__NAME:
+			case TypesPackage.PARAMETER__VAR_ARGS:
 				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
 				return;
 			case TypesPackage.PARAMETER__TYPE_SPECIFIER:

+ 5 - 0
plugins/org.yakindu.base.types/model/types.ecore

@@ -19,8 +19,11 @@
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="Declaration" abstract="true" eSuperTypes="#//TypedElement base.ecore#//NamedElement #//PackageMember"/>
   <eClassifiers xsi:type="ecore:EClass" name="Operation" eSuperTypes="#//Declaration">
+    <eOperations name="getVarArgIndex" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="parameters" upperBound="-1"
         eType="#//Parameter" containment="true" eOpposite="#//Parameter/owningOperation"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="variadic" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        changeable="false" volatile="true" transient="true" derived="true"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="Property" eSuperTypes="#//Declaration">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="const" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
@@ -30,6 +33,8 @@
   <eClassifiers xsi:type="ecore:EClass" name="Parameter" eSuperTypes="#//TypedElement base.ecore#//NamedElement #//AnnotatableElement">
     <eStructuralFeatures xsi:type="ecore:EReference" name="owningOperation" eType="#//Operation"
         eOpposite="#//Operation/parameters"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="varArgs" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        defaultValueLiteral="false"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="TypedElement" abstract="true" interface="true">
     <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="#//Type" changeable="false"

+ 24 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/Operation.java

@@ -18,6 +18,7 @@ import org.eclipse.emf.common.util.EList;
  * </p>
  * <ul>
  *   <li>{@link org.yakindu.base.types.Operation#getParameters <em>Parameters</em>}</li>
+ *   <li>{@link org.yakindu.base.types.Operation#isVariadic <em>Variadic</em>}</li>
  * </ul>
  *
  * @see org.yakindu.base.types.TypesPackage#getOperation()
@@ -43,4 +44,27 @@ public interface Operation extends Declaration {
 	 */
 	EList<Parameter> getParameters();
 
+	/**
+	 * Returns the value of the '<em><b>Variadic</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Variadic</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Variadic</em>' attribute.
+	 * @see org.yakindu.base.types.TypesPackage#getOperation_Variadic()
+	 * @model transient="true" changeable="false" volatile="true" derived="true"
+	 * @generated
+	 */
+	boolean isVariadic();
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @model kind="operation"
+	 * @generated
+	 */
+	int getVarArgIndex();
+
 } // Operation

+ 28 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/Parameter.java

@@ -18,6 +18,7 @@ import org.yakindu.base.base.NamedElement;
  * </p>
  * <ul>
  *   <li>{@link org.yakindu.base.types.Parameter#getOwningOperation <em>Owning Operation</em>}</li>
+ *   <li>{@link org.yakindu.base.types.Parameter#isVarArgs <em>Var Args</em>}</li>
  * </ul>
  *
  * @see org.yakindu.base.types.TypesPackage#getParameter()
@@ -53,4 +54,31 @@ public interface Parameter extends TypedElement, NamedElement, AnnotatableElemen
 	 */
 	void setOwningOperation(Operation value);
 
+	/**
+	 * Returns the value of the '<em><b>Var Args</b></em>' attribute.
+	 * The default value is <code>"false"</code>.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Var Args</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Var Args</em>' attribute.
+	 * @see #setVarArgs(boolean)
+	 * @see org.yakindu.base.types.TypesPackage#getParameter_VarArgs()
+	 * @model default="false"
+	 * @generated
+	 */
+	boolean isVarArgs();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.base.types.Parameter#isVarArgs <em>Var Args</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Var Args</em>' attribute.
+	 * @see #isVarArgs()
+	 * @generated
+	 */
+	void setVarArgs(boolean value);
+
 } // Parameter

+ 58 - 2
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/TypesPackage.java

@@ -420,6 +420,15 @@ public interface TypesPackage extends EPackage {
 	 */
 	int OPERATION__PARAMETERS = DECLARATION_FEATURE_COUNT + 0;
 
+	/**
+	 * The feature id for the '<em><b>Variadic</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int OPERATION__VARIADIC = DECLARATION_FEATURE_COUNT + 1;
+
 	/**
 	 * The number of structural features of the '<em>Operation</em>' class.
 	 * <!-- begin-user-doc -->
@@ -427,7 +436,7 @@ public interface TypesPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int OPERATION_FEATURE_COUNT = DECLARATION_FEATURE_COUNT + 1;
+	int OPERATION_FEATURE_COUNT = DECLARATION_FEATURE_COUNT + 2;
 
 	/**
 	 * The feature id for the '<em><b>Type</b></em>' reference.
@@ -555,6 +564,15 @@ public interface TypesPackage extends EPackage {
 	 */
 	int PARAMETER__OWNING_OPERATION = TYPED_ELEMENT_FEATURE_COUNT + 2;
 
+	/**
+	 * The feature id for the '<em><b>Var Args</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int PARAMETER__VAR_ARGS = TYPED_ELEMENT_FEATURE_COUNT + 3;
+
 	/**
 	 * The number of structural features of the '<em>Parameter</em>' class.
 	 * <!-- begin-user-doc -->
@@ -562,7 +580,7 @@ public interface TypesPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int PARAMETER_FEATURE_COUNT = TYPED_ELEMENT_FEATURE_COUNT + 3;
+	int PARAMETER_FEATURE_COUNT = TYPED_ELEMENT_FEATURE_COUNT + 4;
 
 
 	/**
@@ -1654,6 +1672,17 @@ public interface TypesPackage extends EPackage {
 	 */
 	EReference getOperation_Parameters();
 
+	/**
+	 * Returns the meta object for the attribute '{@link org.yakindu.base.types.Operation#isVariadic <em>Variadic</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Variadic</em>'.
+	 * @see org.yakindu.base.types.Operation#isVariadic()
+	 * @see #getOperation()
+	 * @generated
+	 */
+	EAttribute getOperation_Variadic();
+
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.base.types.Property <em>Property</em>}'.
 	 * <!-- begin-user-doc -->
@@ -1718,6 +1747,17 @@ public interface TypesPackage extends EPackage {
 	 */
 	EReference getParameter_OwningOperation();
 
+	/**
+	 * Returns the meta object for the attribute '{@link org.yakindu.base.types.Parameter#isVarArgs <em>Var Args</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Var Args</em>'.
+	 * @see org.yakindu.base.types.Parameter#isVarArgs()
+	 * @see #getParameter()
+	 * @generated
+	 */
+	EAttribute getParameter_VarArgs();
+
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.base.types.TypedElement <em>Typed Element</em>}'.
 	 * <!-- begin-user-doc -->
@@ -2258,6 +2298,14 @@ public interface TypesPackage extends EPackage {
 		 */
 		EReference OPERATION__PARAMETERS = eINSTANCE.getOperation_Parameters();
 
+		/**
+		 * The meta object literal for the '<em><b>Variadic</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EAttribute OPERATION__VARIADIC = eINSTANCE.getOperation_Variadic();
+
 		/**
 		 * The meta object literal for the '{@link org.yakindu.base.types.impl.PropertyImpl <em>Property</em>}' class.
 		 * <!-- begin-user-doc -->
@@ -2310,6 +2358,14 @@ public interface TypesPackage extends EPackage {
 		 */
 		EReference PARAMETER__OWNING_OPERATION = eINSTANCE.getParameter_OwningOperation();
 
+		/**
+		 * The meta object literal for the '<em><b>Var Args</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EAttribute PARAMETER__VAR_ARGS = eINSTANCE.getParameter_VarArgs();
+
 		/**
 		 * The meta object literal for the '{@link org.yakindu.base.types.TypedElement <em>Typed Element</em>}' class.
 		 * <!-- begin-user-doc -->

+ 37 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/OperationImpl.java

@@ -27,6 +27,7 @@ import org.yakindu.base.types.TypesPackage;
  * </p>
  * <ul>
  *   <li>{@link org.yakindu.base.types.impl.OperationImpl#getParameters <em>Parameters</em>}</li>
+ *   <li>{@link org.yakindu.base.types.impl.OperationImpl#isVariadic <em>Variadic</em>}</li>
  * </ul>
  *
  * @generated
@@ -42,6 +43,16 @@ public class OperationImpl extends DeclarationImpl implements Operation {
 	 */
 	protected EList<Parameter> parameters;
 
+	/**
+	 * The default value of the '{@link #isVariadic() <em>Variadic</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isVariadic()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean VARIADIC_EDEFAULT = false;
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -73,6 +84,28 @@ public class OperationImpl extends DeclarationImpl implements Operation {
 		return parameters;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated NOT
+	 */
+	public boolean isVariadic() {
+		return getVarArgIndex() > -1;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated NOT
+	 */
+	public int getVarArgIndex() {
+		for (int i = 0; i < getParameters().size(); i++) {
+			if (getParameters().get(i).isVarArgs())
+				return i;
+		}
+		return -1;
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -112,6 +145,8 @@ public class OperationImpl extends DeclarationImpl implements Operation {
 		switch (featureID) {
 			case TypesPackage.OPERATION__PARAMETERS:
 				return getParameters();
+			case TypesPackage.OPERATION__VARIADIC:
+				return isVariadic();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -158,6 +193,8 @@ public class OperationImpl extends DeclarationImpl implements Operation {
 		switch (featureID) {
 			case TypesPackage.OPERATION__PARAMETERS:
 				return parameters != null && !parameters.isEmpty();
+			case TypesPackage.OPERATION__VARIADIC:
+				return isVariadic() != VARIADIC_EDEFAULT;
 		}
 		return super.eIsSet(featureID);
 	}

+ 52 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/ParameterImpl.java

@@ -39,6 +39,7 @@ import org.yakindu.base.types.TypesPackage;
  *   <li>{@link org.yakindu.base.types.impl.ParameterImpl#getName <em>Name</em>}</li>
  *   <li>{@link org.yakindu.base.types.impl.ParameterImpl#getAnnotations <em>Annotations</em>}</li>
  *   <li>{@link org.yakindu.base.types.impl.ParameterImpl#getOwningOperation <em>Owning Operation</em>}</li>
+ *   <li>{@link org.yakindu.base.types.impl.ParameterImpl#isVarArgs <em>Var Args</em>}</li>
  * </ul>
  *
  * @generated
@@ -84,6 +85,26 @@ public class ParameterImpl extends EObjectImpl implements Parameter {
 	 */
 	protected EList<Annotation> annotations;
 
+	/**
+	 * The default value of the '{@link #isVarArgs() <em>Var Args</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isVarArgs()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean VAR_ARGS_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isVarArgs() <em>Var Args</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isVarArgs()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean varArgs = VAR_ARGS_EDEFAULT;
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -242,6 +263,27 @@ public class ParameterImpl extends EObjectImpl implements Parameter {
 			eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.PARAMETER__OWNING_OPERATION, newOwningOperation, newOwningOperation));
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public boolean isVarArgs() {
+		return varArgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setVarArgs(boolean newVarArgs) {
+		boolean oldVarArgs = varArgs;
+		varArgs = newVarArgs;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.PARAMETER__VAR_ARGS, oldVarArgs, varArgs));
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -307,6 +349,8 @@ public class ParameterImpl extends EObjectImpl implements Parameter {
 				return getAnnotations();
 			case TypesPackage.PARAMETER__OWNING_OPERATION:
 				return getOwningOperation();
+			case TypesPackage.PARAMETER__VAR_ARGS:
+				return isVarArgs();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -333,6 +377,9 @@ public class ParameterImpl extends EObjectImpl implements Parameter {
 			case TypesPackage.PARAMETER__OWNING_OPERATION:
 				setOwningOperation((Operation)newValue);
 				return;
+			case TypesPackage.PARAMETER__VAR_ARGS:
+				setVarArgs((Boolean)newValue);
+				return;
 		}
 		super.eSet(featureID, newValue);
 	}
@@ -357,6 +404,9 @@ public class ParameterImpl extends EObjectImpl implements Parameter {
 			case TypesPackage.PARAMETER__OWNING_OPERATION:
 				setOwningOperation((Operation)null);
 				return;
+			case TypesPackage.PARAMETER__VAR_ARGS:
+				setVarArgs(VAR_ARGS_EDEFAULT);
+				return;
 		}
 		super.eUnset(featureID);
 	}
@@ -379,6 +429,8 @@ public class ParameterImpl extends EObjectImpl implements Parameter {
 				return annotations != null && !annotations.isEmpty();
 			case TypesPackage.PARAMETER__OWNING_OPERATION:
 				return getOwningOperation() != null;
+			case TypesPackage.PARAMETER__VAR_ARGS:
+				return varArgs != VAR_ARGS_EDEFAULT;
 		}
 		return super.eIsSet(featureID);
 	}

+ 24 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/TypesPackageImpl.java

@@ -362,6 +362,15 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 		return (EReference)operationEClass.getEStructuralFeatures().get(0);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EAttribute getOperation_Variadic() {
+		return (EAttribute)operationEClass.getEStructuralFeatures().get(1);
+	}
+
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
@@ -413,6 +422,15 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 		return (EReference)parameterEClass.getEStructuralFeatures().get(0);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EAttribute getParameter_VarArgs() {
+		return (EAttribute)parameterEClass.getEStructuralFeatures().get(1);
+	}
+
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
@@ -801,6 +819,7 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 
 		operationEClass = createEClass(OPERATION);
 		createEReference(operationEClass, OPERATION__PARAMETERS);
+		createEAttribute(operationEClass, OPERATION__VARIADIC);
 
 		propertyEClass = createEClass(PROPERTY);
 		createEAttribute(propertyEClass, PROPERTY__CONST);
@@ -809,6 +828,7 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 
 		parameterEClass = createEClass(PARAMETER);
 		createEReference(parameterEClass, PARAMETER__OWNING_OPERATION);
+		createEAttribute(parameterEClass, PARAMETER__VAR_ARGS);
 
 		typedElementEClass = createEClass(TYPED_ELEMENT);
 		createEReference(typedElementEClass, TYPED_ELEMENT__TYPE);
@@ -942,6 +962,9 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 
 		initEClass(operationEClass, Operation.class, "Operation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getOperation_Parameters(), this.getParameter(), this.getParameter_OwningOperation(), "parameters", null, 0, -1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getOperation_Variadic(), ecorePackage.getEBoolean(), "variadic", null, 0, 1, Operation.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+
+		addEOperation(operationEClass, ecorePackage.getEInt(), "getVarArgIndex", 0, 1, IS_UNIQUE, IS_ORDERED);
 
 		initEClass(propertyEClass, Property.class, "Property", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getProperty_Const(), ecorePackage.getEBoolean(), "const", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -950,6 +973,7 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 
 		initEClass(parameterEClass, Parameter.class, "Parameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getParameter_OwningOperation(), this.getOperation(), this.getOperation_Parameters(), "owningOperation", null, 0, 1, Parameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getParameter_VarArgs(), ecorePackage.getEBoolean(), "varArgs", "false", 0, 1, Parameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(typedElementEClass, TypedElement.class, "TypedElement", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getTypedElement_Type(), this.getType(), null, "type", null, 0, 1, TypedElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);

+ 1 - 1
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/StatemachineRequiredHeader.xtend

@@ -128,7 +128,7 @@ class StatemachineRequiredHeader implements IContentTemplate {
 	def dispatch functionPrototypes(Declaration it) ''''''
 
 	def dispatch functionPrototypes(OperationDefinition it) '''
-		extern «typeSpecifier.targetLanguageName» «asFunction»(const «scHandleDecl»«FOR p : parameters BEFORE ', ' SEPARATOR ', '»const «p.typeSpecifier.targetLanguageName» «p.name.asIdentifier»«ENDFOR»);
+		extern «typeSpecifier.targetLanguageName» «asFunction»(const «scHandleDecl»«FOR p : parameters BEFORE ', ' SEPARATOR ', '»«IF p.varArgs»...«ELSE»const «p.typeSpecifier.targetLanguageName» «p.name.asIdentifier»«ENDIF»«ENDFOR»);
 	'''
 
 }

+ 2 - 2
plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/Naming.xtend

@@ -73,8 +73,8 @@ class Naming extends org.yakindu.sct.generator.c.Naming {
 	}
 
 	def protected signature(OperationDefinition it) '''
-	«typeSpecifier.targetLanguageName» «name.asEscapedIdentifier»(«FOR parameter : parameters SEPARATOR ', '»«parameter.typeSpecifier.
-		targetLanguageName» «parameter.identifier»«ENDFOR»)'''
+	«typeSpecifier.targetLanguageName» «name.asEscapedIdentifier»(«FOR parameter : parameters SEPARATOR ', '»«IF parameter.isVarArgs»...«ELSE»«parameter.typeSpecifier.
+		targetLanguageName» «parameter.identifier»«ENDIF»«ENDFOR»)'''
 
 	def protected OCB_InterfaceSetterDeclaration(StatechartScope scope, boolean fqn) '''
 	void «IF fqn»«scope.flow.module»::«ENDIF»set«scope.interfaceOCBName»(«scope.interfaceOCBName»* operationCallback)'''

+ 1 - 1
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/StatemachineInterface.xtend

@@ -224,7 +224,7 @@ class StatemachineInterface {
 	def protected operationSignature(OperationDefinition it) {
 		'''
 			public «typeSpecifier.targetLanguageName» «name.asEscapedIdentifier»(«FOR parameter : parameters SEPARATOR ', '»«parameter.
-				typeSpecifier.targetLanguageName» «parameter.identifier»«ENDFOR»);
+				typeSpecifier.targetLanguageName»«IF parameter.isVarArgs»...«ENDIF» «parameter.identifier»«ENDFOR»);
 			
 		'''
 	}

+ 1 - 1
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/SText.xtext

@@ -91,7 +91,7 @@ TypeSpecifier returns types::TypeSpecifier:
 	type=[types::Type|FQN] ('<' (typeArguments+=TypeSpecifier (',' typeArguments+=TypeSpecifier)*'>'))?;
 
 Parameter returns types::Parameter:
-	name=XID ':' typeSpecifier=TypeSpecifier;
+	 name=XID (varArgs?='...')? ':' typeSpecifier=TypeSpecifier;
 
 Reaction returns sgraph::Reaction:
 	LocalReaction | TransitionReaction;

+ 18 - 13
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/validation/STextJavaValidator.java

@@ -546,11 +546,7 @@ public class STextJavaValidator extends AbstractSTextJavaValidator implements ST
 	public void checkOperationArguments_FeatureCall(final FeatureCall call) {
 		if (call.getFeature() instanceof Operation) {
 			Operation operation = (Operation) call.getFeature();
-			EList<Parameter> parameters = operation.getParameters();
-			EList<Expression> args = call.getArgs();
-			if (parameters.size() != args.size()) {
-				error("Wrong number of arguments, expected " + parameters + ".", null);
-			}
+			assertOperationArguments(operation, call.getArgs());
 		}
 	}
 
@@ -558,22 +554,31 @@ public class STextJavaValidator extends AbstractSTextJavaValidator implements ST
 	public void checkOperationArguments_TypedElementReferenceExpression(final ElementReferenceExpression call) {
 		if (call.getReference() instanceof Operation) {
 			Operation operation = (Operation) call.getReference();
-			EList<Parameter> parameters = operation.getParameters();
-			EList<Expression> args = call.getArgs();
-			if (parameters.size() != args.size()) {
-				error("Wrong number of arguments, expected " + parameters + ".", null);
-			}
+			assertOperationArguments(operation, call.getArgs());
+		}
+	}
+
+	protected void assertOperationArguments(Operation operation, List<Expression> args) {
+		EList<Parameter> parameters = operation.getParameters();
+		if ((operation.isVariadic() && operation.getVarArgIndex() > args.size())
+				|| !operation.isVariadic() && parameters.size() != args.size()) {
+			error("Wrong number of arguments, expected " + parameters + ".", null);
 		}
 	}
 
 	@Check(CheckType.FAST)
-	public void checkAssignmentExpression(final AssignmentExpression exp) {
+	public void checkVarArgParameterIsLast(Operation operation) {
+		if (operation.isVariadic() && operation.getVarArgIndex() != operation.getParameters().size() - 1) {
+			error(VAR_ARGS_LAST_MSG, operation.getParameters().get(operation.getVarArgIndex()),
+					null, VAR_ARGS_LAST_CODE);
+		}
+	}
 
+	@Check(CheckType.FAST)
+	public void checkAssignmentExpression(final AssignmentExpression exp) {
 		final String name = getVariableName(exp);
-
 		List<AssignmentExpression> contents = EcoreUtil2.eAllOfType(exp, AssignmentExpression.class);
 		contents.remove(exp);
-
 		Iterable<AssignmentExpression> filter = Iterables.filter(contents, new Predicate<AssignmentExpression>() {
 			public boolean apply(final AssignmentExpression ex) {
 				String variableName = getVariableName(ex);

+ 2 - 1
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/validation/STextValidationMessages.java

@@ -54,8 +54,9 @@ public interface STextValidationMessages {
 	public static final String INTERNAL_DECLARATION_UNUSED = "Internal declaration is not used in statechart.";
 	public static final String ERROR_WRONG_ANNOTATION_TARGET_CODE = "WrongAnnotationTarget";
 	public static final String ERROR_WRONG_ANNOTATION_TARGET_MSG = "Annotation '%s' can not be applied on %s ";
-	
 	public static final String VALUE_OF_REQUIRES_EVENT = "valueof() expression requires event as argument.";
+	public static final String VAR_ARGS_LAST_CODE = "VarArgsMustBeLast";
+	public static final String VAR_ARGS_LAST_MSG = "The variable argument type must be the last argument.";
 
 
 }

+ 1 - 0
test-plugins/org.yakindu.sct.generator.java.test/.classpath

@@ -5,5 +5,6 @@
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="src-gen"/>
 	<classpathentry kind="src" path="test-gen"/>
+	<classpathentry kind="lib" path="lib/mockito-all-2.0.2-beta.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

+ 2 - 0
test-plugins/org.yakindu.sct.generator.java.test/META-INF/MANIFEST.MF

@@ -18,3 +18,5 @@ Require-Bundle: org.yakindu.sct.test.models,
  org.yakindu.sct.domain.generic.resource
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-Vendor: statecharts.org
+Bundle-ClassPath: lib/mockito-all-2.0.2-beta.jar,
+ .

+ 2 - 1
test-plugins/org.yakindu.sct.generator.java.test/build.properties

@@ -2,4 +2,5 @@ source.. = src/,\
            src-gen/,\
            test-gen/
 bin.includes = META-INF/,\
-               .
+               .,\
+               lib/mockito-all-2.0.2-beta.jar

BIN
test-plugins/org.yakindu.sct.generator.java.test/lib/mockito-all-2.0.2-beta.jar


+ 24 - 0
test-plugins/org.yakindu.sct.generator.java.test/model/model.sgen

@@ -1541,6 +1541,30 @@ GeneratorModel for yakindu::java {
 			inlineEntries = false
 		}
 	}
+	
+		statechart VariadicFunctions {
+		feature Outlet {
+			targetProject = "org.yakindu.sct.generator.java.test"
+			targetFolder = "src-gen"
+		}
+
+		feature GeneralFeatures {
+			TimerService = true
+			RuntimeService = true
+		}
+
+		feature FunctionInlining {
+			inlineReactions = false
+			inlineEntryActions = false
+			inlineExitActions = false
+			inlineEnterSequences = false
+			inlineExitSequences = false
+			inlineChoices = false
+			inlineEnterRegion = false
+			inlineExitRegion = false
+			inlineEntries = false
+		}
+	}
 
 	statechart WrapperTest {
 

+ 8 - 0
test-plugins/org.yakindu.sct.generator.java.test/model/test.sgen

@@ -494,6 +494,14 @@ GeneratorModel for sctunit::java {
 		}			
 	}
 	
+	test VariadicFunctions{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.java.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
 	test StatemachineKeywords {
 
 		feature Outlet {

+ 3 - 3
test-plugins/org.yakindu.sct.generator.java.test/pom.xml

@@ -19,19 +19,19 @@
 				<artifactId>tycho-surefire-plugin</artifactId>
 				<version>${tycho-version}</version>
 				<configuration>
-					 						 		
+
 					<includes>
 						<include>**/AllTestsTest.class</include>
 						<include>**/AllTestsTestCustom.class</include>
 					</includes>
-					 	 		
+
 					<useUIHarness>false</useUIHarness>
 					<useUIThread>false</useUIThread>
 					<testFailureIgnore>${testFailureIgnore}</testFailureIgnore>
 					<argLine>${test.vmargs}</argLine>
 				</configuration>
 			</plugin>
-			
+
 		</plugins>
 	</build>
 </project>

+ 43 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/variadicfunctions/IVariadicFunctionsStatemachine.java

@@ -0,0 +1,43 @@
+package org.yakindu.scr.variadicfunctions;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IVariadicFunctionsStatemachine extends IStatemachine {
+
+	public interface SCInterface {
+	
+		public void setSCInterfaceOperationCallback(SCInterfaceOperationCallback operationCallback);
+	
+	}
+	
+	public interface SCInterfaceOperationCallback {
+	
+		public void myVarOperation(String... name);
+		
+	}
+	
+	public SCInterface getSCInterface();
+	
+	public interface SCIIF2 {
+	
+		public void setSCIIF2OperationCallback(SCIIF2OperationCallback operationCallback);
+	
+	}
+	
+	public interface SCIIF2OperationCallback {
+	
+		public void myVarOperation2(long argCount, long... args);
+		
+	}
+	
+	public SCIIF2 getSCIIF2();
+	
+	public interface InternalOperationCallback {
+	
+		public long myInternalVarOperation(double... test);
+		
+	}
+	
+	public void setInternalOperationCallback(InternalOperationCallback operationCallback);
+	
+}

+ 230 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/variadicfunctions/VariadicFunctionsStatemachine.java

@@ -0,0 +1,230 @@
+package org.yakindu.scr.variadicfunctions;
+
+public class VariadicFunctionsStatemachine implements IVariadicFunctionsStatemachine {
+
+	protected class SCInterfaceImpl implements SCInterface {
+	
+		private SCInterfaceOperationCallback operationCallback;
+		
+		public void setSCInterfaceOperationCallback(
+				SCInterfaceOperationCallback operationCallback) {
+			this.operationCallback = operationCallback;
+		}
+	}
+	
+	protected SCInterfaceImpl sCInterface;
+	
+	protected class SCIIF2Impl implements SCIIF2 {
+	
+		private SCIIF2OperationCallback operationCallback;
+		
+		public void setSCIIF2OperationCallback(
+				SCIIF2OperationCallback operationCallback) {
+			this.operationCallback = operationCallback;
+		}
+	}
+	
+	protected SCIIF2Impl sCIIF2;
+	
+	private boolean initialized = false;
+	
+	public enum State {
+		main_region_StateA,
+		main_region_StateB,
+		$NullState$
+	};
+	
+	private final State[] stateVector = new State[1];
+	
+	private int nextStateIndex;
+	
+	private InternalOperationCallback operationCallback;
+	public VariadicFunctionsStatemachine() {
+		sCInterface = new SCInterfaceImpl();
+		sCIIF2 = new SCIIF2Impl();
+	}
+	
+	public void init() {
+		this.initialized = true;
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+		clearEvents();
+		clearOutEvents();
+	}
+	
+	public void enter() {
+		if (!initialized) {
+			throw new IllegalStateException(
+					"The state machine needs to be initialized first by calling the init() function.");
+		}
+		enterSequence_main_region_default();
+	}
+	
+	public void exit() {
+		exitSequence_main_region();
+	}
+	
+	/**
+	 * @see IStatemachine#isActive()
+	 */
+	public boolean isActive() {
+		return stateVector[0] != State.$NullState$;
+	}
+	
+	/** 
+	* Always returns 'false' since this state machine can never become final.
+	*
+	* @see IStatemachine#isFinal()
+	*/
+	public boolean isFinal() {
+		return false;
+	}
+	/**
+	* This method resets the incoming events (time events included).
+	*/
+	protected void clearEvents() {
+	}
+	
+	/**
+	* This method resets the outgoing events.
+	*/
+	protected void clearOutEvents() {
+	}
+	
+	/**
+	* Returns true if the given state is currently active otherwise false.
+	*/
+	public boolean isStateActive(State state) {
+	
+		switch (state) {
+		case main_region_StateA:
+			return stateVector[0] == State.main_region_StateA;
+		case main_region_StateB:
+			return stateVector[0] == State.main_region_StateB;
+		default:
+			return false;
+		}
+	}
+	
+	public SCInterface getSCInterface() {
+		return sCInterface;
+	}
+	
+	public SCIIF2 getSCIIF2() {
+		return sCIIF2;
+	}
+	
+	public void setInternalOperationCallback(
+			InternalOperationCallback operationCallback) {
+		this.operationCallback = operationCallback;
+	}
+	
+	private boolean check_main_region_StateA_tr0_tr0() {
+		return true;
+	}
+	
+	private void effect_main_region_StateA_tr0() {
+		exitSequence_main_region_StateA();
+		operationCallback.myInternalVarOperation(0.0, 0.2);
+		
+		enterSequence_main_region_StateB_default();
+	}
+	
+	/* Entry action for state 'StateA'. */
+	private void entryAction_main_region_StateA() {
+		sCInterface.operationCallback.myVarOperation();
+		
+		sCInterface.operationCallback.myVarOperation("one");
+		
+		sCInterface.operationCallback.myVarOperation("one", "two", "three");
+	}
+	
+	/* Entry action for state 'StateB'. */
+	private void entryAction_main_region_StateB() {
+		sCIIF2.operationCallback.myVarOperation2(1);
+		
+		sCIIF2.operationCallback.myVarOperation2(1, 2);
+		
+		sCIIF2.operationCallback.myVarOperation2(1, 2, 3, 4);
+	}
+	
+	/* 'default' enter sequence for state StateA */
+	private void enterSequence_main_region_StateA_default() {
+		entryAction_main_region_StateA();
+		nextStateIndex = 0;
+		stateVector[0] = State.main_region_StateA;
+	}
+	
+	/* 'default' enter sequence for state StateB */
+	private void enterSequence_main_region_StateB_default() {
+		entryAction_main_region_StateB();
+		nextStateIndex = 0;
+		stateVector[0] = State.main_region_StateB;
+	}
+	
+	/* 'default' enter sequence for region main region */
+	private void enterSequence_main_region_default() {
+		react_main_region__entry_Default();
+	}
+	
+	/* Default exit sequence for state StateA */
+	private void exitSequence_main_region_StateA() {
+		nextStateIndex = 0;
+		stateVector[0] = State.$NullState$;
+	}
+	
+	/* Default exit sequence for state StateB */
+	private void exitSequence_main_region_StateB() {
+		nextStateIndex = 0;
+		stateVector[0] = State.$NullState$;
+	}
+	
+	/* Default exit sequence for region main region */
+	private void exitSequence_main_region() {
+		switch (stateVector[0]) {
+		case main_region_StateA:
+			exitSequence_main_region_StateA();
+			break;
+		case main_region_StateB:
+			exitSequence_main_region_StateB();
+			break;
+		default:
+			break;
+		}
+	}
+	
+	/* The reactions of state StateA. */
+	private void react_main_region_StateA() {
+		effect_main_region_StateA_tr0();
+	}
+	
+	/* The reactions of state StateB. */
+	private void react_main_region_StateB() {
+	}
+	
+	/* Default react sequence for initial entry  */
+	private void react_main_region__entry_Default() {
+		enterSequence_main_region_StateA_default();
+	}
+	
+	public void runCycle() {
+		if (!initialized)
+			throw new IllegalStateException(
+					"The state machine needs to be initialized first by calling the init() function.");
+		clearOutEvents();
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+			switch (stateVector[nextStateIndex]) {
+			case main_region_StateA:
+				react_main_region_StateA();
+				break;
+			case main_region_StateB:
+				react_main_region_StateB();
+				break;
+			default:
+				// $NullState$
+			}
+		}
+		clearEvents();
+	}
+}

+ 2 - 1
test-plugins/org.yakindu.sct.generator.java.test/src/org/yakindu/sct/generator/java/test/AllTestsTestCustom.java

@@ -16,6 +16,7 @@ import org.junit.runners.Suite.SuiteClasses;
 import org.yakindu.sct.generator.java.JavaSCTGeneratorTest;
 
 @RunWith(Suite.class)
-@SuiteClasses({ OperationsTestCustom.class, OperationsWithoutBracesCustom.class, JavaSCTGeneratorTest.class, WrapperTest.class })
+@SuiteClasses({ OperationsTestCustom.class, OperationsWithoutBracesCustom.class, JavaSCTGeneratorTest.class,
+		WrapperTest.class, VariadicOperationsTestCustom.class })
 public class AllTestsTestCustom {
 }

+ 75 - 0
test-plugins/org.yakindu.sct.generator.java.test/src/org/yakindu/sct/generator/java/test/VariadicOperationsTestCustom.java

@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) 2017 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.generator.java.test;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import java.util.Arrays;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.ArgumentCaptor;
+import org.yakindu.scr.variadicfunctions.IVariadicFunctionsStatemachine.InternalOperationCallback;
+import org.yakindu.scr.variadicfunctions.IVariadicFunctionsStatemachine.SCIIF2OperationCallback;
+import org.yakindu.scr.variadicfunctions.IVariadicFunctionsStatemachine.SCInterfaceOperationCallback;
+import org.yakindu.scr.variadicfunctions.VariadicFunctionsStatemachine;
+
+/**
+ * Unit TestCase for Variadic Functions
+ */
+public class VariadicOperationsTestCustom {
+
+	private VariadicFunctionsStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new VariadicFunctionsStatemachine();
+		statemachine.init();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void test() {
+		InternalOperationCallback internalMock = mock(InternalOperationCallback.class);
+		ArgumentCaptor<Double> internalCapture = ArgumentCaptor.forClass(Double.class);
+		SCInterfaceOperationCallback interfaceMock = mock(SCInterfaceOperationCallback.class);
+		ArgumentCaptor<String> interfaceCapture = ArgumentCaptor.forClass(String.class);
+		SCIIF2OperationCallback interface2Mock = mock(SCIIF2OperationCallback.class);
+		ArgumentCaptor<Long> interface2Capture = ArgumentCaptor.forClass(Long.class);
+
+		statemachine.setInternalOperationCallback(internalMock);
+		statemachine.getSCInterface().setSCInterfaceOperationCallback(interfaceMock);
+		statemachine.getSCIIF2().setSCIIF2OperationCallback(interface2Mock);
+		statemachine.enter();
+
+		verify(interfaceMock, times(3)).myVarOperation(interfaceCapture.capture());
+		assertThat(interfaceCapture.getAllValues(), is(Arrays.asList("one", "one", "two", "three")));
+		statemachine.runCycle();
+
+		verify(internalMock, times(1)).myInternalVarOperation(internalCapture.capture());
+		assertThat(internalCapture.getAllValues(), is(Arrays.asList(0.0, 0.2)));
+		statemachine.runCycle();
+		verify(interface2Mock, times(3)).myVarOperation2(ArgumentCaptor.forClass(Long.class).capture(),
+				interface2Capture.capture());
+		assertThat(interface2Capture.getAllValues(), is(Arrays.asList(2L, 2L, 3L, 4L)));
+	}
+
+}

+ 6 - 26
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/TreeNamingServiceTest.java

@@ -13,27 +13,23 @@ package org.yakindu.sct.model.sexec.transformation.test;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
+import java.text.Collator;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.yakindu.sct.model.sexec.ExecutionFlow;
 import org.yakindu.sct.model.sexec.ExecutionState;
-import org.yakindu.sct.model.sexec.Step;
-import org.yakindu.sct.model.sexec.extensions.SExecExtensions;
-import org.yakindu.sct.model.sexec.naming.INamingService;
 import org.yakindu.sct.model.sexec.naming.TreeNamingService;
 import org.yakindu.sct.model.sexec.transformation.FlowOptimizer;
-import org.yakindu.sct.model.sgraph.State;
 import org.yakindu.sct.model.sgraph.Statechart;
 import org.yakindu.sct.test.models.SCTUnitTestModels;
 
 import com.google.inject.Inject;
 
-import java.text.Collator;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
 public class TreeNamingServiceTest extends ModelSequencerTest {
 	@Inject
 	protected SCTUnitTestModels testModels;
@@ -94,25 +90,12 @@ public class TreeNamingServiceTest extends ModelSequencerTest {
 			executionflowNamingService.setSeparator('_');
 
 			// Initialize naming services for statechart and ExecutionFlow
-			long t0 = System.currentTimeMillis();
 			executionflowNamingService.initializeNamingService(flow);
-			executionflowNamingService.test_printTreeContents();
-			System.out.print("Time needed for initialization [ms]: ");
-			System.out.println(System.currentTimeMillis() - t0);
-			System.out.println("Generated names:");
 			for (ExecutionState state : flow.getStates()) {
 				String name = executionflowNamingService.getShortName(state);
-				if (names.contains(name)) {
-					System.out.println("Conflicting name: " + name);
-					for (String n : names) {
-						System.out.println(n);
-					}
-				}
 				assertEquals(names.contains(name), false);
 				names.add(name);
-				System.out.println(name);
 			}
-			System.out.println();
 		}
 	}
 
@@ -278,9 +261,6 @@ public class TreeNamingServiceTest extends ModelSequencerTest {
 				names.add(name);
 			}
 		}
-
-		System.out.print("Average time for initialization [ms]: ");
-		System.out.println((float) cumulated_time / (float) num_statecharts);
 	}
 
 	private void stringListsEqual(List<String> onelist, List<String> otherlist) {

+ 45 - 0
test-plugins/org.yakindu.sct.model.stext.test/src/org/yakindu/sct/model/stext/test/validation/STextJavaValidatorTest.java

@@ -172,6 +172,51 @@ public class STextJavaValidatorTest extends AbstractSTextValidationTest implemen
 		AssertableDiagnostics validationResult = tester.validate(model);
 		validationResult.assertOK();
 	}
+	/**
+	 * @see STextJavaValidator#checkVarArgParameterIsLast(Operation)
+	 */
+	@Test
+	public void checkVarArgParameterIsLast(){
+		String scope = "internal: operation myOperation(param1... : integer)"
+					+ "operation myOperation2(param0 : string, param1 ... : integer)";
+		EObject model = super.parseExpression(scope, InternalScope.class.getSimpleName());
+		AssertableDiagnostics validationResult = tester.validate(model);
+		validationResult.assertOK();
+		
+		model = super.parseExpression("myOperation()", Expression.class.getSimpleName(), scope);
+		validationResult = tester.validate(model);
+		validationResult.assertOK();
+		model = super.parseExpression("myOperation(5)", Expression.class.getSimpleName(), scope);
+		validationResult = tester.validate(model);
+		validationResult.assertOK();
+		model = super.parseExpression("myOperation(5,5,5)", Expression.class.getSimpleName(), scope);
+		validationResult = tester.validate(model);
+		validationResult.assertOK();
+		model = super.parseExpression("myOperation2('')", Expression.class.getSimpleName(), scope);
+		validationResult = tester.validate(model);
+		validationResult.assertOK();
+		model = super.parseExpression("myOperation2('',5)", Expression.class.getSimpleName(), scope);
+		validationResult = tester.validate(model);
+		validationResult.assertOK();
+		model = super.parseExpression("myOperation2('',5,5,5)", Expression.class.getSimpleName(), scope);
+		validationResult = tester.validate(model);
+		validationResult.assertOK();
+		
+		model = super.parseExpression("myOperation2('','')", Expression.class.getSimpleName(), scope);
+		validationResult = tester.validate(model);
+		validationResult.assertErrorContains("Incompatible types string and integer.");
+		
+		scope = "internal: operation myOperation(param1... : integer, param2...: integer)";
+		model = super.parseExpression(scope, InternalScope.class.getSimpleName());
+		validationResult = tester.validate(model);
+		validationResult.assertError(STextJavaValidator.VAR_ARGS_LAST_CODE);
+		
+		scope = "internal: operation myOperation2(param1 ... : integer, param0 : string)";
+		model = super.parseExpression(scope, InternalScope.class.getSimpleName());
+		validationResult = tester.validate(model);
+		validationResult.assertError(STextJavaValidator.VAR_ARGS_LAST_CODE);
+
+	}
 
 	/**
 	 * @see STextJavaValidator#checkGuardHasBooleanExpression(org.yakindu.sct.model.stext.stext.ReactionTrigger)

+ 102 - 0
test-plugins/org.yakindu.sct.test.models/testmodels/SCTUnit/VariadicFunctions.sct

@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:sgraph="http://www.yakindu.org/sct/sgraph/2.0.0">
+  <sgraph:Statechart xmi:id="_y5LOcOlFEeap2s9VhFHffQ" specification="interface:&#xA;// Define events and &#xA;// and variables here&#xA;operation myVarOperation(name... : string) : void&#xA;&#xA;interface IF2:&#xA;operation myVarOperation2(argCount : integer, args... : integer ) : void&#xA;&#xA;internal:&#xA;operation myInternalVarOperation(test...: real) : integer" name="VariadicFunctions">
+    <regions xmi:id="_y594oOlFEeap2s9VhFHffQ" name="main region">
+      <vertices xsi:type="sgraph:Entry" xmi:id="_y6p1IOlFEeap2s9VhFHffQ">
+        <outgoingTransitions xmi:id="_y7EE0OlFEeap2s9VhFHffQ" target="_y6utoOlFEeap2s9VhFHffQ"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_y6utoOlFEeap2s9VhFHffQ" specification="entry / myVarOperation() ; myVarOperation(&quot;one&quot;); myVarOperation(&quot;one&quot;,&quot;two&quot;,&quot;three&quot;)" name="StateA" incomingTransitions="_y7EE0OlFEeap2s9VhFHffQ">
+        <outgoingTransitions xmi:id="_rglpwOllEeaqy98R6GTawQ" specification="always / myInternalVarOperation(0.0,0.2)" target="_qngssOllEeaqy98R6GTawQ"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_qngssOllEeaqy98R6GTawQ" specification="entry / IF2.myVarOperation2(1);  IF2.myVarOperation2(1,2); IF2.myVarOperation2(1,2,3,4)" name="StateB" incomingTransitions="_rglpwOllEeaqy98R6GTawQ"/>
+    </regions>
+  </sgraph:Statechart>
+  <notation:Diagram xmi:id="_y58DcOlFEeap2s9VhFHffQ" type="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor" element="_y5LOcOlFEeap2s9VhFHffQ" measurementUnit="Pixel">
+    <children xmi:id="_y6Ks8OlFEeap2s9VhFHffQ" type="Region" element="_y594oOlFEeap2s9VhFHffQ">
+      <children xsi:type="notation:DecorationNode" xmi:id="_y6ljsOlFEeap2s9VhFHffQ" type="RegionName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_y6ljselFEeap2s9VhFHffQ"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_y6ljsulFEeap2s9VhFHffQ"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_y6n_8OlFEeap2s9VhFHffQ" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+        <children xmi:id="_y6rDQOlFEeap2s9VhFHffQ" type="Entry" element="_y6p1IOlFEeap2s9VhFHffQ">
+          <children xmi:id="_y6sRYOlFEeap2s9VhFHffQ" type="BorderItemLabelContainer">
+            <children xsi:type="notation:DecorationNode" xmi:id="_y6sRY-lFEeap2s9VhFHffQ" type="BorderItemLabel">
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_y6sRZOlFEeap2s9VhFHffQ"/>
+              <layoutConstraint xsi:type="notation:Location" xmi:id="_y6sRZelFEeap2s9VhFHffQ"/>
+            </children>
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_y6sRYelFEeap2s9VhFHffQ" fontName="Verdana" lineColor="4210752"/>
+            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_y6sRYulFEeap2s9VhFHffQ"/>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_y6rDQelFEeap2s9VhFHffQ" fontName="Verdana" fillColor="0" lineColor="16777215"/>
+          <styles xsi:type="notation:NamedStyle" xmi:id="_y6rDQulFEeap2s9VhFHffQ" name="allowColors"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_y6s4cOlFEeap2s9VhFHffQ" x="70" y="20"/>
+        </children>
+        <children xmi:id="_y68JAOlFEeap2s9VhFHffQ" type="State" element="_y6utoOlFEeap2s9VhFHffQ">
+          <children xsi:type="notation:DecorationNode" xmi:id="_y69XIOlFEeap2s9VhFHffQ" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_y69XIelFEeap2s9VhFHffQ"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_y69XIulFEeap2s9VhFHffQ"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_y7AacOlFEeap2s9VhFHffQ" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_y7AacelFEeap2s9VhFHffQ" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_y7AaculFEeap2s9VhFHffQ"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_y7BBgOlFEeap2s9VhFHffQ" type="StateFigureCompartment"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_y68wEOlFEeap2s9VhFHffQ" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_y68wEelFEeap2s9VhFHffQ"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_y7CPoOlFEeap2s9VhFHffQ" name="isHorizontal" booleanValue="true"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_y7CPoelFEeap2s9VhFHffQ" x="59" y="92"/>
+        </children>
+        <children xmi:id="_qnjwAOllEeaqy98R6GTawQ" type="State" element="_qngssOllEeaqy98R6GTawQ">
+          <children xsi:type="notation:DecorationNode" xmi:id="_qnrr0OllEeaqy98R6GTawQ" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_qnrr0ellEeaqy98R6GTawQ"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_qnsS4OllEeaqy98R6GTawQ"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_qns58OllEeaqy98R6GTawQ" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_qnthAOllEeaqy98R6GTawQ" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_qnthAellEeaqy98R6GTawQ"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_qnuIEOllEeaqy98R6GTawQ" type="StateFigureCompartment"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_qnjwAellEeaqy98R6GTawQ" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_qnjwAullEeaqy98R6GTawQ"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_qnuIEellEeaqy98R6GTawQ" name="isHorizontal" booleanValue="true"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_qnjwA-llEeaqy98R6GTawQ" x="59" y="217"/>
+        </children>
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_y6n_8elFEeap2s9VhFHffQ"/>
+      </children>
+      <styles xsi:type="notation:ShapeStyle" xmi:id="_y6LUAOlFEeap2s9VhFHffQ" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_y6onAOlFEeap2s9VhFHffQ" x="475" y="10" width="735" height="366"/>
+    </children>
+    <children xsi:type="notation:Shape" xmi:id="_y7aDEOlFEeap2s9VhFHffQ" type="StatechartText" fontName="Verdana" lineColor="4210752">
+      <children xsi:type="notation:DecorationNode" xmi:id="_y7aqIOlFEeap2s9VhFHffQ" type="StatechartName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_y7aqIelFEeap2s9VhFHffQ"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_y7aqIulFEeap2s9VhFHffQ"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_y7aqI-lFEeap2s9VhFHffQ" type="StatechartTextExpression" fontName="Verdana" lineColor="4210752">
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_y7aqJOlFEeap2s9VhFHffQ"/>
+      </children>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_y7bRMOlFEeap2s9VhFHffQ" x="10" y="10" width="461" height="226"/>
+    </children>
+    <styles xsi:type="notation:DiagramStyle" xmi:id="_y58qgOlFEeap2s9VhFHffQ"/>
+    <edges xmi:id="_y7YN4OlFEeap2s9VhFHffQ" type="Transition" element="_y7EE0OlFEeap2s9VhFHffQ" source="_y6rDQOlFEeap2s9VhFHffQ" target="_y68JAOlFEeap2s9VhFHffQ">
+      <children xsi:type="notation:DecorationNode" xmi:id="_y7ZcAOlFEeap2s9VhFHffQ" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_y7ZcAelFEeap2s9VhFHffQ"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_y7ZcAulFEeap2s9VhFHffQ" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_y7YN4elFEeap2s9VhFHffQ" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_y7Y08OlFEeap2s9VhFHffQ" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_y7YN4ulFEeap2s9VhFHffQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+    </edges>
+    <edges xmi:id="_rgne8OllEeaqy98R6GTawQ" type="Transition" element="_rglpwOllEeaqy98R6GTawQ" source="_y68JAOlFEeap2s9VhFHffQ" target="_qnjwAOllEeaqy98R6GTawQ">
+      <children xsi:type="notation:DecorationNode" xmi:id="_rgtlkellEeaqy98R6GTawQ" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_rgtlkullEeaqy98R6GTawQ"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_rgtlk-llEeaqy98R6GTawQ" x="-2" y="-43"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_rgne8ellEeaqy98R6GTawQ" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_rgtlkOllEeaqy98R6GTawQ" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_rgne8ullEeaqy98R6GTawQ" points="[6, 25, -3, -170]$[6, 171, -3, -24]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_rgxP8OllEeaqy98R6GTawQ" id="(0.4865424430641822,0.8679245283018868)"/>
+    </edges>
+  </notation:Diagram>
+</xmi:XMI>