Browse Source

Process orthogonal states based on state vectors in Java Code Gen

markus.muehlbrandt@itemis.de 13 years ago
parent
commit
1d34d95030
85 changed files with 2035 additions and 1509 deletions
  1. 11 10
      examples/org.yakindu.sct.generator.java.trafficlight/GenModelJava.sgen
  2. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/Event.java
  3. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/EventNotification.java
  4. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/INotificationListener.java
  5. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/INotificationSender.java
  6. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/IStatemachine.java
  7. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ITimedStatemachine.java
  8. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ITimerService.java
  9. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/Notification.java
  10. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/NotificationSender.java
  11. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/NotificationType.java
  12. 11 11
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/RuntimeService.java
  13. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/TimeEvent.java
  14. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/TimerService.java
  15. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ValuedEvent.java
  16. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/DefaultInterface.java
  17. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/DefaultInterfaceImpl.java
  18. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfacePedestrian.java
  19. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfacePedestrianImpl.java
  20. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceTrafficLight.java
  21. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceTrafficLightImpl.java
  22. 296 194
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingCycleBasedStatemachine.java
  23. 8 8
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingEventBasedStatemachine.java
  24. 30 19
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomCycleBasedStatemachine.xpt
  25. 1 1
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/GenmodelEntries.ext
  26. 3 3
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/RuntimeService.xpt
  27. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/Event.java
  28. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/EventNotification.java
  29. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/INotificationListener.java
  30. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/INotificationSender.java
  31. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/IStatemachine.java
  32. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/ITimedStatemachine.java
  33. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/ITimerService.java
  34. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/Notification.java
  35. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/NotificationSender.java
  36. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/NotificationType.java
  37. 11 11
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/RuntimeService.java
  38. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/TimeEvent.java
  39. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/TimerService.java
  40. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/ValuedEvent.java
  41. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/DefaultInterface.java
  42. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/DefaultInterfaceImpl.java
  43. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceOther.java
  44. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceOtherImpl.java
  45. 57 42
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceTestCycleBasedStatemachine.java
  46. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceTestEventBasedStatemachine.java
  47. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceThird.java
  48. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceThirdImpl.java
  49. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/DefaultInterface.java
  50. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/DefaultInterfaceImpl.java
  51. 165 141
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/Test_DeepHistoryCycleBasedStatemachine.java
  52. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/Test_DeepHistoryEventBasedStatemachine.java
  53. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/DefaultInterface.java
  54. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/DefaultInterfaceImpl.java
  55. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/InterfaceOther.java
  56. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/InterfaceOtherImpl.java
  57. 40 28
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/Test_ExpressionCycleBasedStatemachine.java
  58. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/Test_ExpressionEventBasedStatemachine.java
  59. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/DefaultInterface.java
  60. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/DefaultInterfaceImpl.java
  61. 226 149
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/Test_HierarchyCycleBasedStatemachine.java
  62. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/Test_HierarchyEventBasedStatemachine.java
  63. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/DefaultInterface.java
  64. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/DefaultInterfaceImpl.java
  65. 43 30
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/Test_LocalActionsCycleBasedStatemachine.java
  66. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/Test_LocalActionsEventBasedStatemachine.java
  67. 10 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/DefaultInterface.java
  68. 17 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/DefaultInterfaceImpl.java
  69. 215 73
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/Test_ParallelRegionsCycleBasedStatemachine.java
  70. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/Test_ParallelRegionsEventBasedStatemachine.java
  71. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/DefaultInterface.java
  72. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/DefaultInterfaceImpl.java
  73. 165 141
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/Test_ShallowHistoryCycleBasedStatemachine.java
  74. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/Test_ShallowHistoryEventBasedStatemachine.java
  75. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/DefaultInterface.java
  76. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/DefaultInterfaceImpl.java
  77. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/InterfaceA.java
  78. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/InterfaceAImpl.java
  79. 71 44
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/Test_TransitionCycleBasedStatemachine.java
  80. 8 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/Test_TransitionEventBasedStatemachine.java
  81. 11 43
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestInterfaceTestCycleBasedStatemachine.java
  82. 11 43
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestInterfaceTestEventBasedStatemachine.java
  83. 1 3
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestLocalActionsCycleBasedStatemachine.java
  84. 1 3
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestLocalActionsEventBasedStatemachine.java
  85. 135 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestParallelRegionsCycleBasedStatemachine.java

+ 11 - 10
examples/org.yakindu.sct.generator.java.trafficlight/GenModelJava.sgen

@@ -7,16 +7,17 @@
 		}
 
 		feature licenseHeader {
-			licenseText = "/**
- * Copyright (c) 2011 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
- */"
+			licenseText = 
+"
+Copyright (c) 2011 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
+"
 		}
 		
 		feature GeneralFeatures {

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/Event.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/EventNotification.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/INotificationListener.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/INotificationSender.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/IStatemachine.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ITimedStatemachine.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ITimerService.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/Notification.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/NotificationSender.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/NotificationType.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 11 - 11
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/RuntimeService.java

@@ -1,17 +1,17 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 
-import java.util.HashSet;
-import java.util.Set;
+import java.util.LinkedList;
+import java.util.List;
 import java.util.Timer;
 import java.util.TimerTask;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
@@ -20,7 +20,7 @@ public class RuntimeService {
 
 	private Timer timer = new Timer();
 
-	private Set<IStatemachine> statemachineSet = new HashSet<IStatemachine>();
+	private List<IStatemachine> statemachineSet = new LinkedList<IStatemachine>();
 
 	private ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/TimeEvent.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/TimerService.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ValuedEvent.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/DefaultInterface.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.trafficlightwaiting;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/DefaultInterfaceImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.trafficlightwaiting;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfacePedestrian.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.trafficlightwaiting;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfacePedestrianImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.trafficlightwaiting;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceTrafficLight.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.trafficlightwaiting;
 

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceTrafficLightImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.trafficlightwaiting;
 

+ 296 - 194
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingCycleBasedStatemachine.java

@@ -1,20 +1,18 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.trafficlightwaiting;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.EnumSet;
 import java.util.HashSet;
-import java.util.Set;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.TimeEvent;
 import org.yakindu.sct.runtime.java.ITimedStatemachine;
@@ -59,7 +57,9 @@ public class TrafficLightWaitingCycleBasedStatemachine
 	private InterfacePedestrianImpl interfacePedestrian;
 	private DefaultInterfaceImpl defaultInterface;
 
-	private final Set<State> activeStates = EnumSet.noneOf(State.class);
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
 
 	private final ArrayList<Event<? extends Enum<?>>> occuredEvents;
 
@@ -104,6 +104,15 @@ public class TrafficLightWaitingCycleBasedStatemachine
 
 	}
 
+	public boolean isStateActive(State state) {
+		for (int i = 0; i < stateVector.length; i++) {
+			if (stateVector[i] == state) {
+				return true;
+			}
+		}
+		return false;
+	}
+
 	public void setTimerService(ITimerService timerService) {
 		this.timerService = timerService;
 	}
@@ -123,10 +132,6 @@ public class TrafficLightWaitingCycleBasedStatemachine
 		}
 	}
 
-	public Set<State> getActiveStates() {
-		return EnumSet.copyOf(activeStates);
-	}
-
 	public InterfaceTrafficLight getInterfaceTrafficLight() {
 		return interfaceTrafficLight;
 	}
@@ -148,7 +153,8 @@ public class TrafficLightWaitingCycleBasedStatemachine
 		interfacePedestrian.setVarGreen(false);
 		interfacePedestrian.setVarRequest(false);
 
-		activeStates.add(State.StreetGreen);
+		nextStateIndex = 0;
+		stateVector[0] = State.StreetGreen;
 
 	}
 
@@ -156,41 +162,48 @@ public class TrafficLightWaitingCycleBasedStatemachine
 	}
 	private void reactStreetGreen() {
 		if (occuredEvents.contains(defaultInterface.getEventKeypress2())) {
-			if (activeStates.contains(State.StreetGreen)) {
-				activeStates.remove(State.StreetGreen);
+			if (isStateActive(State.StreetGreen)) {
+				stateVector[0] = null;
+
+			} else if (isStateActive(State.WaitOn)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.WaitOn)) {
-				activeStates.remove(State.WaitOn);
 				getTimerService().resetTimer(WaitOn_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.WaitOff)) {
-				activeStates.remove(State.WaitOff);
+			} else if (isStateActive(State.WaitOff)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(WaitOff_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.StreetAttention)) {
-				activeStates.remove(State.StreetAttention);
+			} else if (isStateActive(State.StreetAttention)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetAttention_time_event_0);
 
-			} else if (activeStates.contains(State.StreetRed)) {
-				activeStates.remove(State.StreetRed);
+			} else if (isStateActive(State.StreetRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetRed_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianGreen)) {
-				activeStates.remove(State.PedestrianGreen);
+			} else if (isStateActive(State.PedestrianGreen)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianGreen_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianRed)) {
-				activeStates.remove(State.PedestrianRed);
+			} else if (isStateActive(State.PedestrianRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianRed_time_event_0);
 
-			} else if (activeStates.contains(State.StreetPrepare)) {
-				activeStates.remove(State.StreetPrepare);
+			} else if (isStateActive(State.StreetPrepare)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetPrepare_time_event_0);
 
 			}
@@ -205,11 +218,12 @@ public class TrafficLightWaitingCycleBasedStatemachine
 					cycleStartTime);
 			interfaceTrafficLight.setVarYellow(true);
 
-			activeStates.add(State.YellowOn);
+			nextStateIndex = 0;
+			stateVector[0] = State.YellowOn;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventKeypress1())) {
-				activeStates.remove(State.StreetGreen);
+				stateVector[0] = null;
 
 				getTimerService().setTimer(PedWaiting_time_event_0, (7 * 1000),
 						cycleStartTime);
@@ -218,7 +232,8 @@ public class TrafficLightWaitingCycleBasedStatemachine
 						cycleStartTime);
 				interfacePedestrian.setVarRequest(true);
 
-				activeStates.add(State.WaitOn);
+				nextStateIndex = 0;
+				stateVector[0] = State.WaitOn;
 
 			}
 
@@ -228,41 +243,48 @@ public class TrafficLightWaitingCycleBasedStatemachine
 	}
 	private void reactWaitOn() {
 		if (occuredEvents.contains(defaultInterface.getEventKeypress2())) {
-			if (activeStates.contains(State.StreetGreen)) {
-				activeStates.remove(State.StreetGreen);
+			if (isStateActive(State.StreetGreen)) {
+				stateVector[0] = null;
+
+			} else if (isStateActive(State.WaitOn)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.WaitOn)) {
-				activeStates.remove(State.WaitOn);
 				getTimerService().resetTimer(WaitOn_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.WaitOff)) {
-				activeStates.remove(State.WaitOff);
+			} else if (isStateActive(State.WaitOff)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(WaitOff_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.StreetAttention)) {
-				activeStates.remove(State.StreetAttention);
+			} else if (isStateActive(State.StreetAttention)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetAttention_time_event_0);
 
-			} else if (activeStates.contains(State.StreetRed)) {
-				activeStates.remove(State.StreetRed);
+			} else if (isStateActive(State.StreetRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetRed_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianGreen)) {
-				activeStates.remove(State.PedestrianGreen);
+			} else if (isStateActive(State.PedestrianGreen)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianGreen_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianRed)) {
-				activeStates.remove(State.PedestrianRed);
+			} else if (isStateActive(State.PedestrianRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianRed_time_event_0);
 
-			} else if (activeStates.contains(State.StreetPrepare)) {
-				activeStates.remove(State.StreetPrepare);
+			} else if (isStateActive(State.StreetPrepare)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetPrepare_time_event_0);
 
 			}
@@ -277,16 +299,19 @@ public class TrafficLightWaitingCycleBasedStatemachine
 					cycleStartTime);
 			interfaceTrafficLight.setVarYellow(true);
 
-			activeStates.add(State.YellowOn);
+			nextStateIndex = 0;
+			stateVector[0] = State.YellowOn;
 
 		} else {
 			if (occuredEvents.contains(PedWaiting_time_event_0)) {
-				if (activeStates.contains(State.WaitOn)) {
-					activeStates.remove(State.WaitOn);
+				if (isStateActive(State.WaitOn)) {
+					stateVector[0] = null;
+
 					getTimerService().resetTimer(WaitOn_time_event_0);
 
-				} else if (activeStates.contains(State.WaitOff)) {
-					activeStates.remove(State.WaitOff);
+				} else if (isStateActive(State.WaitOff)) {
+					stateVector[0] = null;
+
 					getTimerService().resetTimer(WaitOff_time_event_0);
 
 				}
@@ -299,18 +324,21 @@ public class TrafficLightWaitingCycleBasedStatemachine
 				interfaceTrafficLight.setVarYellow(true);
 				interfaceTrafficLight.setVarGreen(false);
 
-				activeStates.add(State.StreetAttention);
+				nextStateIndex = 0;
+				stateVector[0] = State.StreetAttention;
 
 			} else {
 				if (occuredEvents.contains(WaitOn_time_event_0)) {
-					activeStates.remove(State.WaitOn);
+					stateVector[0] = null;
+
 					getTimerService().resetTimer(WaitOn_time_event_0);
 
 					getTimerService().setTimer(WaitOff_time_event_0, 500,
 							cycleStartTime);
 					interfacePedestrian.setVarRequest(false);
 
-					activeStates.add(State.WaitOff);
+					nextStateIndex = 0;
+					stateVector[0] = State.WaitOff;
 
 				}
 
@@ -320,41 +348,48 @@ public class TrafficLightWaitingCycleBasedStatemachine
 	}
 	private void reactWaitOff() {
 		if (occuredEvents.contains(defaultInterface.getEventKeypress2())) {
-			if (activeStates.contains(State.StreetGreen)) {
-				activeStates.remove(State.StreetGreen);
+			if (isStateActive(State.StreetGreen)) {
+				stateVector[0] = null;
+
+			} else if (isStateActive(State.WaitOn)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.WaitOn)) {
-				activeStates.remove(State.WaitOn);
 				getTimerService().resetTimer(WaitOn_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.WaitOff)) {
-				activeStates.remove(State.WaitOff);
+			} else if (isStateActive(State.WaitOff)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(WaitOff_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.StreetAttention)) {
-				activeStates.remove(State.StreetAttention);
+			} else if (isStateActive(State.StreetAttention)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetAttention_time_event_0);
 
-			} else if (activeStates.contains(State.StreetRed)) {
-				activeStates.remove(State.StreetRed);
+			} else if (isStateActive(State.StreetRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetRed_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianGreen)) {
-				activeStates.remove(State.PedestrianGreen);
+			} else if (isStateActive(State.PedestrianGreen)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianGreen_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianRed)) {
-				activeStates.remove(State.PedestrianRed);
+			} else if (isStateActive(State.PedestrianRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianRed_time_event_0);
 
-			} else if (activeStates.contains(State.StreetPrepare)) {
-				activeStates.remove(State.StreetPrepare);
+			} else if (isStateActive(State.StreetPrepare)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetPrepare_time_event_0);
 
 			}
@@ -369,16 +404,19 @@ public class TrafficLightWaitingCycleBasedStatemachine
 					cycleStartTime);
 			interfaceTrafficLight.setVarYellow(true);
 
