Merge remote-tracking branch 'origin/R120'

Change-Id: Ieb6bc670a2d15af51f0fd5b4b99bd27bbac640d0
diff --git a/doc/www/news.html b/doc/www/news.html
index 2df43f3..37d7cdf 100644
--- a/doc/www/news.html
+++ b/doc/www/news.html
@@ -1,5 +1,6 @@
 <h3>News</h3>
 <ul>
+<li><span class="dates">06-02-2015</span>: Henshin 1.2 released! Check out the new <a href="https://www.youtube.com/watch?v=PbEZxEdSo2A">Giraph code generator</a></li>
 <li><span class="dates">28-12-2014</span>: Bugfix release 1.0.0.201412281229 fixes a  problem in the handling of PACs in the interpreter</li>
 <li><span class="dates">16-08-2014</span>: Henshin 1.0.0.201408162130: Bugfix release</li>
 <li><span class="dates">28-07-2014</span>: <b>Henshin 1.0 released!</b></li>
diff --git a/features/org.eclipse.emf.henshin.sdk/feature.xml b/features/org.eclipse.emf.henshin.sdk/feature.xml
index 434105d..a407c8b 100644
--- a/features/org.eclipse.emf.henshin.sdk/feature.xml
+++ b/features/org.eclipse.emf.henshin.sdk/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.emf.henshin.sdk"
       label="%featureName"
-      version="1.2.0.qualifier"
+      version="1.3.0.qualifier"
       provider-name="%providerName">
 
    <description>
@@ -72,90 +72,90 @@
          id="org.eclipse.emf.henshin.model"
          download-size="0"
          install-size="0"
-         version="1.2.0.qualifier"
+         version="1.3.0.qualifier"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.emf.henshin.edit"
          download-size="0"
          install-size="0"
-         version="1.2.0.qualifier"/>
+         version="1.3.0.qualifier"/>
 
    <plugin
          id="org.eclipse.emf.henshin.editor"
          download-size="0"
          install-size="0"
-         version="1.2.0.qualifier"
+         version="1.3.0.qualifier"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.emf.henshin.diagram"
          download-size="0"
          install-size="0"
-         version="1.2.0.qualifier"
+         version="1.3.0.qualifier"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.emf.henshin.interpreter"
          download-size="0"
          install-size="0"
-         version="1.2.0.qualifier"
+         version="1.3.0.qualifier"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.emf.henshin.interpreter.ui"
          download-size="0"
          install-size="0"
-         version="1.2.0.qualifier"
+         version="1.3.0.qualifier"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.emf.henshin.examples"
          download-size="0"
          install-size="0"
-         version="1.2.0.qualifier"
+         version="1.3.0.qualifier"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.emf.henshin.statespace"
          download-size="0"
          install-size="0"
-         version="1.2.0.qualifier"
+         version="1.3.0.qualifier"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.emf.henshin.statespace.explorer"
          download-size="0"
          install-size="0"
-         version="1.2.0.qualifier"
+         version="1.3.0.qualifier"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.emf.henshin.statespace.external"
          download-size="0"
          install-size="0"
-         version="1.2.0.qualifier"
+         version="1.3.0.qualifier"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.emf.henshin.trace"
          download-size="0"
          install-size="0"
-         version="1.2.0.qualifier"
+         version="1.3.0.qualifier"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.emf.henshin.wrap"
          download-size="0"
          install-size="0"
-         version="1.2.0.qualifier"
+         version="1.3.0.qualifier"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.emf.henshin.giraph"
          download-size="0"
          install-size="0"
-         version="1.2.0.qualifier"
+         version="1.3.0.qualifier"
          unpack="false"/>
 
 </feature>
