Browse Source

adde event life cycle tests

terfloth@itemis.de 12 years ago
parent
commit
ae89141f0c
29 changed files with 1248 additions and 9 deletions
  1. 23 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/InEventLifeCycle/InEventLifeCycle.cc
  2. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/InEventLifeCycle/InEventLifeCycle.sgen
  3. 48 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/OutEventLifeCycle/OutEventLifeCycle.cc
  4. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/OutEventLifeCycle/OutEventLifeCycle.sgen
  5. 4 3
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/AllTests.java
  6. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/InEventLifeCycle.java
  7. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/OutEventLifeCycle.java
  8. 22 0
      test-plugins/org.yakindu.sct.generator.java.test/model/model.sgen
  9. 15 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/ineventlifecycle/IInEventLifeCycleStatemachine.java
  10. 144 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/ineventlifecycle/InEventLifeCycleStatemachine.java
  11. 18 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/outeventlifecycle/IOutEventLifeCycleStatemachine.java
  12. 228 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/outeventlifecycle/OutEventLifeCycleStatemachine.java
  13. 2 1
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/AllTestsTest.java
  14. 46 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/InEventLifeCycleTest.java
  15. 68 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/OutEventLifeCycleTest.java
  16. 2 1
      test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src-gen/org/yakindu/sct/model/sexec/interpreter/test/AllTests.java
  17. 49 0
      test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src-gen/org/yakindu/sct/model/sexec/interpreter/test/InEventLifeCycleTest.java
  18. 71 0
      test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src-gen/org/yakindu/sct/model/sexec/interpreter/test/OutEventLifeCycleTest.java
  19. 4 0
      test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src/org/yakindu/sct/model/sexec/interpreter/test/util/AbstractExecutionFlowTest.java
  20. 3 0
      test-plugins/org.yakindu.sct.test.models/.settings/org.eclipse.core.resources.prefs
  21. 96 0
      test-plugins/org.yakindu.sct.test.models/testmodels/Exit.sct
  22. 72 0
      test-plugins/org.yakindu.sct.test.models/testmodels/InEventLifeCycle.sct
  23. 1 1
      test-plugins/org.yakindu.sct.test.models/testmodels/IntegerExpressions.sct
  24. 154 0
      test-plugins/org.yakindu.sct.test.models/testmodels/OutEventLifeCycle.sct
  25. 1 1
      test-plugins/org.yakindu.sct.test.models/testmodels/VariableInitialization.sct
  26. 1 1
      test-plugins/org.yakindu.sct.test.models/tests/AllTests.sctunit
  27. 23 0
      test-plugins/org.yakindu.sct.test.models/tests/InEventLifeCycle.sctunit
  28. 6 1
      test-plugins/org.yakindu.sct.test.models/tests/InternalEventLifeCycle.sctunit
  29. 53 0
      test-plugins/org.yakindu.sct.test.models/tests/OutEventLifeCycle.sctunit

+ 23 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/InEventLifeCycle/InEventLifeCycle.cc

@@ -0,0 +1,23 @@
+/**
+* Copyright (c) 2012 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
+*/
+#include <string>
+#include "gtest/gtest.h"
+#include "InEventLifeCycle.h"
+
+TEST(StatemachineTest, eventLifeCycle) {
+	InEventLifeCycle handle;
+	inEventLifeCycle_init(&handle);
+	inEventLifeCycle_enter(&handle);
+	inEventLifeCycleIface_raise_e(&handle);
+	EXPECT_TRUE(inEventLifeCycleIface_get_i(&handle)== 0);
+	inEventLifeCycle_runCycle(&handle);
+	EXPECT_TRUE(inEventLifeCycleIface_get_i(&handle)== 1);
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/InEventLifeCycle/InEventLifeCycle.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::c {
+	statechart InEventLifeCycle {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "InEventLifeCycle"
+		}
+	}
+}

+ 48 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/OutEventLifeCycle/OutEventLifeCycle.cc

@@ -0,0 +1,48 @@
+/**
+* Copyright (c) 2012 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
+*/
+#include <string>
+#include "gtest/gtest.h"
+#include "OutEventLifeCycle.h"
+
+TEST(StatemachineTest, availableAfterCycle) {
+	OutEventLifeCycle handle;
+	outEventLifeCycle_init(&handle);
+	outEventLifeCycle_enter(&handle);
+	outEventLifeCycleIface_raise_e(&handle);
+	outEventLifeCycle_runCycle(&handle);
+	EXPECT_TRUE(outEventLifeCycleIface_israised_f(&handle));
+}
+TEST(StatemachineTest, availableWithinCycle) {
+	OutEventLifeCycle handle;
+	outEventLifeCycle_init(&handle);
+	outEventLifeCycle_enter(&handle);
+	outEventLifeCycleIface_raise_e(&handle);
+	outEventLifeCycle_runCycle(&handle);
+	EXPECT_TRUE(outEventLifeCycleIface_get_f_available_in_cycle(&handle));
+}
+TEST(StatemachineTest, unvailableWithin2ndCycle) {
+	OutEventLifeCycle handle;
+	outEventLifeCycle_init(&handle);
+	outEventLifeCycle_enter(&handle);
+	outEventLifeCycleIface_raise_e(&handle);
+	outEventLifeCycle_runCycle(&handle);
+	outEventLifeCycle_runCycle(&handle);
+	EXPECT_TRUE(!outEventLifeCycleIface_get_f_available_in_next_cycle(&handle));
+}
+TEST(StatemachineTest, unvailableAfter2ndCycle) {
+	OutEventLifeCycle handle;
+	outEventLifeCycle_init(&handle);
+	outEventLifeCycle_enter(&handle);
+	outEventLifeCycleIface_raise_e(&handle);
+	outEventLifeCycle_runCycle(&handle);
+	outEventLifeCycle_runCycle(&handle);
+	EXPECT_TRUE(!outEventLifeCycleIface_israised_f(&handle));
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/OutEventLifeCycle/OutEventLifeCycle.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::c {
+	statechart OutEventLifeCycle {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "OutEventLifeCycle"
+		}
+	}
+}

+ 4 - 3
test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/AllTests.java

@@ -18,9 +18,10 @@ import org.junit.runners.Suite.SuiteClasses;
 		BitExpressions.class, BooleanExpressions.class, CKeywords.class,
 		Declarations.class, Choice.class, DeepHistory.class,
 		ExitOnSelfTransition.class, Guard.class, GuardedEntry.class,
-		GuardedExit.class, IntegerExpressions.class,
-		InternalEventLifeCycle.class, Parenthesis.class, PriorityValues.class,
-		RaiseEvent.class, SameNameDifferentRegion.class, ShallowHistory.class,
+		GuardedExit.class, IntegerExpressions.class, InEventLifeCycle.class,
+		InternalEventLifeCycle.class, OutEventLifeCycle.class,
+		Parenthesis.class, PriorityValues.class, RaiseEvent.class,
+		SameNameDifferentRegion.class, ShallowHistory.class,
 		SimpleHietachy.class, StateIsActive.class,
 		StatechartLocalReactions.class, StringExpressions.class,
 		SyncFork.class, SyncJoin.class, ValuedEvent.class, SimpleEvent.class})