-			activeStates.add(State.YellowOn);
+			nextStateIndex = 0;
+			stateVector[0] = State.YellowOn;
 
 		} else {
 			if (occuredEvents.contains(PedWaiting_time_event_0)) {
-				if (activeStates.contains(State.WaitOn)) {
-					activeStates.remove(State.WaitOn);
+				if (isStateActive(State.WaitOn)) {
+					stateVector[0] = null;
+
 					getTimerService().resetTimer(WaitOn_time_event_0);
 
-				} else if (activeStates.contains(State.WaitOff)) {
-					activeStates.remove(State.WaitOff);
+				} else if (isStateActive(State.WaitOff)) {
+					stateVector[0] = null;
+
 					getTimerService().resetTimer(WaitOff_time_event_0);
 
 				}
@@ -391,18 +429,21 @@ public class TrafficLightWaitingCycleBasedStatemachine
 				interfaceTrafficLight.setVarYellow(true);
 				interfaceTrafficLight.setVarGreen(false);
 
-				activeStates.add(State.StreetAttention);
+				nextStateIndex = 0;
+				stateVector[0] = State.StreetAttention;
 
 			} else {
 				if (occuredEvents.contains(WaitOff_time_event_0)) {
-					activeStates.remove(State.WaitOff);
+					stateVector[0] = null;
+
 					getTimerService().resetTimer(WaitOff_time_event_0);
 
 					getTimerService().setTimer(WaitOn_time_event_0, 500,
 							cycleStartTime);
 					interfacePedestrian.setVarRequest(true);
 
-					activeStates.add(State.WaitOn);
+					nextStateIndex = 0;
+					stateVector[0] = State.WaitOn;
 
 				}
 
@@ -412,41 +453,48 @@ public class TrafficLightWaitingCycleBasedStatemachine
 	}
 	private void reactStreetAttention() {
 		if (occuredEvents.contains(defaultInterface.getEventKeypress2())) {
-			if (activeStates.contains(State.StreetGreen)) {
-				activeStates.remove(State.StreetGreen);
+			if (isStateActive(State.StreetGreen)) {
+				stateVector[0] = null;
+
+			} else if (isStateActive(State.WaitOn)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.WaitOn)) {
-				activeStates.remove(State.WaitOn);
 				getTimerService().resetTimer(WaitOn_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.WaitOff)) {
-				activeStates.remove(State.WaitOff);
+			} else if (isStateActive(State.WaitOff)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(WaitOff_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.StreetAttention)) {
-				activeStates.remove(State.StreetAttention);
+			} else if (isStateActive(State.StreetAttention)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetAttention_time_event_0);
 
-			} else if (activeStates.contains(State.StreetRed)) {
-				activeStates.remove(State.StreetRed);
+			} else if (isStateActive(State.StreetRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetRed_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianGreen)) {
-				activeStates.remove(State.PedestrianGreen);
+			} else if (isStateActive(State.PedestrianGreen)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianGreen_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianRed)) {
-				activeStates.remove(State.PedestrianRed);
+			} else if (isStateActive(State.PedestrianRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianRed_time_event_0);
 
-			} else if (activeStates.contains(State.StreetPrepare)) {
-				activeStates.remove(State.StreetPrepare);
+			} else if (isStateActive(State.StreetPrepare)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetPrepare_time_event_0);
 
 			}
@@ -461,11 +509,13 @@ public class TrafficLightWaitingCycleBasedStatemachine
 					cycleStartTime);
 			interfaceTrafficLight.setVarYellow(true);
 
-			activeStates.add(State.YellowOn);
+			nextStateIndex = 0;
+			stateVector[0] = State.YellowOn;
 
 		} else {
 			if (occuredEvents.contains(StreetAttention_time_event_0)) {
-				activeStates.remove(State.StreetAttention);
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetAttention_time_event_0);
 
 				getTimerService().setTimer(StreetRed_time_event_0, (2 * 1000),
@@ -474,7 +524,8 @@ public class TrafficLightWaitingCycleBasedStatemachine
 				interfaceTrafficLight.setVarYellow(false);
 				interfaceTrafficLight.setVarGreen(false);
 
-				activeStates.add(State.StreetRed);
+				nextStateIndex = 0;
+				stateVector[0] = State.StreetRed;
 
 			}
 
@@ -482,41 +533,48 @@ public class TrafficLightWaitingCycleBasedStatemachine
 	}
 	private void reactStreetRed() {
 		if (occuredEvents.contains(defaultInterface.getEventKeypress2())) {
-			if (activeStates.contains(State.StreetGreen)) {
-				activeStates.remove(State.StreetGreen);
+			if (isStateActive(State.StreetGreen)) {
+				stateVector[0] = null;
+
+			} else if (isStateActive(State.WaitOn)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.WaitOn)) {
-				activeStates.remove(State.WaitOn);
 				getTimerService().resetTimer(WaitOn_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.WaitOff)) {
-				activeStates.remove(State.WaitOff);
+			} else if (isStateActive(State.WaitOff)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(WaitOff_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.StreetAttention)) {
-				activeStates.remove(State.StreetAttention);
+			} else if (isStateActive(State.StreetAttention)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetAttention_time_event_0);
 
-			} else if (activeStates.contains(State.StreetRed)) {
-				activeStates.remove(State.StreetRed);
+			} else if (isStateActive(State.StreetRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetRed_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianGreen)) {
-				activeStates.remove(State.PedestrianGreen);
+			} else if (isStateActive(State.PedestrianGreen)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianGreen_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianRed)) {
-				activeStates.remove(State.PedestrianRed);
+			} else if (isStateActive(State.PedestrianRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianRed_time_event_0);
 
-			} else if (activeStates.contains(State.StreetPrepare)) {
-				activeStates.remove(State.StreetPrepare);
+			} else if (isStateActive(State.StreetPrepare)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetPrepare_time_event_0);
 
 			}
@@ -531,11 +589,13 @@ public class TrafficLightWaitingCycleBasedStatemachine
 					cycleStartTime);
 			interfaceTrafficLight.setVarYellow(true);
 
-			activeStates.add(State.YellowOn);
+			nextStateIndex = 0;
+			stateVector[0] = State.YellowOn;
 
 		} else {
 			if (occuredEvents.contains(StreetRed_time_event_0)) {
-				activeStates.remove(State.StreetRed);
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetRed_time_event_0);
 
 				getTimerService().setTimer(PedestrianGreen_time_event_0,
@@ -543,7 +603,8 @@ public class TrafficLightWaitingCycleBasedStatemachine
 				interfacePedestrian.setVarRed(false);
 				interfacePedestrian.setVarGreen(true);
 
-				activeStates.add(State.PedestrianGreen);
+				nextStateIndex = 0;
+				stateVector[0] = State.PedestrianGreen;
 
 			}
 
@@ -551,41 +612,48 @@ public class TrafficLightWaitingCycleBasedStatemachine
 	}
 	private void reactPedestrianGreen() {
 		if (occuredEvents.contains(defaultInterface.getEventKeypress2())) {
-			if (activeStates.contains(State.StreetGreen)) {
-				activeStates.remove(State.StreetGreen);
+			if (isStateActive(State.StreetGreen)) {
+				stateVector[0] = null;
+
+			} else if (isStateActive(State.WaitOn)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.WaitOn)) {
-				activeStates.remove(State.WaitOn);
 				getTimerService().resetTimer(WaitOn_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.WaitOff)) {
-				activeStates.remove(State.WaitOff);
+			} else if (isStateActive(State.WaitOff)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(WaitOff_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.StreetAttention)) {
-				activeStates.remove(State.StreetAttention);
+			} else if (isStateActive(State.StreetAttention)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetAttention_time_event_0);
 
-			} else if (activeStates.contains(State.StreetRed)) {
-				activeStates.remove(State.StreetRed);
+			} else if (isStateActive(State.StreetRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetRed_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianGreen)) {
-				activeStates.remove(State.PedestrianGreen);
+			} else if (isStateActive(State.PedestrianGreen)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianGreen_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianRed)) {
-				activeStates.remove(State.PedestrianRed);
+			} else if (isStateActive(State.PedestrianRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianRed_time_event_0);
 
-			} else if (activeStates.contains(State.StreetPrepare)) {
-				activeStates.remove(State.StreetPrepare);
+			} else if (isStateActive(State.StreetPrepare)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetPrepare_time_event_0);
 
 			}
@@ -600,11 +668,13 @@ public class TrafficLightWaitingCycleBasedStatemachine
 					cycleStartTime);
 			interfaceTrafficLight.setVarYellow(true);
 
-			activeStates.add(State.YellowOn);
+			nextStateIndex = 0;
+			stateVector[0] = State.YellowOn;
 
 		} else {
 			if (occuredEvents.contains(PedestrianGreen_time_event_0)) {
-				activeStates.remove(State.PedestrianGreen);
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianGreen_time_event_0);
 
 				getTimerService().setTimer(PedestrianRed_time_event_0,
@@ -612,7 +682,8 @@ public class TrafficLightWaitingCycleBasedStatemachine
 				interfacePedestrian.setVarRed(true);
 				interfacePedestrian.setVarGreen(false);
 
-				activeStates.add(State.PedestrianRed);
+				nextStateIndex = 0;
+				stateVector[0] = State.PedestrianRed;
 
 			}
 
@@ -620,41 +691,48 @@ public class TrafficLightWaitingCycleBasedStatemachine
 	}
 	private void reactPedestrianRed() {
 		if (occuredEvents.contains(defaultInterface.getEventKeypress2())) {
-			if (activeStates.contains(State.StreetGreen)) {
-				activeStates.remove(State.StreetGreen);
+			if (isStateActive(State.StreetGreen)) {
+				stateVector[0] = null;
+
+			} else if (isStateActive(State.WaitOn)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.WaitOn)) {
-				activeStates.remove(State.WaitOn);
 				getTimerService().resetTimer(WaitOn_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.WaitOff)) {
-				activeStates.remove(State.WaitOff);
+			} else if (isStateActive(State.WaitOff)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(WaitOff_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.StreetAttention)) {
-				activeStates.remove(State.StreetAttention);
+			} else if (isStateActive(State.StreetAttention)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetAttention_time_event_0);
 
-			} else if (activeStates.contains(State.StreetRed)) {
-				activeStates.remove(State.StreetRed);
+			} else if (isStateActive(State.StreetRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetRed_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianGreen)) {
-				activeStates.remove(State.PedestrianGreen);
+			} else if (isStateActive(State.PedestrianGreen)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianGreen_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianRed)) {
-				activeStates.remove(State.PedestrianRed);
+			} else if (isStateActive(State.PedestrianRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianRed_time_event_0);
 
-			} else if (activeStates.contains(State.StreetPrepare)) {
-				activeStates.remove(State.StreetPrepare);
+			} else if (isStateActive(State.StreetPrepare)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetPrepare_time_event_0);
 
 			}
@@ -669,11 +747,13 @@ public class TrafficLightWaitingCycleBasedStatemachine
 					cycleStartTime);
 			interfaceTrafficLight.setVarYellow(true);
 
-			activeStates.add(State.YellowOn);
+			nextStateIndex = 0;
+			stateVector[0] = State.YellowOn;
 
 		} else {
 			if (occuredEvents.contains(PedestrianRed_time_event_0)) {
-				activeStates.remove(State.PedestrianRed);
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianRed_time_event_0);
 
 				getTimerService().setTimer(StreetPrepare_time_event_0,
@@ -682,7 +762,8 @@ public class TrafficLightWaitingCycleBasedStatemachine
 				interfaceTrafficLight.setVarYellow(true);
 				interfaceTrafficLight.setVarGreen(false);
 
-				activeStates.add(State.StreetPrepare);
+				nextStateIndex = 0;
+				stateVector[0] = State.StreetPrepare;
 
 			}
 
@@ -690,41 +771,48 @@ public class TrafficLightWaitingCycleBasedStatemachine
 	}
 	private void reactStreetPrepare() {
 		if (occuredEvents.contains(defaultInterface.getEventKeypress2())) {
-			if (activeStates.contains(State.StreetGreen)) {
-				activeStates.remove(State.StreetGreen);
+			if (isStateActive(State.StreetGreen)) {
+				stateVector[0] = null;
+
+			} else if (isStateActive(State.WaitOn)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.WaitOn)) {
-				activeStates.remove(State.WaitOn);
 				getTimerService().resetTimer(WaitOn_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.WaitOff)) {
-				activeStates.remove(State.WaitOff);
+			} else if (isStateActive(State.WaitOff)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(WaitOff_time_event_0);
 
 				getTimerService().resetTimer(PedWaiting_time_event_0);
 				interfacePedestrian.setVarRequest(false);
 
-			} else if (activeStates.contains(State.StreetAttention)) {
-				activeStates.remove(State.StreetAttention);
+			} else if (isStateActive(State.StreetAttention)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetAttention_time_event_0);
 
-			} else if (activeStates.contains(State.StreetRed)) {
-				activeStates.remove(State.StreetRed);
+			} else if (isStateActive(State.StreetRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetRed_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianGreen)) {
-				activeStates.remove(State.PedestrianGreen);
+			} else if (isStateActive(State.PedestrianGreen)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianGreen_time_event_0);
 
-			} else if (activeStates.contains(State.PedestrianRed)) {
-				activeStates.remove(State.PedestrianRed);
+			} else if (isStateActive(State.PedestrianRed)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(PedestrianRed_time_event_0);
 
-			} else if (activeStates.contains(State.StreetPrepare)) {
-				activeStates.remove(State.StreetPrepare);
+			} else if (isStateActive(State.StreetPrepare)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetPrepare_time_event_0);
 
 			}
@@ -739,11 +827,13 @@ public class TrafficLightWaitingCycleBasedStatemachine
 					cycleStartTime);
 			interfaceTrafficLight.setVarYellow(true);
 