diff --git a/features/org.eclipse.emf.henshin.sdk/pom.xml b/features/org.eclipse.emf.henshin.sdk/pom.xml
index 3aa393f..84545aa 100644
--- a/features/org.eclipse.emf.henshin.sdk/pom.xml
+++ b/features/org.eclipse.emf.henshin.sdk/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.sdk</artifactId>
diff --git a/p2updatesite/pom.xml b/p2updatesite/pom.xml
index 9d6e3fb..1a924cd 100644
--- a/p2updatesite/pom.xml
+++ b/p2updatesite/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.p2updatesite</artifactId>
diff --git a/plugins/org.eclipse.emf.henshin.diagram/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.diagram/META-INF/MANIFEST.MF
index 0ce9593..0a6f1bb 100644
--- a/plugins/org.eclipse.emf.henshin.diagram/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.diagram/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.emf.henshin.diagram; singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.henshin.diagram/pom.xml b/plugins/org.eclipse.emf.henshin.diagram/pom.xml
index 22b1ea9..825210d 100644
--- a/plugins/org.eclipse.emf.henshin.diagram/pom.xml
+++ b/plugins/org.eclipse.emf.henshin.diagram/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.diagram</artifactId>
diff --git a/plugins/org.eclipse.emf.henshin.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.edit/META-INF/MANIFEST.MF
index 7859d38..fbe6f75 100644
--- a/plugins/org.eclipse.emf.henshin.edit/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.edit/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.emf.henshin.edit;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.henshin.edit/pom.xml b/plugins/org.eclipse.emf.henshin.edit/pom.xml
index 3c86736..623126b 100644
--- a/plugins/org.eclipse.emf.henshin.edit/pom.xml
+++ b/plugins/org.eclipse.emf.henshin.edit/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.edit</artifactId>
diff --git a/plugins/org.eclipse.emf.henshin.editor/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.editor/META-INF/MANIFEST.MF
index fecd531..a588a23 100644
--- a/plugins/org.eclipse.emf.henshin.editor/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.editor/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.emf.henshin.editor;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.henshin.editor/pom.xml b/plugins/org.eclipse.emf.henshin.editor/pom.xml
index 8fa1f63..e38e050 100644
--- a/plugins/org.eclipse.emf.henshin.editor/pom.xml
+++ b/plugins/org.eclipse.emf.henshin.editor/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.editor</artifactId>
diff --git a/plugins/org.eclipse.emf.henshin.examples/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.examples/META-INF/MANIFEST.MF
index 4cf3989..8e8a5fc 100644
--- a/plugins/org.eclipse.emf.henshin.examples/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.examples/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.emf.henshin.examples;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.henshin.examples/pom.xml b/plugins/org.eclipse.emf.henshin.examples/pom.xml
index 564ad43..112a017 100644
--- a/plugins/org.eclipse.emf.henshin.examples/pom.xml
+++ b/plugins/org.eclipse.emf.henshin.examples/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.examples</artifactId>
diff --git a/plugins/org.eclipse.emf.henshin.giraph/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.giraph/META-INF/MANIFEST.MF
index 30a7d54..316a47b 100644
--- a/plugins/org.eclipse.emf.henshin.giraph/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.giraph/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.emf.henshin.giraph;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Export-Package: org.eclipse.emf.henshin.giraph,
  org.eclipse.emf.henshin.giraph.templates