+ 39 - 0
test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/InEventLifeCycle.java

@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.generator.c.test;
+
+import java.util.Collection;
+
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.yakindu.sct.generator.c.gtest.GTest;
+import org.yakindu.sct.generator.c.gtest.GTestRunner;
+import org.yakindu.sct.generator.c.gtest.GTestHelper;
+
+@GTest(sourceFile = "gtests/InEventLifeCycle/InEventLifeCycle.cc", program = "gtests/InEventLifeCycle/InEventLifeCycle", model = "testmodels/InEventLifeCycle.sct")
+@RunWith(GTestRunner.class)
+public class InEventLifeCycle {
+
+	protected final GTestHelper helper = new GTestHelper(this) {
+
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+			files.add(getFileName(getTestProgram()) + ".c");
+		}
+	};
+
+	@Before
+	public void setUp() {
+		helper.generate();
+		helper.compile();
+	}
+}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/OutEventLifeCycle.java

@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.generator.c.test;
+
+import java.util.Collection;
+
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.yakindu.sct.generator.c.gtest.GTest;
+import org.yakindu.sct.generator.c.gtest.GTestRunner;
+import org.yakindu.sct.generator.c.gtest.GTestHelper;
+
+@GTest(sourceFile = "gtests/OutEventLifeCycle/OutEventLifeCycle.cc", program = "gtests/OutEventLifeCycle/OutEventLifeCycle", model = "testmodels/OutEventLifeCycle.sct")
+@RunWith(GTestRunner.class)
+public class OutEventLifeCycle {
+
+	protected final GTestHelper helper = new GTestHelper(this) {
+
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+			files.add(getFileName(getTestProgram()) + ".c");
+		}
+	};
+
+	@Before
+	public void setUp() {
+		helper.generate();
+		helper.compile();
+	}
+}

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

@@ -245,6 +245,17 @@ GeneratorModel for yakindu::java {
 			RuntimeService = true
 		}
 	}