-			activeStates.add(State.YellowOn);
+			nextStateIndex = 0;
+			stateVector[0] = State.YellowOn;
 
 		} else {
 			if (occuredEvents.contains(StreetPrepare_time_event_0)) {
-				activeStates.remove(State.StreetPrepare);
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(StreetPrepare_time_event_0);
 
 				interfaceTrafficLight.setVarRed(false);
@@ -753,7 +843,8 @@ public class TrafficLightWaitingCycleBasedStatemachine
 				interfacePedestrian.setVarGreen(false);
 				interfacePedestrian.setVarRequest(false);
 
-				activeStates.add(State.StreetGreen);
+				nextStateIndex = 0;
+				stateVector[0] = State.StreetGreen;
 
 			}
 
@@ -763,12 +854,14 @@ public class TrafficLightWaitingCycleBasedStatemachine
 	}
 	private void reactYellowOn() {
 		if (occuredEvents.contains(defaultInterface.getEventKeypress2())) {
-			if (activeStates.contains(State.YellowOn)) {
-				activeStates.remove(State.YellowOn);
+			if (isStateActive(State.YellowOn)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(YellowOn_time_event_0);
 
-			} else if (activeStates.contains(State.YellowOff)) {
-				activeStates.remove(State.YellowOff);
+			} else if (isStateActive(State.YellowOff)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(YellowOff_time_event_0);
 
 			}
@@ -780,18 +873,21 @@ public class TrafficLightWaitingCycleBasedStatemachine
 			interfacePedestrian.setVarGreen(false);
 			interfacePedestrian.setVarRequest(false);
 
-			activeStates.add(State.StreetGreen);
+			nextStateIndex = 0;
+			stateVector[0] = State.StreetGreen;
 
 		} else {
 			if (occuredEvents.contains(YellowOn_time_event_0)) {
-				activeStates.remove(State.YellowOn);
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(YellowOn_time_event_0);
 
 				getTimerService().setTimer(YellowOff_time_event_0, 500,
 						cycleStartTime);
 				interfaceTrafficLight.setVarYellow(false);
 
-				activeStates.add(State.YellowOff);
+				nextStateIndex = 0;
+				stateVector[0] = State.YellowOff;
 
 			}
 
@@ -799,12 +895,14 @@ public class TrafficLightWaitingCycleBasedStatemachine
 	}
 	private void reactYellowOff() {
 		if (occuredEvents.contains(defaultInterface.getEventKeypress2())) {
-			if (activeStates.contains(State.YellowOn)) {
-				activeStates.remove(State.YellowOn);
+			if (isStateActive(State.YellowOn)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(YellowOn_time_event_0);
 
-			} else if (activeStates.contains(State.YellowOff)) {
-				activeStates.remove(State.YellowOff);
+			} else if (isStateActive(State.YellowOff)) {
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(YellowOff_time_event_0);
 
 			}
@@ -816,18 +914,21 @@ public class TrafficLightWaitingCycleBasedStatemachine
 			interfacePedestrian.setVarGreen(false);
 			interfacePedestrian.setVarRequest(false);
 
-			activeStates.add(State.StreetGreen);
+			nextStateIndex = 0;
+			stateVector[0] = State.StreetGreen;
 
 		} else {
 			if (occuredEvents.contains(YellowOff_time_event_0)) {
-				activeStates.remove(State.YellowOff);
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(YellowOff_time_event_0);
 
 				getTimerService().setTimer(YellowOn_time_event_0, 500,
 						cycleStartTime);
 				interfaceTrafficLight.setVarYellow(true);
 
-				activeStates.add(State.YellowOn);
+				nextStateIndex = 0;
+				stateVector[0] = State.YellowOn;
 
 			}
 
@@ -836,8 +937,9 @@ public class TrafficLightWaitingCycleBasedStatemachine
 	public void runCycle() {
 		cycleStartTime = System.currentTimeMillis();
 		outEvents.clear();
-		for (State state : activeStates) {
-			switch (state) {
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+			switch (stateVector[nextStateIndex]) {
 				case On :
 					reactOn();
 					break;

+ 8 - 8
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingEventBasedStatemachine.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.trafficlightwaiting;
 

+ 30 - 19
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomCycleBasedStatemachine.xpt

@@ -27,7 +27,7 @@ Contributors:
 
 «DEFINE ActionCode FOR StateSwitch-»
 	«FOREACH cases AS stateCase ITERATOR iter -»
-	«IF iter.counter1 > 1»else «ENDIF»if (activeStates.contains(State.«stateCase.state.getName()»)) {
+	«IF iter.counter1 > 1»else «ENDIF»if (isStateActive(State.«stateCase.state.getName()»)) {
 		«EXPAND ActionCode FOR stateCase.step»
 	}
 	«ENDFOREACH-»
@@ -93,12 +93,15 @@ else {
 
 «DEFINE ActionCode FOR EnterState-»
 	«getComment()-»
-	activeStates.add(State.«state.getName()»);
+	nextStateIndex = «this.state.stateVector.offset»;
+	stateVector[«this.state.stateVector.offset»] = State.«state.getName()»;
+	«REM»activeStates.add(State.«state.getName()»);«ENDREM»
 «ENDDEFINE»
 
 «DEFINE ActionCode FOR ExitState-»
 	«getComment()-»
-	activeStates.remove(State.«state.getName()»);
+	stateVector[«this.state.stateVector.offset»] = null;
+	«REM»activeStates.remove(State.«state.getName()»);«ENDREM»
 «ENDDEFINE»
 
 «DEFINE ConditionMethodsImplement FOR ExecutionNode-»
@@ -170,9 +173,7 @@ package 
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.EnumSet;
 import java.util.HashSet;
-import java.util.Set;
 import «entry.getBasePackageName()».Event;
 «IF isTimedStatemachine()-»
 import «entry.getBasePackageName()».TimeEvent;
@@ -227,7 +228,9 @@ public class 
 	
 	«ENDFOREACH-»
 
-	private final Set<State> activeStates = EnumSet.noneOf(State.class);
+	private final State[] stateVector = new State[«stateVector.size»];
+	
+	private int nextStateIndex;
 	
 	private final ArrayList<Event<? extends Enum<?>>> occuredEvents;
 	
@@ -267,6 +270,15 @@ public class 
 		
 	}
 	
+	public boolean isStateActive(State state){
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
 	«IF isTimedStatemachine()-»
 	public void setTimerService(ITimerService timerService) {
 		this.timerService = timerService;
@@ -287,10 +299,6 @@ public class 
 		}
 	}
 	«ENDIF-»
-		
-	public Set<State> getActiveStates(){
-		return EnumSet.copyOf(activeStates);
-	}
 	
 	«FOREACH scopes.typeSelect(InterfaceScope) AS interface-»
 	public «interface.getInterfaceName()» get«interface.getInterfaceName()»() {
@@ -358,15 +366,18 @@ public class 
 		cycleStartTime = System.currentTimeMillis();
 		«ENDIF-»
 		outEvents.clear();
-		for (State state : activeStates) {
-			switch (state) {
-			«FOREACH this.states AS state-»
-    		case «state.getName()»:
-        		react«state.getName()»();
-        		break;
-			«ENDFOREACH-»
-			default:
-				// no state found
+		
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+			if (stateVector[nextStateIndex] != null) {
+				switch (stateVector[nextStateIndex]) {
+				«FOREACH this.states AS state-»
+    			case «state.getName()»:
+        			react«state.getName()»();
+        			break;
+				«ENDFOREACH-»
+				default:
+					// no state found
+				}
 			}
 		}
 		occuredEvents.clear();

+ 1 - 1
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/GenmodelEntries.ext

@@ -75,7 +75,7 @@ String getImplementationPackageName(InterfaceScope this, GeneratorEntry entry):
 String getLicenseHeader(GeneratorEntry entry) :
 	if entry.getFeatureConfiguration(getLicenseFeature())!=null
 		&& entry.getFeatureConfiguration(getLicenseFeature()).getParameterValue(getLicenseText()) != null then
-		entry.getFeatureConfiguration(getLicenseFeature()).getParameterValue(getLicenseText()).getStringValue()
+		"/**"+entry.getFeatureConfiguration(getLicenseFeature()).getParameterValue(getLicenseText()).getStringValue()+"*/"
 	else 
 		null;
 

+ 3 - 3
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/RuntimeService.xpt

@@ -17,8 +17,8 @@ Contributors:
 «getLicenseHeader(entry)»
 package «entry.getBasePackageName()»;
 
-import java.util.HashSet;
-import java.util.Set;
+import java.util.LinkedList;
+import java.util.List;
 import java.util.Timer;
 import java.util.TimerTask;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
@@ -27,7 +27,7 @@ public class RuntimeService {
 
 	private Timer timer = new Timer();
 
-	private Set<IStatemachine> statemachineSet = new HashSet<IStatemachine>();
+	private List<IStatemachine> statemachineSet = new LinkedList<IStatemachine>();
 
 	private ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/Event.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/EventNotification.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/INotificationListener.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/INotificationSender.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/IStatemachine.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/ITimedStatemachine.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/ITimerService.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/Notification.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/NotificationSender.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/NotificationType.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 11 - 11
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/RuntimeService.java

@@ -1,17 +1,17 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 
-import java.util.HashSet;
-import java.util.Set;
+import java.util.LinkedList;
+import java.util.List;
 import java.util.Timer;
 import java.util.TimerTask;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
@@ -20,7 +20,7 @@ public class RuntimeService {
 
 	private Timer timer = new Timer();
 
-	private Set<IStatemachine> statemachineSet = new HashSet<IStatemachine>();
+	private List<IStatemachine> statemachineSet = new LinkedList<IStatemachine>();
 
 	private ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/TimeEvent.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/TimerService.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/ValuedEvent.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/DefaultInterface.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.interfacetest;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/DefaultInterfaceImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.interfacetest;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceOther.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.interfacetest;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceOtherImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.interfacetest;
 

+ 57 - 42
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceTestCycleBasedStatemachine.java

@@ -1,20 +1,18 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.interfacetest;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.EnumSet;
 import java.util.HashSet;
-import java.util.Set;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.IStatemachine;
 
@@ -28,7 +26,9 @@ public class InterfaceTestCycleBasedStatemachine implements IStatemachine {
 	private InterfaceOtherImpl interfaceOther;
 	private InterfaceThirdImpl interfaceThird;
 
-	private final Set<State> activeStates = EnumSet.noneOf(State.class);
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
 
 	private final ArrayList<Event<? extends Enum<?>>> occuredEvents;
 
@@ -59,8 +59,13 @@ public class InterfaceTestCycleBasedStatemachine implements IStatemachine {
 
 	}
 
-	public Set<State> getActiveStates() {
-		return EnumSet.copyOf(activeStates);
+	public boolean isStateActive(State state) {
+		for (int i = 0; i < stateVector.length; i++) {
+			if (stateVector[i] == state) {
+				return true;
+			}
+		}
+		return false;
 	}
 
 	public DefaultInterface getDefaultInterface() {
@@ -76,36 +81,40 @@ public class InterfaceTestCycleBasedStatemachine implements IStatemachine {
 	}
 
 	public void enter() {
-		activeStates.add(State.State1);
+		nextStateIndex = 0;
+		stateVector[0] = State.State1;
 
 	}
 
 	private void reactState1() {
 		if ((occuredEvents.contains(defaultInterface.getEventEvent1()) && (defaultInterface
 				.getVarVar2() > 0))) {
-			activeStates.remove(State.State1);
+			stateVector[0] = null;
 
 			defaultInterface.raiseEvent2(22);
 
-			activeStates.add(State.State2);
+			nextStateIndex = 0;
+			stateVector[0] = State.State2;
 
 		} else {
 			if ((occuredEvents.contains(interfaceOther.getEventEvent3()) && (defaultInterface
 					.getVarVar3() == 1))) {
-				activeStates.remove(State.State1);
+				stateVector[0] = null;
 
 				interfaceOther.raiseEvent4();
 
-				activeStates.add(State.State3);
+				nextStateIndex = 0;
+				stateVector[0] = State.State3;
 
 			} else {
 				if ((occuredEvents.contains(interfaceThird.getEventEvent5()) && (defaultInterface
 						.getVarVar1() == true))) {
-					activeStates.remove(State.State1);
+					stateVector[0] = null;
 
 					interfaceThird.raiseEvent6(true);
 
-					activeStates.add(State.State4);
+					nextStateIndex = 0;
+					stateVector[0] = State.State4;
 
 				}
 			}
@@ -113,46 +122,52 @@ public class InterfaceTestCycleBasedStatemachine implements IStatemachine {
 	}
 	private void reactState2() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent1())) {
-			activeStates.remove(State.State2);
+			stateVector[0] = null;
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		}
 	}
 	private void reactState3() {
 		if (occuredEvents.contains(interfaceOther.getEventEvent3())) {
-			activeStates.remove(State.State3);
+			stateVector[0] = null;
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		}
 	}
 	private void reactState4() {
 		if (occuredEvents.contains(interfaceThird.getEventEvent5())) {
-			activeStates.remove(State.State4);
+			stateVector[0] = null;
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		}
 	}
 	public void runCycle() {
 		outEvents.clear();
-		for (State state : activeStates) {
-			switch (state) {
-				case State1 :
-					reactState1();
-					break;
-				case State2 :
-					reactState2();
-					break;
-				case State3 :
-					reactState3();
-					break;
-				case State4 :
-					reactState4();
-					break;
-				default :
-					// no state found
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+			if (stateVector[nextStateIndex] != null) {
+				switch (stateVector[nextStateIndex]) {
+					case State1 :
+						reactState1();
+						break;
+					case State2 :
+						reactState2();
+						break;
+					case State3 :
+						reactState3();
+						break;
+					case State4 :
+						reactState4();
+						break;
+					default :
+						// no state found
+				}
 			}
 		}
 		occuredEvents.clear();

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceTestEventBasedStatemachine.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.interfacetest;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceThird.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.interfacetest;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceThirdImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.interfacetest;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/DefaultInterface.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_deephistory;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/DefaultInterfaceImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_deephistory;
 

+ 165 - 141
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/Test_DeepHistoryCycleBasedStatemachine.java

@@ -1,20 +1,18 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_deephistory;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.EnumSet;
 import java.util.HashSet;
-import java.util.Set;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.IStatemachine;
 
@@ -26,7 +24,9 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 
 	private DefaultInterfaceImpl defaultInterface;
 
-	private final Set<State> activeStates = EnumSet.noneOf(State.class);
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
 
 	private final ArrayList<Event<? extends Enum<?>>> occuredEvents;
 
@@ -55,8 +55,13 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 
 	}
 
-	public Set<State> getActiveStates() {
-		return EnumSet.copyOf(activeStates);
+	public boolean isStateActive(State state) {
+		for (int i = 0; i < stateVector.length; i++) {
+			if (stateVector[i] == state) {
+				return true;
+			}
+		}
+		return false;
 	}
 
 	public DefaultInterface getDefaultInterface() {
@@ -64,15 +69,17 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 	}
 
 	public void enter() {
-		activeStates.add(State.State1);
+		nextStateIndex = 0;
+		stateVector[0] = State.State1;
 
 	}
 
 	private void reactState1() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent1())) {
-			activeStates.remove(State.State1);
+			stateVector[0] = null;
 
-			activeStates.add(State.State3);
+			nextStateIndex = 0;
+			stateVector[0] = State.State3;
 
 		}
 	}
@@ -80,30 +87,32 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 	}
 	private void reactState3() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent2())) {
-			if (activeStates.contains(State.State3)) {
-				activeStates.remove(State.State3);
+			if (isStateActive(State.State3)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State6)) {
-				activeStates.remove(State.State6);
+			} else if (isStateActive(State.State6)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State8)) {
-				activeStates.remove(State.State8);
+			} else if (isStateActive(State.State8)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State9)) {
-				activeStates.remove(State.State9);
+			} else if (isStateActive(State.State9)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State5)) {
-				activeStates.remove(State.State5);
+			} else if (isStateActive(State.State5)) {
+				stateVector[0] = null;
 
 			}
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventEvent3())) {
-				activeStates.remove(State.State3);
+				stateVector[0] = null;
 
-				activeStates.add(State.State6);
+				nextStateIndex = 0;
+				stateVector[0] = State.State6;
 
 			}
 
@@ -113,45 +122,48 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 	}
 	private void reactState6() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent2())) {
-			if (activeStates.contains(State.State3)) {
-				activeStates.remove(State.State3);
+			if (isStateActive(State.State3)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State6)) {
-				activeStates.remove(State.State6);
+			} else if (isStateActive(State.State6)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State8)) {
-				activeStates.remove(State.State8);
+			} else if (isStateActive(State.State8)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State9)) {
-				activeStates.remove(State.State9);
+			} else if (isStateActive(State.State9)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State5)) {
-				activeStates.remove(State.State5);
+			} else if (isStateActive(State.State5)) {
+				stateVector[0] = null;
 
 			}
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventEvent4())) {
-				if (activeStates.contains(State.State6)) {
-					activeStates.remove(State.State6);
+				if (isStateActive(State.State6)) {
+					stateVector[0] = null;
 
-				} else if (activeStates.contains(State.State8)) {
-					activeStates.remove(State.State8);
+				} else if (isStateActive(State.State8)) {
+					stateVector[0] = null;
 
-				} else if (activeStates.contains(State.State9)) {
-					activeStates.remove(State.State9);
+				} else if (isStateActive(State.State9)) {
+					stateVector[0] = null;
 
 				}
 
-				activeStates.add(State.State5);
+				nextStateIndex = 0;
+				stateVector[0] = State.State5;
 
 			} else {
 				if (occuredEvents.contains(defaultInterface.getEventEvent5())) {
-					activeStates.remove(State.State6);
+					stateVector[0] = null;
 
-					activeStates.add(State.State8);
+					nextStateIndex = 0;
+					stateVector[0] = State.State8;
 
 				}
 
@@ -163,58 +175,62 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 	}
 	private void reactState8() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent2())) {
-			if (activeStates.contains(State.State3)) {
-				activeStates.remove(State.State3);
+			if (isStateActive(State.State3)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State6)) {
-				activeStates.remove(State.State6);
+			} else if (isStateActive(State.State6)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State8)) {
-				activeStates.remove(State.State8);
+			} else if (isStateActive(State.State8)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State9)) {
-				activeStates.remove(State.State9);
+			} else if (isStateActive(State.State9)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State5)) {
-				activeStates.remove(State.State5);
+			} else if (isStateActive(State.State5)) {
+				stateVector[0] = null;
 
 			}
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventEvent4())) {
-				if (activeStates.contains(State.State6)) {
-					activeStates.remove(State.State6);
+				if (isStateActive(State.State6)) {
+					stateVector[0] = null;
 
-				} else if (activeStates.contains(State.State8)) {
-					activeStates.remove(State.State8);
+				} else if (isStateActive(State.State8)) {
+					stateVector[0] = null;
 
-				} else if (activeStates.contains(State.State9)) {
-					activeStates.remove(State.State9);
+				} else if (isStateActive(State.State9)) {
+					stateVector[0] = null;
 
 				}
 
-				activeStates.add(State.State5);
+				nextStateIndex = 0;
+				stateVector[0] = State.State5;
 
 			} else {
 				if (occuredEvents.contains(defaultInterface.getEventEvent6())) {
-					if (activeStates.contains(State.State8)) {
-						activeStates.remove(State.State8);
+					if (isStateActive(State.State8)) {
+						stateVector[0] = null;
 
-					} else if (activeStates.contains(State.State9)) {
-						activeStates.remove(State.State9);
+					} else if (isStateActive(State.State9)) {
+						stateVector[0] = null;
 
 					}
 
-					activeStates.add(State.State6);
+					nextStateIndex = 0;
+					stateVector[0] = State.State6;
 
 				} else {
 					if (occuredEvents.contains(defaultInterface
 							.getEventEvent7())) {
-						activeStates.remove(State.State8);
+						stateVector[0] = null;
 
-						activeStates.add(State.State9);
+						nextStateIndex = 0;
+						stateVector[0] = State.State9;
 
 					}
 
@@ -226,58 +242,62 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 	}
 	private void reactState9() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent2())) {
-			if (activeStates.contains(State.State3)) {
-				activeStates.remove(State.State3);
+			if (isStateActive(State.State3)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State6)) {
-				activeStates.remove(State.State6);
+			} else if (isStateActive(State.State6)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State8)) {
-				activeStates.remove(State.State8);
+			} else if (isStateActive(State.State8)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State9)) {
-				activeStates.remove(State.State9);
+			} else if (isStateActive(State.State9)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State5)) {
-				activeStates.remove(State.State5);
+			} else if (isStateActive(State.State5)) {
+				stateVector[0] = null;
 
 			}
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventEvent4())) {
-				if (activeStates.contains(State.State6)) {
-					activeStates.remove(State.State6);
+				if (isStateActive(State.State6)) {
+					stateVector[0] = null;
 
-				} else if (activeStates.contains(State.State8)) {
-					activeStates.remove(State.State8);
+				} else if (isStateActive(State.State8)) {
+					stateVector[0] = null;
 
-				} else if (activeStates.contains(State.State9)) {
-					activeStates.remove(State.State9);
+				} else if (isStateActive(State.State9)) {
+					stateVector[0] = null;
 
 				}
 
-				activeStates.add(State.State5);
+				nextStateIndex = 0;
+				stateVector[0] = State.State5;
 
 			} else {
 				if (occuredEvents.contains(defaultInterface.getEventEvent6())) {
-					if (activeStates.contains(State.State8)) {
-						activeStates.remove(State.State8);
+					if (isStateActive(State.State8)) {
+						stateVector[0] = null;
 
-					} else if (activeStates.contains(State.State9)) {
-						activeStates.remove(State.State9);
+					} else if (isStateActive(State.State9)) {
+						stateVector[0] = null;
 
 					}
 
-					activeStates.add(State.State6);
+					nextStateIndex = 0;
+					stateVector[0] = State.State6;
 
 				} else {
 					if (occuredEvents.contains(defaultInterface
 							.getEventEvent8())) {
-						activeStates.remove(State.State9);
+						stateVector[0] = null;
 
-						activeStates.add(State.State8);
+						nextStateIndex = 0;
+						stateVector[0] = State.State8;
 
 					}
 
@@ -289,24 +309,25 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 	}
 	private void reactState5() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent2())) {
-			if (activeStates.contains(State.State3)) {
-				activeStates.remove(State.State3);
+			if (isStateActive(State.State3)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State6)) {
-				activeStates.remove(State.State6);
+			} else if (isStateActive(State.State6)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State8)) {
-				activeStates.remove(State.State8);
+			} else if (isStateActive(State.State8)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State9)) {
-				activeStates.remove(State.State9);
+			} else if (isStateActive(State.State9)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State5)) {
-				activeStates.remove(State.State5);
+			} else if (isStateActive(State.State5)) {
+				stateVector[0] = null;
 
 			}
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		} else {
 
@@ -314,37 +335,40 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 	}
 	public void runCycle() {
 		outEvents.clear();
-		for (State state : activeStates) {
-			switch (state) {
-				case State1 :
-					reactState1();
-					break;
-				case State2 :
-					reactState2();
-					break;
-				case State3 :
-					reactState3();
-					break;
-				case State4 :
-					reactState4();
-					break;
-				case State6 :
-					reactState6();
-					break;
-				case State7 :
-					reactState7();
-					break;
-				case State8 :
-					reactState8();
-					break;
-				case State9 :
-					reactState9();
-					break;
-				case State5 :
-					reactState5();
-					break;
-				default :
-					// no state found
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+			if (stateVector[nextStateIndex] != null) {
+				switch (stateVector[nextStateIndex]) {
+					case State1 :
+						reactState1();
+						break;
+					case State2 :
+						reactState2();
+						break;
+					case State3 :
+						reactState3();
+						break;
+					case State4 :
+						reactState4();
+						break;
+					case State6 :
+						reactState6();
+						break;
+					case State7 :
+						reactState7();
+						break;
+					case State8 :
+						reactState8();
+						break;
+					case State9 :
+						reactState9();
+						break;
+					case State5 :
+						reactState5();
+						break;
+					default :
+						// no state found
+				}
 			}
 		}
 		occuredEvents.clear();

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/Test_DeepHistoryEventBasedStatemachine.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_deephistory;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/DefaultInterface.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_expression;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/DefaultInterfaceImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_expression;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/InterfaceOther.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_expression;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/InterfaceOtherImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_expression;
 

+ 40 - 28
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/Test_ExpressionCycleBasedStatemachine.java

@@ -1,20 +1,18 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_expression;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.EnumSet;
 import java.util.HashSet;
-import java.util.Set;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.IStatemachine;
 
@@ -27,7 +25,9 @@ public class Test_ExpressionCycleBasedStatemachine implements IStatemachine {
 	private DefaultInterfaceImpl defaultInterface;
 	private InterfaceOtherImpl interfaceOther;
 
-	private final Set<State> activeStates = EnumSet.noneOf(State.class);
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
 
 	private final ArrayList<Event<? extends Enum<?>>> occuredEvents;
 
@@ -57,8 +57,13 @@ public class Test_ExpressionCycleBasedStatemachine implements IStatemachine {
 
 	}
 
-	public Set<State> getActiveStates() {
-		return EnumSet.copyOf(activeStates);
+	public boolean isStateActive(State state) {
+		for (int i = 0; i < stateVector.length; i++) {
+			if (stateVector[i] == state) {
+				return true;
+			}
+		}
+		return false;
 	}
 
 	public DefaultInterface getDefaultInterface() {
@@ -74,14 +79,16 @@ public class Test_ExpressionCycleBasedStatemachine implements IStatemachine {
 				+ ((defaultInterface.getVarVar2() * defaultInterface
 						.getVarVar3())));
 
-		activeStates.add(State.State1);
+		nextStateIndex = 0;
+		stateVector[0] = State.State1;
 
 	}
 
 	private void reactState1() {
 		if ((occuredEvents.contains(defaultInterface.getEventEvent1()) && ((interfaceOther
 				.getVarVar1() == true) || (defaultInterface.getVarVar5() == false)))) {
-			activeStates.remove(State.State1);
+			stateVector[0] = null;
+
 			defaultInterface.setVarVar2(1);
 
 			defaultInterface.setVarVar4(22.3);
@@ -92,14 +99,15 @@ public class Test_ExpressionCycleBasedStatemachine implements IStatemachine {
 
 			defaultInterface.setVarVar1(defaultInterface.getVarVar1() + (1));
 
-			activeStates.add(State.State2);
+			nextStateIndex = 0;
+			stateVector[0] = State.State2;
 
 		}
 	}
 	private void reactState2() {
 		if ((occuredEvents.contains(defaultInterface.getEventEvent1()) && (defaultInterface
 				.getVarVar3() > 0))) {
-			activeStates.remove(State.State2);
+			stateVector[0] = null;
 
 			defaultInterface.setVarVar5(true);
 
@@ -107,7 +115,8 @@ public class Test_ExpressionCycleBasedStatemachine implements IStatemachine {
 					+ ((defaultInterface.getVarVar2() * defaultInterface
 							.getVarVar3())));
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		} else {
 			if (true) {
@@ -120,16 +129,19 @@ public class Test_ExpressionCycleBasedStatemachine implements IStatemachine {
 	}
 	public void runCycle() {
 		outEvents.clear();
-		for (State state : activeStates) {
-			switch (state) {
-				case State1 :
-					reactState1();
-					break;
-				case State2 :
-					reactState2();
-					break;
-				default :
-					// no state found
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+			if (stateVector[nextStateIndex] != null) {
+				switch (stateVector[nextStateIndex]) {
+					case State1 :
+						reactState1();
+						break;
+					case State2 :
+						reactState2();
+						break;
+					default :
+						// no state found
+				}
 			}
 		}
 		occuredEvents.clear();

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/Test_ExpressionEventBasedStatemachine.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_expression;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/DefaultInterface.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_hierarchy;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/DefaultInterfaceImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_hierarchy;
 

+ 226 - 149
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/Test_HierarchyCycleBasedStatemachine.java

@@ -1,20 +1,18 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_hierarchy;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.EnumSet;
 import java.util.HashSet;
-import java.util.Set;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.IStatemachine;
 
@@ -26,7 +24,9 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 
 	private DefaultInterfaceImpl defaultInterface;
 
-	private final Set<State> activeStates = EnumSet.noneOf(State.class);
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
 
 	private final ArrayList<Event<? extends Enum<?>>> occuredEvents;
 
@@ -55,8 +55,13 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 
 	}
 
-	public Set<State> getActiveStates() {
-		return EnumSet.copyOf(activeStates);
+	public boolean isStateActive(State state) {
+		for (int i = 0; i < stateVector.length; i++) {
+			if (stateVector[i] == state) {
+				return true;
+			}
+		}
+		return false;
 	}
 
 	public DefaultInterface getDefaultInterface() {
@@ -68,7 +73,8 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 
 		defaultInterface.setVarS1(defaultInterface.getVarS1() + (1));
 
-		activeStates.add(State.State9);
+		nextStateIndex = 0;
+		stateVector[0] = State.State9;
 
 	}
 
@@ -76,12 +82,14 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 	}
 	private void reactState9() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent1())) {
-			if (activeStates.contains(State.State9)) {
-				activeStates.remove(State.State9);
+			if (isStateActive(State.State9)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS1(defaultInterface.getVarS1() - (1));
 
-			} else if (activeStates.contains(State.State10)) {
-				activeStates.remove(State.State10);
+			} else if (isStateActive(State.State10)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS1(defaultInterface.getVarS1() - (1));
 
 			}
@@ -91,16 +99,19 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 
 			defaultInterface.setVarS2(defaultInterface.getVarS2() + (1));
 
-			activeStates.add(State.State3);
+			nextStateIndex = 0;
+			stateVector[0] = State.State3;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventEvent9())) {
-				activeStates.remove(State.State9);
+				stateVector[0] = null;
+
 				defaultInterface.setVarS1(defaultInterface.getVarS1() - (1));
 
 				defaultInterface.setVarS1(defaultInterface.getVarS1() + (1));
 
-				activeStates.add(State.State10);
+				nextStateIndex = 0;
+				stateVector[0] = State.State10;
 
 			}
 
@@ -108,12 +119,14 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 	}
 	private void reactState10() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent1())) {
-			if (activeStates.contains(State.State9)) {
-				activeStates.remove(State.State9);
+			if (isStateActive(State.State9)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS1(defaultInterface.getVarS1() - (1));
 
-			} else if (activeStates.contains(State.State10)) {
-				activeStates.remove(State.State10);
+			} else if (isStateActive(State.State10)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS1(defaultInterface.getVarS1() - (1));
 
 			}
@@ -123,16 +136,19 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 
 			defaultInterface.setVarS2(defaultInterface.getVarS2() + (1));
 
-			activeStates.add(State.State3);
+			nextStateIndex = 0;
+			stateVector[0] = State.State3;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventEvent10())) {
-				activeStates.remove(State.State10);
+				stateVector[0] = null;
+
 				defaultInterface.setVarS1(defaultInterface.getVarS1() - (1));
 
 				defaultInterface.setVarS1(defaultInterface.getVarS1() + (1));
 
-				activeStates.add(State.State9);
+				nextStateIndex = 0;
+				stateVector[0] = State.State9;
 
 			}
 
@@ -142,26 +158,30 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 	}
 	private void reactState3() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent6())) {
-			if (activeStates.contains(State.State3)) {
-				activeStates.remove(State.State3);
+			if (isStateActive(State.State3)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
-			} else if (activeStates.contains(State.State5)) {
-				activeStates.remove(State.State5);
+			} else if (isStateActive(State.State5)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
-			} else if (activeStates.contains(State.State7)) {
-				activeStates.remove(State.State7);
+			} else if (isStateActive(State.State7)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
-			} else if (activeStates.contains(State.State8)) {
-				activeStates.remove(State.State8);
+			} else if (isStateActive(State.State8)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
@@ -175,22 +195,26 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 
 			defaultInterface.setVarS1(defaultInterface.getVarS1() + (1));
 
-			activeStates.add(State.State9);
+			nextStateIndex = 0;
+			stateVector[0] = State.State9;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventEvent2())) {
-				activeStates.remove(State.State3);
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() + (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() + (1));
 
-				activeStates.add(State.State5);
+				nextStateIndex = 0;
+				stateVector[0] = State.State5;
 
 			} else {
 				if (occuredEvents.contains(defaultInterface.getEventEvent11())) {
-					activeStates.remove(State.State3);
+					stateVector[0] = null;
+
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() - (1));
 
@@ -202,12 +226,14 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 					defaultInterface
 							.setVarS1(defaultInterface.getVarS1() + (1));
 
-					activeStates.add(State.State9);
+					nextStateIndex = 0;
+					stateVector[0] = State.State9;
 
 				} else {
 					if (occuredEvents.contains(defaultInterface
 							.getEventEvent14())) {
-						activeStates.remove(State.State3);
+						stateVector[0] = null;
+
 						defaultInterface
 								.setVarS2(defaultInterface.getVarS2() - (1));
 
@@ -219,7 +245,8 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 						defaultInterface
 								.setVarS1(defaultInterface.getVarS1() + (1));
 
-						activeStates.add(State.State9);
+						nextStateIndex = 0;
+						stateVector[0] = State.State9;
 
 					}
 				}
@@ -231,26 +258,30 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 	}
 	private void reactState5() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent6())) {
-			if (activeStates.contains(State.State3)) {
-				activeStates.remove(State.State3);
+			if (isStateActive(State.State3)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
-			} else if (activeStates.contains(State.State5)) {
-				activeStates.remove(State.State5);
+			} else if (isStateActive(State.State5)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
-			} else if (activeStates.contains(State.State7)) {
-				activeStates.remove(State.State7);
+			} else if (isStateActive(State.State7)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
-			} else if (activeStates.contains(State.State8)) {
-				activeStates.remove(State.State8);
+			} else if (isStateActive(State.State8)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
@@ -264,25 +295,29 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 
 			defaultInterface.setVarS1(defaultInterface.getVarS1() + (1));
 
-			activeStates.add(State.State9);
+			nextStateIndex = 0;
+			stateVector[0] = State.State9;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventEvent7())) {
-				if (activeStates.contains(State.State5)) {
-					activeStates.remove(State.State5);
+				if (isStateActive(State.State5)) {
+					stateVector[0] = null;
+
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() - (1));
 
-				} else if (activeStates.contains(State.State7)) {
-					activeStates.remove(State.State7);
+				} else if (isStateActive(State.State7)) {
+					stateVector[0] = null;
+
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() - (1));
 
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() - (1));
 
-				} else if (activeStates.contains(State.State8)) {
-					activeStates.remove(State.State8);
+				} else if (isStateActive(State.State8)) {
+					stateVector[0] = null;
+
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() - (1));
 