diff --git a/plugins/org.eclipse.emf.henshin.giraph/pom.xml b/plugins/org.eclipse.emf.henshin.giraph/pom.xml
index f70a13e..327534d 100644
--- a/plugins/org.eclipse.emf.henshin.giraph/pom.xml
+++ b/plugins/org.eclipse.emf.henshin.giraph/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.giraph</artifactId>
diff --git a/plugins/org.eclipse.emf.henshin.interpreter.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.interpreter.ui/META-INF/MANIFEST.MF
index 2e6ae12..97e92ae 100644
--- a/plugins/org.eclipse.emf.henshin.interpreter.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.interpreter.ui/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.emf.henshin.interpreter.ui;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Activator: org.eclipse.emf.henshin.interpreter.ui.HenshinInterpreterUIPlugin$Activator
diff --git a/plugins/org.eclipse.emf.henshin.interpreter.ui/pom.xml b/plugins/org.eclipse.emf.henshin.interpreter.ui/pom.xml
index e41f3cd..f10fa7d 100644
--- a/plugins/org.eclipse.emf.henshin.interpreter.ui/pom.xml
+++ b/plugins/org.eclipse.emf.henshin.interpreter.ui/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.interpreter.ui</artifactId>
diff --git a/plugins/org.eclipse.emf.henshin.interpreter/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.interpreter/META-INF/MANIFEST.MF
index 71e108a..ca8c49f 100644
--- a/plugins/org.eclipse.emf.henshin.interpreter/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.interpreter/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.emf.henshin.interpreter;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.henshin.interpreter/pom.xml b/plugins/org.eclipse.emf.henshin.interpreter/pom.xml
index 0b4dbee..9b4a5d6 100644
--- a/plugins/org.eclipse.emf.henshin.interpreter/pom.xml
+++ b/plugins/org.eclipse.emf.henshin.interpreter/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.interpreter</artifactId>
diff --git a/plugins/org.eclipse.emf.henshin.model/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.model/META-INF/MANIFEST.MF
index 7f28b29..1ab8c93 100644
--- a/plugins/org.eclipse.emf.henshin.model/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.model/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.emf.henshin.model;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.henshin.model/model/henshin.ecore b/plugins/org.eclipse.emf.henshin.model/model/henshin.ecore
index e7d1100..6783794 100644
--- a/plugins/org.eclipse.emf.henshin.model/model/henshin.ecore
+++ b/plugins/org.eclipse.emf.henshin.model/model/henshin.ecore
@@ -216,7 +216,7 @@
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="Edge" eSuperTypes="#//ModelElement #//GraphElement">
     <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
-      <details key="constraints" value="equalParentGraphs indexValidJavaScript"/>
+      <details key="constraints" value="equalParentGraphs indexValidJavaScript noContainmentCycles"/>
     </eAnnotations>
     <eOperations name="getActionEdge" eType="#//Edge"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="source" lowerBound="1"
diff --git a/plugins/org.eclipse.emf.henshin.model/plugin.properties b/plugins/org.eclipse.emf.henshin.model/plugin.properties
index eecd58a..61708cf 100644
--- a/plugins/org.eclipse.emf.henshin.model/plugin.properties
+++ b/plugins/org.eclipse.emf.henshin.model/plugin.properties
@@ -32,6 +32,7 @@
 
 _Constraint_Msg_Edge_equalParentGraphs=Source or target node of edge not contained in same graph
 _Constraint_Msg_Edge_indexValidJavaScript=Error parsing JavaScript expression: {1}
+_Constraint_Msg_Edge_noContainmentCycles=Containment edges should not build a cycle
 
 _Constraint_Msg_IteratedUnit_iterationsNotEmpty=Empty iterations definition
 _Constraint_Msg_IteratedUnit_iterationsValidJavaScript=Error parsing JavaScript expression: {1}
diff --git a/plugins/org.eclipse.emf.henshin.model/pom.xml b/plugins/org.eclipse.emf.henshin.model/pom.xml
index c66d9f0..684b027 100644
--- a/plugins/org.eclipse.emf.henshin.model/pom.xml
+++ b/plugins/org.eclipse.emf.henshin.model/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.model</artifactId>
diff --git a/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/Edge.java b/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/Edge.java
index 597fc50..94e6feb 100644
--- a/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/Edge.java
+++ b/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/Edge.java
@@ -29,7 +29,7 @@
  * </p>
  *
  * @see org.eclipse.emf.henshin.model.HenshinPackage#getEdge()
- * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='equalParentGraphs indexValidJavaScript'"
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='equalParentGraphs indexValidJavaScript noContainmentCycles'"
  * @generated
  */
 public interface Edge extends ModelElement, GraphElement {
diff --git a/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/impl/HenshinPackageImpl.java b/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/impl/HenshinPackageImpl.java
index 3b57860..e38541b 100644
--- a/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/impl/HenshinPackageImpl.java
+++ b/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/impl/HenshinPackageImpl.java
@@ -1819,7 +1819,7 @@
 		  (edgeEClass, 
 		   source, 
 		   new String[] {
-			 "constraints", "equalParentGraphs indexValidJavaScript"
+			 "constraints", "equalParentGraphs indexValidJavaScript noContainmentCycles"
 		   });	
 		addAnnotation
 		  (attributeEClass, 
diff --git a/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/util/ContainmentCycleFinder.java b/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/util/ContainmentCycleFinder.java
new file mode 100644
index 0000000..28864d8
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/util/ContainmentCycleFinder.java
@@ -0,0 +1,106 @@
+package org.eclipse.emf.henshin.model.util;
+
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.henshin.model.Edge;
+import org.eclipse.emf.henshin.model.Graph;
+import org.eclipse.emf.henshin.model.Node;
+
+/**
+ * Utility for the exploring of containment cycles in a {@link Graph} by a depth
+ * first search
+ * 
+ * @author Kristopher Born, Daniel Strüber, Christian Krause
+ *
+ */
+public class ContainmentCycleFinder {
+
+	private List<List<Edge>> cycles;
+
+	/**
+	 * Searches for containment cycles in the graph.
+	 * 
+	 * @param graph
+	 *            Graph to be searched for containment cycles
+	 * @return A list of cycles.
+	 */
+	public List<List<Edge>> findContainmentCycles(Graph graph) {
+		cycles = new LinkedList<List<Edge>>();
+		for (Node node : graph.getNodes()) {
+			searchContainmentCyclesRevursivelyDepthFirst(node,
+					new LinkedList<Edge>());
+		}
+		return cycles;
+	}
+
+	/**
+	 * Searches for containment cycles from the <code>currentNode</code> by
+	 * recursive calling the method itself.
+	 * 
+	 * @param currentNode
+	 *            The starting node to search for cycles.
+	 * @param visitedEdges
+	 *            Already passed edges to reach the current node.
+	 */
+	@SuppressWarnings("unchecked")
+	private void searchContainmentCyclesRevursivelyDepthFirst(Node currentNode,
+			LinkedList<Edge> visitedEdges) {
+		// assemble relevant edges, i.e., outgoing containment or ingoing
+		// container edges
+		Set<Edge> relevantEdges = new HashSet<Edge>();
+		for (Edge e : currentNode.getOutgoing()) {
+			if (e.getType() != null && e.getType().isContainment())
+				relevantEdges.add(e);
+		}
+		for (Edge e : currentNode.getIncoming()) {
+			if (e.getType() != null && e.getType().isContainer())
+				relevantEdges.add(e);
+		}
+
+		for (Edge edge : relevantEdges) {
+			// a cycle is detected when the edge has already been passed in the
+			// history
+			if (visitedEdges.contains(edge)) {
+				// cut out the found cycle and add it to the set of cycles
+				extractCycle(visitedEdges, edge);
+				return;
+			}
+			if (!visitedEdges.contains(edge)) {
+				Node nextNode = (currentNode == edge.getSource() ) ? edge
+						.getTarget() : edge.getSource();
+				visitedEdges.add(edge);
+				searchContainmentCyclesRevursivelyDepthFirst(nextNode,
+						(LinkedList<Edge>) visitedEdges.clone());
+			}
+		}
+	}
+
+	/**
+	 * This method extracts the cycle out of the history of passed edges and
+	 * adds it to the cycles container.
+	 * 
+	 * @param pathOfEdges
+	 *            History of passed edges by the exploration of the cycle
+	 * @param startingEdge
+	 *            Edge where the cycle begins and ends with the last checked
+	 *            edge
+	 */
+	private void extractCycle(LinkedList<Edge> pathOfEdges, Edge startingEdge) {
+		List<Edge> cycle = pathOfEdges.subList(
+				pathOfEdges.indexOf(startingEdge), pathOfEdges.size());
+
+		// prevent to add a cycle twice
+		for (List<Edge> allreadyKnownCycle : cycles) {
+			if (allreadyKnownCycle.size() == cycle.size()) {
+				if (allreadyKnownCycle.containsAll(cycle))
+					return;
+			}
+		}
+		cycles.add(cycle);
+	}
+
+}
diff --git a/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/util/HenshinValidator.java b/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/util/HenshinValidator.java
index d03f96e..f3ab93b 100644
--- a/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/util/HenshinValidator.java
+++ b/plugins/org.eclipse.emf.henshin.model/src/org/eclipse/emf/henshin/model/util/HenshinValidator.java
@@ -10,7 +10,9 @@
 package org.eclipse.emf.henshin.model.util;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.regex.Pattern;
@@ -78,6 +80,8 @@
 	 */
 	private static final ScriptEngineWrapper SCRIPT_ENGINE = new ScriptEngineWrapper(new String[0]);
 
+	private static final  String CONTAINMENT_CYCLES_KEY = new String("CONTAINMENT_CYCLES");
+
 	/**
 	 * Creates an instance of the switch.
 	 * <!-- begin-user-doc --> <!--
@@ -764,6 +768,7 @@
 		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(edge, diagnostics, context);
 		if (result || diagnostics != null) result &= validateEdge_equalParentGraphs(edge, diagnostics, context);
 		if (result || diagnostics != null) result &= validateEdge_indexValidJavaScript(edge, diagnostics, context);
+		if (result || diagnostics != null) result &= validateEdge_noContainmentCycles(edge, diagnostics, context);
 		return result;
 	}
 	
@@ -800,6 +805,43 @@
 	}
 
 	/**
+	 * Validates the noContainmentCycles constraint of '<em>Edge</em>'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated NOT
+	 */
+	@SuppressWarnings("unchecked")
+	public boolean validateEdge_noContainmentCycles(Edge edge, DiagnosticChain diagnostics, Map<Object, Object> context) {
+		boolean result = true;
+		// Try to retrieve previously created graph-to-cycles map. If not available, create new one.
+		Map<Graph,List<List<Edge>>> cycleMap = new HashMap<Graph,List<List<Edge>>>();
+		if (!context.containsKey(CONTAINMENT_CYCLES_KEY)) 
+			context.put(CONTAINMENT_CYCLES_KEY,cycleMap);
+		 else 
+			cycleMap = (Map<Graph, List<List<Edge>>>) context.get(CONTAINMENT_CYCLES_KEY);
+		
+		// Try to retrieve previously created cycle map for the edge's host graph.
+		// If not available, create new one.
+		List<List<Edge>> cycles = new ArrayList<List<Edge>>();
+		if (cycleMap.containsKey(edge.getGraph())) {
+			cycles = cycleMap.get(edge.getGraph());
+		} else {
+			ContainmentCycleFinder cycleFinder = new ContainmentCycleFinder();
+			cycles = cycleFinder.findContainmentCycles(edge.getGraph());  
+			cycleMap.put(edge.getGraph(), cycles);
+		}
+			
+		// If edge is part of cycle, highlight it.
+		for (List<Edge> cycle : cycles) {
+			if(cycle.contains(edge) && result){
+				result = false;
+				diagnostics.add(createDiagnostic(Diagnostic.WARNING, edge, Edge.class, "noContainmentCycles", context));
+			}
+		}
+		return result;
+	}
+
+	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
diff --git a/plugins/org.eclipse.emf.henshin.statespace.explorer/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.statespace.explorer/META-INF/MANIFEST.MF
index 4179c95..8876da3 100644
--- a/plugins/org.eclipse.emf.henshin.statespace.explorer/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.statespace.explorer/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.emf.henshin.statespace.explorer;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.henshin.statespace.explorer/pom.xml b/plugins/org.eclipse.emf.henshin.statespace.explorer/pom.xml
index 45db175..e8e1f0a 100644
--- a/plugins/org.eclipse.emf.henshin.statespace.explorer/pom.xml
+++ b/plugins/org.eclipse.emf.henshin.statespace.explorer/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.statespace.explorer</artifactId>
diff --git a/plugins/org.eclipse.emf.henshin.statespace.external/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.statespace.external/META-INF/MANIFEST.MF
index 844637c..9a125f8 100644
--- a/plugins/org.eclipse.emf.henshin.statespace.external/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.statespace.external/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: External State Space Validators
 Bundle-SymbolicName: org.eclipse.emf.henshin.statespace.external;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Vendor: Eclipse Modeling Project
 Require-Bundle: org.eclipse.core.resources;bundle-version="3.6.0",
diff --git a/plugins/org.eclipse.emf.henshin.statespace.external/pom.xml b/plugins/org.eclipse.emf.henshin.statespace.external/pom.xml
index c53cc5b..29b1971 100644
--- a/plugins/org.eclipse.emf.henshin.statespace.external/pom.xml
+++ b/plugins/org.eclipse.emf.henshin.statespace.external/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.statespace.external</artifactId>
diff --git a/plugins/org.eclipse.emf.henshin.statespace/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.statespace/META-INF/MANIFEST.MF
index 4b4ebf1..a6e0fd0 100644
--- a/plugins/org.eclipse.emf.henshin.statespace/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.statespace/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.emf.henshin.statespace;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.henshin.statespace/pom.xml b/plugins/org.eclipse.emf.henshin.statespace/pom.xml
index fe64d0b..fa9c8c4 100644
--- a/plugins/org.eclipse.emf.henshin.statespace/pom.xml
+++ b/plugins/org.eclipse.emf.henshin.statespace/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.statespace</artifactId>
diff --git a/plugins/org.eclipse.emf.henshin.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.tests/META-INF/MANIFEST.MF
index 714e6e1..2b38820 100644
--- a/plugins/org.eclipse.emf.henshin.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.emf.henshin.tests;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.emf.henshin.tests/pom.xml b/plugins/org.eclipse.emf.henshin.tests/pom.xml
index 6a8fd12..c7e5cb8 100644
--- a/plugins/org.eclipse.emf.henshin.tests/pom.xml
+++ b/plugins/org.eclipse.emf.henshin.tests/pom.xml
@@ -6,7 +6,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.tests</artifactId>
@@ -17,6 +17,7 @@
       <plugin>
         <groupId>org.eclipse.tycho</groupId>
         <artifactId>tycho-surefire-plugin</artifactId>
+        <version>${tycho-version}</version>
         <configuration>
           <includes>
             <include>**/*.java</include>
diff --git a/plugins/org.eclipse.emf.henshin.trace/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.trace/META-INF/MANIFEST.MF
index ecd88fb..36a1fbd 100644
--- a/plugins/org.eclipse.emf.henshin.trace/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.trace/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.emf.henshin.trace;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.emf.henshin.trace/pom.xml b/plugins/org.eclipse.emf.henshin.trace/pom.xml
index 15a94dc..d3ea980 100644
--- a/plugins/org.eclipse.emf.henshin.trace/pom.xml
+++ b/plugins/org.eclipse.emf.henshin.trace/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.trace</artifactId>
diff --git a/plugins/org.eclipse.emf.henshin.wrap/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.wrap/META-INF/MANIFEST.MF
index 8c443bd..3f8a56a 100644
--- a/plugins/org.eclipse.emf.henshin.wrap/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.wrap/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.emf.henshin.wrap;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.emf.henshin.wrap/pom.xml b/plugins/org.eclipse.emf.henshin.wrap/pom.xml
index ac4beee..2cfb71d 100644
--- a/plugins/org.eclipse.emf.henshin.wrap/pom.xml
+++ b/plugins/org.eclipse.emf.henshin.wrap/pom.xml
@@ -7,7 +7,7 @@
     <relativePath>../../pom.xml</relativePath>
     <groupId>org.eclipse.emf.henshin</groupId>
     <artifactId>parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.emf.henshin.wrap</artifactId>
diff --git a/pom.xml b/pom.xml
index e372c8e..06eec75 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.eclipse.emf.henshin</groupId>
   <artifactId>parent</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.3.0-SNAPSHOT</version>
   <packaging>pom</packaging>
   <modules>
     <module>plugins/org.eclipse.emf.henshin.diagram</module>