+	statechart InEventLifeCycle {
+		feature Outlet {
+			targetProject = "org.yakindu.sct.generator.java.test"
+			targetFolder = "src-gen"
+		}
+
+		feature GeneralFeatures {
+			TimerService = true
+			RuntimeService = true
+		}
+	}
 	statechart InternalEventLifeCycle {
 		feature Outlet {
 			targetProject = "org.yakindu.sct.generator.java.test"
@@ -256,6 +267,17 @@ GeneratorModel for yakindu::java {
 			RuntimeService = true
 		}
 	}
+	statechart OutEventLifeCycle {
+		feature Outlet {
+			targetProject = "org.yakindu.sct.generator.java.test"
+			targetFolder = "src-gen"
+		}
+
+		feature GeneralFeatures {
+			TimerService = true
+			RuntimeService = true
+		}
+	}
 	statechart RealExpressions {
 		feature Outlet {
 			targetProject = "org.yakindu.sct.generator.java.test"

+ 15 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/ineventlifecycle/IInEventLifeCycleStatemachine.java

@@ -0,0 +1,15 @@
+package org.yakindu.scr.ineventlifecycle;
+import org.yakindu.scr.IStatemachine;
+
+public interface IInEventLifeCycleStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+		public void raiseE();
+		public int getI();
+		public void setI(int value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 144 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/ineventlifecycle/InEventLifeCycleStatemachine.java

@@ -0,0 +1,144 @@
+package org.yakindu.scr.ineventlifecycle;
+
+public class InEventLifeCycleStatemachine
+		implements
+			IInEventLifeCycleStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean e;
+
+		public void raiseE() {
+			e = true;
+		}
+
+		private int i;
+
+		public int getI() {
+			return i;
+		}
+
+		public void setI(int value) {
+			this.i = value;
+		}
+
+		public void clearEvents() {
+			e = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		main_region_A, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public InEventLifeCycleStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+
+		sCIDefault.i = 0;
+	}
+
+	public void enter() {
+		entryAction();
+
+		nextStateIndex = 0;
+		stateVector[0] = State.main_region_A;
+	}
+
+	public void exit() {
+		switch (stateVector[0]) {
+			case main_region_A :
+				nextStateIndex = 0;
+				stateVector[0] = State.$NullState$;
+				break;
+
+			default :
+				break;
+		}
+
+		exitAction();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+			case main_region_A :
+				return stateVector[0] == State.main_region_A;
+			default :
+				return false;
+		}
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseE() {
+		sCIDefault.raiseE();
+	}
+
+	public int getI() {
+		return sCIDefault.getI();
+	}
+
+	public void setI(int value) {
+		sCIDefault.setI(value);
+	}
+
+	/* Entry action for statechart 'InEventLifeCycle'. */
+	private void entryAction() {
+	}
+
+	/* Exit action for state 'InEventLifeCycle'. */
+	private void exitAction() {
+	}
+
+	/* The reactions of state A. */
+	private void reactMain_region_A() {
+		if (sCIDefault.e) {
+			sCIDefault.i += 1;
+		}
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case main_region_A :
+					reactMain_region_A();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 18 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/outeventlifecycle/IOutEventLifeCycleStatemachine.java

@@ -0,0 +1,18 @@
+package org.yakindu.scr.outeventlifecycle;
+import org.yakindu.scr.IStatemachine;
+
+public interface IOutEventLifeCycleStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+		public void raiseE();
+		public boolean isRaisedF();
+		public boolean getF_available_in_cycle();
+		public void setF_available_in_cycle(boolean value);
+		public boolean getF_available_in_next_cycle();
+		public void setF_available_in_next_cycle(boolean value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 228 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/outeventlifecycle/OutEventLifeCycleStatemachine.java

@@ -0,0 +1,228 @@
+package org.yakindu.scr.outeventlifecycle;
+
+public class OutEventLifeCycleStatemachine
+		implements
+			IOutEventLifeCycleStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean e;
+
+		public void raiseE() {
+			e = true;
+		}
+
+		private boolean f;
+
+		public boolean isRaisedF() {
+			return f;
+		}
+
+		private void raiseF() {
+			f = true;
+		}
+
+		private boolean f_available_in_cycle;
+
+		public boolean getF_available_in_cycle() {
+			return f_available_in_cycle;
+		}
+
+		public void setF_available_in_cycle(boolean value) {
+			this.f_available_in_cycle = value;
+		}
+
+		private boolean f_available_in_next_cycle;
+
+		public boolean getF_available_in_next_cycle() {
+			return f_available_in_next_cycle;
+		}
+
+		public void setF_available_in_next_cycle(boolean value) {
+			this.f_available_in_next_cycle = value;
+		}
+
+		public void clearEvents() {
+			e = false;
+		}
+
+		public void clearOutEvents() {
+			f = false;
+		}
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		r1_A, r1_B, r2_B, $NullState$
+	};
+
+	private final State[] stateVector = new State[2];
+
+	private int nextStateIndex;
+
+	public OutEventLifeCycleStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 2; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+
+		sCIDefault.f_available_in_cycle = false;
+
+		sCIDefault.f_available_in_next_cycle = false;
+	}
+
+	public void enter() {
+		entryAction();
+
+		nextStateIndex = 0;
+		stateVector[0] = State.r1_A;
+
+		nextStateIndex = 1;
+		stateVector[1] = State.r2_B;
+	}
+
+	public void exit() {
+		switch (stateVector[0]) {
+			case r1_A :
+				nextStateIndex = 0;
+				stateVector[0] = State.$NullState$;
+				break;
+
+			case r1_B :
+				nextStateIndex = 0;
+				stateVector[0] = State.$NullState$;
+				break;
+
+			default :
+				break;
+		}
+
+		switch (stateVector[1]) {
+			case r2_B :
+				nextStateIndex = 1;
+				stateVector[1] = State.$NullState$;
+				break;
+
+			default :
+				break;
+		}
+
+		exitAction();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+		sCIDefault.clearOutEvents();
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+			case r1_A :
+				return stateVector[0] == State.r1_A;
+			case r1_B :
+				return stateVector[0] == State.r1_B;
+			case r2_B :
+				return stateVector[1] == State.r2_B;
+			default :
+				return false;
+		}
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseE() {
+		sCIDefault.raiseE();
+	}
+	public boolean isRaisedF() {
+		return sCIDefault.isRaisedF();
+	}
+
+	public boolean getF_available_in_cycle() {
+		return sCIDefault.getF_available_in_cycle();
+	}
+
+	public void setF_available_in_cycle(boolean value) {
+		sCIDefault.setF_available_in_cycle(value);
+	}
+	public boolean getF_available_in_next_cycle() {
+		return sCIDefault.getF_available_in_next_cycle();
+	}
+
+	public void setF_available_in_next_cycle(boolean value) {
+		sCIDefault.setF_available_in_next_cycle(value);
+	}
+
+	/* Entry action for statechart 'OutEventLifeCycle'. */
+	private void entryAction() {
+	}
+
+	/* Exit action for state 'OutEventLifeCycle'. */
+	private void exitAction() {
+	}
+
+	/* The reactions of state A. */
+	private void reactR1_A() {
+		if (sCIDefault.e) {
+			nextStateIndex = 0;
+			stateVector[0] = State.$NullState$;
+
+			sCIDefault.raiseF();
+
+			nextStateIndex = 0;
+			stateVector[0] = State.r1_B;
+		}
+	}
+
+	/* The reactions of state B. */
+	private void reactR1_B() {
+		if (sCIDefault.f) {
+			sCIDefault.f_available_in_next_cycle = true;
+		}
+	}
+
+	/* The reactions of state B. */
+	private void reactR2_B() {
+		if (sCIDefault.f) {
+			sCIDefault.f_available_in_cycle = true;
+		}
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case r1_A :
+					reactR1_A();
+					break;
+				case r1_B :
+					reactR1_B();
+					break;
+				case r2_B :
+					reactR2_B();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

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

@@ -19,7 +19,8 @@ import org.junit.runners.Suite.SuiteClasses;
 		CKeywordsTest.class, DeclarationsTest.class, ChoiceTest.class,
 		DeepHistoryTest.class, ExitOnSelfTransitionTest.class, GuardTest.class,
 		GuardedEntryTest.class, GuardedExitTest.class,
-		IntegerExpressionsTest.class, InternalEventLifeCycleTest.class,
+		IntegerExpressionsTest.class, InEventLifeCycleTest.class,
+		InternalEventLifeCycleTest.class, OutEventLifeCycleTest.class,
 		ParenthesisTest.class, PriorityValuesTest.class, RaiseEventTest.class,
 		SameNameDifferentRegionTest.class, ShallowHistoryTest.class,
 		SimpleHietachyTest.class, StateIsActiveTest.class,

+ 46 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/InEventLifeCycleTest.java

@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.generator.java.test;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.yakindu.scr.ineventlifecycle.InEventLifeCycleStatemachine;
+import org.yakindu.scr.ineventlifecycle.InEventLifeCycleStatemachine.State;
+/**
+ *  Unit TestCase for InEventLifeCycle
+ */
+@SuppressWarnings("all")
+public class InEventLifeCycleTest {
+
+	private InEventLifeCycleStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new InEventLifeCycleStatemachine();
+		statemachine.init();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testeventLifeCycle() {
+		statemachine.enter();
+		statemachine.raiseE();
+		assertTrue(statemachine.getI() == 0);
+		statemachine.runCycle();
+		assertTrue(statemachine.getI() == 1);
+	}
+}

+ 68 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/OutEventLifeCycleTest.java

@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.generator.java.test;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.yakindu.scr.outeventlifecycle.OutEventLifeCycleStatemachine;
+import org.yakindu.scr.outeventlifecycle.OutEventLifeCycleStatemachine.State;
+/**
+ *  Unit TestCase for OutEventLifeCycle
+ */
+@SuppressWarnings("all")
+public class OutEventLifeCycleTest {
+
+	private OutEventLifeCycleStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new OutEventLifeCycleStatemachine();
+		statemachine.init();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testavailableAfterCycle() {
+		statemachine.enter();
+		statemachine.raiseE();
+		statemachine.runCycle();
+		assertTrue(statemachine.isRaisedF());
+	}
+	@Test
+	public void testavailableWithinCycle() {
+		statemachine.enter();
+		statemachine.raiseE();
+		statemachine.runCycle();
+		assertTrue(statemachine.getF_available_in_cycle());
+	}
+	@Test
+	public void testunvailableWithin2ndCycle() {
+		statemachine.enter();
+		statemachine.raiseE();
+		statemachine.runCycle();
+		statemachine.runCycle();
+		assertTrue(!statemachine.getF_available_in_next_cycle());
+	}
+	@Test
+	public void testunvailableAfter2ndCycle() {
+		statemachine.enter();
+		statemachine.raiseE();
+		statemachine.runCycle();
+		statemachine.runCycle();
+		assertTrue(!statemachine.isRaisedF());
+	}
+}

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

@@ -20,7 +20,8 @@ import org.junit.runners.Suite.SuiteClasses;
 		CKeywordsTest.class, DeclarationsTest.class, ChoiceTest.class,
 		DeepHistoryTest.class, ExitOnSelfTransitionTest.class, GuardTest.class,
 		GuardedEntryTest.class, GuardedExitTest.class,
-		IntegerExpressionsTest.class, InternalEventLifeCycleTest.class,
+		IntegerExpressionsTest.class, InEventLifeCycleTest.class,
+		InternalEventLifeCycleTest.class, OutEventLifeCycleTest.class,
 		ParenthesisTest.class, PriorityValuesTest.class, RaiseEventTest.class,
 		SameNameDifferentRegionTest.class, ShallowHistoryTest.class,
 		SimpleHierachyTest.class, StateIsActiveTest.class,

+ 49 - 0
test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src-gen/org/yakindu/sct/model/sexec/interpreter/test/InEventLifeCycleTest.java

@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2012 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.model.sexec.interpreter.test;
+import org.eclipse.xtext.junit4.InjectWith;
+import org.eclipse.xtext.junit4.XtextRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.yakindu.sct.model.sexec.interpreter.test.util.AbstractExecutionFlowTest;
+import org.yakindu.sct.model.sexec.interpreter.test.util.SExecInjectionProvider;
+import com.google.inject.Inject;
+import org.junit.Before;
+import org.yakindu.sct.model.sexec.interpreter.IExecutionFlowInterpreter;
+import org.yakindu.sct.model.sexec.ExecutionFlow;
+import util.TestModels;
+import static junit.framework.Assert.*;
+/**
+ *  Unit TestCase for InEventLifeCycle
+ */
+@SuppressWarnings("all")
+@RunWith(XtextRunner.class)
+@InjectWith(SExecInjectionProvider.class)
+public class InEventLifeCycleTest extends AbstractExecutionFlowTest {
+
+	@Inject
+	private TestModels models;
+
+	@Before
+	public void setup() throws Exception {
+		ExecutionFlow flow = models
+				.loadExecutionFlowFromResource("InEventLifeCycle.sct");
+		initInterpreter(flow);
+	}
+	@Test
+	public void eventLifeCycle() throws Exception {
+		interpreter.enter();
+		raiseEvent("e");
+		assertTrue(getInteger("i") == 0);
+		interpreter.runCycle();
+		assertTrue(getInteger("i") == 1);
+	}
+}

+ 71 - 0
test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src-gen/org/yakindu/sct/model/sexec/interpreter/test/OutEventLifeCycleTest.java

@@ -0,0 +1,71 @@
+/**
+ * Copyright (c) 2012 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.model.sexec.interpreter.test;
+import org.eclipse.xtext.junit4.InjectWith;
+import org.eclipse.xtext.junit4.XtextRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.yakindu.sct.model.sexec.interpreter.test.util.AbstractExecutionFlowTest;
+import org.yakindu.sct.model.sexec.interpreter.test.util.SExecInjectionProvider;
+import com.google.inject.Inject;
+import org.junit.Before;
+import org.yakindu.sct.model.sexec.interpreter.IExecutionFlowInterpreter;
+import org.yakindu.sct.model.sexec.ExecutionFlow;
+import util.TestModels;
+import static junit.framework.Assert.*;
+/**
+ *  Unit TestCase for OutEventLifeCycle
+ */
+@SuppressWarnings("all")
+@RunWith(XtextRunner.class)
+@InjectWith(SExecInjectionProvider.class)
+public class OutEventLifeCycleTest extends AbstractExecutionFlowTest {
+
+	@Inject
+	private TestModels models;
+
+	@Before
+	public void setup() throws Exception {
+		ExecutionFlow flow = models
+				.loadExecutionFlowFromResource("OutEventLifeCycle.sct");
+		initInterpreter(flow);
+	}
+	@Test
+	public void availableAfterCycle() throws Exception {
+		interpreter.enter();
+		raiseEvent("e");
+		interpreter.runCycle();
+		assertTrue(isRaised("f"));
+	}
+	@Test
+	public void availableWithinCycle() throws Exception {
+		interpreter.enter();
+		raiseEvent("e");
+		interpreter.runCycle();
+		assertTrue(getBoolean("f_available_in_cycle"));
+	}
+	@Test
+	public void unvailableWithin2ndCycle() throws Exception {
+		interpreter.enter();
+		raiseEvent("e");
+		interpreter.runCycle();
+		interpreter.runCycle();
+		assertTrue(!getBoolean("f_available_in_next_cycle"));
+	}
+	@Test
+	public void unvailableAfter2ndCycle() throws Exception {
+		interpreter.enter();
+		raiseEvent("e");
+		interpreter.runCycle();
+		interpreter.runCycle();
+		assertTrue(!isRaised("f"));
+	}
+}

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

@@ -110,5 +110,9 @@ public abstract class AbstractExecutionFlowTest {
 	protected void raiseEvent(String eventName, Object value) {
 		context().raiseEvent(eventName, value);
 	}
+	
+	protected boolean isRaised(String eventName) {
+		return context().isEventRaised(eventName);
+	}
 
 }

+ 3 - 0
test-plugins/org.yakindu.sct.test.models/.settings/org.eclipse.core.resources.prefs

@@ -2,10 +2,13 @@ eclipse.preferences.version=1
 encoding//testmodels/AlwaysOncycle.sct=UTF-8
 encoding//testmodels/AssignmentAsExpression.sct=UTF-8
 encoding//testmodels/Declarations.sct=UTF-8
+encoding//testmodels/Exit.sct=UTF-8
 encoding//testmodels/ExitOnSelfTransition.sct=UTF-8
 encoding//testmodels/GuardedEntry.sct=UTF-8
 encoding//testmodels/GuardedExit.sct=UTF-8
+encoding//testmodels/InEventLifeCycle.sct=UTF-8
 encoding//testmodels/InternalEventLifeCycle.sct=UTF-8
+encoding//testmodels/OutEventLifeCycle.sct=UTF-8
 encoding//testmodels/PerformanceTest.sct=UTF-8
 encoding//testmodels/SyncJoin.sct=UTF-8
 encoding//testmodels/VariableInitialization.sct=UTF-8

+ 96 - 0
test-plugins/org.yakindu.sct.test.models/testmodels/Exit.sct

@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:sgraph="http://www.yakindu.org/sct/sgraph/2.0.0">
+  <sgraph:Statechart xmi:id="_swne0CDuEeKN8YnMtOtGUA" specification="&#xA;interface: &#xA;&#x9;in event e" name="Exit">
+    <regions xmi:id="_swos8iDuEeKN8YnMtOtGUA" name="main region">
+      <vertices xsi:type="sgraph:Entry" xmi:id="_swuMgyDuEeKN8YnMtOtGUA">
+        <outgoingTransitions xmi:id="_swwowyDuEeKN8YnMtOtGUA" target="_swvaoSDuEeKN8YnMtOtGUA"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_swvaoSDuEeKN8YnMtOtGUA" name="A" incomingTransitions="_swwowyDuEeKN8YnMtOtGUA">
+        <outgoingTransitions xmi:id="_5dgWQCDwEeKswNUOmH6kuA" specification="e" target="_4bF3ACDwEeKswNUOmH6kuA"/>
+      </vertices>
+      <vertices xsi:type="sgraph:Exit" xmi:id="_4bF3ACDwEeKswNUOmH6kuA" incomingTransitions="_5dgWQCDwEeKswNUOmH6kuA"/>
+    </regions>
+  </sgraph:Statechart>
+  <notation:Diagram xmi:id="_swos8CDuEeKN8YnMtOtGUA" type="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor" element="_swne0CDuEeKN8YnMtOtGUA" measurementUnit="Pixel">
+    <children xmi:id="_swrwQCDuEeKN8YnMtOtGUA" type="Region" element="_swos8iDuEeKN8YnMtOtGUA">
+      <children xsi:type="notation:DecorationNode" xmi:id="_swtlcCDuEeKN8YnMtOtGUA" type="RegionName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_swtlcSDuEeKN8YnMtOtGUA"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_swtlciDuEeKN8YnMtOtGUA"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_swuMgCDuEeKN8YnMtOtGUA" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+        <children xmi:id="_swuzkCDuEeKN8YnMtOtGUA" type="Entry" element="_swuMgyDuEeKN8YnMtOtGUA">
+          <children xmi:id="_swuzkyDuEeKN8YnMtOtGUA" type="BorderItemLabelContainer">
+            <children xsi:type="notation:DecorationNode" xmi:id="_swuzliDuEeKN8YnMtOtGUA" type="BorderItemLabel">
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_swuzlyDuEeKN8YnMtOtGUA"/>
+              <layoutConstraint xsi:type="notation:Location" xmi:id="_swuzmCDuEeKN8YnMtOtGUA"/>
+            </children>
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_swuzlCDuEeKN8YnMtOtGUA" fontName="Verdana" lineColor="4210752"/>
+            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_swuzlSDuEeKN8YnMtOtGUA"/>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_swuzkSDuEeKN8YnMtOtGUA" fontName="Verdana" lineColor="4210752"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_swvaoCDuEeKN8YnMtOtGUA" x="70" y="20"/>
+        </children>
+        <children xmi:id="_swvaoyDuEeKN8YnMtOtGUA" type="State" element="_swvaoSDuEeKN8YnMtOtGUA">
+          <children xsi:type="notation:DecorationNode" xmi:id="_swwBsCDuEeKN8YnMtOtGUA" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_swwBsSDuEeKN8YnMtOtGUA"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_swwBsiDuEeKN8YnMtOtGUA"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_swwBsyDuEeKN8YnMtOtGUA" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_swwBtCDuEeKN8YnMtOtGUA" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_swwBtSDuEeKN8YnMtOtGUA"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_swwowCDuEeKN8YnMtOtGUA" type="StateFigureCompartment"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_swvapCDuEeKN8YnMtOtGUA" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_swvapSDuEeKN8YnMtOtGUA"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_swwowSDuEeKN8YnMtOtGUA"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_swwowiDuEeKN8YnMtOtGUA" x="60" y="79"/>
+        </children>
+        <children xmi:id="_4bwlYCDwEeKswNUOmH6kuA" type="Exit" element="_4bF3ACDwEeKswNUOmH6kuA">
+          <children xmi:id="_4b020CDwEeKswNUOmH6kuA" type="BorderItemLabelContainer">
+            <children xsi:type="notation:DecorationNode" xmi:id="_4b1d4CDwEeKswNUOmH6kuA" type="BorderItemLabel">
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_4b1d4SDwEeKswNUOmH6kuA"/>
+              <layoutConstraint xsi:type="notation:Location" xmi:id="_4b2E8CDwEeKswNUOmH6kuA"/>
+            </children>
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_4b020SDwEeKswNUOmH6kuA" fontName="Verdana" lineColor="4210752"/>
+            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_4b020iDwEeKswNUOmH6kuA"/>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_4bwlYSDwEeKswNUOmH6kuA" fontName="Verdana" lineColor="4210752"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_4bwlYiDwEeKswNUOmH6kuA" x="71" y="195"/>
+        </children>
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_swuMgSDuEeKN8YnMtOtGUA"/>
+      </children>
+      <styles xsi:type="notation:ShapeStyle" xmi:id="_swrwQSDuEeKN8YnMtOtGUA" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_swuMgiDuEeKN8YnMtOtGUA" x="220" y="10" width="400" height="400"/>
+    </children>
+    <children xsi:type="notation:Shape" xmi:id="_swx24yDuEeKN8YnMtOtGUA" type="StatechartText" fontName="Verdana" lineColor="4210752">
+      <children xsi:type="notation:DecorationNode" xmi:id="_swyd8CDuEeKN8YnMtOtGUA" type="StatechartName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_swyd8SDuEeKN8YnMtOtGUA"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_swyd8iDuEeKN8YnMtOtGUA"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_swyd8yDuEeKN8YnMtOtGUA" type="StatechartTextExpression" fontName="Verdana" lineColor="4210752">
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_swyd9CDuEeKN8YnMtOtGUA"/>
+      </children>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_swyd9SDuEeKN8YnMtOtGUA" x="10" y="10" width="200" height="400"/>
+    </children>
+    <styles xsi:type="notation:DiagramStyle" xmi:id="_swos8SDuEeKN8YnMtOtGUA"/>
+    <edges xmi:id="_swxP0CDuEeKN8YnMtOtGUA" type="Transition" element="_swwowyDuEeKN8YnMtOtGUA" source="_swuzkCDuEeKN8YnMtOtGUA" target="_swvaoyDuEeKN8YnMtOtGUA">
+      <children xsi:type="notation:DecorationNode" xmi:id="_swx24CDuEeKN8YnMtOtGUA" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_swx24SDuEeKN8YnMtOtGUA"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_swx24iDuEeKN8YnMtOtGUA" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_swxP0SDuEeKN8YnMtOtGUA" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_swxP0yDuEeKN8YnMtOtGUA" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_swxP0iDuEeKN8YnMtOtGUA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+    </edges>
+    <edges xmi:id="_5diygCDwEeKswNUOmH6kuA" type="Transition" element="_5dgWQCDwEeKswNUOmH6kuA" source="_swvaoyDuEeKN8YnMtOtGUA" target="_4bwlYCDwEeKswNUOmH6kuA">
+      <children xsi:type="notation:DecorationNode" xmi:id="_5djZkCDwEeKswNUOmH6kuA" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_5djZkSDwEeKswNUOmH6kuA"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_5djZkiDwEeKswNUOmH6kuA" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_5diygSDwEeKswNUOmH6kuA" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_5diygyDwEeKswNUOmH6kuA" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_5diygiDwEeKswNUOmH6kuA" points="[-2, 27, -3, -70]$[-4, 92, -5, -5]"/>
+    </edges>
+  </notation:Diagram>
+</xmi:XMI>

+ 72 - 0
test-plugins/org.yakindu.sct.test.models/testmodels/InEventLifeCycle.sct

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:sgraph="http://www.yakindu.org/sct/sgraph/2.0.0">
+  <sgraph:Statechart xmi:id="_QYDUUCqSEeK5o5XjGVg6vQ" specification="&#xA;interface :&#xA;&#x9;in event e&#xA;&#x9;&#xA;&#x9;var i : integer = 0" name="InEventLifeCycle">
+    <regions xmi:id="_QY6P8CqSEeK5o5XjGVg6vQ" name="main region">
+      <vertices xsi:type="sgraph:Entry" xmi:id="_QZeQoCqSEeK5o5XjGVg6vQ">
+        <outgoingTransitions xmi:id="_QZmzgCqSEeK5o5XjGVg6vQ" target="_QZgF0CqSEeK5o5XjGVg6vQ"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_QZgF0CqSEeK5o5XjGVg6vQ" specification="e / i+=1" name="A" incomingTransitions="_QZmzgCqSEeK5o5XjGVg6vQ"/>
+    </regions>
+  </sgraph:Statechart>
+  <notation:Diagram xmi:id="_QY5B0CqSEeK5o5XjGVg6vQ" type="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor" element="_QYDUUCqSEeK5o5XjGVg6vQ" measurementUnit="Pixel">
+    <children xmi:id="_QZA9oCqSEeK5o5XjGVg6vQ" type="Region" element="_QY6P8CqSEeK5o5XjGVg6vQ">
+      <children xsi:type="notation:DecorationNode" xmi:id="_QZb0YCqSEeK5o5XjGVg6vQ" type="RegionName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_QZb0YSqSEeK5o5XjGVg6vQ"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_QZb0YiqSEeK5o5XjGVg6vQ"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_QZdCgCqSEeK5o5XjGVg6vQ" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+        <children xmi:id="_QZe3sCqSEeK5o5XjGVg6vQ" type="Entry" element="_QZeQoCqSEeK5o5XjGVg6vQ">
+          <children xmi:id="_QZe3syqSEeK5o5XjGVg6vQ" type="BorderItemLabelContainer">
+            <children xsi:type="notation:DecorationNode" xmi:id="_QZfewCqSEeK5o5XjGVg6vQ" type="BorderItemLabel">
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_QZfewSqSEeK5o5XjGVg6vQ"/>
+              <layoutConstraint xsi:type="notation:Location" xmi:id="_QZfewiqSEeK5o5XjGVg6vQ"/>
+            </children>
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_QZe3tCqSEeK5o5XjGVg6vQ" fontName="Verdana" lineColor="4210752"/>
+            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_QZe3tSqSEeK5o5XjGVg6vQ"/>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_QZe3sSqSEeK5o5XjGVg6vQ" fontName="Verdana" lineColor="4210752"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_QZfewyqSEeK5o5XjGVg6vQ" x="70" y="20"/>
+        </children>
+        <children xmi:id="_QZjJICqSEeK5o5XjGVg6vQ" type="State" element="_QZgF0CqSEeK5o5XjGVg6vQ">
+          <children xsi:type="notation:DecorationNode" xmi:id="_QZjJJCqSEeK5o5XjGVg6vQ" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_QZjJJSqSEeK5o5XjGVg6vQ"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_QZjJJiqSEeK5o5XjGVg6vQ"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_QZkXQCqSEeK5o5XjGVg6vQ" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_QZk-UCqSEeK5o5XjGVg6vQ" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_QZk-USqSEeK5o5XjGVg6vQ"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_QZk-UiqSEeK5o5XjGVg6vQ" type="StateFigureCompartment"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_QZjJISqSEeK5o5XjGVg6vQ" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_QZjJIiqSEeK5o5XjGVg6vQ"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_QZllYCqSEeK5o5XjGVg6vQ"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_QZllYSqSEeK5o5XjGVg6vQ" x="52" y="79"/>
+        </children>
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_QZdCgSqSEeK5o5XjGVg6vQ"/>
+      </children>
+      <styles xsi:type="notation:ShapeStyle" xmi:id="_QZA9oSqSEeK5o5XjGVg6vQ" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_QZdpkCqSEeK5o5XjGVg6vQ" x="220" y="10" width="400" height="400"/>
+    </children>
+    <children xsi:type="notation:Shape" xmi:id="_QZs6ICqSEeK5o5XjGVg6vQ" type="StatechartText" fontName="Verdana" lineColor="4210752">
+      <children xsi:type="notation:DecorationNode" xmi:id="_QZs6IiqSEeK5o5XjGVg6vQ" type="StatechartName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_QZs6IyqSEeK5o5XjGVg6vQ"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_QZthMCqSEeK5o5XjGVg6vQ"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_QZthMSqSEeK5o5XjGVg6vQ" type="StatechartTextExpression" fontName="Verdana" lineColor="4210752">
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_QZthMiqSEeK5o5XjGVg6vQ"/>
+      </children>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_QZthMyqSEeK5o5XjGVg6vQ" x="10" y="10" width="200" height="400"/>
+    </children>
+    <styles xsi:type="notation:DiagramStyle" xmi:id="_QY5B0SqSEeK5o5XjGVg6vQ"/>
+    <edges xmi:id="_QZrsACqSEeK5o5XjGVg6vQ" type="Transition" element="_QZmzgCqSEeK5o5XjGVg6vQ" source="_QZe3sCqSEeK5o5XjGVg6vQ" target="_QZjJICqSEeK5o5XjGVg6vQ">
+      <children xsi:type="notation:DecorationNode" xmi:id="_QZsTESqSEeK5o5XjGVg6vQ" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_QZsTEiqSEeK5o5XjGVg6vQ"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_QZsTEyqSEeK5o5XjGVg6vQ" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_QZrsASqSEeK5o5XjGVg6vQ" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_QZsTECqSEeK5o5XjGVg6vQ" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_QZrsAiqSEeK5o5XjGVg6vQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+    </edges>
+  </notation:Diagram>
+</xmi:XMI>

File diff suppressed because it is too large
+ 1 - 1
test-plugins/org.yakindu.sct.test.models/testmodels/IntegerExpressions.sct


+ 154 - 0
test-plugins/org.yakindu.sct.test.models/testmodels/OutEventLifeCycle.sct

@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:sgraph="http://www.yakindu.org/sct/sgraph/2.0.0">
+  <sgraph:Statechart xmi:id="_UYAMsCdmEeKIUcvKJ7R2Xg" specification="&#xA;&#xA;interface :&#xA;&#xA;&#x9;in event e&#xA;&#x9;out event f&#xA;&#x9;&#xA;&#x9;var f_available_in_cycle : boolean = false&#x9;&#xA;&#x9;var f_available_in_next_cycle : boolean = false" name="OutEventLifeCycle">
+    <regions xmi:id="_UYCB4idmEeKIUcvKJ7R2Xg" name="r1">
+      <vertices xsi:type="sgraph:Entry" xmi:id="_UYHhcSdmEeKIUcvKJ7R2Xg">
+        <outgoingTransitions xmi:id="_UYKkwydmEeKIUcvKJ7R2Xg" target="_UYIvlCdmEeKIUcvKJ7R2Xg"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_UYIvlCdmEeKIUcvKJ7R2Xg" specification="" name="A" incomingTransitions="_UYKkwydmEeKIUcvKJ7R2Xg">
+        <outgoingTransitions xmi:id="_GO1zUCkLEeKkhf1edRNNAA" specification="e / raise f" target="_Eq3fICkLEeKkhf1edRNNAA"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_Eq3fICkLEeKkhf1edRNNAA" specification="f / f_available_in_next_cycle = true" name="B" incomingTransitions="_GO1zUCkLEeKkhf1edRNNAA"/>
+    </regions>
+    <regions xmi:id="__V-TgCkJEeKkhf1edRNNAA" name="r2">
+      <vertices xsi:type="sgraph:Entry" xmi:id="_BZRoACkKEeKkhf1edRNNAA">
+        <outgoingTransitions xmi:id="_CzZcoCkKEeKkhf1edRNNAA" specification="" target="_BuK58CkKEeKkhf1edRNNAA"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_BuK58CkKEeKkhf1edRNNAA" specification="f / f_available_in_cycle = true" name="B" incomingTransitions="_CzZcoCkKEeKkhf1edRNNAA"/>
+    </regions>
+  </sgraph:Statechart>
+  <notation:Diagram xmi:id="_UYCB4CdmEeKIUcvKJ7R2Xg" type="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor" element="_UYAMsCdmEeKIUcvKJ7R2Xg" measurementUnit="Pixel">
+    <children xmi:id="_UYEeICdmEeKIUcvKJ7R2Xg" type="Region" element="_UYCB4idmEeKIUcvKJ7R2Xg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_UYG6YCdmEeKIUcvKJ7R2Xg" type="RegionName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_UYG6YSdmEeKIUcvKJ7R2Xg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_UYG6YidmEeKIUcvKJ7R2Xg"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_UYG6YydmEeKIUcvKJ7R2Xg" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+        <children xmi:id="_UYHhcidmEeKIUcvKJ7R2Xg" type="Entry" element="_UYHhcSdmEeKIUcvKJ7R2Xg">
+          <children xmi:id="_UYIIgCdmEeKIUcvKJ7R2Xg" type="BorderItemLabelContainer">
+            <children xsi:type="notation:DecorationNode" xmi:id="_UYIvkCdmEeKIUcvKJ7R2Xg" type="BorderItemLabel">
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_UYIvkSdmEeKIUcvKJ7R2Xg"/>
+              <layoutConstraint xsi:type="notation:Location" xmi:id="_UYIvkidmEeKIUcvKJ7R2Xg"/>
+            </children>
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_UYIIgSdmEeKIUcvKJ7R2Xg" fontName="Verdana" lineColor="4210752"/>
+            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_UYIIgidmEeKIUcvKJ7R2Xg"/>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_UYHhcydmEeKIUcvKJ7R2Xg" fontName="Verdana" lineColor="4210752"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_UYIvkydmEeKIUcvKJ7R2Xg" x="82" y="19"/>
+        </children>
+        <children xmi:id="_UYJWoCdmEeKIUcvKJ7R2Xg" type="State" element="_UYIvlCdmEeKIUcvKJ7R2Xg">
+          <children xsi:type="notation:DecorationNode" xmi:id="_UYJWpCdmEeKIUcvKJ7R2Xg" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_UYJWpSdmEeKIUcvKJ7R2Xg"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_UYJ9sCdmEeKIUcvKJ7R2Xg"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_UYJ9sSdmEeKIUcvKJ7R2Xg" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_UYJ9sidmEeKIUcvKJ7R2Xg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_UYJ9sydmEeKIUcvKJ7R2Xg"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_UYKkwCdmEeKIUcvKJ7R2Xg" type="StateFigureCompartment"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_UYJWoSdmEeKIUcvKJ7R2Xg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_UYJWoidmEeKIUcvKJ7R2Xg"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_UYKkwSdmEeKIUcvKJ7R2Xg"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_UYKkwidmEeKIUcvKJ7R2Xg" x="29" y="61" width="127"/>
+        </children>
+        <children xmi:id="_Eq9lwCkLEeKkhf1edRNNAA" type="State" element="_Eq3fICkLEeKkhf1edRNNAA">
+          <children xsi:type="notation:DecorationNode" xmi:id="_Eq9lxCkLEeKkhf1edRNNAA" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_Eq9lxSkLEeKkhf1edRNNAA"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_Eq-M0CkLEeKkhf1edRNNAA"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_Eq-M0SkLEeKkhf1edRNNAA" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_Eq-M0ikLEeKkhf1edRNNAA" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Eq-M0ykLEeKkhf1edRNNAA"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_Eq-M1CkLEeKkhf1edRNNAA" type="StateFigureCompartment" collapsed="true"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_Eq9lwSkLEeKkhf1edRNNAA" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_Eq9lwikLEeKkhf1edRNNAA"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_Eq-M1SkLEeKkhf1edRNNAA"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Eq9lwykLEeKkhf1edRNNAA" x="227" y="61" width="190"/>
+        </children>
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_UYG6ZCdmEeKIUcvKJ7R2Xg"/>
+      </children>
+      <styles xsi:type="notation:ShapeStyle" xmi:id="_UYEeISdmEeKIUcvKJ7R2Xg" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_UYHhcCdmEeKIUcvKJ7R2Xg" x="10" y="168" width="511" height="171"/>
+    </children>
+    <children xsi:type="notation:Shape" xmi:id="_UYMZ8CdmEeKIUcvKJ7R2Xg" type="StatechartText" fontName="Verdana" lineColor="4210752">
+      <children xsi:type="notation:DecorationNode" xmi:id="_UYMZ8idmEeKIUcvKJ7R2Xg" type="StatechartName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_UYMZ8ydmEeKIUcvKJ7R2Xg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_UYMZ9CdmEeKIUcvKJ7R2Xg"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_UYMZ9SdmEeKIUcvKJ7R2Xg" type="StatechartTextExpression" fontName="Verdana" lineColor="4210752">
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_UYNBACdmEeKIUcvKJ7R2Xg"/>
+      </children>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_UYNBASdmEeKIUcvKJ7R2Xg" x="10" y="10" width="511" height="159"/>
+    </children>
+    <children xmi:id="__WAvwCkJEeKkhf1edRNNAA" type="Region" element="__V-TgCkJEeKkhf1edRNNAA">
+      <children xsi:type="notation:DecorationNode" xmi:id="__WDzECkJEeKkhf1edRNNAA" type="RegionName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="__WDzESkJEeKkhf1edRNNAA"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="__WDzEikJEeKkhf1edRNNAA"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="__WEaICkJEeKkhf1edRNNAA" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+        <children xmi:id="_BZS2ICkKEeKkhf1edRNNAA" type="Entry" element="_BZRoACkKEeKkhf1edRNNAA">
+          <children xmi:id="_BZUEQCkKEeKkhf1edRNNAA" type="BorderItemLabelContainer">
+            <children xsi:type="notation:DecorationNode" xmi:id="_BZUEQykKEeKkhf1edRNNAA" type="BorderItemLabel">
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_BZUERCkKEeKkhf1edRNNAA"/>
+              <layoutConstraint xsi:type="notation:Location" xmi:id="_BZUERSkKEeKkhf1edRNNAA"/>
+            </children>
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_BZUEQSkKEeKkhf1edRNNAA" fontName="Verdana" lineColor="4210752"/>
+            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_BZUEQikKEeKkhf1edRNNAA"/>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_BZS2ISkKEeKkhf1edRNNAA" fontName="Verdana" lineColor="4210752"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_BZS2IikKEeKkhf1edRNNAA" x="51" y="46"/>
+        </children>
+        <children xmi:id="_BuMIECkKEeKkhf1edRNNAA" type="State" element="_BuK58CkKEeKkhf1edRNNAA">
+          <children xsi:type="notation:DecorationNode" xmi:id="_BuMvICkKEeKkhf1edRNNAA" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_BuMvISkKEeKkhf1edRNNAA"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_BuMvIikKEeKkhf1edRNNAA"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_BuMvIykKEeKkhf1edRNNAA" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_BuMvJCkKEeKkhf1edRNNAA" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_BuMvJSkKEeKkhf1edRNNAA"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_BuNWMCkKEeKkhf1edRNNAA" type="StateFigureCompartment"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_BuMIESkKEeKkhf1edRNNAA" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_BuMIEikKEeKkhf1edRNNAA"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_BuNWMSkKEeKkhf1edRNNAA"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_BuMIEykKEeKkhf1edRNNAA" x="123" y="21" width="178"/>
+        </children>
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="__WEaISkJEeKkhf1edRNNAA"/>
+      </children>
+      <styles xsi:type="notation:ShapeStyle" xmi:id="__WAvwSkJEeKkhf1edRNNAA" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="__WAvwikJEeKkhf1edRNNAA" x="10" y="338" width="511" height="157"/>
+    </children>
+    <styles xsi:type="notation:DiagramStyle" xmi:id="_UYCB4SdmEeKIUcvKJ7R2Xg"/>
+    <edges xmi:id="_UYLy4CdmEeKIUcvKJ7R2Xg" type="Transition" element="_UYKkwydmEeKIUcvKJ7R2Xg" source="_UYHhcidmEeKIUcvKJ7R2Xg" target="_UYJWoCdmEeKIUcvKJ7R2Xg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_UYLy5CdmEeKIUcvKJ7R2Xg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_UYLy5SdmEeKIUcvKJ7R2Xg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_UYLy5idmEeKIUcvKJ7R2Xg" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_UYLy4SdmEeKIUcvKJ7R2Xg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_UYLy4ydmEeKIUcvKJ7R2Xg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_UYLy4idmEeKIUcvKJ7R2Xg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+    </edges>
+    <edges xmi:id="_CzbR0CkKEeKkhf1edRNNAA" type="Transition" element="_CzZcoCkKEeKkhf1edRNNAA" source="_BZS2ICkKEeKkhf1edRNNAA" target="_BuMIECkKEeKkhf1edRNNAA">
+      <children xsi:type="notation:DecorationNode" xmi:id="_Czcf8CkKEeKkhf1edRNNAA" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_Czcf8SkKEeKkhf1edRNNAA"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_Czcf8ikKEeKkhf1edRNNAA" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_Czb44CkKEeKkhf1edRNNAA" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_Czb44ikKEeKkhf1edRNNAA" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_Czb44SkKEeKkhf1edRNNAA" points="[6, 4, -84, -63]$[87, 41, -3, -26]"/>
+    </edges>
+    <edges xmi:id="_GO2aYCkLEeKkhf1edRNNAA" type="Transition" element="_GO1zUCkLEeKkhf1edRNNAA" source="_UYJWoCdmEeKIUcvKJ7R2Xg" target="_Eq9lwCkLEeKkhf1edRNNAA">
+      <children xsi:type="notation:DecorationNode" xmi:id="_GO3BcSkLEeKkhf1edRNNAA" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_GO3BcikLEeKkhf1edRNNAA"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_GO3BcykLEeKkhf1edRNNAA" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_GO2aYSkLEeKkhf1edRNNAA" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_GO3BcCkLEeKkhf1edRNNAA" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_GO2aYikLEeKkhf1edRNNAA" points="[61, 2, -99, 2]$[156, 27, -4, 27]"/>
+    </edges>
+  </notation:Diagram>
+</xmi:XMI>

+ 1 - 1
test-plugins/org.yakindu.sct.test.models/testmodels/VariableInitialization.sct

@@ -5,7 +5,7 @@
       <vertices xsi:type="sgraph:Entry" xmi:id="_Y-HxMRL3EeKu2KdLepPy5Q">
         <outgoingTransitions xmi:id="_Y-KNcxL3EeKu2KdLepPy5Q" target="_Y-I_URL3EeKu2KdLepPy5Q"/>
       </vertices>
-      <vertices xsi:type="sgraph:State" xmi:id="_Y-I_URL3EeKu2KdLepPy5Q" incomingTransitions="_Y-KNcxL3EeKu2KdLepPy5Q"/>
+      <vertices xsi:type="sgraph:State" xmi:id="_Y-I_URL3EeKu2KdLepPy5Q" name="A" incomingTransitions="_Y-KNcxL3EeKu2KdLepPy5Q"/>
     </regions>
   </sgraph:Statechart>
   <notation:Diagram xmi:id="_Y9qeMBL3EeKu2KdLepPy5Q" type="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor" element="_Y9opABL3EeKu2KdLepPy5Q" measurementUnit="Pixel">

+ 1 - 1
test-plugins/org.yakindu.sct.test.models/tests/AllTests.sctunit

@@ -7,7 +7,7 @@ testsuite AllTests {
 	GuardedEntry,
 	GuardedExit, 
 	IntegerExpressions,
-	InternalEventLifeCycle,
+	InEventLifeCycle, InternalEventLifeCycle, OutEventLifeCycle,
 	Parenthesis, PriorityValues , RaiseEvent , SameNameDifferentRegion , ShallowHistory ,
 	SimpleHietachy , StateIsActive , StatechartLocalReactions , StringExpressions, SyncFork ,
 	SyncJoin , ValuedEvent , simpleEvent 

+ 23 - 0
test-plugins/org.yakindu.sct.test.models/tests/InEventLifeCycle.sctunit

@@ -0,0 +1,23 @@
+
+/**
+ * @author axel terfloth
+ */
+testgroup InEventLifeCycle for statechart InEventLifeCycle {
+	
+	/** TODO: we require a probe interface for white box testing */
+	test eventLifeCycle {
+		
+		enter
+		
+		raise e 
+		
+		// assert e		// the in event must be set before the cycle  
+		assert i == 0	// e is not consumed yet
+		cycle
+		
+		// assert ! e		// after the cycle the event is not available anymore
+		assert i == 1	// within the cycle the in event was consumed
+		
+	}
+		
+}

+ 6 - 1
test-plugins/org.yakindu.sct.test.models/tests/InternalEventLifeCycle.sctunit

@@ -1,4 +1,7 @@
 
+/** 
+ * @author axel terfloth
+ */
 testgroup InternalEventLifeCycle for statechart InternalEventLifeCycle {
 
 	test InternalEventLifeCycleTest {
@@ -14,7 +17,9 @@ testgroup InternalEventLifeCycle for statechart InternalEventLifeCycle {
 		cycle		
 		assert active(InternalEventLifeCycle.r1.A)
 		assert active(InternalEventLifeCycle.r2.D)
-		// assert ! i1
+
+		// the internal event must not be visible after the cycle
+		// but we can't access internal elements yet : assert ! i1
 		
 
 		// make sure nothing happens during an empty cycle		

+ 53 - 0
test-plugins/org.yakindu.sct.test.models/tests/OutEventLifeCycle.sctunit

@@ -0,0 +1,53 @@
+
+/**
+ * @author axel terfloth
+ */
+testgroup OutEventLifeCycle for statechart OutEventLifeCycle {
+	
+	
+	/* an outgoing event must be accessible after the cycle that raised the event. */
+	test availableAfterCycle {
+		enter
+
+		raise e
+		cycle
+		
+		assert f
+		
+	} 
+		
+	/* an outgoing event must be accessible within the cycle that raised the event. */
+	test availableWithinCycle {
+		enter
+
+		raise e
+		cycle
+		assert f_available_in_cycle
+		
+	} 
+		
+		
+	/* an outgoing event that was raised in one cycle is not available within the next cycle */
+	test unvailableWithin2ndCycle {
+		enter
+
+		raise e
+		cycle
+		
+		cycle
+		assert ! f_available_in_next_cycle 
+	}
+		
+		
+	/* an outgoing event that was raised in one cycle is not available after the following cycle */
+	test unvailableAfter2ndCycle {
+		enter
+
+		raise e
+		cycle
+		
+		cycle
+		assert !f
+	}
+		
+}