@@ -294,11 +329,13 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() + (1));
 
-				activeStates.add(State.State3);
+				nextStateIndex = 0;
+				stateVector[0] = State.State3;
 
 			} else {
 				if (occuredEvents.contains(defaultInterface.getEventEvent3())) {
-					activeStates.remove(State.State5);
+					stateVector[0] = null;
+
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() - (1));
 
@@ -308,12 +345,14 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() + (1));
 
-					activeStates.add(State.State7);
+					nextStateIndex = 0;
+					stateVector[0] = State.State7;
 
 				} else {
 					if (occuredEvents.contains(defaultInterface
 							.getEventEvent12())) {
-						activeStates.remove(State.State5);
+						stateVector[0] = null;
+
 						defaultInterface
 								.setVarS2(defaultInterface.getVarS2() - (1));
 
@@ -328,12 +367,14 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 						defaultInterface
 								.setVarS1(defaultInterface.getVarS1() + (1));
 
-						activeStates.add(State.State9);
+						nextStateIndex = 0;
+						stateVector[0] = State.State9;
 
 					} else {
 						if (occuredEvents.contains(defaultInterface
 								.getEventEvent15())) {
-							activeStates.remove(State.State5);
+							stateVector[0] = null;
+
 							defaultInterface.setVarS2(defaultInterface
 									.getVarS2() - (1));
 
@@ -348,7 +389,8 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 							defaultInterface.setVarS1(defaultInterface
 									.getVarS1() + (1));
 
-							activeStates.add(State.State10);
+							nextStateIndex = 0;
+							stateVector[0] = State.State10;
 
 						}
 					}
@@ -362,26 +404,30 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 	}
 	private void reactState7() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent6())) {
-			if (activeStates.contains(State.State3)) {
-				activeStates.remove(State.State3);
+			if (isStateActive(State.State3)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
-			} else if (activeStates.contains(State.State5)) {
-				activeStates.remove(State.State5);
+			} else if (isStateActive(State.State5)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
-			} else if (activeStates.contains(State.State7)) {
-				activeStates.remove(State.State7);
+			} else if (isStateActive(State.State7)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
-			} else if (activeStates.contains(State.State8)) {
-				activeStates.remove(State.State8);
+			} else if (isStateActive(State.State8)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
@@ -395,25 +441,29 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 
 			defaultInterface.setVarS1(defaultInterface.getVarS1() + (1));
 
-			activeStates.add(State.State9);
+			nextStateIndex = 0;
+			stateVector[0] = State.State9;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventEvent7())) {
-				if (activeStates.contains(State.State5)) {
-					activeStates.remove(State.State5);
+				if (isStateActive(State.State5)) {
+					stateVector[0] = null;
+
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() - (1));
 
-				} else if (activeStates.contains(State.State7)) {
-					activeStates.remove(State.State7);
+				} else if (isStateActive(State.State7)) {
+					stateVector[0] = null;
+
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() - (1));
 
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() - (1));
 
-				} else if (activeStates.contains(State.State8)) {
-					activeStates.remove(State.State8);
+				} else if (isStateActive(State.State8)) {
+					stateVector[0] = null;
+
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() - (1));
 
@@ -425,17 +475,20 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() + (1));
 
-				activeStates.add(State.State3);
+				nextStateIndex = 0;
+				stateVector[0] = State.State3;
 
 			} else {
 				if (occuredEvents.contains(defaultInterface.getEventEvent8())) {
-					if (activeStates.contains(State.State7)) {
-						activeStates.remove(State.State7);
+					if (isStateActive(State.State7)) {
+						stateVector[0] = null;
+
 						defaultInterface
 								.setVarS2(defaultInterface.getVarS2() - (1));
 
-					} else if (activeStates.contains(State.State8)) {
-						activeStates.remove(State.State8);
+					} else if (isStateActive(State.State8)) {
+						stateVector[0] = null;
+
 						defaultInterface
 								.setVarS2(defaultInterface.getVarS2() - (1));
 
@@ -446,19 +499,22 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() + (1));
 
-					activeStates.add(State.State5);
+					nextStateIndex = 0;
+					stateVector[0] = State.State5;
 
 				} else {
 					if (occuredEvents.contains(defaultInterface
 							.getEventEvent4())) {
-						activeStates.remove(State.State7);
+						stateVector[0] = null;
+
 						defaultInterface
 								.setVarS2(defaultInterface.getVarS2() - (1));
 
 						defaultInterface
 								.setVarS2(defaultInterface.getVarS2() + (1));
 
-						activeStates.add(State.State8);
+						nextStateIndex = 0;
+						stateVector[0] = State.State8;
 
 					}
 
@@ -470,26 +526,30 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 	}
 	private void reactState8() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent6())) {
-			if (activeStates.contains(State.State3)) {
-				activeStates.remove(State.State3);
+			if (isStateActive(State.State3)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
-			} else if (activeStates.contains(State.State5)) {
-				activeStates.remove(State.State5);
+			} else if (isStateActive(State.State5)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
-			} else if (activeStates.contains(State.State7)) {
-				activeStates.remove(State.State7);
+			} else if (isStateActive(State.State7)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
-			} else if (activeStates.contains(State.State8)) {
-				activeStates.remove(State.State8);
+			} else if (isStateActive(State.State8)) {
+				stateVector[0] = null;
+
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() - (1));
@@ -503,25 +563,29 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 
 			defaultInterface.setVarS1(defaultInterface.getVarS1() + (1));
 
-			activeStates.add(State.State9);
+			nextStateIndex = 0;
+			stateVector[0] = State.State9;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventEvent7())) {
-				if (activeStates.contains(State.State5)) {
-					activeStates.remove(State.State5);
+				if (isStateActive(State.State5)) {
+					stateVector[0] = null;
+
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() - (1));
 
-				} else if (activeStates.contains(State.State7)) {
-					activeStates.remove(State.State7);
+				} else if (isStateActive(State.State7)) {
+					stateVector[0] = null;
+
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() - (1));
 
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() - (1));
 
-				} else if (activeStates.contains(State.State8)) {
-					activeStates.remove(State.State8);
+				} else if (isStateActive(State.State8)) {
+					stateVector[0] = null;
+
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() - (1));
 
@@ -533,17 +597,20 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 
 				defaultInterface.setVarS2(defaultInterface.getVarS2() + (1));
 
-				activeStates.add(State.State3);
+				nextStateIndex = 0;
+				stateVector[0] = State.State3;
 
 			} else {
 				if (occuredEvents.contains(defaultInterface.getEventEvent8())) {
-					if (activeStates.contains(State.State7)) {
-						activeStates.remove(State.State7);
+					if (isStateActive(State.State7)) {
+						stateVector[0] = null;
+
 						defaultInterface
 								.setVarS2(defaultInterface.getVarS2() - (1));
 
-					} else if (activeStates.contains(State.State8)) {
-						activeStates.remove(State.State8);
+					} else if (isStateActive(State.State8)) {
+						stateVector[0] = null;
+
 						defaultInterface
 								.setVarS2(defaultInterface.getVarS2() - (1));
 
@@ -554,24 +621,28 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 					defaultInterface
 							.setVarS2(defaultInterface.getVarS2() + (1));
 
-					activeStates.add(State.State5);
+					nextStateIndex = 0;
+					stateVector[0] = State.State5;
 
 				} else {
 					if (occuredEvents.contains(defaultInterface
 							.getEventEvent5())) {
-						activeStates.remove(State.State8);
+						stateVector[0] = null;
+
 						defaultInterface
 								.setVarS2(defaultInterface.getVarS2() - (1));
 
 						defaultInterface
 								.setVarS2(defaultInterface.getVarS2() + (1));
 
-						activeStates.add(State.State7);
+						nextStateIndex = 0;
+						stateVector[0] = State.State7;
 
 					} else {
 						if (occuredEvents.contains(defaultInterface
 								.getEventEvent13())) {
-							activeStates.remove(State.State8);
+							stateVector[0] = null;
+
 							defaultInterface.setVarS2(defaultInterface
 									.getVarS2() - (1));
 
@@ -589,12 +660,14 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 							defaultInterface.setVarS1(defaultInterface
 									.getVarS1() + (1));
 
-							activeStates.add(State.State9);
+							nextStateIndex = 0;
+							stateVector[0] = State.State9;
 
 						} else {
 							if (occuredEvents.contains(defaultInterface
 									.getEventEvent16())) {
-								activeStates.remove(State.State8);
+								stateVector[0] = null;
+
 								defaultInterface.setVarS2(defaultInterface
 										.getVarS2() - (1));
 
@@ -612,7 +685,8 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 								defaultInterface.setVarS1(defaultInterface
 										.getVarS1() + (1));
 
-								activeStates.add(State.State10);
+								nextStateIndex = 0;
+								stateVector[0] = State.State10;
 
 							}
 						}
@@ -626,40 +700,43 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 	}
 	public void runCycle() {
 		outEvents.clear();
-		for (State state : activeStates) {
-			switch (state) {
-				case State1 :
-					reactState1();
-					break;
-				case State9 :
-					reactState9();
-					break;
-				case State10 :
-					reactState10();
-					break;
-				case State2 :
-					reactState2();
-					break;
-				case State3 :
-					reactState3();
-					break;
-				case State4 :
-					reactState4();
-					break;
-				case State5 :
-					reactState5();
-					break;
-				case State6 :
-					reactState6();
-					break;
-				case State7 :
-					reactState7();
-					break;
-				case State8 :
-					reactState8();
-					break;
-				default :
-					// no state found
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+			if (stateVector[nextStateIndex] != null) {
+				switch (stateVector[nextStateIndex]) {
+					case State1 :
+						reactState1();
+						break;
+					case State9 :
+						reactState9();
+						break;
+					case State10 :
+						reactState10();
+						break;
+					case State2 :
+						reactState2();
+						break;
+					case State3 :
+						reactState3();
+						break;
+					case State4 :
+						reactState4();
+						break;
+					case State5 :
+						reactState5();
+						break;
+					case State6 :
+						reactState6();
+						break;
+					case State7 :
+						reactState7();
+						break;
+					case State8 :
+						reactState8();
+						break;
+					default :
+						// no state found
+				}
 			}
 		}
 		occuredEvents.clear();

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/Test_HierarchyEventBasedStatemachine.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_hierarchy;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/DefaultInterface.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_localactions;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/DefaultInterfaceImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_localactions;
 

+ 43 - 30
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/Test_LocalActionsCycleBasedStatemachine.java

@@ -1,20 +1,18 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_localactions;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.EnumSet;
 import java.util.HashSet;
-import java.util.Set;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.TimeEvent;
 import org.yakindu.sct.runtime.java.ITimedStatemachine;
@@ -41,7 +39,9 @@ public class Test_LocalActionsCycleBasedStatemachine
 
 	private DefaultInterfaceImpl defaultInterface;
 
-	private final Set<State> activeStates = EnumSet.noneOf(State.class);
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
 
 	private final ArrayList<Event<? extends Enum<?>>> occuredEvents;
 
@@ -76,6 +76,15 @@ public class Test_LocalActionsCycleBasedStatemachine
 
 	}
 
+	public boolean isStateActive(State state) {
+		for (int i = 0; i < stateVector.length; i++) {
+			if (stateVector[i] == state) {
+				return true;
+			}
+		}
+		return false;
+	}
+
 	public void setTimerService(ITimerService timerService) {
 		this.timerService = timerService;
 	}
@@ -95,10 +104,6 @@ public class Test_LocalActionsCycleBasedStatemachine
 		}
 	}
 
-	public Set<State> getActiveStates() {
-		return EnumSet.copyOf(activeStates);
-	}
-
 	public DefaultInterface getDefaultInterface() {
 		return defaultInterface;
 	}
@@ -108,13 +113,15 @@ public class Test_LocalActionsCycleBasedStatemachine
 		getTimerService().setTimer(State1_time_event_0, 100, cycleStartTime);
 		defaultInterface.setVarI(1);
 
-		activeStates.add(State.State1);
+		nextStateIndex = 0;
+		stateVector[0] = State.State1;
 
 	}
 
 	private void reactState1() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent1())) {
-			activeStates.remove(State.State1);
+			stateVector[0] = null;
+
 			getTimerService().resetTimer(State1_time_event_0);
 			defaultInterface.setVarI(0);
 
@@ -122,7 +129,8 @@ public class Test_LocalActionsCycleBasedStatemachine
 					.setTimer(State2_time_event_0, 200, cycleStartTime);
 			defaultInterface.setVarJ(1);
 
-			activeStates.add(State.State2);
+			nextStateIndex = 0;
+			stateVector[0] = State.State2;
 
 		} else {
 			if (true) {
@@ -142,7 +150,8 @@ public class Test_LocalActionsCycleBasedStatemachine
 	}
 	private void reactState2() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent3())) {
-			activeStates.remove(State.State2);
+			stateVector[0] = null;
+
 			getTimerService().resetTimer(State2_time_event_0);
 			defaultInterface.setVarJ(0);
 
@@ -150,7 +159,8 @@ public class Test_LocalActionsCycleBasedStatemachine
 					.setTimer(State1_time_event_0, 100, cycleStartTime);
 			defaultInterface.setVarI(1);
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		} else {
 			if ((occuredEvents.contains(defaultInterface.getEventEvent2()) || occuredEvents
@@ -168,16 +178,19 @@ public class Test_LocalActionsCycleBasedStatemachine
 	public void runCycle() {
 		cycleStartTime = System.currentTimeMillis();
 		outEvents.clear();
-		for (State state : activeStates) {
-			switch (state) {
-				case State1 :
-					reactState1();
-					break;
-				case State2 :
-					reactState2();
-					break;
-				default :
-					// no state found
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+			if (stateVector[nextStateIndex] != null) {
+				switch (stateVector[nextStateIndex]) {
+					case State1 :
+						reactState1();
+						break;
+					case State2 :
+						reactState2();
+						break;
+					default :
+						// no state found
+				}
 			}
 		}
 		occuredEvents.clear();

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/Test_LocalActionsEventBasedStatemachine.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_localactions;
 

+ 10 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/DefaultInterface.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_parallelregions;
 
@@ -28,4 +28,6 @@ public interface DefaultInterface {
 
 	public void raiseEvent6();
 
+	public boolean getVarBla();
+	public void setVarBla(boolean value);
 }

+ 17 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/DefaultInterfaceImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_parallelregions;
 
@@ -76,4 +76,13 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 		return EventEvent6;
 	}
 
+	private boolean varBla;
+
+	public boolean getVarBla() {
+		return varBla;
+	}
+
+	public void setVarBla(boolean value) {
+		varBla = value;
+	}
 }

+ 215 - 73
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/Test_ParallelRegionsCycleBasedStatemachine.java

@@ -1,20 +1,18 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_parallelregions;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.EnumSet;
 import java.util.HashSet;
-import java.util.Set;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.IStatemachine;
 
@@ -28,7 +26,9 @@ public class Test_ParallelRegionsCycleBasedStatemachine
 
 	private DefaultInterfaceImpl defaultInterface;
 
-	private final Set<State> activeStates = EnumSet.noneOf(State.class);
+	private final State[] stateVector = new State[3];
+
+	private int nextStateIndex;
 
 	private final ArrayList<Event<? extends Enum<?>>> occuredEvents;
 
@@ -57,8 +57,13 @@ public class Test_ParallelRegionsCycleBasedStatemachine
 
 	}
 
-	public Set<State> getActiveStates() {
-		return EnumSet.copyOf(activeStates);
+	public boolean isStateActive(State state) {
+		for (int i = 0; i < stateVector.length; i++) {
+			if (stateVector[i] == state) {
+				return true;
+			}
+		}
+		return false;
 	}
 
 	public DefaultInterface getDefaultInterface() {
@@ -66,50 +71,189 @@ public class Test_ParallelRegionsCycleBasedStatemachine
 	}
 
 	public void enter() {
-		activeStates.add(State.State1);
 
+		enterSequenceState1();
 	}
 
-	private void reactState1() {
-		if (occuredEvents.contains(defaultInterface.getEventEvent1())) {
-			activeStates.remove(State.State1);
+	private boolean conditionState1Tr0() {
+		return occuredEvents.contains(defaultInterface.getEventEvent1());
+	}
+	private boolean conditionState3Tr0() {
+		return occuredEvents.contains(defaultInterface.getEventEvent2());
+	}
+	private boolean conditionState5Tr0() {
+		return occuredEvents.contains(defaultInterface.getEventEvent3());
+	}
+	private boolean conditionState6Tr0() {
+		return occuredEvents.contains(defaultInterface.getEventEvent4());
+	}
+	private boolean conditionState7Tr0() {
+		return (occuredEvents.contains(defaultInterface.getEventEvent5()) || occuredEvents
+				.contains(defaultInterface.getEventEvent3()));
+	}
+	private boolean conditionState8Tr0() {
+		return occuredEvents.contains(defaultInterface.getEventEvent6());
+	}
+	private void actionsState1Tr0() {
+
+		exitSequenceState1();
+
+		enterSequenceState2();
+
+	}
+	private void actionsState3Tr0() {
+
+		exitSequenceState3();
+
+		enterSequenceState4();
+
+	}
+	private void actionsState5Tr0() {
+
+		exitSequenceState5();
+
+		enterSequenceState6();
+
+	}
+	private void actionsState6Tr0() {
+
+		exitSequenceState6();
+
+		enterSequenceState5();
+
+	}
+	private void actionsState7Tr0() {
+
+		exitSequenceState7();
+
+		enterSequenceState8();
+
+	}
+	private void actionsState8Tr0() {
+
+		exitSequenceState8();
+
+		enterSequenceState7();
+
+	}
+	private void entryActionState2() {
+		defaultInterface.setVarBla(true);
+
+	}
+
+	private void enterSequenceState1() {
+		nextStateIndex = 0;
+		stateVector[0] = State.State1;
+
+	}
+
+	private void enterSequenceState2() {
+
+		entryActionState2();
+
+		enterSequenceState3();
+
+		enterSequenceState7();
+	}
+
+	private void enterSequenceState3() {
+		nextStateIndex = 0;
+		stateVector[0] = State.State3;
+
+	}
+
+	private void enterSequenceState4() {
+
+		enterSequenceState5();
+
+		enterSequenceState9();
+	}
+
+	private void enterSequenceState5() {
+		nextStateIndex = 0;
+		stateVector[0] = State.State5;
+
+	}
 
-			activeStates.add(State.State3);
+	private void enterSequenceState6() {
+		nextStateIndex = 0;
+		stateVector[0] = State.State6;
 
-			activeStates.add(State.State7);
+	}
+
+	private void enterSequenceState9() {
+		nextStateIndex = 1;
+		stateVector[1] = State.State9;
+
+	}
+
+	private void enterSequenceState7() {
+		nextStateIndex = 2;
+		stateVector[2] = State.State7;
 
+	}
+
+	private void enterSequenceState8() {
+		nextStateIndex = 2;
+		stateVector[2] = State.State8;
+
+	}
+	private void exitSequenceState1() {
+		stateVector[0] = null;
+
+	}
+	private void exitSequenceState3() {
+		stateVector[0] = null;
+
+	}
+	private void exitSequenceState5() {
+		stateVector[0] = null;
+
+	}
+	private void exitSequenceState6() {
+		stateVector[0] = null;
+
+	}
+	private void exitSequenceState9() {
+		stateVector[1] = null;
+
+	}
+	private void exitSequenceState7() {
+		stateVector[2] = null;
+
+	}
+	private void exitSequenceState8() {
+		stateVector[2] = null;
+
+	}
+	private void reactState1() {
+		if (conditionState1Tr0()) {
+
+			actionsState1Tr0();
 		}
 	}
 	private void reactState2() {
 	}
 	private void reactState3() {
-		if (occuredEvents.contains(defaultInterface.getEventEvent2())) {
-			activeStates.remove(State.State3);
-
-			activeStates.add(State.State5);
-
-			activeStates.add(State.State9);
+		if (conditionState3Tr0()) {
 
+			actionsState3Tr0();
 		}
 
 	}
 	private void reactState4() {
 	}
 	private void reactState5() {
-		if (occuredEvents.contains(defaultInterface.getEventEvent3())) {
-			activeStates.remove(State.State5);
-
-			activeStates.add(State.State6);
+		if (conditionState5Tr0()) {
 
+			actionsState5Tr0();
 		}
 
 	}
 	private void reactState6() {
-		if (occuredEvents.contains(defaultInterface.getEventEvent4())) {
-			activeStates.remove(State.State6);
-
-			activeStates.add(State.State5);
+		if (conditionState6Tr0()) {
 
+			actionsState6Tr0();
 		}
 
 	}
@@ -117,57 +261,55 @@ public class Test_ParallelRegionsCycleBasedStatemachine
 
 	}
 	private void reactState7() {
-		if ((occuredEvents.contains(defaultInterface.getEventEvent5()) || occuredEvents
-				.contains(defaultInterface.getEventEvent3()))) {
-			activeStates.remove(State.State7);
-
-			activeStates.add(State.State8);
+		if (conditionState7Tr0()) {
 
+			actionsState7Tr0();
 		}
 
 	}
 	private void reactState8() {
-		if (occuredEvents.contains(defaultInterface.getEventEvent6())) {
-			activeStates.remove(State.State8);
-
-			activeStates.add(State.State7);
+		if (conditionState8Tr0()) {
 
+			actionsState8Tr0();
 		}
 
 	}
 	public void runCycle() {
 		outEvents.clear();
-		for (State state : activeStates) {
-			switch (state) {
-				case State1 :
-					reactState1();
-					break;
-				case State2 :
-					reactState2();
-					break;
-				case State3 :
-					reactState3();
-					break;
-				case State4 :
-					reactState4();
-					break;
-				case State5 :
-					reactState5();
-					break;
-				case State6 :
-					reactState6();
-					break;
-				case State9 :
-					reactState9();
-					break;
-				case State7 :
-					reactState7();
-					break;
-				case State8 :
-					reactState8();
-					break;
-				default :
-					// no state found
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+			if (stateVector[nextStateIndex] != null) {
+				switch (stateVector[nextStateIndex]) {
+					case State1 :
+						reactState1();
+						break;
+					case State2 :
+						reactState2();
+						break;
+					case State3 :
+						reactState3();
+						break;
+					case State4 :
+						reactState4();
+						break;
+					case State5 :
+						reactState5();
+						break;
+					case State6 :
+						reactState6();
+						break;
+					case State9 :
+						reactState9();
+						break;
+					case State7 :
+						reactState7();
+						break;
+					case State8 :
+						reactState8();
+						break;
+					default :
+						// no state found
+				}
 			}
 		}
 		occuredEvents.clear();

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/Test_ParallelRegionsEventBasedStatemachine.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_parallelregions;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/DefaultInterface.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_shallowhistory;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/DefaultInterfaceImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_shallowhistory;
 

+ 165 - 141
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/Test_ShallowHistoryCycleBasedStatemachine.java

@@ -1,20 +1,18 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_shallowhistory;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.EnumSet;
 import java.util.HashSet;
-import java.util.Set;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.IStatemachine;
 
@@ -26,7 +24,9 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 
 	private DefaultInterfaceImpl defaultInterface;
 
-	private final Set<State> activeStates = EnumSet.noneOf(State.class);
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
 
 	private final ArrayList<Event<? extends Enum<?>>> occuredEvents;
 
@@ -55,8 +55,13 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 
 	}
 
-	public Set<State> getActiveStates() {
-		return EnumSet.copyOf(activeStates);
+	public boolean isStateActive(State state) {
+		for (int i = 0; i < stateVector.length; i++) {
+			if (stateVector[i] == state) {
+				return true;
+			}
+		}
+		return false;
 	}
 
 	public DefaultInterface getDefaultInterface() {
@@ -64,15 +69,17 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 	}
 
 	public void enter() {
-		activeStates.add(State.State1);
+		nextStateIndex = 0;
+		stateVector[0] = State.State1;
 
 	}
 
 	private void reactState1() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent1())) {
-			activeStates.remove(State.State1);
+			stateVector[0] = null;
 
-			activeStates.add(State.State3);
+			nextStateIndex = 0;
+			stateVector[0] = State.State3;
 
 		}
 	}
@@ -80,30 +87,32 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 	}
 	private void reactState3() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent2())) {
-			if (activeStates.contains(State.State3)) {
-				activeStates.remove(State.State3);
+			if (isStateActive(State.State3)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State6)) {
-				activeStates.remove(State.State6);
+			} else if (isStateActive(State.State6)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State8)) {
-				activeStates.remove(State.State8);
+			} else if (isStateActive(State.State8)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State9)) {
-				activeStates.remove(State.State9);
+			} else if (isStateActive(State.State9)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State5)) {
-				activeStates.remove(State.State5);
+			} else if (isStateActive(State.State5)) {
+				stateVector[0] = null;
 
 			}
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventEvent3())) {
-				activeStates.remove(State.State3);
+				stateVector[0] = null;
 
-				activeStates.add(State.State6);
+				nextStateIndex = 0;
+				stateVector[0] = State.State6;
 
 			}
 
@@ -113,45 +122,48 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 	}
 	private void reactState6() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent2())) {
-			if (activeStates.contains(State.State3)) {
-				activeStates.remove(State.State3);
+			if (isStateActive(State.State3)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State6)) {
-				activeStates.remove(State.State6);
+			} else if (isStateActive(State.State6)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State8)) {
-				activeStates.remove(State.State8);
+			} else if (isStateActive(State.State8)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State9)) {
-				activeStates.remove(State.State9);
+			} else if (isStateActive(State.State9)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State5)) {
-				activeStates.remove(State.State5);
+			} else if (isStateActive(State.State5)) {
+				stateVector[0] = null;
 
 			}
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventEvent4())) {
-				if (activeStates.contains(State.State6)) {
-					activeStates.remove(State.State6);
+				if (isStateActive(State.State6)) {
+					stateVector[0] = null;
 
-				} else if (activeStates.contains(State.State8)) {
-					activeStates.remove(State.State8);
+				} else if (isStateActive(State.State8)) {
+					stateVector[0] = null;
 
-				} else if (activeStates.contains(State.State9)) {
-					activeStates.remove(State.State9);
+				} else if (isStateActive(State.State9)) {
+					stateVector[0] = null;
 
 				}
 
-				activeStates.add(State.State5);
+				nextStateIndex = 0;
+				stateVector[0] = State.State5;
 
 			} else {
 				if (occuredEvents.contains(defaultInterface.getEventEvent5())) {
-					activeStates.remove(State.State6);
+					stateVector[0] = null;
 
-					activeStates.add(State.State8);
+					nextStateIndex = 0;
+					stateVector[0] = State.State8;
 
 				}
 
@@ -163,58 +175,62 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 	}
 	private void reactState8() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent2())) {
-			if (activeStates.contains(State.State3)) {
-				activeStates.remove(State.State3);
+			if (isStateActive(State.State3)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State6)) {
-				activeStates.remove(State.State6);
+			} else if (isStateActive(State.State6)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State8)) {
-				activeStates.remove(State.State8);
+			} else if (isStateActive(State.State8)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State9)) {
-				activeStates.remove(State.State9);
+			} else if (isStateActive(State.State9)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State5)) {
-				activeStates.remove(State.State5);
+			} else if (isStateActive(State.State5)) {
+				stateVector[0] = null;
 
 			}
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventEvent4())) {
-				if (activeStates.contains(State.State6)) {
-					activeStates.remove(State.State6);
+				if (isStateActive(State.State6)) {
+					stateVector[0] = null;
 
-				} else if (activeStates.contains(State.State8)) {
-					activeStates.remove(State.State8);
+				} else if (isStateActive(State.State8)) {
+					stateVector[0] = null;
 
-				} else if (activeStates.contains(State.State9)) {
-					activeStates.remove(State.State9);
+				} else if (isStateActive(State.State9)) {
+					stateVector[0] = null;
 
 				}
 
-				activeStates.add(State.State5);
+				nextStateIndex = 0;
+				stateVector[0] = State.State5;
 
 			} else {
 				if (occuredEvents.contains(defaultInterface.getEventEvent6())) {
-					if (activeStates.contains(State.State8)) {
-						activeStates.remove(State.State8);
+					if (isStateActive(State.State8)) {
+						stateVector[0] = null;
 
-					} else if (activeStates.contains(State.State9)) {
-						activeStates.remove(State.State9);
+					} else if (isStateActive(State.State9)) {
+						stateVector[0] = null;
 
 					}
 
-					activeStates.add(State.State6);
+					nextStateIndex = 0;
+					stateVector[0] = State.State6;
 
 				} else {
 					if (occuredEvents.contains(defaultInterface
 							.getEventEvent7())) {
-						activeStates.remove(State.State8);
+						stateVector[0] = null;
 
-						activeStates.add(State.State9);
+						nextStateIndex = 0;
+						stateVector[0] = State.State9;
 
 					}
 
@@ -226,58 +242,62 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 	}
 	private void reactState9() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent2())) {
-			if (activeStates.contains(State.State3)) {
-				activeStates.remove(State.State3);
+			if (isStateActive(State.State3)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State6)) {
-				activeStates.remove(State.State6);
+			} else if (isStateActive(State.State6)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State8)) {
-				activeStates.remove(State.State8);
+			} else if (isStateActive(State.State8)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State9)) {
-				activeStates.remove(State.State9);
+			} else if (isStateActive(State.State9)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State5)) {
-				activeStates.remove(State.State5);
+			} else if (isStateActive(State.State5)) {
+				stateVector[0] = null;
 
 			}
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		} else {
 			if (occuredEvents.contains(defaultInterface.getEventEvent4())) {
-				if (activeStates.contains(State.State6)) {
-					activeStates.remove(State.State6);
+				if (isStateActive(State.State6)) {
+					stateVector[0] = null;
 
-				} else if (activeStates.contains(State.State8)) {
-					activeStates.remove(State.State8);
+				} else if (isStateActive(State.State8)) {
+					stateVector[0] = null;
 
-				} else if (activeStates.contains(State.State9)) {
-					activeStates.remove(State.State9);
+				} else if (isStateActive(State.State9)) {
+					stateVector[0] = null;
 
 				}
 
-				activeStates.add(State.State5);
+				nextStateIndex = 0;
+				stateVector[0] = State.State5;
 
 			} else {
 				if (occuredEvents.contains(defaultInterface.getEventEvent6())) {
-					if (activeStates.contains(State.State8)) {
-						activeStates.remove(State.State8);
+					if (isStateActive(State.State8)) {
+						stateVector[0] = null;
 
-					} else if (activeStates.contains(State.State9)) {
-						activeStates.remove(State.State9);
+					} else if (isStateActive(State.State9)) {
+						stateVector[0] = null;
 
 					}
 
-					activeStates.add(State.State6);
+					nextStateIndex = 0;
+					stateVector[0] = State.State6;
 
 				} else {
 					if (occuredEvents.contains(defaultInterface
 							.getEventEvent8())) {
-						activeStates.remove(State.State9);
+						stateVector[0] = null;
 
-						activeStates.add(State.State8);
+						nextStateIndex = 0;
+						stateVector[0] = State.State8;
 
 					}
 
@@ -289,24 +309,25 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 	}
 	private void reactState5() {
 		if (occuredEvents.contains(defaultInterface.getEventEvent2())) {
-			if (activeStates.contains(State.State3)) {
-				activeStates.remove(State.State3);
+			if (isStateActive(State.State3)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State6)) {
-				activeStates.remove(State.State6);
+			} else if (isStateActive(State.State6)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State8)) {
-				activeStates.remove(State.State8);
+			} else if (isStateActive(State.State8)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State9)) {
-				activeStates.remove(State.State9);
+			} else if (isStateActive(State.State9)) {
+				stateVector[0] = null;
 
-			} else if (activeStates.contains(State.State5)) {
-				activeStates.remove(State.State5);
+			} else if (isStateActive(State.State5)) {
+				stateVector[0] = null;
 
 			}
 
-			activeStates.add(State.State1);
+			nextStateIndex = 0;
+			stateVector[0] = State.State1;
 
 		} else {
 
@@ -314,37 +335,40 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 	}
 	public void runCycle() {
 		outEvents.clear();
-		for (State state : activeStates) {
-			switch (state) {
-				case State1 :
-					reactState1();
-					break;
-				case State2 :
-					reactState2();
-					break;
-				case State3 :
-					reactState3();
-					break;
-				case State4 :
-					reactState4();
-					break;
-				case State6 :
-					reactState6();
-					break;
-				case State7 :
-					reactState7();
-					break;
-				case State8 :
-					reactState8();
-					break;
-				case State9 :
-					reactState9();
-					break;
-				case State5 :
-					reactState5();
-					break;
-				default :
-					// no state found
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+			if (stateVector[nextStateIndex] != null) {
+				switch (stateVector[nextStateIndex]) {
+					case State1 :
+						reactState1();
+						break;
+					case State2 :
+						reactState2();
+						break;
+					case State3 :
+						reactState3();
+						break;
+					case State4 :
+						reactState4();
+						break;
+					case State6 :
+						reactState6();
+						break;
+					case State7 :
+						reactState7();
+						break;
+					case State8 :
+						reactState8();
+						break;
+					case State9 :
+						reactState9();
+						break;
+					case State5 :
+						reactState5();
+						break;
+					default :
+						// no state found
+				}
 			}
 		}
 		occuredEvents.clear();

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/Test_ShallowHistoryEventBasedStatemachine.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_shallowhistory;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/DefaultInterface.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_transition;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/DefaultInterfaceImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_transition;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/InterfaceA.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_transition;
 

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/InterfaceAImpl.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_transition;
 

+ 71 - 44
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/Test_TransitionCycleBasedStatemachine.java

@@ -1,20 +1,18 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_transition;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.EnumSet;
 import java.util.HashSet;
-import java.util.Set;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.TimeEvent;
 import org.yakindu.sct.runtime.java.ITimedStatemachine;
@@ -42,7 +40,9 @@ public class Test_TransitionCycleBasedStatemachine
 	private InterfaceAImpl interfaceA;
 	private DefaultInterfaceImpl defaultInterface;
 
-	private final Set<State> activeStates = EnumSet.noneOf(State.class);
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
 
 	private final ArrayList<Event<? extends Enum<?>>> occuredEvents;
 
@@ -78,6 +78,15 @@ public class Test_TransitionCycleBasedStatemachine
 
 	}
 
+	public boolean isStateActive(State state) {
+		for (int i = 0; i < stateVector.length; i++) {
+			if (stateVector[i] == state) {
+				return true;
+			}
+		}
+		return false;
+	}
+
 	public void setTimerService(ITimerService timerService) {
 		this.timerService = timerService;
 	}
@@ -97,10 +106,6 @@ public class Test_TransitionCycleBasedStatemachine
 		}
 	}
 
-	public Set<State> getActiveStates() {
-		return EnumSet.copyOf(activeStates);
-	}
-
 	public InterfaceA getInterfaceA() {
 		return interfaceA;
 	}
@@ -115,61 +120,73 @@ public class Test_TransitionCycleBasedStatemachine
 				cycleStartTime);
 		getTimerService().setTimer(State1_time_event_1, 100, cycleStartTime);
 
-		activeStates.add(State.State1);
+		nextStateIndex = 0;
+		stateVector[0] = State.State1;
 
 	}
 
 	private void reactState1() {
 		if ((occuredEvents.contains(interfaceA.getEventEvent1()) || occuredEvents
 				.contains(interfaceA.getEventEvent2()))) {
-			activeStates.remove(State.State1);
+			stateVector[0] = null;
+
 			getTimerService().resetTimer(State1_time_event_0);
 			getTimerService().resetTimer(State1_time_event_1);
 
-			activeStates.add(State.State2);
+			nextStateIndex = 0;
+			stateVector[0] = State.State2;
 
 		} else {
 			if ((defaultInterface.getVarI() == 5)) {
-				activeStates.remove(State.State1);
+				stateVector[0] = null;
+
 				getTimerService().resetTimer(State1_time_event_0);
 				getTimerService().resetTimer(State1_time_event_1);
 
-				activeStates.add(State.State2);
+				nextStateIndex = 0;
+				stateVector[0] = State.State2;
 
 			} else {
 				if ((occuredEvents.contains(interfaceA.getEventEvent3()) && (defaultInterface
 						.getVarJ() < 20))) {
-					activeStates.remove(State.State1);
+					stateVector[0] = null;
+
 					getTimerService().resetTimer(State1_time_event_0);
 					getTimerService().resetTimer(State1_time_event_1);
 
-					activeStates.add(State.State2);
+					nextStateIndex = 0;
+					stateVector[0] = State.State2;
 
 				} else {
 					if (((occuredEvents.contains(interfaceA.getEventEvent3()) || occuredEvents
 							.contains(interfaceA.getEventEvent4())) && (defaultInterface
 							.getVarJ() > 30))) {
-						activeStates.remove(State.State1);
+						stateVector[0] = null;
+
 						getTimerService().resetTimer(State1_time_event_0);
 						getTimerService().resetTimer(State1_time_event_1);
 
-						activeStates.add(State.State2);
+						nextStateIndex = 0;
+						stateVector[0] = State.State2;
 
 					} else {
 						if (occuredEvents.contains(defaultInterface
 								.getEventEvent6())) {
-							activeStates.remove(State.State1);
+							stateVector[0] = null;
+
 							getTimerService().resetTimer(State1_time_event_0);
 							getTimerService().resetTimer(State1_time_event_1);
 
 							defaultInterface.setVarI(15);
 
-							activeStates.add(State.State2);
+							nextStateIndex = 0;
+							stateVector[0] = State.State2;
 
 						} else {
 							if (occuredEvents.contains(defaultInterface
 									.getEventEvent7())) {
-								activeStates.remove(State.State1);
+								stateVector[0] = null;
+
 								getTimerService().resetTimer(
 										State1_time_event_0);
 								getTimerService().resetTimer(
@@ -178,39 +195,46 @@ public class Test_TransitionCycleBasedStatemachine
 								defaultInterface.setVarJ((defaultInterface
 										.getVarI() * 9));
 
-								activeStates.add(State.State2);
+								nextStateIndex = 0;
+								stateVector[0] = State.State2;
 
 							} else {
 								if (occuredEvents.contains(State1_time_event_0)) {
-									activeStates.remove(State.State1);
+									stateVector[0] = null;
+
 									getTimerService().resetTimer(
 											State1_time_event_0);
 									getTimerService().resetTimer(
 											State1_time_event_1);
 
-									activeStates.add(State.State2);
+									nextStateIndex = 0;
+									stateVector[0] = State.State2;
 
 								} else {
 									if (occuredEvents
 											.contains(State1_time_event_1)) {
-										activeStates.remove(State.State1);
+										stateVector[0] = null;
+
 										getTimerService().resetTimer(
 												State1_time_event_0);
 										getTimerService().resetTimer(
 												State1_time_event_1);
 
-										activeStates.add(State.State2);
+										nextStateIndex = 0;
+										stateVector[0] = State.State2;
 
 									} else {
 										if (occuredEvents.contains(interfaceA
 												.getEventEvent1())) {
-											activeStates.remove(State.State1);
+											stateVector[0] = null;
+
 											getTimerService().resetTimer(
 													State1_time_event_0);
 											getTimerService().resetTimer(
 													State1_time_event_1);
 
-											activeStates.add(State.State2);
+											nextStateIndex = 0;
+											stateVector[0] = State.State2;
 
 										}
 									}
@@ -227,16 +251,19 @@ public class Test_TransitionCycleBasedStatemachine
 	public void runCycle() {
 		cycleStartTime = System.currentTimeMillis();
 		outEvents.clear();
-		for (State state : activeStates) {
-			switch (state) {
-				case State1 :
-					reactState1();
-					break;
-				case State2 :
-					reactState2();
-					break;
-				default :
-					// no state found
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+			if (stateVector[nextStateIndex] != null) {
+				switch (stateVector[nextStateIndex]) {
+					case State1 :
+						reactState1();
+						break;
+					case State2 :
+						reactState2();
+						break;
+					default :
+						// no state found
+				}
 			}
 		}
 		occuredEvents.clear();

+ 8 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/Test_TransitionEventBasedStatemachine.java

@@ -1,12 +1,12 @@
 /**
- * Copyright (c) 2011 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
+Copyright (c) 2011 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.runtime.java.test_transition;
 

+ 11 - 43
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestInterfaceTestCycleBasedStatemachine.java

@@ -67,9 +67,7 @@ public class TestInterfaceTestCycleBasedStatemachine {
 		assertEquals("InterfaceDefault.Var3 is not correct initialized:", 1,
 				statemachine.getDefaultInterface().getVarVar3());
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
-				statemachine.getActiveStates().contains(State.State1));
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State1));
 	}
 
 	@Test
@@ -78,10 +76,7 @@ public class TestInterfaceTestCycleBasedStatemachine {
 		statemachine.runCycle();
 		// Test if state is changed to State2
 		assertTrue("Statemachine isn't in State: " + State.State2.name() + ".",
-				statemachine.getActiveStates().contains(State.State2));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State2));
 		// Test if event2 is raised (happens in entry of State2
 		assertTrue("Event not raised: ", statemachine.getDefaultInterface()
 				.isRaisedEvent2());
@@ -93,10 +88,7 @@ public class TestInterfaceTestCycleBasedStatemachine {
 		statemachine.runCycle();
 		// Test if statemachine is back in State 1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
-				statemachine.getActiveStates().contains(State.State1));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State1));
 		// Event 2 shouldn't be raised anymore
 		assertFalse("Event is still raised: ", statemachine
 				.getDefaultInterface().isRaisedEvent2());
@@ -109,10 +101,7 @@ public class TestInterfaceTestCycleBasedStatemachine {
 		statemachine.runCycle();
 		// Test if statemachine is still in State 1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
-				statemachine.getActiveStates().contains(State.State1));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State1));
 		// Event 2 shouldn't be raised
 		assertFalse("Event is still raised: ", statemachine
 				.getDefaultInterface().isRaisedEvent2());
@@ -125,10 +114,7 @@ public class TestInterfaceTestCycleBasedStatemachine {
 		statemachine.runCycle();
 		// Test if state is changed to State2
 		assertTrue("Statemachine isn't in State: " + State.State2.name() + ".",
-				statemachine.getActiveStates().contains(State.State2));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State2));
 		// Test if event2 is raised (happens in entry of State2
 		assertTrue("Event not raised: ", statemachine.getDefaultInterface()
 				.isRaisedEvent2());
@@ -143,10 +129,7 @@ public class TestInterfaceTestCycleBasedStatemachine {
 		statemachine.runCycle();
 		// Test if state is changed to State3
 		assertTrue("Statemachine isn't in State: " + State.State3.name() + ".",
-				statemachine.getActiveStates().contains(State.State3));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State3));
 		// Test if event4 is raised (happens in entry of State3
 		assertTrue("Event not raised: ", statemachine.getInterfaceOther()
 				.isRaisedEvent4());
@@ -155,10 +138,7 @@ public class TestInterfaceTestCycleBasedStatemachine {
 		statemachine.runCycle();
 		// Test if statemachine is back in State 1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
-				statemachine.getActiveStates().contains(State.State1));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State1));
 		// Event 4 shouldn't be raised anymore
 		assertFalse("Event is still raised: ", statemachine.getInterfaceOther()
 				.isRaisedEvent4());
@@ -171,10 +151,7 @@ public class TestInterfaceTestCycleBasedStatemachine {
 		statemachine.runCycle();
 		// Test if state is changed to State1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
-				statemachine.getActiveStates().contains(State.State1));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State1));
 		// Test if event4 is not raised
 		assertFalse("Event not raised: ", statemachine.getInterfaceOther()
 				.isRaisedEvent4());
@@ -184,10 +161,7 @@ public class TestInterfaceTestCycleBasedStatemachine {
 		statemachine.runCycle();
 		// Test if state is changed to State3
 		assertTrue("Statemachine isn't in State: " + State.State3.name() + ".",
-				statemachine.getActiveStates().contains(State.State3));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State3));
 		// Test if event4 is raised (happens in entry of State3
 		assertTrue("Event not raised: ", statemachine.getInterfaceOther()
 				.isRaisedEvent4());
@@ -200,10 +174,7 @@ public class TestInterfaceTestCycleBasedStatemachine {
 		statemachine.runCycle();
 		// Test if state is changed to State4
 		assertTrue("Statemachine isn't in State: " + State.State4.name() + ".",
-				statemachine.getActiveStates().contains(State.State4));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State4));
 		// Test if event6 is raised
 		assertTrue("Event not raised: ", statemachine.getInterfaceThird()
 				.isRaisedEvent6());
@@ -215,10 +186,7 @@ public class TestInterfaceTestCycleBasedStatemachine {
 		statemachine.runCycle();
 		// Test if state is changed to State1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
-				statemachine.getActiveStates().contains(State.State1));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State1));
 		// Test if event6 is not raised
 		assertFalse("Event raised: ", statemachine.getInterfaceThird()
 				.isRaisedEvent6());

+ 11 - 43
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestInterfaceTestEventBasedStatemachine.java

@@ -121,9 +121,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 		assertEquals("InterfaceDefault.Var3 is not correct initialized:", 1,
 				statemachine.getDefaultInterface().getVarVar3());
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
-				statemachine.getActiveStates().contains(State.State1));
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State1));
 	}
 
 	@Test
@@ -133,10 +131,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 		sleep(5);
 		// Test if state is changed to State2
 		assertTrue("Statemachine isn't in State: " + State.State2.name() + ".",
-				statemachine.getActiveStates().contains(State.State2));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State2));
 		// Test if event2 is raised (happens in entry of State2
 		assertTrue("Event 2 not raised: ", events[0]);
 		// Test if event2 value is set to 22 (happens in entry of State2
@@ -147,10 +142,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 		sleep(2);
 		// Test if statemachine is back in State 1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
-				statemachine.getActiveStates().contains(State.State1));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State1));
 		// Event 2 shouldn't be raised anymore
 		assertFalse("Event is still raised: ", statemachine
 				.getDefaultInterface().isRaisedEvent2());
@@ -163,10 +155,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 		sleep(2);
 		// Test if statemachine is still in State 1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
-				statemachine.getActiveStates().contains(State.State1));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State1));
 		// Event 2 shouldn't be raised
 		assertFalse("Event is still raised: ", statemachine
 				.getDefaultInterface().isRaisedEvent2());
@@ -179,10 +168,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 		sleep(2);
 		// Test if state is changed to State2
 		assertTrue("Statemachine isn't in State: " + State.State2.name() + ".",
-				statemachine.getActiveStates().contains(State.State2));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State2));
 		// Test if event2 is raised (happens in entry of State2
 		assertTrue("Event 2 not raised: ", events[0]);
 		// Test if event2 value is set to 22 (happens in entry of State2
@@ -196,10 +182,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 		sleep(2);
 		// Test if state is changed to State3
 		assertTrue("Statemachine isn't in State: " + State.State3.name() + ".",
-				statemachine.getActiveStates().contains(State.State3));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State3));
 		// Test if event4 is raised (happens in entry of State3
 		assertTrue("Event not raised: ", events[1]);
 
@@ -207,10 +190,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 		sleep(2);
 		// Test if statemachine is back in State 1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
-				statemachine.getActiveStates().contains(State.State1));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State1));
 		// Event 4 shouldn't be raised anymore
 		assertFalse("Event is still raised: ", statemachine.getInterfaceOther()
 				.isRaisedEvent4());
@@ -223,10 +203,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 		sleep(2);
 		// Test if state is changed to State1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
-				statemachine.getActiveStates().contains(State.State1));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State1));
 		// Test if event4 is not raised
 		assertFalse("Event not raised: ", events[1]);
 
@@ -235,10 +212,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 		sleep(2);
 		// Test if state is changed to State3
 		assertTrue("Statemachine isn't in State: " + State.State3.name() + ".",
-				statemachine.getActiveStates().contains(State.State3));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State3));
 		// Test if event4 is raised (happens in entry of State3
 		assertTrue("Event not raised: ", events[1]);
 	}
@@ -250,10 +224,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 		sleep(2);
 		// Test if state is changed to State4
 		assertTrue("Statemachine isn't in State: " + State.State4.name() + ".",
-				statemachine.getActiveStates().contains(State.State4));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State4));
 		// Test if event6 is raised
 		assertTrue("Event not raised: ", events[2]);
 		// Test if event6 is set to true;
@@ -264,10 +235,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 		sleep(2);
 		// Test if state is changed to State1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
-				statemachine.getActiveStates().contains(State.State1));
-		// Test if only one state is active
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State1));
 		// Test if event6 is not raised
 		assertFalse("Event raised: ", statemachine.getInterfaceThird()
 				.isRaisedEvent6());

+ 1 - 3
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestLocalActionsCycleBasedStatemachine.java

@@ -67,9 +67,7 @@ public class TestLocalActionsCycleBasedStatemachine {
 	@Test
 	public void testStatemachineEntry() {
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
-				statemachine.getActiveStates().contains(State.State1));
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State1));
 		assertEquals("Variable i not set to 1", 1, statemachine
 				.getDefaultInterface().getVarI());
 	}

+ 1 - 3
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestLocalActionsEventBasedStatemachine.java

@@ -77,9 +77,7 @@ public class TestLocalActionsEventBasedStatemachine {
 	@Test
 	public void testStatemachineEntry() {
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
-				statemachine.getActiveStates().contains(State.State1));
-		assertEquals("More than one state is active.", 1, statemachine
-				.getActiveStates().size());
+				statemachine.isStateActive(State.State1));
 		assertEquals("Variable i not set to 1", 1, statemachine
 				.getDefaultInterface().getVarI());
 	}

+ 135 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestParallelRegionsCycleBasedStatemachine.java

@@ -0,0 +1,135 @@
+/**
+ * Copyright (c) 2011 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:
+ * 	@author markus muehlbrandt - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.generator.java.runtime.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.yakindu.sct.runtime.java.interfacetest.InterfaceTestCycleBasedStatemachine;
+import org.yakindu.sct.runtime.java.test_parallelregions.Test_ParallelRegionsCycleBasedStatemachine;
+import org.yakindu.sct.runtime.java.test_parallelregions.Test_ParallelRegionsCycleBasedStatemachine.State;
+
+/**
+ * Testcases for 'InterfaceTest' cycle based statemachine.
+ * 
+ * @author muehlbrandt
+ * 
+ */
+public class TestParallelRegionsCycleBasedStatemachine {
+
+	private Test_ParallelRegionsCycleBasedStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new Test_ParallelRegionsCycleBasedStatemachine();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testStatemachineEnter() {
+		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
+				statemachine.isStateActive(State.State1));
+	}
+
+	@Test
+	public void testStatemachineHierarchyLevelOne() {
+		statemachine.getDefaultInterface().raiseEvent1();
+		statemachine.runCycle();
+		// Test if state is changed to State3 && State7
+		assertTrue("Statemachine isn't in State: " + State.State3.name() + ".",
+				statemachine.isStateActive(State.State3));
+		assertTrue("Statemachine isn't in State: " + State.State7.name() + ".",
+				statemachine.isStateActive(State.State7));
+
+		statemachine.getDefaultInterface().raiseEvent3();
+		statemachine.runCycle();
+		// Test if state is changed to State3 && State8
+		assertTrue("Statemachine isn't in State: " + State.State3.name() + ".",
+				statemachine.isStateActive(State.State3));
+		assertTrue("Statemachine isn't in State: " + State.State8.name() + ".",
+				statemachine.isStateActive(State.State8));
+		assertFalse(
+				"Statemachine isn't in State: " + State.State7.name() + ".",
+				statemachine.isStateActive(State.State7));
+
+		statemachine.getDefaultInterface().raiseEvent6();
+		statemachine.runCycle();
+		// Test if state is changed to State3 && State7
+		assertTrue("Statemachine isn't in State: " + State.State3.name() + ".",
+				statemachine.isStateActive(State.State3));
+		assertTrue("Statemachine isn't in State: " + State.State7.name() + ".",
+				statemachine.isStateActive(State.State7));
+		assertFalse(
+				"Statemachine isn't in State: " + State.State8.name() + ".",
+				statemachine.isStateActive(State.State8));
+	}
+
+	@Test
+	public void testStatemachineHierarchyLevelTwo() {
+		statemachine.getDefaultInterface().raiseEvent1();
+		statemachine.runCycle();
+		// Test if state is changed to State3 && State7
+		assertTrue("Statemachine isn't in State: " + State.State3.name() + ".",
+				statemachine.isStateActive(State.State3));
+		assertTrue("Statemachine isn't in State: " + State.State7.name() + ".",
+				statemachine.isStateActive(State.State7));
+
+		statemachine.getDefaultInterface().raiseEvent2();
+		statemachine.runCycle();
+		// Test if state is changed to State9, State5 and State7
+		assertTrue("Statemachine isn't in State: " + State.State9.name() + ".",
+				statemachine.isStateActive(State.State9));
+		assertTrue("Statemachine isn't in State: " + State.State5.name() + ".",
+				statemachine.isStateActive(State.State5));
+		assertTrue("Statemachine isn't in State: " + State.State7.name() + ".",
+				statemachine.isStateActive(State.State7));
+		assertFalse(
+				"Statemachine isn't in State: " + State.State8.name() + ".",
+				statemachine.isStateActive(State.State8));
+
+		statemachine.getDefaultInterface().raiseEvent3();
+		statemachine.runCycle();
+		// Test if state is changed to State9, State6 and State8
+		assertTrue("Statemachine isn't in State: " + State.State9.name() + ".",
+				statemachine.isStateActive(State.State9));
+		assertTrue("Statemachine isn't in State: " + State.State6.name() + ".",
+				statemachine.isStateActive(State.State6));
+		assertFalse(
+				"Statemachine isn't in State: " + State.State7.name() + ".",
+				statemachine.isStateActive(State.State7));
+		assertTrue("Statemachine isn't in State: " + State.State8.name() + ".",
+				statemachine.isStateActive(State.State8));
+
+		statemachine.getDefaultInterface().raiseEvent6();
+		statemachine.runCycle();
+		// Test if state is changed to State9, State6 and State8
+		assertTrue("Statemachine isn't in State: " + State.State9.name() + ".",
+				statemachine.isStateActive(State.State9));
+		assertTrue("Statemachine isn't in State: " + State.State6.name() + ".",
+				statemachine.isStateActive(State.State6));
+		assertTrue(
+				"Statemachine isn't in State: " + State.State7.name() + ".",
+				statemachine.isStateActive(State.State7));
+		assertFalse("Statemachine isn't in State: " + State.State8.name() + ".",
+				statemachine.isStateActive(State.State8));
+	}
+
+}