// This file has been generated automatically by GrGen (www.grgen.net)
// Do not modify this file! Any changes will be lost!
// Generated from "..\..\examples\ProgramGraphs\ProgramGraphsOriginal.grg" on Mon Nov 18 19:45:53 CET 2024

//#pragma warning disable CS0219, CS0162
#pragma warning disable 219, 162

using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using System.Threading;
using System.Diagnostics;
using GRGEN_LIBGR = de.unika.ipd.grGen.libGr;
using GRGEN_LGSP = de.unika.ipd.grGen.lgsp;
using GRGEN_EXPR = de.unika.ipd.grGen.expression;
using GRGEN_MODEL = de.unika.ipd.grGen.Model_ProgramGraphsOriginal;
using GRGEN_ACTIONS = de.unika.ipd.grGen.Action_ProgramGraphsOriginal;

namespace de.unika.ipd.grGen.Action_ProgramGraphsOriginal
{
	public class Pattern_Subclasses : GRGEN_LGSP.LGSPMatchingPattern
	{
		private static Pattern_Subclasses instance = null;
		public static Pattern_Subclasses Instance { get { if(instance==null) { instance = new Pattern_Subclasses(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] Subclasses_node_c_AllowedTypes = null;
		public static bool[] Subclasses_node_c_IsAllowedType = null;
		public enum Subclasses_NodeNums { @c, };
		public enum Subclasses_EdgeNums { };
		public enum Subclasses_VariableNums { };
		public enum Subclasses_SubNums { };
		public enum Subclasses_AltNums { };
		public enum Subclasses_IterNums { @iter_0, };



		public GRGEN_LGSP.PatternGraph pat_Subclasses;

		public static GRGEN_LIBGR.NodeType[] Subclasses_iter_0_node_sub_AllowedTypes = null;
		public static bool[] Subclasses_iter_0_node_sub_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] Subclasses_iter_0_edge__edge0_AllowedTypes = null;
		public static bool[] Subclasses_iter_0_edge__edge0_IsAllowedType = null;
		public enum Subclasses_iter_0_NodeNums { @c, @sub, };
		public enum Subclasses_iter_0_EdgeNums { @_edge0, };
		public enum Subclasses_iter_0_VariableNums { };
		public enum Subclasses_iter_0_SubNums { @_sub0, };
		public enum Subclasses_iter_0_AltNums { };
		public enum Subclasses_iter_0_IterNums { };



		public GRGEN_LGSP.PatternGraph Subclasses_iter_0;


		private Pattern_Subclasses()
			: base("Subclasses",
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_Class.typeVar, },
				new string[] { "Subclasses_node_c", },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { }
			)
		{
		}
		private void initialize()
		{
			bool[,] Subclasses_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] Subclasses_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] Subclasses_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] Subclasses_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternNode Subclasses_node_c = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Class, GRGEN_MODEL.NodeType_Class.typeVar, "GRGEN_MODEL.IClass", "Subclasses_node_c", "c", Subclasses_node_c_AllowedTypes, Subclasses_node_c_IsAllowedType, 5.5F, 0, false, null, null, null, null, null, null, false, null);
			bool[,] Subclasses_iter_0_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] Subclasses_iter_0_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] Subclasses_iter_0_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] Subclasses_iter_0_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternNode Subclasses_iter_0_node_sub = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Class, GRGEN_MODEL.NodeType_Class.typeVar, "GRGEN_MODEL.IClass", "Subclasses_iter_0_node_sub", "sub", Subclasses_iter_0_node_sub_AllowedTypes, Subclasses_iter_0_node_sub_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge Subclasses_iter_0_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "Subclasses_iter_0_edge__edge0", "_edge0", Subclasses_iter_0_edge__edge0_AllowedTypes, Subclasses_iter_0_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternGraphEmbedding Subclasses_iter_0__sub0 = new GRGEN_LGSP.PatternGraphEmbedding("_sub0", Pattern_Subclass.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("Subclasses_iter_0_node_sub"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "Subclasses_iter_0_node_sub" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { Subclasses_iter_0_node_sub }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			Subclasses_iter_0 = new GRGEN_LGSP.PatternGraph(
				"iter_0",
				"Subclasses_",
				null, "iter_0",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Subclasses_node_c, Subclasses_iter_0_node_sub }, 
				new GRGEN_LGSP.PatternEdge[] { Subclasses_iter_0_edge__edge0 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] { Subclasses_iter_0__sub0 }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				Subclasses_iter_0_isNodeHomomorphicGlobal,
				Subclasses_iter_0_isEdgeHomomorphicGlobal,
				Subclasses_iter_0_isNodeTotallyHomomorphic,
				Subclasses_iter_0_isEdgeTotallyHomomorphic
			);
			Subclasses_iter_0.edgeToSourceNode.Add(Subclasses_iter_0_edge__edge0, Subclasses_node_c);
			Subclasses_iter_0.edgeToTargetNode.Add(Subclasses_iter_0_edge__edge0, Subclasses_iter_0_node_sub);

			GRGEN_LGSP.Iterated Subclasses_iter_0_it = new GRGEN_LGSP.Iterated( Subclasses_iter_0, 0, 0, new GRGEN_LGSP.LGSPFilter[] {
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
			}
			);
			pat_Subclasses = new GRGEN_LGSP.PatternGraph(
				"Subclasses",
				"",
				null, "Subclasses",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Subclasses_node_c }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] { Subclasses_iter_0_it,  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[0, 0] ,
				Subclasses_isNodeHomomorphicGlobal,
				Subclasses_isEdgeHomomorphicGlobal,
				Subclasses_isNodeTotallyHomomorphic,
				Subclasses_isEdgeTotallyHomomorphic
			);
			Subclasses_iter_0.embeddingGraph = pat_Subclasses;

			Subclasses_node_c.pointOfDefinition = null;
			Subclasses_iter_0_node_sub.pointOfDefinition = Subclasses_iter_0;
			Subclasses_iter_0_edge__edge0.pointOfDefinition = Subclasses_iter_0;
			Subclasses_iter_0__sub0.PointOfDefinition = Subclasses_iter_0;

			patternGraph = pat_Subclasses;
		}


		public void Subclasses_Create(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPNode node_c)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			graph.SettingAddedNodeNames( create_Subclasses_addedNodeNames );
			graph.SettingAddedEdgeNames( create_Subclasses_addedEdgeNames );
		}
		private static string[] create_Subclasses_addedNodeNames = new string[] {  };
		private static string[] create_Subclasses_addedEdgeNames = new string[] {  };

		public void Subclasses_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Subclasses curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPMatchesList<Match_Subclasses_iter_0, IMatch_Subclasses_iter_0> iterated_iter_0 = curMatch._iter_0;
		}

		public void Subclasses_iter_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPMatchesList<Match_Subclasses_iter_0, IMatch_Subclasses_iter_0> curMatches)
		{
			for(Match_Subclasses_iter_0 curMatch=curMatches.Root; curMatch!=null; curMatch=curMatch.next) {
				Subclasses_iter_0_Delete(actionEnv, curMatch);
			}
		}

		public void Subclasses_iter_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Subclasses_iter_0 curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_c = curMatch._node_c;
			GRGEN_LGSP.LGSPNode node_sub = curMatch._node_sub;
			GRGEN_LGSP.LGSPEdge edge__edge0 = curMatch._edge__edge0;
			GRGEN_ACTIONS.Pattern_Subclass.Match_Subclass subpattern__sub0 = curMatch.@__sub0;
			graph.Remove(edge__edge0);
			graph.RemoveEdges(node_c);
			graph.Remove(node_c);
			graph.RemoveEdges(node_sub);
			graph.Remove(node_sub);
			GRGEN_ACTIONS.Pattern_Subclass.Instance.Subclass_Delete(actionEnv, subpattern__sub0);
		}

		static Pattern_Subclasses() {
		}

		public interface IMatch_Subclasses : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IClass node_c { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			GRGEN_LIBGR.IMatchesExact<IMatch_Subclasses_iter_0> iter_0 { get; }
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_Subclasses_iter_0 : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IClass node_c { get; set; }
			GRGEN_MODEL.IClass node_sub { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge__edge0 { get; set; }
			//Variables
			//EmbeddedGraphs
			@GRGEN_ACTIONS.Pattern_Subclass.Match_Subclass @_sub0 { get; }
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			bool IsNullMatch { get; }
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_Subclasses : GRGEN_LGSP.MatchListElement<Match_Subclasses>, IMatch_Subclasses
		{
			public GRGEN_MODEL.IClass node_c { get { return (GRGEN_MODEL.IClass)_node_c; } set { _node_c = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_c;
			public enum Subclasses_NodeNums { @c, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Subclasses_NodeNums.@c: return _node_c;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "c": return _node_c;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "c": _node_c = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum Subclasses_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Subclasses_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Subclasses_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Subclasses_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public GRGEN_LIBGR.IMatchesExact<IMatch_Subclasses_iter_0> iter_0 { get { return _iter_0; } }
			public GRGEN_LGSP.LGSPMatchesList<Match_Subclasses_iter_0, IMatch_Subclasses_iter_0> _iter_0;
			public enum Subclasses_IterNums { @iter_0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 1; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				case (int)Subclasses_IterNums.@iter_0: return _iter_0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				case "iter_0": return _iter_0;
				default: return null;
				}
			}

			public enum Subclasses_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Subclasses.instance.pat_Subclasses; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Subclasses(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Subclasses(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Subclasses nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Subclasses cur = this;
				while(cur != null) {
					Match_Subclasses next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Subclasses that)
			{
				_node_c = that._node_c;
				_iter_0 = that._iter_0;
			}

			public Match_Subclasses(Match_Subclasses that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Subclasses that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_c = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c];
				_iter_0 = new GRGEN_LGSP.LGSPMatchesList<Match_Subclasses_iter_0, IMatch_Subclasses_iter_0>(that._iter_0, oldToNewMap);
			}

			public Match_Subclasses(Match_Subclasses that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Subclasses()
			{
			}

			public bool IsEqual(Match_Subclasses that)
			{
				if(that==null) return false;
				if(_node_c != that._node_c) return false;
				if(_iter_0.Count != that._iter_0.Count) return false;
				IEnumerator<GRGEN_LIBGR.IMatch> _iter_0_thisEnumerator = _iter_0.GetEnumerator();
				IEnumerator<GRGEN_LIBGR.IMatch> _iter_0_thatEnumerator = that._iter_0.GetEnumerator();
				while(_iter_0_thisEnumerator.MoveNext())
				{
					_iter_0_thatEnumerator.MoveNext();
					if(!(_iter_0_thisEnumerator.Current as Match_Subclasses_iter_0).IsEqual(_iter_0_thatEnumerator.Current as Match_Subclasses_iter_0)) return false;
				}
				return true;
			}
		}

		public class Match_Subclasses_iter_0 : GRGEN_LGSP.MatchListElement<Match_Subclasses_iter_0>, IMatch_Subclasses_iter_0
		{
			public GRGEN_MODEL.IClass node_c { get { return (GRGEN_MODEL.IClass)_node_c; } set { _node_c = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IClass node_sub { get { return (GRGEN_MODEL.IClass)_node_sub; } set { _node_sub = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_c;
			public GRGEN_LGSP.LGSPNode _node_sub;
			public enum Subclasses_iter_0_NodeNums { @c, @sub, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Subclasses_iter_0_NodeNums.@c: return _node_c;
				case (int)Subclasses_iter_0_NodeNums.@sub: return _node_sub;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "c": return _node_c;
				case "sub": return _node_sub;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "c": _node_c = (GRGEN_LGSP.LGSPNode)value; break;
				case "sub": _node_sub = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge__edge0 { get { return (GRGEN_MODEL.Icontains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public enum Subclasses_iter_0_EdgeNums { @_edge0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)Subclasses_iter_0_EdgeNums.@_edge0: return _edge__edge0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum Subclasses_iter_0_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public @GRGEN_ACTIONS.Pattern_Subclass.Match_Subclass @_sub0 { get { return @__sub0; } }
			public @GRGEN_ACTIONS.Pattern_Subclass.Match_Subclass @__sub0;
			public enum Subclasses_iter_0_SubNums { @_sub0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				case (int)Subclasses_iter_0_SubNums.@_sub0: return __sub0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				case "_sub0": return __sub0;
				default: return null;
				}
			}

			public enum Subclasses_iter_0_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Subclasses_iter_0_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Subclasses_iter_0_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Subclasses.instance.Subclasses_iter_0; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public bool IsNullMatch { get { return _isNullMatch; } }
			public bool _isNullMatch;
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Subclasses_iter_0(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Subclasses_iter_0(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Subclasses_iter_0 nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Subclasses_iter_0 cur = this;
				while(cur != null) {
					Match_Subclasses_iter_0 next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Subclasses_iter_0 that)
			{
				_node_c = that._node_c;
				_node_sub = that._node_sub;
				_edge__edge0 = that._edge__edge0;
				@__sub0 = that.@__sub0;
			}

			public Match_Subclasses_iter_0(Match_Subclasses_iter_0 that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Subclasses_iter_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_c = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c];
				_node_sub = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_sub];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
				@__sub0 = new GRGEN_ACTIONS.Pattern_Subclass.Match_Subclass(that.@__sub0, oldToNewMap);
			}

			public Match_Subclasses_iter_0(Match_Subclasses_iter_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Subclasses_iter_0()
			{
			}

			public bool IsEqual(Match_Subclasses_iter_0 that)
			{
				if(that==null) return false;
				if(_node_c != that._node_c) return false;
				if(_node_sub != that._node_sub) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				if(!@__sub0.IsEqual(that.@__sub0)) return false;
				return true;
			}
		}

	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0 instanceBearingAttributeForSearch_Subclasses_iter_0 = new GRGEN_ACTIONS.Pattern_Subclasses.Match_Subclasses_iter_0();
		public static List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> Array_Subclasses_iter_0_groupBy_c(List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list)
		{
			Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>> seenValues = new Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_c)) {
					seenValues[list[pos].@node_c].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> tempList = new List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_c, tempList);
				}
			}
			List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>();
			foreach(List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> Array_Subclasses_iter_0_keepOneForEachBy_c(List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list)
		{
			List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>();
			Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0 element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_c)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_c, null);
				}
			}
			return newList;
		}
		public static int Array_Subclasses_iter_0_indexOfBy_c(IList<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_c.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Subclasses_iter_0_indexOfBy_c(IList<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_c.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Subclasses_iter_0_lastIndexOfBy_c(IList<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_c.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Subclasses_iter_0_lastIndexOfBy_c(IList<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_c.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> Array_Subclasses_iter_0_groupBy_sub(List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list)
		{
			Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>> seenValues = new Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_sub)) {
					seenValues[list[pos].@node_sub].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> tempList = new List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_sub, tempList);
				}
			}
			List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>();
			foreach(List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> Array_Subclasses_iter_0_keepOneForEachBy_sub(List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list)
		{
			List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>();
			Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0 element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_sub)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_sub, null);
				}
			}
			return newList;
		}
		public static int Array_Subclasses_iter_0_indexOfBy_sub(IList<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_sub.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Subclasses_iter_0_indexOfBy_sub(IList<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_sub.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Subclasses_iter_0_lastIndexOfBy_sub(IList<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_sub.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Subclasses_iter_0_lastIndexOfBy_sub(IList<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_sub.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> Array_Subclasses_iter_0_groupBy__edge0(List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list)
		{
			Dictionary<GRGEN_MODEL.Icontains, List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>> seenValues = new Dictionary<GRGEN_MODEL.Icontains, List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@edge__edge0)) {
					seenValues[list[pos].@edge__edge0].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> tempList = new List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@edge__edge0, tempList);
				}
			}
			List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>();
			foreach(List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> Array_Subclasses_iter_0_keepOneForEachBy__edge0(List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list)
		{
			List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0>();
			Dictionary<GRGEN_MODEL.Icontains, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.Icontains, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0 element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@edge__edge0)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@edge__edge0, null);
				}
			}
			return newList;
		}
		public static int Array_Subclasses_iter_0_indexOfBy__edge0(IList<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list, GRGEN_MODEL.Icontains entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Subclasses_iter_0_indexOfBy__edge0(IList<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list, GRGEN_MODEL.Icontains entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Subclasses_iter_0_lastIndexOfBy__edge0(IList<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list, GRGEN_MODEL.Icontains entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Subclasses_iter_0_lastIndexOfBy__edge0(IList<GRGEN_ACTIONS.Pattern_Subclasses.IMatch_Subclasses_iter_0> list, GRGEN_MODEL.Icontains entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
	}

	public class Pattern_Subclass : GRGEN_LGSP.LGSPMatchingPattern
	{
		private static Pattern_Subclass instance = null;
		public static Pattern_Subclass Instance { get { if(instance==null) { instance = new Pattern_Subclass(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] Subclass_node_sub_AllowedTypes = null;
		public static bool[] Subclass_node_sub_IsAllowedType = null;
		public enum Subclass_NodeNums { @sub, };
		public enum Subclass_EdgeNums { };
		public enum Subclass_VariableNums { };
		public enum Subclass_SubNums { @_sub0, @_sub1, };
		public enum Subclass_AltNums { };
		public enum Subclass_IterNums { };



		public GRGEN_LGSP.PatternGraph pat_Subclass;


		private Pattern_Subclass()
			: base("Subclass",
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_Class.typeVar, },
				new string[] { "Subclass_node_sub", },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { }
			)
		{
		}
		private void initialize()
		{
			bool[,] Subclass_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] Subclass_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] Subclass_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] Subclass_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternNode Subclass_node_sub = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Class, GRGEN_MODEL.NodeType_Class.typeVar, "GRGEN_MODEL.IClass", "Subclass_node_sub", "sub", Subclass_node_sub_AllowedTypes, Subclass_node_sub_IsAllowedType, 5.5F, 0, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternGraphEmbedding Subclass__sub0 = new GRGEN_LGSP.PatternGraphEmbedding("_sub0", Pattern_Features.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("Subclass_node_sub"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "Subclass_node_sub" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { Subclass_node_sub }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			GRGEN_LGSP.PatternGraphEmbedding Subclass__sub1 = new GRGEN_LGSP.PatternGraphEmbedding("_sub1", Pattern_Subclasses.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("Subclass_node_sub"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "Subclass_node_sub" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { Subclass_node_sub }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			pat_Subclass = new GRGEN_LGSP.PatternGraph(
				"Subclass",
				"",
				null, "Subclass",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Subclass_node_sub }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] { Subclass__sub0, Subclass__sub1 }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[0, 0] ,
				Subclass_isNodeHomomorphicGlobal,
				Subclass_isEdgeHomomorphicGlobal,
				Subclass_isNodeTotallyHomomorphic,
				Subclass_isEdgeTotallyHomomorphic
			);

			Subclass_node_sub.pointOfDefinition = null;
			Subclass__sub0.PointOfDefinition = pat_Subclass;
			Subclass__sub1.PointOfDefinition = pat_Subclass;

			patternGraph = pat_Subclass;
		}


		public void Subclass_Create(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPNode node_sub)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			graph.SettingAddedNodeNames( create_Subclass_addedNodeNames );
			graph.SettingAddedEdgeNames( create_Subclass_addedEdgeNames );
			GRGEN_ACTIONS.Pattern_Features.Instance.Features_Create(actionEnv, (GRGEN_MODEL.@Class)(node_sub));
			GRGEN_ACTIONS.Pattern_Subclasses.Instance.Subclasses_Create(actionEnv, (GRGEN_MODEL.@Class)(node_sub));
		}
		private static string[] create_Subclass_addedNodeNames = new string[] {  };
		private static string[] create_Subclass_addedEdgeNames = new string[] {  };

		public void Subclass_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Subclass curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_ACTIONS.Pattern_Features.Match_Features subpattern__sub0 = curMatch.@__sub0;
			GRGEN_ACTIONS.Pattern_Subclasses.Match_Subclasses subpattern__sub1 = curMatch.@__sub1;
			GRGEN_ACTIONS.Pattern_Features.Instance.Features_Delete(actionEnv, subpattern__sub0);
			GRGEN_ACTIONS.Pattern_Subclasses.Instance.Subclasses_Delete(actionEnv, subpattern__sub1);
		}

		static Pattern_Subclass() {
		}

		public interface IMatch_Subclass : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IClass node_sub { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			@GRGEN_ACTIONS.Pattern_Features.Match_Features @_sub0 { get; }
			@GRGEN_ACTIONS.Pattern_Subclasses.Match_Subclasses @_sub1 { get; }
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_Subclass : GRGEN_LGSP.MatchListElement<Match_Subclass>, IMatch_Subclass
		{
			public GRGEN_MODEL.IClass node_sub { get { return (GRGEN_MODEL.IClass)_node_sub; } set { _node_sub = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_sub;
			public enum Subclass_NodeNums { @sub, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Subclass_NodeNums.@sub: return _node_sub;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "sub": return _node_sub;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "sub": _node_sub = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum Subclass_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Subclass_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public @GRGEN_ACTIONS.Pattern_Features.Match_Features @_sub0 { get { return @__sub0; } }
			public @GRGEN_ACTIONS.Pattern_Subclasses.Match_Subclasses @_sub1 { get { return @__sub1; } }
			public @GRGEN_ACTIONS.Pattern_Features.Match_Features @__sub0;
			public @GRGEN_ACTIONS.Pattern_Subclasses.Match_Subclasses @__sub1;
			public enum Subclass_SubNums { @_sub0, @_sub1, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 2; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				case (int)Subclass_SubNums.@_sub0: return __sub0;
				case (int)Subclass_SubNums.@_sub1: return __sub1;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				case "_sub0": return __sub0;
				case "_sub1": return __sub1;
				default: return null;
				}
			}

			public enum Subclass_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Subclass_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Subclass_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Subclass.instance.pat_Subclass; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Subclass(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Subclass(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Subclass nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Subclass cur = this;
				while(cur != null) {
					Match_Subclass next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Subclass that)
			{
				_node_sub = that._node_sub;
				@__sub0 = that.@__sub0;
				@__sub1 = that.@__sub1;
			}

			public Match_Subclass(Match_Subclass that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Subclass that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_sub = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_sub];
				@__sub0 = new GRGEN_ACTIONS.Pattern_Features.Match_Features(that.@__sub0, oldToNewMap);
				@__sub1 = new GRGEN_ACTIONS.Pattern_Subclasses.Match_Subclasses(that.@__sub1, oldToNewMap);
			}

			public Match_Subclass(Match_Subclass that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Subclass()
			{
			}

			public bool IsEqual(Match_Subclass that)
			{
				if(that==null) return false;
				if(_node_sub != that._node_sub) return false;
				if(!@__sub0.IsEqual(that.@__sub0)) return false;
				if(!@__sub1.IsEqual(that.@__sub1)) return false;
				return true;
			}
		}

	}


	public class Pattern_Features : GRGEN_LGSP.LGSPMatchingPattern
	{
		private static Pattern_Features instance = null;
		public static Pattern_Features Instance { get { if(instance==null) { instance = new Pattern_Features(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] Features_node_c_AllowedTypes = null;
		public static bool[] Features_node_c_IsAllowedType = null;
		public enum Features_NodeNums { @c, };
		public enum Features_EdgeNums { };
		public enum Features_VariableNums { };
		public enum Features_SubNums { };
		public enum Features_AltNums { };
		public enum Features_IterNums { @iter_0, };



		public GRGEN_LGSP.PatternGraph pat_Features;

		public enum Features_iter_0_NodeNums { @c, };
		public enum Features_iter_0_EdgeNums { };
		public enum Features_iter_0_VariableNums { };
		public enum Features_iter_0_SubNums { @_sub0, };
		public enum Features_iter_0_AltNums { };
		public enum Features_iter_0_IterNums { };



		public GRGEN_LGSP.PatternGraph Features_iter_0;


		private Pattern_Features()
			: base("Features",
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_Class.typeVar, },
				new string[] { "Features_node_c", },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { }
			)
		{
		}
		private void initialize()
		{
			bool[,] Features_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] Features_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] Features_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] Features_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternNode Features_node_c = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Class, GRGEN_MODEL.NodeType_Class.typeVar, "GRGEN_MODEL.IClass", "Features_node_c", "c", Features_node_c_AllowedTypes, Features_node_c_IsAllowedType, 5.5F, 0, false, null, null, null, null, null, null, false, null);
			bool[,] Features_iter_0_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] Features_iter_0_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] Features_iter_0_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] Features_iter_0_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternGraphEmbedding Features_iter_0__sub0 = new GRGEN_LGSP.PatternGraphEmbedding("_sub0", Pattern_FeaturePattern.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("Features_node_c"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "Features_node_c" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { Features_node_c }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			Features_iter_0 = new GRGEN_LGSP.PatternGraph(
				"iter_0",
				"Features_",
				null, "iter_0",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Features_node_c }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] { Features_iter_0__sub0 }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[0, 0] ,
				Features_iter_0_isNodeHomomorphicGlobal,
				Features_iter_0_isEdgeHomomorphicGlobal,
				Features_iter_0_isNodeTotallyHomomorphic,
				Features_iter_0_isEdgeTotallyHomomorphic
			);

			GRGEN_LGSP.Iterated Features_iter_0_it = new GRGEN_LGSP.Iterated( Features_iter_0, 0, 0, new GRGEN_LGSP.LGSPFilter[] {
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
			}
			);
			pat_Features = new GRGEN_LGSP.PatternGraph(
				"Features",
				"",
				null, "Features",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Features_node_c }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] { Features_iter_0_it,  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[0, 0] ,
				Features_isNodeHomomorphicGlobal,
				Features_isEdgeHomomorphicGlobal,
				Features_isNodeTotallyHomomorphic,
				Features_isEdgeTotallyHomomorphic
			);
			Features_iter_0.embeddingGraph = pat_Features;

			Features_node_c.pointOfDefinition = null;
			Features_iter_0__sub0.PointOfDefinition = Features_iter_0;

			patternGraph = pat_Features;
		}


		public void Features_Create(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPNode node_c)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			graph.SettingAddedNodeNames( create_Features_addedNodeNames );
			graph.SettingAddedEdgeNames( create_Features_addedEdgeNames );
		}
		private static string[] create_Features_addedNodeNames = new string[] {  };
		private static string[] create_Features_addedEdgeNames = new string[] {  };

		public void Features_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Features curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPMatchesList<Match_Features_iter_0, IMatch_Features_iter_0> iterated_iter_0 = curMatch._iter_0;
		}

		public void Features_iter_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPMatchesList<Match_Features_iter_0, IMatch_Features_iter_0> curMatches)
		{
			for(Match_Features_iter_0 curMatch=curMatches.Root; curMatch!=null; curMatch=curMatch.next) {
				Features_iter_0_Delete(actionEnv, curMatch);
			}
		}

		public void Features_iter_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Features_iter_0 curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_c = curMatch._node_c;
			GRGEN_ACTIONS.Pattern_FeaturePattern.Match_FeaturePattern subpattern__sub0 = curMatch.@__sub0;
			graph.RemoveEdges(node_c);
			graph.Remove(node_c);
			GRGEN_ACTIONS.Pattern_FeaturePattern.Instance.FeaturePattern_Delete(actionEnv, subpattern__sub0);
		}

		static Pattern_Features() {
		}

		public interface IMatch_Features : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IClass node_c { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			GRGEN_LIBGR.IMatchesExact<IMatch_Features_iter_0> iter_0 { get; }
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_Features_iter_0 : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IClass node_c { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			@GRGEN_ACTIONS.Pattern_FeaturePattern.Match_FeaturePattern @_sub0 { get; }
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			bool IsNullMatch { get; }
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_Features : GRGEN_LGSP.MatchListElement<Match_Features>, IMatch_Features
		{
			public GRGEN_MODEL.IClass node_c { get { return (GRGEN_MODEL.IClass)_node_c; } set { _node_c = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_c;
			public enum Features_NodeNums { @c, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Features_NodeNums.@c: return _node_c;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "c": return _node_c;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "c": _node_c = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum Features_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Features_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Features_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Features_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public GRGEN_LIBGR.IMatchesExact<IMatch_Features_iter_0> iter_0 { get { return _iter_0; } }
			public GRGEN_LGSP.LGSPMatchesList<Match_Features_iter_0, IMatch_Features_iter_0> _iter_0;
			public enum Features_IterNums { @iter_0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 1; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				case (int)Features_IterNums.@iter_0: return _iter_0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				case "iter_0": return _iter_0;
				default: return null;
				}
			}

			public enum Features_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Features.instance.pat_Features; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Features(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Features(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Features nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Features cur = this;
				while(cur != null) {
					Match_Features next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Features that)
			{
				_node_c = that._node_c;
				_iter_0 = that._iter_0;
			}

			public Match_Features(Match_Features that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Features that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_c = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c];
				_iter_0 = new GRGEN_LGSP.LGSPMatchesList<Match_Features_iter_0, IMatch_Features_iter_0>(that._iter_0, oldToNewMap);
			}

			public Match_Features(Match_Features that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Features()
			{
			}

			public bool IsEqual(Match_Features that)
			{
				if(that==null) return false;
				if(_node_c != that._node_c) return false;
				if(_iter_0.Count != that._iter_0.Count) return false;
				IEnumerator<GRGEN_LIBGR.IMatch> _iter_0_thisEnumerator = _iter_0.GetEnumerator();
				IEnumerator<GRGEN_LIBGR.IMatch> _iter_0_thatEnumerator = that._iter_0.GetEnumerator();
				while(_iter_0_thisEnumerator.MoveNext())
				{
					_iter_0_thatEnumerator.MoveNext();
					if(!(_iter_0_thisEnumerator.Current as Match_Features_iter_0).IsEqual(_iter_0_thatEnumerator.Current as Match_Features_iter_0)) return false;
				}
				return true;
			}
		}

		public class Match_Features_iter_0 : GRGEN_LGSP.MatchListElement<Match_Features_iter_0>, IMatch_Features_iter_0
		{
			public GRGEN_MODEL.IClass node_c { get { return (GRGEN_MODEL.IClass)_node_c; } set { _node_c = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_c;
			public enum Features_iter_0_NodeNums { @c, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Features_iter_0_NodeNums.@c: return _node_c;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "c": return _node_c;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "c": _node_c = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum Features_iter_0_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Features_iter_0_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public @GRGEN_ACTIONS.Pattern_FeaturePattern.Match_FeaturePattern @_sub0 { get { return @__sub0; } }
			public @GRGEN_ACTIONS.Pattern_FeaturePattern.Match_FeaturePattern @__sub0;
			public enum Features_iter_0_SubNums { @_sub0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				case (int)Features_iter_0_SubNums.@_sub0: return __sub0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				case "_sub0": return __sub0;
				default: return null;
				}
			}

			public enum Features_iter_0_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Features_iter_0_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Features_iter_0_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Features.instance.Features_iter_0; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public bool IsNullMatch { get { return _isNullMatch; } }
			public bool _isNullMatch;
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Features_iter_0(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Features_iter_0(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Features_iter_0 nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Features_iter_0 cur = this;
				while(cur != null) {
					Match_Features_iter_0 next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Features_iter_0 that)
			{
				_node_c = that._node_c;
				@__sub0 = that.@__sub0;
			}

			public Match_Features_iter_0(Match_Features_iter_0 that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Features_iter_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_c = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c];
				@__sub0 = new GRGEN_ACTIONS.Pattern_FeaturePattern.Match_FeaturePattern(that.@__sub0, oldToNewMap);
			}

			public Match_Features_iter_0(Match_Features_iter_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Features_iter_0()
			{
			}

			public bool IsEqual(Match_Features_iter_0 that)
			{
				if(that==null) return false;
				if(_node_c != that._node_c) return false;
				if(!@__sub0.IsEqual(that.@__sub0)) return false;
				return true;
			}
		}

	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0 instanceBearingAttributeForSearch_Features_iter_0 = new GRGEN_ACTIONS.Pattern_Features.Match_Features_iter_0();
		public static List<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0> Array_Features_iter_0_groupBy_c(List<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0> list)
		{
			Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0>> seenValues = new Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_c)) {
					seenValues[list[pos].@node_c].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0> tempList = new List<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_c, tempList);
				}
			}
			List<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0>();
			foreach(List<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0> Array_Features_iter_0_keepOneForEachBy_c(List<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0> list)
		{
			List<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0>();
			Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0 element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_c)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_c, null);
				}
			}
			return newList;
		}
		public static int Array_Features_iter_0_indexOfBy_c(IList<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_c.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Features_iter_0_indexOfBy_c(IList<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_c.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Features_iter_0_lastIndexOfBy_c(IList<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_c.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Features_iter_0_lastIndexOfBy_c(IList<GRGEN_ACTIONS.Pattern_Features.IMatch_Features_iter_0> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_c.Equals(entry))
					return i;
			return -1;
		}
	}

	public class Pattern_FeaturePattern : GRGEN_LGSP.LGSPMatchingPattern
	{
		private static Pattern_FeaturePattern instance = null;
		public static Pattern_FeaturePattern Instance { get { if(instance==null) { instance = new Pattern_FeaturePattern(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] FeaturePattern_node_c_AllowedTypes = null;
		public static bool[] FeaturePattern_node_c_IsAllowedType = null;
		public enum FeaturePattern_NodeNums { @c, };
		public enum FeaturePattern_EdgeNums { };
		public enum FeaturePattern_VariableNums { };
		public enum FeaturePattern_SubNums { };
		public enum FeaturePattern_AltNums { @alt_0, };
		public enum FeaturePattern_IterNums { };



		public GRGEN_LGSP.PatternGraph pat_FeaturePattern;

		public enum FeaturePattern_alt_0_CaseNums { @MethodBody, @MethodSignature, @Variable, @Konstante, };
		public static GRGEN_LIBGR.NodeType[] FeaturePattern_alt_0_MethodBody_node_b_AllowedTypes = null;
		public static bool[] FeaturePattern_alt_0_MethodBody_node_b_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] FeaturePattern_alt_0_MethodBody_edge__edge0_AllowedTypes = null;
		public static bool[] FeaturePattern_alt_0_MethodBody_edge__edge0_IsAllowedType = null;
		public enum FeaturePattern_alt_0_MethodBody_NodeNums { @c, @b, };
		public enum FeaturePattern_alt_0_MethodBody_EdgeNums { @_edge0, };
		public enum FeaturePattern_alt_0_MethodBody_VariableNums { };
		public enum FeaturePattern_alt_0_MethodBody_SubNums { @_sub0, @_sub1, };
		public enum FeaturePattern_alt_0_MethodBody_AltNums { };
		public enum FeaturePattern_alt_0_MethodBody_IterNums { };



		public GRGEN_LGSP.PatternGraph FeaturePattern_alt_0_MethodBody;

		public static GRGEN_LIBGR.NodeType[] FeaturePattern_alt_0_MethodSignature_node__node0_AllowedTypes = null;
		public static bool[] FeaturePattern_alt_0_MethodSignature_node__node0_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] FeaturePattern_alt_0_MethodSignature_edge__edge0_AllowedTypes = null;
		public static bool[] FeaturePattern_alt_0_MethodSignature_edge__edge0_IsAllowedType = null;
		public enum FeaturePattern_alt_0_MethodSignature_NodeNums { @c, @_node0, };
		public enum FeaturePattern_alt_0_MethodSignature_EdgeNums { @_edge0, };
		public enum FeaturePattern_alt_0_MethodSignature_VariableNums { };
		public enum FeaturePattern_alt_0_MethodSignature_SubNums { };
		public enum FeaturePattern_alt_0_MethodSignature_AltNums { };
		public enum FeaturePattern_alt_0_MethodSignature_IterNums { };



		public GRGEN_LGSP.PatternGraph FeaturePattern_alt_0_MethodSignature;

		public static GRGEN_LIBGR.NodeType[] FeaturePattern_alt_0_Variable_node__node0_AllowedTypes = null;
		public static bool[] FeaturePattern_alt_0_Variable_node__node0_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] FeaturePattern_alt_0_Variable_edge__edge0_AllowedTypes = null;
		public static bool[] FeaturePattern_alt_0_Variable_edge__edge0_IsAllowedType = null;
		public enum FeaturePattern_alt_0_Variable_NodeNums { @c, @_node0, };
		public enum FeaturePattern_alt_0_Variable_EdgeNums { @_edge0, };
		public enum FeaturePattern_alt_0_Variable_VariableNums { };
		public enum FeaturePattern_alt_0_Variable_SubNums { };
		public enum FeaturePattern_alt_0_Variable_AltNums { };
		public enum FeaturePattern_alt_0_Variable_IterNums { };



		public GRGEN_LGSP.PatternGraph FeaturePattern_alt_0_Variable;

		public static GRGEN_LIBGR.NodeType[] FeaturePattern_alt_0_Konstante_node__node0_AllowedTypes = null;
		public static bool[] FeaturePattern_alt_0_Konstante_node__node0_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] FeaturePattern_alt_0_Konstante_edge__edge0_AllowedTypes = null;
		public static bool[] FeaturePattern_alt_0_Konstante_edge__edge0_IsAllowedType = null;
		public enum FeaturePattern_alt_0_Konstante_NodeNums { @c, @_node0, };
		public enum FeaturePattern_alt_0_Konstante_EdgeNums { @_edge0, };
		public enum FeaturePattern_alt_0_Konstante_VariableNums { };
		public enum FeaturePattern_alt_0_Konstante_SubNums { };
		public enum FeaturePattern_alt_0_Konstante_AltNums { };
		public enum FeaturePattern_alt_0_Konstante_IterNums { };



		public GRGEN_LGSP.PatternGraph FeaturePattern_alt_0_Konstante;


		private Pattern_FeaturePattern()
			: base("FeaturePattern",
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_Class.typeVar, },
				new string[] { "FeaturePattern_node_c", },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { }
			)
		{
		}
		private void initialize()
		{
			bool[,] FeaturePattern_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] FeaturePattern_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] FeaturePattern_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] FeaturePattern_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternNode FeaturePattern_node_c = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Class, GRGEN_MODEL.NodeType_Class.typeVar, "GRGEN_MODEL.IClass", "FeaturePattern_node_c", "c", FeaturePattern_node_c_AllowedTypes, FeaturePattern_node_c_IsAllowedType, 5.5F, 0, false, null, null, null, null, null, null, false, null);
			bool[,] FeaturePattern_alt_0_MethodBody_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] FeaturePattern_alt_0_MethodBody_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] FeaturePattern_alt_0_MethodBody_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] FeaturePattern_alt_0_MethodBody_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternNode FeaturePattern_alt_0_MethodBody_node_b = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@MethodBody, GRGEN_MODEL.NodeType_MethodBody.typeVar, "GRGEN_MODEL.IMethodBody", "FeaturePattern_alt_0_MethodBody_node_b", "b", FeaturePattern_alt_0_MethodBody_node_b_AllowedTypes, FeaturePattern_alt_0_MethodBody_node_b_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge FeaturePattern_alt_0_MethodBody_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "FeaturePattern_alt_0_MethodBody_edge__edge0", "_edge0", FeaturePattern_alt_0_MethodBody_edge__edge0_AllowedTypes, FeaturePattern_alt_0_MethodBody_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternGraphEmbedding FeaturePattern_alt_0_MethodBody__sub0 = new GRGEN_LGSP.PatternGraphEmbedding("_sub0", Pattern_Parameters.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("FeaturePattern_alt_0_MethodBody_node_b"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "FeaturePattern_alt_0_MethodBody_node_b" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { FeaturePattern_alt_0_MethodBody_node_b }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			GRGEN_LGSP.PatternGraphEmbedding FeaturePattern_alt_0_MethodBody__sub1 = new GRGEN_LGSP.PatternGraphEmbedding("_sub1", Pattern_Statements.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("FeaturePattern_alt_0_MethodBody_node_b"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "FeaturePattern_alt_0_MethodBody_node_b" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { FeaturePattern_alt_0_MethodBody_node_b }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			FeaturePattern_alt_0_MethodBody = new GRGEN_LGSP.PatternGraph(
				"MethodBody",
				"FeaturePattern_alt_0_",
				null, "MethodBody",
				false, false,
				new GRGEN_LGSP.PatternNode[] { FeaturePattern_node_c, FeaturePattern_alt_0_MethodBody_node_b }, 
				new GRGEN_LGSP.PatternEdge[] { FeaturePattern_alt_0_MethodBody_edge__edge0 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] { FeaturePattern_alt_0_MethodBody__sub0, FeaturePattern_alt_0_MethodBody__sub1 }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				FeaturePattern_alt_0_MethodBody_isNodeHomomorphicGlobal,
				FeaturePattern_alt_0_MethodBody_isEdgeHomomorphicGlobal,
				FeaturePattern_alt_0_MethodBody_isNodeTotallyHomomorphic,
				FeaturePattern_alt_0_MethodBody_isEdgeTotallyHomomorphic
			);
			FeaturePattern_alt_0_MethodBody.edgeToSourceNode.Add(FeaturePattern_alt_0_MethodBody_edge__edge0, FeaturePattern_node_c);
			FeaturePattern_alt_0_MethodBody.edgeToTargetNode.Add(FeaturePattern_alt_0_MethodBody_edge__edge0, FeaturePattern_alt_0_MethodBody_node_b);

			bool[,] FeaturePattern_alt_0_MethodSignature_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] FeaturePattern_alt_0_MethodSignature_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] FeaturePattern_alt_0_MethodSignature_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] FeaturePattern_alt_0_MethodSignature_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternNode FeaturePattern_alt_0_MethodSignature_node__node0 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@MethodSignature, GRGEN_MODEL.NodeType_MethodSignature.typeVar, "GRGEN_MODEL.IMethodSignature", "FeaturePattern_alt_0_MethodSignature_node__node0", "_node0", FeaturePattern_alt_0_MethodSignature_node__node0_AllowedTypes, FeaturePattern_alt_0_MethodSignature_node__node0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge FeaturePattern_alt_0_MethodSignature_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "FeaturePattern_alt_0_MethodSignature_edge__edge0", "_edge0", FeaturePattern_alt_0_MethodSignature_edge__edge0_AllowedTypes, FeaturePattern_alt_0_MethodSignature_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			FeaturePattern_alt_0_MethodSignature = new GRGEN_LGSP.PatternGraph(
				"MethodSignature",
				"FeaturePattern_alt_0_",
				null, "MethodSignature",
				false, false,
				new GRGEN_LGSP.PatternNode[] { FeaturePattern_node_c, FeaturePattern_alt_0_MethodSignature_node__node0 }, 
				new GRGEN_LGSP.PatternEdge[] { FeaturePattern_alt_0_MethodSignature_edge__edge0 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				FeaturePattern_alt_0_MethodSignature_isNodeHomomorphicGlobal,
				FeaturePattern_alt_0_MethodSignature_isEdgeHomomorphicGlobal,
				FeaturePattern_alt_0_MethodSignature_isNodeTotallyHomomorphic,
				FeaturePattern_alt_0_MethodSignature_isEdgeTotallyHomomorphic
			);
			FeaturePattern_alt_0_MethodSignature.edgeToSourceNode.Add(FeaturePattern_alt_0_MethodSignature_edge__edge0, FeaturePattern_node_c);
			FeaturePattern_alt_0_MethodSignature.edgeToTargetNode.Add(FeaturePattern_alt_0_MethodSignature_edge__edge0, FeaturePattern_alt_0_MethodSignature_node__node0);

			bool[,] FeaturePattern_alt_0_Variable_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] FeaturePattern_alt_0_Variable_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] FeaturePattern_alt_0_Variable_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] FeaturePattern_alt_0_Variable_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternNode FeaturePattern_alt_0_Variable_node__node0 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Variabel, GRGEN_MODEL.NodeType_Variabel.typeVar, "GRGEN_MODEL.IVariabel", "FeaturePattern_alt_0_Variable_node__node0", "_node0", FeaturePattern_alt_0_Variable_node__node0_AllowedTypes, FeaturePattern_alt_0_Variable_node__node0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge FeaturePattern_alt_0_Variable_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "FeaturePattern_alt_0_Variable_edge__edge0", "_edge0", FeaturePattern_alt_0_Variable_edge__edge0_AllowedTypes, FeaturePattern_alt_0_Variable_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			FeaturePattern_alt_0_Variable = new GRGEN_LGSP.PatternGraph(
				"Variable",
				"FeaturePattern_alt_0_",
				null, "Variable",
				false, false,
				new GRGEN_LGSP.PatternNode[] { FeaturePattern_node_c, FeaturePattern_alt_0_Variable_node__node0 }, 
				new GRGEN_LGSP.PatternEdge[] { FeaturePattern_alt_0_Variable_edge__edge0 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				FeaturePattern_alt_0_Variable_isNodeHomomorphicGlobal,
				FeaturePattern_alt_0_Variable_isEdgeHomomorphicGlobal,
				FeaturePattern_alt_0_Variable_isNodeTotallyHomomorphic,
				FeaturePattern_alt_0_Variable_isEdgeTotallyHomomorphic
			);
			FeaturePattern_alt_0_Variable.edgeToSourceNode.Add(FeaturePattern_alt_0_Variable_edge__edge0, FeaturePattern_node_c);
			FeaturePattern_alt_0_Variable.edgeToTargetNode.Add(FeaturePattern_alt_0_Variable_edge__edge0, FeaturePattern_alt_0_Variable_node__node0);

			bool[,] FeaturePattern_alt_0_Konstante_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] FeaturePattern_alt_0_Konstante_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] FeaturePattern_alt_0_Konstante_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] FeaturePattern_alt_0_Konstante_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternNode FeaturePattern_alt_0_Konstante_node__node0 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Constant, GRGEN_MODEL.NodeType_Constant.typeVar, "GRGEN_MODEL.IConstant", "FeaturePattern_alt_0_Konstante_node__node0", "_node0", FeaturePattern_alt_0_Konstante_node__node0_AllowedTypes, FeaturePattern_alt_0_Konstante_node__node0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge FeaturePattern_alt_0_Konstante_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "FeaturePattern_alt_0_Konstante_edge__edge0", "_edge0", FeaturePattern_alt_0_Konstante_edge__edge0_AllowedTypes, FeaturePattern_alt_0_Konstante_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			FeaturePattern_alt_0_Konstante = new GRGEN_LGSP.PatternGraph(
				"Konstante",
				"FeaturePattern_alt_0_",
				null, "Konstante",
				false, false,
				new GRGEN_LGSP.PatternNode[] { FeaturePattern_node_c, FeaturePattern_alt_0_Konstante_node__node0 }, 
				new GRGEN_LGSP.PatternEdge[] { FeaturePattern_alt_0_Konstante_edge__edge0 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				FeaturePattern_alt_0_Konstante_isNodeHomomorphicGlobal,
				FeaturePattern_alt_0_Konstante_isEdgeHomomorphicGlobal,
				FeaturePattern_alt_0_Konstante_isNodeTotallyHomomorphic,
				FeaturePattern_alt_0_Konstante_isEdgeTotallyHomomorphic
			);
			FeaturePattern_alt_0_Konstante.edgeToSourceNode.Add(FeaturePattern_alt_0_Konstante_edge__edge0, FeaturePattern_node_c);
			FeaturePattern_alt_0_Konstante.edgeToTargetNode.Add(FeaturePattern_alt_0_Konstante_edge__edge0, FeaturePattern_alt_0_Konstante_node__node0);

			GRGEN_LGSP.Alternative FeaturePattern_alt_0 = new GRGEN_LGSP.Alternative( "alt_0", "FeaturePattern_", new GRGEN_LGSP.PatternGraph[] { FeaturePattern_alt_0_MethodBody, FeaturePattern_alt_0_MethodSignature, FeaturePattern_alt_0_Variable, FeaturePattern_alt_0_Konstante } );

			pat_FeaturePattern = new GRGEN_LGSP.PatternGraph(
				"FeaturePattern",
				"",
				null, "FeaturePattern",
				false, false,
				new GRGEN_LGSP.PatternNode[] { FeaturePattern_node_c }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] { FeaturePattern_alt_0,  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[0, 0] ,
				FeaturePattern_isNodeHomomorphicGlobal,
				FeaturePattern_isEdgeHomomorphicGlobal,
				FeaturePattern_isNodeTotallyHomomorphic,
				FeaturePattern_isEdgeTotallyHomomorphic
			);
			FeaturePattern_alt_0_MethodBody.embeddingGraph = pat_FeaturePattern;
			FeaturePattern_alt_0_MethodSignature.embeddingGraph = pat_FeaturePattern;
			FeaturePattern_alt_0_Variable.embeddingGraph = pat_FeaturePattern;
			FeaturePattern_alt_0_Konstante.embeddingGraph = pat_FeaturePattern;

			FeaturePattern_node_c.pointOfDefinition = null;
			FeaturePattern_alt_0_MethodBody_node_b.pointOfDefinition = FeaturePattern_alt_0_MethodBody;
			FeaturePattern_alt_0_MethodBody_edge__edge0.pointOfDefinition = FeaturePattern_alt_0_MethodBody;
			FeaturePattern_alt_0_MethodBody__sub0.PointOfDefinition = FeaturePattern_alt_0_MethodBody;
			FeaturePattern_alt_0_MethodBody__sub1.PointOfDefinition = FeaturePattern_alt_0_MethodBody;
			FeaturePattern_alt_0_MethodSignature_node__node0.pointOfDefinition = FeaturePattern_alt_0_MethodSignature;
			FeaturePattern_alt_0_MethodSignature_edge__edge0.pointOfDefinition = FeaturePattern_alt_0_MethodSignature;
			FeaturePattern_alt_0_Variable_node__node0.pointOfDefinition = FeaturePattern_alt_0_Variable;
			FeaturePattern_alt_0_Variable_edge__edge0.pointOfDefinition = FeaturePattern_alt_0_Variable;
			FeaturePattern_alt_0_Konstante_node__node0.pointOfDefinition = FeaturePattern_alt_0_Konstante;
			FeaturePattern_alt_0_Konstante_edge__edge0.pointOfDefinition = FeaturePattern_alt_0_Konstante;

			patternGraph = pat_FeaturePattern;
		}


		public void FeaturePattern_Create(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPNode node_c)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			graph.SettingAddedNodeNames( create_FeaturePattern_addedNodeNames );
			graph.SettingAddedEdgeNames( create_FeaturePattern_addedEdgeNames );
		}
		private static string[] create_FeaturePattern_addedNodeNames = new string[] {  };
		private static string[] create_FeaturePattern_addedEdgeNames = new string[] {  };

		public void FeaturePattern_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_FeaturePattern curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			IMatch_FeaturePattern_alt_0 alternative_alt_0 = curMatch._alt_0;
		}

		public void FeaturePattern_alt_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, IMatch_FeaturePattern_alt_0 curMatch)
		{
			if(curMatch.Pattern == FeaturePattern_alt_0_MethodBody) {
				FeaturePattern_alt_0_MethodBody_Delete(actionEnv, (Match_FeaturePattern_alt_0_MethodBody)curMatch);
				return;
			}
			else if(curMatch.Pattern == FeaturePattern_alt_0_MethodSignature) {
				FeaturePattern_alt_0_MethodSignature_Delete(actionEnv, (Match_FeaturePattern_alt_0_MethodSignature)curMatch);
				return;
			}
			else if(curMatch.Pattern == FeaturePattern_alt_0_Variable) {
				FeaturePattern_alt_0_Variable_Delete(actionEnv, (Match_FeaturePattern_alt_0_Variable)curMatch);
				return;
			}
			else if(curMatch.Pattern == FeaturePattern_alt_0_Konstante) {
				FeaturePattern_alt_0_Konstante_Delete(actionEnv, (Match_FeaturePattern_alt_0_Konstante)curMatch);
				return;
			}
			throw new ApplicationException(); //debug assert
		}

		public void FeaturePattern_alt_0_MethodBody_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_FeaturePattern_alt_0_MethodBody curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_c = curMatch._node_c;
			GRGEN_LGSP.LGSPNode node_b = curMatch._node_b;
			GRGEN_LGSP.LGSPEdge edge__edge0 = curMatch._edge__edge0;
			GRGEN_ACTIONS.Pattern_Parameters.Match_Parameters subpattern__sub0 = curMatch.@__sub0;
			GRGEN_ACTIONS.Pattern_Statements.Match_Statements subpattern__sub1 = curMatch.@__sub1;
			graph.Remove(edge__edge0);
			graph.RemoveEdges(node_c);
			graph.Remove(node_c);
			graph.RemoveEdges(node_b);
			graph.Remove(node_b);
			GRGEN_ACTIONS.Pattern_Parameters.Instance.Parameters_Delete(actionEnv, subpattern__sub0);
			GRGEN_ACTIONS.Pattern_Statements.Instance.Statements_Delete(actionEnv, subpattern__sub1);
		}

		public void FeaturePattern_alt_0_MethodSignature_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_FeaturePattern_alt_0_MethodSignature curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_c = curMatch._node_c;
			GRGEN_LGSP.LGSPNode node__node0 = curMatch._node__node0;
			GRGEN_LGSP.LGSPEdge edge__edge0 = curMatch._edge__edge0;
			graph.Remove(edge__edge0);
			graph.RemoveEdges(node_c);
			graph.Remove(node_c);
			graph.RemoveEdges(node__node0);
			graph.Remove(node__node0);
		}

		public void FeaturePattern_alt_0_Variable_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_FeaturePattern_alt_0_Variable curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_c = curMatch._node_c;
			GRGEN_LGSP.LGSPNode node__node0 = curMatch._node__node0;
			GRGEN_LGSP.LGSPEdge edge__edge0 = curMatch._edge__edge0;
			graph.Remove(edge__edge0);
			graph.RemoveEdges(node_c);
			graph.Remove(node_c);
			graph.RemoveEdges(node__node0);
			graph.Remove(node__node0);
		}

		public void FeaturePattern_alt_0_Konstante_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_FeaturePattern_alt_0_Konstante curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_c = curMatch._node_c;
			GRGEN_LGSP.LGSPNode node__node0 = curMatch._node__node0;
			GRGEN_LGSP.LGSPEdge edge__edge0 = curMatch._edge__edge0;
			graph.Remove(edge__edge0);
			graph.RemoveEdges(node_c);
			graph.Remove(node_c);
			graph.RemoveEdges(node__node0);
			graph.Remove(node__node0);
		}

		static Pattern_FeaturePattern() {
		}

		public interface IMatch_FeaturePattern : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IClass node_c { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			//Alternatives
			IMatch_FeaturePattern_alt_0 alt_0 { get; }
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_FeaturePattern_alt_0 : GRGEN_LIBGR.IMatch
		{
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_FeaturePattern_alt_0_MethodBody : IMatch_FeaturePattern_alt_0
		{
			//Nodes
			GRGEN_MODEL.IClass node_c { get; set; }
			GRGEN_MODEL.IMethodBody node_b { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge__edge0 { get; set; }
			//Variables
			//EmbeddedGraphs
			@GRGEN_ACTIONS.Pattern_Parameters.Match_Parameters @_sub0 { get; }
			@GRGEN_ACTIONS.Pattern_Statements.Match_Statements @_sub1 { get; }
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			new void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_FeaturePattern_alt_0_MethodSignature : IMatch_FeaturePattern_alt_0
		{
			//Nodes
			GRGEN_MODEL.IClass node_c { get; set; }
			GRGEN_MODEL.IMethodSignature node__node0 { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge__edge0 { get; set; }
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			new void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_FeaturePattern_alt_0_Variable : IMatch_FeaturePattern_alt_0
		{
			//Nodes
			GRGEN_MODEL.IClass node_c { get; set; }
			GRGEN_MODEL.IVariabel node__node0 { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge__edge0 { get; set; }
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			new void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_FeaturePattern_alt_0_Konstante : IMatch_FeaturePattern_alt_0
		{
			//Nodes
			GRGEN_MODEL.IClass node_c { get; set; }
			GRGEN_MODEL.IConstant node__node0 { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge__edge0 { get; set; }
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			new void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_FeaturePattern : GRGEN_LGSP.MatchListElement<Match_FeaturePattern>, IMatch_FeaturePattern
		{
			public GRGEN_MODEL.IClass node_c { get { return (GRGEN_MODEL.IClass)_node_c; } set { _node_c = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_c;
			public enum FeaturePattern_NodeNums { @c, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)FeaturePattern_NodeNums.@c: return _node_c;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "c": return _node_c;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "c": _node_c = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum FeaturePattern_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum FeaturePattern_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum FeaturePattern_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public IMatch_FeaturePattern_alt_0 alt_0 { get { return _alt_0; } }
			public IMatch_FeaturePattern_alt_0 _alt_0;
			public enum FeaturePattern_AltNums { @alt_0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				case (int)FeaturePattern_AltNums.@alt_0: return _alt_0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				case "alt_0": return _alt_0;
				default: return null;
				}
			}

			public enum FeaturePattern_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum FeaturePattern_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_FeaturePattern.instance.pat_FeaturePattern; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_FeaturePattern(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_FeaturePattern(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_FeaturePattern nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_FeaturePattern cur = this;
				while(cur != null) {
					Match_FeaturePattern next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_FeaturePattern that)
			{
				_node_c = that._node_c;
				_alt_0 = that._alt_0;
			}

			public Match_FeaturePattern(Match_FeaturePattern that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_FeaturePattern that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_c = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c];
				if(that._alt_0 is Match_FeaturePattern_alt_0_MethodBody)
					_alt_0 = new Match_FeaturePattern_alt_0_MethodBody((Match_FeaturePattern_alt_0_MethodBody)that._alt_0, oldToNewMap);
				else if(that._alt_0 is Match_FeaturePattern_alt_0_MethodSignature)
					_alt_0 = new Match_FeaturePattern_alt_0_MethodSignature((Match_FeaturePattern_alt_0_MethodSignature)that._alt_0, oldToNewMap);
				else if(that._alt_0 is Match_FeaturePattern_alt_0_Variable)
					_alt_0 = new Match_FeaturePattern_alt_0_Variable((Match_FeaturePattern_alt_0_Variable)that._alt_0, oldToNewMap);
				else if(that._alt_0 is Match_FeaturePattern_alt_0_Konstante)
					_alt_0 = new Match_FeaturePattern_alt_0_Konstante((Match_FeaturePattern_alt_0_Konstante)that._alt_0, oldToNewMap);
			}

			public Match_FeaturePattern(Match_FeaturePattern that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_FeaturePattern()
			{
			}

			public bool IsEqual(Match_FeaturePattern that)
			{
				if(that==null) return false;
				if(_node_c != that._node_c) return false;
				if(_alt_0 is Match_FeaturePattern_alt_0_MethodBody && !(_alt_0 as Match_FeaturePattern_alt_0_MethodBody).IsEqual(that._alt_0 as Match_FeaturePattern_alt_0_MethodBody)) return false;
				if(_alt_0 is Match_FeaturePattern_alt_0_MethodSignature && !(_alt_0 as Match_FeaturePattern_alt_0_MethodSignature).IsEqual(that._alt_0 as Match_FeaturePattern_alt_0_MethodSignature)) return false;
				if(_alt_0 is Match_FeaturePattern_alt_0_Variable && !(_alt_0 as Match_FeaturePattern_alt_0_Variable).IsEqual(that._alt_0 as Match_FeaturePattern_alt_0_Variable)) return false;
				if(_alt_0 is Match_FeaturePattern_alt_0_Konstante && !(_alt_0 as Match_FeaturePattern_alt_0_Konstante).IsEqual(that._alt_0 as Match_FeaturePattern_alt_0_Konstante)) return false;
				return true;
			}
		}

		public class Match_FeaturePattern_alt_0_MethodBody : GRGEN_LGSP.MatchListElement<Match_FeaturePattern_alt_0_MethodBody>, IMatch_FeaturePattern_alt_0_MethodBody
		{
			public GRGEN_MODEL.IClass node_c { get { return (GRGEN_MODEL.IClass)_node_c; } set { _node_c = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IMethodBody node_b { get { return (GRGEN_MODEL.IMethodBody)_node_b; } set { _node_b = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_c;
			public GRGEN_LGSP.LGSPNode _node_b;
			public enum FeaturePattern_alt_0_MethodBody_NodeNums { @c, @b, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)FeaturePattern_alt_0_MethodBody_NodeNums.@c: return _node_c;
				case (int)FeaturePattern_alt_0_MethodBody_NodeNums.@b: return _node_b;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "c": return _node_c;
				case "b": return _node_b;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "c": _node_c = (GRGEN_LGSP.LGSPNode)value; break;
				case "b": _node_b = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge__edge0 { get { return (GRGEN_MODEL.Icontains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public enum FeaturePattern_alt_0_MethodBody_EdgeNums { @_edge0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)FeaturePattern_alt_0_MethodBody_EdgeNums.@_edge0: return _edge__edge0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum FeaturePattern_alt_0_MethodBody_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public @GRGEN_ACTIONS.Pattern_Parameters.Match_Parameters @_sub0 { get { return @__sub0; } }
			public @GRGEN_ACTIONS.Pattern_Statements.Match_Statements @_sub1 { get { return @__sub1; } }
			public @GRGEN_ACTIONS.Pattern_Parameters.Match_Parameters @__sub0;
			public @GRGEN_ACTIONS.Pattern_Statements.Match_Statements @__sub1;
			public enum FeaturePattern_alt_0_MethodBody_SubNums { @_sub0, @_sub1, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 2; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				case (int)FeaturePattern_alt_0_MethodBody_SubNums.@_sub0: return __sub0;
				case (int)FeaturePattern_alt_0_MethodBody_SubNums.@_sub1: return __sub1;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				case "_sub0": return __sub0;
				case "_sub1": return __sub1;
				default: return null;
				}
			}

			public enum FeaturePattern_alt_0_MethodBody_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum FeaturePattern_alt_0_MethodBody_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum FeaturePattern_alt_0_MethodBody_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_FeaturePattern.instance.FeaturePattern_alt_0_MethodBody; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_FeaturePattern_alt_0_MethodBody(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_FeaturePattern_alt_0_MethodBody(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_FeaturePattern_alt_0_MethodBody nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_FeaturePattern_alt_0_MethodBody cur = this;
				while(cur != null) {
					Match_FeaturePattern_alt_0_MethodBody next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_FeaturePattern_alt_0_MethodBody that)
			{
				_node_c = that._node_c;
				_node_b = that._node_b;
				_edge__edge0 = that._edge__edge0;
				@__sub0 = that.@__sub0;
				@__sub1 = that.@__sub1;
			}

			public Match_FeaturePattern_alt_0_MethodBody(Match_FeaturePattern_alt_0_MethodBody that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_FeaturePattern_alt_0_MethodBody that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_c = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c];
				_node_b = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_b];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
				@__sub0 = new GRGEN_ACTIONS.Pattern_Parameters.Match_Parameters(that.@__sub0, oldToNewMap);
				@__sub1 = new GRGEN_ACTIONS.Pattern_Statements.Match_Statements(that.@__sub1, oldToNewMap);
			}

			public Match_FeaturePattern_alt_0_MethodBody(Match_FeaturePattern_alt_0_MethodBody that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_FeaturePattern_alt_0_MethodBody()
			{
			}

			public bool IsEqual(Match_FeaturePattern_alt_0_MethodBody that)
			{
				if(that==null) return false;
				if(_node_c != that._node_c) return false;
				if(_node_b != that._node_b) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				if(!@__sub0.IsEqual(that.@__sub0)) return false;
				if(!@__sub1.IsEqual(that.@__sub1)) return false;
				return true;
			}
		}

		public class Match_FeaturePattern_alt_0_MethodSignature : GRGEN_LGSP.MatchListElement<Match_FeaturePattern_alt_0_MethodSignature>, IMatch_FeaturePattern_alt_0_MethodSignature
		{
			public GRGEN_MODEL.IClass node_c { get { return (GRGEN_MODEL.IClass)_node_c; } set { _node_c = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IMethodSignature node__node0 { get { return (GRGEN_MODEL.IMethodSignature)_node__node0; } set { _node__node0 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_c;
			public GRGEN_LGSP.LGSPNode _node__node0;
			public enum FeaturePattern_alt_0_MethodSignature_NodeNums { @c, @_node0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)FeaturePattern_alt_0_MethodSignature_NodeNums.@c: return _node_c;
				case (int)FeaturePattern_alt_0_MethodSignature_NodeNums.@_node0: return _node__node0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "c": return _node_c;
				case "_node0": return _node__node0;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "c": _node_c = (GRGEN_LGSP.LGSPNode)value; break;
				case "_node0": _node__node0 = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge__edge0 { get { return (GRGEN_MODEL.Icontains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public enum FeaturePattern_alt_0_MethodSignature_EdgeNums { @_edge0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)FeaturePattern_alt_0_MethodSignature_EdgeNums.@_edge0: return _edge__edge0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum FeaturePattern_alt_0_MethodSignature_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum FeaturePattern_alt_0_MethodSignature_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum FeaturePattern_alt_0_MethodSignature_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum FeaturePattern_alt_0_MethodSignature_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum FeaturePattern_alt_0_MethodSignature_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_FeaturePattern.instance.FeaturePattern_alt_0_MethodSignature; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_FeaturePattern_alt_0_MethodSignature(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_FeaturePattern_alt_0_MethodSignature(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_FeaturePattern_alt_0_MethodSignature nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_FeaturePattern_alt_0_MethodSignature cur = this;
				while(cur != null) {
					Match_FeaturePattern_alt_0_MethodSignature next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_FeaturePattern_alt_0_MethodSignature that)
			{
				_node_c = that._node_c;
				_node__node0 = that._node__node0;
				_edge__edge0 = that._edge__edge0;
			}

			public Match_FeaturePattern_alt_0_MethodSignature(Match_FeaturePattern_alt_0_MethodSignature that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_FeaturePattern_alt_0_MethodSignature that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_c = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c];
				_node__node0 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node__node0];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
			}

			public Match_FeaturePattern_alt_0_MethodSignature(Match_FeaturePattern_alt_0_MethodSignature that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_FeaturePattern_alt_0_MethodSignature()
			{
			}

			public bool IsEqual(Match_FeaturePattern_alt_0_MethodSignature that)
			{
				if(that==null) return false;
				if(_node_c != that._node_c) return false;
				if(_node__node0 != that._node__node0) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				return true;
			}
		}

		public class Match_FeaturePattern_alt_0_Variable : GRGEN_LGSP.MatchListElement<Match_FeaturePattern_alt_0_Variable>, IMatch_FeaturePattern_alt_0_Variable
		{
			public GRGEN_MODEL.IClass node_c { get { return (GRGEN_MODEL.IClass)_node_c; } set { _node_c = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IVariabel node__node0 { get { return (GRGEN_MODEL.IVariabel)_node__node0; } set { _node__node0 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_c;
			public GRGEN_LGSP.LGSPNode _node__node0;
			public enum FeaturePattern_alt_0_Variable_NodeNums { @c, @_node0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)FeaturePattern_alt_0_Variable_NodeNums.@c: return _node_c;
				case (int)FeaturePattern_alt_0_Variable_NodeNums.@_node0: return _node__node0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "c": return _node_c;
				case "_node0": return _node__node0;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "c": _node_c = (GRGEN_LGSP.LGSPNode)value; break;
				case "_node0": _node__node0 = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge__edge0 { get { return (GRGEN_MODEL.Icontains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public enum FeaturePattern_alt_0_Variable_EdgeNums { @_edge0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)FeaturePattern_alt_0_Variable_EdgeNums.@_edge0: return _edge__edge0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum FeaturePattern_alt_0_Variable_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum FeaturePattern_alt_0_Variable_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum FeaturePattern_alt_0_Variable_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum FeaturePattern_alt_0_Variable_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum FeaturePattern_alt_0_Variable_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_FeaturePattern.instance.FeaturePattern_alt_0_Variable; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_FeaturePattern_alt_0_Variable(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_FeaturePattern_alt_0_Variable(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_FeaturePattern_alt_0_Variable nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_FeaturePattern_alt_0_Variable cur = this;
				while(cur != null) {
					Match_FeaturePattern_alt_0_Variable next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_FeaturePattern_alt_0_Variable that)
			{
				_node_c = that._node_c;
				_node__node0 = that._node__node0;
				_edge__edge0 = that._edge__edge0;
			}

			public Match_FeaturePattern_alt_0_Variable(Match_FeaturePattern_alt_0_Variable that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_FeaturePattern_alt_0_Variable that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_c = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c];
				_node__node0 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node__node0];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
			}

			public Match_FeaturePattern_alt_0_Variable(Match_FeaturePattern_alt_0_Variable that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_FeaturePattern_alt_0_Variable()
			{
			}

			public bool IsEqual(Match_FeaturePattern_alt_0_Variable that)
			{
				if(that==null) return false;
				if(_node_c != that._node_c) return false;
				if(_node__node0 != that._node__node0) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				return true;
			}
		}

		public class Match_FeaturePattern_alt_0_Konstante : GRGEN_LGSP.MatchListElement<Match_FeaturePattern_alt_0_Konstante>, IMatch_FeaturePattern_alt_0_Konstante
		{
			public GRGEN_MODEL.IClass node_c { get { return (GRGEN_MODEL.IClass)_node_c; } set { _node_c = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IConstant node__node0 { get { return (GRGEN_MODEL.IConstant)_node__node0; } set { _node__node0 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_c;
			public GRGEN_LGSP.LGSPNode _node__node0;
			public enum FeaturePattern_alt_0_Konstante_NodeNums { @c, @_node0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)FeaturePattern_alt_0_Konstante_NodeNums.@c: return _node_c;
				case (int)FeaturePattern_alt_0_Konstante_NodeNums.@_node0: return _node__node0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "c": return _node_c;
				case "_node0": return _node__node0;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "c": _node_c = (GRGEN_LGSP.LGSPNode)value; break;
				case "_node0": _node__node0 = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge__edge0 { get { return (GRGEN_MODEL.Icontains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public enum FeaturePattern_alt_0_Konstante_EdgeNums { @_edge0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)FeaturePattern_alt_0_Konstante_EdgeNums.@_edge0: return _edge__edge0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum FeaturePattern_alt_0_Konstante_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum FeaturePattern_alt_0_Konstante_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum FeaturePattern_alt_0_Konstante_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum FeaturePattern_alt_0_Konstante_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum FeaturePattern_alt_0_Konstante_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_FeaturePattern.instance.FeaturePattern_alt_0_Konstante; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_FeaturePattern_alt_0_Konstante(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_FeaturePattern_alt_0_Konstante(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_FeaturePattern_alt_0_Konstante nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_FeaturePattern_alt_0_Konstante cur = this;
				while(cur != null) {
					Match_FeaturePattern_alt_0_Konstante next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_FeaturePattern_alt_0_Konstante that)
			{
				_node_c = that._node_c;
				_node__node0 = that._node__node0;
				_edge__edge0 = that._edge__edge0;
			}

			public Match_FeaturePattern_alt_0_Konstante(Match_FeaturePattern_alt_0_Konstante that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_FeaturePattern_alt_0_Konstante that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_c = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c];
				_node__node0 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node__node0];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
			}

			public Match_FeaturePattern_alt_0_Konstante(Match_FeaturePattern_alt_0_Konstante that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_FeaturePattern_alt_0_Konstante()
			{
			}

			public bool IsEqual(Match_FeaturePattern_alt_0_Konstante that)
			{
				if(that==null) return false;
				if(_node_c != that._node_c) return false;
				if(_node__node0 != that._node__node0) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				return true;
			}
		}

	}


	public class Pattern_Parameters : GRGEN_LGSP.LGSPMatchingPattern
	{
		private static Pattern_Parameters instance = null;
		public static Pattern_Parameters Instance { get { if(instance==null) { instance = new Pattern_Parameters(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] Parameters_node_b_AllowedTypes = null;
		public static bool[] Parameters_node_b_IsAllowedType = null;
		public enum Parameters_NodeNums { @b, };
		public enum Parameters_EdgeNums { };
		public enum Parameters_VariableNums { };
		public enum Parameters_SubNums { };
		public enum Parameters_AltNums { };
		public enum Parameters_IterNums { @iter_0, };



		public GRGEN_LGSP.PatternGraph pat_Parameters;

		public enum Parameters_iter_0_NodeNums { @b, };
		public enum Parameters_iter_0_EdgeNums { };
		public enum Parameters_iter_0_VariableNums { };
		public enum Parameters_iter_0_SubNums { @_sub0, };
		public enum Parameters_iter_0_AltNums { };
		public enum Parameters_iter_0_IterNums { };



		public GRGEN_LGSP.PatternGraph Parameters_iter_0;


		private Pattern_Parameters()
			: base("Parameters",
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_MethodBody.typeVar, },
				new string[] { "Parameters_node_b", },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { }
			)
		{
		}
		private void initialize()
		{
			bool[,] Parameters_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] Parameters_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] Parameters_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] Parameters_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternNode Parameters_node_b = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@MethodBody, GRGEN_MODEL.NodeType_MethodBody.typeVar, "GRGEN_MODEL.IMethodBody", "Parameters_node_b", "b", Parameters_node_b_AllowedTypes, Parameters_node_b_IsAllowedType, 5.5F, 0, false, null, null, null, null, null, null, false, null);
			bool[,] Parameters_iter_0_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] Parameters_iter_0_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] Parameters_iter_0_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] Parameters_iter_0_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternGraphEmbedding Parameters_iter_0__sub0 = new GRGEN_LGSP.PatternGraphEmbedding("_sub0", Pattern_Parameter.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("Parameters_node_b"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "Parameters_node_b" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { Parameters_node_b }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			Parameters_iter_0 = new GRGEN_LGSP.PatternGraph(
				"iter_0",
				"Parameters_",
				null, "iter_0",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Parameters_node_b }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] { Parameters_iter_0__sub0 }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[0, 0] ,
				Parameters_iter_0_isNodeHomomorphicGlobal,
				Parameters_iter_0_isEdgeHomomorphicGlobal,
				Parameters_iter_0_isNodeTotallyHomomorphic,
				Parameters_iter_0_isEdgeTotallyHomomorphic
			);

			GRGEN_LGSP.Iterated Parameters_iter_0_it = new GRGEN_LGSP.Iterated( Parameters_iter_0, 0, 0, new GRGEN_LGSP.LGSPFilter[] {
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
			}
			);
			pat_Parameters = new GRGEN_LGSP.PatternGraph(
				"Parameters",
				"",
				null, "Parameters",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Parameters_node_b }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] { Parameters_iter_0_it,  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[0, 0] ,
				Parameters_isNodeHomomorphicGlobal,
				Parameters_isEdgeHomomorphicGlobal,
				Parameters_isNodeTotallyHomomorphic,
				Parameters_isEdgeTotallyHomomorphic
			);
			Parameters_iter_0.embeddingGraph = pat_Parameters;

			Parameters_node_b.pointOfDefinition = null;
			Parameters_iter_0__sub0.PointOfDefinition = Parameters_iter_0;

			patternGraph = pat_Parameters;
		}


		public void Parameters_Create(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPNode node_b)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			graph.SettingAddedNodeNames( create_Parameters_addedNodeNames );
			graph.SettingAddedEdgeNames( create_Parameters_addedEdgeNames );
		}
		private static string[] create_Parameters_addedNodeNames = new string[] {  };
		private static string[] create_Parameters_addedEdgeNames = new string[] {  };

		public void Parameters_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Parameters curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPMatchesList<Match_Parameters_iter_0, IMatch_Parameters_iter_0> iterated_iter_0 = curMatch._iter_0;
		}

		public void Parameters_iter_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPMatchesList<Match_Parameters_iter_0, IMatch_Parameters_iter_0> curMatches)
		{
			for(Match_Parameters_iter_0 curMatch=curMatches.Root; curMatch!=null; curMatch=curMatch.next) {
				Parameters_iter_0_Delete(actionEnv, curMatch);
			}
		}

		public void Parameters_iter_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Parameters_iter_0 curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_b = curMatch._node_b;
			GRGEN_ACTIONS.Pattern_Parameter.Match_Parameter subpattern__sub0 = curMatch.@__sub0;
			graph.RemoveEdges(node_b);
			graph.Remove(node_b);
			GRGEN_ACTIONS.Pattern_Parameter.Instance.Parameter_Delete(actionEnv, subpattern__sub0);
		}

		static Pattern_Parameters() {
		}

		public interface IMatch_Parameters : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IMethodBody node_b { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			GRGEN_LIBGR.IMatchesExact<IMatch_Parameters_iter_0> iter_0 { get; }
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_Parameters_iter_0 : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IMethodBody node_b { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			@GRGEN_ACTIONS.Pattern_Parameter.Match_Parameter @_sub0 { get; }
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			bool IsNullMatch { get; }
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_Parameters : GRGEN_LGSP.MatchListElement<Match_Parameters>, IMatch_Parameters
		{
			public GRGEN_MODEL.IMethodBody node_b { get { return (GRGEN_MODEL.IMethodBody)_node_b; } set { _node_b = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_b;
			public enum Parameters_NodeNums { @b, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Parameters_NodeNums.@b: return _node_b;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "b": return _node_b;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "b": _node_b = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum Parameters_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Parameters_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Parameters_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Parameters_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public GRGEN_LIBGR.IMatchesExact<IMatch_Parameters_iter_0> iter_0 { get { return _iter_0; } }
			public GRGEN_LGSP.LGSPMatchesList<Match_Parameters_iter_0, IMatch_Parameters_iter_0> _iter_0;
			public enum Parameters_IterNums { @iter_0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 1; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				case (int)Parameters_IterNums.@iter_0: return _iter_0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				case "iter_0": return _iter_0;
				default: return null;
				}
			}

			public enum Parameters_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Parameters.instance.pat_Parameters; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Parameters(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Parameters(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Parameters nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Parameters cur = this;
				while(cur != null) {
					Match_Parameters next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Parameters that)
			{
				_node_b = that._node_b;
				_iter_0 = that._iter_0;
			}

			public Match_Parameters(Match_Parameters that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Parameters that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_b = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_b];
				_iter_0 = new GRGEN_LGSP.LGSPMatchesList<Match_Parameters_iter_0, IMatch_Parameters_iter_0>(that._iter_0, oldToNewMap);
			}

			public Match_Parameters(Match_Parameters that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Parameters()
			{
			}

			public bool IsEqual(Match_Parameters that)
			{
				if(that==null) return false;
				if(_node_b != that._node_b) return false;
				if(_iter_0.Count != that._iter_0.Count) return false;
				IEnumerator<GRGEN_LIBGR.IMatch> _iter_0_thisEnumerator = _iter_0.GetEnumerator();
				IEnumerator<GRGEN_LIBGR.IMatch> _iter_0_thatEnumerator = that._iter_0.GetEnumerator();
				while(_iter_0_thisEnumerator.MoveNext())
				{
					_iter_0_thatEnumerator.MoveNext();
					if(!(_iter_0_thisEnumerator.Current as Match_Parameters_iter_0).IsEqual(_iter_0_thatEnumerator.Current as Match_Parameters_iter_0)) return false;
				}
				return true;
			}
		}

		public class Match_Parameters_iter_0 : GRGEN_LGSP.MatchListElement<Match_Parameters_iter_0>, IMatch_Parameters_iter_0
		{
			public GRGEN_MODEL.IMethodBody node_b { get { return (GRGEN_MODEL.IMethodBody)_node_b; } set { _node_b = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_b;
			public enum Parameters_iter_0_NodeNums { @b, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Parameters_iter_0_NodeNums.@b: return _node_b;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "b": return _node_b;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "b": _node_b = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum Parameters_iter_0_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Parameters_iter_0_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public @GRGEN_ACTIONS.Pattern_Parameter.Match_Parameter @_sub0 { get { return @__sub0; } }
			public @GRGEN_ACTIONS.Pattern_Parameter.Match_Parameter @__sub0;
			public enum Parameters_iter_0_SubNums { @_sub0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				case (int)Parameters_iter_0_SubNums.@_sub0: return __sub0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				case "_sub0": return __sub0;
				default: return null;
				}
			}

			public enum Parameters_iter_0_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Parameters_iter_0_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Parameters_iter_0_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Parameters.instance.Parameters_iter_0; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public bool IsNullMatch { get { return _isNullMatch; } }
			public bool _isNullMatch;
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Parameters_iter_0(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Parameters_iter_0(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Parameters_iter_0 nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Parameters_iter_0 cur = this;
				while(cur != null) {
					Match_Parameters_iter_0 next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Parameters_iter_0 that)
			{
				_node_b = that._node_b;
				@__sub0 = that.@__sub0;
			}

			public Match_Parameters_iter_0(Match_Parameters_iter_0 that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Parameters_iter_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_b = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_b];
				@__sub0 = new GRGEN_ACTIONS.Pattern_Parameter.Match_Parameter(that.@__sub0, oldToNewMap);
			}

			public Match_Parameters_iter_0(Match_Parameters_iter_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Parameters_iter_0()
			{
			}

			public bool IsEqual(Match_Parameters_iter_0 that)
			{
				if(that==null) return false;
				if(_node_b != that._node_b) return false;
				if(!@__sub0.IsEqual(that.@__sub0)) return false;
				return true;
			}
		}

	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0 instanceBearingAttributeForSearch_Parameters_iter_0 = new GRGEN_ACTIONS.Pattern_Parameters.Match_Parameters_iter_0();
		public static List<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0> Array_Parameters_iter_0_groupBy_b(List<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0> list)
		{
			Dictionary<GRGEN_MODEL.IMethodBody, List<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0>> seenValues = new Dictionary<GRGEN_MODEL.IMethodBody, List<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_b)) {
					seenValues[list[pos].@node_b].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0> tempList = new List<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_b, tempList);
				}
			}
			List<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0>();
			foreach(List<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0> Array_Parameters_iter_0_keepOneForEachBy_b(List<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0> list)
		{
			List<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0>();
			Dictionary<GRGEN_MODEL.IMethodBody, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IMethodBody, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0 element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_b)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_b, null);
				}
			}
			return newList;
		}
		public static int Array_Parameters_iter_0_indexOfBy_b(IList<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0> list, GRGEN_MODEL.IMethodBody entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_b.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Parameters_iter_0_indexOfBy_b(IList<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0> list, GRGEN_MODEL.IMethodBody entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_b.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Parameters_iter_0_lastIndexOfBy_b(IList<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0> list, GRGEN_MODEL.IMethodBody entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_b.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Parameters_iter_0_lastIndexOfBy_b(IList<GRGEN_ACTIONS.Pattern_Parameters.IMatch_Parameters_iter_0> list, GRGEN_MODEL.IMethodBody entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_b.Equals(entry))
					return i;
			return -1;
		}
	}

	public class Pattern_Parameter : GRGEN_LGSP.LGSPMatchingPattern
	{
		private static Pattern_Parameter instance = null;
		public static Pattern_Parameter Instance { get { if(instance==null) { instance = new Pattern_Parameter(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] Parameter_node_b_AllowedTypes = null;
		public static bool[] Parameter_node_b_IsAllowedType = null;
		public enum Parameter_NodeNums { @b, };
		public enum Parameter_EdgeNums { };
		public enum Parameter_VariableNums { };
		public enum Parameter_SubNums { };
		public enum Parameter_AltNums { @alt_0, };
		public enum Parameter_IterNums { };



		public GRGEN_LGSP.PatternGraph pat_Parameter;

		public enum Parameter_alt_0_CaseNums { @Variable, @Konstante, };
		public static GRGEN_LIBGR.NodeType[] Parameter_alt_0_Variable_node_v_AllowedTypes = null;
		public static bool[] Parameter_alt_0_Variable_node_v_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] Parameter_alt_0_Variable_edge__edge0_AllowedTypes = null;
		public static bool[] Parameter_alt_0_Variable_edge__edge0_IsAllowedType = null;
		public enum Parameter_alt_0_Variable_NodeNums { @b, @v, };
		public enum Parameter_alt_0_Variable_EdgeNums { @_edge0, };
		public enum Parameter_alt_0_Variable_VariableNums { };
		public enum Parameter_alt_0_Variable_SubNums { };
		public enum Parameter_alt_0_Variable_AltNums { };
		public enum Parameter_alt_0_Variable_IterNums { };



		public GRGEN_LGSP.PatternGraph Parameter_alt_0_Variable;

		public static GRGEN_LIBGR.NodeType[] Parameter_alt_0_Konstante_node_c_AllowedTypes = null;
		public static bool[] Parameter_alt_0_Konstante_node_c_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] Parameter_alt_0_Konstante_edge__edge0_AllowedTypes = null;
		public static bool[] Parameter_alt_0_Konstante_edge__edge0_IsAllowedType = null;
		public enum Parameter_alt_0_Konstante_NodeNums { @b, @c, };
		public enum Parameter_alt_0_Konstante_EdgeNums { @_edge0, };
		public enum Parameter_alt_0_Konstante_VariableNums { };
		public enum Parameter_alt_0_Konstante_SubNums { };
		public enum Parameter_alt_0_Konstante_AltNums { };
		public enum Parameter_alt_0_Konstante_IterNums { };



		public GRGEN_LGSP.PatternGraph Parameter_alt_0_Konstante;


		private Pattern_Parameter()
			: base("Parameter",
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_MethodBody.typeVar, },
				new string[] { "Parameter_node_b", },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { }
			)
		{
		}
		private void initialize()
		{
			bool[,] Parameter_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] Parameter_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] Parameter_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] Parameter_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternNode Parameter_node_b = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@MethodBody, GRGEN_MODEL.NodeType_MethodBody.typeVar, "GRGEN_MODEL.IMethodBody", "Parameter_node_b", "b", Parameter_node_b_AllowedTypes, Parameter_node_b_IsAllowedType, 5.5F, 0, false, null, null, null, null, null, null, false, null);
			bool[,] Parameter_alt_0_Variable_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] Parameter_alt_0_Variable_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] Parameter_alt_0_Variable_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] Parameter_alt_0_Variable_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternNode Parameter_alt_0_Variable_node_v = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Variabel, GRGEN_MODEL.NodeType_Variabel.typeVar, "GRGEN_MODEL.IVariabel", "Parameter_alt_0_Variable_node_v", "v", Parameter_alt_0_Variable_node_v_AllowedTypes, Parameter_alt_0_Variable_node_v_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge Parameter_alt_0_Variable_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "Parameter_alt_0_Variable_edge__edge0", "_edge0", Parameter_alt_0_Variable_edge__edge0_AllowedTypes, Parameter_alt_0_Variable_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			Parameter_alt_0_Variable = new GRGEN_LGSP.PatternGraph(
				"Variable",
				"Parameter_alt_0_",
				null, "Variable",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Parameter_node_b, Parameter_alt_0_Variable_node_v }, 
				new GRGEN_LGSP.PatternEdge[] { Parameter_alt_0_Variable_edge__edge0 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				Parameter_alt_0_Variable_isNodeHomomorphicGlobal,
				Parameter_alt_0_Variable_isEdgeHomomorphicGlobal,
				Parameter_alt_0_Variable_isNodeTotallyHomomorphic,
				Parameter_alt_0_Variable_isEdgeTotallyHomomorphic
			);
			Parameter_alt_0_Variable.edgeToSourceNode.Add(Parameter_alt_0_Variable_edge__edge0, Parameter_node_b);
			Parameter_alt_0_Variable.edgeToTargetNode.Add(Parameter_alt_0_Variable_edge__edge0, Parameter_alt_0_Variable_node_v);

			bool[,] Parameter_alt_0_Konstante_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] Parameter_alt_0_Konstante_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] Parameter_alt_0_Konstante_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] Parameter_alt_0_Konstante_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternNode Parameter_alt_0_Konstante_node_c = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Constant, GRGEN_MODEL.NodeType_Constant.typeVar, "GRGEN_MODEL.IConstant", "Parameter_alt_0_Konstante_node_c", "c", Parameter_alt_0_Konstante_node_c_AllowedTypes, Parameter_alt_0_Konstante_node_c_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge Parameter_alt_0_Konstante_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "Parameter_alt_0_Konstante_edge__edge0", "_edge0", Parameter_alt_0_Konstante_edge__edge0_AllowedTypes, Parameter_alt_0_Konstante_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			Parameter_alt_0_Konstante = new GRGEN_LGSP.PatternGraph(
				"Konstante",
				"Parameter_alt_0_",
				null, "Konstante",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Parameter_node_b, Parameter_alt_0_Konstante_node_c }, 
				new GRGEN_LGSP.PatternEdge[] { Parameter_alt_0_Konstante_edge__edge0 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				Parameter_alt_0_Konstante_isNodeHomomorphicGlobal,
				Parameter_alt_0_Konstante_isEdgeHomomorphicGlobal,
				Parameter_alt_0_Konstante_isNodeTotallyHomomorphic,
				Parameter_alt_0_Konstante_isEdgeTotallyHomomorphic
			);
			Parameter_alt_0_Konstante.edgeToSourceNode.Add(Parameter_alt_0_Konstante_edge__edge0, Parameter_node_b);
			Parameter_alt_0_Konstante.edgeToTargetNode.Add(Parameter_alt_0_Konstante_edge__edge0, Parameter_alt_0_Konstante_node_c);

			GRGEN_LGSP.Alternative Parameter_alt_0 = new GRGEN_LGSP.Alternative( "alt_0", "Parameter_", new GRGEN_LGSP.PatternGraph[] { Parameter_alt_0_Variable, Parameter_alt_0_Konstante } );

			pat_Parameter = new GRGEN_LGSP.PatternGraph(
				"Parameter",
				"",
				null, "Parameter",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Parameter_node_b }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] { Parameter_alt_0,  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[0, 0] ,
				Parameter_isNodeHomomorphicGlobal,
				Parameter_isEdgeHomomorphicGlobal,
				Parameter_isNodeTotallyHomomorphic,
				Parameter_isEdgeTotallyHomomorphic
			);
			Parameter_alt_0_Variable.embeddingGraph = pat_Parameter;
			Parameter_alt_0_Konstante.embeddingGraph = pat_Parameter;

			Parameter_node_b.pointOfDefinition = null;
			Parameter_alt_0_Variable_node_v.pointOfDefinition = Parameter_alt_0_Variable;
			Parameter_alt_0_Variable_edge__edge0.pointOfDefinition = Parameter_alt_0_Variable;
			Parameter_alt_0_Konstante_node_c.pointOfDefinition = Parameter_alt_0_Konstante;
			Parameter_alt_0_Konstante_edge__edge0.pointOfDefinition = Parameter_alt_0_Konstante;

			patternGraph = pat_Parameter;
		}


		public void Parameter_Create(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPNode node_b)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			graph.SettingAddedNodeNames( create_Parameter_addedNodeNames );
			graph.SettingAddedEdgeNames( create_Parameter_addedEdgeNames );
		}
		private static string[] create_Parameter_addedNodeNames = new string[] {  };
		private static string[] create_Parameter_addedEdgeNames = new string[] {  };

		public void Parameter_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Parameter curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			IMatch_Parameter_alt_0 alternative_alt_0 = curMatch._alt_0;
		}

		public void Parameter_alt_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, IMatch_Parameter_alt_0 curMatch)
		{
			if(curMatch.Pattern == Parameter_alt_0_Variable) {
				Parameter_alt_0_Variable_Delete(actionEnv, (Match_Parameter_alt_0_Variable)curMatch);
				return;
			}
			else if(curMatch.Pattern == Parameter_alt_0_Konstante) {
				Parameter_alt_0_Konstante_Delete(actionEnv, (Match_Parameter_alt_0_Konstante)curMatch);
				return;
			}
			throw new ApplicationException(); //debug assert
		}

		public void Parameter_alt_0_Variable_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Parameter_alt_0_Variable curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_b = curMatch._node_b;
			GRGEN_LGSP.LGSPNode node_v = curMatch._node_v;
			GRGEN_LGSP.LGSPEdge edge__edge0 = curMatch._edge__edge0;
			graph.Remove(edge__edge0);
			graph.RemoveEdges(node_b);
			graph.Remove(node_b);
			graph.RemoveEdges(node_v);
			graph.Remove(node_v);
		}

		public void Parameter_alt_0_Konstante_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Parameter_alt_0_Konstante curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_b = curMatch._node_b;
			GRGEN_LGSP.LGSPNode node_c = curMatch._node_c;
			GRGEN_LGSP.LGSPEdge edge__edge0 = curMatch._edge__edge0;
			graph.Remove(edge__edge0);
			graph.RemoveEdges(node_b);
			graph.Remove(node_b);
			graph.RemoveEdges(node_c);
			graph.Remove(node_c);
		}

		static Pattern_Parameter() {
		}

		public interface IMatch_Parameter : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IMethodBody node_b { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			//Alternatives
			IMatch_Parameter_alt_0 alt_0 { get; }
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_Parameter_alt_0 : GRGEN_LIBGR.IMatch
		{
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_Parameter_alt_0_Variable : IMatch_Parameter_alt_0
		{
			//Nodes
			GRGEN_MODEL.IMethodBody node_b { get; set; }
			GRGEN_MODEL.IVariabel node_v { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge__edge0 { get; set; }
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			new void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_Parameter_alt_0_Konstante : IMatch_Parameter_alt_0
		{
			//Nodes
			GRGEN_MODEL.IMethodBody node_b { get; set; }
			GRGEN_MODEL.IConstant node_c { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge__edge0 { get; set; }
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			new void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_Parameter : GRGEN_LGSP.MatchListElement<Match_Parameter>, IMatch_Parameter
		{
			public GRGEN_MODEL.IMethodBody node_b { get { return (GRGEN_MODEL.IMethodBody)_node_b; } set { _node_b = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_b;
			public enum Parameter_NodeNums { @b, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Parameter_NodeNums.@b: return _node_b;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "b": return _node_b;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "b": _node_b = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum Parameter_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Parameter_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Parameter_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public IMatch_Parameter_alt_0 alt_0 { get { return _alt_0; } }
			public IMatch_Parameter_alt_0 _alt_0;
			public enum Parameter_AltNums { @alt_0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				case (int)Parameter_AltNums.@alt_0: return _alt_0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				case "alt_0": return _alt_0;
				default: return null;
				}
			}

			public enum Parameter_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Parameter_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Parameter.instance.pat_Parameter; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Parameter(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Parameter(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Parameter nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Parameter cur = this;
				while(cur != null) {
					Match_Parameter next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Parameter that)
			{
				_node_b = that._node_b;
				_alt_0 = that._alt_0;
			}

			public Match_Parameter(Match_Parameter that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Parameter that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_b = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_b];
				if(that._alt_0 is Match_Parameter_alt_0_Variable)
					_alt_0 = new Match_Parameter_alt_0_Variable((Match_Parameter_alt_0_Variable)that._alt_0, oldToNewMap);
				else if(that._alt_0 is Match_Parameter_alt_0_Konstante)
					_alt_0 = new Match_Parameter_alt_0_Konstante((Match_Parameter_alt_0_Konstante)that._alt_0, oldToNewMap);
			}

			public Match_Parameter(Match_Parameter that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Parameter()
			{
			}

			public bool IsEqual(Match_Parameter that)
			{
				if(that==null) return false;
				if(_node_b != that._node_b) return false;
				if(_alt_0 is Match_Parameter_alt_0_Variable && !(_alt_0 as Match_Parameter_alt_0_Variable).IsEqual(that._alt_0 as Match_Parameter_alt_0_Variable)) return false;
				if(_alt_0 is Match_Parameter_alt_0_Konstante && !(_alt_0 as Match_Parameter_alt_0_Konstante).IsEqual(that._alt_0 as Match_Parameter_alt_0_Konstante)) return false;
				return true;
			}
		}

		public class Match_Parameter_alt_0_Variable : GRGEN_LGSP.MatchListElement<Match_Parameter_alt_0_Variable>, IMatch_Parameter_alt_0_Variable
		{
			public GRGEN_MODEL.IMethodBody node_b { get { return (GRGEN_MODEL.IMethodBody)_node_b; } set { _node_b = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IVariabel node_v { get { return (GRGEN_MODEL.IVariabel)_node_v; } set { _node_v = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_b;
			public GRGEN_LGSP.LGSPNode _node_v;
			public enum Parameter_alt_0_Variable_NodeNums { @b, @v, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Parameter_alt_0_Variable_NodeNums.@b: return _node_b;
				case (int)Parameter_alt_0_Variable_NodeNums.@v: return _node_v;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "b": return _node_b;
				case "v": return _node_v;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "b": _node_b = (GRGEN_LGSP.LGSPNode)value; break;
				case "v": _node_v = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge__edge0 { get { return (GRGEN_MODEL.Icontains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public enum Parameter_alt_0_Variable_EdgeNums { @_edge0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)Parameter_alt_0_Variable_EdgeNums.@_edge0: return _edge__edge0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum Parameter_alt_0_Variable_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Parameter_alt_0_Variable_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Parameter_alt_0_Variable_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Parameter_alt_0_Variable_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Parameter_alt_0_Variable_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Parameter.instance.Parameter_alt_0_Variable; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Parameter_alt_0_Variable(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Parameter_alt_0_Variable(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Parameter_alt_0_Variable nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Parameter_alt_0_Variable cur = this;
				while(cur != null) {
					Match_Parameter_alt_0_Variable next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Parameter_alt_0_Variable that)
			{
				_node_b = that._node_b;
				_node_v = that._node_v;
				_edge__edge0 = that._edge__edge0;
			}

			public Match_Parameter_alt_0_Variable(Match_Parameter_alt_0_Variable that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Parameter_alt_0_Variable that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_b = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_b];
				_node_v = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_v];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
			}

			public Match_Parameter_alt_0_Variable(Match_Parameter_alt_0_Variable that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Parameter_alt_0_Variable()
			{
			}

			public bool IsEqual(Match_Parameter_alt_0_Variable that)
			{
				if(that==null) return false;
				if(_node_b != that._node_b) return false;
				if(_node_v != that._node_v) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				return true;
			}
		}

		public class Match_Parameter_alt_0_Konstante : GRGEN_LGSP.MatchListElement<Match_Parameter_alt_0_Konstante>, IMatch_Parameter_alt_0_Konstante
		{
			public GRGEN_MODEL.IMethodBody node_b { get { return (GRGEN_MODEL.IMethodBody)_node_b; } set { _node_b = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IConstant node_c { get { return (GRGEN_MODEL.IConstant)_node_c; } set { _node_c = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_b;
			public GRGEN_LGSP.LGSPNode _node_c;
			public enum Parameter_alt_0_Konstante_NodeNums { @b, @c, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Parameter_alt_0_Konstante_NodeNums.@b: return _node_b;
				case (int)Parameter_alt_0_Konstante_NodeNums.@c: return _node_c;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "b": return _node_b;
				case "c": return _node_c;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "b": _node_b = (GRGEN_LGSP.LGSPNode)value; break;
				case "c": _node_c = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge__edge0 { get { return (GRGEN_MODEL.Icontains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public enum Parameter_alt_0_Konstante_EdgeNums { @_edge0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)Parameter_alt_0_Konstante_EdgeNums.@_edge0: return _edge__edge0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum Parameter_alt_0_Konstante_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Parameter_alt_0_Konstante_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Parameter_alt_0_Konstante_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Parameter_alt_0_Konstante_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Parameter_alt_0_Konstante_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Parameter.instance.Parameter_alt_0_Konstante; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Parameter_alt_0_Konstante(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Parameter_alt_0_Konstante(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Parameter_alt_0_Konstante nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Parameter_alt_0_Konstante cur = this;
				while(cur != null) {
					Match_Parameter_alt_0_Konstante next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Parameter_alt_0_Konstante that)
			{
				_node_b = that._node_b;
				_node_c = that._node_c;
				_edge__edge0 = that._edge__edge0;
			}

			public Match_Parameter_alt_0_Konstante(Match_Parameter_alt_0_Konstante that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Parameter_alt_0_Konstante that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_b = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_b];
				_node_c = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
			}

			public Match_Parameter_alt_0_Konstante(Match_Parameter_alt_0_Konstante that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Parameter_alt_0_Konstante()
			{
			}

			public bool IsEqual(Match_Parameter_alt_0_Konstante that)
			{
				if(that==null) return false;
				if(_node_b != that._node_b) return false;
				if(_node_c != that._node_c) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				return true;
			}
		}

	}


	public class Pattern_Statements : GRGEN_LGSP.LGSPMatchingPattern
	{
		private static Pattern_Statements instance = null;
		public static Pattern_Statements Instance { get { if(instance==null) { instance = new Pattern_Statements(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] Statements_node_b_AllowedTypes = null;
		public static bool[] Statements_node_b_IsAllowedType = null;
		public enum Statements_NodeNums { @b, };
		public enum Statements_EdgeNums { };
		public enum Statements_VariableNums { };
		public enum Statements_SubNums { };
		public enum Statements_AltNums { };
		public enum Statements_IterNums { @iter_0, };



		public GRGEN_LGSP.PatternGraph pat_Statements;

		public enum Statements_iter_0_NodeNums { @b, };
		public enum Statements_iter_0_EdgeNums { };
		public enum Statements_iter_0_VariableNums { };
		public enum Statements_iter_0_SubNums { @_sub0, };
		public enum Statements_iter_0_AltNums { };
		public enum Statements_iter_0_IterNums { };



		public GRGEN_LGSP.PatternGraph Statements_iter_0;


		private Pattern_Statements()
			: base("Statements",
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_MethodBody.typeVar, },
				new string[] { "Statements_node_b", },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { }
			)
		{
		}
		private void initialize()
		{
			bool[,] Statements_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] Statements_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] Statements_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] Statements_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternNode Statements_node_b = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@MethodBody, GRGEN_MODEL.NodeType_MethodBody.typeVar, "GRGEN_MODEL.IMethodBody", "Statements_node_b", "b", Statements_node_b_AllowedTypes, Statements_node_b_IsAllowedType, 5.5F, 0, false, null, null, null, null, null, null, false, null);
			bool[,] Statements_iter_0_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] Statements_iter_0_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] Statements_iter_0_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] Statements_iter_0_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternGraphEmbedding Statements_iter_0__sub0 = new GRGEN_LGSP.PatternGraphEmbedding("_sub0", Pattern_Statement.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("Statements_node_b"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "Statements_node_b" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { Statements_node_b }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			Statements_iter_0 = new GRGEN_LGSP.PatternGraph(
				"iter_0",
				"Statements_",
				null, "iter_0",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Statements_node_b }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] { Statements_iter_0__sub0 }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[0, 0] ,
				Statements_iter_0_isNodeHomomorphicGlobal,
				Statements_iter_0_isEdgeHomomorphicGlobal,
				Statements_iter_0_isNodeTotallyHomomorphic,
				Statements_iter_0_isEdgeTotallyHomomorphic
			);

			GRGEN_LGSP.Iterated Statements_iter_0_it = new GRGEN_LGSP.Iterated( Statements_iter_0, 0, 0, new GRGEN_LGSP.LGSPFilter[] {
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
			}
			);
			pat_Statements = new GRGEN_LGSP.PatternGraph(
				"Statements",
				"",
				null, "Statements",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Statements_node_b }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] { Statements_iter_0_it,  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[0, 0] ,
				Statements_isNodeHomomorphicGlobal,
				Statements_isEdgeHomomorphicGlobal,
				Statements_isNodeTotallyHomomorphic,
				Statements_isEdgeTotallyHomomorphic
			);
			Statements_iter_0.embeddingGraph = pat_Statements;

			Statements_node_b.pointOfDefinition = null;
			Statements_iter_0__sub0.PointOfDefinition = Statements_iter_0;

			patternGraph = pat_Statements;
		}


		public void Statements_Create(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPNode node_b)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			graph.SettingAddedNodeNames( create_Statements_addedNodeNames );
			graph.SettingAddedEdgeNames( create_Statements_addedEdgeNames );
		}
		private static string[] create_Statements_addedNodeNames = new string[] {  };
		private static string[] create_Statements_addedEdgeNames = new string[] {  };

		public void Statements_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Statements curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPMatchesList<Match_Statements_iter_0, IMatch_Statements_iter_0> iterated_iter_0 = curMatch._iter_0;
		}

		public void Statements_iter_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPMatchesList<Match_Statements_iter_0, IMatch_Statements_iter_0> curMatches)
		{
			for(Match_Statements_iter_0 curMatch=curMatches.Root; curMatch!=null; curMatch=curMatch.next) {
				Statements_iter_0_Delete(actionEnv, curMatch);
			}
		}

		public void Statements_iter_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Statements_iter_0 curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_b = curMatch._node_b;
			GRGEN_ACTIONS.Pattern_Statement.Match_Statement subpattern__sub0 = curMatch.@__sub0;
			graph.RemoveEdges(node_b);
			graph.Remove(node_b);
			GRGEN_ACTIONS.Pattern_Statement.Instance.Statement_Delete(actionEnv, subpattern__sub0);
		}

		static Pattern_Statements() {
		}

		public interface IMatch_Statements : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IMethodBody node_b { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			GRGEN_LIBGR.IMatchesExact<IMatch_Statements_iter_0> iter_0 { get; }
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_Statements_iter_0 : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IMethodBody node_b { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			@GRGEN_ACTIONS.Pattern_Statement.Match_Statement @_sub0 { get; }
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			bool IsNullMatch { get; }
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_Statements : GRGEN_LGSP.MatchListElement<Match_Statements>, IMatch_Statements
		{
			public GRGEN_MODEL.IMethodBody node_b { get { return (GRGEN_MODEL.IMethodBody)_node_b; } set { _node_b = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_b;
			public enum Statements_NodeNums { @b, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Statements_NodeNums.@b: return _node_b;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "b": return _node_b;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "b": _node_b = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum Statements_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Statements_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Statements_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Statements_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public GRGEN_LIBGR.IMatchesExact<IMatch_Statements_iter_0> iter_0 { get { return _iter_0; } }
			public GRGEN_LGSP.LGSPMatchesList<Match_Statements_iter_0, IMatch_Statements_iter_0> _iter_0;
			public enum Statements_IterNums { @iter_0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 1; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				case (int)Statements_IterNums.@iter_0: return _iter_0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				case "iter_0": return _iter_0;
				default: return null;
				}
			}

			public enum Statements_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Statements.instance.pat_Statements; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Statements(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Statements(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Statements nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Statements cur = this;
				while(cur != null) {
					Match_Statements next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Statements that)
			{
				_node_b = that._node_b;
				_iter_0 = that._iter_0;
			}

			public Match_Statements(Match_Statements that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Statements that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_b = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_b];
				_iter_0 = new GRGEN_LGSP.LGSPMatchesList<Match_Statements_iter_0, IMatch_Statements_iter_0>(that._iter_0, oldToNewMap);
			}

			public Match_Statements(Match_Statements that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Statements()
			{
			}

			public bool IsEqual(Match_Statements that)
			{
				if(that==null) return false;
				if(_node_b != that._node_b) return false;
				if(_iter_0.Count != that._iter_0.Count) return false;
				IEnumerator<GRGEN_LIBGR.IMatch> _iter_0_thisEnumerator = _iter_0.GetEnumerator();
				IEnumerator<GRGEN_LIBGR.IMatch> _iter_0_thatEnumerator = that._iter_0.GetEnumerator();
				while(_iter_0_thisEnumerator.MoveNext())
				{
					_iter_0_thatEnumerator.MoveNext();
					if(!(_iter_0_thisEnumerator.Current as Match_Statements_iter_0).IsEqual(_iter_0_thatEnumerator.Current as Match_Statements_iter_0)) return false;
				}
				return true;
			}
		}

		public class Match_Statements_iter_0 : GRGEN_LGSP.MatchListElement<Match_Statements_iter_0>, IMatch_Statements_iter_0
		{
			public GRGEN_MODEL.IMethodBody node_b { get { return (GRGEN_MODEL.IMethodBody)_node_b; } set { _node_b = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_b;
			public enum Statements_iter_0_NodeNums { @b, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Statements_iter_0_NodeNums.@b: return _node_b;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "b": return _node_b;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "b": _node_b = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum Statements_iter_0_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Statements_iter_0_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public @GRGEN_ACTIONS.Pattern_Statement.Match_Statement @_sub0 { get { return @__sub0; } }
			public @GRGEN_ACTIONS.Pattern_Statement.Match_Statement @__sub0;
			public enum Statements_iter_0_SubNums { @_sub0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				case (int)Statements_iter_0_SubNums.@_sub0: return __sub0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				case "_sub0": return __sub0;
				default: return null;
				}
			}

			public enum Statements_iter_0_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Statements_iter_0_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Statements_iter_0_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Statements.instance.Statements_iter_0; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public bool IsNullMatch { get { return _isNullMatch; } }
			public bool _isNullMatch;
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Statements_iter_0(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Statements_iter_0(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Statements_iter_0 nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Statements_iter_0 cur = this;
				while(cur != null) {
					Match_Statements_iter_0 next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Statements_iter_0 that)
			{
				_node_b = that._node_b;
				@__sub0 = that.@__sub0;
			}

			public Match_Statements_iter_0(Match_Statements_iter_0 that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Statements_iter_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_b = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_b];
				@__sub0 = new GRGEN_ACTIONS.Pattern_Statement.Match_Statement(that.@__sub0, oldToNewMap);
			}

			public Match_Statements_iter_0(Match_Statements_iter_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Statements_iter_0()
			{
			}

			public bool IsEqual(Match_Statements_iter_0 that)
			{
				if(that==null) return false;
				if(_node_b != that._node_b) return false;
				if(!@__sub0.IsEqual(that.@__sub0)) return false;
				return true;
			}
		}

	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0 instanceBearingAttributeForSearch_Statements_iter_0 = new GRGEN_ACTIONS.Pattern_Statements.Match_Statements_iter_0();
		public static List<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0> Array_Statements_iter_0_groupBy_b(List<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0> list)
		{
			Dictionary<GRGEN_MODEL.IMethodBody, List<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0>> seenValues = new Dictionary<GRGEN_MODEL.IMethodBody, List<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_b)) {
					seenValues[list[pos].@node_b].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0> tempList = new List<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_b, tempList);
				}
			}
			List<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0>();
			foreach(List<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0> Array_Statements_iter_0_keepOneForEachBy_b(List<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0> list)
		{
			List<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0>();
			Dictionary<GRGEN_MODEL.IMethodBody, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IMethodBody, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0 element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_b)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_b, null);
				}
			}
			return newList;
		}
		public static int Array_Statements_iter_0_indexOfBy_b(IList<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0> list, GRGEN_MODEL.IMethodBody entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_b.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Statements_iter_0_indexOfBy_b(IList<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0> list, GRGEN_MODEL.IMethodBody entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_b.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Statements_iter_0_lastIndexOfBy_b(IList<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0> list, GRGEN_MODEL.IMethodBody entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_b.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Statements_iter_0_lastIndexOfBy_b(IList<GRGEN_ACTIONS.Pattern_Statements.IMatch_Statements_iter_0> list, GRGEN_MODEL.IMethodBody entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_b.Equals(entry))
					return i;
			return -1;
		}
	}

	public class Pattern_Statement : GRGEN_LGSP.LGSPMatchingPattern
	{
		private static Pattern_Statement instance = null;
		public static Pattern_Statement Instance { get { if(instance==null) { instance = new Pattern_Statement(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] Statement_node_b_AllowedTypes = null;
		public static bool[] Statement_node_b_IsAllowedType = null;
		public enum Statement_NodeNums { @b, };
		public enum Statement_EdgeNums { };
		public enum Statement_VariableNums { };
		public enum Statement_SubNums { };
		public enum Statement_AltNums { @alt_0, };
		public enum Statement_IterNums { };



		public GRGEN_LGSP.PatternGraph pat_Statement;

		public enum Statement_alt_0_CaseNums { @Assignment, @Call, @Return, };
		public static GRGEN_LIBGR.NodeType[] Statement_alt_0_Assignment_node_e_AllowedTypes = null;
		public static bool[] Statement_alt_0_Assignment_node_e_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] Statement_alt_0_Assignment_edge__edge0_AllowedTypes = null;
		public static GRGEN_LIBGR.EdgeType[] Statement_alt_0_Assignment_edge__edge1_AllowedTypes = null;
		public static bool[] Statement_alt_0_Assignment_edge__edge0_IsAllowedType = null;
		public static bool[] Statement_alt_0_Assignment_edge__edge1_IsAllowedType = null;
		public enum Statement_alt_0_Assignment_NodeNums { @b, @e, };
		public enum Statement_alt_0_Assignment_EdgeNums { @_edge0, @_edge1, };
		public enum Statement_alt_0_Assignment_VariableNums { };
		public enum Statement_alt_0_Assignment_SubNums { @_sub0, };
		public enum Statement_alt_0_Assignment_AltNums { };
		public enum Statement_alt_0_Assignment_IterNums { };



		public GRGEN_LGSP.PatternGraph Statement_alt_0_Assignment;

		public static GRGEN_LIBGR.NodeType[] Statement_alt_0_Call_node_e_AllowedTypes = null;
		public static bool[] Statement_alt_0_Call_node_e_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] Statement_alt_0_Call_edge__edge0_AllowedTypes = null;
		public static GRGEN_LIBGR.EdgeType[] Statement_alt_0_Call_edge__edge1_AllowedTypes = null;
		public static bool[] Statement_alt_0_Call_edge__edge0_IsAllowedType = null;
		public static bool[] Statement_alt_0_Call_edge__edge1_IsAllowedType = null;
		public enum Statement_alt_0_Call_NodeNums { @b, @e, };
		public enum Statement_alt_0_Call_EdgeNums { @_edge0, @_edge1, };
		public enum Statement_alt_0_Call_VariableNums { };
		public enum Statement_alt_0_Call_SubNums { @_sub0, };
		public enum Statement_alt_0_Call_AltNums { };
		public enum Statement_alt_0_Call_IterNums { };



		public GRGEN_LGSP.PatternGraph Statement_alt_0_Call;

		public static GRGEN_LIBGR.NodeType[] Statement_alt_0_Return_node_e_AllowedTypes = null;
		public static bool[] Statement_alt_0_Return_node_e_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] Statement_alt_0_Return_edge__edge0_AllowedTypes = null;
		public static GRGEN_LIBGR.EdgeType[] Statement_alt_0_Return_edge__edge1_AllowedTypes = null;
		public static bool[] Statement_alt_0_Return_edge__edge0_IsAllowedType = null;
		public static bool[] Statement_alt_0_Return_edge__edge1_IsAllowedType = null;
		public enum Statement_alt_0_Return_NodeNums { @b, @e, };
		public enum Statement_alt_0_Return_EdgeNums { @_edge0, @_edge1, };
		public enum Statement_alt_0_Return_VariableNums { };
		public enum Statement_alt_0_Return_SubNums { };
		public enum Statement_alt_0_Return_AltNums { };
		public enum Statement_alt_0_Return_IterNums { };



		public GRGEN_LGSP.PatternGraph Statement_alt_0_Return;


		private Pattern_Statement()
			: base("Statement",
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_MethodBody.typeVar, },
				new string[] { "Statement_node_b", },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { }
			)
		{
		}
		private void initialize()
		{
			bool[,] Statement_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] Statement_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] Statement_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] Statement_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternNode Statement_node_b = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@MethodBody, GRGEN_MODEL.NodeType_MethodBody.typeVar, "GRGEN_MODEL.IMethodBody", "Statement_node_b", "b", Statement_node_b_AllowedTypes, Statement_node_b_IsAllowedType, 5.5F, 0, false, null, null, null, null, null, null, false, null);
			bool[,] Statement_alt_0_Assignment_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] Statement_alt_0_Assignment_isEdgeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[] Statement_alt_0_Assignment_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] Statement_alt_0_Assignment_isEdgeTotallyHomomorphic = new bool[2] { false, false,  };
			GRGEN_LGSP.PatternNode Statement_alt_0_Assignment_node_e = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Expression, GRGEN_MODEL.NodeType_Expression.typeVar, "GRGEN_MODEL.IExpression", "Statement_alt_0_Assignment_node_e", "e", Statement_alt_0_Assignment_node_e_AllowedTypes, Statement_alt_0_Assignment_node_e_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge Statement_alt_0_Assignment_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "Statement_alt_0_Assignment_edge__edge0", "_edge0", Statement_alt_0_Assignment_edge__edge0_AllowedTypes, Statement_alt_0_Assignment_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge Statement_alt_0_Assignment_edge__edge1 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@writesTo, GRGEN_MODEL.EdgeType_writesTo.typeVar, "GRGEN_MODEL.IwritesTo", "Statement_alt_0_Assignment_edge__edge1", "_edge1", Statement_alt_0_Assignment_edge__edge1_AllowedTypes, Statement_alt_0_Assignment_edge__edge1_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternGraphEmbedding Statement_alt_0_Assignment__sub0 = new GRGEN_LGSP.PatternGraphEmbedding("_sub0", Pattern_ExpressionPattern.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("Statement_alt_0_Assignment_node_e"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "Statement_alt_0_Assignment_node_e" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { Statement_alt_0_Assignment_node_e }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			Statement_alt_0_Assignment = new GRGEN_LGSP.PatternGraph(
				"Assignment",
				"Statement_alt_0_",
				null, "Assignment",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Statement_node_b, Statement_alt_0_Assignment_node_e }, 
				new GRGEN_LGSP.PatternEdge[] { Statement_alt_0_Assignment_edge__edge0, Statement_alt_0_Assignment_edge__edge1 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] { Statement_alt_0_Assignment__sub0 }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				Statement_alt_0_Assignment_isNodeHomomorphicGlobal,
				Statement_alt_0_Assignment_isEdgeHomomorphicGlobal,
				Statement_alt_0_Assignment_isNodeTotallyHomomorphic,
				Statement_alt_0_Assignment_isEdgeTotallyHomomorphic
			);
			Statement_alt_0_Assignment.edgeToSourceNode.Add(Statement_alt_0_Assignment_edge__edge0, Statement_node_b);
			Statement_alt_0_Assignment.edgeToTargetNode.Add(Statement_alt_0_Assignment_edge__edge0, Statement_alt_0_Assignment_node_e);
			Statement_alt_0_Assignment.edgeToSourceNode.Add(Statement_alt_0_Assignment_edge__edge1, Statement_alt_0_Assignment_node_e);

			bool[,] Statement_alt_0_Call_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] Statement_alt_0_Call_isEdgeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[] Statement_alt_0_Call_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] Statement_alt_0_Call_isEdgeTotallyHomomorphic = new bool[2] { false, false,  };
			GRGEN_LGSP.PatternNode Statement_alt_0_Call_node_e = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Expression, GRGEN_MODEL.NodeType_Expression.typeVar, "GRGEN_MODEL.IExpression", "Statement_alt_0_Call_node_e", "e", Statement_alt_0_Call_node_e_AllowedTypes, Statement_alt_0_Call_node_e_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge Statement_alt_0_Call_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "Statement_alt_0_Call_edge__edge0", "_edge0", Statement_alt_0_Call_edge__edge0_AllowedTypes, Statement_alt_0_Call_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge Statement_alt_0_Call_edge__edge1 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@calls, GRGEN_MODEL.EdgeType_calls.typeVar, "GRGEN_MODEL.Icalls", "Statement_alt_0_Call_edge__edge1", "_edge1", Statement_alt_0_Call_edge__edge1_AllowedTypes, Statement_alt_0_Call_edge__edge1_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternGraphEmbedding Statement_alt_0_Call__sub0 = new GRGEN_LGSP.PatternGraphEmbedding("_sub0", Pattern_Expressions.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("Statement_alt_0_Call_node_e"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "Statement_alt_0_Call_node_e" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { Statement_alt_0_Call_node_e }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			Statement_alt_0_Call = new GRGEN_LGSP.PatternGraph(
				"Call",
				"Statement_alt_0_",
				null, "Call",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Statement_node_b, Statement_alt_0_Call_node_e }, 
				new GRGEN_LGSP.PatternEdge[] { Statement_alt_0_Call_edge__edge0, Statement_alt_0_Call_edge__edge1 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] { Statement_alt_0_Call__sub0 }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				Statement_alt_0_Call_isNodeHomomorphicGlobal,
				Statement_alt_0_Call_isEdgeHomomorphicGlobal,
				Statement_alt_0_Call_isNodeTotallyHomomorphic,
				Statement_alt_0_Call_isEdgeTotallyHomomorphic
			);
			Statement_alt_0_Call.edgeToSourceNode.Add(Statement_alt_0_Call_edge__edge0, Statement_node_b);
			Statement_alt_0_Call.edgeToTargetNode.Add(Statement_alt_0_Call_edge__edge0, Statement_alt_0_Call_node_e);
			Statement_alt_0_Call.edgeToSourceNode.Add(Statement_alt_0_Call_edge__edge1, Statement_alt_0_Call_node_e);

			bool[,] Statement_alt_0_Return_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] Statement_alt_0_Return_isEdgeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[] Statement_alt_0_Return_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] Statement_alt_0_Return_isEdgeTotallyHomomorphic = new bool[2] { false, false,  };
			GRGEN_LGSP.PatternNode Statement_alt_0_Return_node_e = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Expression, GRGEN_MODEL.NodeType_Expression.typeVar, "GRGEN_MODEL.IExpression", "Statement_alt_0_Return_node_e", "e", Statement_alt_0_Return_node_e_AllowedTypes, Statement_alt_0_Return_node_e_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge Statement_alt_0_Return_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "Statement_alt_0_Return_edge__edge0", "_edge0", Statement_alt_0_Return_edge__edge0_AllowedTypes, Statement_alt_0_Return_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge Statement_alt_0_Return_edge__edge1 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@uses, GRGEN_MODEL.EdgeType_uses.typeVar, "GRGEN_MODEL.Iuses", "Statement_alt_0_Return_edge__edge1", "_edge1", Statement_alt_0_Return_edge__edge1_AllowedTypes, Statement_alt_0_Return_edge__edge1_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			Statement_alt_0_Return = new GRGEN_LGSP.PatternGraph(
				"Return",
				"Statement_alt_0_",
				null, "Return",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Statement_node_b, Statement_alt_0_Return_node_e }, 
				new GRGEN_LGSP.PatternEdge[] { Statement_alt_0_Return_edge__edge0, Statement_alt_0_Return_edge__edge1 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				Statement_alt_0_Return_isNodeHomomorphicGlobal,
				Statement_alt_0_Return_isEdgeHomomorphicGlobal,
				Statement_alt_0_Return_isNodeTotallyHomomorphic,
				Statement_alt_0_Return_isEdgeTotallyHomomorphic
			);
			Statement_alt_0_Return.edgeToSourceNode.Add(Statement_alt_0_Return_edge__edge0, Statement_node_b);
			Statement_alt_0_Return.edgeToTargetNode.Add(Statement_alt_0_Return_edge__edge0, Statement_alt_0_Return_node_e);
			Statement_alt_0_Return.edgeToSourceNode.Add(Statement_alt_0_Return_edge__edge1, Statement_alt_0_Return_node_e);

			GRGEN_LGSP.Alternative Statement_alt_0 = new GRGEN_LGSP.Alternative( "alt_0", "Statement_", new GRGEN_LGSP.PatternGraph[] { Statement_alt_0_Assignment, Statement_alt_0_Call, Statement_alt_0_Return } );

			pat_Statement = new GRGEN_LGSP.PatternGraph(
				"Statement",
				"",
				null, "Statement",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Statement_node_b }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] { Statement_alt_0,  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[0, 0] ,
				Statement_isNodeHomomorphicGlobal,
				Statement_isEdgeHomomorphicGlobal,
				Statement_isNodeTotallyHomomorphic,
				Statement_isEdgeTotallyHomomorphic
			);
			Statement_alt_0_Assignment.embeddingGraph = pat_Statement;
			Statement_alt_0_Call.embeddingGraph = pat_Statement;
			Statement_alt_0_Return.embeddingGraph = pat_Statement;

			Statement_node_b.pointOfDefinition = null;
			Statement_alt_0_Assignment_node_e.pointOfDefinition = Statement_alt_0_Assignment;
			Statement_alt_0_Assignment_edge__edge0.pointOfDefinition = Statement_alt_0_Assignment;
			Statement_alt_0_Assignment_edge__edge1.pointOfDefinition = Statement_alt_0_Assignment;
			Statement_alt_0_Assignment__sub0.PointOfDefinition = Statement_alt_0_Assignment;
			Statement_alt_0_Call_node_e.pointOfDefinition = Statement_alt_0_Call;
			Statement_alt_0_Call_edge__edge0.pointOfDefinition = Statement_alt_0_Call;
			Statement_alt_0_Call_edge__edge1.pointOfDefinition = Statement_alt_0_Call;
			Statement_alt_0_Call__sub0.PointOfDefinition = Statement_alt_0_Call;
			Statement_alt_0_Return_node_e.pointOfDefinition = Statement_alt_0_Return;
			Statement_alt_0_Return_edge__edge0.pointOfDefinition = Statement_alt_0_Return;
			Statement_alt_0_Return_edge__edge1.pointOfDefinition = Statement_alt_0_Return;

			patternGraph = pat_Statement;
		}


		public void Statement_Create(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPNode node_b)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			graph.SettingAddedNodeNames( create_Statement_addedNodeNames );
			graph.SettingAddedEdgeNames( create_Statement_addedEdgeNames );
		}
		private static string[] create_Statement_addedNodeNames = new string[] {  };
		private static string[] create_Statement_addedEdgeNames = new string[] {  };

		public void Statement_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Statement curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			IMatch_Statement_alt_0 alternative_alt_0 = curMatch._alt_0;
		}

		public void Statement_alt_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, IMatch_Statement_alt_0 curMatch)
		{
			if(curMatch.Pattern == Statement_alt_0_Assignment) {
				Statement_alt_0_Assignment_Delete(actionEnv, (Match_Statement_alt_0_Assignment)curMatch);
				return;
			}
			else if(curMatch.Pattern == Statement_alt_0_Call) {
				Statement_alt_0_Call_Delete(actionEnv, (Match_Statement_alt_0_Call)curMatch);
				return;
			}
			else if(curMatch.Pattern == Statement_alt_0_Return) {
				Statement_alt_0_Return_Delete(actionEnv, (Match_Statement_alt_0_Return)curMatch);
				return;
			}
			throw new ApplicationException(); //debug assert
		}

		public void Statement_alt_0_Assignment_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Statement_alt_0_Assignment curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_b = curMatch._node_b;
			GRGEN_LGSP.LGSPNode node_e = curMatch._node_e;
			GRGEN_LGSP.LGSPEdge edge__edge0 = curMatch._edge__edge0;
			GRGEN_LGSP.LGSPEdge edge__edge1 = curMatch._edge__edge1;
			GRGEN_ACTIONS.Pattern_ExpressionPattern.Match_ExpressionPattern subpattern__sub0 = curMatch.@__sub0;
			graph.Remove(edge__edge0);
			graph.Remove(edge__edge1);
			graph.RemoveEdges(node_b);
			graph.Remove(node_b);
			graph.RemoveEdges(node_e);
			graph.Remove(node_e);
			GRGEN_ACTIONS.Pattern_ExpressionPattern.Instance.ExpressionPattern_Delete(actionEnv, subpattern__sub0);
		}

		public void Statement_alt_0_Call_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Statement_alt_0_Call curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_b = curMatch._node_b;
			GRGEN_LGSP.LGSPNode node_e = curMatch._node_e;
			GRGEN_LGSP.LGSPEdge edge__edge0 = curMatch._edge__edge0;
			GRGEN_LGSP.LGSPEdge edge__edge1 = curMatch._edge__edge1;
			GRGEN_ACTIONS.Pattern_Expressions.Match_Expressions subpattern__sub0 = curMatch.@__sub0;
			graph.Remove(edge__edge0);
			graph.Remove(edge__edge1);
			graph.RemoveEdges(node_b);
			graph.Remove(node_b);
			graph.RemoveEdges(node_e);
			graph.Remove(node_e);
			GRGEN_ACTIONS.Pattern_Expressions.Instance.Expressions_Delete(actionEnv, subpattern__sub0);
		}

		public void Statement_alt_0_Return_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Statement_alt_0_Return curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_b = curMatch._node_b;
			GRGEN_LGSP.LGSPNode node_e = curMatch._node_e;
			GRGEN_LGSP.LGSPEdge edge__edge0 = curMatch._edge__edge0;
			GRGEN_LGSP.LGSPEdge edge__edge1 = curMatch._edge__edge1;
			graph.Remove(edge__edge0);
			graph.Remove(edge__edge1);
			graph.RemoveEdges(node_b);
			graph.Remove(node_b);
			graph.RemoveEdges(node_e);
			graph.Remove(node_e);
		}

		static Pattern_Statement() {
		}

		public interface IMatch_Statement : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IMethodBody node_b { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			//Alternatives
			IMatch_Statement_alt_0 alt_0 { get; }
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_Statement_alt_0 : GRGEN_LIBGR.IMatch
		{
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_Statement_alt_0_Assignment : IMatch_Statement_alt_0
		{
			//Nodes
			GRGEN_MODEL.IMethodBody node_b { get; set; }
			GRGEN_MODEL.IExpression node_e { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge__edge0 { get; set; }
			GRGEN_MODEL.IwritesTo edge__edge1 { get; set; }
			//Variables
			//EmbeddedGraphs
			@GRGEN_ACTIONS.Pattern_ExpressionPattern.Match_ExpressionPattern @_sub0 { get; }
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			new void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_Statement_alt_0_Call : IMatch_Statement_alt_0
		{
			//Nodes
			GRGEN_MODEL.IMethodBody node_b { get; set; }
			GRGEN_MODEL.IExpression node_e { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge__edge0 { get; set; }
			GRGEN_MODEL.Icalls edge__edge1 { get; set; }
			//Variables
			//EmbeddedGraphs
			@GRGEN_ACTIONS.Pattern_Expressions.Match_Expressions @_sub0 { get; }
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			new void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_Statement_alt_0_Return : IMatch_Statement_alt_0
		{
			//Nodes
			GRGEN_MODEL.IMethodBody node_b { get; set; }
			GRGEN_MODEL.IExpression node_e { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge__edge0 { get; set; }
			GRGEN_MODEL.Iuses edge__edge1 { get; set; }
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			new void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_Statement : GRGEN_LGSP.MatchListElement<Match_Statement>, IMatch_Statement
		{
			public GRGEN_MODEL.IMethodBody node_b { get { return (GRGEN_MODEL.IMethodBody)_node_b; } set { _node_b = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_b;
			public enum Statement_NodeNums { @b, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Statement_NodeNums.@b: return _node_b;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "b": return _node_b;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "b": _node_b = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum Statement_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Statement_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Statement_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public IMatch_Statement_alt_0 alt_0 { get { return _alt_0; } }
			public IMatch_Statement_alt_0 _alt_0;
			public enum Statement_AltNums { @alt_0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				case (int)Statement_AltNums.@alt_0: return _alt_0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				case "alt_0": return _alt_0;
				default: return null;
				}
			}

			public enum Statement_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Statement_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Statement.instance.pat_Statement; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Statement(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Statement(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Statement nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Statement cur = this;
				while(cur != null) {
					Match_Statement next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Statement that)
			{
				_node_b = that._node_b;
				_alt_0 = that._alt_0;
			}

			public Match_Statement(Match_Statement that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Statement that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_b = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_b];
				if(that._alt_0 is Match_Statement_alt_0_Assignment)
					_alt_0 = new Match_Statement_alt_0_Assignment((Match_Statement_alt_0_Assignment)that._alt_0, oldToNewMap);
				else if(that._alt_0 is Match_Statement_alt_0_Call)
					_alt_0 = new Match_Statement_alt_0_Call((Match_Statement_alt_0_Call)that._alt_0, oldToNewMap);
				else if(that._alt_0 is Match_Statement_alt_0_Return)
					_alt_0 = new Match_Statement_alt_0_Return((Match_Statement_alt_0_Return)that._alt_0, oldToNewMap);
			}

			public Match_Statement(Match_Statement that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Statement()
			{
			}

			public bool IsEqual(Match_Statement that)
			{
				if(that==null) return false;
				if(_node_b != that._node_b) return false;
				if(_alt_0 is Match_Statement_alt_0_Assignment && !(_alt_0 as Match_Statement_alt_0_Assignment).IsEqual(that._alt_0 as Match_Statement_alt_0_Assignment)) return false;
				if(_alt_0 is Match_Statement_alt_0_Call && !(_alt_0 as Match_Statement_alt_0_Call).IsEqual(that._alt_0 as Match_Statement_alt_0_Call)) return false;
				if(_alt_0 is Match_Statement_alt_0_Return && !(_alt_0 as Match_Statement_alt_0_Return).IsEqual(that._alt_0 as Match_Statement_alt_0_Return)) return false;
				return true;
			}
		}

		public class Match_Statement_alt_0_Assignment : GRGEN_LGSP.MatchListElement<Match_Statement_alt_0_Assignment>, IMatch_Statement_alt_0_Assignment
		{
			public GRGEN_MODEL.IMethodBody node_b { get { return (GRGEN_MODEL.IMethodBody)_node_b; } set { _node_b = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IExpression node_e { get { return (GRGEN_MODEL.IExpression)_node_e; } set { _node_e = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_b;
			public GRGEN_LGSP.LGSPNode _node_e;
			public enum Statement_alt_0_Assignment_NodeNums { @b, @e, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Statement_alt_0_Assignment_NodeNums.@b: return _node_b;
				case (int)Statement_alt_0_Assignment_NodeNums.@e: return _node_e;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "b": return _node_b;
				case "e": return _node_e;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "b": _node_b = (GRGEN_LGSP.LGSPNode)value; break;
				case "e": _node_e = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge__edge0 { get { return (GRGEN_MODEL.Icontains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_MODEL.IwritesTo edge__edge1 { get { return (GRGEN_MODEL.IwritesTo)_edge__edge1; } set { _edge__edge1 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public GRGEN_LGSP.LGSPEdge _edge__edge1;
			public enum Statement_alt_0_Assignment_EdgeNums { @_edge0, @_edge1, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 2; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)Statement_alt_0_Assignment_EdgeNums.@_edge0: return _edge__edge0;
				case (int)Statement_alt_0_Assignment_EdgeNums.@_edge1: return _edge__edge1;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				case "_edge1": return _edge__edge1;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				case "_edge1": _edge__edge1 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum Statement_alt_0_Assignment_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public @GRGEN_ACTIONS.Pattern_ExpressionPattern.Match_ExpressionPattern @_sub0 { get { return @__sub0; } }
			public @GRGEN_ACTIONS.Pattern_ExpressionPattern.Match_ExpressionPattern @__sub0;
			public enum Statement_alt_0_Assignment_SubNums { @_sub0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				case (int)Statement_alt_0_Assignment_SubNums.@_sub0: return __sub0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				case "_sub0": return __sub0;
				default: return null;
				}
			}

			public enum Statement_alt_0_Assignment_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Statement_alt_0_Assignment_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Statement_alt_0_Assignment_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Statement.instance.Statement_alt_0_Assignment; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Statement_alt_0_Assignment(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Statement_alt_0_Assignment(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Statement_alt_0_Assignment nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Statement_alt_0_Assignment cur = this;
				while(cur != null) {
					Match_Statement_alt_0_Assignment next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Statement_alt_0_Assignment that)
			{
				_node_b = that._node_b;
				_node_e = that._node_e;
				_edge__edge0 = that._edge__edge0;
				_edge__edge1 = that._edge__edge1;
				@__sub0 = that.@__sub0;
			}

			public Match_Statement_alt_0_Assignment(Match_Statement_alt_0_Assignment that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Statement_alt_0_Assignment that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_b = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_b];
				_node_e = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_e];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
				_edge__edge1 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge1];
				@__sub0 = new GRGEN_ACTIONS.Pattern_ExpressionPattern.Match_ExpressionPattern(that.@__sub0, oldToNewMap);
			}

			public Match_Statement_alt_0_Assignment(Match_Statement_alt_0_Assignment that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Statement_alt_0_Assignment()
			{
			}

			public bool IsEqual(Match_Statement_alt_0_Assignment that)
			{
				if(that==null) return false;
				if(_node_b != that._node_b) return false;
				if(_node_e != that._node_e) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				if(_edge__edge1 != that._edge__edge1) return false;
				if(!@__sub0.IsEqual(that.@__sub0)) return false;
				return true;
			}
		}

		public class Match_Statement_alt_0_Call : GRGEN_LGSP.MatchListElement<Match_Statement_alt_0_Call>, IMatch_Statement_alt_0_Call
		{
			public GRGEN_MODEL.IMethodBody node_b { get { return (GRGEN_MODEL.IMethodBody)_node_b; } set { _node_b = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IExpression node_e { get { return (GRGEN_MODEL.IExpression)_node_e; } set { _node_e = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_b;
			public GRGEN_LGSP.LGSPNode _node_e;
			public enum Statement_alt_0_Call_NodeNums { @b, @e, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Statement_alt_0_Call_NodeNums.@b: return _node_b;
				case (int)Statement_alt_0_Call_NodeNums.@e: return _node_e;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "b": return _node_b;
				case "e": return _node_e;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "b": _node_b = (GRGEN_LGSP.LGSPNode)value; break;
				case "e": _node_e = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge__edge0 { get { return (GRGEN_MODEL.Icontains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_MODEL.Icalls edge__edge1 { get { return (GRGEN_MODEL.Icalls)_edge__edge1; } set { _edge__edge1 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public GRGEN_LGSP.LGSPEdge _edge__edge1;
			public enum Statement_alt_0_Call_EdgeNums { @_edge0, @_edge1, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 2; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)Statement_alt_0_Call_EdgeNums.@_edge0: return _edge__edge0;
				case (int)Statement_alt_0_Call_EdgeNums.@_edge1: return _edge__edge1;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				case "_edge1": return _edge__edge1;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				case "_edge1": _edge__edge1 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum Statement_alt_0_Call_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public @GRGEN_ACTIONS.Pattern_Expressions.Match_Expressions @_sub0 { get { return @__sub0; } }
			public @GRGEN_ACTIONS.Pattern_Expressions.Match_Expressions @__sub0;
			public enum Statement_alt_0_Call_SubNums { @_sub0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				case (int)Statement_alt_0_Call_SubNums.@_sub0: return __sub0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				case "_sub0": return __sub0;
				default: return null;
				}
			}

			public enum Statement_alt_0_Call_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Statement_alt_0_Call_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Statement_alt_0_Call_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Statement.instance.Statement_alt_0_Call; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Statement_alt_0_Call(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Statement_alt_0_Call(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Statement_alt_0_Call nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Statement_alt_0_Call cur = this;
				while(cur != null) {
					Match_Statement_alt_0_Call next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Statement_alt_0_Call that)
			{
				_node_b = that._node_b;
				_node_e = that._node_e;
				_edge__edge0 = that._edge__edge0;
				_edge__edge1 = that._edge__edge1;
				@__sub0 = that.@__sub0;
			}

			public Match_Statement_alt_0_Call(Match_Statement_alt_0_Call that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Statement_alt_0_Call that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_b = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_b];
				_node_e = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_e];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
				_edge__edge1 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge1];
				@__sub0 = new GRGEN_ACTIONS.Pattern_Expressions.Match_Expressions(that.@__sub0, oldToNewMap);
			}

			public Match_Statement_alt_0_Call(Match_Statement_alt_0_Call that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Statement_alt_0_Call()
			{
			}

			public bool IsEqual(Match_Statement_alt_0_Call that)
			{
				if(that==null) return false;
				if(_node_b != that._node_b) return false;
				if(_node_e != that._node_e) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				if(_edge__edge1 != that._edge__edge1) return false;
				if(!@__sub0.IsEqual(that.@__sub0)) return false;
				return true;
			}
		}

		public class Match_Statement_alt_0_Return : GRGEN_LGSP.MatchListElement<Match_Statement_alt_0_Return>, IMatch_Statement_alt_0_Return
		{
			public GRGEN_MODEL.IMethodBody node_b { get { return (GRGEN_MODEL.IMethodBody)_node_b; } set { _node_b = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IExpression node_e { get { return (GRGEN_MODEL.IExpression)_node_e; } set { _node_e = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_b;
			public GRGEN_LGSP.LGSPNode _node_e;
			public enum Statement_alt_0_Return_NodeNums { @b, @e, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Statement_alt_0_Return_NodeNums.@b: return _node_b;
				case (int)Statement_alt_0_Return_NodeNums.@e: return _node_e;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "b": return _node_b;
				case "e": return _node_e;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "b": _node_b = (GRGEN_LGSP.LGSPNode)value; break;
				case "e": _node_e = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge__edge0 { get { return (GRGEN_MODEL.Icontains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_MODEL.Iuses edge__edge1 { get { return (GRGEN_MODEL.Iuses)_edge__edge1; } set { _edge__edge1 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public GRGEN_LGSP.LGSPEdge _edge__edge1;
			public enum Statement_alt_0_Return_EdgeNums { @_edge0, @_edge1, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 2; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)Statement_alt_0_Return_EdgeNums.@_edge0: return _edge__edge0;
				case (int)Statement_alt_0_Return_EdgeNums.@_edge1: return _edge__edge1;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				case "_edge1": return _edge__edge1;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				case "_edge1": _edge__edge1 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum Statement_alt_0_Return_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Statement_alt_0_Return_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Statement_alt_0_Return_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Statement_alt_0_Return_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Statement_alt_0_Return_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Statement.instance.Statement_alt_0_Return; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Statement_alt_0_Return(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Statement_alt_0_Return(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Statement_alt_0_Return nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Statement_alt_0_Return cur = this;
				while(cur != null) {
					Match_Statement_alt_0_Return next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Statement_alt_0_Return that)
			{
				_node_b = that._node_b;
				_node_e = that._node_e;
				_edge__edge0 = that._edge__edge0;
				_edge__edge1 = that._edge__edge1;
			}

			public Match_Statement_alt_0_Return(Match_Statement_alt_0_Return that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Statement_alt_0_Return that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_b = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_b];
				_node_e = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_e];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
				_edge__edge1 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge1];
			}

			public Match_Statement_alt_0_Return(Match_Statement_alt_0_Return that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Statement_alt_0_Return()
			{
			}

			public bool IsEqual(Match_Statement_alt_0_Return that)
			{
				if(that==null) return false;
				if(_node_b != that._node_b) return false;
				if(_node_e != that._node_e) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				if(_edge__edge1 != that._edge__edge1) return false;
				return true;
			}
		}

	}


	public class Pattern_Expressions : GRGEN_LGSP.LGSPMatchingPattern
	{
		private static Pattern_Expressions instance = null;
		public static Pattern_Expressions Instance { get { if(instance==null) { instance = new Pattern_Expressions(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] Expressions_node_e_AllowedTypes = null;
		public static bool[] Expressions_node_e_IsAllowedType = null;
		public enum Expressions_NodeNums { @e, };
		public enum Expressions_EdgeNums { };
		public enum Expressions_VariableNums { };
		public enum Expressions_SubNums { };
		public enum Expressions_AltNums { };
		public enum Expressions_IterNums { @iter_0, };



		public GRGEN_LGSP.PatternGraph pat_Expressions;

		public enum Expressions_iter_0_NodeNums { @e, };
		public enum Expressions_iter_0_EdgeNums { };
		public enum Expressions_iter_0_VariableNums { };
		public enum Expressions_iter_0_SubNums { @_sub0, };
		public enum Expressions_iter_0_AltNums { };
		public enum Expressions_iter_0_IterNums { };



		public GRGEN_LGSP.PatternGraph Expressions_iter_0;


		private Pattern_Expressions()
			: base("Expressions",
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_Expression.typeVar, },
				new string[] { "Expressions_node_e", },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { }
			)
		{
		}
		private void initialize()
		{
			bool[,] Expressions_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] Expressions_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] Expressions_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] Expressions_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternNode Expressions_node_e = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Expression, GRGEN_MODEL.NodeType_Expression.typeVar, "GRGEN_MODEL.IExpression", "Expressions_node_e", "e", Expressions_node_e_AllowedTypes, Expressions_node_e_IsAllowedType, 5.5F, 0, false, null, null, null, null, null, null, false, null);
			bool[,] Expressions_iter_0_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] Expressions_iter_0_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] Expressions_iter_0_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] Expressions_iter_0_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternGraphEmbedding Expressions_iter_0__sub0 = new GRGEN_LGSP.PatternGraphEmbedding("_sub0", Pattern_ExpressionPattern.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("Expressions_node_e"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "Expressions_node_e" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { Expressions_node_e }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			Expressions_iter_0 = new GRGEN_LGSP.PatternGraph(
				"iter_0",
				"Expressions_",
				null, "iter_0",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Expressions_node_e }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] { Expressions_iter_0__sub0 }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[0, 0] ,
				Expressions_iter_0_isNodeHomomorphicGlobal,
				Expressions_iter_0_isEdgeHomomorphicGlobal,
				Expressions_iter_0_isNodeTotallyHomomorphic,
				Expressions_iter_0_isEdgeTotallyHomomorphic
			);

			GRGEN_LGSP.Iterated Expressions_iter_0_it = new GRGEN_LGSP.Iterated( Expressions_iter_0, 0, 0, new GRGEN_LGSP.LGSPFilter[] {
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
			}
			);
			pat_Expressions = new GRGEN_LGSP.PatternGraph(
				"Expressions",
				"",
				null, "Expressions",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Expressions_node_e }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] { Expressions_iter_0_it,  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[0, 0] ,
				Expressions_isNodeHomomorphicGlobal,
				Expressions_isEdgeHomomorphicGlobal,
				Expressions_isNodeTotallyHomomorphic,
				Expressions_isEdgeTotallyHomomorphic
			);
			Expressions_iter_0.embeddingGraph = pat_Expressions;

			Expressions_node_e.pointOfDefinition = null;
			Expressions_iter_0__sub0.PointOfDefinition = Expressions_iter_0;

			patternGraph = pat_Expressions;
		}


		public void Expressions_Create(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPNode node_e)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			graph.SettingAddedNodeNames( create_Expressions_addedNodeNames );
			graph.SettingAddedEdgeNames( create_Expressions_addedEdgeNames );
		}
		private static string[] create_Expressions_addedNodeNames = new string[] {  };
		private static string[] create_Expressions_addedEdgeNames = new string[] {  };

		public void Expressions_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Expressions curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPMatchesList<Match_Expressions_iter_0, IMatch_Expressions_iter_0> iterated_iter_0 = curMatch._iter_0;
		}

		public void Expressions_iter_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPMatchesList<Match_Expressions_iter_0, IMatch_Expressions_iter_0> curMatches)
		{
			for(Match_Expressions_iter_0 curMatch=curMatches.Root; curMatch!=null; curMatch=curMatch.next) {
				Expressions_iter_0_Delete(actionEnv, curMatch);
			}
		}

		public void Expressions_iter_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Expressions_iter_0 curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_e = curMatch._node_e;
			GRGEN_ACTIONS.Pattern_ExpressionPattern.Match_ExpressionPattern subpattern__sub0 = curMatch.@__sub0;
			graph.RemoveEdges(node_e);
			graph.Remove(node_e);
			GRGEN_ACTIONS.Pattern_ExpressionPattern.Instance.ExpressionPattern_Delete(actionEnv, subpattern__sub0);
		}

		static Pattern_Expressions() {
		}

		public interface IMatch_Expressions : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IExpression node_e { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			GRGEN_LIBGR.IMatchesExact<IMatch_Expressions_iter_0> iter_0 { get; }
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_Expressions_iter_0 : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IExpression node_e { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			@GRGEN_ACTIONS.Pattern_ExpressionPattern.Match_ExpressionPattern @_sub0 { get; }
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			bool IsNullMatch { get; }
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_Expressions : GRGEN_LGSP.MatchListElement<Match_Expressions>, IMatch_Expressions
		{
			public GRGEN_MODEL.IExpression node_e { get { return (GRGEN_MODEL.IExpression)_node_e; } set { _node_e = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_e;
			public enum Expressions_NodeNums { @e, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Expressions_NodeNums.@e: return _node_e;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "e": return _node_e;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "e": _node_e = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum Expressions_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Expressions_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Expressions_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Expressions_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public GRGEN_LIBGR.IMatchesExact<IMatch_Expressions_iter_0> iter_0 { get { return _iter_0; } }
			public GRGEN_LGSP.LGSPMatchesList<Match_Expressions_iter_0, IMatch_Expressions_iter_0> _iter_0;
			public enum Expressions_IterNums { @iter_0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 1; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				case (int)Expressions_IterNums.@iter_0: return _iter_0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				case "iter_0": return _iter_0;
				default: return null;
				}
			}

			public enum Expressions_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Expressions.instance.pat_Expressions; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Expressions(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Expressions(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Expressions nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Expressions cur = this;
				while(cur != null) {
					Match_Expressions next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Expressions that)
			{
				_node_e = that._node_e;
				_iter_0 = that._iter_0;
			}

			public Match_Expressions(Match_Expressions that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Expressions that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_e = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_e];
				_iter_0 = new GRGEN_LGSP.LGSPMatchesList<Match_Expressions_iter_0, IMatch_Expressions_iter_0>(that._iter_0, oldToNewMap);
			}

			public Match_Expressions(Match_Expressions that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Expressions()
			{
			}

			public bool IsEqual(Match_Expressions that)
			{
				if(that==null) return false;
				if(_node_e != that._node_e) return false;
				if(_iter_0.Count != that._iter_0.Count) return false;
				IEnumerator<GRGEN_LIBGR.IMatch> _iter_0_thisEnumerator = _iter_0.GetEnumerator();
				IEnumerator<GRGEN_LIBGR.IMatch> _iter_0_thatEnumerator = that._iter_0.GetEnumerator();
				while(_iter_0_thisEnumerator.MoveNext())
				{
					_iter_0_thatEnumerator.MoveNext();
					if(!(_iter_0_thisEnumerator.Current as Match_Expressions_iter_0).IsEqual(_iter_0_thatEnumerator.Current as Match_Expressions_iter_0)) return false;
				}
				return true;
			}
		}

		public class Match_Expressions_iter_0 : GRGEN_LGSP.MatchListElement<Match_Expressions_iter_0>, IMatch_Expressions_iter_0
		{
			public GRGEN_MODEL.IExpression node_e { get { return (GRGEN_MODEL.IExpression)_node_e; } set { _node_e = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_e;
			public enum Expressions_iter_0_NodeNums { @e, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Expressions_iter_0_NodeNums.@e: return _node_e;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "e": return _node_e;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "e": _node_e = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum Expressions_iter_0_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Expressions_iter_0_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public @GRGEN_ACTIONS.Pattern_ExpressionPattern.Match_ExpressionPattern @_sub0 { get { return @__sub0; } }
			public @GRGEN_ACTIONS.Pattern_ExpressionPattern.Match_ExpressionPattern @__sub0;
			public enum Expressions_iter_0_SubNums { @_sub0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				case (int)Expressions_iter_0_SubNums.@_sub0: return __sub0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				case "_sub0": return __sub0;
				default: return null;
				}
			}

			public enum Expressions_iter_0_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Expressions_iter_0_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Expressions_iter_0_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Expressions.instance.Expressions_iter_0; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public bool IsNullMatch { get { return _isNullMatch; } }
			public bool _isNullMatch;
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Expressions_iter_0(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Expressions_iter_0(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Expressions_iter_0 nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Expressions_iter_0 cur = this;
				while(cur != null) {
					Match_Expressions_iter_0 next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Expressions_iter_0 that)
			{
				_node_e = that._node_e;
				@__sub0 = that.@__sub0;
			}

			public Match_Expressions_iter_0(Match_Expressions_iter_0 that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Expressions_iter_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_e = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_e];
				@__sub0 = new GRGEN_ACTIONS.Pattern_ExpressionPattern.Match_ExpressionPattern(that.@__sub0, oldToNewMap);
			}

			public Match_Expressions_iter_0(Match_Expressions_iter_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Expressions_iter_0()
			{
			}

			public bool IsEqual(Match_Expressions_iter_0 that)
			{
				if(that==null) return false;
				if(_node_e != that._node_e) return false;
				if(!@__sub0.IsEqual(that.@__sub0)) return false;
				return true;
			}
		}

	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0 instanceBearingAttributeForSearch_Expressions_iter_0 = new GRGEN_ACTIONS.Pattern_Expressions.Match_Expressions_iter_0();
		public static List<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0> Array_Expressions_iter_0_groupBy_e(List<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0> list)
		{
			Dictionary<GRGEN_MODEL.IExpression, List<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0>> seenValues = new Dictionary<GRGEN_MODEL.IExpression, List<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_e)) {
					seenValues[list[pos].@node_e].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0> tempList = new List<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_e, tempList);
				}
			}
			List<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0>();
			foreach(List<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0> Array_Expressions_iter_0_keepOneForEachBy_e(List<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0> list)
		{
			List<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0>();
			Dictionary<GRGEN_MODEL.IExpression, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IExpression, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0 element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_e)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_e, null);
				}
			}
			return newList;
		}
		public static int Array_Expressions_iter_0_indexOfBy_e(IList<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0> list, GRGEN_MODEL.IExpression entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_e.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Expressions_iter_0_indexOfBy_e(IList<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0> list, GRGEN_MODEL.IExpression entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_e.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Expressions_iter_0_lastIndexOfBy_e(IList<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0> list, GRGEN_MODEL.IExpression entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_e.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Expressions_iter_0_lastIndexOfBy_e(IList<GRGEN_ACTIONS.Pattern_Expressions.IMatch_Expressions_iter_0> list, GRGEN_MODEL.IExpression entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_e.Equals(entry))
					return i;
			return -1;
		}
	}

	public class Pattern_ExpressionPattern : GRGEN_LGSP.LGSPMatchingPattern
	{
		private static Pattern_ExpressionPattern instance = null;
		public static Pattern_ExpressionPattern Instance { get { if(instance==null) { instance = new Pattern_ExpressionPattern(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] ExpressionPattern_node_e_AllowedTypes = null;
		public static GRGEN_LIBGR.NodeType[] ExpressionPattern_node_sub_AllowedTypes = null;
		public static bool[] ExpressionPattern_node_e_IsAllowedType = null;
		public static bool[] ExpressionPattern_node_sub_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] ExpressionPattern_edge__edge0_AllowedTypes = null;
		public static bool[] ExpressionPattern_edge__edge0_IsAllowedType = null;
		public enum ExpressionPattern_NodeNums { @e, @sub, };
		public enum ExpressionPattern_EdgeNums { @_edge0, };
		public enum ExpressionPattern_VariableNums { };
		public enum ExpressionPattern_SubNums { };
		public enum ExpressionPattern_AltNums { @alt_0, };
		public enum ExpressionPattern_IterNums { };



		public GRGEN_LGSP.PatternGraph pat_ExpressionPattern;

		public enum ExpressionPattern_alt_0_CaseNums { @Call, @Use, };
		public static GRGEN_LIBGR.EdgeType[] ExpressionPattern_alt_0_Call_edge__edge0_AllowedTypes = null;
		public static bool[] ExpressionPattern_alt_0_Call_edge__edge0_IsAllowedType = null;
		public enum ExpressionPattern_alt_0_Call_NodeNums { @sub, };
		public enum ExpressionPattern_alt_0_Call_EdgeNums { @_edge0, };
		public enum ExpressionPattern_alt_0_Call_VariableNums { };
		public enum ExpressionPattern_alt_0_Call_SubNums { @_sub0, };
		public enum ExpressionPattern_alt_0_Call_AltNums { };
		public enum ExpressionPattern_alt_0_Call_IterNums { };



		public GRGEN_LGSP.PatternGraph ExpressionPattern_alt_0_Call;

		public static GRGEN_LIBGR.EdgeType[] ExpressionPattern_alt_0_Use_edge__edge0_AllowedTypes = null;
		public static bool[] ExpressionPattern_alt_0_Use_edge__edge0_IsAllowedType = null;
		public enum ExpressionPattern_alt_0_Use_NodeNums { @sub, };
		public enum ExpressionPattern_alt_0_Use_EdgeNums { @_edge0, };
		public enum ExpressionPattern_alt_0_Use_VariableNums { };
		public enum ExpressionPattern_alt_0_Use_SubNums { };
		public enum ExpressionPattern_alt_0_Use_AltNums { };
		public enum ExpressionPattern_alt_0_Use_IterNums { };



		public GRGEN_LGSP.PatternGraph ExpressionPattern_alt_0_Use;


		private Pattern_ExpressionPattern()
			: base("ExpressionPattern",
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_Expression.typeVar, },
				new string[] { "ExpressionPattern_node_e", },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { }
			)
		{
		}
		private void initialize()
		{
			bool[,] ExpressionPattern_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] ExpressionPattern_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] ExpressionPattern_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] ExpressionPattern_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternNode ExpressionPattern_node_e = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Expression, GRGEN_MODEL.NodeType_Expression.typeVar, "GRGEN_MODEL.IExpression", "ExpressionPattern_node_e", "e", ExpressionPattern_node_e_AllowedTypes, ExpressionPattern_node_e_IsAllowedType, 5.5F, 0, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternNode ExpressionPattern_node_sub = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Expression, GRGEN_MODEL.NodeType_Expression.typeVar, "GRGEN_MODEL.IExpression", "ExpressionPattern_node_sub", "sub", ExpressionPattern_node_sub_AllowedTypes, ExpressionPattern_node_sub_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge ExpressionPattern_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "ExpressionPattern_edge__edge0", "_edge0", ExpressionPattern_edge__edge0_AllowedTypes, ExpressionPattern_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			bool[,] ExpressionPattern_alt_0_Call_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] ExpressionPattern_alt_0_Call_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] ExpressionPattern_alt_0_Call_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] ExpressionPattern_alt_0_Call_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternEdge ExpressionPattern_alt_0_Call_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@calls, GRGEN_MODEL.EdgeType_calls.typeVar, "GRGEN_MODEL.Icalls", "ExpressionPattern_alt_0_Call_edge__edge0", "_edge0", ExpressionPattern_alt_0_Call_edge__edge0_AllowedTypes, ExpressionPattern_alt_0_Call_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternGraphEmbedding ExpressionPattern_alt_0_Call__sub0 = new GRGEN_LGSP.PatternGraphEmbedding("_sub0", Pattern_Expressions.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("ExpressionPattern_node_sub"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "ExpressionPattern_node_sub" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { ExpressionPattern_node_sub }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			ExpressionPattern_alt_0_Call = new GRGEN_LGSP.PatternGraph(
				"Call",
				"ExpressionPattern_alt_0_",
				null, "Call",
				false, false,
				new GRGEN_LGSP.PatternNode[] { ExpressionPattern_node_sub }, 
				new GRGEN_LGSP.PatternEdge[] { ExpressionPattern_alt_0_Call_edge__edge0 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] { ExpressionPattern_alt_0_Call__sub0 }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				ExpressionPattern_alt_0_Call_isNodeHomomorphicGlobal,
				ExpressionPattern_alt_0_Call_isEdgeHomomorphicGlobal,
				ExpressionPattern_alt_0_Call_isNodeTotallyHomomorphic,
				ExpressionPattern_alt_0_Call_isEdgeTotallyHomomorphic
			);
			ExpressionPattern_alt_0_Call.edgeToSourceNode.Add(ExpressionPattern_alt_0_Call_edge__edge0, ExpressionPattern_node_sub);

			bool[,] ExpressionPattern_alt_0_Use_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] ExpressionPattern_alt_0_Use_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] ExpressionPattern_alt_0_Use_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] ExpressionPattern_alt_0_Use_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternEdge ExpressionPattern_alt_0_Use_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@uses, GRGEN_MODEL.EdgeType_uses.typeVar, "GRGEN_MODEL.Iuses", "ExpressionPattern_alt_0_Use_edge__edge0", "_edge0", ExpressionPattern_alt_0_Use_edge__edge0_AllowedTypes, ExpressionPattern_alt_0_Use_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			ExpressionPattern_alt_0_Use = new GRGEN_LGSP.PatternGraph(
				"Use",
				"ExpressionPattern_alt_0_",
				null, "Use",
				false, false,
				new GRGEN_LGSP.PatternNode[] { ExpressionPattern_node_sub }, 
				new GRGEN_LGSP.PatternEdge[] { ExpressionPattern_alt_0_Use_edge__edge0 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				ExpressionPattern_alt_0_Use_isNodeHomomorphicGlobal,
				ExpressionPattern_alt_0_Use_isEdgeHomomorphicGlobal,
				ExpressionPattern_alt_0_Use_isNodeTotallyHomomorphic,
				ExpressionPattern_alt_0_Use_isEdgeTotallyHomomorphic
			);
			ExpressionPattern_alt_0_Use.edgeToSourceNode.Add(ExpressionPattern_alt_0_Use_edge__edge0, ExpressionPattern_node_sub);

			GRGEN_LGSP.Alternative ExpressionPattern_alt_0 = new GRGEN_LGSP.Alternative( "alt_0", "ExpressionPattern_", new GRGEN_LGSP.PatternGraph[] { ExpressionPattern_alt_0_Call, ExpressionPattern_alt_0_Use } );

			pat_ExpressionPattern = new GRGEN_LGSP.PatternGraph(
				"ExpressionPattern",
				"",
				null, "ExpressionPattern",
				false, false,
				new GRGEN_LGSP.PatternNode[] { ExpressionPattern_node_e, ExpressionPattern_node_sub }, 
				new GRGEN_LGSP.PatternEdge[] { ExpressionPattern_edge__edge0 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] { ExpressionPattern_alt_0,  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				ExpressionPattern_isNodeHomomorphicGlobal,
				ExpressionPattern_isEdgeHomomorphicGlobal,
				ExpressionPattern_isNodeTotallyHomomorphic,
				ExpressionPattern_isEdgeTotallyHomomorphic
			);
			pat_ExpressionPattern.edgeToSourceNode.Add(ExpressionPattern_edge__edge0, ExpressionPattern_node_e);
			pat_ExpressionPattern.edgeToTargetNode.Add(ExpressionPattern_edge__edge0, ExpressionPattern_node_sub);
			ExpressionPattern_alt_0_Call.embeddingGraph = pat_ExpressionPattern;
			ExpressionPattern_alt_0_Use.embeddingGraph = pat_ExpressionPattern;

			ExpressionPattern_node_e.pointOfDefinition = null;
			ExpressionPattern_node_sub.pointOfDefinition = pat_ExpressionPattern;
			ExpressionPattern_edge__edge0.pointOfDefinition = pat_ExpressionPattern;
			ExpressionPattern_alt_0_Call_edge__edge0.pointOfDefinition = ExpressionPattern_alt_0_Call;
			ExpressionPattern_alt_0_Call__sub0.PointOfDefinition = ExpressionPattern_alt_0_Call;
			ExpressionPattern_alt_0_Use_edge__edge0.pointOfDefinition = ExpressionPattern_alt_0_Use;

			patternGraph = pat_ExpressionPattern;
		}


		public void ExpressionPattern_Create(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPNode node_e)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			graph.SettingAddedNodeNames( create_ExpressionPattern_addedNodeNames );
			GRGEN_MODEL.@Expression node_sub = GRGEN_MODEL.@Expression.CreateNode(graph);
			graph.SettingAddedEdgeNames( create_ExpressionPattern_addedEdgeNames );
			GRGEN_MODEL.@contains edge__edge0 = GRGEN_MODEL.@contains.CreateEdge(graph, node_e, node_sub);
		}
		private static string[] create_ExpressionPattern_addedNodeNames = new string[] { "sub" };
		private static string[] create_ExpressionPattern_addedEdgeNames = new string[] { "_edge0" };

		public void ExpressionPattern_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_ExpressionPattern curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_sub = curMatch._node_sub;
			GRGEN_LGSP.LGSPEdge edge__edge0 = curMatch._edge__edge0;
			IMatch_ExpressionPattern_alt_0 alternative_alt_0 = curMatch._alt_0;
			graph.Remove(edge__edge0);
			graph.RemoveEdges(node_sub);
			graph.Remove(node_sub);
		}

		public void ExpressionPattern_alt_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, IMatch_ExpressionPattern_alt_0 curMatch)
		{
			if(curMatch.Pattern == ExpressionPattern_alt_0_Call) {
				ExpressionPattern_alt_0_Call_Delete(actionEnv, (Match_ExpressionPattern_alt_0_Call)curMatch);
				return;
			}
			else if(curMatch.Pattern == ExpressionPattern_alt_0_Use) {
				ExpressionPattern_alt_0_Use_Delete(actionEnv, (Match_ExpressionPattern_alt_0_Use)curMatch);
				return;
			}
			throw new ApplicationException(); //debug assert
		}

		public void ExpressionPattern_alt_0_Call_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_ExpressionPattern_alt_0_Call curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_sub = curMatch._node_sub;
			GRGEN_LGSP.LGSPEdge edge__edge0 = curMatch._edge__edge0;
			GRGEN_ACTIONS.Pattern_Expressions.Match_Expressions subpattern__sub0 = curMatch.@__sub0;
			graph.Remove(edge__edge0);
			graph.RemoveEdges(node_sub);
			graph.Remove(node_sub);
			GRGEN_ACTIONS.Pattern_Expressions.Instance.Expressions_Delete(actionEnv, subpattern__sub0);
		}

		public void ExpressionPattern_alt_0_Use_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_ExpressionPattern_alt_0_Use curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_sub = curMatch._node_sub;
			GRGEN_LGSP.LGSPEdge edge__edge0 = curMatch._edge__edge0;
			graph.Remove(edge__edge0);
			graph.RemoveEdges(node_sub);
			graph.Remove(node_sub);
		}

		static Pattern_ExpressionPattern() {
		}

		public interface IMatch_ExpressionPattern : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IExpression node_e { get; set; }
			GRGEN_MODEL.IExpression node_sub { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge__edge0 { get; set; }
			//Variables
			//EmbeddedGraphs
			//Alternatives
			IMatch_ExpressionPattern_alt_0 alt_0 { get; }
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_ExpressionPattern_alt_0 : GRGEN_LIBGR.IMatch
		{
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_ExpressionPattern_alt_0_Call : IMatch_ExpressionPattern_alt_0
		{
			//Nodes
			GRGEN_MODEL.IExpression node_sub { get; set; }
			//Edges
			GRGEN_MODEL.Icalls edge__edge0 { get; set; }
			//Variables
			//EmbeddedGraphs
			@GRGEN_ACTIONS.Pattern_Expressions.Match_Expressions @_sub0 { get; }
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			new void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_ExpressionPattern_alt_0_Use : IMatch_ExpressionPattern_alt_0
		{
			//Nodes
			GRGEN_MODEL.IExpression node_sub { get; set; }
			//Edges
			GRGEN_MODEL.Iuses edge__edge0 { get; set; }
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			new void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_ExpressionPattern : GRGEN_LGSP.MatchListElement<Match_ExpressionPattern>, IMatch_ExpressionPattern
		{
			public GRGEN_MODEL.IExpression node_e { get { return (GRGEN_MODEL.IExpression)_node_e; } set { _node_e = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IExpression node_sub { get { return (GRGEN_MODEL.IExpression)_node_sub; } set { _node_sub = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_e;
			public GRGEN_LGSP.LGSPNode _node_sub;
			public enum ExpressionPattern_NodeNums { @e, @sub, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)ExpressionPattern_NodeNums.@e: return _node_e;
				case (int)ExpressionPattern_NodeNums.@sub: return _node_sub;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "e": return _node_e;
				case "sub": return _node_sub;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "e": _node_e = (GRGEN_LGSP.LGSPNode)value; break;
				case "sub": _node_sub = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge__edge0 { get { return (GRGEN_MODEL.Icontains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public enum ExpressionPattern_EdgeNums { @_edge0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)ExpressionPattern_EdgeNums.@_edge0: return _edge__edge0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum ExpressionPattern_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum ExpressionPattern_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public IMatch_ExpressionPattern_alt_0 alt_0 { get { return _alt_0; } }
			public IMatch_ExpressionPattern_alt_0 _alt_0;
			public enum ExpressionPattern_AltNums { @alt_0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				case (int)ExpressionPattern_AltNums.@alt_0: return _alt_0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				case "alt_0": return _alt_0;
				default: return null;
				}
			}

			public enum ExpressionPattern_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum ExpressionPattern_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_ExpressionPattern.instance.pat_ExpressionPattern; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_ExpressionPattern(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_ExpressionPattern(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_ExpressionPattern nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_ExpressionPattern cur = this;
				while(cur != null) {
					Match_ExpressionPattern next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_ExpressionPattern that)
			{
				_node_e = that._node_e;
				_node_sub = that._node_sub;
				_edge__edge0 = that._edge__edge0;
				_alt_0 = that._alt_0;
			}

			public Match_ExpressionPattern(Match_ExpressionPattern that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_ExpressionPattern that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_e = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_e];
				_node_sub = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_sub];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
				if(that._alt_0 is Match_ExpressionPattern_alt_0_Call)
					_alt_0 = new Match_ExpressionPattern_alt_0_Call((Match_ExpressionPattern_alt_0_Call)that._alt_0, oldToNewMap);
				else if(that._alt_0 is Match_ExpressionPattern_alt_0_Use)
					_alt_0 = new Match_ExpressionPattern_alt_0_Use((Match_ExpressionPattern_alt_0_Use)that._alt_0, oldToNewMap);
			}

			public Match_ExpressionPattern(Match_ExpressionPattern that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_ExpressionPattern()
			{
			}

			public bool IsEqual(Match_ExpressionPattern that)
			{
				if(that==null) return false;
				if(_node_e != that._node_e) return false;
				if(_node_sub != that._node_sub) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				if(_alt_0 is Match_ExpressionPattern_alt_0_Call && !(_alt_0 as Match_ExpressionPattern_alt_0_Call).IsEqual(that._alt_0 as Match_ExpressionPattern_alt_0_Call)) return false;
				if(_alt_0 is Match_ExpressionPattern_alt_0_Use && !(_alt_0 as Match_ExpressionPattern_alt_0_Use).IsEqual(that._alt_0 as Match_ExpressionPattern_alt_0_Use)) return false;
				return true;
			}
		}

		public class Match_ExpressionPattern_alt_0_Call : GRGEN_LGSP.MatchListElement<Match_ExpressionPattern_alt_0_Call>, IMatch_ExpressionPattern_alt_0_Call
		{
			public GRGEN_MODEL.IExpression node_sub { get { return (GRGEN_MODEL.IExpression)_node_sub; } set { _node_sub = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_sub;
			public enum ExpressionPattern_alt_0_Call_NodeNums { @sub, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)ExpressionPattern_alt_0_Call_NodeNums.@sub: return _node_sub;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "sub": return _node_sub;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "sub": _node_sub = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icalls edge__edge0 { get { return (GRGEN_MODEL.Icalls)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public enum ExpressionPattern_alt_0_Call_EdgeNums { @_edge0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)ExpressionPattern_alt_0_Call_EdgeNums.@_edge0: return _edge__edge0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum ExpressionPattern_alt_0_Call_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public @GRGEN_ACTIONS.Pattern_Expressions.Match_Expressions @_sub0 { get { return @__sub0; } }
			public @GRGEN_ACTIONS.Pattern_Expressions.Match_Expressions @__sub0;
			public enum ExpressionPattern_alt_0_Call_SubNums { @_sub0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				case (int)ExpressionPattern_alt_0_Call_SubNums.@_sub0: return __sub0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				case "_sub0": return __sub0;
				default: return null;
				}
			}

			public enum ExpressionPattern_alt_0_Call_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum ExpressionPattern_alt_0_Call_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum ExpressionPattern_alt_0_Call_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_ExpressionPattern.instance.ExpressionPattern_alt_0_Call; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_ExpressionPattern_alt_0_Call(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_ExpressionPattern_alt_0_Call(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_ExpressionPattern_alt_0_Call nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_ExpressionPattern_alt_0_Call cur = this;
				while(cur != null) {
					Match_ExpressionPattern_alt_0_Call next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_ExpressionPattern_alt_0_Call that)
			{
				_node_sub = that._node_sub;
				_edge__edge0 = that._edge__edge0;
				@__sub0 = that.@__sub0;
			}

			public Match_ExpressionPattern_alt_0_Call(Match_ExpressionPattern_alt_0_Call that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_ExpressionPattern_alt_0_Call that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_sub = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_sub];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
				@__sub0 = new GRGEN_ACTIONS.Pattern_Expressions.Match_Expressions(that.@__sub0, oldToNewMap);
			}

			public Match_ExpressionPattern_alt_0_Call(Match_ExpressionPattern_alt_0_Call that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_ExpressionPattern_alt_0_Call()
			{
			}

			public bool IsEqual(Match_ExpressionPattern_alt_0_Call that)
			{
				if(that==null) return false;
				if(_node_sub != that._node_sub) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				if(!@__sub0.IsEqual(that.@__sub0)) return false;
				return true;
			}
		}

		public class Match_ExpressionPattern_alt_0_Use : GRGEN_LGSP.MatchListElement<Match_ExpressionPattern_alt_0_Use>, IMatch_ExpressionPattern_alt_0_Use
		{
			public GRGEN_MODEL.IExpression node_sub { get { return (GRGEN_MODEL.IExpression)_node_sub; } set { _node_sub = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_sub;
			public enum ExpressionPattern_alt_0_Use_NodeNums { @sub, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)ExpressionPattern_alt_0_Use_NodeNums.@sub: return _node_sub;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "sub": return _node_sub;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "sub": _node_sub = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Iuses edge__edge0 { get { return (GRGEN_MODEL.Iuses)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public enum ExpressionPattern_alt_0_Use_EdgeNums { @_edge0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)ExpressionPattern_alt_0_Use_EdgeNums.@_edge0: return _edge__edge0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum ExpressionPattern_alt_0_Use_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum ExpressionPattern_alt_0_Use_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum ExpressionPattern_alt_0_Use_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum ExpressionPattern_alt_0_Use_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum ExpressionPattern_alt_0_Use_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_ExpressionPattern.instance.ExpressionPattern_alt_0_Use; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_ExpressionPattern_alt_0_Use(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_ExpressionPattern_alt_0_Use(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_ExpressionPattern_alt_0_Use nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_ExpressionPattern_alt_0_Use cur = this;
				while(cur != null) {
					Match_ExpressionPattern_alt_0_Use next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_ExpressionPattern_alt_0_Use that)
			{
				_node_sub = that._node_sub;
				_edge__edge0 = that._edge__edge0;
			}

			public Match_ExpressionPattern_alt_0_Use(Match_ExpressionPattern_alt_0_Use that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_ExpressionPattern_alt_0_Use that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_sub = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_sub];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
			}

			public Match_ExpressionPattern_alt_0_Use(Match_ExpressionPattern_alt_0_Use that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_ExpressionPattern_alt_0_Use()
			{
			}

			public bool IsEqual(Match_ExpressionPattern_alt_0_Use that)
			{
				if(that==null) return false;
				if(_node_sub != that._node_sub) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				return true;
			}
		}

	}


	public class Pattern_Bodies : GRGEN_LGSP.LGSPMatchingPattern
	{
		private static Pattern_Bodies instance = null;
		public static Pattern_Bodies Instance { get { if(instance==null) { instance = new Pattern_Bodies(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] Bodies_node_m5_AllowedTypes = null;
		public static GRGEN_LIBGR.NodeType[] Bodies_node_c1_AllowedTypes = null;
		public static bool[] Bodies_node_m5_IsAllowedType = null;
		public static bool[] Bodies_node_c1_IsAllowedType = null;
		public enum Bodies_NodeNums { @m5, @c1, };
		public enum Bodies_EdgeNums { };
		public enum Bodies_VariableNums { };
		public enum Bodies_SubNums { };
		public enum Bodies_AltNums { };
		public enum Bodies_IterNums { @iter_0, };





		public GRGEN_LGSP.PatternGraph pat_Bodies;

		public enum Bodies_iter_0_NodeNums { @m5, @c1, };
		public enum Bodies_iter_0_EdgeNums { };
		public enum Bodies_iter_0_VariableNums { };
		public enum Bodies_iter_0_SubNums { @b, };
		public enum Bodies_iter_0_AltNums { };
		public enum Bodies_iter_0_IterNums { };





		public GRGEN_LGSP.PatternGraph Bodies_iter_0;


		private Pattern_Bodies()
			: base("Bodies",
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_MethodSignature.typeVar, GRGEN_MODEL.NodeType_Class.typeVar, },
				new string[] { "Bodies_node_m5", "Bodies_node_c1", },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { }
			)
		{
		}
		private void initialize()
		{
			bool[,] Bodies_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] Bodies_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] Bodies_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] Bodies_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternNode Bodies_node_m5 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@MethodSignature, GRGEN_MODEL.NodeType_MethodSignature.typeVar, "GRGEN_MODEL.IMethodSignature", "Bodies_node_m5", "m5", Bodies_node_m5_AllowedTypes, Bodies_node_m5_IsAllowedType, 5.5F, 0, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternNode Bodies_node_c1 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Class, GRGEN_MODEL.NodeType_Class.typeVar, "GRGEN_MODEL.IClass", "Bodies_node_c1", "c1", Bodies_node_c1_AllowedTypes, Bodies_node_c1_IsAllowedType, 5.5F, 1, false, null, null, null, null, null, null, false, null);
			bool[,] Bodies_iter_0_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] Bodies_iter_0_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] Bodies_iter_0_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] Bodies_iter_0_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternGraphEmbedding Bodies_iter_0_b = new GRGEN_LGSP.PatternGraphEmbedding("b", Pattern_Body.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("Bodies_node_m5"),
					new GRGEN_EXPR.GraphEntityExpression("Bodies_node_c1"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "Bodies_node_m5", "Bodies_node_c1" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { Bodies_node_m5, Bodies_node_c1 }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			Bodies_iter_0 = new GRGEN_LGSP.PatternGraph(
				"iter_0",
				"Bodies_",
				null, "iter_0",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Bodies_node_m5, Bodies_node_c1 }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] { Bodies_iter_0_b }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, true, },
					{ true, true, },
				},
				new bool[0, 0] ,
				Bodies_iter_0_isNodeHomomorphicGlobal,
				Bodies_iter_0_isEdgeHomomorphicGlobal,
				Bodies_iter_0_isNodeTotallyHomomorphic,
				Bodies_iter_0_isEdgeTotallyHomomorphic
			);

			GRGEN_LGSP.Iterated Bodies_iter_0_it = new GRGEN_LGSP.Iterated( Bodies_iter_0, 0, 0, new GRGEN_LGSP.LGSPFilter[] {
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
			}
			);
			pat_Bodies = new GRGEN_LGSP.PatternGraph(
				"Bodies",
				"",
				null, "Bodies",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Bodies_node_m5, Bodies_node_c1 }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] { Bodies_iter_0_it,  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[0, 0] ,
				Bodies_isNodeHomomorphicGlobal,
				Bodies_isEdgeHomomorphicGlobal,
				Bodies_isNodeTotallyHomomorphic,
				Bodies_isEdgeTotallyHomomorphic
			);
			Bodies_iter_0.embeddingGraph = pat_Bodies;

			Bodies_node_m5.pointOfDefinition = null;
			Bodies_node_c1.pointOfDefinition = null;
			Bodies_iter_0_b.PointOfDefinition = Bodies_iter_0;

			patternGraph = pat_Bodies;
		}


		public void Bodies_Modify(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch _curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			Match_Bodies curMatch = (Match_Bodies)_curMatch;
			GRGEN_LGSP.LGSPMatchesList<Match_Bodies_iter_0, IMatch_Bodies_iter_0> iterated_iter_0 = curMatch._iter_0;
			graph.SettingAddedNodeNames( Bodies_addedNodeNames );
			Bodies_iter_0_Modify(actionEnv, iterated_iter_0);
			graph.SettingAddedEdgeNames( Bodies_addedEdgeNames );
		}
		private static string[] Bodies_addedNodeNames = new string[] {  };
		private static string[] Bodies_addedEdgeNames = new string[] {  };

		public void Bodies_Create(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPNode node_m5, GRGEN_LGSP.LGSPNode node_c1)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			graph.SettingAddedNodeNames( create_Bodies_addedNodeNames );
			graph.SettingAddedEdgeNames( create_Bodies_addedEdgeNames );
		}
		private static string[] create_Bodies_addedNodeNames = new string[] {  };
		private static string[] create_Bodies_addedEdgeNames = new string[] {  };

		public void Bodies_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Bodies curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPMatchesList<Match_Bodies_iter_0, IMatch_Bodies_iter_0> iterated_iter_0 = curMatch._iter_0;
		}

		public void Bodies_iter_0_Modify(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPMatchesList<Match_Bodies_iter_0, IMatch_Bodies_iter_0> curMatches)
		{
			for(Match_Bodies_iter_0 curMatch=curMatches.Root; curMatch!=null; curMatch=curMatch.next) {
				Bodies_iter_0_Modify(actionEnv, curMatch);
			}
		}

		public void Bodies_iter_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPMatchesList<Match_Bodies_iter_0, IMatch_Bodies_iter_0> curMatches)
		{
			for(Match_Bodies_iter_0 curMatch=curMatches.Root; curMatch!=null; curMatch=curMatch.next) {
				Bodies_iter_0_Delete(actionEnv, curMatch);
			}
		}

		public void Bodies_iter_0_Modify(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch _curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			Match_Bodies_iter_0 curMatch = (Match_Bodies_iter_0)_curMatch;
			GRGEN_ACTIONS.Pattern_Body.Match_Body subpattern_b = curMatch.@_b;
			graph.SettingAddedNodeNames( Bodies_iter_0_addedNodeNames );
			{ // b
				GRGEN_ACTIONS.Pattern_Body.Instance.Body_Modify(actionEnv, subpattern_b);
			}
			graph.SettingAddedEdgeNames( Bodies_iter_0_addedEdgeNames );
		}
		private static string[] Bodies_iter_0_addedNodeNames = new string[] {  };
		private static string[] Bodies_iter_0_addedEdgeNames = new string[] {  };

		public void Bodies_iter_0_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Bodies_iter_0 curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_m5 = curMatch._node_m5;
			GRGEN_LGSP.LGSPNode node_c1 = curMatch._node_c1;
			GRGEN_ACTIONS.Pattern_Body.Match_Body subpattern_b = curMatch.@_b;
			graph.RemoveEdges(node_m5);
			graph.Remove(node_m5);
			graph.RemoveEdges(node_c1);
			graph.Remove(node_c1);
			GRGEN_ACTIONS.Pattern_Body.Instance.Body_Delete(actionEnv, subpattern_b);
		}

		static Pattern_Bodies() {
		}

		public interface IMatch_Bodies : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IMethodSignature node_m5 { get; set; }
			GRGEN_MODEL.IClass node_c1 { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			GRGEN_LIBGR.IMatchesExact<IMatch_Bodies_iter_0> iter_0 { get; }
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_Bodies_iter_0 : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IMethodSignature node_m5 { get; set; }
			GRGEN_MODEL.IClass node_c1 { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			@GRGEN_ACTIONS.Pattern_Body.Match_Body @b { get; }
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			bool IsNullMatch { get; }
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_Bodies : GRGEN_LGSP.MatchListElement<Match_Bodies>, IMatch_Bodies
		{
			public GRGEN_MODEL.IMethodSignature node_m5 { get { return (GRGEN_MODEL.IMethodSignature)_node_m5; } set { _node_m5 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IClass node_c1 { get { return (GRGEN_MODEL.IClass)_node_c1; } set { _node_c1 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_m5;
			public GRGEN_LGSP.LGSPNode _node_c1;
			public enum Bodies_NodeNums { @m5, @c1, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Bodies_NodeNums.@m5: return _node_m5;
				case (int)Bodies_NodeNums.@c1: return _node_c1;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "m5": return _node_m5;
				case "c1": return _node_c1;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "m5": _node_m5 = (GRGEN_LGSP.LGSPNode)value; break;
				case "c1": _node_c1 = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum Bodies_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Bodies_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Bodies_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Bodies_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public GRGEN_LIBGR.IMatchesExact<IMatch_Bodies_iter_0> iter_0 { get { return _iter_0; } }
			public GRGEN_LGSP.LGSPMatchesList<Match_Bodies_iter_0, IMatch_Bodies_iter_0> _iter_0;
			public enum Bodies_IterNums { @iter_0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 1; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				case (int)Bodies_IterNums.@iter_0: return _iter_0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				case "iter_0": return _iter_0;
				default: return null;
				}
			}

			public enum Bodies_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Bodies.instance.pat_Bodies; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Bodies(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Bodies(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Bodies nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Bodies cur = this;
				while(cur != null) {
					Match_Bodies next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Bodies that)
			{
				_node_m5 = that._node_m5;
				_node_c1 = that._node_c1;
				_iter_0 = that._iter_0;
			}

			public Match_Bodies(Match_Bodies that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Bodies that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_m5 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_m5];
				_node_c1 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c1];
				_iter_0 = new GRGEN_LGSP.LGSPMatchesList<Match_Bodies_iter_0, IMatch_Bodies_iter_0>(that._iter_0, oldToNewMap);
			}

			public Match_Bodies(Match_Bodies that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Bodies()
			{
			}

			public bool IsEqual(Match_Bodies that)
			{
				if(that==null) return false;
				if(_node_m5 != that._node_m5) return false;
				if(_node_c1 != that._node_c1) return false;
				if(_iter_0.Count != that._iter_0.Count) return false;
				IEnumerator<GRGEN_LIBGR.IMatch> _iter_0_thisEnumerator = _iter_0.GetEnumerator();
				IEnumerator<GRGEN_LIBGR.IMatch> _iter_0_thatEnumerator = that._iter_0.GetEnumerator();
				while(_iter_0_thisEnumerator.MoveNext())
				{
					_iter_0_thatEnumerator.MoveNext();
					if(!(_iter_0_thisEnumerator.Current as Match_Bodies_iter_0).IsEqual(_iter_0_thatEnumerator.Current as Match_Bodies_iter_0)) return false;
				}
				return true;
			}
		}

		public class Match_Bodies_iter_0 : GRGEN_LGSP.MatchListElement<Match_Bodies_iter_0>, IMatch_Bodies_iter_0
		{
			public GRGEN_MODEL.IMethodSignature node_m5 { get { return (GRGEN_MODEL.IMethodSignature)_node_m5; } set { _node_m5 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IClass node_c1 { get { return (GRGEN_MODEL.IClass)_node_c1; } set { _node_c1 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_m5;
			public GRGEN_LGSP.LGSPNode _node_c1;
			public enum Bodies_iter_0_NodeNums { @m5, @c1, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Bodies_iter_0_NodeNums.@m5: return _node_m5;
				case (int)Bodies_iter_0_NodeNums.@c1: return _node_c1;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "m5": return _node_m5;
				case "c1": return _node_c1;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "m5": _node_m5 = (GRGEN_LGSP.LGSPNode)value; break;
				case "c1": _node_c1 = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum Bodies_iter_0_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum Bodies_iter_0_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public @GRGEN_ACTIONS.Pattern_Body.Match_Body @b { get { return @_b; } }
			public @GRGEN_ACTIONS.Pattern_Body.Match_Body @_b;
			public enum Bodies_iter_0_SubNums { @b, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				case (int)Bodies_iter_0_SubNums.@b: return _b;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				case "b": return _b;
				default: return null;
				}
			}

			public enum Bodies_iter_0_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Bodies_iter_0_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Bodies_iter_0_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Bodies.instance.Bodies_iter_0; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public bool IsNullMatch { get { return _isNullMatch; } }
			public bool _isNullMatch;
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Bodies_iter_0(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Bodies_iter_0(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Bodies_iter_0 nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Bodies_iter_0 cur = this;
				while(cur != null) {
					Match_Bodies_iter_0 next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Bodies_iter_0 that)
			{
				_node_m5 = that._node_m5;
				_node_c1 = that._node_c1;
				@_b = that.@_b;
			}

			public Match_Bodies_iter_0(Match_Bodies_iter_0 that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Bodies_iter_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_m5 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_m5];
				_node_c1 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c1];
				@_b = new GRGEN_ACTIONS.Pattern_Body.Match_Body(that.@_b, oldToNewMap);
			}

			public Match_Bodies_iter_0(Match_Bodies_iter_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Bodies_iter_0()
			{
			}

			public bool IsEqual(Match_Bodies_iter_0 that)
			{
				if(that==null) return false;
				if(_node_m5 != that._node_m5) return false;
				if(_node_c1 != that._node_c1) return false;
				if(!@_b.IsEqual(that.@_b)) return false;
				return true;
			}
		}

	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0 instanceBearingAttributeForSearch_Bodies_iter_0 = new GRGEN_ACTIONS.Pattern_Bodies.Match_Bodies_iter_0();
		public static List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> Array_Bodies_iter_0_groupBy_m5(List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> list)
		{
			Dictionary<GRGEN_MODEL.IMethodSignature, List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0>> seenValues = new Dictionary<GRGEN_MODEL.IMethodSignature, List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_m5)) {
					seenValues[list[pos].@node_m5].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> tempList = new List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_m5, tempList);
				}
			}
			List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0>();
			foreach(List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> Array_Bodies_iter_0_keepOneForEachBy_m5(List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> list)
		{
			List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0>();
			Dictionary<GRGEN_MODEL.IMethodSignature, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IMethodSignature, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0 element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_m5)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_m5, null);
				}
			}
			return newList;
		}
		public static int Array_Bodies_iter_0_indexOfBy_m5(IList<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> list, GRGEN_MODEL.IMethodSignature entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_m5.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Bodies_iter_0_indexOfBy_m5(IList<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> list, GRGEN_MODEL.IMethodSignature entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_m5.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Bodies_iter_0_lastIndexOfBy_m5(IList<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> list, GRGEN_MODEL.IMethodSignature entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_m5.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Bodies_iter_0_lastIndexOfBy_m5(IList<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> list, GRGEN_MODEL.IMethodSignature entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_m5.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> Array_Bodies_iter_0_groupBy_c1(List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> list)
		{
			Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0>> seenValues = new Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_c1)) {
					seenValues[list[pos].@node_c1].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> tempList = new List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_c1, tempList);
				}
			}
			List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0>();
			foreach(List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> Array_Bodies_iter_0_keepOneForEachBy_c1(List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> list)
		{
			List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> newList = new List<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0>();
			Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0 element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_c1)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_c1, null);
				}
			}
			return newList;
		}
		public static int Array_Bodies_iter_0_indexOfBy_c1(IList<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Bodies_iter_0_indexOfBy_c1(IList<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Bodies_iter_0_lastIndexOfBy_c1(IList<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_Bodies_iter_0_lastIndexOfBy_c1(IList<GRGEN_ACTIONS.Pattern_Bodies.IMatch_Bodies_iter_0> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
	}

	public class Pattern_Body : GRGEN_LGSP.LGSPMatchingPattern
	{
		private static Pattern_Body instance = null;
		public static Pattern_Body Instance { get { if(instance==null) { instance = new Pattern_Body(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] Body_node_c1_AllowedTypes = null;
		public static GRGEN_LIBGR.NodeType[] Body_node_c2_AllowedTypes = null;
		public static GRGEN_LIBGR.NodeType[] Body_node_b_AllowedTypes = null;
		public static GRGEN_LIBGR.NodeType[] Body_node_m5_AllowedTypes = null;
		public static bool[] Body_node_c1_IsAllowedType = null;
		public static bool[] Body_node_c2_IsAllowedType = null;
		public static bool[] Body_node_b_IsAllowedType = null;
		public static bool[] Body_node_m5_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] Body_edge__edge0_AllowedTypes = null;
		public static GRGEN_LIBGR.EdgeType[] Body_edge__edge1_AllowedTypes = null;
		public static GRGEN_LIBGR.EdgeType[] Body_edge__edge2_AllowedTypes = null;
		public static bool[] Body_edge__edge0_IsAllowedType = null;
		public static bool[] Body_edge__edge1_IsAllowedType = null;
		public static bool[] Body_edge__edge2_IsAllowedType = null;
		public enum Body_NodeNums { @c1, @c2, @b, @m5, };
		public enum Body_EdgeNums { @_edge0, @_edge1, @_edge2, };
		public enum Body_VariableNums { };
		public enum Body_SubNums { @p, @s, };
		public enum Body_AltNums { };
		public enum Body_IterNums { };





		public GRGEN_LGSP.PatternGraph pat_Body;


		private Pattern_Body()
			: base("Body",
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_MethodSignature.typeVar, GRGEN_MODEL.NodeType_Class.typeVar, },
				new string[] { "Body_node_m5", "Body_node_c1", },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { }
			)
		{
		}
		private void initialize()
		{
			bool[,] Body_isNodeHomomorphicGlobal = new bool[4, 4] {
				{ false, false, false, false, },
				{ false, false, false, false, },
				{ false, false, false, false, },
				{ false, false, false, false, },
			};
			bool[,] Body_isEdgeHomomorphicGlobal = new bool[3, 3] {
				{ false, false, false, },
				{ false, false, false, },
				{ false, false, false, },
			};
			bool[] Body_isNodeTotallyHomomorphic = new bool[4] { false, false, false, false,  };
			bool[] Body_isEdgeTotallyHomomorphic = new bool[3] { false, false, false,  };
			GRGEN_LGSP.PatternNode Body_node_c1 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Class, GRGEN_MODEL.NodeType_Class.typeVar, "GRGEN_MODEL.IClass", "Body_node_c1", "c1", Body_node_c1_AllowedTypes, Body_node_c1_IsAllowedType, 5.5F, 1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternNode Body_node_c2 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Class, GRGEN_MODEL.NodeType_Class.typeVar, "GRGEN_MODEL.IClass", "Body_node_c2", "c2", Body_node_c2_AllowedTypes, Body_node_c2_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternNode Body_node_b = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@MethodBody, GRGEN_MODEL.NodeType_MethodBody.typeVar, "GRGEN_MODEL.IMethodBody", "Body_node_b", "b", Body_node_b_AllowedTypes, Body_node_b_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternNode Body_node_m5 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@MethodSignature, GRGEN_MODEL.NodeType_MethodSignature.typeVar, "GRGEN_MODEL.IMethodSignature", "Body_node_m5", "m5", Body_node_m5_AllowedTypes, Body_node_m5_IsAllowedType, 5.5F, 0, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge Body_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "Body_edge__edge0", "_edge0", Body_edge__edge0_AllowedTypes, Body_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge Body_edge__edge1 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "Body_edge__edge1", "_edge1", Body_edge__edge1_AllowedTypes, Body_edge__edge1_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge Body_edge__edge2 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@bindsTo, GRGEN_MODEL.EdgeType_bindsTo.typeVar, "GRGEN_MODEL.IbindsTo", "Body_edge__edge2", "_edge2", Body_edge__edge2_AllowedTypes, Body_edge__edge2_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternGraphEmbedding Body_p = new GRGEN_LGSP.PatternGraphEmbedding("p", Pattern_Parameters.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("Body_node_b"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "Body_node_b" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { Body_node_b }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			GRGEN_LGSP.PatternGraphEmbedding Body_s = new GRGEN_LGSP.PatternGraphEmbedding("s", Pattern_Statements.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("Body_node_b"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "Body_node_b" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { Body_node_b }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			pat_Body = new GRGEN_LGSP.PatternGraph(
				"Body",
				"",
				null, "Body",
				false, false,
				new GRGEN_LGSP.PatternNode[] { Body_node_c1, Body_node_c2, Body_node_b, Body_node_m5 }, 
				new GRGEN_LGSP.PatternEdge[] { Body_edge__edge0, Body_edge__edge1, Body_edge__edge2 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] { Body_p, Body_s }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[4, 4] {
					{ true, false, false, false, },
					{ false, true, false, false, },
					{ false, false, true, false, },
					{ false, false, false, true, },
				},
				new bool[3, 3] {
					{ true, false, false, },
					{ false, true, false, },
					{ false, false, true, },
				},
				Body_isNodeHomomorphicGlobal,
				Body_isEdgeHomomorphicGlobal,
				Body_isNodeTotallyHomomorphic,
				Body_isEdgeTotallyHomomorphic
			);
			pat_Body.edgeToSourceNode.Add(Body_edge__edge0, Body_node_c1);
			pat_Body.edgeToTargetNode.Add(Body_edge__edge0, Body_node_c2);
			pat_Body.edgeToSourceNode.Add(Body_edge__edge1, Body_node_c2);
			pat_Body.edgeToTargetNode.Add(Body_edge__edge1, Body_node_b);
			pat_Body.edgeToSourceNode.Add(Body_edge__edge2, Body_node_b);
			pat_Body.edgeToTargetNode.Add(Body_edge__edge2, Body_node_m5);

			Body_node_c1.pointOfDefinition = null;
			Body_node_c2.pointOfDefinition = pat_Body;
			Body_node_b.pointOfDefinition = pat_Body;
			Body_node_m5.pointOfDefinition = null;
			Body_edge__edge0.pointOfDefinition = pat_Body;
			Body_edge__edge1.pointOfDefinition = pat_Body;
			Body_edge__edge2.pointOfDefinition = pat_Body;
			Body_p.PointOfDefinition = pat_Body;
			Body_s.PointOfDefinition = pat_Body;

			patternGraph = pat_Body;
		}


		public void Body_Modify(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch _curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			Match_Body curMatch = (Match_Body)_curMatch;
			GRGEN_LGSP.LGSPNode node_b = curMatch._node_b;
			GRGEN_LGSP.LGSPEdge edge__edge1 = curMatch._edge__edge1;
			GRGEN_LGSP.LGSPEdge edge__edge2 = curMatch._edge__edge2;
			GRGEN_ACTIONS.Pattern_Parameters.Match_Parameters subpattern_p = curMatch.@_p;
			GRGEN_ACTIONS.Pattern_Statements.Match_Statements subpattern_s = curMatch.@_s;
			graph.SettingAddedNodeNames( Body_addedNodeNames );
			graph.SettingAddedEdgeNames( Body_addedEdgeNames );
			graph.Remove(edge__edge1);
			graph.Remove(edge__edge2);
			graph.RemoveEdges(node_b);
			graph.Remove(node_b);
			GRGEN_ACTIONS.Pattern_Parameters.Instance.Parameters_Delete(actionEnv, subpattern_p);
			GRGEN_ACTIONS.Pattern_Statements.Instance.Statements_Delete(actionEnv, subpattern_s);
		}
		private static string[] Body_addedNodeNames = new string[] {  };
		private static string[] Body_addedEdgeNames = new string[] {  };

		public void Body_Create(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LGSP.LGSPNode node_m5, GRGEN_LGSP.LGSPNode node_c1)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			graph.SettingAddedNodeNames( create_Body_addedNodeNames );
			GRGEN_MODEL.@Class node_c2 = GRGEN_MODEL.@Class.CreateNode(graph);
			GRGEN_MODEL.@MethodBody node_b = GRGEN_MODEL.@MethodBody.CreateNode(graph);
			graph.SettingAddedEdgeNames( create_Body_addedEdgeNames );
			GRGEN_MODEL.@contains edge__edge0 = GRGEN_MODEL.@contains.CreateEdge(graph, node_c1, node_c2);
			GRGEN_MODEL.@contains edge__edge1 = GRGEN_MODEL.@contains.CreateEdge(graph, node_c2, node_b);
			GRGEN_MODEL.@bindsTo edge__edge2 = GRGEN_MODEL.@bindsTo.CreateEdge(graph, node_b, node_m5);
			GRGEN_ACTIONS.Pattern_Parameters.Instance.Parameters_Create(actionEnv, (GRGEN_MODEL.@MethodBody)(node_b));
			GRGEN_ACTIONS.Pattern_Statements.Instance.Statements_Create(actionEnv, (GRGEN_MODEL.@MethodBody)(node_b));
		}
		private static string[] create_Body_addedNodeNames = new string[] { "c2", "b" };
		private static string[] create_Body_addedEdgeNames = new string[] { "_edge0", "_edge1", "_edge2" };

		public void Body_Delete(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, Match_Body curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			GRGEN_LGSP.LGSPNode node_c2 = curMatch._node_c2;
			GRGEN_LGSP.LGSPNode node_b = curMatch._node_b;
			GRGEN_LGSP.LGSPEdge edge__edge0 = curMatch._edge__edge0;
			GRGEN_LGSP.LGSPEdge edge__edge1 = curMatch._edge__edge1;
			GRGEN_LGSP.LGSPEdge edge__edge2 = curMatch._edge__edge2;
			GRGEN_ACTIONS.Pattern_Parameters.Match_Parameters subpattern_p = curMatch.@_p;
			GRGEN_ACTIONS.Pattern_Statements.Match_Statements subpattern_s = curMatch.@_s;
			graph.Remove(edge__edge0);
			graph.Remove(edge__edge1);
			graph.Remove(edge__edge2);
			graph.RemoveEdges(node_c2);
			graph.Remove(node_c2);
			graph.RemoveEdges(node_b);
			graph.Remove(node_b);
			GRGEN_ACTIONS.Pattern_Parameters.Instance.Parameters_Delete(actionEnv, subpattern_p);
			GRGEN_ACTIONS.Pattern_Statements.Instance.Statements_Delete(actionEnv, subpattern_s);
		}

		static Pattern_Body() {
		}

		public interface IMatch_Body : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IClass node_c1 { get; set; }
			GRGEN_MODEL.IClass node_c2 { get; set; }
			GRGEN_MODEL.IMethodBody node_b { get; set; }
			GRGEN_MODEL.IMethodSignature node_m5 { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge__edge0 { get; set; }
			GRGEN_MODEL.Icontains edge__edge1 { get; set; }
			GRGEN_MODEL.IbindsTo edge__edge2 { get; set; }
			//Variables
			//EmbeddedGraphs
			@GRGEN_ACTIONS.Pattern_Parameters.Match_Parameters @p { get; }
			@GRGEN_ACTIONS.Pattern_Statements.Match_Statements @s { get; }
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_Body : GRGEN_LGSP.MatchListElement<Match_Body>, IMatch_Body
		{
			public GRGEN_MODEL.IClass node_c1 { get { return (GRGEN_MODEL.IClass)_node_c1; } set { _node_c1 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IClass node_c2 { get { return (GRGEN_MODEL.IClass)_node_c2; } set { _node_c2 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IMethodBody node_b { get { return (GRGEN_MODEL.IMethodBody)_node_b; } set { _node_b = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IMethodSignature node_m5 { get { return (GRGEN_MODEL.IMethodSignature)_node_m5; } set { _node_m5 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_c1;
			public GRGEN_LGSP.LGSPNode _node_c2;
			public GRGEN_LGSP.LGSPNode _node_b;
			public GRGEN_LGSP.LGSPNode _node_m5;
			public enum Body_NodeNums { @c1, @c2, @b, @m5, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 4; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)Body_NodeNums.@c1: return _node_c1;
				case (int)Body_NodeNums.@c2: return _node_c2;
				case (int)Body_NodeNums.@b: return _node_b;
				case (int)Body_NodeNums.@m5: return _node_m5;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "c1": return _node_c1;
				case "c2": return _node_c2;
				case "b": return _node_b;
				case "m5": return _node_m5;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "c1": _node_c1 = (GRGEN_LGSP.LGSPNode)value; break;
				case "c2": _node_c2 = (GRGEN_LGSP.LGSPNode)value; break;
				case "b": _node_b = (GRGEN_LGSP.LGSPNode)value; break;
				case "m5": _node_m5 = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge__edge0 { get { return (GRGEN_MODEL.Icontains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_MODEL.Icontains edge__edge1 { get { return (GRGEN_MODEL.Icontains)_edge__edge1; } set { _edge__edge1 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_MODEL.IbindsTo edge__edge2 { get { return (GRGEN_MODEL.IbindsTo)_edge__edge2; } set { _edge__edge2 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public GRGEN_LGSP.LGSPEdge _edge__edge1;
			public GRGEN_LGSP.LGSPEdge _edge__edge2;
			public enum Body_EdgeNums { @_edge0, @_edge1, @_edge2, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 3; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)Body_EdgeNums.@_edge0: return _edge__edge0;
				case (int)Body_EdgeNums.@_edge1: return _edge__edge1;
				case (int)Body_EdgeNums.@_edge2: return _edge__edge2;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				case "_edge1": return _edge__edge1;
				case "_edge2": return _edge__edge2;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				case "_edge1": _edge__edge1 = (GRGEN_LGSP.LGSPEdge)value; break;
				case "_edge2": _edge__edge2 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum Body_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public @GRGEN_ACTIONS.Pattern_Parameters.Match_Parameters @p { get { return @_p; } }
			public @GRGEN_ACTIONS.Pattern_Statements.Match_Statements @s { get { return @_s; } }
			public @GRGEN_ACTIONS.Pattern_Parameters.Match_Parameters @_p;
			public @GRGEN_ACTIONS.Pattern_Statements.Match_Statements @_s;
			public enum Body_SubNums { @p, @s, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 2; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				case (int)Body_SubNums.@p: return _p;
				case (int)Body_SubNums.@s: return _s;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				case "p": return _p;
				case "s": return _s;
				default: return null;
				}
			}

			public enum Body_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Body_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum Body_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Pattern_Body.instance.pat_Body; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_Body(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_Body(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_Body nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_Body cur = this;
				while(cur != null) {
					Match_Body next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_Body that)
			{
				_node_c1 = that._node_c1;
				_node_c2 = that._node_c2;
				_node_b = that._node_b;
				_node_m5 = that._node_m5;
				_edge__edge0 = that._edge__edge0;
				_edge__edge1 = that._edge__edge1;
				_edge__edge2 = that._edge__edge2;
				@_p = that.@_p;
				@_s = that.@_s;
			}

			public Match_Body(Match_Body that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_Body that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_c1 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c1];
				_node_c2 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c2];
				_node_b = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_b];
				_node_m5 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_m5];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
				_edge__edge1 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge1];
				_edge__edge2 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge2];
				@_p = new GRGEN_ACTIONS.Pattern_Parameters.Match_Parameters(that.@_p, oldToNewMap);
				@_s = new GRGEN_ACTIONS.Pattern_Statements.Match_Statements(that.@_s, oldToNewMap);
			}

			public Match_Body(Match_Body that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_Body()
			{
			}

			public bool IsEqual(Match_Body that)
			{
				if(that==null) return false;
				if(_node_c1 != that._node_c1) return false;
				if(_node_c2 != that._node_c2) return false;
				if(_node_b != that._node_b) return false;
				if(_node_m5 != that._node_m5) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				if(_edge__edge1 != that._edge__edge1) return false;
				if(_edge__edge2 != that._edge__edge2) return false;
				if(!@_p.IsEqual(that.@_p)) return false;
				if(!@_s.IsEqual(that.@_s)) return false;
				return true;
			}
		}

	}


	public class Rule_createProgramGraphExample : GRGEN_LGSP.LGSPRulePattern
	{
		private static Rule_createProgramGraphExample instance = null;
		public static Rule_createProgramGraphExample Instance { get { if(instance==null) { instance = new Rule_createProgramGraphExample(); instance.initialize(); } return instance; } }

		public enum createProgramGraphExample_NodeNums { };
		public enum createProgramGraphExample_EdgeNums { };
		public enum createProgramGraphExample_VariableNums { };
		public enum createProgramGraphExample_SubNums { };
		public enum createProgramGraphExample_AltNums { };
		public enum createProgramGraphExample_IterNums { };





		public GRGEN_LGSP.PatternGraph pat_createProgramGraphExample;


		private Rule_createProgramGraphExample()
			: base("createProgramGraphExample",
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new GRGEN_LGSP.LGSPFilter[] {
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				},
				new GRGEN_LIBGR.MatchClassInfo[] { },
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_createProgramGraphExample+IMatch_createProgramGraphExample",
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_createProgramGraphExample+Match_createProgramGraphExample"
			)
		{
		}
		private void initialize()
		{
			bool[,] createProgramGraphExample_isNodeHomomorphicGlobal = new bool[0, 0];
			bool[,] createProgramGraphExample_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] createProgramGraphExample_isNodeTotallyHomomorphic = new bool[0];
			bool[] createProgramGraphExample_isEdgeTotallyHomomorphic = new bool[0];
			pat_createProgramGraphExample = new GRGEN_LGSP.PatternGraph(
				"createProgramGraphExample",
				"",
				null, "createProgramGraphExample",
				false, false,
				new GRGEN_LGSP.PatternNode[] {  }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[0, 0] ,
				new bool[0, 0] ,
				createProgramGraphExample_isNodeHomomorphicGlobal,
				createProgramGraphExample_isEdgeHomomorphicGlobal,
				createProgramGraphExample_isNodeTotallyHomomorphic,
				createProgramGraphExample_isEdgeTotallyHomomorphic
			);


			patternGraph = pat_createProgramGraphExample;
		}


		public void Modify(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch _curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			Match_createProgramGraphExample curMatch = (Match_createProgramGraphExample)_curMatch;
			graph.SettingAddedNodeNames( createProgramGraphExample_addedNodeNames );
			GRGEN_MODEL.@Class node_any = GRGEN_MODEL.@Class.CreateNode(graph);
			GRGEN_MODEL.@Class node_cell = GRGEN_MODEL.@Class.CreateNode(graph);
			GRGEN_MODEL.@Class node_recell = GRGEN_MODEL.@Class.CreateNode(graph);
			GRGEN_MODEL.@MethodSignature node_getS = GRGEN_MODEL.@MethodSignature.CreateNode(graph);
			GRGEN_MODEL.@MethodBody node_getB = GRGEN_MODEL.@MethodBody.CreateNode(graph);
			GRGEN_MODEL.@Variabel node_cts = GRGEN_MODEL.@Variabel.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex1 = GRGEN_MODEL.@Expression.CreateNode(graph);
			GRGEN_MODEL.@MethodSignature node_setS = GRGEN_MODEL.@MethodSignature.CreateNode(graph);
			GRGEN_MODEL.@MethodBody node_setB = GRGEN_MODEL.@MethodBody.CreateNode(graph);
			GRGEN_MODEL.@Constant node_n = GRGEN_MODEL.@Constant.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex2 = GRGEN_MODEL.@Expression.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex3 = GRGEN_MODEL.@Expression.CreateNode(graph);
			GRGEN_MODEL.@MethodBody node_setB2 = GRGEN_MODEL.@MethodBody.CreateNode(graph);
			GRGEN_MODEL.@Constant node_n2 = GRGEN_MODEL.@Constant.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex4 = GRGEN_MODEL.@Expression.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex5 = GRGEN_MODEL.@Expression.CreateNode(graph);
			GRGEN_MODEL.@Variabel node_backup = GRGEN_MODEL.@Variabel.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex6 = GRGEN_MODEL.@Expression.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex7 = GRGEN_MODEL.@Expression.CreateNode(graph);
			GRGEN_MODEL.@MethodSignature node_restoreS = GRGEN_MODEL.@MethodSignature.CreateNode(graph);
			GRGEN_MODEL.@MethodBody node_restoreB = GRGEN_MODEL.@MethodBody.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex8 = GRGEN_MODEL.@Expression.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex9 = GRGEN_MODEL.@Expression.CreateNode(graph);
			graph.SettingAddedEdgeNames( createProgramGraphExample_addedEdgeNames );
			GRGEN_MODEL.@contains edge__edge0 = GRGEN_MODEL.@contains.CreateEdge(graph, node_any, node_cell);
			GRGEN_MODEL.@contains edge__edge1 = GRGEN_MODEL.@contains.CreateEdge(graph, node_cell, node_recell);
			GRGEN_MODEL.@contains edge__edge2 = GRGEN_MODEL.@contains.CreateEdge(graph, node_cell, node_getS);
			GRGEN_MODEL.@contains edge__edge3 = GRGEN_MODEL.@contains.CreateEdge(graph, node_cell, node_getB);
			GRGEN_MODEL.@bindsTo edge__edge4 = GRGEN_MODEL.@bindsTo.CreateEdge(graph, node_getB, node_getS);
			GRGEN_MODEL.@contains edge__edge5 = GRGEN_MODEL.@contains.CreateEdge(graph, node_cell, node_cts);
			GRGEN_MODEL.@hasType edge__edge6 = GRGEN_MODEL.@hasType.CreateEdge(graph, node_cts, node_any);
			GRGEN_MODEL.@contains edge__edge7 = GRGEN_MODEL.@contains.CreateEdge(graph, node_getB, node_ex1);
			GRGEN_MODEL.@uses edge__edge8 = GRGEN_MODEL.@uses.CreateEdge(graph, node_ex1, node_cts);
			GRGEN_MODEL.@contains edge__edge9 = GRGEN_MODEL.@contains.CreateEdge(graph, node_cell, node_setS);
			GRGEN_MODEL.@contains edge__edge10 = GRGEN_MODEL.@contains.CreateEdge(graph, node_cell, node_setB);
			GRGEN_MODEL.@bindsTo edge__edge11 = GRGEN_MODEL.@bindsTo.CreateEdge(graph, node_setB, node_setS);
			GRGEN_MODEL.@contains edge__edge12 = GRGEN_MODEL.@contains.CreateEdge(graph, node_setB, node_n);
			GRGEN_MODEL.@hasType edge__edge13 = GRGEN_MODEL.@hasType.CreateEdge(graph, node_n, node_any);
			GRGEN_MODEL.@contains edge__edge14 = GRGEN_MODEL.@contains.CreateEdge(graph, node_setB, node_ex2);
			GRGEN_MODEL.@writesTo edge__edge15 = GRGEN_MODEL.@writesTo.CreateEdge(graph, node_ex2, node_cts);
			GRGEN_MODEL.@contains edge__edge16 = GRGEN_MODEL.@contains.CreateEdge(graph, node_ex2, node_ex3);
			GRGEN_MODEL.@uses edge__edge17 = GRGEN_MODEL.@uses.CreateEdge(graph, node_ex3, node_n);
			GRGEN_MODEL.@contains edge__edge18 = GRGEN_MODEL.@contains.CreateEdge(graph, node_recell, node_setB2);
			GRGEN_MODEL.@bindsTo edge__edge19 = GRGEN_MODEL.@bindsTo.CreateEdge(graph, node_setB2, node_setS);
			GRGEN_MODEL.@contains edge__edge20 = GRGEN_MODEL.@contains.CreateEdge(graph, node_setB2, node_n2);
			GRGEN_MODEL.@hasType edge__edge21 = GRGEN_MODEL.@hasType.CreateEdge(graph, node_n2, node_any);
			GRGEN_MODEL.@contains edge__edge22 = GRGEN_MODEL.@contains.CreateEdge(graph, node_setB2, node_ex4);
			GRGEN_MODEL.@calls edge__edge23 = GRGEN_MODEL.@calls.CreateEdge(graph, node_ex4, node_setS);
			GRGEN_MODEL.@contains edge__edge24 = GRGEN_MODEL.@contains.CreateEdge(graph, node_ex4, node_ex5);
			GRGEN_MODEL.@uses edge__edge25 = GRGEN_MODEL.@uses.CreateEdge(graph, node_ex5, node_n2);
			GRGEN_MODEL.@contains edge__edge26 = GRGEN_MODEL.@contains.CreateEdge(graph, node_recell, node_backup);
			GRGEN_MODEL.@hasType edge__edge27 = GRGEN_MODEL.@hasType.CreateEdge(graph, node_backup, node_any);
			GRGEN_MODEL.@contains edge__edge28 = GRGEN_MODEL.@contains.CreateEdge(graph, node_setB2, node_ex6);
			GRGEN_MODEL.@writesTo edge__edge29 = GRGEN_MODEL.@writesTo.CreateEdge(graph, node_ex6, node_backup);
			GRGEN_MODEL.@contains edge__edge30 = GRGEN_MODEL.@contains.CreateEdge(graph, node_ex6, node_ex7);
			GRGEN_MODEL.@uses edge__edge31 = GRGEN_MODEL.@uses.CreateEdge(graph, node_ex7, node_cts);
			GRGEN_MODEL.@contains edge__edge32 = GRGEN_MODEL.@contains.CreateEdge(graph, node_recell, node_restoreS);
			GRGEN_MODEL.@contains edge__edge33 = GRGEN_MODEL.@contains.CreateEdge(graph, node_recell, node_restoreB);
			GRGEN_MODEL.@bindsTo edge__edge34 = GRGEN_MODEL.@bindsTo.CreateEdge(graph, node_restoreB, node_restoreS);
			GRGEN_MODEL.@contains edge__edge35 = GRGEN_MODEL.@contains.CreateEdge(graph, node_restoreB, node_ex8);
			GRGEN_MODEL.@writesTo edge__edge36 = GRGEN_MODEL.@writesTo.CreateEdge(graph, node_ex8, node_cts);
			GRGEN_MODEL.@contains edge__edge37 = GRGEN_MODEL.@contains.CreateEdge(graph, node_ex8, node_ex9);
			GRGEN_MODEL.@uses edge__edge38 = GRGEN_MODEL.@uses.CreateEdge(graph, node_ex9, node_backup);
			actionEnv.SelectedMatchRewritten();
			return;
		}
		private static string[] createProgramGraphExample_addedNodeNames = new string[] { "any", "cell", "recell", "getS", "getB", "cts", "ex1", "setS", "setB", "n", "ex2", "ex3", "setB2", "n2", "ex4", "ex5", "backup", "ex6", "ex7", "restoreS", "restoreB", "ex8", "ex9" };
		private static string[] createProgramGraphExample_addedEdgeNames = new string[] { "_edge0", "_edge1", "_edge2", "_edge3", "_edge4", "_edge5", "_edge6", "_edge7", "_edge8", "_edge9", "_edge10", "_edge11", "_edge12", "_edge13", "_edge14", "_edge15", "_edge16", "_edge17", "_edge18", "_edge19", "_edge20", "_edge21", "_edge22", "_edge23", "_edge24", "_edge25", "_edge26", "_edge27", "_edge28", "_edge29", "_edge30", "_edge31", "_edge32", "_edge33", "_edge34", "_edge35", "_edge36", "_edge37", "_edge38" };

		static Rule_createProgramGraphExample() {
		}

		public interface IMatch_createProgramGraphExample : GRGEN_LIBGR.IMatch
		{
			//Nodes
			//Edges
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_createProgramGraphExample : GRGEN_LGSP.MatchListElement<Match_createProgramGraphExample>, IMatch_createProgramGraphExample
		{
			public enum createProgramGraphExample_NodeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 0; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum createProgramGraphExample_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum createProgramGraphExample_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum createProgramGraphExample_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum createProgramGraphExample_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum createProgramGraphExample_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum createProgramGraphExample_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Rule_createProgramGraphExample.instance.pat_createProgramGraphExample; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_createProgramGraphExample(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_createProgramGraphExample(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_createProgramGraphExample nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_createProgramGraphExample cur = this;
				while(cur != null) {
					Match_createProgramGraphExample next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_createProgramGraphExample that)
			{
			}

			public Match_createProgramGraphExample(Match_createProgramGraphExample that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_createProgramGraphExample that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
			}

			public Match_createProgramGraphExample(Match_createProgramGraphExample that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_createProgramGraphExample()
			{
			}

			public bool IsEqual(Match_createProgramGraphExample that)
			{
				if(that==null) return false;
				return true;
			}
		}


		public class Extractor
		{
		}


		public static List<GRGEN_ACTIONS.Rule_createProgramGraphExample.IMatch_createProgramGraphExample> ConvertAsNeeded(object parameter)
		{
			if(parameter is List<GRGEN_ACTIONS.Rule_createProgramGraphExample.IMatch_createProgramGraphExample>)
				return ((List<GRGEN_ACTIONS.Rule_createProgramGraphExample.IMatch_createProgramGraphExample>)parameter);
			else
				return GRGEN_LIBGR.MatchListHelper.ToList<GRGEN_ACTIONS.Rule_createProgramGraphExample.IMatch_createProgramGraphExample>((IList<GRGEN_LIBGR.IMatch>)parameter);
		}
	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Rule_createProgramGraphExample.IMatch_createProgramGraphExample instanceBearingAttributeForSearch_createProgramGraphExample = new GRGEN_ACTIONS.Rule_createProgramGraphExample.Match_createProgramGraphExample();
	}

	public class Rule_createProgramGraphPullUp : GRGEN_LGSP.LGSPRulePattern
	{
		private static Rule_createProgramGraphPullUp instance = null;
		public static Rule_createProgramGraphPullUp Instance { get { if(instance==null) { instance = new Rule_createProgramGraphPullUp(); instance.initialize(); } return instance; } }

		public enum createProgramGraphPullUp_NodeNums { };
		public enum createProgramGraphPullUp_EdgeNums { };
		public enum createProgramGraphPullUp_VariableNums { };
		public enum createProgramGraphPullUp_SubNums { };
		public enum createProgramGraphPullUp_AltNums { };
		public enum createProgramGraphPullUp_IterNums { };





		public GRGEN_LGSP.PatternGraph pat_createProgramGraphPullUp;


		private Rule_createProgramGraphPullUp()
			: base("createProgramGraphPullUp",
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_Class.typeVar, GRGEN_MODEL.NodeType_MethodBody.typeVar, },
				new GRGEN_LGSP.LGSPFilter[] {
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				},
				new GRGEN_LIBGR.MatchClassInfo[] { },
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_createProgramGraphPullUp+IMatch_createProgramGraphPullUp",
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_createProgramGraphPullUp+Match_createProgramGraphPullUp"
			)
		{
		}
		private void initialize()
		{
			bool[,] createProgramGraphPullUp_isNodeHomomorphicGlobal = new bool[0, 0];
			bool[,] createProgramGraphPullUp_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] createProgramGraphPullUp_isNodeTotallyHomomorphic = new bool[0];
			bool[] createProgramGraphPullUp_isEdgeTotallyHomomorphic = new bool[0];
			pat_createProgramGraphPullUp = new GRGEN_LGSP.PatternGraph(
				"createProgramGraphPullUp",
				"",
				null, "createProgramGraphPullUp",
				false, false,
				new GRGEN_LGSP.PatternNode[] {  }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[0, 0] ,
				new bool[0, 0] ,
				createProgramGraphPullUp_isNodeHomomorphicGlobal,
				createProgramGraphPullUp_isEdgeHomomorphicGlobal,
				createProgramGraphPullUp_isNodeTotallyHomomorphic,
				createProgramGraphPullUp_isEdgeTotallyHomomorphic
			);


			patternGraph = pat_createProgramGraphPullUp;
		}


		public void Modify(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch _curMatch, out GRGEN_MODEL.IClass output_0, out GRGEN_MODEL.IMethodBody output_1)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			Match_createProgramGraphPullUp curMatch = (Match_createProgramGraphPullUp)_curMatch;
			graph.SettingAddedNodeNames( createProgramGraphPullUp_addedNodeNames );
			GRGEN_MODEL.@Class node_c1 = GRGEN_MODEL.@Class.CreateNode(graph);
			GRGEN_MODEL.@Class node_c2 = GRGEN_MODEL.@Class.CreateNode(graph);
			GRGEN_MODEL.@Class node_c3 = GRGEN_MODEL.@Class.CreateNode(graph);
			GRGEN_MODEL.@Class node_c4 = GRGEN_MODEL.@Class.CreateNode(graph);
			GRGEN_MODEL.@MethodSignature node_m5 = GRGEN_MODEL.@MethodSignature.CreateNode(graph);
			GRGEN_MODEL.@MethodBody node_b2 = GRGEN_MODEL.@MethodBody.CreateNode(graph);
			GRGEN_MODEL.@Variabel node_v7a = GRGEN_MODEL.@Variabel.CreateNode(graph);
			GRGEN_MODEL.@MethodBody node_b3 = GRGEN_MODEL.@MethodBody.CreateNode(graph);
			GRGEN_MODEL.@Variabel node_v7b = GRGEN_MODEL.@Variabel.CreateNode(graph);
			GRGEN_MODEL.@MethodBody node_b4 = GRGEN_MODEL.@MethodBody.CreateNode(graph);
			GRGEN_MODEL.@MethodSignature node_m8 = GRGEN_MODEL.@MethodSignature.CreateNode(graph);
			GRGEN_MODEL.@Variabel node_v9 = GRGEN_MODEL.@Variabel.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex1 = GRGEN_MODEL.@Expression.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex = GRGEN_MODEL.@Expression.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex2 = GRGEN_MODEL.@Expression.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex3 = GRGEN_MODEL.@Expression.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex4 = GRGEN_MODEL.@Expression.CreateNode(graph);
			GRGEN_MODEL.@Expression node_ex5 = GRGEN_MODEL.@Expression.CreateNode(graph);
			graph.SettingAddedEdgeNames( createProgramGraphPullUp_addedEdgeNames );
			GRGEN_MODEL.@contains edge__edge0 = GRGEN_MODEL.@contains.CreateEdge(graph, node_c1, node_c2);
			GRGEN_MODEL.@contains edge__edge1 = GRGEN_MODEL.@contains.CreateEdge(graph, node_c1, node_c3);
			GRGEN_MODEL.@contains edge__edge2 = GRGEN_MODEL.@contains.CreateEdge(graph, node_c1, node_c4);
			GRGEN_MODEL.@contains edge__edge3 = GRGEN_MODEL.@contains.CreateEdge(graph, node_c1, node_m5);
			GRGEN_MODEL.@contains edge__edge4 = GRGEN_MODEL.@contains.CreateEdge(graph, node_c2, node_b2);
			GRGEN_MODEL.@contains edge__edge5 = GRGEN_MODEL.@contains.CreateEdge(graph, node_b2, node_v7a);
			GRGEN_MODEL.@hasType edge__edge6 = GRGEN_MODEL.@hasType.CreateEdge(graph, node_v7a, node_c4);
			GRGEN_MODEL.@contains edge__edge7 = GRGEN_MODEL.@contains.CreateEdge(graph, node_c3, node_b3);
			GRGEN_MODEL.@contains edge__edge8 = GRGEN_MODEL.@contains.CreateEdge(graph, node_b3, node_v7b);
			GRGEN_MODEL.@hasType edge__edge9 = GRGEN_MODEL.@hasType.CreateEdge(graph, node_v7b, node_c4);
			GRGEN_MODEL.@contains edge__edge10 = GRGEN_MODEL.@contains.CreateEdge(graph, node_c4, node_b4);
			GRGEN_MODEL.@bindsTo edge__edge11 = GRGEN_MODEL.@bindsTo.CreateEdge(graph, node_b2, node_m5);
			GRGEN_MODEL.@bindsTo edge__edge12 = GRGEN_MODEL.@bindsTo.CreateEdge(graph, node_b3, node_m5);
			GRGEN_MODEL.@bindsTo edge__edge13 = GRGEN_MODEL.@bindsTo.CreateEdge(graph, node_b4, node_m5);
			GRGEN_MODEL.@contains edge__edge14 = GRGEN_MODEL.@contains.CreateEdge(graph, node_c1, node_m8);
			GRGEN_MODEL.@contains edge__edge15 = GRGEN_MODEL.@contains.CreateEdge(graph, node_c2, node_v9);
			GRGEN_MODEL.@hasType edge__edge16 = GRGEN_MODEL.@hasType.CreateEdge(graph, node_v9, node_c4);
			GRGEN_MODEL.@contains edge__edge17 = GRGEN_MODEL.@contains.CreateEdge(graph, node_b2, node_ex1);
			GRGEN_MODEL.@writesTo edge__edge18 = GRGEN_MODEL.@writesTo.CreateEdge(graph, node_ex1, node_v9);
			GRGEN_MODEL.@contains edge__edge19 = GRGEN_MODEL.@contains.CreateEdge(graph, node_ex1, node_ex);
			GRGEN_MODEL.@uses edge__edge20 = GRGEN_MODEL.@uses.CreateEdge(graph, node_ex, node_v7a);
			GRGEN_MODEL.@contains edge__edge21 = GRGEN_MODEL.@contains.CreateEdge(graph, node_b2, node_ex2);
			GRGEN_MODEL.@calls edge__edge22 = GRGEN_MODEL.@calls.CreateEdge(graph, node_ex2, node_m8);
			GRGEN_MODEL.@contains edge__edge23 = GRGEN_MODEL.@contains.CreateEdge(graph, node_ex2, node_ex3);
			GRGEN_MODEL.@uses edge__edge24 = GRGEN_MODEL.@uses.CreateEdge(graph, node_ex3, node_v9);
			GRGEN_MODEL.@contains edge__edge25 = GRGEN_MODEL.@contains.CreateEdge(graph, node_b3, node_ex4);
			GRGEN_MODEL.@calls edge__edge26 = GRGEN_MODEL.@calls.CreateEdge(graph, node_ex4, node_m8);
			GRGEN_MODEL.@contains edge__edge27 = GRGEN_MODEL.@contains.CreateEdge(graph, node_ex4, node_ex5);
			GRGEN_MODEL.@uses edge__edge28 = GRGEN_MODEL.@uses.CreateEdge(graph, node_ex5, node_v7b);
			actionEnv.SelectedMatchRewritten();
			output_0 = (GRGEN_MODEL.IClass)(node_c1);
			output_1 = (GRGEN_MODEL.IMethodBody)(node_b4);
			return;
		}
		private static string[] createProgramGraphPullUp_addedNodeNames = new string[] { "c1", "c2", "c3", "c4", "m5", "b2", "v7a", "b3", "v7b", "b4", "m8", "v9", "ex1", "ex", "ex2", "ex3", "ex4", "ex5" };
		private static string[] createProgramGraphPullUp_addedEdgeNames = new string[] { "_edge0", "_edge1", "_edge2", "_edge3", "_edge4", "_edge5", "_edge6", "_edge7", "_edge8", "_edge9", "_edge10", "_edge11", "_edge12", "_edge13", "_edge14", "_edge15", "_edge16", "_edge17", "_edge18", "_edge19", "_edge20", "_edge21", "_edge22", "_edge23", "_edge24", "_edge25", "_edge26", "_edge27", "_edge28" };

		static Rule_createProgramGraphPullUp() {
		}

		public interface IMatch_createProgramGraphPullUp : GRGEN_LIBGR.IMatch
		{
			//Nodes
			//Edges
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_createProgramGraphPullUp : GRGEN_LGSP.MatchListElement<Match_createProgramGraphPullUp>, IMatch_createProgramGraphPullUp
		{
			public enum createProgramGraphPullUp_NodeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 0; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum createProgramGraphPullUp_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum createProgramGraphPullUp_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum createProgramGraphPullUp_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum createProgramGraphPullUp_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum createProgramGraphPullUp_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum createProgramGraphPullUp_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Rule_createProgramGraphPullUp.instance.pat_createProgramGraphPullUp; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_createProgramGraphPullUp(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_createProgramGraphPullUp(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_createProgramGraphPullUp nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_createProgramGraphPullUp cur = this;
				while(cur != null) {
					Match_createProgramGraphPullUp next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_createProgramGraphPullUp that)
			{
			}

			public Match_createProgramGraphPullUp(Match_createProgramGraphPullUp that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_createProgramGraphPullUp that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
			}

			public Match_createProgramGraphPullUp(Match_createProgramGraphPullUp that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_createProgramGraphPullUp()
			{
			}

			public bool IsEqual(Match_createProgramGraphPullUp that)
			{
				if(that==null) return false;
				return true;
			}
		}


		public class Extractor
		{
		}


		public static List<GRGEN_ACTIONS.Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp> ConvertAsNeeded(object parameter)
		{
			if(parameter is List<GRGEN_ACTIONS.Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp>)
				return ((List<GRGEN_ACTIONS.Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp>)parameter);
			else
				return GRGEN_LIBGR.MatchListHelper.ToList<GRGEN_ACTIONS.Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp>((IList<GRGEN_LIBGR.IMatch>)parameter);
		}
	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp instanceBearingAttributeForSearch_createProgramGraphPullUp = new GRGEN_ACTIONS.Rule_createProgramGraphPullUp.Match_createProgramGraphPullUp();
	}

	public class Rule_pullUpMethod : GRGEN_LGSP.LGSPRulePattern
	{
		private static Rule_pullUpMethod instance = null;
		public static Rule_pullUpMethod Instance { get { if(instance==null) { instance = new Rule_pullUpMethod(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] pullUpMethod_node_c1_AllowedTypes = null;
		public static GRGEN_LIBGR.NodeType[] pullUpMethod_node_c3_AllowedTypes = null;
		public static GRGEN_LIBGR.NodeType[] pullUpMethod_node_b4_AllowedTypes = null;
		public static GRGEN_LIBGR.NodeType[] pullUpMethod_node_m5_AllowedTypes = null;
		public static bool[] pullUpMethod_node_c1_IsAllowedType = null;
		public static bool[] pullUpMethod_node_c3_IsAllowedType = null;
		public static bool[] pullUpMethod_node_b4_IsAllowedType = null;
		public static bool[] pullUpMethod_node_m5_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] pullUpMethod_edge__edge0_AllowedTypes = null;
		public static GRGEN_LIBGR.EdgeType[] pullUpMethod_edge_m_AllowedTypes = null;
		public static GRGEN_LIBGR.EdgeType[] pullUpMethod_edge__edge1_AllowedTypes = null;
		public static bool[] pullUpMethod_edge__edge0_IsAllowedType = null;
		public static bool[] pullUpMethod_edge_m_IsAllowedType = null;
		public static bool[] pullUpMethod_edge__edge1_IsAllowedType = null;
		public enum pullUpMethod_NodeNums { @c1, @c3, @b4, @m5, };
		public enum pullUpMethod_EdgeNums { @_edge0, @m, @_edge1, };
		public enum pullUpMethod_VariableNums { };
		public enum pullUpMethod_SubNums { @bs, };
		public enum pullUpMethod_AltNums { };
		public enum pullUpMethod_IterNums { };





		public GRGEN_LGSP.PatternGraph pat_pullUpMethod;


		private Rule_pullUpMethod()
			: base("pullUpMethod",
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_Class.typeVar, GRGEN_MODEL.NodeType_MethodBody.typeVar, },
				new string[] { "pullUpMethod_node_c1", "pullUpMethod_node_b4", },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new GRGEN_LGSP.LGSPFilter[] {
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				},
				new GRGEN_LIBGR.MatchClassInfo[] { },
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_pullUpMethod+IMatch_pullUpMethod",
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_pullUpMethod+Match_pullUpMethod"
			)
		{
		}
		private void initialize()
		{
			bool[,] pullUpMethod_isNodeHomomorphicGlobal = new bool[4, 4] {
				{ false, false, false, false, },
				{ false, false, false, false, },
				{ false, false, false, false, },
				{ false, false, false, false, },
			};
			bool[,] pullUpMethod_isEdgeHomomorphicGlobal = new bool[3, 3] {
				{ false, false, false, },
				{ false, false, false, },
				{ false, false, false, },
			};
			bool[] pullUpMethod_isNodeTotallyHomomorphic = new bool[4] { false, false, false, false,  };
			bool[] pullUpMethod_isEdgeTotallyHomomorphic = new bool[3] { false, false, false,  };
			GRGEN_LGSP.PatternNode pullUpMethod_node_c1 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Class, GRGEN_MODEL.NodeType_Class.typeVar, "GRGEN_MODEL.IClass", "pullUpMethod_node_c1", "c1", pullUpMethod_node_c1_AllowedTypes, pullUpMethod_node_c1_IsAllowedType, 5.5F, 0, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternNode pullUpMethod_node_c3 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Class, GRGEN_MODEL.NodeType_Class.typeVar, "GRGEN_MODEL.IClass", "pullUpMethod_node_c3", "c3", pullUpMethod_node_c3_AllowedTypes, pullUpMethod_node_c3_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternNode pullUpMethod_node_b4 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@MethodBody, GRGEN_MODEL.NodeType_MethodBody.typeVar, "GRGEN_MODEL.IMethodBody", "pullUpMethod_node_b4", "b4", pullUpMethod_node_b4_AllowedTypes, pullUpMethod_node_b4_IsAllowedType, 5.5F, 1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternNode pullUpMethod_node_m5 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@MethodSignature, GRGEN_MODEL.NodeType_MethodSignature.typeVar, "GRGEN_MODEL.IMethodSignature", "pullUpMethod_node_m5", "m5", pullUpMethod_node_m5_AllowedTypes, pullUpMethod_node_m5_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge pullUpMethod_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "pullUpMethod_edge__edge0", "_edge0", pullUpMethod_edge__edge0_AllowedTypes, pullUpMethod_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge pullUpMethod_edge_m = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "pullUpMethod_edge_m", "m", pullUpMethod_edge_m_AllowedTypes, pullUpMethod_edge_m_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge pullUpMethod_edge__edge1 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@bindsTo, GRGEN_MODEL.EdgeType_bindsTo.typeVar, "GRGEN_MODEL.IbindsTo", "pullUpMethod_edge__edge1", "_edge1", pullUpMethod_edge__edge1_AllowedTypes, pullUpMethod_edge__edge1_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternGraphEmbedding pullUpMethod_bs = new GRGEN_LGSP.PatternGraphEmbedding("bs", Pattern_Bodies.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("pullUpMethod_node_m5"),
					new GRGEN_EXPR.GraphEntityExpression("pullUpMethod_node_c1"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "pullUpMethod_node_m5", "pullUpMethod_node_c1" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { pullUpMethod_node_m5, pullUpMethod_node_c1 }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			pat_pullUpMethod = new GRGEN_LGSP.PatternGraph(
				"pullUpMethod",
				"",
				null, "pullUpMethod",
				false, false,
				new GRGEN_LGSP.PatternNode[] { pullUpMethod_node_c1, pullUpMethod_node_c3, pullUpMethod_node_b4, pullUpMethod_node_m5 }, 
				new GRGEN_LGSP.PatternEdge[] { pullUpMethod_edge__edge0, pullUpMethod_edge_m, pullUpMethod_edge__edge1 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] { pullUpMethod_bs }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[4, 4] {
					{ true, false, false, false, },
					{ false, true, false, false, },
					{ false, false, true, false, },
					{ false, false, false, true, },
				},
				new bool[3, 3] {
					{ true, false, false, },
					{ false, true, false, },
					{ false, false, true, },
				},
				pullUpMethod_isNodeHomomorphicGlobal,
				pullUpMethod_isEdgeHomomorphicGlobal,
				pullUpMethod_isNodeTotallyHomomorphic,
				pullUpMethod_isEdgeTotallyHomomorphic
			);
			pat_pullUpMethod.edgeToSourceNode.Add(pullUpMethod_edge__edge0, pullUpMethod_node_c1);
			pat_pullUpMethod.edgeToTargetNode.Add(pullUpMethod_edge__edge0, pullUpMethod_node_c3);
			pat_pullUpMethod.edgeToSourceNode.Add(pullUpMethod_edge_m, pullUpMethod_node_c3);
			pat_pullUpMethod.edgeToTargetNode.Add(pullUpMethod_edge_m, pullUpMethod_node_b4);
			pat_pullUpMethod.edgeToSourceNode.Add(pullUpMethod_edge__edge1, pullUpMethod_node_b4);
			pat_pullUpMethod.edgeToTargetNode.Add(pullUpMethod_edge__edge1, pullUpMethod_node_m5);

			pullUpMethod_node_c1.pointOfDefinition = null;
			pullUpMethod_node_c3.pointOfDefinition = pat_pullUpMethod;
			pullUpMethod_node_b4.pointOfDefinition = null;
			pullUpMethod_node_m5.pointOfDefinition = pat_pullUpMethod;
			pullUpMethod_edge__edge0.pointOfDefinition = pat_pullUpMethod;
			pullUpMethod_edge_m.pointOfDefinition = pat_pullUpMethod;
			pullUpMethod_edge__edge1.pointOfDefinition = pat_pullUpMethod;
			pullUpMethod_bs.PointOfDefinition = pat_pullUpMethod;

			patternGraph = pat_pullUpMethod;
		}


		public void Modify(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch _curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			Match_pullUpMethod curMatch = (Match_pullUpMethod)_curMatch;
			GRGEN_LGSP.LGSPNode node_c1 = curMatch._node_c1;
			GRGEN_LGSP.LGSPNode node_b4 = curMatch._node_b4;
			GRGEN_LGSP.LGSPEdge edge_m = curMatch._edge_m;
			GRGEN_ACTIONS.Pattern_Bodies.Match_Bodies subpattern_bs = curMatch.@_bs;
			graph.SettingAddedNodeNames( pullUpMethod_addedNodeNames );
			{ // bs
				GRGEN_ACTIONS.Pattern_Bodies.Instance.Bodies_Modify(actionEnv, subpattern_bs);
			}
			graph.SettingAddedEdgeNames( pullUpMethod_addedEdgeNames );
			GRGEN_MODEL.@contains edge__edge2 = GRGEN_MODEL.@contains.CreateEdge(graph, node_c1, node_b4);
			graph.Remove(edge_m);
			actionEnv.SelectedMatchRewritten();
			return;
		}
		private static string[] pullUpMethod_addedNodeNames = new string[] {  };
		private static string[] pullUpMethod_addedEdgeNames = new string[] { "_edge2" };

		static Rule_pullUpMethod() {
		}

		public interface IMatch_pullUpMethod : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IClass node_c1 { get; set; }
			GRGEN_MODEL.IClass node_c3 { get; set; }
			GRGEN_MODEL.IMethodBody node_b4 { get; set; }
			GRGEN_MODEL.IMethodSignature node_m5 { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge__edge0 { get; set; }
			GRGEN_MODEL.Icontains edge_m { get; set; }
			GRGEN_MODEL.IbindsTo edge__edge1 { get; set; }
			//Variables
			//EmbeddedGraphs
			@GRGEN_ACTIONS.Pattern_Bodies.Match_Bodies @bs { get; }
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_pullUpMethod : GRGEN_LGSP.MatchListElement<Match_pullUpMethod>, IMatch_pullUpMethod
		{
			public GRGEN_MODEL.IClass node_c1 { get { return (GRGEN_MODEL.IClass)_node_c1; } set { _node_c1 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IClass node_c3 { get { return (GRGEN_MODEL.IClass)_node_c3; } set { _node_c3 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IMethodBody node_b4 { get { return (GRGEN_MODEL.IMethodBody)_node_b4; } set { _node_b4 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IMethodSignature node_m5 { get { return (GRGEN_MODEL.IMethodSignature)_node_m5; } set { _node_m5 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_c1;
			public GRGEN_LGSP.LGSPNode _node_c3;
			public GRGEN_LGSP.LGSPNode _node_b4;
			public GRGEN_LGSP.LGSPNode _node_m5;
			public enum pullUpMethod_NodeNums { @c1, @c3, @b4, @m5, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 4; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)pullUpMethod_NodeNums.@c1: return _node_c1;
				case (int)pullUpMethod_NodeNums.@c3: return _node_c3;
				case (int)pullUpMethod_NodeNums.@b4: return _node_b4;
				case (int)pullUpMethod_NodeNums.@m5: return _node_m5;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "c1": return _node_c1;
				case "c3": return _node_c3;
				case "b4": return _node_b4;
				case "m5": return _node_m5;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "c1": _node_c1 = (GRGEN_LGSP.LGSPNode)value; break;
				case "c3": _node_c3 = (GRGEN_LGSP.LGSPNode)value; break;
				case "b4": _node_b4 = (GRGEN_LGSP.LGSPNode)value; break;
				case "m5": _node_m5 = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge__edge0 { get { return (GRGEN_MODEL.Icontains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_MODEL.Icontains edge_m { get { return (GRGEN_MODEL.Icontains)_edge_m; } set { _edge_m = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_MODEL.IbindsTo edge__edge1 { get { return (GRGEN_MODEL.IbindsTo)_edge__edge1; } set { _edge__edge1 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public GRGEN_LGSP.LGSPEdge _edge_m;
			public GRGEN_LGSP.LGSPEdge _edge__edge1;
			public enum pullUpMethod_EdgeNums { @_edge0, @m, @_edge1, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 3; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)pullUpMethod_EdgeNums.@_edge0: return _edge__edge0;
				case (int)pullUpMethod_EdgeNums.@m: return _edge_m;
				case (int)pullUpMethod_EdgeNums.@_edge1: return _edge__edge1;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				case "m": return _edge_m;
				case "_edge1": return _edge__edge1;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				case "m": _edge_m = (GRGEN_LGSP.LGSPEdge)value; break;
				case "_edge1": _edge__edge1 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum pullUpMethod_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public @GRGEN_ACTIONS.Pattern_Bodies.Match_Bodies @bs { get { return @_bs; } }
			public @GRGEN_ACTIONS.Pattern_Bodies.Match_Bodies @_bs;
			public enum pullUpMethod_SubNums { @bs, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				case (int)pullUpMethod_SubNums.@bs: return _bs;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				case "bs": return _bs;
				default: return null;
				}
			}

			public enum pullUpMethod_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum pullUpMethod_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum pullUpMethod_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Rule_pullUpMethod.instance.pat_pullUpMethod; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_pullUpMethod(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_pullUpMethod(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_pullUpMethod nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_pullUpMethod cur = this;
				while(cur != null) {
					Match_pullUpMethod next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_pullUpMethod that)
			{
				_node_c1 = that._node_c1;
				_node_c3 = that._node_c3;
				_node_b4 = that._node_b4;
				_node_m5 = that._node_m5;
				_edge__edge0 = that._edge__edge0;
				_edge_m = that._edge_m;
				_edge__edge1 = that._edge__edge1;
				@_bs = that.@_bs;
			}

			public Match_pullUpMethod(Match_pullUpMethod that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_pullUpMethod that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_c1 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c1];
				_node_c3 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c3];
				_node_b4 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_b4];
				_node_m5 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_m5];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
				_edge_m = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge_m];
				_edge__edge1 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge1];
				@_bs = new GRGEN_ACTIONS.Pattern_Bodies.Match_Bodies(that.@_bs, oldToNewMap);
			}

			public Match_pullUpMethod(Match_pullUpMethod that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_pullUpMethod()
			{
			}

			public bool IsEqual(Match_pullUpMethod that)
			{
				if(that==null) return false;
				if(_node_c1 != that._node_c1) return false;
				if(_node_c3 != that._node_c3) return false;
				if(_node_b4 != that._node_b4) return false;
				if(_node_m5 != that._node_m5) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				if(_edge_m != that._edge_m) return false;
				if(_edge__edge1 != that._edge__edge1) return false;
				if(!@_bs.IsEqual(that.@_bs)) return false;
				return true;
			}
		}


		public class Extractor
		{
			public static List<GRGEN_MODEL.IClass> Extract_c1(List<IMatch_pullUpMethod> matchList)
			{
				List<GRGEN_MODEL.IClass> resultList = new List<GRGEN_MODEL.IClass>(matchList.Count);
				foreach(IMatch_pullUpMethod match in matchList)
					resultList.Add(match.node_c1);
				return resultList;
			}
			public static List<GRGEN_MODEL.IClass> Extract_c3(List<IMatch_pullUpMethod> matchList)
			{
				List<GRGEN_MODEL.IClass> resultList = new List<GRGEN_MODEL.IClass>(matchList.Count);
				foreach(IMatch_pullUpMethod match in matchList)
					resultList.Add(match.node_c3);
				return resultList;
			}
			public static List<GRGEN_MODEL.IMethodBody> Extract_b4(List<IMatch_pullUpMethod> matchList)
			{
				List<GRGEN_MODEL.IMethodBody> resultList = new List<GRGEN_MODEL.IMethodBody>(matchList.Count);
				foreach(IMatch_pullUpMethod match in matchList)
					resultList.Add(match.node_b4);
				return resultList;
			}
			public static List<GRGEN_MODEL.IMethodSignature> Extract_m5(List<IMatch_pullUpMethod> matchList)
			{
				List<GRGEN_MODEL.IMethodSignature> resultList = new List<GRGEN_MODEL.IMethodSignature>(matchList.Count);
				foreach(IMatch_pullUpMethod match in matchList)
					resultList.Add(match.node_m5);
				return resultList;
			}
			public static List<GRGEN_MODEL.Icontains> Extract__edge0(List<IMatch_pullUpMethod> matchList)
			{
				List<GRGEN_MODEL.Icontains> resultList = new List<GRGEN_MODEL.Icontains>(matchList.Count);
				foreach(IMatch_pullUpMethod match in matchList)
					resultList.Add(match.edge__edge0);
				return resultList;
			}
			public static List<GRGEN_MODEL.Icontains> Extract_m(List<IMatch_pullUpMethod> matchList)
			{
				List<GRGEN_MODEL.Icontains> resultList = new List<GRGEN_MODEL.Icontains>(matchList.Count);
				foreach(IMatch_pullUpMethod match in matchList)
					resultList.Add(match.edge_m);
				return resultList;
			}
			public static List<GRGEN_MODEL.IbindsTo> Extract__edge1(List<IMatch_pullUpMethod> matchList)
			{
				List<GRGEN_MODEL.IbindsTo> resultList = new List<GRGEN_MODEL.IbindsTo>(matchList.Count);
				foreach(IMatch_pullUpMethod match in matchList)
					resultList.Add(match.edge__edge1);
				return resultList;
			}
		}


		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> ConvertAsNeeded(object parameter)
		{
			if(parameter is List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>)
				return ((List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>)parameter);
			else
				return GRGEN_LIBGR.MatchListHelper.ToList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>((IList<GRGEN_LIBGR.IMatch>)parameter);
		}
	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod instanceBearingAttributeForSearch_pullUpMethod = new GRGEN_ACTIONS.Rule_pullUpMethod.Match_pullUpMethod();
		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> Array_pullUpMethod_groupBy_c1(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list)
		{
			Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>> seenValues = new Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_c1)) {
					seenValues[list[pos].@node_c1].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> tempList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_c1, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> newList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
			foreach(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> Array_pullUpMethod_keepOneForEachBy_c1(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list)
		{
			List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> newList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
			Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_c1)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_c1, null);
				}
			}
			return newList;
		}
		public static int Array_pullUpMethod_indexOfBy_c1(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_indexOfBy_c1(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_lastIndexOfBy_c1(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_lastIndexOfBy_c1(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> Array_pullUpMethod_groupBy_c3(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list)
		{
			Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>> seenValues = new Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_c3)) {
					seenValues[list[pos].@node_c3].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> tempList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_c3, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> newList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
			foreach(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> Array_pullUpMethod_keepOneForEachBy_c3(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list)
		{
			List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> newList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
			Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_c3)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_c3, null);
				}
			}
			return newList;
		}
		public static int Array_pullUpMethod_indexOfBy_c3(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_c3.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_indexOfBy_c3(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_c3.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_lastIndexOfBy_c3(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_c3.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_lastIndexOfBy_c3(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_c3.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> Array_pullUpMethod_groupBy_b4(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list)
		{
			Dictionary<GRGEN_MODEL.IMethodBody, List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>> seenValues = new Dictionary<GRGEN_MODEL.IMethodBody, List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_b4)) {
					seenValues[list[pos].@node_b4].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> tempList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_b4, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> newList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
			foreach(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> Array_pullUpMethod_keepOneForEachBy_b4(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list)
		{
			List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> newList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
			Dictionary<GRGEN_MODEL.IMethodBody, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IMethodBody, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_b4)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_b4, null);
				}
			}
			return newList;
		}
		public static int Array_pullUpMethod_indexOfBy_b4(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IMethodBody entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_b4.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_indexOfBy_b4(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IMethodBody entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_b4.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_lastIndexOfBy_b4(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IMethodBody entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_b4.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_lastIndexOfBy_b4(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IMethodBody entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_b4.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> Array_pullUpMethod_groupBy_m5(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list)
		{
			Dictionary<GRGEN_MODEL.IMethodSignature, List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>> seenValues = new Dictionary<GRGEN_MODEL.IMethodSignature, List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_m5)) {
					seenValues[list[pos].@node_m5].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> tempList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_m5, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> newList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
			foreach(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> Array_pullUpMethod_keepOneForEachBy_m5(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list)
		{
			List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> newList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
			Dictionary<GRGEN_MODEL.IMethodSignature, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IMethodSignature, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_m5)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_m5, null);
				}
			}
			return newList;
		}
		public static int Array_pullUpMethod_indexOfBy_m5(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IMethodSignature entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_m5.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_indexOfBy_m5(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IMethodSignature entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_m5.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_lastIndexOfBy_m5(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IMethodSignature entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_m5.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_lastIndexOfBy_m5(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IMethodSignature entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_m5.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> Array_pullUpMethod_groupBy__edge0(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list)
		{
			Dictionary<GRGEN_MODEL.Icontains, List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>> seenValues = new Dictionary<GRGEN_MODEL.Icontains, List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@edge__edge0)) {
					seenValues[list[pos].@edge__edge0].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> tempList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@edge__edge0, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> newList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
			foreach(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> Array_pullUpMethod_keepOneForEachBy__edge0(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list)
		{
			List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> newList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
			Dictionary<GRGEN_MODEL.Icontains, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.Icontains, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@edge__edge0)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@edge__edge0, null);
				}
			}
			return newList;
		}
		public static int Array_pullUpMethod_indexOfBy__edge0(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.Icontains entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_indexOfBy__edge0(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.Icontains entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_lastIndexOfBy__edge0(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.Icontains entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_lastIndexOfBy__edge0(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.Icontains entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> Array_pullUpMethod_groupBy_m(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list)
		{
			Dictionary<GRGEN_MODEL.Icontains, List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>> seenValues = new Dictionary<GRGEN_MODEL.Icontains, List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@edge_m)) {
					seenValues[list[pos].@edge_m].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> tempList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@edge_m, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> newList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
			foreach(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> Array_pullUpMethod_keepOneForEachBy_m(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list)
		{
			List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> newList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
			Dictionary<GRGEN_MODEL.Icontains, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.Icontains, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@edge_m)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@edge_m, null);
				}
			}
			return newList;
		}
		public static int Array_pullUpMethod_indexOfBy_m(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.Icontains entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@edge_m.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_indexOfBy_m(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.Icontains entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@edge_m.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_lastIndexOfBy_m(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.Icontains entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@edge_m.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_lastIndexOfBy_m(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.Icontains entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@edge_m.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> Array_pullUpMethod_groupBy__edge1(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list)
		{
			Dictionary<GRGEN_MODEL.IbindsTo, List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>> seenValues = new Dictionary<GRGEN_MODEL.IbindsTo, List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@edge__edge1)) {
					seenValues[list[pos].@edge__edge1].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> tempList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@edge__edge1, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> newList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
			foreach(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> Array_pullUpMethod_keepOneForEachBy__edge1(List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list)
		{
			List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> newList = new List<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod>();
			Dictionary<GRGEN_MODEL.IbindsTo, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IbindsTo, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@edge__edge1)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@edge__edge1, null);
				}
			}
			return newList;
		}
		public static int Array_pullUpMethod_indexOfBy__edge1(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IbindsTo entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@edge__edge1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_indexOfBy__edge1(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IbindsTo entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@edge__edge1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_lastIndexOfBy__edge1(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IbindsTo entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@edge__edge1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_pullUpMethod_lastIndexOfBy__edge1(IList<GRGEN_ACTIONS.Rule_pullUpMethod.IMatch_pullUpMethod> list, GRGEN_MODEL.IbindsTo entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@edge__edge1.Equals(entry))
					return i;
			return -1;
		}
	}

	public class Rule_matchAll : GRGEN_LGSP.LGSPRulePattern
	{
		private static Rule_matchAll instance = null;
		public static Rule_matchAll Instance { get { if(instance==null) { instance = new Rule_matchAll(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] matchAll_node_c1_AllowedTypes = null;
		public static bool[] matchAll_node_c1_IsAllowedType = null;
		public enum matchAll_NodeNums { @c1, };
		public enum matchAll_EdgeNums { };
		public enum matchAll_VariableNums { };
		public enum matchAll_SubNums { @_sub0, };
		public enum matchAll_AltNums { };
		public enum matchAll_IterNums { };



		public GRGEN_LGSP.PatternGraph pat_matchAll;


		private Rule_matchAll()
			: base("matchAll",
				new GRGEN_LIBGR.GrGenType[] { GRGEN_MODEL.NodeType_Class.typeVar, },
				new string[] { "matchAll_node_c1", },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new GRGEN_LGSP.LGSPFilter[] {
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				},
				new GRGEN_LIBGR.MatchClassInfo[] { },
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_matchAll+IMatch_matchAll",
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_matchAll+Match_matchAll"
			)
		{
		}
		private void initialize()
		{
			bool[,] matchAll_isNodeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[,] matchAll_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] matchAll_isNodeTotallyHomomorphic = new bool[1] { false,  };
			bool[] matchAll_isEdgeTotallyHomomorphic = new bool[0];
			GRGEN_LGSP.PatternNode matchAll_node_c1 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Class, GRGEN_MODEL.NodeType_Class.typeVar, "GRGEN_MODEL.IClass", "matchAll_node_c1", "c1", matchAll_node_c1_AllowedTypes, matchAll_node_c1_IsAllowedType, 5.5F, 0, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternGraphEmbedding matchAll__sub0 = new GRGEN_LGSP.PatternGraphEmbedding("_sub0", Pattern_Subclass.Instance, 
				new GRGEN_EXPR.Expression[] {
					new GRGEN_EXPR.GraphEntityExpression("matchAll_node_c1"),
				}, 
				new string[] { }, new GRGEN_LGSP.PatternElement[] { }, new GRGEN_LGSP.PatternVariable[] { },
				new string[] { "matchAll_node_c1" }, new string[] {  }, new string[] {  },
				new GRGEN_LGSP.PatternNode[] { matchAll_node_c1 }, new GRGEN_LGSP.PatternEdge[] {  }, new GRGEN_LGSP.PatternVariable[] {  });
			pat_matchAll = new GRGEN_LGSP.PatternGraph(
				"matchAll",
				"",
				null, "matchAll",
				false, false,
				new GRGEN_LGSP.PatternNode[] { matchAll_node_c1 }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] { matchAll__sub0 }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[1, 1] {
					{ true, },
				},
				new bool[0, 0] ,
				matchAll_isNodeHomomorphicGlobal,
				matchAll_isEdgeHomomorphicGlobal,
				matchAll_isNodeTotallyHomomorphic,
				matchAll_isEdgeTotallyHomomorphic
			);

			matchAll_node_c1.pointOfDefinition = null;
			matchAll__sub0.PointOfDefinition = pat_matchAll;

			patternGraph = pat_matchAll;
		}


		public void Modify(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch _curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			Match_matchAll curMatch = (Match_matchAll)_curMatch;
			GRGEN_LGSP.LGSPNode node_c1 = curMatch._node_c1;
			GRGEN_ACTIONS.Pattern_Subclass.Match_Subclass subpattern__sub0 = curMatch.@__sub0;
			actionEnv.SelectedMatchRewritten();
			return;
		}

		static Rule_matchAll() {
		}

		public interface IMatch_matchAll : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IClass node_c1 { get; set; }
			//Edges
			//Variables
			//EmbeddedGraphs
			@GRGEN_ACTIONS.Pattern_Subclass.Match_Subclass @_sub0 { get; }
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_matchAll : GRGEN_LGSP.MatchListElement<Match_matchAll>, IMatch_matchAll
		{
			public GRGEN_MODEL.IClass node_c1 { get { return (GRGEN_MODEL.IClass)_node_c1; } set { _node_c1 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_c1;
			public enum matchAll_NodeNums { @c1, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 1; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)matchAll_NodeNums.@c1: return _node_c1;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "c1": return _node_c1;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "c1": _node_c1 = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public enum matchAll_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum matchAll_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public @GRGEN_ACTIONS.Pattern_Subclass.Match_Subclass @_sub0 { get { return @__sub0; } }
			public @GRGEN_ACTIONS.Pattern_Subclass.Match_Subclass @__sub0;
			public enum matchAll_SubNums { @_sub0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 1; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				case (int)matchAll_SubNums.@_sub0: return __sub0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				case "_sub0": return __sub0;
				default: return null;
				}
			}

			public enum matchAll_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum matchAll_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum matchAll_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Rule_matchAll.instance.pat_matchAll; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_matchAll(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_matchAll(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_matchAll nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_matchAll cur = this;
				while(cur != null) {
					Match_matchAll next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_matchAll that)
			{
				_node_c1 = that._node_c1;
				@__sub0 = that.@__sub0;
			}

			public Match_matchAll(Match_matchAll that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_matchAll that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_c1 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c1];
				@__sub0 = new GRGEN_ACTIONS.Pattern_Subclass.Match_Subclass(that.@__sub0, oldToNewMap);
			}

			public Match_matchAll(Match_matchAll that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_matchAll()
			{
			}

			public bool IsEqual(Match_matchAll that)
			{
				if(that==null) return false;
				if(_node_c1 != that._node_c1) return false;
				if(!@__sub0.IsEqual(that.@__sub0)) return false;
				return true;
			}
		}


		public class Extractor
		{
			public static List<GRGEN_MODEL.IClass> Extract_c1(List<IMatch_matchAll> matchList)
			{
				List<GRGEN_MODEL.IClass> resultList = new List<GRGEN_MODEL.IClass>(matchList.Count);
				foreach(IMatch_matchAll match in matchList)
					resultList.Add(match.node_c1);
				return resultList;
			}
		}


		public static List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll> ConvertAsNeeded(object parameter)
		{
			if(parameter is List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll>)
				return ((List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll>)parameter);
			else
				return GRGEN_LIBGR.MatchListHelper.ToList<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll>((IList<GRGEN_LIBGR.IMatch>)parameter);
		}
	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll instanceBearingAttributeForSearch_matchAll = new GRGEN_ACTIONS.Rule_matchAll.Match_matchAll();
		public static List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll> Array_matchAll_groupBy_c1(List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll> list)
		{
			Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll>> seenValues = new Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_c1)) {
					seenValues[list[pos].@node_c1].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll> tempList = new List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_c1, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll> newList = new List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll>();
			foreach(List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll> Array_matchAll_keepOneForEachBy_c1(List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll> list)
		{
			List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll> newList = new List<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll>();
			Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_c1)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_c1, null);
				}
			}
			return newList;
		}
		public static int Array_matchAll_indexOfBy_c1(IList<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_matchAll_indexOfBy_c1(IList<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_matchAll_lastIndexOfBy_c1(IList<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_matchAll_lastIndexOfBy_c1(IList<GRGEN_ACTIONS.Rule_matchAll.IMatch_matchAll> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
	}

	public class Rule_InsertHelperEdgesForNestedLayout : GRGEN_LGSP.LGSPRulePattern
	{
		private static Rule_InsertHelperEdgesForNestedLayout instance = null;
		public static Rule_InsertHelperEdgesForNestedLayout Instance { get { if(instance==null) { instance = new Rule_InsertHelperEdgesForNestedLayout(); instance.initialize(); } return instance; } }

		public enum InsertHelperEdgesForNestedLayout_NodeNums { };
		public enum InsertHelperEdgesForNestedLayout_EdgeNums { };
		public enum InsertHelperEdgesForNestedLayout_VariableNums { };
		public enum InsertHelperEdgesForNestedLayout_SubNums { };
		public enum InsertHelperEdgesForNestedLayout_AltNums { };
		public enum InsertHelperEdgesForNestedLayout_IterNums { };





		public GRGEN_LGSP.PatternGraph pat_InsertHelperEdgesForNestedLayout;


		private Rule_InsertHelperEdgesForNestedLayout()
			: base("InsertHelperEdgesForNestedLayout",
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new GRGEN_LGSP.LGSPFilter[] {
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				},
				new GRGEN_LIBGR.MatchClassInfo[] { },
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_InsertHelperEdgesForNestedLayout+IMatch_InsertHelperEdgesForNestedLayout",
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_InsertHelperEdgesForNestedLayout+Match_InsertHelperEdgesForNestedLayout"
			)
		{
		}
		private void initialize()
		{
			bool[,] InsertHelperEdgesForNestedLayout_isNodeHomomorphicGlobal = new bool[0, 0];
			bool[,] InsertHelperEdgesForNestedLayout_isEdgeHomomorphicGlobal = new bool[0, 0];
			bool[] InsertHelperEdgesForNestedLayout_isNodeTotallyHomomorphic = new bool[0];
			bool[] InsertHelperEdgesForNestedLayout_isEdgeTotallyHomomorphic = new bool[0];
			pat_InsertHelperEdgesForNestedLayout = new GRGEN_LGSP.PatternGraph(
				"InsertHelperEdgesForNestedLayout",
				"",
				null, "InsertHelperEdgesForNestedLayout",
				false, false,
				new GRGEN_LGSP.PatternNode[] {  }, 
				new GRGEN_LGSP.PatternEdge[] {  }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[0, 0] ,
				new bool[0, 0] ,
				InsertHelperEdgesForNestedLayout_isNodeHomomorphicGlobal,
				InsertHelperEdgesForNestedLayout_isEdgeHomomorphicGlobal,
				InsertHelperEdgesForNestedLayout_isNodeTotallyHomomorphic,
				InsertHelperEdgesForNestedLayout_isEdgeTotallyHomomorphic
			);


			patternGraph = pat_InsertHelperEdgesForNestedLayout;
		}


		public void Modify(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch _curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			Match_InsertHelperEdgesForNestedLayout curMatch = (Match_InsertHelperEdgesForNestedLayout)_curMatch;
			graph.SettingAddedNodeNames( InsertHelperEdgesForNestedLayout_addedNodeNames );
			graph.SettingAddedEdgeNames( InsertHelperEdgesForNestedLayout_addedEdgeNames );
			actionEnv.SelectedMatchRewritten();
			GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv = (GRGEN_LGSP.LGSPGraphProcessingEnvironment)actionEnv;
			ApplyXGRS_InsertHelperEdgesForNestedLayout_0(procEnv);
			return;
		}
		private static string[] InsertHelperEdgesForNestedLayout_addedNodeNames = new string[] {  };
		private static string[] InsertHelperEdgesForNestedLayout_addedEdgeNames = new string[] {  };

        public static bool ApplyXGRS_InsertHelperEdgesForNestedLayout_0(GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv)
        {
            GRGEN_LGSP.LGSPGraph graph = procEnv.graph;
            GRGEN_LGSP.LGSPActions actions = procEnv.curActions;
            procEnv.DebugEntering("InsertHelperEdgesForNestedLayout.exec_0", "LinkMethodBodyToContainedEntity* && LinkMethodBodyToContainedExpressionTransitive* && [RemoveMethodBodyContainsBetweenExpressions] && RetypeClassContainment*");
            bool res_12;
            bool res_8;
            bool res_6;
            bool res_2;
            bool res_0;
            GRGEN_ACTIONS.Action_LinkMethodBodyToContainedEntity rule_LinkMethodBodyToContainedEntity = GRGEN_ACTIONS.Action_LinkMethodBodyToContainedEntity.Instance;
            bool res_5;
            bool res_3;
            GRGEN_ACTIONS.Action_LinkMethodBodyToContainedExpressionTransitive rule_LinkMethodBodyToContainedExpressionTransitive = GRGEN_ACTIONS.Action_LinkMethodBodyToContainedExpressionTransitive.Instance;
            bool res_7;
            GRGEN_ACTIONS.Action_RemoveMethodBodyContainsBetweenExpressions rule_RemoveMethodBodyContainsBetweenExpressions = GRGEN_ACTIONS.Action_RemoveMethodBodyContainsBetweenExpressions.Instance;
            bool res_11;
            bool res_9;
            GRGEN_ACTIONS.Action_RetypeClassContainment rule_RetypeClassContainment = GRGEN_ACTIONS.Action_RetypeClassContainment.Instance;
            int iminl_2 = (int)(0);
            int i_2 = 0;
            while(true)
            {
                GRGEN_LIBGR.PatternMatchingConstruct patternMatchingConstruct_0 = new GRGEN_LIBGR.PatternMatchingConstruct("LinkMethodBodyToContainedEntity", GRGEN_LIBGR.PatternMatchingConstructType.RuleCall);
                procEnv.BeginExecution(patternMatchingConstruct_0);
                GRGEN_LIBGR.IMatchesExact<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> matches_0 = rule_LinkMethodBodyToContainedEntity.Match(procEnv, 1);
                procEnv.PerformanceInfo.MatchesFound += matches_0.Count;
                procEnv.MatchedBeforeFiltering(matches_0);
                if(matches_0.Count == 0) {
                    res_0 = (bool)(false);
                } else {
                    res_0 = (bool)(true);
                    procEnv.MatchedAfterFiltering(matches_0, false);
                    GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity match_0 = matches_0.FirstExact;
                    procEnv.MatchSelected(match_0, false, matches_0);
                    procEnv.RewritingSelectedMatch();
                    rule_LinkMethodBodyToContainedEntity.Modify(procEnv, match_0);
                    procEnv.PerformanceInfo.RewritesPerformed++;
                    procEnv.FinishedSelectedMatch();
                    procEnv.Finished(matches_0, false);
                }
                procEnv.EndExecution(patternMatchingConstruct_0, null);
                if(!res_0)
                    break;
                ++i_2;
            }
            res_2 = (bool)(i_2 >= iminl_2);
            if(!res_2)
                res_6 = (bool)(false);
            else
            {
                int iminl_5 = (int)(0);
                int i_5 = 0;
                while(true)
                {
                    GRGEN_LIBGR.PatternMatchingConstruct patternMatchingConstruct_3 = new GRGEN_LIBGR.PatternMatchingConstruct("LinkMethodBodyToContainedExpressionTransitive", GRGEN_LIBGR.PatternMatchingConstructType.RuleCall);
                    procEnv.BeginExecution(patternMatchingConstruct_3);
                    GRGEN_LIBGR.IMatchesExact<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> matches_3 = rule_LinkMethodBodyToContainedExpressionTransitive.Match(procEnv, 1);
                    procEnv.PerformanceInfo.MatchesFound += matches_3.Count;
                    procEnv.MatchedBeforeFiltering(matches_3);
                    if(matches_3.Count == 0) {
                        res_3 = (bool)(false);
                    } else {
                        res_3 = (bool)(true);
                        procEnv.MatchedAfterFiltering(matches_3, false);
                        GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive match_3 = matches_3.FirstExact;
                        procEnv.MatchSelected(match_3, false, matches_3);
                        procEnv.RewritingSelectedMatch();
                        rule_LinkMethodBodyToContainedExpressionTransitive.Modify(procEnv, match_3);
                        procEnv.PerformanceInfo.RewritesPerformed++;
                        procEnv.FinishedSelectedMatch();
                        procEnv.Finished(matches_3, false);
                    }
                    procEnv.EndExecution(patternMatchingConstruct_3, null);
                    if(!res_3)
                        break;
                    ++i_5;
                }
                res_5 = (bool)(i_5 >= iminl_5);
                res_6 = (bool)(res_5);
            }
            if(!res_6)
                res_8 = (bool)(false);
            else
            {
                GRGEN_LIBGR.PatternMatchingConstruct patternMatchingConstruct_7 = new GRGEN_LIBGR.PatternMatchingConstruct("[RemoveMethodBodyContainsBetweenExpressions]", GRGEN_LIBGR.PatternMatchingConstructType.RuleAllCall);
                procEnv.BeginExecution(patternMatchingConstruct_7);
                GRGEN_LIBGR.IMatchesExact<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> matches_7 = rule_RemoveMethodBodyContainsBetweenExpressions.Match(procEnv, procEnv.MaxMatches);
                procEnv.PerformanceInfo.MatchesFound += matches_7.Count;
                procEnv.MatchedBeforeFiltering(matches_7);
                if(matches_7.Count == 0) {
                    res_7 = (bool)(false);
                } else {
                    res_7 = (bool)(true);
                    procEnv.MatchedAfterFiltering(matches_7, false);
                    IEnumerator<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> enum_7 = matches_7.GetEnumeratorExact();
                    while(enum_7.MoveNext())
                    {
                        GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions match_7 = enum_7.Current;
                        procEnv.MatchSelected(match_7, false, matches_7);
                        procEnv.RewritingSelectedMatch();
                        rule_RemoveMethodBodyContainsBetweenExpressions.Modify(procEnv, match_7);
                        procEnv.PerformanceInfo.RewritesPerformed++;
                        procEnv.FinishedSelectedMatch();
                    }
                    procEnv.Finished(matches_7, false);
                }
                procEnv.EndExecution(patternMatchingConstruct_7, null);
                res_8 = (bool)(res_7);
            }
            if(!res_8)
                res_12 = (bool)(false);
            else
            {
                int iminl_11 = (int)(0);
                int i_11 = 0;
                while(true)
                {
                    GRGEN_LIBGR.PatternMatchingConstruct patternMatchingConstruct_9 = new GRGEN_LIBGR.PatternMatchingConstruct("RetypeClassContainment", GRGEN_LIBGR.PatternMatchingConstructType.RuleCall);
                    procEnv.BeginExecution(patternMatchingConstruct_9);
                    GRGEN_LIBGR.IMatchesExact<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> matches_9 = rule_RetypeClassContainment.Match(procEnv, 1);
                    procEnv.PerformanceInfo.MatchesFound += matches_9.Count;
                    procEnv.MatchedBeforeFiltering(matches_9);
                    if(matches_9.Count == 0) {
                        res_9 = (bool)(false);
                    } else {
                        res_9 = (bool)(true);
                        procEnv.MatchedAfterFiltering(matches_9, false);
                        GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment match_9 = matches_9.FirstExact;
                        procEnv.MatchSelected(match_9, false, matches_9);
                        procEnv.RewritingSelectedMatch();
                        rule_RetypeClassContainment.Modify(procEnv, match_9);
                        procEnv.PerformanceInfo.RewritesPerformed++;
                        procEnv.FinishedSelectedMatch();
                        procEnv.Finished(matches_9, false);
                    }
                    procEnv.EndExecution(patternMatchingConstruct_9, null);
                    if(!res_9)
                        break;
                    ++i_11;
                }
                res_11 = (bool)(i_11 >= iminl_11);
                res_12 = (bool)(res_11);
            }
            procEnv.DebugExiting("InsertHelperEdgesForNestedLayout.exec_0");
            return res_12;
        }

		static Rule_InsertHelperEdgesForNestedLayout() {
		}

		public interface IMatch_InsertHelperEdgesForNestedLayout : GRGEN_LIBGR.IMatch
		{
			//Nodes
			//Edges
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_InsertHelperEdgesForNestedLayout : GRGEN_LGSP.MatchListElement<Match_InsertHelperEdgesForNestedLayout>, IMatch_InsertHelperEdgesForNestedLayout
		{
			public enum InsertHelperEdgesForNestedLayout_NodeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 0; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum InsertHelperEdgesForNestedLayout_EdgeNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 0; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum InsertHelperEdgesForNestedLayout_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum InsertHelperEdgesForNestedLayout_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum InsertHelperEdgesForNestedLayout_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum InsertHelperEdgesForNestedLayout_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum InsertHelperEdgesForNestedLayout_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Rule_InsertHelperEdgesForNestedLayout.instance.pat_InsertHelperEdgesForNestedLayout; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_InsertHelperEdgesForNestedLayout(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_InsertHelperEdgesForNestedLayout(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_InsertHelperEdgesForNestedLayout nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_InsertHelperEdgesForNestedLayout cur = this;
				while(cur != null) {
					Match_InsertHelperEdgesForNestedLayout next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_InsertHelperEdgesForNestedLayout that)
			{
			}

			public Match_InsertHelperEdgesForNestedLayout(Match_InsertHelperEdgesForNestedLayout that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_InsertHelperEdgesForNestedLayout that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
			}

			public Match_InsertHelperEdgesForNestedLayout(Match_InsertHelperEdgesForNestedLayout that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_InsertHelperEdgesForNestedLayout()
			{
			}

			public bool IsEqual(Match_InsertHelperEdgesForNestedLayout that)
			{
				if(that==null) return false;
				return true;
			}
		}


		public class Extractor
		{
		}


		public static List<GRGEN_ACTIONS.Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout> ConvertAsNeeded(object parameter)
		{
			if(parameter is List<GRGEN_ACTIONS.Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout>)
				return ((List<GRGEN_ACTIONS.Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout>)parameter);
			else
				return GRGEN_LIBGR.MatchListHelper.ToList<GRGEN_ACTIONS.Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout>((IList<GRGEN_LIBGR.IMatch>)parameter);
		}
	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout instanceBearingAttributeForSearch_InsertHelperEdgesForNestedLayout = new GRGEN_ACTIONS.Rule_InsertHelperEdgesForNestedLayout.Match_InsertHelperEdgesForNestedLayout();
	}

	public class Rule_LinkMethodBodyToContainedEntity : GRGEN_LGSP.LGSPRulePattern
	{
		private static Rule_LinkMethodBodyToContainedEntity instance = null;
		public static Rule_LinkMethodBodyToContainedEntity Instance { get { if(instance==null) { instance = new Rule_LinkMethodBodyToContainedEntity(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] LinkMethodBodyToContainedEntity_node_mb_AllowedTypes = null;
		public static GRGEN_LIBGR.NodeType[] LinkMethodBodyToContainedEntity_node_e_AllowedTypes = null;
		public static bool[] LinkMethodBodyToContainedEntity_node_mb_IsAllowedType = null;
		public static bool[] LinkMethodBodyToContainedEntity_node_e_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] LinkMethodBodyToContainedEntity_edge__edge0_AllowedTypes = null;
		public static bool[] LinkMethodBodyToContainedEntity_edge__edge0_IsAllowedType = null;
		public enum LinkMethodBodyToContainedEntity_NodeNums { @mb, @e, };
		public enum LinkMethodBodyToContainedEntity_EdgeNums { @_edge0, };
		public enum LinkMethodBodyToContainedEntity_VariableNums { };
		public enum LinkMethodBodyToContainedEntity_SubNums { };
		public enum LinkMethodBodyToContainedEntity_AltNums { };
		public enum LinkMethodBodyToContainedEntity_IterNums { };





		public GRGEN_LGSP.PatternGraph pat_LinkMethodBodyToContainedEntity;

		public static GRGEN_LIBGR.EdgeType[] LinkMethodBodyToContainedEntity_neg_0_edge__edge0_AllowedTypes = null;
		public static bool[] LinkMethodBodyToContainedEntity_neg_0_edge__edge0_IsAllowedType = null;
		public enum LinkMethodBodyToContainedEntity_neg_0_NodeNums { @mb, @e, };
		public enum LinkMethodBodyToContainedEntity_neg_0_EdgeNums { @_edge0, };
		public enum LinkMethodBodyToContainedEntity_neg_0_VariableNums { };
		public enum LinkMethodBodyToContainedEntity_neg_0_SubNums { };
		public enum LinkMethodBodyToContainedEntity_neg_0_AltNums { };
		public enum LinkMethodBodyToContainedEntity_neg_0_IterNums { };


		public GRGEN_LGSP.PatternGraph LinkMethodBodyToContainedEntity_neg_0;


		private Rule_LinkMethodBodyToContainedEntity()
			: base("LinkMethodBodyToContainedEntity",
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new GRGEN_LGSP.LGSPFilter[] {
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				},
				new GRGEN_LIBGR.MatchClassInfo[] { },
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_LinkMethodBodyToContainedEntity+IMatch_LinkMethodBodyToContainedEntity",
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_LinkMethodBodyToContainedEntity+Match_LinkMethodBodyToContainedEntity"
			)
		{
		}
		private void initialize()
		{
			bool[,] LinkMethodBodyToContainedEntity_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] LinkMethodBodyToContainedEntity_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] LinkMethodBodyToContainedEntity_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] LinkMethodBodyToContainedEntity_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternNode LinkMethodBodyToContainedEntity_node_mb = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@MethodBody, GRGEN_MODEL.NodeType_MethodBody.typeVar, "GRGEN_MODEL.IMethodBody", "LinkMethodBodyToContainedEntity_node_mb", "mb", LinkMethodBodyToContainedEntity_node_mb_AllowedTypes, LinkMethodBodyToContainedEntity_node_mb_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternNode LinkMethodBodyToContainedEntity_node_e = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Entity, GRGEN_MODEL.NodeType_Entity.typeVar, "GRGEN_MODEL.IEntity", "LinkMethodBodyToContainedEntity_node_e", "e", LinkMethodBodyToContainedEntity_node_e_AllowedTypes, LinkMethodBodyToContainedEntity_node_e_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge LinkMethodBodyToContainedEntity_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "LinkMethodBodyToContainedEntity_edge__edge0", "_edge0", LinkMethodBodyToContainedEntity_edge__edge0_AllowedTypes, LinkMethodBodyToContainedEntity_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			bool[,] LinkMethodBodyToContainedEntity_neg_0_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] LinkMethodBodyToContainedEntity_neg_0_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] LinkMethodBodyToContainedEntity_neg_0_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] LinkMethodBodyToContainedEntity_neg_0_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternEdge LinkMethodBodyToContainedEntity_neg_0_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@methodBodyContains, GRGEN_MODEL.EdgeType_methodBodyContains.typeVar, "GRGEN_MODEL.ImethodBodyContains", "LinkMethodBodyToContainedEntity_neg_0_edge__edge0", "_edge0", LinkMethodBodyToContainedEntity_neg_0_edge__edge0_AllowedTypes, LinkMethodBodyToContainedEntity_neg_0_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			LinkMethodBodyToContainedEntity_neg_0 = new GRGEN_LGSP.PatternGraph(
				"neg_0",
				"LinkMethodBodyToContainedEntity_",
				null, "neg_0",
				false, false,
				new GRGEN_LGSP.PatternNode[] { LinkMethodBodyToContainedEntity_node_mb, LinkMethodBodyToContainedEntity_node_e }, 
				new GRGEN_LGSP.PatternEdge[] { LinkMethodBodyToContainedEntity_neg_0_edge__edge0 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				LinkMethodBodyToContainedEntity_neg_0_isNodeHomomorphicGlobal,
				LinkMethodBodyToContainedEntity_neg_0_isEdgeHomomorphicGlobal,
				LinkMethodBodyToContainedEntity_neg_0_isNodeTotallyHomomorphic,
				LinkMethodBodyToContainedEntity_neg_0_isEdgeTotallyHomomorphic
			);
			LinkMethodBodyToContainedEntity_neg_0.edgeToSourceNode.Add(LinkMethodBodyToContainedEntity_neg_0_edge__edge0, LinkMethodBodyToContainedEntity_node_mb);
			LinkMethodBodyToContainedEntity_neg_0.edgeToTargetNode.Add(LinkMethodBodyToContainedEntity_neg_0_edge__edge0, LinkMethodBodyToContainedEntity_node_e);

			pat_LinkMethodBodyToContainedEntity = new GRGEN_LGSP.PatternGraph(
				"LinkMethodBodyToContainedEntity",
				"",
				null, "LinkMethodBodyToContainedEntity",
				false, false,
				new GRGEN_LGSP.PatternNode[] { LinkMethodBodyToContainedEntity_node_mb, LinkMethodBodyToContainedEntity_node_e }, 
				new GRGEN_LGSP.PatternEdge[] { LinkMethodBodyToContainedEntity_edge__edge0 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] { LinkMethodBodyToContainedEntity_neg_0,  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				LinkMethodBodyToContainedEntity_isNodeHomomorphicGlobal,
				LinkMethodBodyToContainedEntity_isEdgeHomomorphicGlobal,
				LinkMethodBodyToContainedEntity_isNodeTotallyHomomorphic,
				LinkMethodBodyToContainedEntity_isEdgeTotallyHomomorphic
			);
			pat_LinkMethodBodyToContainedEntity.edgeToSourceNode.Add(LinkMethodBodyToContainedEntity_edge__edge0, LinkMethodBodyToContainedEntity_node_mb);
			pat_LinkMethodBodyToContainedEntity.edgeToTargetNode.Add(LinkMethodBodyToContainedEntity_edge__edge0, LinkMethodBodyToContainedEntity_node_e);
			LinkMethodBodyToContainedEntity_neg_0.embeddingGraph = pat_LinkMethodBodyToContainedEntity;

			LinkMethodBodyToContainedEntity_node_mb.pointOfDefinition = pat_LinkMethodBodyToContainedEntity;
			LinkMethodBodyToContainedEntity_node_e.pointOfDefinition = pat_LinkMethodBodyToContainedEntity;
			LinkMethodBodyToContainedEntity_edge__edge0.pointOfDefinition = pat_LinkMethodBodyToContainedEntity;
			LinkMethodBodyToContainedEntity_neg_0_edge__edge0.pointOfDefinition = LinkMethodBodyToContainedEntity_neg_0;

			patternGraph = pat_LinkMethodBodyToContainedEntity;
		}


		public void Modify(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch _curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			Match_LinkMethodBodyToContainedEntity curMatch = (Match_LinkMethodBodyToContainedEntity)_curMatch;
			GRGEN_LGSP.LGSPNode node_mb = curMatch._node_mb;
			GRGEN_LGSP.LGSPNode node_e = curMatch._node_e;
			graph.SettingAddedNodeNames( LinkMethodBodyToContainedEntity_addedNodeNames );
			graph.SettingAddedEdgeNames( LinkMethodBodyToContainedEntity_addedEdgeNames );
			GRGEN_MODEL.@methodBodyContains edge__edge1 = GRGEN_MODEL.@methodBodyContains.CreateEdge(graph, node_mb, node_e);
			actionEnv.SelectedMatchRewritten();
			return;
		}
		private static string[] LinkMethodBodyToContainedEntity_addedNodeNames = new string[] {  };
		private static string[] LinkMethodBodyToContainedEntity_addedEdgeNames = new string[] { "_edge1" };

		static Rule_LinkMethodBodyToContainedEntity() {
		}

		public interface IMatch_LinkMethodBodyToContainedEntity : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IMethodBody node_mb { get; set; }
			GRGEN_MODEL.IEntity node_e { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge__edge0 { get; set; }
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_LinkMethodBodyToContainedEntity_neg_0 : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IMethodBody node_mb { get; set; }
			GRGEN_MODEL.IEntity node_e { get; set; }
			//Edges
			GRGEN_MODEL.ImethodBodyContains edge__edge0 { get; set; }
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_LinkMethodBodyToContainedEntity : GRGEN_LGSP.MatchListElement<Match_LinkMethodBodyToContainedEntity>, IMatch_LinkMethodBodyToContainedEntity
		{
			public GRGEN_MODEL.IMethodBody node_mb { get { return (GRGEN_MODEL.IMethodBody)_node_mb; } set { _node_mb = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IEntity node_e { get { return (GRGEN_MODEL.IEntity)_node_e; } set { _node_e = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_mb;
			public GRGEN_LGSP.LGSPNode _node_e;
			public enum LinkMethodBodyToContainedEntity_NodeNums { @mb, @e, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)LinkMethodBodyToContainedEntity_NodeNums.@mb: return _node_mb;
				case (int)LinkMethodBodyToContainedEntity_NodeNums.@e: return _node_e;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "mb": return _node_mb;
				case "e": return _node_e;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "mb": _node_mb = (GRGEN_LGSP.LGSPNode)value; break;
				case "e": _node_e = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge__edge0 { get { return (GRGEN_MODEL.Icontains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public enum LinkMethodBodyToContainedEntity_EdgeNums { @_edge0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)LinkMethodBodyToContainedEntity_EdgeNums.@_edge0: return _edge__edge0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum LinkMethodBodyToContainedEntity_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum LinkMethodBodyToContainedEntity_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum LinkMethodBodyToContainedEntity_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum LinkMethodBodyToContainedEntity_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum LinkMethodBodyToContainedEntity_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Rule_LinkMethodBodyToContainedEntity.instance.pat_LinkMethodBodyToContainedEntity; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_LinkMethodBodyToContainedEntity(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_LinkMethodBodyToContainedEntity(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_LinkMethodBodyToContainedEntity nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_LinkMethodBodyToContainedEntity cur = this;
				while(cur != null) {
					Match_LinkMethodBodyToContainedEntity next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_LinkMethodBodyToContainedEntity that)
			{
				_node_mb = that._node_mb;
				_node_e = that._node_e;
				_edge__edge0 = that._edge__edge0;
			}

			public Match_LinkMethodBodyToContainedEntity(Match_LinkMethodBodyToContainedEntity that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_LinkMethodBodyToContainedEntity that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_mb = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_mb];
				_node_e = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_e];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
			}

			public Match_LinkMethodBodyToContainedEntity(Match_LinkMethodBodyToContainedEntity that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_LinkMethodBodyToContainedEntity()
			{
			}

			public bool IsEqual(Match_LinkMethodBodyToContainedEntity that)
			{
				if(that==null) return false;
				if(_node_mb != that._node_mb) return false;
				if(_node_e != that._node_e) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				return true;
			}
		}

		public class Match_LinkMethodBodyToContainedEntity_neg_0 : GRGEN_LGSP.MatchListElement<Match_LinkMethodBodyToContainedEntity_neg_0>, IMatch_LinkMethodBodyToContainedEntity_neg_0
		{
			public GRGEN_MODEL.IMethodBody node_mb { get { return (GRGEN_MODEL.IMethodBody)_node_mb; } set { _node_mb = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IEntity node_e { get { return (GRGEN_MODEL.IEntity)_node_e; } set { _node_e = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_mb;
			public GRGEN_LGSP.LGSPNode _node_e;
			public enum LinkMethodBodyToContainedEntity_neg_0_NodeNums { @mb, @e, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)LinkMethodBodyToContainedEntity_neg_0_NodeNums.@mb: return _node_mb;
				case (int)LinkMethodBodyToContainedEntity_neg_0_NodeNums.@e: return _node_e;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "mb": return _node_mb;
				case "e": return _node_e;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "mb": _node_mb = (GRGEN_LGSP.LGSPNode)value; break;
				case "e": _node_e = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.ImethodBodyContains edge__edge0 { get { return (GRGEN_MODEL.ImethodBodyContains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public enum LinkMethodBodyToContainedEntity_neg_0_EdgeNums { @_edge0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)LinkMethodBodyToContainedEntity_neg_0_EdgeNums.@_edge0: return _edge__edge0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum LinkMethodBodyToContainedEntity_neg_0_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum LinkMethodBodyToContainedEntity_neg_0_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum LinkMethodBodyToContainedEntity_neg_0_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum LinkMethodBodyToContainedEntity_neg_0_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum LinkMethodBodyToContainedEntity_neg_0_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Rule_LinkMethodBodyToContainedEntity.instance.LinkMethodBodyToContainedEntity_neg_0; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_LinkMethodBodyToContainedEntity_neg_0(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_LinkMethodBodyToContainedEntity_neg_0(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_LinkMethodBodyToContainedEntity_neg_0 nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_LinkMethodBodyToContainedEntity_neg_0 cur = this;
				while(cur != null) {
					Match_LinkMethodBodyToContainedEntity_neg_0 next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_LinkMethodBodyToContainedEntity_neg_0 that)
			{
				_node_mb = that._node_mb;
				_node_e = that._node_e;
				_edge__edge0 = that._edge__edge0;
			}

			public Match_LinkMethodBodyToContainedEntity_neg_0(Match_LinkMethodBodyToContainedEntity_neg_0 that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_LinkMethodBodyToContainedEntity_neg_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_mb = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_mb];
				_node_e = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_e];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
			}

			public Match_LinkMethodBodyToContainedEntity_neg_0(Match_LinkMethodBodyToContainedEntity_neg_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_LinkMethodBodyToContainedEntity_neg_0()
			{
			}

			public bool IsEqual(Match_LinkMethodBodyToContainedEntity_neg_0 that)
			{
				if(that==null) return false;
				if(_node_mb != that._node_mb) return false;
				if(_node_e != that._node_e) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				return true;
			}
		}


		public class Extractor
		{
			public static List<GRGEN_MODEL.IMethodBody> Extract_mb(List<IMatch_LinkMethodBodyToContainedEntity> matchList)
			{
				List<GRGEN_MODEL.IMethodBody> resultList = new List<GRGEN_MODEL.IMethodBody>(matchList.Count);
				foreach(IMatch_LinkMethodBodyToContainedEntity match in matchList)
					resultList.Add(match.node_mb);
				return resultList;
			}
			public static List<GRGEN_MODEL.IEntity> Extract_e(List<IMatch_LinkMethodBodyToContainedEntity> matchList)
			{
				List<GRGEN_MODEL.IEntity> resultList = new List<GRGEN_MODEL.IEntity>(matchList.Count);
				foreach(IMatch_LinkMethodBodyToContainedEntity match in matchList)
					resultList.Add(match.node_e);
				return resultList;
			}
			public static List<GRGEN_MODEL.Icontains> Extract__edge0(List<IMatch_LinkMethodBodyToContainedEntity> matchList)
			{
				List<GRGEN_MODEL.Icontains> resultList = new List<GRGEN_MODEL.Icontains>(matchList.Count);
				foreach(IMatch_LinkMethodBodyToContainedEntity match in matchList)
					resultList.Add(match.edge__edge0);
				return resultList;
			}
		}


		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> ConvertAsNeeded(object parameter)
		{
			if(parameter is List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>)
				return ((List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>)parameter);
			else
				return GRGEN_LIBGR.MatchListHelper.ToList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>((IList<GRGEN_LIBGR.IMatch>)parameter);
		}
	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity instanceBearingAttributeForSearch_LinkMethodBodyToContainedEntity = new GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.Match_LinkMethodBodyToContainedEntity();
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> Array_LinkMethodBodyToContainedEntity_groupBy_mb(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list)
		{
			Dictionary<GRGEN_MODEL.IMethodBody, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>> seenValues = new Dictionary<GRGEN_MODEL.IMethodBody, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_mb)) {
					seenValues[list[pos].@node_mb].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> tempList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_mb, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>();
			foreach(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> Array_LinkMethodBodyToContainedEntity_keepOneForEachBy_mb(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list)
		{
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>();
			Dictionary<GRGEN_MODEL.IMethodBody, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IMethodBody, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_mb)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_mb, null);
				}
			}
			return newList;
		}
		public static int Array_LinkMethodBodyToContainedEntity_indexOfBy_mb(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list, GRGEN_MODEL.IMethodBody entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_mb.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedEntity_indexOfBy_mb(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list, GRGEN_MODEL.IMethodBody entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_mb.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedEntity_lastIndexOfBy_mb(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list, GRGEN_MODEL.IMethodBody entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_mb.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedEntity_lastIndexOfBy_mb(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list, GRGEN_MODEL.IMethodBody entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_mb.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> Array_LinkMethodBodyToContainedEntity_groupBy_e(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list)
		{
			Dictionary<GRGEN_MODEL.IEntity, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>> seenValues = new Dictionary<GRGEN_MODEL.IEntity, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_e)) {
					seenValues[list[pos].@node_e].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> tempList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_e, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>();
			foreach(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> Array_LinkMethodBodyToContainedEntity_keepOneForEachBy_e(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list)
		{
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>();
			Dictionary<GRGEN_MODEL.IEntity, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IEntity, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_e)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_e, null);
				}
			}
			return newList;
		}
		public static int Array_LinkMethodBodyToContainedEntity_indexOfBy_e(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list, GRGEN_MODEL.IEntity entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_e.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedEntity_indexOfBy_e(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list, GRGEN_MODEL.IEntity entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_e.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedEntity_lastIndexOfBy_e(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list, GRGEN_MODEL.IEntity entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_e.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedEntity_lastIndexOfBy_e(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list, GRGEN_MODEL.IEntity entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_e.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> Array_LinkMethodBodyToContainedEntity_groupBy__edge0(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list)
		{
			Dictionary<GRGEN_MODEL.Icontains, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>> seenValues = new Dictionary<GRGEN_MODEL.Icontains, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@edge__edge0)) {
					seenValues[list[pos].@edge__edge0].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> tempList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@edge__edge0, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>();
			foreach(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> Array_LinkMethodBodyToContainedEntity_keepOneForEachBy__edge0(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list)
		{
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>();
			Dictionary<GRGEN_MODEL.Icontains, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.Icontains, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@edge__edge0)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@edge__edge0, null);
				}
			}
			return newList;
		}
		public static int Array_LinkMethodBodyToContainedEntity_indexOfBy__edge0(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list, GRGEN_MODEL.Icontains entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedEntity_indexOfBy__edge0(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list, GRGEN_MODEL.Icontains entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedEntity_lastIndexOfBy__edge0(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list, GRGEN_MODEL.Icontains entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedEntity_lastIndexOfBy__edge0(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> list, GRGEN_MODEL.Icontains entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
	}

	public class Rule_LinkMethodBodyToContainedExpressionTransitive : GRGEN_LGSP.LGSPRulePattern
	{
		private static Rule_LinkMethodBodyToContainedExpressionTransitive instance = null;
		public static Rule_LinkMethodBodyToContainedExpressionTransitive Instance { get { if(instance==null) { instance = new Rule_LinkMethodBodyToContainedExpressionTransitive(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] LinkMethodBodyToContainedExpressionTransitive_node_mb_AllowedTypes = null;
		public static GRGEN_LIBGR.NodeType[] LinkMethodBodyToContainedExpressionTransitive_node_e1_AllowedTypes = null;
		public static GRGEN_LIBGR.NodeType[] LinkMethodBodyToContainedExpressionTransitive_node_e2_AllowedTypes = null;
		public static bool[] LinkMethodBodyToContainedExpressionTransitive_node_mb_IsAllowedType = null;
		public static bool[] LinkMethodBodyToContainedExpressionTransitive_node_e1_IsAllowedType = null;
		public static bool[] LinkMethodBodyToContainedExpressionTransitive_node_e2_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] LinkMethodBodyToContainedExpressionTransitive_edge__edge0_AllowedTypes = null;
		public static GRGEN_LIBGR.EdgeType[] LinkMethodBodyToContainedExpressionTransitive_edge__edge1_AllowedTypes = null;
		public static bool[] LinkMethodBodyToContainedExpressionTransitive_edge__edge0_IsAllowedType = null;
		public static bool[] LinkMethodBodyToContainedExpressionTransitive_edge__edge1_IsAllowedType = null;
		public enum LinkMethodBodyToContainedExpressionTransitive_NodeNums { @mb, @e1, @e2, };
		public enum LinkMethodBodyToContainedExpressionTransitive_EdgeNums { @_edge0, @_edge1, };
		public enum LinkMethodBodyToContainedExpressionTransitive_VariableNums { };
		public enum LinkMethodBodyToContainedExpressionTransitive_SubNums { };
		public enum LinkMethodBodyToContainedExpressionTransitive_AltNums { };
		public enum LinkMethodBodyToContainedExpressionTransitive_IterNums { };





		public GRGEN_LGSP.PatternGraph pat_LinkMethodBodyToContainedExpressionTransitive;

		public static GRGEN_LIBGR.EdgeType[] LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0_AllowedTypes = null;
		public static bool[] LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0_IsAllowedType = null;
		public enum LinkMethodBodyToContainedExpressionTransitive_neg_0_NodeNums { @e1, @e2, };
		public enum LinkMethodBodyToContainedExpressionTransitive_neg_0_EdgeNums { @_edge0, };
		public enum LinkMethodBodyToContainedExpressionTransitive_neg_0_VariableNums { };
		public enum LinkMethodBodyToContainedExpressionTransitive_neg_0_SubNums { };
		public enum LinkMethodBodyToContainedExpressionTransitive_neg_0_AltNums { };
		public enum LinkMethodBodyToContainedExpressionTransitive_neg_0_IterNums { };


		public GRGEN_LGSP.PatternGraph LinkMethodBodyToContainedExpressionTransitive_neg_0;


		private Rule_LinkMethodBodyToContainedExpressionTransitive()
			: base("LinkMethodBodyToContainedExpressionTransitive",
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new GRGEN_LGSP.LGSPFilter[] {
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				},
				new GRGEN_LIBGR.MatchClassInfo[] { },
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_LinkMethodBodyToContainedExpressionTransitive+IMatch_LinkMethodBodyToContainedExpressionTransitive",
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_LinkMethodBodyToContainedExpressionTransitive+Match_LinkMethodBodyToContainedExpressionTransitive"
			)
		{
		}
		private void initialize()
		{
			bool[,] LinkMethodBodyToContainedExpressionTransitive_isNodeHomomorphicGlobal = new bool[3, 3] {
				{ false, false, false, },
				{ false, false, false, },
				{ false, false, false, },
			};
			bool[,] LinkMethodBodyToContainedExpressionTransitive_isEdgeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[] LinkMethodBodyToContainedExpressionTransitive_isNodeTotallyHomomorphic = new bool[3] { false, false, false,  };
			bool[] LinkMethodBodyToContainedExpressionTransitive_isEdgeTotallyHomomorphic = new bool[2] { false, false,  };
			GRGEN_LGSP.PatternNode LinkMethodBodyToContainedExpressionTransitive_node_mb = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@MethodBody, GRGEN_MODEL.NodeType_MethodBody.typeVar, "GRGEN_MODEL.IMethodBody", "LinkMethodBodyToContainedExpressionTransitive_node_mb", "mb", LinkMethodBodyToContainedExpressionTransitive_node_mb_AllowedTypes, LinkMethodBodyToContainedExpressionTransitive_node_mb_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternNode LinkMethodBodyToContainedExpressionTransitive_node_e1 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Expression, GRGEN_MODEL.NodeType_Expression.typeVar, "GRGEN_MODEL.IExpression", "LinkMethodBodyToContainedExpressionTransitive_node_e1", "e1", LinkMethodBodyToContainedExpressionTransitive_node_e1_AllowedTypes, LinkMethodBodyToContainedExpressionTransitive_node_e1_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternNode LinkMethodBodyToContainedExpressionTransitive_node_e2 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Expression, GRGEN_MODEL.NodeType_Expression.typeVar, "GRGEN_MODEL.IExpression", "LinkMethodBodyToContainedExpressionTransitive_node_e2", "e2", LinkMethodBodyToContainedExpressionTransitive_node_e2_AllowedTypes, LinkMethodBodyToContainedExpressionTransitive_node_e2_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge LinkMethodBodyToContainedExpressionTransitive_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@methodBodyContains, GRGEN_MODEL.EdgeType_methodBodyContains.typeVar, "GRGEN_MODEL.ImethodBodyContains", "LinkMethodBodyToContainedExpressionTransitive_edge__edge0", "_edge0", LinkMethodBodyToContainedExpressionTransitive_edge__edge0_AllowedTypes, LinkMethodBodyToContainedExpressionTransitive_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge LinkMethodBodyToContainedExpressionTransitive_edge__edge1 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "LinkMethodBodyToContainedExpressionTransitive_edge__edge1", "_edge1", LinkMethodBodyToContainedExpressionTransitive_edge__edge1_AllowedTypes, LinkMethodBodyToContainedExpressionTransitive_edge__edge1_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			bool[,] LinkMethodBodyToContainedExpressionTransitive_neg_0_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] LinkMethodBodyToContainedExpressionTransitive_neg_0_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] LinkMethodBodyToContainedExpressionTransitive_neg_0_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] LinkMethodBodyToContainedExpressionTransitive_neg_0_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternEdge LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0 = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@methodBodyContains, GRGEN_MODEL.EdgeType_methodBodyContains.typeVar, "GRGEN_MODEL.ImethodBodyContains", "LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0", "_edge0", LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0_AllowedTypes, LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			LinkMethodBodyToContainedExpressionTransitive_neg_0 = new GRGEN_LGSP.PatternGraph(
				"neg_0",
				"LinkMethodBodyToContainedExpressionTransitive_",
				null, "neg_0",
				false, false,
				new GRGEN_LGSP.PatternNode[] { LinkMethodBodyToContainedExpressionTransitive_node_e1, LinkMethodBodyToContainedExpressionTransitive_node_e2 }, 
				new GRGEN_LGSP.PatternEdge[] { LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				LinkMethodBodyToContainedExpressionTransitive_neg_0_isNodeHomomorphicGlobal,
				LinkMethodBodyToContainedExpressionTransitive_neg_0_isEdgeHomomorphicGlobal,
				LinkMethodBodyToContainedExpressionTransitive_neg_0_isNodeTotallyHomomorphic,
				LinkMethodBodyToContainedExpressionTransitive_neg_0_isEdgeTotallyHomomorphic
			);
			LinkMethodBodyToContainedExpressionTransitive_neg_0.edgeToSourceNode.Add(LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0, LinkMethodBodyToContainedExpressionTransitive_node_e1);
			LinkMethodBodyToContainedExpressionTransitive_neg_0.edgeToTargetNode.Add(LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0, LinkMethodBodyToContainedExpressionTransitive_node_e2);

			pat_LinkMethodBodyToContainedExpressionTransitive = new GRGEN_LGSP.PatternGraph(
				"LinkMethodBodyToContainedExpressionTransitive",
				"",
				null, "LinkMethodBodyToContainedExpressionTransitive",
				false, false,
				new GRGEN_LGSP.PatternNode[] { LinkMethodBodyToContainedExpressionTransitive_node_mb, LinkMethodBodyToContainedExpressionTransitive_node_e1, LinkMethodBodyToContainedExpressionTransitive_node_e2 }, 
				new GRGEN_LGSP.PatternEdge[] { LinkMethodBodyToContainedExpressionTransitive_edge__edge0, LinkMethodBodyToContainedExpressionTransitive_edge__edge1 }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] { LinkMethodBodyToContainedExpressionTransitive_neg_0,  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[3, 3] {
					{ true, false, false, },
					{ false, true, false, },
					{ false, false, true, },
				},
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				LinkMethodBodyToContainedExpressionTransitive_isNodeHomomorphicGlobal,
				LinkMethodBodyToContainedExpressionTransitive_isEdgeHomomorphicGlobal,
				LinkMethodBodyToContainedExpressionTransitive_isNodeTotallyHomomorphic,
				LinkMethodBodyToContainedExpressionTransitive_isEdgeTotallyHomomorphic
			);
			pat_LinkMethodBodyToContainedExpressionTransitive.edgeToSourceNode.Add(LinkMethodBodyToContainedExpressionTransitive_edge__edge0, LinkMethodBodyToContainedExpressionTransitive_node_mb);
			pat_LinkMethodBodyToContainedExpressionTransitive.edgeToTargetNode.Add(LinkMethodBodyToContainedExpressionTransitive_edge__edge0, LinkMethodBodyToContainedExpressionTransitive_node_e1);
			pat_LinkMethodBodyToContainedExpressionTransitive.edgeToSourceNode.Add(LinkMethodBodyToContainedExpressionTransitive_edge__edge1, LinkMethodBodyToContainedExpressionTransitive_node_e1);
			pat_LinkMethodBodyToContainedExpressionTransitive.edgeToTargetNode.Add(LinkMethodBodyToContainedExpressionTransitive_edge__edge1, LinkMethodBodyToContainedExpressionTransitive_node_e2);
			LinkMethodBodyToContainedExpressionTransitive_neg_0.embeddingGraph = pat_LinkMethodBodyToContainedExpressionTransitive;

			LinkMethodBodyToContainedExpressionTransitive_node_mb.pointOfDefinition = pat_LinkMethodBodyToContainedExpressionTransitive;
			LinkMethodBodyToContainedExpressionTransitive_node_e1.pointOfDefinition = pat_LinkMethodBodyToContainedExpressionTransitive;
			LinkMethodBodyToContainedExpressionTransitive_node_e2.pointOfDefinition = pat_LinkMethodBodyToContainedExpressionTransitive;
			LinkMethodBodyToContainedExpressionTransitive_edge__edge0.pointOfDefinition = pat_LinkMethodBodyToContainedExpressionTransitive;
			LinkMethodBodyToContainedExpressionTransitive_edge__edge1.pointOfDefinition = pat_LinkMethodBodyToContainedExpressionTransitive;
			LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0.pointOfDefinition = LinkMethodBodyToContainedExpressionTransitive_neg_0;

			patternGraph = pat_LinkMethodBodyToContainedExpressionTransitive;
		}


		public void Modify(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch _curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			Match_LinkMethodBodyToContainedExpressionTransitive curMatch = (Match_LinkMethodBodyToContainedExpressionTransitive)_curMatch;
			GRGEN_LGSP.LGSPNode node_e1 = curMatch._node_e1;
			GRGEN_LGSP.LGSPNode node_e2 = curMatch._node_e2;
			GRGEN_LGSP.LGSPNode node_mb = curMatch._node_mb;
			graph.SettingAddedNodeNames( LinkMethodBodyToContainedExpressionTransitive_addedNodeNames );
			graph.SettingAddedEdgeNames( LinkMethodBodyToContainedExpressionTransitive_addedEdgeNames );
			GRGEN_MODEL.@methodBodyContains edge__edge2 = GRGEN_MODEL.@methodBodyContains.CreateEdge(graph, node_e1, node_e2);
			GRGEN_MODEL.@methodBodyContains edge__edge3 = GRGEN_MODEL.@methodBodyContains.CreateEdge(graph, node_mb, node_e2);
			actionEnv.SelectedMatchRewritten();
			return;
		}
		private static string[] LinkMethodBodyToContainedExpressionTransitive_addedNodeNames = new string[] {  };
		private static string[] LinkMethodBodyToContainedExpressionTransitive_addedEdgeNames = new string[] { "_edge2", "_edge3" };

		static Rule_LinkMethodBodyToContainedExpressionTransitive() {
		}

		public interface IMatch_LinkMethodBodyToContainedExpressionTransitive : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IMethodBody node_mb { get; set; }
			GRGEN_MODEL.IExpression node_e1 { get; set; }
			GRGEN_MODEL.IExpression node_e2 { get; set; }
			//Edges
			GRGEN_MODEL.ImethodBodyContains edge__edge0 { get; set; }
			GRGEN_MODEL.Icontains edge__edge1 { get; set; }
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public interface IMatch_LinkMethodBodyToContainedExpressionTransitive_neg_0 : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IExpression node_e1 { get; set; }
			GRGEN_MODEL.IExpression node_e2 { get; set; }
			//Edges
			GRGEN_MODEL.ImethodBodyContains edge__edge0 { get; set; }
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_LinkMethodBodyToContainedExpressionTransitive : GRGEN_LGSP.MatchListElement<Match_LinkMethodBodyToContainedExpressionTransitive>, IMatch_LinkMethodBodyToContainedExpressionTransitive
		{
			public GRGEN_MODEL.IMethodBody node_mb { get { return (GRGEN_MODEL.IMethodBody)_node_mb; } set { _node_mb = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IExpression node_e1 { get { return (GRGEN_MODEL.IExpression)_node_e1; } set { _node_e1 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IExpression node_e2 { get { return (GRGEN_MODEL.IExpression)_node_e2; } set { _node_e2 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_mb;
			public GRGEN_LGSP.LGSPNode _node_e1;
			public GRGEN_LGSP.LGSPNode _node_e2;
			public enum LinkMethodBodyToContainedExpressionTransitive_NodeNums { @mb, @e1, @e2, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 3; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)LinkMethodBodyToContainedExpressionTransitive_NodeNums.@mb: return _node_mb;
				case (int)LinkMethodBodyToContainedExpressionTransitive_NodeNums.@e1: return _node_e1;
				case (int)LinkMethodBodyToContainedExpressionTransitive_NodeNums.@e2: return _node_e2;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "mb": return _node_mb;
				case "e1": return _node_e1;
				case "e2": return _node_e2;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "mb": _node_mb = (GRGEN_LGSP.LGSPNode)value; break;
				case "e1": _node_e1 = (GRGEN_LGSP.LGSPNode)value; break;
				case "e2": _node_e2 = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.ImethodBodyContains edge__edge0 { get { return (GRGEN_MODEL.ImethodBodyContains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_MODEL.Icontains edge__edge1 { get { return (GRGEN_MODEL.Icontains)_edge__edge1; } set { _edge__edge1 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public GRGEN_LGSP.LGSPEdge _edge__edge1;
			public enum LinkMethodBodyToContainedExpressionTransitive_EdgeNums { @_edge0, @_edge1, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 2; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)LinkMethodBodyToContainedExpressionTransitive_EdgeNums.@_edge0: return _edge__edge0;
				case (int)LinkMethodBodyToContainedExpressionTransitive_EdgeNums.@_edge1: return _edge__edge1;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				case "_edge1": return _edge__edge1;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				case "_edge1": _edge__edge1 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum LinkMethodBodyToContainedExpressionTransitive_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum LinkMethodBodyToContainedExpressionTransitive_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum LinkMethodBodyToContainedExpressionTransitive_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum LinkMethodBodyToContainedExpressionTransitive_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum LinkMethodBodyToContainedExpressionTransitive_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Rule_LinkMethodBodyToContainedExpressionTransitive.instance.pat_LinkMethodBodyToContainedExpressionTransitive; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_LinkMethodBodyToContainedExpressionTransitive(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_LinkMethodBodyToContainedExpressionTransitive(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_LinkMethodBodyToContainedExpressionTransitive nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_LinkMethodBodyToContainedExpressionTransitive cur = this;
				while(cur != null) {
					Match_LinkMethodBodyToContainedExpressionTransitive next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_LinkMethodBodyToContainedExpressionTransitive that)
			{
				_node_mb = that._node_mb;
				_node_e1 = that._node_e1;
				_node_e2 = that._node_e2;
				_edge__edge0 = that._edge__edge0;
				_edge__edge1 = that._edge__edge1;
			}

			public Match_LinkMethodBodyToContainedExpressionTransitive(Match_LinkMethodBodyToContainedExpressionTransitive that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_LinkMethodBodyToContainedExpressionTransitive that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_mb = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_mb];
				_node_e1 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_e1];
				_node_e2 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_e2];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
				_edge__edge1 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge1];
			}

			public Match_LinkMethodBodyToContainedExpressionTransitive(Match_LinkMethodBodyToContainedExpressionTransitive that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_LinkMethodBodyToContainedExpressionTransitive()
			{
			}

			public bool IsEqual(Match_LinkMethodBodyToContainedExpressionTransitive that)
			{
				if(that==null) return false;
				if(_node_mb != that._node_mb) return false;
				if(_node_e1 != that._node_e1) return false;
				if(_node_e2 != that._node_e2) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				if(_edge__edge1 != that._edge__edge1) return false;
				return true;
			}
		}

		public class Match_LinkMethodBodyToContainedExpressionTransitive_neg_0 : GRGEN_LGSP.MatchListElement<Match_LinkMethodBodyToContainedExpressionTransitive_neg_0>, IMatch_LinkMethodBodyToContainedExpressionTransitive_neg_0
		{
			public GRGEN_MODEL.IExpression node_e1 { get { return (GRGEN_MODEL.IExpression)_node_e1; } set { _node_e1 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IExpression node_e2 { get { return (GRGEN_MODEL.IExpression)_node_e2; } set { _node_e2 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_e1;
			public GRGEN_LGSP.LGSPNode _node_e2;
			public enum LinkMethodBodyToContainedExpressionTransitive_neg_0_NodeNums { @e1, @e2, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)LinkMethodBodyToContainedExpressionTransitive_neg_0_NodeNums.@e1: return _node_e1;
				case (int)LinkMethodBodyToContainedExpressionTransitive_neg_0_NodeNums.@e2: return _node_e2;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "e1": return _node_e1;
				case "e2": return _node_e2;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "e1": _node_e1 = (GRGEN_LGSP.LGSPNode)value; break;
				case "e2": _node_e2 = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.ImethodBodyContains edge__edge0 { get { return (GRGEN_MODEL.ImethodBodyContains)_edge__edge0; } set { _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge__edge0;
			public enum LinkMethodBodyToContainedExpressionTransitive_neg_0_EdgeNums { @_edge0, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)LinkMethodBodyToContainedExpressionTransitive_neg_0_EdgeNums.@_edge0: return _edge__edge0;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "_edge0": return _edge__edge0;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "_edge0": _edge__edge0 = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum LinkMethodBodyToContainedExpressionTransitive_neg_0_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum LinkMethodBodyToContainedExpressionTransitive_neg_0_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum LinkMethodBodyToContainedExpressionTransitive_neg_0_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum LinkMethodBodyToContainedExpressionTransitive_neg_0_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum LinkMethodBodyToContainedExpressionTransitive_neg_0_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Rule_LinkMethodBodyToContainedExpressionTransitive.instance.LinkMethodBodyToContainedExpressionTransitive_neg_0; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_LinkMethodBodyToContainedExpressionTransitive_neg_0(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_LinkMethodBodyToContainedExpressionTransitive_neg_0(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_LinkMethodBodyToContainedExpressionTransitive_neg_0 nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_LinkMethodBodyToContainedExpressionTransitive_neg_0 cur = this;
				while(cur != null) {
					Match_LinkMethodBodyToContainedExpressionTransitive_neg_0 next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_LinkMethodBodyToContainedExpressionTransitive_neg_0 that)
			{
				_node_e1 = that._node_e1;
				_node_e2 = that._node_e2;
				_edge__edge0 = that._edge__edge0;
			}

			public Match_LinkMethodBodyToContainedExpressionTransitive_neg_0(Match_LinkMethodBodyToContainedExpressionTransitive_neg_0 that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_LinkMethodBodyToContainedExpressionTransitive_neg_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_e1 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_e1];
				_node_e2 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_e2];
				_edge__edge0 = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge__edge0];
			}

			public Match_LinkMethodBodyToContainedExpressionTransitive_neg_0(Match_LinkMethodBodyToContainedExpressionTransitive_neg_0 that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_LinkMethodBodyToContainedExpressionTransitive_neg_0()
			{
			}

			public bool IsEqual(Match_LinkMethodBodyToContainedExpressionTransitive_neg_0 that)
			{
				if(that==null) return false;
				if(_node_e1 != that._node_e1) return false;
				if(_node_e2 != that._node_e2) return false;
				if(_edge__edge0 != that._edge__edge0) return false;
				return true;
			}
		}


		public class Extractor
		{
			public static List<GRGEN_MODEL.IMethodBody> Extract_mb(List<IMatch_LinkMethodBodyToContainedExpressionTransitive> matchList)
			{
				List<GRGEN_MODEL.IMethodBody> resultList = new List<GRGEN_MODEL.IMethodBody>(matchList.Count);
				foreach(IMatch_LinkMethodBodyToContainedExpressionTransitive match in matchList)
					resultList.Add(match.node_mb);
				return resultList;
			}
			public static List<GRGEN_MODEL.IExpression> Extract_e1(List<IMatch_LinkMethodBodyToContainedExpressionTransitive> matchList)
			{
				List<GRGEN_MODEL.IExpression> resultList = new List<GRGEN_MODEL.IExpression>(matchList.Count);
				foreach(IMatch_LinkMethodBodyToContainedExpressionTransitive match in matchList)
					resultList.Add(match.node_e1);
				return resultList;
			}
			public static List<GRGEN_MODEL.IExpression> Extract_e2(List<IMatch_LinkMethodBodyToContainedExpressionTransitive> matchList)
			{
				List<GRGEN_MODEL.IExpression> resultList = new List<GRGEN_MODEL.IExpression>(matchList.Count);
				foreach(IMatch_LinkMethodBodyToContainedExpressionTransitive match in matchList)
					resultList.Add(match.node_e2);
				return resultList;
			}
			public static List<GRGEN_MODEL.ImethodBodyContains> Extract__edge0(List<IMatch_LinkMethodBodyToContainedExpressionTransitive> matchList)
			{
				List<GRGEN_MODEL.ImethodBodyContains> resultList = new List<GRGEN_MODEL.ImethodBodyContains>(matchList.Count);
				foreach(IMatch_LinkMethodBodyToContainedExpressionTransitive match in matchList)
					resultList.Add(match.edge__edge0);
				return resultList;
			}
			public static List<GRGEN_MODEL.Icontains> Extract__edge1(List<IMatch_LinkMethodBodyToContainedExpressionTransitive> matchList)
			{
				List<GRGEN_MODEL.Icontains> resultList = new List<GRGEN_MODEL.Icontains>(matchList.Count);
				foreach(IMatch_LinkMethodBodyToContainedExpressionTransitive match in matchList)
					resultList.Add(match.edge__edge1);
				return resultList;
			}
		}


		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> ConvertAsNeeded(object parameter)
		{
			if(parameter is List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>)
				return ((List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>)parameter);
			else
				return GRGEN_LIBGR.MatchListHelper.ToList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>((IList<GRGEN_LIBGR.IMatch>)parameter);
		}
	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive instanceBearingAttributeForSearch_LinkMethodBodyToContainedExpressionTransitive = new GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.Match_LinkMethodBodyToContainedExpressionTransitive();
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> Array_LinkMethodBodyToContainedExpressionTransitive_groupBy_mb(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list)
		{
			Dictionary<GRGEN_MODEL.IMethodBody, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>> seenValues = new Dictionary<GRGEN_MODEL.IMethodBody, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_mb)) {
					seenValues[list[pos].@node_mb].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> tempList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_mb, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
			foreach(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> Array_LinkMethodBodyToContainedExpressionTransitive_keepOneForEachBy_mb(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list)
		{
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
			Dictionary<GRGEN_MODEL.IMethodBody, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IMethodBody, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_mb)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_mb, null);
				}
			}
			return newList;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy_mb(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.IMethodBody entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_mb.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy_mb(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.IMethodBody entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_mb.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy_mb(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.IMethodBody entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_mb.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy_mb(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.IMethodBody entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_mb.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> Array_LinkMethodBodyToContainedExpressionTransitive_groupBy_e1(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list)
		{
			Dictionary<GRGEN_MODEL.IExpression, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>> seenValues = new Dictionary<GRGEN_MODEL.IExpression, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_e1)) {
					seenValues[list[pos].@node_e1].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> tempList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_e1, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
			foreach(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> Array_LinkMethodBodyToContainedExpressionTransitive_keepOneForEachBy_e1(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list)
		{
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
			Dictionary<GRGEN_MODEL.IExpression, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IExpression, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_e1)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_e1, null);
				}
			}
			return newList;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy_e1(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.IExpression entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_e1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy_e1(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.IExpression entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_e1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy_e1(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.IExpression entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_e1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy_e1(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.IExpression entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_e1.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> Array_LinkMethodBodyToContainedExpressionTransitive_groupBy_e2(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list)
		{
			Dictionary<GRGEN_MODEL.IExpression, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>> seenValues = new Dictionary<GRGEN_MODEL.IExpression, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_e2)) {
					seenValues[list[pos].@node_e2].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> tempList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_e2, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
			foreach(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> Array_LinkMethodBodyToContainedExpressionTransitive_keepOneForEachBy_e2(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list)
		{
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
			Dictionary<GRGEN_MODEL.IExpression, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IExpression, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_e2)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_e2, null);
				}
			}
			return newList;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy_e2(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.IExpression entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_e2.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy_e2(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.IExpression entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_e2.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy_e2(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.IExpression entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_e2.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy_e2(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.IExpression entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_e2.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> Array_LinkMethodBodyToContainedExpressionTransitive_groupBy__edge0(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list)
		{
			Dictionary<GRGEN_MODEL.ImethodBodyContains, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>> seenValues = new Dictionary<GRGEN_MODEL.ImethodBodyContains, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@edge__edge0)) {
					seenValues[list[pos].@edge__edge0].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> tempList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@edge__edge0, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
			foreach(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> Array_LinkMethodBodyToContainedExpressionTransitive_keepOneForEachBy__edge0(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list)
		{
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
			Dictionary<GRGEN_MODEL.ImethodBodyContains, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.ImethodBodyContains, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@edge__edge0)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@edge__edge0, null);
				}
			}
			return newList;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy__edge0(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.ImethodBodyContains entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy__edge0(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.ImethodBodyContains entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy__edge0(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.ImethodBodyContains entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy__edge0(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.ImethodBodyContains entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@edge__edge0.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> Array_LinkMethodBodyToContainedExpressionTransitive_groupBy__edge1(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list)
		{
			Dictionary<GRGEN_MODEL.Icontains, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>> seenValues = new Dictionary<GRGEN_MODEL.Icontains, List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@edge__edge1)) {
					seenValues[list[pos].@edge__edge1].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> tempList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@edge__edge1, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
			foreach(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> Array_LinkMethodBodyToContainedExpressionTransitive_keepOneForEachBy__edge1(List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list)
		{
			List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> newList = new List<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>();
			Dictionary<GRGEN_MODEL.Icontains, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.Icontains, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@edge__edge1)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@edge__edge1, null);
				}
			}
			return newList;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy__edge1(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.Icontains entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@edge__edge1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy__edge1(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.Icontains entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@edge__edge1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy__edge1(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.Icontains entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@edge__edge1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy__edge1(IList<GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> list, GRGEN_MODEL.Icontains entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@edge__edge1.Equals(entry))
					return i;
			return -1;
		}
	}

	public class Rule_RemoveMethodBodyContainsBetweenExpressions : GRGEN_LGSP.LGSPRulePattern
	{
		private static Rule_RemoveMethodBodyContainsBetweenExpressions instance = null;
		public static Rule_RemoveMethodBodyContainsBetweenExpressions Instance { get { if(instance==null) { instance = new Rule_RemoveMethodBodyContainsBetweenExpressions(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] RemoveMethodBodyContainsBetweenExpressions_node_e1_AllowedTypes = null;
		public static GRGEN_LIBGR.NodeType[] RemoveMethodBodyContainsBetweenExpressions_node_e2_AllowedTypes = null;
		public static bool[] RemoveMethodBodyContainsBetweenExpressions_node_e1_IsAllowedType = null;
		public static bool[] RemoveMethodBodyContainsBetweenExpressions_node_e2_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] RemoveMethodBodyContainsBetweenExpressions_edge_mbc_AllowedTypes = null;
		public static bool[] RemoveMethodBodyContainsBetweenExpressions_edge_mbc_IsAllowedType = null;
		public enum RemoveMethodBodyContainsBetweenExpressions_NodeNums { @e1, @e2, };
		public enum RemoveMethodBodyContainsBetweenExpressions_EdgeNums { @mbc, };
		public enum RemoveMethodBodyContainsBetweenExpressions_VariableNums { };
		public enum RemoveMethodBodyContainsBetweenExpressions_SubNums { };
		public enum RemoveMethodBodyContainsBetweenExpressions_AltNums { };
		public enum RemoveMethodBodyContainsBetweenExpressions_IterNums { };





		public GRGEN_LGSP.PatternGraph pat_RemoveMethodBodyContainsBetweenExpressions;


		private Rule_RemoveMethodBodyContainsBetweenExpressions()
			: base("RemoveMethodBodyContainsBetweenExpressions",
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new GRGEN_LGSP.LGSPFilter[] {
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				},
				new GRGEN_LIBGR.MatchClassInfo[] { },
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_RemoveMethodBodyContainsBetweenExpressions+IMatch_RemoveMethodBodyContainsBetweenExpressions",
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_RemoveMethodBodyContainsBetweenExpressions+Match_RemoveMethodBodyContainsBetweenExpressions"
			)
		{
		}
		private void initialize()
		{
			bool[,] RemoveMethodBodyContainsBetweenExpressions_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] RemoveMethodBodyContainsBetweenExpressions_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] RemoveMethodBodyContainsBetweenExpressions_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] RemoveMethodBodyContainsBetweenExpressions_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternNode RemoveMethodBodyContainsBetweenExpressions_node_e1 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Expression, GRGEN_MODEL.NodeType_Expression.typeVar, "GRGEN_MODEL.IExpression", "RemoveMethodBodyContainsBetweenExpressions_node_e1", "e1", RemoveMethodBodyContainsBetweenExpressions_node_e1_AllowedTypes, RemoveMethodBodyContainsBetweenExpressions_node_e1_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternNode RemoveMethodBodyContainsBetweenExpressions_node_e2 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Expression, GRGEN_MODEL.NodeType_Expression.typeVar, "GRGEN_MODEL.IExpression", "RemoveMethodBodyContainsBetweenExpressions_node_e2", "e2", RemoveMethodBodyContainsBetweenExpressions_node_e2_AllowedTypes, RemoveMethodBodyContainsBetweenExpressions_node_e2_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge RemoveMethodBodyContainsBetweenExpressions_edge_mbc = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@methodBodyContains, GRGEN_MODEL.EdgeType_methodBodyContains.typeVar, "GRGEN_MODEL.ImethodBodyContains", "RemoveMethodBodyContainsBetweenExpressions_edge_mbc", "mbc", RemoveMethodBodyContainsBetweenExpressions_edge_mbc_AllowedTypes, RemoveMethodBodyContainsBetweenExpressions_edge_mbc_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			pat_RemoveMethodBodyContainsBetweenExpressions = new GRGEN_LGSP.PatternGraph(
				"RemoveMethodBodyContainsBetweenExpressions",
				"",
				null, "RemoveMethodBodyContainsBetweenExpressions",
				false, false,
				new GRGEN_LGSP.PatternNode[] { RemoveMethodBodyContainsBetweenExpressions_node_e1, RemoveMethodBodyContainsBetweenExpressions_node_e2 }, 
				new GRGEN_LGSP.PatternEdge[] { RemoveMethodBodyContainsBetweenExpressions_edge_mbc }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				RemoveMethodBodyContainsBetweenExpressions_isNodeHomomorphicGlobal,
				RemoveMethodBodyContainsBetweenExpressions_isEdgeHomomorphicGlobal,
				RemoveMethodBodyContainsBetweenExpressions_isNodeTotallyHomomorphic,
				RemoveMethodBodyContainsBetweenExpressions_isEdgeTotallyHomomorphic
			);
			pat_RemoveMethodBodyContainsBetweenExpressions.edgeToSourceNode.Add(RemoveMethodBodyContainsBetweenExpressions_edge_mbc, RemoveMethodBodyContainsBetweenExpressions_node_e1);
			pat_RemoveMethodBodyContainsBetweenExpressions.edgeToTargetNode.Add(RemoveMethodBodyContainsBetweenExpressions_edge_mbc, RemoveMethodBodyContainsBetweenExpressions_node_e2);

			RemoveMethodBodyContainsBetweenExpressions_node_e1.pointOfDefinition = pat_RemoveMethodBodyContainsBetweenExpressions;
			RemoveMethodBodyContainsBetweenExpressions_node_e2.pointOfDefinition = pat_RemoveMethodBodyContainsBetweenExpressions;
			RemoveMethodBodyContainsBetweenExpressions_edge_mbc.pointOfDefinition = pat_RemoveMethodBodyContainsBetweenExpressions;

			patternGraph = pat_RemoveMethodBodyContainsBetweenExpressions;
		}


		public void Modify(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch _curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			Match_RemoveMethodBodyContainsBetweenExpressions curMatch = (Match_RemoveMethodBodyContainsBetweenExpressions)_curMatch;
			GRGEN_LGSP.LGSPEdge edge_mbc = curMatch._edge_mbc;
			graph.SettingAddedNodeNames( RemoveMethodBodyContainsBetweenExpressions_addedNodeNames );
			graph.SettingAddedEdgeNames( RemoveMethodBodyContainsBetweenExpressions_addedEdgeNames );
			graph.Remove(edge_mbc);
			actionEnv.SelectedMatchRewritten();
			return;
		}
		private static string[] RemoveMethodBodyContainsBetweenExpressions_addedNodeNames = new string[] {  };
		private static string[] RemoveMethodBodyContainsBetweenExpressions_addedEdgeNames = new string[] {  };

		static Rule_RemoveMethodBodyContainsBetweenExpressions() {
		}

		public interface IMatch_RemoveMethodBodyContainsBetweenExpressions : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IExpression node_e1 { get; set; }
			GRGEN_MODEL.IExpression node_e2 { get; set; }
			//Edges
			GRGEN_MODEL.ImethodBodyContains edge_mbc { get; set; }
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_RemoveMethodBodyContainsBetweenExpressions : GRGEN_LGSP.MatchListElement<Match_RemoveMethodBodyContainsBetweenExpressions>, IMatch_RemoveMethodBodyContainsBetweenExpressions
		{
			public GRGEN_MODEL.IExpression node_e1 { get { return (GRGEN_MODEL.IExpression)_node_e1; } set { _node_e1 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IExpression node_e2 { get { return (GRGEN_MODEL.IExpression)_node_e2; } set { _node_e2 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_e1;
			public GRGEN_LGSP.LGSPNode _node_e2;
			public enum RemoveMethodBodyContainsBetweenExpressions_NodeNums { @e1, @e2, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)RemoveMethodBodyContainsBetweenExpressions_NodeNums.@e1: return _node_e1;
				case (int)RemoveMethodBodyContainsBetweenExpressions_NodeNums.@e2: return _node_e2;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "e1": return _node_e1;
				case "e2": return _node_e2;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "e1": _node_e1 = (GRGEN_LGSP.LGSPNode)value; break;
				case "e2": _node_e2 = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.ImethodBodyContains edge_mbc { get { return (GRGEN_MODEL.ImethodBodyContains)_edge_mbc; } set { _edge_mbc = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge_mbc;
			public enum RemoveMethodBodyContainsBetweenExpressions_EdgeNums { @mbc, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)RemoveMethodBodyContainsBetweenExpressions_EdgeNums.@mbc: return _edge_mbc;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "mbc": return _edge_mbc;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "mbc": _edge_mbc = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum RemoveMethodBodyContainsBetweenExpressions_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum RemoveMethodBodyContainsBetweenExpressions_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum RemoveMethodBodyContainsBetweenExpressions_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum RemoveMethodBodyContainsBetweenExpressions_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum RemoveMethodBodyContainsBetweenExpressions_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Rule_RemoveMethodBodyContainsBetweenExpressions.instance.pat_RemoveMethodBodyContainsBetweenExpressions; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_RemoveMethodBodyContainsBetweenExpressions(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_RemoveMethodBodyContainsBetweenExpressions(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_RemoveMethodBodyContainsBetweenExpressions nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_RemoveMethodBodyContainsBetweenExpressions cur = this;
				while(cur != null) {
					Match_RemoveMethodBodyContainsBetweenExpressions next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_RemoveMethodBodyContainsBetweenExpressions that)
			{
				_node_e1 = that._node_e1;
				_node_e2 = that._node_e2;
				_edge_mbc = that._edge_mbc;
			}

			public Match_RemoveMethodBodyContainsBetweenExpressions(Match_RemoveMethodBodyContainsBetweenExpressions that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_RemoveMethodBodyContainsBetweenExpressions that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_e1 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_e1];
				_node_e2 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_e2];
				_edge_mbc = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge_mbc];
			}

			public Match_RemoveMethodBodyContainsBetweenExpressions(Match_RemoveMethodBodyContainsBetweenExpressions that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_RemoveMethodBodyContainsBetweenExpressions()
			{
			}

			public bool IsEqual(Match_RemoveMethodBodyContainsBetweenExpressions that)
			{
				if(that==null) return false;
				if(_node_e1 != that._node_e1) return false;
				if(_node_e2 != that._node_e2) return false;
				if(_edge_mbc != that._edge_mbc) return false;
				return true;
			}
		}


		public class Extractor
		{
			public static List<GRGEN_MODEL.IExpression> Extract_e1(List<IMatch_RemoveMethodBodyContainsBetweenExpressions> matchList)
			{
				List<GRGEN_MODEL.IExpression> resultList = new List<GRGEN_MODEL.IExpression>(matchList.Count);
				foreach(IMatch_RemoveMethodBodyContainsBetweenExpressions match in matchList)
					resultList.Add(match.node_e1);
				return resultList;
			}
			public static List<GRGEN_MODEL.IExpression> Extract_e2(List<IMatch_RemoveMethodBodyContainsBetweenExpressions> matchList)
			{
				List<GRGEN_MODEL.IExpression> resultList = new List<GRGEN_MODEL.IExpression>(matchList.Count);
				foreach(IMatch_RemoveMethodBodyContainsBetweenExpressions match in matchList)
					resultList.Add(match.node_e2);
				return resultList;
			}
			public static List<GRGEN_MODEL.ImethodBodyContains> Extract_mbc(List<IMatch_RemoveMethodBodyContainsBetweenExpressions> matchList)
			{
				List<GRGEN_MODEL.ImethodBodyContains> resultList = new List<GRGEN_MODEL.ImethodBodyContains>(matchList.Count);
				foreach(IMatch_RemoveMethodBodyContainsBetweenExpressions match in matchList)
					resultList.Add(match.edge_mbc);
				return resultList;
			}
		}


		public static List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> ConvertAsNeeded(object parameter)
		{
			if(parameter is List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>)
				return ((List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>)parameter);
			else
				return GRGEN_LIBGR.MatchListHelper.ToList<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>((IList<GRGEN_LIBGR.IMatch>)parameter);
		}
	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions instanceBearingAttributeForSearch_RemoveMethodBodyContainsBetweenExpressions = new GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.Match_RemoveMethodBodyContainsBetweenExpressions();
		public static List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> Array_RemoveMethodBodyContainsBetweenExpressions_groupBy_e1(List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list)
		{
			Dictionary<GRGEN_MODEL.IExpression, List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>> seenValues = new Dictionary<GRGEN_MODEL.IExpression, List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_e1)) {
					seenValues[list[pos].@node_e1].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> tempList = new List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_e1, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> newList = new List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>();
			foreach(List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> Array_RemoveMethodBodyContainsBetweenExpressions_keepOneForEachBy_e1(List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list)
		{
			List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> newList = new List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>();
			Dictionary<GRGEN_MODEL.IExpression, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IExpression, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_e1)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_e1, null);
				}
			}
			return newList;
		}
		public static int Array_RemoveMethodBodyContainsBetweenExpressions_indexOfBy_e1(IList<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list, GRGEN_MODEL.IExpression entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_e1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RemoveMethodBodyContainsBetweenExpressions_indexOfBy_e1(IList<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list, GRGEN_MODEL.IExpression entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_e1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RemoveMethodBodyContainsBetweenExpressions_lastIndexOfBy_e1(IList<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list, GRGEN_MODEL.IExpression entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_e1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RemoveMethodBodyContainsBetweenExpressions_lastIndexOfBy_e1(IList<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list, GRGEN_MODEL.IExpression entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_e1.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> Array_RemoveMethodBodyContainsBetweenExpressions_groupBy_e2(List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list)
		{
			Dictionary<GRGEN_MODEL.IExpression, List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>> seenValues = new Dictionary<GRGEN_MODEL.IExpression, List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_e2)) {
					seenValues[list[pos].@node_e2].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> tempList = new List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_e2, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> newList = new List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>();
			foreach(List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> Array_RemoveMethodBodyContainsBetweenExpressions_keepOneForEachBy_e2(List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list)
		{
			List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> newList = new List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>();
			Dictionary<GRGEN_MODEL.IExpression, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IExpression, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_e2)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_e2, null);
				}
			}
			return newList;
		}
		public static int Array_RemoveMethodBodyContainsBetweenExpressions_indexOfBy_e2(IList<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list, GRGEN_MODEL.IExpression entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_e2.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RemoveMethodBodyContainsBetweenExpressions_indexOfBy_e2(IList<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list, GRGEN_MODEL.IExpression entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_e2.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RemoveMethodBodyContainsBetweenExpressions_lastIndexOfBy_e2(IList<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list, GRGEN_MODEL.IExpression entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_e2.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RemoveMethodBodyContainsBetweenExpressions_lastIndexOfBy_e2(IList<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list, GRGEN_MODEL.IExpression entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_e2.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> Array_RemoveMethodBodyContainsBetweenExpressions_groupBy_mbc(List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list)
		{
			Dictionary<GRGEN_MODEL.ImethodBodyContains, List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>> seenValues = new Dictionary<GRGEN_MODEL.ImethodBodyContains, List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@edge_mbc)) {
					seenValues[list[pos].@edge_mbc].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> tempList = new List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@edge_mbc, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> newList = new List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>();
			foreach(List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> Array_RemoveMethodBodyContainsBetweenExpressions_keepOneForEachBy_mbc(List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list)
		{
			List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> newList = new List<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>();
			Dictionary<GRGEN_MODEL.ImethodBodyContains, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.ImethodBodyContains, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@edge_mbc)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@edge_mbc, null);
				}
			}
			return newList;
		}
		public static int Array_RemoveMethodBodyContainsBetweenExpressions_indexOfBy_mbc(IList<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list, GRGEN_MODEL.ImethodBodyContains entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@edge_mbc.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RemoveMethodBodyContainsBetweenExpressions_indexOfBy_mbc(IList<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list, GRGEN_MODEL.ImethodBodyContains entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@edge_mbc.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RemoveMethodBodyContainsBetweenExpressions_lastIndexOfBy_mbc(IList<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list, GRGEN_MODEL.ImethodBodyContains entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@edge_mbc.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RemoveMethodBodyContainsBetweenExpressions_lastIndexOfBy_mbc(IList<GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> list, GRGEN_MODEL.ImethodBodyContains entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@edge_mbc.Equals(entry))
					return i;
			return -1;
		}
	}

	public class Rule_RetypeClassContainment : GRGEN_LGSP.LGSPRulePattern
	{
		private static Rule_RetypeClassContainment instance = null;
		public static Rule_RetypeClassContainment Instance { get { if(instance==null) { instance = new Rule_RetypeClassContainment(); instance.initialize(); } return instance; } }

		public static GRGEN_LIBGR.NodeType[] RetypeClassContainment_node_c1_AllowedTypes = null;
		public static GRGEN_LIBGR.NodeType[] RetypeClassContainment_node_c2_AllowedTypes = null;
		public static bool[] RetypeClassContainment_node_c1_IsAllowedType = null;
		public static bool[] RetypeClassContainment_node_c2_IsAllowedType = null;
		public static GRGEN_LIBGR.EdgeType[] RetypeClassContainment_edge_c_AllowedTypes = { GRGEN_MODEL.EdgeType_contains.typeVar, };
		public static bool[] RetypeClassContainment_edge_c_IsAllowedType = { false, false, false, true, false, false, false, false, false, false, false, false, };
		public enum RetypeClassContainment_NodeNums { @c1, @c2, };
		public enum RetypeClassContainment_EdgeNums { @c, };
		public enum RetypeClassContainment_VariableNums { };
		public enum RetypeClassContainment_SubNums { };
		public enum RetypeClassContainment_AltNums { };
		public enum RetypeClassContainment_IterNums { };





		public GRGEN_LGSP.PatternGraph pat_RetypeClassContainment;


		private Rule_RetypeClassContainment()
			: base("RetypeClassContainment",
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new string[] { },
				new GRGEN_LIBGR.GrGenType[] { },
				new GRGEN_LGSP.LGSPFilter[] {
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirst", null, "keepFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLast", null, "keepLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepFirstFraction", null, "keepFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("keepLastFraction", null, "keepLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirst", null, "removeFirst", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLast", null, "removeLast", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(int)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeFirstFraction", null, "removeFirstFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
					new GRGEN_LGSP.LGSPFilterAutoSupplied("removeLastFraction", null, "removeLastFraction", null, new GRGEN_LIBGR.GrGenType[] {GRGEN_LIBGR.VarType.GetVarType(typeof(double)), }, new String[] {"param"}),
				},
				new GRGEN_LIBGR.MatchClassInfo[] { },
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_RetypeClassContainment+IMatch_RetypeClassContainment",
				"de.unika.ipd.grGen.Action_ProgramGraphsOriginal.Rule_RetypeClassContainment+Match_RetypeClassContainment"
			)
		{
		}
		private void initialize()
		{
			bool[,] RetypeClassContainment_isNodeHomomorphicGlobal = new bool[2, 2] {
				{ false, false, },
				{ false, false, },
			};
			bool[,] RetypeClassContainment_isEdgeHomomorphicGlobal = new bool[1, 1] {
				{ false, },
			};
			bool[] RetypeClassContainment_isNodeTotallyHomomorphic = new bool[2] { false, false,  };
			bool[] RetypeClassContainment_isEdgeTotallyHomomorphic = new bool[1] { false,  };
			GRGEN_LGSP.PatternNode RetypeClassContainment_node_c1 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Class, GRGEN_MODEL.NodeType_Class.typeVar, "GRGEN_MODEL.IClass", "RetypeClassContainment_node_c1", "c1", RetypeClassContainment_node_c1_AllowedTypes, RetypeClassContainment_node_c1_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternNode RetypeClassContainment_node_c2 = new GRGEN_LGSP.PatternNode((int) GRGEN_MODEL.NodeTypes.@Class, GRGEN_MODEL.NodeType_Class.typeVar, "GRGEN_MODEL.IClass", "RetypeClassContainment_node_c2", "c2", RetypeClassContainment_node_c2_AllowedTypes, RetypeClassContainment_node_c2_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			GRGEN_LGSP.PatternEdge RetypeClassContainment_edge_c = new GRGEN_LGSP.PatternEdge(true, (int) GRGEN_MODEL.EdgeTypes.@contains, GRGEN_MODEL.EdgeType_contains.typeVar, "GRGEN_MODEL.Icontains", "RetypeClassContainment_edge_c", "c", RetypeClassContainment_edge_c_AllowedTypes, RetypeClassContainment_edge_c_IsAllowedType, 5.5F, -1, false, null, null, null, null, null, null, false, null);
			pat_RetypeClassContainment = new GRGEN_LGSP.PatternGraph(
				"RetypeClassContainment",
				"",
				null, "RetypeClassContainment",
				false, false,
				new GRGEN_LGSP.PatternNode[] { RetypeClassContainment_node_c1, RetypeClassContainment_node_c2 }, 
				new GRGEN_LGSP.PatternEdge[] { RetypeClassContainment_edge_c }, 
				new GRGEN_LGSP.PatternVariable[] {  }, 
				new GRGEN_LGSP.PatternGraphEmbedding[] {  }, 
				new GRGEN_LGSP.Alternative[] {  }, 
				new GRGEN_LGSP.Iterated[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternGraph[] {  }, 
				new GRGEN_LGSP.PatternCondition[] {  }, 
				new GRGEN_LGSP.PatternYielding[] {  }, 
				new bool[2, 2] {
					{ true, false, },
					{ false, true, },
				},
				new bool[1, 1] {
					{ true, },
				},
				RetypeClassContainment_isNodeHomomorphicGlobal,
				RetypeClassContainment_isEdgeHomomorphicGlobal,
				RetypeClassContainment_isNodeTotallyHomomorphic,
				RetypeClassContainment_isEdgeTotallyHomomorphic
			);
			pat_RetypeClassContainment.edgeToSourceNode.Add(RetypeClassContainment_edge_c, RetypeClassContainment_node_c1);
			pat_RetypeClassContainment.edgeToTargetNode.Add(RetypeClassContainment_edge_c, RetypeClassContainment_node_c2);

			RetypeClassContainment_node_c1.pointOfDefinition = pat_RetypeClassContainment;
			RetypeClassContainment_node_c2.pointOfDefinition = pat_RetypeClassContainment;
			RetypeClassContainment_edge_c.pointOfDefinition = pat_RetypeClassContainment;

			patternGraph = pat_RetypeClassContainment;
		}


		public void Modify(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch _curMatch)
		{
			GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
			Match_RetypeClassContainment curMatch = (Match_RetypeClassContainment)_curMatch;
			GRGEN_LGSP.LGSPEdge edge_c = curMatch._edge_c;
			graph.SettingAddedNodeNames( RetypeClassContainment_addedNodeNames );
			graph.SettingAddedEdgeNames( RetypeClassContainment_addedEdgeNames );
			GRGEN_LGSP.LGSPEdge edge__edge0 = graph.Retype(edge_c, GRGEN_MODEL.EdgeType_classContainsClass.typeVar);
			actionEnv.SelectedMatchRewritten();
			return;
		}
		private static string[] RetypeClassContainment_addedNodeNames = new string[] {  };
		private static string[] RetypeClassContainment_addedEdgeNames = new string[] {  };

		static Rule_RetypeClassContainment() {
		}

		public interface IMatch_RetypeClassContainment : GRGEN_LIBGR.IMatch
		{
			//Nodes
			GRGEN_MODEL.IClass node_c1 { get; set; }
			GRGEN_MODEL.IClass node_c2 { get; set; }
			//Edges
			GRGEN_MODEL.Icontains edge_c { get; set; }
			//Variables
			//EmbeddedGraphs
			//Alternatives
			//Iterateds
			//Independents
			// further match object stuff
			void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern);
		}

		public class Match_RetypeClassContainment : GRGEN_LGSP.MatchListElement<Match_RetypeClassContainment>, IMatch_RetypeClassContainment
		{
			public GRGEN_MODEL.IClass node_c1 { get { return (GRGEN_MODEL.IClass)_node_c1; } set { _node_c1 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_MODEL.IClass node_c2 { get { return (GRGEN_MODEL.IClass)_node_c2; } set { _node_c2 = (GRGEN_LGSP.LGSPNode)value; } }
			public GRGEN_LGSP.LGSPNode _node_c1;
			public GRGEN_LGSP.LGSPNode _node_c2;
			public enum RetypeClassContainment_NodeNums { @c1, @c2, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.INode> Nodes { get { return new GRGEN_LGSP.Nodes_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.INode> NodesEnumerator { get { return new GRGEN_LGSP.Nodes_Enumerator(this); } }
			public override int NumberOfNodes { get { return 2; } }
			public override GRGEN_LIBGR.INode getNodeAt(int index)
			{
				switch(index) {
				case (int)RetypeClassContainment_NodeNums.@c1: return _node_c1;
				case (int)RetypeClassContainment_NodeNums.@c2: return _node_c2;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.INode getNode(string name)
			{
				switch(name) {
				case "c1": return _node_c1;
				case "c2": return _node_c2;
				default: return null;
				}
			}
			public override void SetNode(string name, GRGEN_LIBGR.INode value)
			{
				switch(name) {
				case "c1": _node_c1 = (GRGEN_LGSP.LGSPNode)value; break;
				case "c2": _node_c2 = (GRGEN_LGSP.LGSPNode)value; break;
				default: break;
				}
			}

			public GRGEN_MODEL.Icontains edge_c { get { return (GRGEN_MODEL.Icontains)_edge_c; } set { _edge_c = (GRGEN_LGSP.LGSPEdge)value; } }
			public GRGEN_LGSP.LGSPEdge _edge_c;
			public enum RetypeClassContainment_EdgeNums { @c, END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IEdge> Edges { get { return new GRGEN_LGSP.Edges_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IEdge> EdgesEnumerator { get { return new GRGEN_LGSP.Edges_Enumerator(this); } }
			public override int NumberOfEdges { get { return 1; } }
			public override GRGEN_LIBGR.IEdge getEdgeAt(int index)
			{
				switch(index) {
				case (int)RetypeClassContainment_EdgeNums.@c: return _edge_c;
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IEdge getEdge(string name)
			{
				switch(name) {
				case "c": return _edge_c;
				default: return null;
				}
			}
			public override void SetEdge(string name, GRGEN_LIBGR.IEdge value)
			{
				switch(name) {
				case "c": _edge_c = (GRGEN_LGSP.LGSPEdge)value; break;
				default: break;
				}
			}

			public enum RetypeClassContainment_VariableNums { END_OF_ENUM };
			public override IEnumerable<object> Variables { get { return new GRGEN_LGSP.Variables_Enumerable(this); } }
			public override IEnumerator<object> VariablesEnumerator { get { return new GRGEN_LGSP.Variables_Enumerator(this); } }
			public override int NumberOfVariables { get { return 0; } }
			public override object getVariableAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override object getVariable(string name)
			{
				switch(name) {
				default: return null;
				}
			}
			public override void SetVariable(string name, object value)
			{
				switch(name) {
				default: break;
				}
			}

			public enum RetypeClassContainment_SubNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> EmbeddedGraphs { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> EmbeddedGraphsEnumerator { get { return new GRGEN_LGSP.EmbeddedGraphs_Enumerator(this); } }
			public override int NumberOfEmbeddedGraphs { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getEmbeddedGraphAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getEmbeddedGraph(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum RetypeClassContainment_AltNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Alternatives { get { return new GRGEN_LGSP.Alternatives_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> AlternativesEnumerator { get { return new GRGEN_LGSP.Alternatives_Enumerator(this); } }
			public override int NumberOfAlternatives { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getAlternativeAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getAlternative(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum RetypeClassContainment_IterNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatches> Iterateds { get { return new GRGEN_LGSP.Iterateds_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatches> IteratedsEnumerator { get { return new GRGEN_LGSP.Iterateds_Enumerator(this); } }
			public override int NumberOfIterateds { get { return 0; } }
			public override GRGEN_LIBGR.IMatches getIteratedAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatches getIterated(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public enum RetypeClassContainment_IdptNums { END_OF_ENUM };
			public override IEnumerable<GRGEN_LIBGR.IMatch> Independents { get { return new GRGEN_LGSP.Independents_Enumerable(this); } }
			public override IEnumerator<GRGEN_LIBGR.IMatch> IndependentsEnumerator { get { return new GRGEN_LGSP.Independents_Enumerator(this); } }
			public override int NumberOfIndependents { get { return 0; } }
			public override GRGEN_LIBGR.IMatch getIndependentAt(int index)
			{
				switch(index) {
				default: return null;
				}
			}
			public override GRGEN_LIBGR.IMatch getIndependent(string name)
			{
				switch(name) {
				default: return null;
				}
			}

			public override GRGEN_LIBGR.IPatternGraph Pattern { get { return Rule_RetypeClassContainment.instance.pat_RetypeClassContainment; } }
			public override GRGEN_LIBGR.IMatchClass MatchClass { get { return null; } }
			public override GRGEN_LIBGR.IMatch Clone() { return new Match_RetypeClassContainment(this); }
			public override GRGEN_LIBGR.IMatch Clone(IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) { return new Match_RetypeClassContainment(this, oldToNewMap); }
			public void SetMatchOfEnclosingPattern(GRGEN_LIBGR.IMatch matchOfEnclosingPattern) { _matchOfEnclosingPattern = matchOfEnclosingPattern; }
			public Match_RetypeClassContainment nextWithSameHash;
			public void CleanNextWithSameHash() {
				Match_RetypeClassContainment cur = this;
				while(cur != null) {
					Match_RetypeClassContainment next = cur.nextWithSameHash;
					cur.nextWithSameHash = null;
					cur = next;
				}
			}

			public void AssignContent(Match_RetypeClassContainment that)
			{
				_node_c1 = that._node_c1;
				_node_c2 = that._node_c2;
				_edge_c = that._edge_c;
			}

			public Match_RetypeClassContainment(Match_RetypeClassContainment that)
			{
				AssignContent(that);
			}
			public void AssignContent(Match_RetypeClassContainment that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				_node_c1 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c1];
				_node_c2 = (GRGEN_LGSP.LGSPNode)oldToNewMap[that._node_c2];
				_edge_c = (GRGEN_LGSP.LGSPEdge)oldToNewMap[that._edge_c];
			}

			public Match_RetypeClassContainment(Match_RetypeClassContainment that, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
			{
				AssignContent(that, oldToNewMap);
			}
			public Match_RetypeClassContainment()
			{
			}

			public bool IsEqual(Match_RetypeClassContainment that)
			{
				if(that==null) return false;
				if(_node_c1 != that._node_c1) return false;
				if(_node_c2 != that._node_c2) return false;
				if(_edge_c != that._edge_c) return false;
				return true;
			}
		}


		public class Extractor
		{
			public static List<GRGEN_MODEL.IClass> Extract_c1(List<IMatch_RetypeClassContainment> matchList)
			{
				List<GRGEN_MODEL.IClass> resultList = new List<GRGEN_MODEL.IClass>(matchList.Count);
				foreach(IMatch_RetypeClassContainment match in matchList)
					resultList.Add(match.node_c1);
				return resultList;
			}
			public static List<GRGEN_MODEL.IClass> Extract_c2(List<IMatch_RetypeClassContainment> matchList)
			{
				List<GRGEN_MODEL.IClass> resultList = new List<GRGEN_MODEL.IClass>(matchList.Count);
				foreach(IMatch_RetypeClassContainment match in matchList)
					resultList.Add(match.node_c2);
				return resultList;
			}
			public static List<GRGEN_MODEL.Icontains> Extract_c(List<IMatch_RetypeClassContainment> matchList)
			{
				List<GRGEN_MODEL.Icontains> resultList = new List<GRGEN_MODEL.Icontains>(matchList.Count);
				foreach(IMatch_RetypeClassContainment match in matchList)
					resultList.Add(match.edge_c);
				return resultList;
			}
		}


		public static List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> ConvertAsNeeded(object parameter)
		{
			if(parameter is List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>)
				return ((List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>)parameter);
			else
				return GRGEN_LIBGR.MatchListHelper.ToList<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>((IList<GRGEN_LIBGR.IMatch>)parameter);
		}
	}

	
	public partial class ArrayHelper
	{
		private static GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment instanceBearingAttributeForSearch_RetypeClassContainment = new GRGEN_ACTIONS.Rule_RetypeClassContainment.Match_RetypeClassContainment();
		public static List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> Array_RetypeClassContainment_groupBy_c1(List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list)
		{
			Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>> seenValues = new Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_c1)) {
					seenValues[list[pos].@node_c1].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> tempList = new List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_c1, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> newList = new List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>();
			foreach(List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> Array_RetypeClassContainment_keepOneForEachBy_c1(List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list)
		{
			List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> newList = new List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>();
			Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_c1)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_c1, null);
				}
			}
			return newList;
		}
		public static int Array_RetypeClassContainment_indexOfBy_c1(IList<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RetypeClassContainment_indexOfBy_c1(IList<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RetypeClassContainment_lastIndexOfBy_c1(IList<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RetypeClassContainment_lastIndexOfBy_c1(IList<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_c1.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> Array_RetypeClassContainment_groupBy_c2(List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list)
		{
			Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>> seenValues = new Dictionary<GRGEN_MODEL.IClass, List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@node_c2)) {
					seenValues[list[pos].@node_c2].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> tempList = new List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@node_c2, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> newList = new List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>();
			foreach(List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> Array_RetypeClassContainment_keepOneForEachBy_c2(List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list)
		{
			List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> newList = new List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>();
			Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.IClass, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@node_c2)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@node_c2, null);
				}
			}
			return newList;
		}
		public static int Array_RetypeClassContainment_indexOfBy_c2(IList<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@node_c2.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RetypeClassContainment_indexOfBy_c2(IList<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@node_c2.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RetypeClassContainment_lastIndexOfBy_c2(IList<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list, GRGEN_MODEL.IClass entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@node_c2.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RetypeClassContainment_lastIndexOfBy_c2(IList<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list, GRGEN_MODEL.IClass entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@node_c2.Equals(entry))
					return i;
			return -1;
		}
		public static List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> Array_RetypeClassContainment_groupBy_c(List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list)
		{
			Dictionary<GRGEN_MODEL.Icontains, List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>> seenValues = new Dictionary<GRGEN_MODEL.Icontains, List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>>();
			for(int pos = 0; pos < list.Count; ++pos)
			{
				if(seenValues.ContainsKey(list[pos].@edge_c)) {
					seenValues[list[pos].@edge_c].Add(list[pos]);
				} else {
					List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> tempList = new List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>();
					tempList.Add(list[pos]);
					seenValues.Add(list[pos].@edge_c, tempList);
				}
			}
			List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> newList = new List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>();
			foreach(List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> entry in seenValues.Values)
			{
				newList.AddRange(entry);
			}
			return newList;
		}
		public static List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> Array_RetypeClassContainment_keepOneForEachBy_c(List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list)
		{
			List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> newList = new List<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment>();
			Dictionary<GRGEN_MODEL.Icontains, GRGEN_LIBGR.SetValueType> alreadySeenMembers = new Dictionary<GRGEN_MODEL.Icontains, GRGEN_LIBGR.SetValueType>();
			foreach(GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment element in list)
			{
				if(!alreadySeenMembers.ContainsKey(element.@edge_c)) {
					newList.Add(element);
					alreadySeenMembers.Add(element.@edge_c, null);
				}
			}
			return newList;
		}
		public static int Array_RetypeClassContainment_indexOfBy_c(IList<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list, GRGEN_MODEL.Icontains entry, int startIndex)
		{
			for(int i = startIndex; i < list.Count; ++i)
				if(list[i].@edge_c.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RetypeClassContainment_indexOfBy_c(IList<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list, GRGEN_MODEL.Icontains entry)
		{
			for(int i = 0; i < list.Count; ++i)
				if(list[i].@edge_c.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RetypeClassContainment_lastIndexOfBy_c(IList<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list, GRGEN_MODEL.Icontains entry, int startIndex)
		{
			for(int i = startIndex; i >= 0; --i)
				if(list[i].@edge_c.Equals(entry))
					return i;
			return -1;
		}
		public static int Array_RetypeClassContainment_lastIndexOfBy_c(IList<GRGEN_ACTIONS.Rule_RetypeClassContainment.IMatch_RetypeClassContainment> list, GRGEN_MODEL.Icontains entry)
		{
			for(int i = list.Count - 1; i >= 0; --i)
				if(list[i].@edge_c.Equals(entry))
					return i;
			return -1;
		}
	}

	public class Functions
	{

		static Functions() {
		}

	}

	public class Procedures
	{

		static Procedures() {
		}

	}

	public partial class MatchFilters
	{

		static MatchFilters() {
		}

	}

	public partial class MatchClassFilters
	{

		static MatchClassFilters() {
		}

	}



	//-----------------------------------------------------------

	public class ProgramGraphsOriginal_RuleAndMatchingPatterns : GRGEN_LGSP.LGSPRuleAndMatchingPatterns
	{
		public ProgramGraphsOriginal_RuleAndMatchingPatterns()
		{
			subpatterns = new GRGEN_LGSP.LGSPMatchingPattern[12];
			rules = new GRGEN_LGSP.LGSPRulePattern[9];
			rulesAndSubpatterns = new GRGEN_LGSP.LGSPMatchingPattern[12+9];
			definedSequences = new GRGEN_LIBGR.DefinedSequenceInfo[0];
			functions = new GRGEN_LIBGR.FunctionInfo[0+0];
			procedures = new GRGEN_LIBGR.ProcedureInfo[0+0];
			matchClasses = new GRGEN_LIBGR.MatchClassInfo[0];
			packages = new string[0];
			subpatterns[0] = Pattern_Subclasses.Instance;
			rulesAndSubpatterns[0] = Pattern_Subclasses.Instance;
			subpatterns[1] = Pattern_Subclass.Instance;
			rulesAndSubpatterns[1] = Pattern_Subclass.Instance;
			subpatterns[2] = Pattern_Features.Instance;
			rulesAndSubpatterns[2] = Pattern_Features.Instance;
			subpatterns[3] = Pattern_FeaturePattern.Instance;
			rulesAndSubpatterns[3] = Pattern_FeaturePattern.Instance;
			subpatterns[4] = Pattern_Parameters.Instance;
			rulesAndSubpatterns[4] = Pattern_Parameters.Instance;
			subpatterns[5] = Pattern_Parameter.Instance;
			rulesAndSubpatterns[5] = Pattern_Parameter.Instance;
			subpatterns[6] = Pattern_Statements.Instance;
			rulesAndSubpatterns[6] = Pattern_Statements.Instance;
			subpatterns[7] = Pattern_Statement.Instance;
			rulesAndSubpatterns[7] = Pattern_Statement.Instance;
			subpatterns[8] = Pattern_Expressions.Instance;
			rulesAndSubpatterns[8] = Pattern_Expressions.Instance;
			subpatterns[9] = Pattern_ExpressionPattern.Instance;
			rulesAndSubpatterns[9] = Pattern_ExpressionPattern.Instance;
			subpatterns[10] = Pattern_Bodies.Instance;
			rulesAndSubpatterns[10] = Pattern_Bodies.Instance;
			subpatterns[11] = Pattern_Body.Instance;
			rulesAndSubpatterns[11] = Pattern_Body.Instance;
			rules[0] = Rule_createProgramGraphExample.Instance;
			rulesAndSubpatterns[12+0] = Rule_createProgramGraphExample.Instance;
			rules[1] = Rule_createProgramGraphPullUp.Instance;
			rulesAndSubpatterns[12+1] = Rule_createProgramGraphPullUp.Instance;
			rules[2] = Rule_pullUpMethod.Instance;
			rulesAndSubpatterns[12+2] = Rule_pullUpMethod.Instance;
			rules[3] = Rule_matchAll.Instance;
			rulesAndSubpatterns[12+3] = Rule_matchAll.Instance;
			rules[4] = Rule_InsertHelperEdgesForNestedLayout.Instance;
			rulesAndSubpatterns[12+4] = Rule_InsertHelperEdgesForNestedLayout.Instance;
			rules[5] = Rule_LinkMethodBodyToContainedEntity.Instance;
			rulesAndSubpatterns[12+5] = Rule_LinkMethodBodyToContainedEntity.Instance;
			rules[6] = Rule_LinkMethodBodyToContainedExpressionTransitive.Instance;
			rulesAndSubpatterns[12+6] = Rule_LinkMethodBodyToContainedExpressionTransitive.Instance;
			rules[7] = Rule_RemoveMethodBodyContainsBetweenExpressions.Instance;
			rulesAndSubpatterns[12+7] = Rule_RemoveMethodBodyContainsBetweenExpressions.Instance;
			rules[8] = Rule_RetypeClassContainment.Instance;
			rulesAndSubpatterns[12+8] = Rule_RetypeClassContainment.Instance;
		}
		public override GRGEN_LGSP.LGSPRulePattern[] Rules { get { return rules; } }
		private GRGEN_LGSP.LGSPRulePattern[] rules;
		public override GRGEN_LGSP.LGSPMatchingPattern[] Subpatterns { get { return subpatterns; } }
		private GRGEN_LGSP.LGSPMatchingPattern[] subpatterns;
		public override GRGEN_LGSP.LGSPMatchingPattern[] RulesAndSubpatterns { get { return rulesAndSubpatterns; } }
		private GRGEN_LGSP.LGSPMatchingPattern[] rulesAndSubpatterns;
		public override GRGEN_LIBGR.DefinedSequenceInfo[] DefinedSequences { get { return definedSequences; } }
		private GRGEN_LIBGR.DefinedSequenceInfo[] definedSequences;
		public override GRGEN_LIBGR.FunctionInfo[] Functions { get { return functions; } }
		private GRGEN_LIBGR.FunctionInfo[] functions;
		public override GRGEN_LIBGR.ProcedureInfo[] Procedures { get { return procedures; } }
		private GRGEN_LIBGR.ProcedureInfo[] procedures;
		public override GRGEN_LIBGR.MatchClassInfo[] MatchClasses { get { return matchClasses; } }
		private GRGEN_LIBGR.MatchClassInfo[] matchClasses;
		public override string[] Packages { get { return packages; } }
		private string[] packages;
	}


    public class PatternAction_Subclasses : GRGEN_LGSP.LGSPSubpatternAction
    {
        private PatternAction_Subclasses(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Subclasses.Instance.patternGraph;
        }

        public static PatternAction_Subclasses getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            PatternAction_Subclasses newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new PatternAction_Subclasses(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(PatternAction_Subclasses oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static PatternAction_Subclasses freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private PatternAction_Subclasses next = null;

        public GRGEN_LGSP.LGSPNode Subclasses_node_c;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // SubPreset Subclasses_node_c 
            GRGEN_LGSP.LGSPNode candidate_Subclasses_node_c = Subclasses_node_c;
            // Push iterated matching task for Subclasses_iter_0
            IteratedAction_Subclasses_iter_0 taskFor_iter_0 = IteratedAction_Subclasses_iter_0.getNewTask(actionEnv, openTasks);
            taskFor_iter_0.Subclasses_node_c = candidate_Subclasses_node_c;
            taskFor_iter_0.searchPatternpath = false;
            taskFor_iter_0.matchOfNestingPattern = null;
            taskFor_iter_0.lastMatchAtPreviousNestingLevel = null;
            openTasks.Push(taskFor_iter_0);
            // Match subpatterns 
            openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
            // Pop iterated matching task for Subclasses_iter_0
            openTasks.Pop();
            IteratedAction_Subclasses_iter_0.releaseTask(taskFor_iter_0);
            // Check whether subpatterns were found 
            if(matchesList.Count>0) {
                // subpatterns/alternatives were found, extend the partial matches by our local match object
                foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                {
                    Pattern_Subclasses.Match_Subclasses match = new Pattern_Subclasses.Match_Subclasses();
                    match._node_c = candidate_Subclasses_node_c;
                    match._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Subclasses.Match_Subclasses_iter_0, Pattern_Subclasses.IMatch_Subclasses_iter_0>(null);
                    while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Subclasses.IMatch_Subclasses_iter_0) {
                        Pattern_Subclasses.Match_Subclasses_iter_0 cfpm = (Pattern_Subclasses.Match_Subclasses_iter_0)currentFoundPartialMatch.Pop();
                        if(cfpm.IsNullMatch) break;
                        cfpm.SetMatchOfEnclosingPattern(match);
                        match._iter_0.Add(cfpm);
                    }
                    currentFoundPartialMatch.Push(match);
                }
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
                // if enough matches were found, we leave
                if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                {
                    openTasks.Push(this);
                    return;
                }
                openTasks.Push(this);
                return;
            }
            openTasks.Push(this);
            return;
        }
    }
    
    public class IteratedAction_Subclasses_iter_0 : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Subclasses_iter_0(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Subclasses.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Subclasses_iter_0 getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Subclasses_iter_0 newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Subclasses_iter_0(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Subclasses_iter_0 oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Subclasses_iter_0 freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Subclasses_iter_0 next = null;

        public GRGEN_LGSP.LGSPNode Subclasses_node_c;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Subclasses_node_c 
                GRGEN_LGSP.LGSPNode candidate_Subclasses_node_c = Subclasses_node_c;
                // Extend Outgoing Subclasses_iter_0_edge__edge0 from Subclasses_node_c 
                GRGEN_LGSP.LGSPEdge head_candidate_Subclasses_iter_0_edge__edge0 = candidate_Subclasses_node_c.lgspOuthead;
                if(head_candidate_Subclasses_iter_0_edge__edge0 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_Subclasses_iter_0_edge__edge0 = head_candidate_Subclasses_iter_0_edge__edge0;
                    do
                    {
                        if(candidate_Subclasses_iter_0_edge__edge0.lgspType.TypeID!=3 && candidate_Subclasses_iter_0_edge__edge0.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_Subclasses_iter_0_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target Subclasses_iter_0_node_sub from Subclasses_iter_0_edge__edge0 
                        GRGEN_LGSP.LGSPNode candidate_Subclasses_iter_0_node_sub = candidate_Subclasses_iter_0_edge__edge0.lgspTarget;
                        if(candidate_Subclasses_iter_0_node_sub.lgspType.TypeID!=5) {
                            continue;
                        }
                        if((candidate_Subclasses_iter_0_node_sub.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                        {
                            continue;
                        }
                        if((candidate_Subclasses_iter_0_node_sub.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Element Subclass_node_sub_inlined__sub0_0 assigned from other element Subclasses_iter_0_node_sub 
                        GRGEN_LGSP.LGSPNode candidate_Subclass_node_sub_inlined__sub0_0 = candidate_Subclasses_iter_0_node_sub;
                        if(candidate_Subclass_node_sub_inlined__sub0_0.lgspType.TypeID!=5) {
                            continue;
                        }
                        // accept iterated instance match
                        ++numMatchesIter;
                        // Push subpattern matching task for _sub1_inlined__sub0_0
                        PatternAction_Subclasses taskFor__sub1_inlined__sub0_0 = PatternAction_Subclasses.getNewTask(actionEnv, openTasks);
                        taskFor__sub1_inlined__sub0_0.Subclasses_node_c = candidate_Subclass_node_sub_inlined__sub0_0;
                        taskFor__sub1_inlined__sub0_0.searchPatternpath = false;
                        taskFor__sub1_inlined__sub0_0.matchOfNestingPattern = null;
                        taskFor__sub1_inlined__sub0_0.lastMatchAtPreviousNestingLevel = null;
                        openTasks.Push(taskFor__sub1_inlined__sub0_0);
                        // Push subpattern matching task for _sub0_inlined__sub0_0
                        PatternAction_Features taskFor__sub0_inlined__sub0_0 = PatternAction_Features.getNewTask(actionEnv, openTasks);
                        taskFor__sub0_inlined__sub0_0.Features_node_c = candidate_Subclass_node_sub_inlined__sub0_0;
                        taskFor__sub0_inlined__sub0_0.searchPatternpath = false;
                        taskFor__sub0_inlined__sub0_0.matchOfNestingPattern = null;
                        taskFor__sub0_inlined__sub0_0.lastMatchAtPreviousNestingLevel = null;
                        openTasks.Push(taskFor__sub0_inlined__sub0_0);
                        uint prevGlobal__candidate_Subclasses_iter_0_node_sub;
                        prevGlobal__candidate_Subclasses_iter_0_node_sub = candidate_Subclasses_iter_0_node_sub.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_Subclasses_iter_0_node_sub.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_Subclasses_iter_0_edge__edge0;
                        prevGlobal__candidate_Subclasses_iter_0_edge__edge0 = candidate_Subclasses_iter_0_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_Subclasses_iter_0_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Pop subpattern matching task for _sub0_inlined__sub0_0
                        openTasks.Pop();
                        PatternAction_Features.releaseTask(taskFor__sub0_inlined__sub0_0);
                        // Pop subpattern matching task for _sub1_inlined__sub0_0
                        openTasks.Pop();
                        PatternAction_Subclasses.releaseTask(taskFor__sub1_inlined__sub0_0);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            patternFound = true;
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_Subclasses.Match_Subclasses_iter_0 match = new Pattern_Subclasses.Match_Subclasses_iter_0();
                                Pattern_Subclass.Match_Subclass match__sub0 = new Pattern_Subclass.Match_Subclass();
                                match__sub0.SetMatchOfEnclosingPattern(match);
                                match._node_c = candidate_Subclasses_node_c;
                                match._node_sub = candidate_Subclasses_iter_0_node_sub;
                                match__sub0._node_sub = candidate_Subclass_node_sub_inlined__sub0_0;
                                match._edge__edge0 = candidate_Subclasses_iter_0_edge__edge0;
                                match.__sub0 = match__sub0;
                                match__sub0.__sub0 = (@Pattern_Features.Match_Features)currentFoundPartialMatch.Pop();
                                match__sub0.__sub0._matchOfEnclosingPattern = match__sub0;
                                match__sub0.__sub1 = (@Pattern_Subclasses.Match_Subclasses)currentFoundPartialMatch.Pop();
                                match__sub0.__sub1._matchOfEnclosingPattern = match__sub0;
                                currentFoundPartialMatch.Push(match);
                            }
                            // if enough matches were found, we leave
                            if(true) // as soon as there's a match, it's enough for iterated
                            {
                                candidate_Subclasses_iter_0_edge__edge0.lgspFlags = candidate_Subclasses_iter_0_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Subclasses_iter_0_edge__edge0;
                                candidate_Subclasses_iter_0_node_sub.lgspFlags = candidate_Subclasses_iter_0_node_sub.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Subclasses_iter_0_node_sub;
                                --numMatchesIter;
                                goto maxMatchesIterReached;
                            }
                            candidate_Subclasses_iter_0_edge__edge0.lgspFlags = candidate_Subclasses_iter_0_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Subclasses_iter_0_edge__edge0;
                            candidate_Subclasses_iter_0_node_sub.lgspFlags = candidate_Subclasses_iter_0_node_sub.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Subclasses_iter_0_node_sub;
                            --numMatchesIter;
                            continue;
                        }
                        candidate_Subclasses_iter_0_node_sub.lgspFlags = candidate_Subclasses_iter_0_node_sub.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Subclasses_iter_0_node_sub;
                        candidate_Subclasses_iter_0_edge__edge0.lgspFlags = candidate_Subclasses_iter_0_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Subclasses_iter_0_edge__edge0;
                        --numMatchesIter;
                    }
                    while( (candidate_Subclasses_iter_0_edge__edge0 = candidate_Subclasses_iter_0_edge__edge0.lgspOutNext) != head_candidate_Subclasses_iter_0_edge__edge0 );
                }
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Subclasses.Match_Subclasses_iter_0 match = new Pattern_Subclasses.Match_Subclasses_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Subclasses.Match_Subclasses_iter_0 match = new Pattern_Subclasses.Match_Subclasses_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    public class PatternAction_Subclass : GRGEN_LGSP.LGSPSubpatternAction
    {
        private PatternAction_Subclass(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Subclass.Instance.patternGraph;
        }

        public static PatternAction_Subclass getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            PatternAction_Subclass newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new PatternAction_Subclass(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(PatternAction_Subclass oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static PatternAction_Subclass freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private PatternAction_Subclass next = null;

        public GRGEN_LGSP.LGSPNode Subclass_node_sub;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // SubPreset Subclass_node_sub 
            GRGEN_LGSP.LGSPNode candidate_Subclass_node_sub = Subclass_node_sub;
            // Element Subclasses_node_c_inlined__sub1_2 assigned from other element Subclass_node_sub 
            GRGEN_LGSP.LGSPNode candidate_Subclasses_node_c_inlined__sub1_2 = candidate_Subclass_node_sub;
            if(candidate_Subclasses_node_c_inlined__sub1_2.lgspType.TypeID!=5) {
                openTasks.Push(this);
                return;
            }
            // Element Features_node_c_inlined__sub0_1 assigned from other element Subclass_node_sub 
            GRGEN_LGSP.LGSPNode candidate_Features_node_c_inlined__sub0_1 = candidate_Subclass_node_sub;
            if(candidate_Features_node_c_inlined__sub0_1.lgspType.TypeID!=5) {
                openTasks.Push(this);
                return;
            }
            // Push iterated matching task for Subclasses_iter_0_inlined__sub1_2_in_Subclass
            IteratedAction_Subclasses_iter_0_inlined__sub1_2_in_Subclass taskFor_iter_0_inlined__sub1_2_in_Subclass = IteratedAction_Subclasses_iter_0_inlined__sub1_2_in_Subclass.getNewTask(actionEnv, openTasks);
            taskFor_iter_0_inlined__sub1_2_in_Subclass.Subclasses_node_c_inlined__sub1_2 = candidate_Subclasses_node_c_inlined__sub1_2;
            taskFor_iter_0_inlined__sub1_2_in_Subclass.searchPatternpath = false;
            taskFor_iter_0_inlined__sub1_2_in_Subclass.matchOfNestingPattern = null;
            taskFor_iter_0_inlined__sub1_2_in_Subclass.lastMatchAtPreviousNestingLevel = null;
            openTasks.Push(taskFor_iter_0_inlined__sub1_2_in_Subclass);
            // Push iterated matching task for Features_iter_0_inlined__sub0_1_in_Subclass
            IteratedAction_Features_iter_0_inlined__sub0_1_in_Subclass taskFor_iter_0_inlined__sub0_1_in_Subclass = IteratedAction_Features_iter_0_inlined__sub0_1_in_Subclass.getNewTask(actionEnv, openTasks);
            taskFor_iter_0_inlined__sub0_1_in_Subclass.Features_node_c_inlined__sub0_1 = candidate_Features_node_c_inlined__sub0_1;
            taskFor_iter_0_inlined__sub0_1_in_Subclass.searchPatternpath = false;
            taskFor_iter_0_inlined__sub0_1_in_Subclass.matchOfNestingPattern = null;
            taskFor_iter_0_inlined__sub0_1_in_Subclass.lastMatchAtPreviousNestingLevel = null;
            openTasks.Push(taskFor_iter_0_inlined__sub0_1_in_Subclass);
            // Match subpatterns 
            openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
            // Pop iterated matching task for Features_iter_0_inlined__sub0_1_in_Subclass
            openTasks.Pop();
            IteratedAction_Features_iter_0_inlined__sub0_1_in_Subclass.releaseTask(taskFor_iter_0_inlined__sub0_1_in_Subclass);
            // Pop iterated matching task for Subclasses_iter_0_inlined__sub1_2_in_Subclass
            openTasks.Pop();
            IteratedAction_Subclasses_iter_0_inlined__sub1_2_in_Subclass.releaseTask(taskFor_iter_0_inlined__sub1_2_in_Subclass);
            // Check whether subpatterns were found 
            if(matchesList.Count>0) {
                // subpatterns/alternatives were found, extend the partial matches by our local match object
                foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                {
                    Pattern_Subclass.Match_Subclass match = new Pattern_Subclass.Match_Subclass();
                    Pattern_Features.Match_Features match__sub0 = new Pattern_Features.Match_Features();
                    match__sub0.SetMatchOfEnclosingPattern(match);
                    Pattern_Subclasses.Match_Subclasses match__sub1 = new Pattern_Subclasses.Match_Subclasses();
                    match__sub1.SetMatchOfEnclosingPattern(match);
                    match._node_sub = candidate_Subclass_node_sub;
                    match__sub0._node_c = candidate_Features_node_c_inlined__sub0_1;
                    match__sub1._node_c = candidate_Subclasses_node_c_inlined__sub1_2;
                    match.__sub0 = match__sub0;
                    match.__sub1 = match__sub1;
                    match__sub0._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Features.Match_Features_iter_0, Pattern_Features.IMatch_Features_iter_0>(null);
                    while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Features.IMatch_Features_iter_0) {
                        Pattern_Features.Match_Features_iter_0 cfpm = (Pattern_Features.Match_Features_iter_0)currentFoundPartialMatch.Pop();
                        if(cfpm.IsNullMatch) break;
                        cfpm.SetMatchOfEnclosingPattern(match__sub0);
                        match__sub0._iter_0.Add(cfpm);
                    }
                    match__sub1._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Subclasses.Match_Subclasses_iter_0, Pattern_Subclasses.IMatch_Subclasses_iter_0>(null);
                    while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Subclasses.IMatch_Subclasses_iter_0) {
                        Pattern_Subclasses.Match_Subclasses_iter_0 cfpm = (Pattern_Subclasses.Match_Subclasses_iter_0)currentFoundPartialMatch.Pop();
                        if(cfpm.IsNullMatch) break;
                        cfpm.SetMatchOfEnclosingPattern(match__sub1);
                        match__sub1._iter_0.Add(cfpm);
                    }
                    currentFoundPartialMatch.Push(match);
                }
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
                // if enough matches were found, we leave
                if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                {
                    openTasks.Push(this);
                    return;
                }
                openTasks.Push(this);
                return;
            }
            openTasks.Push(this);
            return;
        }
    }
    
    public class IteratedAction_Features_iter_0_inlined__sub0_1_in_Subclass : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Features_iter_0_inlined__sub0_1_in_Subclass(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Subclass.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Features_iter_0_inlined__sub0_1_in_Subclass getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Features_iter_0_inlined__sub0_1_in_Subclass newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Features_iter_0_inlined__sub0_1_in_Subclass(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Features_iter_0_inlined__sub0_1_in_Subclass oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Features_iter_0_inlined__sub0_1_in_Subclass freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Features_iter_0_inlined__sub0_1_in_Subclass next = null;

        public GRGEN_LGSP.LGSPNode Features_node_c_inlined__sub0_1;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Features_node_c_inlined__sub0_1 
                GRGEN_LGSP.LGSPNode candidate_Features_node_c_inlined__sub0_1 = Features_node_c_inlined__sub0_1;
                // accept iterated instance match
                ++numMatchesIter;
                // Push subpattern matching task for _sub0_inlined__sub0_1
                PatternAction_FeaturePattern taskFor__sub0_inlined__sub0_1 = PatternAction_FeaturePattern.getNewTask(actionEnv, openTasks);
                taskFor__sub0_inlined__sub0_1.FeaturePattern_node_c = candidate_Features_node_c_inlined__sub0_1;
                taskFor__sub0_inlined__sub0_1.searchPatternpath = false;
                taskFor__sub0_inlined__sub0_1.matchOfNestingPattern = null;
                taskFor__sub0_inlined__sub0_1.lastMatchAtPreviousNestingLevel = null;
                openTasks.Push(taskFor__sub0_inlined__sub0_1);
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Pop subpattern matching task for _sub0_inlined__sub0_1
                openTasks.Pop();
                PatternAction_FeaturePattern.releaseTask(taskFor__sub0_inlined__sub0_1);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    patternFound = true;
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Features.Match_Features_iter_0 match = new Pattern_Features.Match_Features_iter_0();
                        match._node_c = candidate_Features_node_c_inlined__sub0_1;
                        match.__sub0 = (@Pattern_FeaturePattern.Match_FeaturePattern)currentFoundPartialMatch.Pop();
                        match.__sub0._matchOfEnclosingPattern = match;
                        currentFoundPartialMatch.Push(match);
                    }
                    // if enough matches were found, we leave
                    if(true) // as soon as there's a match, it's enough for iterated
                    {
                        --numMatchesIter;
                        continue;
                    }
                    --numMatchesIter;
                    continue;
                }
                --numMatchesIter;
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Features.Match_Features_iter_0 match = new Pattern_Features.Match_Features_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Features.Match_Features_iter_0 match = new Pattern_Features.Match_Features_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    public class IteratedAction_Subclasses_iter_0_inlined__sub1_2_in_Subclass : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Subclasses_iter_0_inlined__sub1_2_in_Subclass(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Subclass.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Subclasses_iter_0_inlined__sub1_2_in_Subclass getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Subclasses_iter_0_inlined__sub1_2_in_Subclass newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Subclasses_iter_0_inlined__sub1_2_in_Subclass(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Subclasses_iter_0_inlined__sub1_2_in_Subclass oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Subclasses_iter_0_inlined__sub1_2_in_Subclass freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Subclasses_iter_0_inlined__sub1_2_in_Subclass next = null;

        public GRGEN_LGSP.LGSPNode Subclasses_node_c_inlined__sub1_2;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Subclasses_node_c_inlined__sub1_2 
                GRGEN_LGSP.LGSPNode candidate_Subclasses_node_c_inlined__sub1_2 = Subclasses_node_c_inlined__sub1_2;
                // Extend Outgoing Subclasses_iter_0_edge__edge0_inlined__sub1_2 from Subclasses_node_c_inlined__sub1_2 
                GRGEN_LGSP.LGSPEdge head_candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2 = candidate_Subclasses_node_c_inlined__sub1_2.lgspOuthead;
                if(head_candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2 = head_candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2;
                    do
                    {
                        if(candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2.lgspType.TypeID!=3 && candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target Subclasses_iter_0_node_sub_inlined__sub1_2 from Subclasses_iter_0_edge__edge0_inlined__sub1_2 
                        GRGEN_LGSP.LGSPNode candidate_Subclasses_iter_0_node_sub_inlined__sub1_2 = candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2.lgspTarget;
                        if(candidate_Subclasses_iter_0_node_sub_inlined__sub1_2.lgspType.TypeID!=5) {
                            continue;
                        }
                        if((candidate_Subclasses_iter_0_node_sub_inlined__sub1_2.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                        {
                            continue;
                        }
                        if((candidate_Subclasses_iter_0_node_sub_inlined__sub1_2.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // accept iterated instance match
                        ++numMatchesIter;
                        // Push subpattern matching task for _sub0_inlined__sub1_2
                        PatternAction_Subclass taskFor__sub0_inlined__sub1_2 = PatternAction_Subclass.getNewTask(actionEnv, openTasks);
                        taskFor__sub0_inlined__sub1_2.Subclass_node_sub = candidate_Subclasses_iter_0_node_sub_inlined__sub1_2;
                        taskFor__sub0_inlined__sub1_2.searchPatternpath = false;
                        taskFor__sub0_inlined__sub1_2.matchOfNestingPattern = null;
                        taskFor__sub0_inlined__sub1_2.lastMatchAtPreviousNestingLevel = null;
                        openTasks.Push(taskFor__sub0_inlined__sub1_2);
                        uint prevGlobal__candidate_Subclasses_iter_0_node_sub_inlined__sub1_2;
                        prevGlobal__candidate_Subclasses_iter_0_node_sub_inlined__sub1_2 = candidate_Subclasses_iter_0_node_sub_inlined__sub1_2.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_Subclasses_iter_0_node_sub_inlined__sub1_2.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2;
                        prevGlobal__candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2 = candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Pop subpattern matching task for _sub0_inlined__sub1_2
                        openTasks.Pop();
                        PatternAction_Subclass.releaseTask(taskFor__sub0_inlined__sub1_2);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            patternFound = true;
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_Subclasses.Match_Subclasses_iter_0 match = new Pattern_Subclasses.Match_Subclasses_iter_0();
                                match._node_c = candidate_Subclasses_node_c_inlined__sub1_2;
                                match._node_sub = candidate_Subclasses_iter_0_node_sub_inlined__sub1_2;
                                match._edge__edge0 = candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2;
                                match.__sub0 = (@Pattern_Subclass.Match_Subclass)currentFoundPartialMatch.Pop();
                                match.__sub0._matchOfEnclosingPattern = match;
                                currentFoundPartialMatch.Push(match);
                            }
                            // if enough matches were found, we leave
                            if(true) // as soon as there's a match, it's enough for iterated
                            {
                                candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2.lgspFlags = candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2;
                                candidate_Subclasses_iter_0_node_sub_inlined__sub1_2.lgspFlags = candidate_Subclasses_iter_0_node_sub_inlined__sub1_2.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Subclasses_iter_0_node_sub_inlined__sub1_2;
                                --numMatchesIter;
                                goto maxMatchesIterReached;
                            }
                            candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2.lgspFlags = candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2;
                            candidate_Subclasses_iter_0_node_sub_inlined__sub1_2.lgspFlags = candidate_Subclasses_iter_0_node_sub_inlined__sub1_2.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Subclasses_iter_0_node_sub_inlined__sub1_2;
                            --numMatchesIter;
                            continue;
                        }
                        candidate_Subclasses_iter_0_node_sub_inlined__sub1_2.lgspFlags = candidate_Subclasses_iter_0_node_sub_inlined__sub1_2.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Subclasses_iter_0_node_sub_inlined__sub1_2;
                        candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2.lgspFlags = candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2;
                        --numMatchesIter;
                    }
                    while( (candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2 = candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2.lgspOutNext) != head_candidate_Subclasses_iter_0_edge__edge0_inlined__sub1_2 );
                }
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Subclasses.Match_Subclasses_iter_0 match = new Pattern_Subclasses.Match_Subclasses_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Subclasses.Match_Subclasses_iter_0 match = new Pattern_Subclasses.Match_Subclasses_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    public class PatternAction_Features : GRGEN_LGSP.LGSPSubpatternAction
    {
        private PatternAction_Features(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Features.Instance.patternGraph;
        }

        public static PatternAction_Features getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            PatternAction_Features newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new PatternAction_Features(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(PatternAction_Features oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static PatternAction_Features freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private PatternAction_Features next = null;

        public GRGEN_LGSP.LGSPNode Features_node_c;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // SubPreset Features_node_c 
            GRGEN_LGSP.LGSPNode candidate_Features_node_c = Features_node_c;
            // Push iterated matching task for Features_iter_0
            IteratedAction_Features_iter_0 taskFor_iter_0 = IteratedAction_Features_iter_0.getNewTask(actionEnv, openTasks);
            taskFor_iter_0.Features_node_c = candidate_Features_node_c;
            taskFor_iter_0.searchPatternpath = false;
            taskFor_iter_0.matchOfNestingPattern = null;
            taskFor_iter_0.lastMatchAtPreviousNestingLevel = null;
            openTasks.Push(taskFor_iter_0);
            // Match subpatterns 
            openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
            // Pop iterated matching task for Features_iter_0
            openTasks.Pop();
            IteratedAction_Features_iter_0.releaseTask(taskFor_iter_0);
            // Check whether subpatterns were found 
            if(matchesList.Count>0) {
                // subpatterns/alternatives were found, extend the partial matches by our local match object
                foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                {
                    Pattern_Features.Match_Features match = new Pattern_Features.Match_Features();
                    match._node_c = candidate_Features_node_c;
                    match._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Features.Match_Features_iter_0, Pattern_Features.IMatch_Features_iter_0>(null);
                    while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Features.IMatch_Features_iter_0) {
                        Pattern_Features.Match_Features_iter_0 cfpm = (Pattern_Features.Match_Features_iter_0)currentFoundPartialMatch.Pop();
                        if(cfpm.IsNullMatch) break;
                        cfpm.SetMatchOfEnclosingPattern(match);
                        match._iter_0.Add(cfpm);
                    }
                    currentFoundPartialMatch.Push(match);
                }
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
                // if enough matches were found, we leave
                if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                {
                    openTasks.Push(this);
                    return;
                }
                openTasks.Push(this);
                return;
            }
            openTasks.Push(this);
            return;
        }
    }
    
    public class IteratedAction_Features_iter_0 : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Features_iter_0(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Features.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Features_iter_0 getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Features_iter_0 newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Features_iter_0(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Features_iter_0 oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Features_iter_0 freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Features_iter_0 next = null;

        public GRGEN_LGSP.LGSPNode Features_node_c;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Features_node_c 
                GRGEN_LGSP.LGSPNode candidate_Features_node_c = Features_node_c;
                // Element FeaturePattern_node_c_inlined__sub0_3 assigned from other element Features_node_c 
                GRGEN_LGSP.LGSPNode candidate_FeaturePattern_node_c_inlined__sub0_3 = candidate_Features_node_c;
                if(candidate_FeaturePattern_node_c_inlined__sub0_3.lgspType.TypeID!=5) {
                    continue;
                }
                // accept iterated instance match
                ++numMatchesIter;
                // Push alternative matching task for Features_iter_0_alt_0_inlined__sub0_3_in_Features_iter_0
                AlternativeAction_Features_iter_0_alt_0_inlined__sub0_3_in_Features_iter_0 taskFor_alt_0_inlined__sub0_3_in_Features_iter_0 = AlternativeAction_Features_iter_0_alt_0_inlined__sub0_3_in_Features_iter_0.getNewTask(actionEnv, openTasks, Pattern_FeaturePattern.Instance.patternGraph.alternatives[(int)Pattern_FeaturePattern.FeaturePattern_AltNums.@alt_0].alternativeCases);
                taskFor_alt_0_inlined__sub0_3_in_Features_iter_0.FeaturePattern_node_c_inlined__sub0_3 = candidate_FeaturePattern_node_c_inlined__sub0_3;
                taskFor_alt_0_inlined__sub0_3_in_Features_iter_0.searchPatternpath = false;
                taskFor_alt_0_inlined__sub0_3_in_Features_iter_0.matchOfNestingPattern = null;
                taskFor_alt_0_inlined__sub0_3_in_Features_iter_0.lastMatchAtPreviousNestingLevel = null;
                openTasks.Push(taskFor_alt_0_inlined__sub0_3_in_Features_iter_0);
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Pop alternative matching task for Features_iter_0_alt_0_inlined__sub0_3_in_Features_iter_0
                openTasks.Pop();
                AlternativeAction_Features_iter_0_alt_0_inlined__sub0_3_in_Features_iter_0.releaseTask(taskFor_alt_0_inlined__sub0_3_in_Features_iter_0);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    patternFound = true;
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Features.Match_Features_iter_0 match = new Pattern_Features.Match_Features_iter_0();
                        Pattern_FeaturePattern.Match_FeaturePattern match__sub0 = new Pattern_FeaturePattern.Match_FeaturePattern();
                        match__sub0.SetMatchOfEnclosingPattern(match);
                        match._node_c = candidate_Features_node_c;
                        match__sub0._node_c = candidate_FeaturePattern_node_c_inlined__sub0_3;
                        match.__sub0 = match__sub0;
                        match__sub0._alt_0 = (Pattern_FeaturePattern.IMatch_FeaturePattern_alt_0)currentFoundPartialMatch.Pop();
                        match__sub0._alt_0.SetMatchOfEnclosingPattern(match__sub0);
                        currentFoundPartialMatch.Push(match);
                    }
                    // if enough matches were found, we leave
                    if(true) // as soon as there's a match, it's enough for iterated
                    {
                        --numMatchesIter;
                        continue;
                    }
                    --numMatchesIter;
                    continue;
                }
                --numMatchesIter;
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Features.Match_Features_iter_0 match = new Pattern_Features.Match_Features_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Features.Match_Features_iter_0 match = new Pattern_Features.Match_Features_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    public class AlternativeAction_Features_iter_0_alt_0_inlined__sub0_3_in_Features_iter_0 : GRGEN_LGSP.LGSPSubpatternAction
    {
        private AlternativeAction_Features_iter_0_alt_0_inlined__sub0_3_in_Features_iter_0(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_)
            : base(patternGraphs_)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
        }

        public static AlternativeAction_Features_iter_0_alt_0_inlined__sub0_3_in_Features_iter_0 getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_) {
            AlternativeAction_Features_iter_0_alt_0_inlined__sub0_3_in_Features_iter_0 newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new AlternativeAction_Features_iter_0_alt_0_inlined__sub0_3_in_Features_iter_0(actionEnv_, openTasks_, patternGraphs_);
            }
            return newTask;
        }

        public static void releaseTask(AlternativeAction_Features_iter_0_alt_0_inlined__sub0_3_in_Features_iter_0 oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static AlternativeAction_Features_iter_0_alt_0_inlined__sub0_3_in_Features_iter_0 freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private AlternativeAction_Features_iter_0_alt_0_inlined__sub0_3_in_Features_iter_0 next = null;

        public GRGEN_LGSP.LGSPNode FeaturePattern_node_c_inlined__sub0_3;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // Alternative case FeaturePattern_alt_0_MethodBody 
            do {
                patternGraph = patternGraphs[(int)Pattern_FeaturePattern.FeaturePattern_alt_0_CaseNums.@MethodBody];
                // SubPreset FeaturePattern_node_c_inlined__sub0_3 
                GRGEN_LGSP.LGSPNode candidate_FeaturePattern_node_c_inlined__sub0_3 = FeaturePattern_node_c_inlined__sub0_3;
                // Extend Outgoing FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3 from FeaturePattern_node_c_inlined__sub0_3 
                GRGEN_LGSP.LGSPEdge head_candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3 = candidate_FeaturePattern_node_c_inlined__sub0_3.lgspOuthead;
                if(head_candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3 = head_candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3;
                    do
                    {
                        if(candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3.lgspType.TypeID!=3 && candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3 from FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3 
                        GRGEN_LGSP.LGSPNode candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3 = candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3.lgspTarget;
                        if(candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3.lgspType.TypeID!=2) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Push subpattern matching task for _sub1_inlined__sub0_3
                        PatternAction_Statements taskFor__sub1_inlined__sub0_3 = PatternAction_Statements.getNewTask(actionEnv, openTasks);
                        taskFor__sub1_inlined__sub0_3.Statements_node_b = candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3;
                        taskFor__sub1_inlined__sub0_3.searchPatternpath = false;
                        taskFor__sub1_inlined__sub0_3.matchOfNestingPattern = null;
                        taskFor__sub1_inlined__sub0_3.lastMatchAtPreviousNestingLevel = null;
                        openTasks.Push(taskFor__sub1_inlined__sub0_3);
                        // Push subpattern matching task for _sub0_inlined__sub0_3
                        PatternAction_Parameters taskFor__sub0_inlined__sub0_3 = PatternAction_Parameters.getNewTask(actionEnv, openTasks);
                        taskFor__sub0_inlined__sub0_3.Parameters_node_b = candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3;
                        taskFor__sub0_inlined__sub0_3.searchPatternpath = false;
                        taskFor__sub0_inlined__sub0_3.matchOfNestingPattern = null;
                        taskFor__sub0_inlined__sub0_3.lastMatchAtPreviousNestingLevel = null;
                        openTasks.Push(taskFor__sub0_inlined__sub0_3);
                        uint prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3;
                        prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3 = candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3;
                        prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3 = candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Pop subpattern matching task for _sub0_inlined__sub0_3
                        openTasks.Pop();
                        PatternAction_Parameters.releaseTask(taskFor__sub0_inlined__sub0_3);
                        // Pop subpattern matching task for _sub1_inlined__sub0_3
                        openTasks.Pop();
                        PatternAction_Statements.releaseTask(taskFor__sub1_inlined__sub0_3);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_FeaturePattern.Match_FeaturePattern_alt_0_MethodBody match = new Pattern_FeaturePattern.Match_FeaturePattern_alt_0_MethodBody();
                                match._node_c = candidate_FeaturePattern_node_c_inlined__sub0_3;
                                match._node_b = candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3;
                                match._edge__edge0 = candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3;
                                match.__sub0 = (@Pattern_Parameters.Match_Parameters)currentFoundPartialMatch.Pop();
                                match.__sub0._matchOfEnclosingPattern = match;
                                match.__sub1 = (@Pattern_Statements.Match_Statements)currentFoundPartialMatch.Pop();
                                match.__sub1._matchOfEnclosingPattern = match;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3;
                                candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3;
                            candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3;
                            continue;
                        }
                        candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_node_b_inlined__sub0_3;
                        candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3;
                    }
                    while( (candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3 = candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3.lgspOutNext) != head_candidate_FeaturePattern_alt_0_MethodBody_edge__edge0_inlined__sub0_3 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case FeaturePattern_alt_0_MethodSignature 
            do {
                patternGraph = patternGraphs[(int)Pattern_FeaturePattern.FeaturePattern_alt_0_CaseNums.@MethodSignature];
                // SubPreset FeaturePattern_node_c_inlined__sub0_3 
                GRGEN_LGSP.LGSPNode candidate_FeaturePattern_node_c_inlined__sub0_3 = FeaturePattern_node_c_inlined__sub0_3;
                // Extend Outgoing FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3 from FeaturePattern_node_c_inlined__sub0_3 
                GRGEN_LGSP.LGSPEdge head_candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3 = candidate_FeaturePattern_node_c_inlined__sub0_3.lgspOuthead;
                if(head_candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3 = head_candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3;
                    do
                    {
                        if(candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3.lgspType.TypeID!=3 && candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3 from FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3 
                        GRGEN_LGSP.LGSPNode candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3 = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3.lgspTarget;
                        if(candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3.lgspType.TypeID!=7) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Check whether there are subpattern matching tasks left to execute
                        if(openTasks.Count==0)
                        {
                            Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                            foundPartialMatches.Add(currentFoundPartialMatch);
                            Pattern_FeaturePattern.Match_FeaturePattern_alt_0_MethodSignature match = new Pattern_FeaturePattern.Match_FeaturePattern_alt_0_MethodSignature();
                            match._node_c = candidate_FeaturePattern_node_c_inlined__sub0_3;
                            match._node__node0 = candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3;
                            match._edge__edge0 = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3;
                            currentFoundPartialMatch.Push(match);
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                openTasks.Push(this);
                                return;
                            }
                            continue;
                        }
                        uint prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3;
                        prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3 = candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3;
                        prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3 = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_FeaturePattern.Match_FeaturePattern_alt_0_MethodSignature match = new Pattern_FeaturePattern.Match_FeaturePattern_alt_0_MethodSignature();
                                match._node_c = candidate_FeaturePattern_node_c_inlined__sub0_3;
                                match._node__node0 = candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3;
                                match._edge__edge0 = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3;
                                candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3;
                            candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3;
                            continue;
                        }
                        candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_node__node0_inlined__sub0_3;
                        candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3;
                    }
                    while( (candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3 = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3.lgspOutNext) != head_candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0_inlined__sub0_3 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case FeaturePattern_alt_0_Variable 
            do {
                patternGraph = patternGraphs[(int)Pattern_FeaturePattern.FeaturePattern_alt_0_CaseNums.@Variable];
                // SubPreset FeaturePattern_node_c_inlined__sub0_3 
                GRGEN_LGSP.LGSPNode candidate_FeaturePattern_node_c_inlined__sub0_3 = FeaturePattern_node_c_inlined__sub0_3;
                // Extend Outgoing FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3 from FeaturePattern_node_c_inlined__sub0_3 
                GRGEN_LGSP.LGSPEdge head_candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3 = candidate_FeaturePattern_node_c_inlined__sub0_3.lgspOuthead;
                if(head_candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3 = head_candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3;
                    do
                    {
                        if(candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3.lgspType.TypeID!=3 && candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3 from FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3 
                        GRGEN_LGSP.LGSPNode candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3 = candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3.lgspTarget;
                        if(candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3.lgspType.TypeID!=10) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Check whether there are subpattern matching tasks left to execute
                        if(openTasks.Count==0)
                        {
                            Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                            foundPartialMatches.Add(currentFoundPartialMatch);
                            Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Variable match = new Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Variable();
                            match._node_c = candidate_FeaturePattern_node_c_inlined__sub0_3;
                            match._node__node0 = candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3;
                            match._edge__edge0 = candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3;
                            currentFoundPartialMatch.Push(match);
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                openTasks.Push(this);
                                return;
                            }
                            continue;
                        }
                        uint prevGlobal__candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3;
                        prevGlobal__candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3 = candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3;
                        prevGlobal__candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3 = candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Variable match = new Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Variable();
                                match._node_c = candidate_FeaturePattern_node_c_inlined__sub0_3;
                                match._node__node0 = candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3;
                                match._edge__edge0 = candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3;
                                candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3;
                            candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3;
                            continue;
                        }
                        candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Variable_node__node0_inlined__sub0_3;
                        candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3;
                    }
                    while( (candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3 = candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3.lgspOutNext) != head_candidate_FeaturePattern_alt_0_Variable_edge__edge0_inlined__sub0_3 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case FeaturePattern_alt_0_Konstante 
            do {
                patternGraph = patternGraphs[(int)Pattern_FeaturePattern.FeaturePattern_alt_0_CaseNums.@Konstante];
                // SubPreset FeaturePattern_node_c_inlined__sub0_3 
                GRGEN_LGSP.LGSPNode candidate_FeaturePattern_node_c_inlined__sub0_3 = FeaturePattern_node_c_inlined__sub0_3;
                // Extend Outgoing FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3 from FeaturePattern_node_c_inlined__sub0_3 
                GRGEN_LGSP.LGSPEdge head_candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3 = candidate_FeaturePattern_node_c_inlined__sub0_3.lgspOuthead;
                if(head_candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3 = head_candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3;
                    do
                    {
                        if(candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3.lgspType.TypeID!=3 && candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3 from FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3 
                        GRGEN_LGSP.LGSPNode candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3 = candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3.lgspTarget;
                        if(candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3.lgspType.TypeID!=9) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Check whether there are subpattern matching tasks left to execute
                        if(openTasks.Count==0)
                        {
                            Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                            foundPartialMatches.Add(currentFoundPartialMatch);
                            Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Konstante match = new Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Konstante();
                            match._node_c = candidate_FeaturePattern_node_c_inlined__sub0_3;
                            match._node__node0 = candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3;
                            match._edge__edge0 = candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3;
                            currentFoundPartialMatch.Push(match);
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                openTasks.Push(this);
                                return;
                            }
                            continue;
                        }
                        uint prevGlobal__candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3;
                        prevGlobal__candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3 = candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3;
                        prevGlobal__candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3 = candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Konstante match = new Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Konstante();
                                match._node_c = candidate_FeaturePattern_node_c_inlined__sub0_3;
                                match._node__node0 = candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3;
                                match._edge__edge0 = candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3;
                                candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3;
                            candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3;
                            continue;
                        }
                        candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Konstante_node__node0_inlined__sub0_3;
                        candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3.lgspFlags = candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3;
                    }
                    while( (candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3 = candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3.lgspOutNext) != head_candidate_FeaturePattern_alt_0_Konstante_edge__edge0_inlined__sub0_3 );
                }
            } while(false);
            openTasks.Push(this);
            return;
        }
    }
    
    public class PatternAction_FeaturePattern : GRGEN_LGSP.LGSPSubpatternAction
    {
        private PatternAction_FeaturePattern(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_FeaturePattern.Instance.patternGraph;
        }

        public static PatternAction_FeaturePattern getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            PatternAction_FeaturePattern newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new PatternAction_FeaturePattern(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(PatternAction_FeaturePattern oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static PatternAction_FeaturePattern freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private PatternAction_FeaturePattern next = null;

        public GRGEN_LGSP.LGSPNode FeaturePattern_node_c;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // SubPreset FeaturePattern_node_c 
            GRGEN_LGSP.LGSPNode candidate_FeaturePattern_node_c = FeaturePattern_node_c;
            // Push alternative matching task for FeaturePattern_alt_0
            AlternativeAction_FeaturePattern_alt_0 taskFor_alt_0 = AlternativeAction_FeaturePattern_alt_0.getNewTask(actionEnv, openTasks, Pattern_FeaturePattern.Instance.patternGraph.alternatives[(int)Pattern_FeaturePattern.FeaturePattern_AltNums.@alt_0].alternativeCases);
            taskFor_alt_0.FeaturePattern_node_c = candidate_FeaturePattern_node_c;
            taskFor_alt_0.searchPatternpath = false;
            taskFor_alt_0.matchOfNestingPattern = null;
            taskFor_alt_0.lastMatchAtPreviousNestingLevel = null;
            openTasks.Push(taskFor_alt_0);
            // Match subpatterns 
            openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
            // Pop alternative matching task for FeaturePattern_alt_0
            openTasks.Pop();
            AlternativeAction_FeaturePattern_alt_0.releaseTask(taskFor_alt_0);
            // Check whether subpatterns were found 
            if(matchesList.Count>0) {
                // subpatterns/alternatives were found, extend the partial matches by our local match object
                foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                {
                    Pattern_FeaturePattern.Match_FeaturePattern match = new Pattern_FeaturePattern.Match_FeaturePattern();
                    match._node_c = candidate_FeaturePattern_node_c;
                    match._alt_0 = (Pattern_FeaturePattern.IMatch_FeaturePattern_alt_0)currentFoundPartialMatch.Pop();
                    match._alt_0.SetMatchOfEnclosingPattern(match);
                    currentFoundPartialMatch.Push(match);
                }
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
                // if enough matches were found, we leave
                if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                {
                    openTasks.Push(this);
                    return;
                }
                openTasks.Push(this);
                return;
            }
            openTasks.Push(this);
            return;
        }
    }
    
    public class AlternativeAction_FeaturePattern_alt_0 : GRGEN_LGSP.LGSPSubpatternAction
    {
        private AlternativeAction_FeaturePattern_alt_0(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_)
            : base(patternGraphs_)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
        }

        public static AlternativeAction_FeaturePattern_alt_0 getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_) {
            AlternativeAction_FeaturePattern_alt_0 newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new AlternativeAction_FeaturePattern_alt_0(actionEnv_, openTasks_, patternGraphs_);
            }
            return newTask;
        }

        public static void releaseTask(AlternativeAction_FeaturePattern_alt_0 oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static AlternativeAction_FeaturePattern_alt_0 freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private AlternativeAction_FeaturePattern_alt_0 next = null;

        public GRGEN_LGSP.LGSPNode FeaturePattern_node_c;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // Alternative case FeaturePattern_alt_0_MethodBody 
            do {
                patternGraph = patternGraphs[(int)Pattern_FeaturePattern.FeaturePattern_alt_0_CaseNums.@MethodBody];
                // SubPreset FeaturePattern_node_c 
                GRGEN_LGSP.LGSPNode candidate_FeaturePattern_node_c = FeaturePattern_node_c;
                // Extend Outgoing FeaturePattern_alt_0_MethodBody_edge__edge0 from FeaturePattern_node_c 
                GRGEN_LGSP.LGSPEdge head_candidate_FeaturePattern_alt_0_MethodBody_edge__edge0 = candidate_FeaturePattern_node_c.lgspOuthead;
                if(head_candidate_FeaturePattern_alt_0_MethodBody_edge__edge0 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_FeaturePattern_alt_0_MethodBody_edge__edge0 = head_candidate_FeaturePattern_alt_0_MethodBody_edge__edge0;
                    do
                    {
                        if(candidate_FeaturePattern_alt_0_MethodBody_edge__edge0.lgspType.TypeID!=3 && candidate_FeaturePattern_alt_0_MethodBody_edge__edge0.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_MethodBody_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target FeaturePattern_alt_0_MethodBody_node_b from FeaturePattern_alt_0_MethodBody_edge__edge0 
                        GRGEN_LGSP.LGSPNode candidate_FeaturePattern_alt_0_MethodBody_node_b = candidate_FeaturePattern_alt_0_MethodBody_edge__edge0.lgspTarget;
                        if(candidate_FeaturePattern_alt_0_MethodBody_node_b.lgspType.TypeID!=2) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_MethodBody_node_b.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Element Statements_node_b_inlined__sub1_5 assigned from other element FeaturePattern_alt_0_MethodBody_node_b 
                        GRGEN_LGSP.LGSPNode candidate_Statements_node_b_inlined__sub1_5 = candidate_FeaturePattern_alt_0_MethodBody_node_b;
                        if(candidate_Statements_node_b_inlined__sub1_5.lgspType.TypeID!=2) {
                            continue;
                        }
                        // Element Parameters_node_b_inlined__sub0_4 assigned from other element FeaturePattern_alt_0_MethodBody_node_b 
                        GRGEN_LGSP.LGSPNode candidate_Parameters_node_b_inlined__sub0_4 = candidate_FeaturePattern_alt_0_MethodBody_node_b;
                        if(candidate_Parameters_node_b_inlined__sub0_4.lgspType.TypeID!=2) {
                            continue;
                        }
                        // Push iterated matching task for Statements_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody
                        IteratedAction_Statements_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody taskFor_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody = IteratedAction_Statements_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody.getNewTask(actionEnv, openTasks);
                        taskFor_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody.Statements_node_b_inlined__sub1_5 = candidate_Statements_node_b_inlined__sub1_5;
                        taskFor_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody.searchPatternpath = false;
                        taskFor_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody.matchOfNestingPattern = null;
                        taskFor_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody.lastMatchAtPreviousNestingLevel = null;
                        openTasks.Push(taskFor_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody);
                        // Push iterated matching task for Parameters_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody
                        IteratedAction_Parameters_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody taskFor_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody = IteratedAction_Parameters_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody.getNewTask(actionEnv, openTasks);
                        taskFor_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody.Parameters_node_b_inlined__sub0_4 = candidate_Parameters_node_b_inlined__sub0_4;
                        taskFor_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody.searchPatternpath = false;
                        taskFor_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody.matchOfNestingPattern = null;
                        taskFor_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody.lastMatchAtPreviousNestingLevel = null;
                        openTasks.Push(taskFor_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody);
                        uint prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_node_b;
                        prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_node_b = candidate_FeaturePattern_alt_0_MethodBody_node_b.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_MethodBody_node_b.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_edge__edge0;
                        prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_edge__edge0 = candidate_FeaturePattern_alt_0_MethodBody_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_MethodBody_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Pop iterated matching task for Parameters_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody
                        openTasks.Pop();
                        IteratedAction_Parameters_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody.releaseTask(taskFor_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody);
                        // Pop iterated matching task for Statements_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody
                        openTasks.Pop();
                        IteratedAction_Statements_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody.releaseTask(taskFor_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_FeaturePattern.Match_FeaturePattern_alt_0_MethodBody match = new Pattern_FeaturePattern.Match_FeaturePattern_alt_0_MethodBody();
                                Pattern_Parameters.Match_Parameters match__sub0 = new Pattern_Parameters.Match_Parameters();
                                match__sub0.SetMatchOfEnclosingPattern(match);
                                Pattern_Statements.Match_Statements match__sub1 = new Pattern_Statements.Match_Statements();
                                match__sub1.SetMatchOfEnclosingPattern(match);
                                match._node_c = candidate_FeaturePattern_node_c;
                                match._node_b = candidate_FeaturePattern_alt_0_MethodBody_node_b;
                                match__sub0._node_b = candidate_Parameters_node_b_inlined__sub0_4;
                                match__sub1._node_b = candidate_Statements_node_b_inlined__sub1_5;
                                match._edge__edge0 = candidate_FeaturePattern_alt_0_MethodBody_edge__edge0;
                                match.__sub0 = match__sub0;
                                match.__sub1 = match__sub1;
                                match__sub0._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Parameters.Match_Parameters_iter_0, Pattern_Parameters.IMatch_Parameters_iter_0>(null);
                                while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Parameters.IMatch_Parameters_iter_0) {
                                    Pattern_Parameters.Match_Parameters_iter_0 cfpm = (Pattern_Parameters.Match_Parameters_iter_0)currentFoundPartialMatch.Pop();
                                    if(cfpm.IsNullMatch) break;
                                    cfpm.SetMatchOfEnclosingPattern(match__sub0);
                                    match__sub0._iter_0.Add(cfpm);
                                }
                                match__sub1._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Statements.Match_Statements_iter_0, Pattern_Statements.IMatch_Statements_iter_0>(null);
                                while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Statements.IMatch_Statements_iter_0) {
                                    Pattern_Statements.Match_Statements_iter_0 cfpm = (Pattern_Statements.Match_Statements_iter_0)currentFoundPartialMatch.Pop();
                                    if(cfpm.IsNullMatch) break;
                                    cfpm.SetMatchOfEnclosingPattern(match__sub1);
                                    match__sub1._iter_0.Add(cfpm);
                                }
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_FeaturePattern_alt_0_MethodBody_edge__edge0.lgspFlags = candidate_FeaturePattern_alt_0_MethodBody_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_edge__edge0;
                                candidate_FeaturePattern_alt_0_MethodBody_node_b.lgspFlags = candidate_FeaturePattern_alt_0_MethodBody_node_b.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_node_b;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_FeaturePattern_alt_0_MethodBody_edge__edge0.lgspFlags = candidate_FeaturePattern_alt_0_MethodBody_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_edge__edge0;
                            candidate_FeaturePattern_alt_0_MethodBody_node_b.lgspFlags = candidate_FeaturePattern_alt_0_MethodBody_node_b.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_node_b;
                            continue;
                        }
                        candidate_FeaturePattern_alt_0_MethodBody_node_b.lgspFlags = candidate_FeaturePattern_alt_0_MethodBody_node_b.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_node_b;
                        candidate_FeaturePattern_alt_0_MethodBody_edge__edge0.lgspFlags = candidate_FeaturePattern_alt_0_MethodBody_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodBody_edge__edge0;
                    }
                    while( (candidate_FeaturePattern_alt_0_MethodBody_edge__edge0 = candidate_FeaturePattern_alt_0_MethodBody_edge__edge0.lgspOutNext) != head_candidate_FeaturePattern_alt_0_MethodBody_edge__edge0 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case FeaturePattern_alt_0_MethodSignature 
            do {
                patternGraph = patternGraphs[(int)Pattern_FeaturePattern.FeaturePattern_alt_0_CaseNums.@MethodSignature];
                // SubPreset FeaturePattern_node_c 
                GRGEN_LGSP.LGSPNode candidate_FeaturePattern_node_c = FeaturePattern_node_c;
                // Extend Outgoing FeaturePattern_alt_0_MethodSignature_edge__edge0 from FeaturePattern_node_c 
                GRGEN_LGSP.LGSPEdge head_candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0 = candidate_FeaturePattern_node_c.lgspOuthead;
                if(head_candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0 = head_candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0;
                    do
                    {
                        if(candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0.lgspType.TypeID!=3 && candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target FeaturePattern_alt_0_MethodSignature_node__node0 from FeaturePattern_alt_0_MethodSignature_edge__edge0 
                        GRGEN_LGSP.LGSPNode candidate_FeaturePattern_alt_0_MethodSignature_node__node0 = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0.lgspTarget;
                        if(candidate_FeaturePattern_alt_0_MethodSignature_node__node0.lgspType.TypeID!=7) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_MethodSignature_node__node0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Check whether there are subpattern matching tasks left to execute
                        if(openTasks.Count==0)
                        {
                            Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                            foundPartialMatches.Add(currentFoundPartialMatch);
                            Pattern_FeaturePattern.Match_FeaturePattern_alt_0_MethodSignature match = new Pattern_FeaturePattern.Match_FeaturePattern_alt_0_MethodSignature();
                            match._node_c = candidate_FeaturePattern_node_c;
                            match._node__node0 = candidate_FeaturePattern_alt_0_MethodSignature_node__node0;
                            match._edge__edge0 = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0;
                            currentFoundPartialMatch.Push(match);
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                openTasks.Push(this);
                                return;
                            }
                            continue;
                        }
                        uint prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_node__node0;
                        prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_node__node0 = candidate_FeaturePattern_alt_0_MethodSignature_node__node0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_MethodSignature_node__node0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0;
                        prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0 = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_FeaturePattern.Match_FeaturePattern_alt_0_MethodSignature match = new Pattern_FeaturePattern.Match_FeaturePattern_alt_0_MethodSignature();
                                match._node_c = candidate_FeaturePattern_node_c;
                                match._node__node0 = candidate_FeaturePattern_alt_0_MethodSignature_node__node0;
                                match._edge__edge0 = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0.lgspFlags = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0;
                                candidate_FeaturePattern_alt_0_MethodSignature_node__node0.lgspFlags = candidate_FeaturePattern_alt_0_MethodSignature_node__node0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_node__node0;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0.lgspFlags = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0;
                            candidate_FeaturePattern_alt_0_MethodSignature_node__node0.lgspFlags = candidate_FeaturePattern_alt_0_MethodSignature_node__node0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_node__node0;
                            continue;
                        }
                        candidate_FeaturePattern_alt_0_MethodSignature_node__node0.lgspFlags = candidate_FeaturePattern_alt_0_MethodSignature_node__node0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_node__node0;
                        candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0.lgspFlags = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0;
                    }
                    while( (candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0 = candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0.lgspOutNext) != head_candidate_FeaturePattern_alt_0_MethodSignature_edge__edge0 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case FeaturePattern_alt_0_Variable 
            do {
                patternGraph = patternGraphs[(int)Pattern_FeaturePattern.FeaturePattern_alt_0_CaseNums.@Variable];
                // SubPreset FeaturePattern_node_c 
                GRGEN_LGSP.LGSPNode candidate_FeaturePattern_node_c = FeaturePattern_node_c;
                // Extend Outgoing FeaturePattern_alt_0_Variable_edge__edge0 from FeaturePattern_node_c 
                GRGEN_LGSP.LGSPEdge head_candidate_FeaturePattern_alt_0_Variable_edge__edge0 = candidate_FeaturePattern_node_c.lgspOuthead;
                if(head_candidate_FeaturePattern_alt_0_Variable_edge__edge0 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_FeaturePattern_alt_0_Variable_edge__edge0 = head_candidate_FeaturePattern_alt_0_Variable_edge__edge0;
                    do
                    {
                        if(candidate_FeaturePattern_alt_0_Variable_edge__edge0.lgspType.TypeID!=3 && candidate_FeaturePattern_alt_0_Variable_edge__edge0.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_Variable_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target FeaturePattern_alt_0_Variable_node__node0 from FeaturePattern_alt_0_Variable_edge__edge0 
                        GRGEN_LGSP.LGSPNode candidate_FeaturePattern_alt_0_Variable_node__node0 = candidate_FeaturePattern_alt_0_Variable_edge__edge0.lgspTarget;
                        if(candidate_FeaturePattern_alt_0_Variable_node__node0.lgspType.TypeID!=10) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_Variable_node__node0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Check whether there are subpattern matching tasks left to execute
                        if(openTasks.Count==0)
                        {
                            Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                            foundPartialMatches.Add(currentFoundPartialMatch);
                            Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Variable match = new Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Variable();
                            match._node_c = candidate_FeaturePattern_node_c;
                            match._node__node0 = candidate_FeaturePattern_alt_0_Variable_node__node0;
                            match._edge__edge0 = candidate_FeaturePattern_alt_0_Variable_edge__edge0;
                            currentFoundPartialMatch.Push(match);
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                openTasks.Push(this);
                                return;
                            }
                            continue;
                        }
                        uint prevGlobal__candidate_FeaturePattern_alt_0_Variable_node__node0;
                        prevGlobal__candidate_FeaturePattern_alt_0_Variable_node__node0 = candidate_FeaturePattern_alt_0_Variable_node__node0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_Variable_node__node0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_FeaturePattern_alt_0_Variable_edge__edge0;
                        prevGlobal__candidate_FeaturePattern_alt_0_Variable_edge__edge0 = candidate_FeaturePattern_alt_0_Variable_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_Variable_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Variable match = new Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Variable();
                                match._node_c = candidate_FeaturePattern_node_c;
                                match._node__node0 = candidate_FeaturePattern_alt_0_Variable_node__node0;
                                match._edge__edge0 = candidate_FeaturePattern_alt_0_Variable_edge__edge0;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_FeaturePattern_alt_0_Variable_edge__edge0.lgspFlags = candidate_FeaturePattern_alt_0_Variable_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Variable_edge__edge0;
                                candidate_FeaturePattern_alt_0_Variable_node__node0.lgspFlags = candidate_FeaturePattern_alt_0_Variable_node__node0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Variable_node__node0;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_FeaturePattern_alt_0_Variable_edge__edge0.lgspFlags = candidate_FeaturePattern_alt_0_Variable_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Variable_edge__edge0;
                            candidate_FeaturePattern_alt_0_Variable_node__node0.lgspFlags = candidate_FeaturePattern_alt_0_Variable_node__node0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Variable_node__node0;
                            continue;
                        }
                        candidate_FeaturePattern_alt_0_Variable_node__node0.lgspFlags = candidate_FeaturePattern_alt_0_Variable_node__node0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Variable_node__node0;
                        candidate_FeaturePattern_alt_0_Variable_edge__edge0.lgspFlags = candidate_FeaturePattern_alt_0_Variable_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Variable_edge__edge0;
                    }
                    while( (candidate_FeaturePattern_alt_0_Variable_edge__edge0 = candidate_FeaturePattern_alt_0_Variable_edge__edge0.lgspOutNext) != head_candidate_FeaturePattern_alt_0_Variable_edge__edge0 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case FeaturePattern_alt_0_Konstante 
            do {
                patternGraph = patternGraphs[(int)Pattern_FeaturePattern.FeaturePattern_alt_0_CaseNums.@Konstante];
                // SubPreset FeaturePattern_node_c 
                GRGEN_LGSP.LGSPNode candidate_FeaturePattern_node_c = FeaturePattern_node_c;
                // Extend Outgoing FeaturePattern_alt_0_Konstante_edge__edge0 from FeaturePattern_node_c 
                GRGEN_LGSP.LGSPEdge head_candidate_FeaturePattern_alt_0_Konstante_edge__edge0 = candidate_FeaturePattern_node_c.lgspOuthead;
                if(head_candidate_FeaturePattern_alt_0_Konstante_edge__edge0 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_FeaturePattern_alt_0_Konstante_edge__edge0 = head_candidate_FeaturePattern_alt_0_Konstante_edge__edge0;
                    do
                    {
                        if(candidate_FeaturePattern_alt_0_Konstante_edge__edge0.lgspType.TypeID!=3 && candidate_FeaturePattern_alt_0_Konstante_edge__edge0.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_Konstante_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target FeaturePattern_alt_0_Konstante_node__node0 from FeaturePattern_alt_0_Konstante_edge__edge0 
                        GRGEN_LGSP.LGSPNode candidate_FeaturePattern_alt_0_Konstante_node__node0 = candidate_FeaturePattern_alt_0_Konstante_edge__edge0.lgspTarget;
                        if(candidate_FeaturePattern_alt_0_Konstante_node__node0.lgspType.TypeID!=9) {
                            continue;
                        }
                        if((candidate_FeaturePattern_alt_0_Konstante_node__node0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Check whether there are subpattern matching tasks left to execute
                        if(openTasks.Count==0)
                        {
                            Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                            foundPartialMatches.Add(currentFoundPartialMatch);
                            Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Konstante match = new Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Konstante();
                            match._node_c = candidate_FeaturePattern_node_c;
                            match._node__node0 = candidate_FeaturePattern_alt_0_Konstante_node__node0;
                            match._edge__edge0 = candidate_FeaturePattern_alt_0_Konstante_edge__edge0;
                            currentFoundPartialMatch.Push(match);
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                openTasks.Push(this);
                                return;
                            }
                            continue;
                        }
                        uint prevGlobal__candidate_FeaturePattern_alt_0_Konstante_node__node0;
                        prevGlobal__candidate_FeaturePattern_alt_0_Konstante_node__node0 = candidate_FeaturePattern_alt_0_Konstante_node__node0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_Konstante_node__node0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_FeaturePattern_alt_0_Konstante_edge__edge0;
                        prevGlobal__candidate_FeaturePattern_alt_0_Konstante_edge__edge0 = candidate_FeaturePattern_alt_0_Konstante_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_FeaturePattern_alt_0_Konstante_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Konstante match = new Pattern_FeaturePattern.Match_FeaturePattern_alt_0_Konstante();
                                match._node_c = candidate_FeaturePattern_node_c;
                                match._node__node0 = candidate_FeaturePattern_alt_0_Konstante_node__node0;
                                match._edge__edge0 = candidate_FeaturePattern_alt_0_Konstante_edge__edge0;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_FeaturePattern_alt_0_Konstante_edge__edge0.lgspFlags = candidate_FeaturePattern_alt_0_Konstante_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Konstante_edge__edge0;
                                candidate_FeaturePattern_alt_0_Konstante_node__node0.lgspFlags = candidate_FeaturePattern_alt_0_Konstante_node__node0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Konstante_node__node0;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_FeaturePattern_alt_0_Konstante_edge__edge0.lgspFlags = candidate_FeaturePattern_alt_0_Konstante_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Konstante_edge__edge0;
                            candidate_FeaturePattern_alt_0_Konstante_node__node0.lgspFlags = candidate_FeaturePattern_alt_0_Konstante_node__node0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Konstante_node__node0;
                            continue;
                        }
                        candidate_FeaturePattern_alt_0_Konstante_node__node0.lgspFlags = candidate_FeaturePattern_alt_0_Konstante_node__node0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Konstante_node__node0;
                        candidate_FeaturePattern_alt_0_Konstante_edge__edge0.lgspFlags = candidate_FeaturePattern_alt_0_Konstante_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_FeaturePattern_alt_0_Konstante_edge__edge0;
                    }
                    while( (candidate_FeaturePattern_alt_0_Konstante_edge__edge0 = candidate_FeaturePattern_alt_0_Konstante_edge__edge0.lgspOutNext) != head_candidate_FeaturePattern_alt_0_Konstante_edge__edge0 );
                }
            } while(false);
            openTasks.Push(this);
            return;
        }
    }
    
    public class IteratedAction_Parameters_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Parameters_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_FeaturePattern.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Parameters_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Parameters_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Parameters_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Parameters_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Parameters_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Parameters_iter_0_inlined__sub0_4_in_FeaturePattern_alt_0_MethodBody next = null;

        public GRGEN_LGSP.LGSPNode Parameters_node_b_inlined__sub0_4;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Parameters_node_b_inlined__sub0_4 
                GRGEN_LGSP.LGSPNode candidate_Parameters_node_b_inlined__sub0_4 = Parameters_node_b_inlined__sub0_4;
                // accept iterated instance match
                ++numMatchesIter;
                // Push subpattern matching task for _sub0_inlined__sub0_4
                PatternAction_Parameter taskFor__sub0_inlined__sub0_4 = PatternAction_Parameter.getNewTask(actionEnv, openTasks);
                taskFor__sub0_inlined__sub0_4.Parameter_node_b = candidate_Parameters_node_b_inlined__sub0_4;
                taskFor__sub0_inlined__sub0_4.searchPatternpath = false;
                taskFor__sub0_inlined__sub0_4.matchOfNestingPattern = null;
                taskFor__sub0_inlined__sub0_4.lastMatchAtPreviousNestingLevel = null;
                openTasks.Push(taskFor__sub0_inlined__sub0_4);
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Pop subpattern matching task for _sub0_inlined__sub0_4
                openTasks.Pop();
                PatternAction_Parameter.releaseTask(taskFor__sub0_inlined__sub0_4);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    patternFound = true;
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Parameters.Match_Parameters_iter_0 match = new Pattern_Parameters.Match_Parameters_iter_0();
                        match._node_b = candidate_Parameters_node_b_inlined__sub0_4;
                        match.__sub0 = (@Pattern_Parameter.Match_Parameter)currentFoundPartialMatch.Pop();
                        match.__sub0._matchOfEnclosingPattern = match;
                        currentFoundPartialMatch.Push(match);
                    }
                    // if enough matches were found, we leave
                    if(true) // as soon as there's a match, it's enough for iterated
                    {
                        --numMatchesIter;
                        continue;
                    }
                    --numMatchesIter;
                    continue;
                }
                --numMatchesIter;
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Parameters.Match_Parameters_iter_0 match = new Pattern_Parameters.Match_Parameters_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Parameters.Match_Parameters_iter_0 match = new Pattern_Parameters.Match_Parameters_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    public class IteratedAction_Statements_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Statements_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_FeaturePattern.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Statements_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Statements_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Statements_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Statements_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Statements_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Statements_iter_0_inlined__sub1_5_in_FeaturePattern_alt_0_MethodBody next = null;

        public GRGEN_LGSP.LGSPNode Statements_node_b_inlined__sub1_5;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Statements_node_b_inlined__sub1_5 
                GRGEN_LGSP.LGSPNode candidate_Statements_node_b_inlined__sub1_5 = Statements_node_b_inlined__sub1_5;
                // accept iterated instance match
                ++numMatchesIter;
                // Push subpattern matching task for _sub0_inlined__sub1_5
                PatternAction_Statement taskFor__sub0_inlined__sub1_5 = PatternAction_Statement.getNewTask(actionEnv, openTasks);
                taskFor__sub0_inlined__sub1_5.Statement_node_b = candidate_Statements_node_b_inlined__sub1_5;
                taskFor__sub0_inlined__sub1_5.searchPatternpath = false;
                taskFor__sub0_inlined__sub1_5.matchOfNestingPattern = null;
                taskFor__sub0_inlined__sub1_5.lastMatchAtPreviousNestingLevel = null;
                openTasks.Push(taskFor__sub0_inlined__sub1_5);
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Pop subpattern matching task for _sub0_inlined__sub1_5
                openTasks.Pop();
                PatternAction_Statement.releaseTask(taskFor__sub0_inlined__sub1_5);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    patternFound = true;
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Statements.Match_Statements_iter_0 match = new Pattern_Statements.Match_Statements_iter_0();
                        match._node_b = candidate_Statements_node_b_inlined__sub1_5;
                        match.__sub0 = (@Pattern_Statement.Match_Statement)currentFoundPartialMatch.Pop();
                        match.__sub0._matchOfEnclosingPattern = match;
                        currentFoundPartialMatch.Push(match);
                    }
                    // if enough matches were found, we leave
                    if(true) // as soon as there's a match, it's enough for iterated
                    {
                        --numMatchesIter;
                        continue;
                    }
                    --numMatchesIter;
                    continue;
                }
                --numMatchesIter;
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Statements.Match_Statements_iter_0 match = new Pattern_Statements.Match_Statements_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Statements.Match_Statements_iter_0 match = new Pattern_Statements.Match_Statements_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    public class PatternAction_Parameters : GRGEN_LGSP.LGSPSubpatternAction
    {
        private PatternAction_Parameters(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Parameters.Instance.patternGraph;
        }

        public static PatternAction_Parameters getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            PatternAction_Parameters newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new PatternAction_Parameters(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(PatternAction_Parameters oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static PatternAction_Parameters freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private PatternAction_Parameters next = null;

        public GRGEN_LGSP.LGSPNode Parameters_node_b;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // SubPreset Parameters_node_b 
            GRGEN_LGSP.LGSPNode candidate_Parameters_node_b = Parameters_node_b;
            // Push iterated matching task for Parameters_iter_0
            IteratedAction_Parameters_iter_0 taskFor_iter_0 = IteratedAction_Parameters_iter_0.getNewTask(actionEnv, openTasks);
            taskFor_iter_0.Parameters_node_b = candidate_Parameters_node_b;
            taskFor_iter_0.searchPatternpath = false;
            taskFor_iter_0.matchOfNestingPattern = null;
            taskFor_iter_0.lastMatchAtPreviousNestingLevel = null;
            openTasks.Push(taskFor_iter_0);
            // Match subpatterns 
            openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
            // Pop iterated matching task for Parameters_iter_0
            openTasks.Pop();
            IteratedAction_Parameters_iter_0.releaseTask(taskFor_iter_0);
            // Check whether subpatterns were found 
            if(matchesList.Count>0) {
                // subpatterns/alternatives were found, extend the partial matches by our local match object
                foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                {
                    Pattern_Parameters.Match_Parameters match = new Pattern_Parameters.Match_Parameters();
                    match._node_b = candidate_Parameters_node_b;
                    match._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Parameters.Match_Parameters_iter_0, Pattern_Parameters.IMatch_Parameters_iter_0>(null);
                    while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Parameters.IMatch_Parameters_iter_0) {
                        Pattern_Parameters.Match_Parameters_iter_0 cfpm = (Pattern_Parameters.Match_Parameters_iter_0)currentFoundPartialMatch.Pop();
                        if(cfpm.IsNullMatch) break;
                        cfpm.SetMatchOfEnclosingPattern(match);
                        match._iter_0.Add(cfpm);
                    }
                    currentFoundPartialMatch.Push(match);
                }
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
                // if enough matches were found, we leave
                if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                {
                    openTasks.Push(this);
                    return;
                }
                openTasks.Push(this);
                return;
            }
            openTasks.Push(this);
            return;
        }
    }
    
    public class IteratedAction_Parameters_iter_0 : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Parameters_iter_0(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Parameters.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Parameters_iter_0 getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Parameters_iter_0 newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Parameters_iter_0(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Parameters_iter_0 oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Parameters_iter_0 freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Parameters_iter_0 next = null;

        public GRGEN_LGSP.LGSPNode Parameters_node_b;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Parameters_node_b 
                GRGEN_LGSP.LGSPNode candidate_Parameters_node_b = Parameters_node_b;
                // Element Parameter_node_b_inlined__sub0_6 assigned from other element Parameters_node_b 
                GRGEN_LGSP.LGSPNode candidate_Parameter_node_b_inlined__sub0_6 = candidate_Parameters_node_b;
                if(candidate_Parameter_node_b_inlined__sub0_6.lgspType.TypeID!=2) {
                    continue;
                }
                // accept iterated instance match
                ++numMatchesIter;
                // Push alternative matching task for Parameters_iter_0_alt_0_inlined__sub0_6_in_Parameters_iter_0
                AlternativeAction_Parameters_iter_0_alt_0_inlined__sub0_6_in_Parameters_iter_0 taskFor_alt_0_inlined__sub0_6_in_Parameters_iter_0 = AlternativeAction_Parameters_iter_0_alt_0_inlined__sub0_6_in_Parameters_iter_0.getNewTask(actionEnv, openTasks, Pattern_Parameter.Instance.patternGraph.alternatives[(int)Pattern_Parameter.Parameter_AltNums.@alt_0].alternativeCases);
                taskFor_alt_0_inlined__sub0_6_in_Parameters_iter_0.Parameter_node_b_inlined__sub0_6 = candidate_Parameter_node_b_inlined__sub0_6;
                taskFor_alt_0_inlined__sub0_6_in_Parameters_iter_0.searchPatternpath = false;
                taskFor_alt_0_inlined__sub0_6_in_Parameters_iter_0.matchOfNestingPattern = null;
                taskFor_alt_0_inlined__sub0_6_in_Parameters_iter_0.lastMatchAtPreviousNestingLevel = null;
                openTasks.Push(taskFor_alt_0_inlined__sub0_6_in_Parameters_iter_0);
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Pop alternative matching task for Parameters_iter_0_alt_0_inlined__sub0_6_in_Parameters_iter_0
                openTasks.Pop();
                AlternativeAction_Parameters_iter_0_alt_0_inlined__sub0_6_in_Parameters_iter_0.releaseTask(taskFor_alt_0_inlined__sub0_6_in_Parameters_iter_0);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    patternFound = true;
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Parameters.Match_Parameters_iter_0 match = new Pattern_Parameters.Match_Parameters_iter_0();
                        Pattern_Parameter.Match_Parameter match__sub0 = new Pattern_Parameter.Match_Parameter();
                        match__sub0.SetMatchOfEnclosingPattern(match);
                        match._node_b = candidate_Parameters_node_b;
                        match__sub0._node_b = candidate_Parameter_node_b_inlined__sub0_6;
                        match.__sub0 = match__sub0;
                        match__sub0._alt_0 = (Pattern_Parameter.IMatch_Parameter_alt_0)currentFoundPartialMatch.Pop();
                        match__sub0._alt_0.SetMatchOfEnclosingPattern(match__sub0);
                        currentFoundPartialMatch.Push(match);
                    }
                    // if enough matches were found, we leave
                    if(true) // as soon as there's a match, it's enough for iterated
                    {
                        --numMatchesIter;
                        continue;
                    }
                    --numMatchesIter;
                    continue;
                }
                --numMatchesIter;
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Parameters.Match_Parameters_iter_0 match = new Pattern_Parameters.Match_Parameters_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Parameters.Match_Parameters_iter_0 match = new Pattern_Parameters.Match_Parameters_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    public class AlternativeAction_Parameters_iter_0_alt_0_inlined__sub0_6_in_Parameters_iter_0 : GRGEN_LGSP.LGSPSubpatternAction
    {
        private AlternativeAction_Parameters_iter_0_alt_0_inlined__sub0_6_in_Parameters_iter_0(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_)
            : base(patternGraphs_)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
        }

        public static AlternativeAction_Parameters_iter_0_alt_0_inlined__sub0_6_in_Parameters_iter_0 getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_) {
            AlternativeAction_Parameters_iter_0_alt_0_inlined__sub0_6_in_Parameters_iter_0 newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new AlternativeAction_Parameters_iter_0_alt_0_inlined__sub0_6_in_Parameters_iter_0(actionEnv_, openTasks_, patternGraphs_);
            }
            return newTask;
        }

        public static void releaseTask(AlternativeAction_Parameters_iter_0_alt_0_inlined__sub0_6_in_Parameters_iter_0 oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static AlternativeAction_Parameters_iter_0_alt_0_inlined__sub0_6_in_Parameters_iter_0 freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private AlternativeAction_Parameters_iter_0_alt_0_inlined__sub0_6_in_Parameters_iter_0 next = null;

        public GRGEN_LGSP.LGSPNode Parameter_node_b_inlined__sub0_6;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // Alternative case Parameter_alt_0_Variable 
            do {
                patternGraph = patternGraphs[(int)Pattern_Parameter.Parameter_alt_0_CaseNums.@Variable];
                // SubPreset Parameter_node_b_inlined__sub0_6 
                GRGEN_LGSP.LGSPNode candidate_Parameter_node_b_inlined__sub0_6 = Parameter_node_b_inlined__sub0_6;
                // Extend Outgoing Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6 from Parameter_node_b_inlined__sub0_6 
                GRGEN_LGSP.LGSPEdge head_candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6 = candidate_Parameter_node_b_inlined__sub0_6.lgspOuthead;
                if(head_candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6 = head_candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6;
                    do
                    {
                        if(candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6.lgspType.TypeID!=3 && candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target Parameter_alt_0_Variable_node_v_inlined__sub0_6 from Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6 
                        GRGEN_LGSP.LGSPNode candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6 = candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6.lgspTarget;
                        if(candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6.lgspType.TypeID!=10) {
                            continue;
                        }
                        if((candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Check whether there are subpattern matching tasks left to execute
                        if(openTasks.Count==0)
                        {
                            Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                            foundPartialMatches.Add(currentFoundPartialMatch);
                            Pattern_Parameter.Match_Parameter_alt_0_Variable match = new Pattern_Parameter.Match_Parameter_alt_0_Variable();
                            match._node_b = candidate_Parameter_node_b_inlined__sub0_6;
                            match._node_v = candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6;
                            match._edge__edge0 = candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6;
                            currentFoundPartialMatch.Push(match);
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                openTasks.Push(this);
                                return;
                            }
                            continue;
                        }
                        uint prevGlobal__candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6;
                        prevGlobal__candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6 = candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6;
                        prevGlobal__candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6 = candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_Parameter.Match_Parameter_alt_0_Variable match = new Pattern_Parameter.Match_Parameter_alt_0_Variable();
                                match._node_b = candidate_Parameter_node_b_inlined__sub0_6;
                                match._node_v = candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6;
                                match._edge__edge0 = candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6.lgspFlags = candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6;
                                candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6.lgspFlags = candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6.lgspFlags = candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6;
                            candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6.lgspFlags = candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6;
                            continue;
                        }
                        candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6.lgspFlags = candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Variable_node_v_inlined__sub0_6;
                        candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6.lgspFlags = candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6;
                    }
                    while( (candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6 = candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6.lgspOutNext) != head_candidate_Parameter_alt_0_Variable_edge__edge0_inlined__sub0_6 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case Parameter_alt_0_Konstante 
            do {
                patternGraph = patternGraphs[(int)Pattern_Parameter.Parameter_alt_0_CaseNums.@Konstante];
                // SubPreset Parameter_node_b_inlined__sub0_6 
                GRGEN_LGSP.LGSPNode candidate_Parameter_node_b_inlined__sub0_6 = Parameter_node_b_inlined__sub0_6;
                // Extend Outgoing Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6 from Parameter_node_b_inlined__sub0_6 
                GRGEN_LGSP.LGSPEdge head_candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6 = candidate_Parameter_node_b_inlined__sub0_6.lgspOuthead;
                if(head_candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6 = head_candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6;
                    do
                    {
                        if(candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6.lgspType.TypeID!=3 && candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target Parameter_alt_0_Konstante_node_c_inlined__sub0_6 from Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6 
                        GRGEN_LGSP.LGSPNode candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6 = candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6.lgspTarget;
                        if(candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6.lgspType.TypeID!=9) {
                            continue;
                        }
                        if((candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Check whether there are subpattern matching tasks left to execute
                        if(openTasks.Count==0)
                        {
                            Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                            foundPartialMatches.Add(currentFoundPartialMatch);
                            Pattern_Parameter.Match_Parameter_alt_0_Konstante match = new Pattern_Parameter.Match_Parameter_alt_0_Konstante();
                            match._node_b = candidate_Parameter_node_b_inlined__sub0_6;
                            match._node_c = candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6;
                            match._edge__edge0 = candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6;
                            currentFoundPartialMatch.Push(match);
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                openTasks.Push(this);
                                return;
                            }
                            continue;
                        }
                        uint prevGlobal__candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6;
                        prevGlobal__candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6 = candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6;
                        prevGlobal__candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6 = candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_Parameter.Match_Parameter_alt_0_Konstante match = new Pattern_Parameter.Match_Parameter_alt_0_Konstante();
                                match._node_b = candidate_Parameter_node_b_inlined__sub0_6;
                                match._node_c = candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6;
                                match._edge__edge0 = candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6.lgspFlags = candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6;
                                candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6.lgspFlags = candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6.lgspFlags = candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6;
                            candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6.lgspFlags = candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6;
                            continue;
                        }
                        candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6.lgspFlags = candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Konstante_node_c_inlined__sub0_6;
                        candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6.lgspFlags = candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6;
                    }
                    while( (candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6 = candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6.lgspOutNext) != head_candidate_Parameter_alt_0_Konstante_edge__edge0_inlined__sub0_6 );
                }
            } while(false);
            openTasks.Push(this);
            return;
        }
    }
    
    public class PatternAction_Parameter : GRGEN_LGSP.LGSPSubpatternAction
    {
        private PatternAction_Parameter(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Parameter.Instance.patternGraph;
        }

        public static PatternAction_Parameter getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            PatternAction_Parameter newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new PatternAction_Parameter(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(PatternAction_Parameter oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static PatternAction_Parameter freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private PatternAction_Parameter next = null;

        public GRGEN_LGSP.LGSPNode Parameter_node_b;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // SubPreset Parameter_node_b 
            GRGEN_LGSP.LGSPNode candidate_Parameter_node_b = Parameter_node_b;
            // Push alternative matching task for Parameter_alt_0
            AlternativeAction_Parameter_alt_0 taskFor_alt_0 = AlternativeAction_Parameter_alt_0.getNewTask(actionEnv, openTasks, Pattern_Parameter.Instance.patternGraph.alternatives[(int)Pattern_Parameter.Parameter_AltNums.@alt_0].alternativeCases);
            taskFor_alt_0.Parameter_node_b = candidate_Parameter_node_b;
            taskFor_alt_0.searchPatternpath = false;
            taskFor_alt_0.matchOfNestingPattern = null;
            taskFor_alt_0.lastMatchAtPreviousNestingLevel = null;
            openTasks.Push(taskFor_alt_0);
            // Match subpatterns 
            openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
            // Pop alternative matching task for Parameter_alt_0
            openTasks.Pop();
            AlternativeAction_Parameter_alt_0.releaseTask(taskFor_alt_0);
            // Check whether subpatterns were found 
            if(matchesList.Count>0) {
                // subpatterns/alternatives were found, extend the partial matches by our local match object
                foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                {
                    Pattern_Parameter.Match_Parameter match = new Pattern_Parameter.Match_Parameter();
                    match._node_b = candidate_Parameter_node_b;
                    match._alt_0 = (Pattern_Parameter.IMatch_Parameter_alt_0)currentFoundPartialMatch.Pop();
                    match._alt_0.SetMatchOfEnclosingPattern(match);
                    currentFoundPartialMatch.Push(match);
                }
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
                // if enough matches were found, we leave
                if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                {
                    openTasks.Push(this);
                    return;
                }
                openTasks.Push(this);
                return;
            }
            openTasks.Push(this);
            return;
        }
    }
    
    public class AlternativeAction_Parameter_alt_0 : GRGEN_LGSP.LGSPSubpatternAction
    {
        private AlternativeAction_Parameter_alt_0(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_)
            : base(patternGraphs_)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
        }

        public static AlternativeAction_Parameter_alt_0 getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_) {
            AlternativeAction_Parameter_alt_0 newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new AlternativeAction_Parameter_alt_0(actionEnv_, openTasks_, patternGraphs_);
            }
            return newTask;
        }

        public static void releaseTask(AlternativeAction_Parameter_alt_0 oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static AlternativeAction_Parameter_alt_0 freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private AlternativeAction_Parameter_alt_0 next = null;

        public GRGEN_LGSP.LGSPNode Parameter_node_b;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // Alternative case Parameter_alt_0_Variable 
            do {
                patternGraph = patternGraphs[(int)Pattern_Parameter.Parameter_alt_0_CaseNums.@Variable];
                // SubPreset Parameter_node_b 
                GRGEN_LGSP.LGSPNode candidate_Parameter_node_b = Parameter_node_b;
                // Extend Outgoing Parameter_alt_0_Variable_edge__edge0 from Parameter_node_b 
                GRGEN_LGSP.LGSPEdge head_candidate_Parameter_alt_0_Variable_edge__edge0 = candidate_Parameter_node_b.lgspOuthead;
                if(head_candidate_Parameter_alt_0_Variable_edge__edge0 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_Parameter_alt_0_Variable_edge__edge0 = head_candidate_Parameter_alt_0_Variable_edge__edge0;
                    do
                    {
                        if(candidate_Parameter_alt_0_Variable_edge__edge0.lgspType.TypeID!=3 && candidate_Parameter_alt_0_Variable_edge__edge0.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_Parameter_alt_0_Variable_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target Parameter_alt_0_Variable_node_v from Parameter_alt_0_Variable_edge__edge0 
                        GRGEN_LGSP.LGSPNode candidate_Parameter_alt_0_Variable_node_v = candidate_Parameter_alt_0_Variable_edge__edge0.lgspTarget;
                        if(candidate_Parameter_alt_0_Variable_node_v.lgspType.TypeID!=10) {
                            continue;
                        }
                        if((candidate_Parameter_alt_0_Variable_node_v.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Check whether there are subpattern matching tasks left to execute
                        if(openTasks.Count==0)
                        {
                            Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                            foundPartialMatches.Add(currentFoundPartialMatch);
                            Pattern_Parameter.Match_Parameter_alt_0_Variable match = new Pattern_Parameter.Match_Parameter_alt_0_Variable();
                            match._node_b = candidate_Parameter_node_b;
                            match._node_v = candidate_Parameter_alt_0_Variable_node_v;
                            match._edge__edge0 = candidate_Parameter_alt_0_Variable_edge__edge0;
                            currentFoundPartialMatch.Push(match);
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                openTasks.Push(this);
                                return;
                            }
                            continue;
                        }
                        uint prevGlobal__candidate_Parameter_alt_0_Variable_node_v;
                        prevGlobal__candidate_Parameter_alt_0_Variable_node_v = candidate_Parameter_alt_0_Variable_node_v.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_Parameter_alt_0_Variable_node_v.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_Parameter_alt_0_Variable_edge__edge0;
                        prevGlobal__candidate_Parameter_alt_0_Variable_edge__edge0 = candidate_Parameter_alt_0_Variable_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_Parameter_alt_0_Variable_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_Parameter.Match_Parameter_alt_0_Variable match = new Pattern_Parameter.Match_Parameter_alt_0_Variable();
                                match._node_b = candidate_Parameter_node_b;
                                match._node_v = candidate_Parameter_alt_0_Variable_node_v;
                                match._edge__edge0 = candidate_Parameter_alt_0_Variable_edge__edge0;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_Parameter_alt_0_Variable_edge__edge0.lgspFlags = candidate_Parameter_alt_0_Variable_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Variable_edge__edge0;
                                candidate_Parameter_alt_0_Variable_node_v.lgspFlags = candidate_Parameter_alt_0_Variable_node_v.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Variable_node_v;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_Parameter_alt_0_Variable_edge__edge0.lgspFlags = candidate_Parameter_alt_0_Variable_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Variable_edge__edge0;
                            candidate_Parameter_alt_0_Variable_node_v.lgspFlags = candidate_Parameter_alt_0_Variable_node_v.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Variable_node_v;
                            continue;
                        }
                        candidate_Parameter_alt_0_Variable_node_v.lgspFlags = candidate_Parameter_alt_0_Variable_node_v.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Variable_node_v;
                        candidate_Parameter_alt_0_Variable_edge__edge0.lgspFlags = candidate_Parameter_alt_0_Variable_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Variable_edge__edge0;
                    }
                    while( (candidate_Parameter_alt_0_Variable_edge__edge0 = candidate_Parameter_alt_0_Variable_edge__edge0.lgspOutNext) != head_candidate_Parameter_alt_0_Variable_edge__edge0 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case Parameter_alt_0_Konstante 
            do {
                patternGraph = patternGraphs[(int)Pattern_Parameter.Parameter_alt_0_CaseNums.@Konstante];
                // SubPreset Parameter_node_b 
                GRGEN_LGSP.LGSPNode candidate_Parameter_node_b = Parameter_node_b;
                // Extend Outgoing Parameter_alt_0_Konstante_edge__edge0 from Parameter_node_b 
                GRGEN_LGSP.LGSPEdge head_candidate_Parameter_alt_0_Konstante_edge__edge0 = candidate_Parameter_node_b.lgspOuthead;
                if(head_candidate_Parameter_alt_0_Konstante_edge__edge0 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_Parameter_alt_0_Konstante_edge__edge0 = head_candidate_Parameter_alt_0_Konstante_edge__edge0;
                    do
                    {
                        if(candidate_Parameter_alt_0_Konstante_edge__edge0.lgspType.TypeID!=3 && candidate_Parameter_alt_0_Konstante_edge__edge0.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_Parameter_alt_0_Konstante_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target Parameter_alt_0_Konstante_node_c from Parameter_alt_0_Konstante_edge__edge0 
                        GRGEN_LGSP.LGSPNode candidate_Parameter_alt_0_Konstante_node_c = candidate_Parameter_alt_0_Konstante_edge__edge0.lgspTarget;
                        if(candidate_Parameter_alt_0_Konstante_node_c.lgspType.TypeID!=9) {
                            continue;
                        }
                        if((candidate_Parameter_alt_0_Konstante_node_c.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Check whether there are subpattern matching tasks left to execute
                        if(openTasks.Count==0)
                        {
                            Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                            foundPartialMatches.Add(currentFoundPartialMatch);
                            Pattern_Parameter.Match_Parameter_alt_0_Konstante match = new Pattern_Parameter.Match_Parameter_alt_0_Konstante();
                            match._node_b = candidate_Parameter_node_b;
                            match._node_c = candidate_Parameter_alt_0_Konstante_node_c;
                            match._edge__edge0 = candidate_Parameter_alt_0_Konstante_edge__edge0;
                            currentFoundPartialMatch.Push(match);
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                openTasks.Push(this);
                                return;
                            }
                            continue;
                        }
                        uint prevGlobal__candidate_Parameter_alt_0_Konstante_node_c;
                        prevGlobal__candidate_Parameter_alt_0_Konstante_node_c = candidate_Parameter_alt_0_Konstante_node_c.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_Parameter_alt_0_Konstante_node_c.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_Parameter_alt_0_Konstante_edge__edge0;
                        prevGlobal__candidate_Parameter_alt_0_Konstante_edge__edge0 = candidate_Parameter_alt_0_Konstante_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_Parameter_alt_0_Konstante_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_Parameter.Match_Parameter_alt_0_Konstante match = new Pattern_Parameter.Match_Parameter_alt_0_Konstante();
                                match._node_b = candidate_Parameter_node_b;
                                match._node_c = candidate_Parameter_alt_0_Konstante_node_c;
                                match._edge__edge0 = candidate_Parameter_alt_0_Konstante_edge__edge0;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_Parameter_alt_0_Konstante_edge__edge0.lgspFlags = candidate_Parameter_alt_0_Konstante_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Konstante_edge__edge0;
                                candidate_Parameter_alt_0_Konstante_node_c.lgspFlags = candidate_Parameter_alt_0_Konstante_node_c.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Konstante_node_c;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_Parameter_alt_0_Konstante_edge__edge0.lgspFlags = candidate_Parameter_alt_0_Konstante_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Konstante_edge__edge0;
                            candidate_Parameter_alt_0_Konstante_node_c.lgspFlags = candidate_Parameter_alt_0_Konstante_node_c.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Konstante_node_c;
                            continue;
                        }
                        candidate_Parameter_alt_0_Konstante_node_c.lgspFlags = candidate_Parameter_alt_0_Konstante_node_c.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Konstante_node_c;
                        candidate_Parameter_alt_0_Konstante_edge__edge0.lgspFlags = candidate_Parameter_alt_0_Konstante_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Parameter_alt_0_Konstante_edge__edge0;
                    }
                    while( (candidate_Parameter_alt_0_Konstante_edge__edge0 = candidate_Parameter_alt_0_Konstante_edge__edge0.lgspOutNext) != head_candidate_Parameter_alt_0_Konstante_edge__edge0 );
                }
            } while(false);
            openTasks.Push(this);
            return;
        }
    }
    
    public class PatternAction_Statements : GRGEN_LGSP.LGSPSubpatternAction
    {
        private PatternAction_Statements(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Statements.Instance.patternGraph;
        }

        public static PatternAction_Statements getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            PatternAction_Statements newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new PatternAction_Statements(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(PatternAction_Statements oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static PatternAction_Statements freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private PatternAction_Statements next = null;

        public GRGEN_LGSP.LGSPNode Statements_node_b;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // SubPreset Statements_node_b 
            GRGEN_LGSP.LGSPNode candidate_Statements_node_b = Statements_node_b;
            // Push iterated matching task for Statements_iter_0
            IteratedAction_Statements_iter_0 taskFor_iter_0 = IteratedAction_Statements_iter_0.getNewTask(actionEnv, openTasks);
            taskFor_iter_0.Statements_node_b = candidate_Statements_node_b;
            taskFor_iter_0.searchPatternpath = false;
            taskFor_iter_0.matchOfNestingPattern = null;
            taskFor_iter_0.lastMatchAtPreviousNestingLevel = null;
            openTasks.Push(taskFor_iter_0);
            // Match subpatterns 
            openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
            // Pop iterated matching task for Statements_iter_0
            openTasks.Pop();
            IteratedAction_Statements_iter_0.releaseTask(taskFor_iter_0);
            // Check whether subpatterns were found 
            if(matchesList.Count>0) {
                // subpatterns/alternatives were found, extend the partial matches by our local match object
                foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                {
                    Pattern_Statements.Match_Statements match = new Pattern_Statements.Match_Statements();
                    match._node_b = candidate_Statements_node_b;
                    match._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Statements.Match_Statements_iter_0, Pattern_Statements.IMatch_Statements_iter_0>(null);
                    while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Statements.IMatch_Statements_iter_0) {
                        Pattern_Statements.Match_Statements_iter_0 cfpm = (Pattern_Statements.Match_Statements_iter_0)currentFoundPartialMatch.Pop();
                        if(cfpm.IsNullMatch) break;
                        cfpm.SetMatchOfEnclosingPattern(match);
                        match._iter_0.Add(cfpm);
                    }
                    currentFoundPartialMatch.Push(match);
                }
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
                // if enough matches were found, we leave
                if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                {
                    openTasks.Push(this);
                    return;
                }
                openTasks.Push(this);
                return;
            }
            openTasks.Push(this);
            return;
        }
    }
    
    public class IteratedAction_Statements_iter_0 : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Statements_iter_0(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Statements.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Statements_iter_0 getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Statements_iter_0 newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Statements_iter_0(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Statements_iter_0 oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Statements_iter_0 freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Statements_iter_0 next = null;

        public GRGEN_LGSP.LGSPNode Statements_node_b;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Statements_node_b 
                GRGEN_LGSP.LGSPNode candidate_Statements_node_b = Statements_node_b;
                // Element Statement_node_b_inlined__sub0_7 assigned from other element Statements_node_b 
                GRGEN_LGSP.LGSPNode candidate_Statement_node_b_inlined__sub0_7 = candidate_Statements_node_b;
                if(candidate_Statement_node_b_inlined__sub0_7.lgspType.TypeID!=2) {
                    continue;
                }
                // accept iterated instance match
                ++numMatchesIter;
                // Push alternative matching task for Statements_iter_0_alt_0_inlined__sub0_7_in_Statements_iter_0
                AlternativeAction_Statements_iter_0_alt_0_inlined__sub0_7_in_Statements_iter_0 taskFor_alt_0_inlined__sub0_7_in_Statements_iter_0 = AlternativeAction_Statements_iter_0_alt_0_inlined__sub0_7_in_Statements_iter_0.getNewTask(actionEnv, openTasks, Pattern_Statement.Instance.patternGraph.alternatives[(int)Pattern_Statement.Statement_AltNums.@alt_0].alternativeCases);
                taskFor_alt_0_inlined__sub0_7_in_Statements_iter_0.Statement_node_b_inlined__sub0_7 = candidate_Statement_node_b_inlined__sub0_7;
                taskFor_alt_0_inlined__sub0_7_in_Statements_iter_0.searchPatternpath = false;
                taskFor_alt_0_inlined__sub0_7_in_Statements_iter_0.matchOfNestingPattern = null;
                taskFor_alt_0_inlined__sub0_7_in_Statements_iter_0.lastMatchAtPreviousNestingLevel = null;
                openTasks.Push(taskFor_alt_0_inlined__sub0_7_in_Statements_iter_0);
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Pop alternative matching task for Statements_iter_0_alt_0_inlined__sub0_7_in_Statements_iter_0
                openTasks.Pop();
                AlternativeAction_Statements_iter_0_alt_0_inlined__sub0_7_in_Statements_iter_0.releaseTask(taskFor_alt_0_inlined__sub0_7_in_Statements_iter_0);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    patternFound = true;
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Statements.Match_Statements_iter_0 match = new Pattern_Statements.Match_Statements_iter_0();
                        Pattern_Statement.Match_Statement match__sub0 = new Pattern_Statement.Match_Statement();
                        match__sub0.SetMatchOfEnclosingPattern(match);
                        match._node_b = candidate_Statements_node_b;
                        match__sub0._node_b = candidate_Statement_node_b_inlined__sub0_7;
                        match.__sub0 = match__sub0;
                        match__sub0._alt_0 = (Pattern_Statement.IMatch_Statement_alt_0)currentFoundPartialMatch.Pop();
                        match__sub0._alt_0.SetMatchOfEnclosingPattern(match__sub0);
                        currentFoundPartialMatch.Push(match);
                    }
                    // if enough matches were found, we leave
                    if(true) // as soon as there's a match, it's enough for iterated
                    {
                        --numMatchesIter;
                        continue;
                    }
                    --numMatchesIter;
                    continue;
                }
                --numMatchesIter;
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Statements.Match_Statements_iter_0 match = new Pattern_Statements.Match_Statements_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Statements.Match_Statements_iter_0 match = new Pattern_Statements.Match_Statements_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    public class AlternativeAction_Statements_iter_0_alt_0_inlined__sub0_7_in_Statements_iter_0 : GRGEN_LGSP.LGSPSubpatternAction
    {
        private AlternativeAction_Statements_iter_0_alt_0_inlined__sub0_7_in_Statements_iter_0(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_)
            : base(patternGraphs_)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
        }

        public static AlternativeAction_Statements_iter_0_alt_0_inlined__sub0_7_in_Statements_iter_0 getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_) {
            AlternativeAction_Statements_iter_0_alt_0_inlined__sub0_7_in_Statements_iter_0 newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new AlternativeAction_Statements_iter_0_alt_0_inlined__sub0_7_in_Statements_iter_0(actionEnv_, openTasks_, patternGraphs_);
            }
            return newTask;
        }

        public static void releaseTask(AlternativeAction_Statements_iter_0_alt_0_inlined__sub0_7_in_Statements_iter_0 oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static AlternativeAction_Statements_iter_0_alt_0_inlined__sub0_7_in_Statements_iter_0 freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private AlternativeAction_Statements_iter_0_alt_0_inlined__sub0_7_in_Statements_iter_0 next = null;

        public GRGEN_LGSP.LGSPNode Statement_node_b_inlined__sub0_7;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // Alternative case Statement_alt_0_Assignment 
            do {
                patternGraph = patternGraphs[(int)Pattern_Statement.Statement_alt_0_CaseNums.@Assignment];
                // SubPreset Statement_node_b_inlined__sub0_7 
                GRGEN_LGSP.LGSPNode candidate_Statement_node_b_inlined__sub0_7 = Statement_node_b_inlined__sub0_7;
                // Extend Outgoing Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7 from Statement_node_b_inlined__sub0_7 
                GRGEN_LGSP.LGSPEdge head_candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7 = candidate_Statement_node_b_inlined__sub0_7.lgspOuthead;
                if(head_candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7 = head_candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7;
                    do
                    {
                        if(candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7.lgspType.TypeID!=3 && candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target Statement_alt_0_Assignment_node_e_inlined__sub0_7 from Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7 
                        GRGEN_LGSP.LGSPNode candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7 = candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7.lgspTarget;
                        if(candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7.lgspType.TypeID!=3) {
                            continue;
                        }
                        if((candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Extend Outgoing Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7 from Statement_alt_0_Assignment_node_e_inlined__sub0_7 
                        GRGEN_LGSP.LGSPEdge head_candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7 = candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7.lgspOuthead;
                        if(head_candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7 != null)
                        {
                            GRGEN_LGSP.LGSPEdge candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7 = head_candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7;
                            do
                            {
                                if(candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7.lgspType.TypeID!=8) {
                                    continue;
                                }
                                if((candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                                {
                                    continue;
                                }
                                // Push subpattern matching task for _sub0_inlined__sub0_7
                                PatternAction_ExpressionPattern taskFor__sub0_inlined__sub0_7 = PatternAction_ExpressionPattern.getNewTask(actionEnv, openTasks);
                                taskFor__sub0_inlined__sub0_7.ExpressionPattern_node_e = candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7;
                                taskFor__sub0_inlined__sub0_7.searchPatternpath = false;
                                taskFor__sub0_inlined__sub0_7.matchOfNestingPattern = null;
                                taskFor__sub0_inlined__sub0_7.lastMatchAtPreviousNestingLevel = null;
                                openTasks.Push(taskFor__sub0_inlined__sub0_7);
                                uint prevGlobal__candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7;
                                prevGlobal__candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7 = candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                uint prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7;
                                prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7 = candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                uint prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7;
                                prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7 = candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                // Match subpatterns 
                                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                                // Pop subpattern matching task for _sub0_inlined__sub0_7
                                openTasks.Pop();
                                PatternAction_ExpressionPattern.releaseTask(taskFor__sub0_inlined__sub0_7);
                                // Check whether subpatterns were found 
                                if(matchesList.Count>0) {
                                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                                    {
                                        Pattern_Statement.Match_Statement_alt_0_Assignment match = new Pattern_Statement.Match_Statement_alt_0_Assignment();
                                        match._node_b = candidate_Statement_node_b_inlined__sub0_7;
                                        match._node_e = candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7;
                                        match._edge__edge0 = candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7;
                                        match._edge__edge1 = candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7;
                                        match.__sub0 = (@Pattern_ExpressionPattern.Match_ExpressionPattern)currentFoundPartialMatch.Pop();
                                        match.__sub0._matchOfEnclosingPattern = match;
                                        currentFoundPartialMatch.Push(match);
                                    }
                                    if(matchesList==foundPartialMatches) {
                                        matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                                    } else {
                                        foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                            foundPartialMatches.Add(match);
                                        }
                                        matchesList.Clear();
                                    }
                                    // if enough matches were found, we leave
                                    if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                                    {
                                        candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7;
                                        candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7;
                                        candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7;
                                        openTasks.Push(this);
                                        return;
                                    }
                                    candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7;
                                    candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7;
                                    candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7;
                                    continue;
                                }
                                candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_node_e_inlined__sub0_7;
                                candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7;
                                candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7;
                            }
                            while( (candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7 = candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7.lgspOutNext) != head_candidate_Statement_alt_0_Assignment_edge__edge1_inlined__sub0_7 );
                        }
                    }
                    while( (candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7 = candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7.lgspOutNext) != head_candidate_Statement_alt_0_Assignment_edge__edge0_inlined__sub0_7 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case Statement_alt_0_Call 
            do {
                patternGraph = patternGraphs[(int)Pattern_Statement.Statement_alt_0_CaseNums.@Call];
                // SubPreset Statement_node_b_inlined__sub0_7 
                GRGEN_LGSP.LGSPNode candidate_Statement_node_b_inlined__sub0_7 = Statement_node_b_inlined__sub0_7;
                // Extend Outgoing Statement_alt_0_Call_edge__edge0_inlined__sub0_7 from Statement_node_b_inlined__sub0_7 
                GRGEN_LGSP.LGSPEdge head_candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7 = candidate_Statement_node_b_inlined__sub0_7.lgspOuthead;
                if(head_candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7 = head_candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7;
                    do
                    {
                        if(candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7.lgspType.TypeID!=3 && candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target Statement_alt_0_Call_node_e_inlined__sub0_7 from Statement_alt_0_Call_edge__edge0_inlined__sub0_7 
                        GRGEN_LGSP.LGSPNode candidate_Statement_alt_0_Call_node_e_inlined__sub0_7 = candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7.lgspTarget;
                        if(candidate_Statement_alt_0_Call_node_e_inlined__sub0_7.lgspType.TypeID!=3) {
                            continue;
                        }
                        if((candidate_Statement_alt_0_Call_node_e_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Extend Outgoing Statement_alt_0_Call_edge__edge1_inlined__sub0_7 from Statement_alt_0_Call_node_e_inlined__sub0_7 
                        GRGEN_LGSP.LGSPEdge head_candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7 = candidate_Statement_alt_0_Call_node_e_inlined__sub0_7.lgspOuthead;
                        if(head_candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7 != null)
                        {
                            GRGEN_LGSP.LGSPEdge candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7 = head_candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7;
                            do
                            {
                                if(candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7.lgspType.TypeID!=9) {
                                    continue;
                                }
                                if((candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                                {
                                    continue;
                                }
                                // Push subpattern matching task for _sub0_inlined__sub0_7
                                PatternAction_Expressions taskFor__sub0_inlined__sub0_7 = PatternAction_Expressions.getNewTask(actionEnv, openTasks);
                                taskFor__sub0_inlined__sub0_7.Expressions_node_e = candidate_Statement_alt_0_Call_node_e_inlined__sub0_7;
                                taskFor__sub0_inlined__sub0_7.searchPatternpath = false;
                                taskFor__sub0_inlined__sub0_7.matchOfNestingPattern = null;
                                taskFor__sub0_inlined__sub0_7.lastMatchAtPreviousNestingLevel = null;
                                openTasks.Push(taskFor__sub0_inlined__sub0_7);
                                uint prevGlobal__candidate_Statement_alt_0_Call_node_e_inlined__sub0_7;
                                prevGlobal__candidate_Statement_alt_0_Call_node_e_inlined__sub0_7 = candidate_Statement_alt_0_Call_node_e_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Call_node_e_inlined__sub0_7.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                uint prevGlobal__candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7;
                                prevGlobal__candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7 = candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                uint prevGlobal__candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7;
                                prevGlobal__candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7 = candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                // Match subpatterns 
                                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                                // Pop subpattern matching task for _sub0_inlined__sub0_7
                                openTasks.Pop();
                                PatternAction_Expressions.releaseTask(taskFor__sub0_inlined__sub0_7);
                                // Check whether subpatterns were found 
                                if(matchesList.Count>0) {
                                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                                    {
                                        Pattern_Statement.Match_Statement_alt_0_Call match = new Pattern_Statement.Match_Statement_alt_0_Call();
                                        match._node_b = candidate_Statement_node_b_inlined__sub0_7;
                                        match._node_e = candidate_Statement_alt_0_Call_node_e_inlined__sub0_7;
                                        match._edge__edge0 = candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7;
                                        match._edge__edge1 = candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7;
                                        match.__sub0 = (@Pattern_Expressions.Match_Expressions)currentFoundPartialMatch.Pop();
                                        match.__sub0._matchOfEnclosingPattern = match;
                                        currentFoundPartialMatch.Push(match);
                                    }
                                    if(matchesList==foundPartialMatches) {
                                        matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                                    } else {
                                        foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                            foundPartialMatches.Add(match);
                                        }
                                        matchesList.Clear();
                                    }
                                    // if enough matches were found, we leave
                                    if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                                    {
                                        candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7;
                                        candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7;
                                        candidate_Statement_alt_0_Call_node_e_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Call_node_e_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_node_e_inlined__sub0_7;
                                        openTasks.Push(this);
                                        return;
                                    }
                                    candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7;
                                    candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7;
                                    candidate_Statement_alt_0_Call_node_e_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Call_node_e_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_node_e_inlined__sub0_7;
                                    continue;
                                }
                                candidate_Statement_alt_0_Call_node_e_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Call_node_e_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_node_e_inlined__sub0_7;
                                candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7;
                                candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7;
                            }
                            while( (candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7 = candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7.lgspOutNext) != head_candidate_Statement_alt_0_Call_edge__edge1_inlined__sub0_7 );
                        }
                    }
                    while( (candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7 = candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7.lgspOutNext) != head_candidate_Statement_alt_0_Call_edge__edge0_inlined__sub0_7 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case Statement_alt_0_Return 
            do {
                patternGraph = patternGraphs[(int)Pattern_Statement.Statement_alt_0_CaseNums.@Return];
                // SubPreset Statement_node_b_inlined__sub0_7 
                GRGEN_LGSP.LGSPNode candidate_Statement_node_b_inlined__sub0_7 = Statement_node_b_inlined__sub0_7;
                // Extend Outgoing Statement_alt_0_Return_edge__edge0_inlined__sub0_7 from Statement_node_b_inlined__sub0_7 
                GRGEN_LGSP.LGSPEdge head_candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7 = candidate_Statement_node_b_inlined__sub0_7.lgspOuthead;
                if(head_candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7 = head_candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7;
                    do
                    {
                        if(candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7.lgspType.TypeID!=3 && candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target Statement_alt_0_Return_node_e_inlined__sub0_7 from Statement_alt_0_Return_edge__edge0_inlined__sub0_7 
                        GRGEN_LGSP.LGSPNode candidate_Statement_alt_0_Return_node_e_inlined__sub0_7 = candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7.lgspTarget;
                        if(candidate_Statement_alt_0_Return_node_e_inlined__sub0_7.lgspType.TypeID!=3) {
                            continue;
                        }
                        if((candidate_Statement_alt_0_Return_node_e_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Extend Outgoing Statement_alt_0_Return_edge__edge1_inlined__sub0_7 from Statement_alt_0_Return_node_e_inlined__sub0_7 
                        GRGEN_LGSP.LGSPEdge head_candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7 = candidate_Statement_alt_0_Return_node_e_inlined__sub0_7.lgspOuthead;
                        if(head_candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7 != null)
                        {
                            GRGEN_LGSP.LGSPEdge candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7 = head_candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7;
                            do
                            {
                                if(candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7.lgspType.TypeID!=7) {
                                    continue;
                                }
                                if((candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                                {
                                    continue;
                                }
                                // Check whether there are subpattern matching tasks left to execute
                                if(openTasks.Count==0)
                                {
                                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                                    foundPartialMatches.Add(currentFoundPartialMatch);
                                    Pattern_Statement.Match_Statement_alt_0_Return match = new Pattern_Statement.Match_Statement_alt_0_Return();
                                    match._node_b = candidate_Statement_node_b_inlined__sub0_7;
                                    match._node_e = candidate_Statement_alt_0_Return_node_e_inlined__sub0_7;
                                    match._edge__edge0 = candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7;
                                    match._edge__edge1 = candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7;
                                    currentFoundPartialMatch.Push(match);
                                    // if enough matches were found, we leave
                                    if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                                    {
                                        openTasks.Push(this);
                                        return;
                                    }
                                    continue;
                                }
                                uint prevGlobal__candidate_Statement_alt_0_Return_node_e_inlined__sub0_7;
                                prevGlobal__candidate_Statement_alt_0_Return_node_e_inlined__sub0_7 = candidate_Statement_alt_0_Return_node_e_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Return_node_e_inlined__sub0_7.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                uint prevGlobal__candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7;
                                prevGlobal__candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7 = candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                uint prevGlobal__candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7;
                                prevGlobal__candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7 = candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                // Match subpatterns 
                                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                                // Check whether subpatterns were found 
                                if(matchesList.Count>0) {
                                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                                    {
                                        Pattern_Statement.Match_Statement_alt_0_Return match = new Pattern_Statement.Match_Statement_alt_0_Return();
                                        match._node_b = candidate_Statement_node_b_inlined__sub0_7;
                                        match._node_e = candidate_Statement_alt_0_Return_node_e_inlined__sub0_7;
                                        match._edge__edge0 = candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7;
                                        match._edge__edge1 = candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7;
                                        currentFoundPartialMatch.Push(match);
                                    }
                                    if(matchesList==foundPartialMatches) {
                                        matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                                    } else {
                                        foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                            foundPartialMatches.Add(match);
                                        }
                                        matchesList.Clear();
                                    }
                                    // if enough matches were found, we leave
                                    if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                                    {
                                        candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7;
                                        candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7;
                                        candidate_Statement_alt_0_Return_node_e_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Return_node_e_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_node_e_inlined__sub0_7;
                                        openTasks.Push(this);
                                        return;
                                    }
                                    candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7;
                                    candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7;
                                    candidate_Statement_alt_0_Return_node_e_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Return_node_e_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_node_e_inlined__sub0_7;
                                    continue;
                                }
                                candidate_Statement_alt_0_Return_node_e_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Return_node_e_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_node_e_inlined__sub0_7;
                                candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7;
                                candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7.lgspFlags = candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7;
                            }
                            while( (candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7 = candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7.lgspOutNext) != head_candidate_Statement_alt_0_Return_edge__edge1_inlined__sub0_7 );
                        }
                    }
                    while( (candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7 = candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7.lgspOutNext) != head_candidate_Statement_alt_0_Return_edge__edge0_inlined__sub0_7 );
                }
            } while(false);
            openTasks.Push(this);
            return;
        }
    }
    
    public class PatternAction_Statement : GRGEN_LGSP.LGSPSubpatternAction
    {
        private PatternAction_Statement(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Statement.Instance.patternGraph;
        }

        public static PatternAction_Statement getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            PatternAction_Statement newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new PatternAction_Statement(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(PatternAction_Statement oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static PatternAction_Statement freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private PatternAction_Statement next = null;

        public GRGEN_LGSP.LGSPNode Statement_node_b;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // SubPreset Statement_node_b 
            GRGEN_LGSP.LGSPNode candidate_Statement_node_b = Statement_node_b;
            // Push alternative matching task for Statement_alt_0
            AlternativeAction_Statement_alt_0 taskFor_alt_0 = AlternativeAction_Statement_alt_0.getNewTask(actionEnv, openTasks, Pattern_Statement.Instance.patternGraph.alternatives[(int)Pattern_Statement.Statement_AltNums.@alt_0].alternativeCases);
            taskFor_alt_0.Statement_node_b = candidate_Statement_node_b;
            taskFor_alt_0.searchPatternpath = false;
            taskFor_alt_0.matchOfNestingPattern = null;
            taskFor_alt_0.lastMatchAtPreviousNestingLevel = null;
            openTasks.Push(taskFor_alt_0);
            // Match subpatterns 
            openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
            // Pop alternative matching task for Statement_alt_0
            openTasks.Pop();
            AlternativeAction_Statement_alt_0.releaseTask(taskFor_alt_0);
            // Check whether subpatterns were found 
            if(matchesList.Count>0) {
                // subpatterns/alternatives were found, extend the partial matches by our local match object
                foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                {
                    Pattern_Statement.Match_Statement match = new Pattern_Statement.Match_Statement();
                    match._node_b = candidate_Statement_node_b;
                    match._alt_0 = (Pattern_Statement.IMatch_Statement_alt_0)currentFoundPartialMatch.Pop();
                    match._alt_0.SetMatchOfEnclosingPattern(match);
                    currentFoundPartialMatch.Push(match);
                }
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
                // if enough matches were found, we leave
                if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                {
                    openTasks.Push(this);
                    return;
                }
                openTasks.Push(this);
                return;
            }
            openTasks.Push(this);
            return;
        }
    }
    
    public class AlternativeAction_Statement_alt_0 : GRGEN_LGSP.LGSPSubpatternAction
    {
        private AlternativeAction_Statement_alt_0(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_)
            : base(patternGraphs_)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
        }

        public static AlternativeAction_Statement_alt_0 getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_) {
            AlternativeAction_Statement_alt_0 newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new AlternativeAction_Statement_alt_0(actionEnv_, openTasks_, patternGraphs_);
            }
            return newTask;
        }

        public static void releaseTask(AlternativeAction_Statement_alt_0 oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static AlternativeAction_Statement_alt_0 freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private AlternativeAction_Statement_alt_0 next = null;

        public GRGEN_LGSP.LGSPNode Statement_node_b;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // Alternative case Statement_alt_0_Assignment 
            do {
                patternGraph = patternGraphs[(int)Pattern_Statement.Statement_alt_0_CaseNums.@Assignment];
                // SubPreset Statement_node_b 
                GRGEN_LGSP.LGSPNode candidate_Statement_node_b = Statement_node_b;
                // Extend Outgoing Statement_alt_0_Assignment_edge__edge0 from Statement_node_b 
                GRGEN_LGSP.LGSPEdge head_candidate_Statement_alt_0_Assignment_edge__edge0 = candidate_Statement_node_b.lgspOuthead;
                if(head_candidate_Statement_alt_0_Assignment_edge__edge0 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_Statement_alt_0_Assignment_edge__edge0 = head_candidate_Statement_alt_0_Assignment_edge__edge0;
                    do
                    {
                        if(candidate_Statement_alt_0_Assignment_edge__edge0.lgspType.TypeID!=3 && candidate_Statement_alt_0_Assignment_edge__edge0.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        uint prev__candidate_Statement_alt_0_Assignment_edge__edge0;
                        prev__candidate_Statement_alt_0_Assignment_edge__edge0 = candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                        candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                        // Implicit Target Statement_alt_0_Assignment_node_e from Statement_alt_0_Assignment_edge__edge0 
                        GRGEN_LGSP.LGSPNode candidate_Statement_alt_0_Assignment_node_e = candidate_Statement_alt_0_Assignment_edge__edge0.lgspTarget;
                        if(candidate_Statement_alt_0_Assignment_node_e.lgspType.TypeID!=3) {
                            candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Statement_alt_0_Assignment_edge__edge0;
                            continue;
                        }
                        if((candidate_Statement_alt_0_Assignment_node_e.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Statement_alt_0_Assignment_edge__edge0;
                            continue;
                        }
                        uint prev__candidate_Statement_alt_0_Assignment_node_e;
                        prev__candidate_Statement_alt_0_Assignment_node_e = candidate_Statement_alt_0_Assignment_node_e.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                        candidate_Statement_alt_0_Assignment_node_e.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                        // Element ExpressionPattern_node_e_inlined__sub0_8 assigned from other element Statement_alt_0_Assignment_node_e 
                        GRGEN_LGSP.LGSPNode candidate_ExpressionPattern_node_e_inlined__sub0_8 = candidate_Statement_alt_0_Assignment_node_e;
                        if(candidate_ExpressionPattern_node_e_inlined__sub0_8.lgspType.TypeID!=3) {
                            candidate_Statement_alt_0_Assignment_node_e.lgspFlags = candidate_Statement_alt_0_Assignment_node_e.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Statement_alt_0_Assignment_node_e;
                            candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Statement_alt_0_Assignment_edge__edge0;
                            continue;
                        }
                        // Extend Outgoing Statement_alt_0_Assignment_edge__edge1 from Statement_alt_0_Assignment_node_e 
                        GRGEN_LGSP.LGSPEdge head_candidate_Statement_alt_0_Assignment_edge__edge1 = candidate_Statement_alt_0_Assignment_node_e.lgspOuthead;
                        if(head_candidate_Statement_alt_0_Assignment_edge__edge1 != null)
                        {
                            GRGEN_LGSP.LGSPEdge candidate_Statement_alt_0_Assignment_edge__edge1 = head_candidate_Statement_alt_0_Assignment_edge__edge1;
                            do
                            {
                                if(candidate_Statement_alt_0_Assignment_edge__edge1.lgspType.TypeID!=8) {
                                    continue;
                                }
                                if((candidate_Statement_alt_0_Assignment_edge__edge1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                                {
                                    continue;
                                }
                                // Extend Outgoing ExpressionPattern_edge__edge0_inlined__sub0_8 from ExpressionPattern_node_e_inlined__sub0_8 
                                GRGEN_LGSP.LGSPEdge head_candidate_ExpressionPattern_edge__edge0_inlined__sub0_8 = candidate_ExpressionPattern_node_e_inlined__sub0_8.lgspOuthead;
                                if(head_candidate_ExpressionPattern_edge__edge0_inlined__sub0_8 != null)
                                {
                                    GRGEN_LGSP.LGSPEdge candidate_ExpressionPattern_edge__edge0_inlined__sub0_8 = head_candidate_ExpressionPattern_edge__edge0_inlined__sub0_8;
                                    do
                                    {
                                        if(candidate_ExpressionPattern_edge__edge0_inlined__sub0_8.lgspType.TypeID!=3 && candidate_ExpressionPattern_edge__edge0_inlined__sub0_8.lgspType.TypeID!=11) {
                                            continue;
                                        }
                                        if((candidate_ExpressionPattern_edge__edge0_inlined__sub0_8.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                                        {
                                            continue;
                                        }
                                        if((candidate_ExpressionPattern_edge__edge0_inlined__sub0_8.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                                        {
                                            continue;
                                        }
                                        // Implicit Target ExpressionPattern_node_sub_inlined__sub0_8 from ExpressionPattern_edge__edge0_inlined__sub0_8 
                                        GRGEN_LGSP.LGSPNode candidate_ExpressionPattern_node_sub_inlined__sub0_8 = candidate_ExpressionPattern_edge__edge0_inlined__sub0_8.lgspTarget;
                                        if(candidate_ExpressionPattern_node_sub_inlined__sub0_8.lgspType.TypeID!=3) {
                                            continue;
                                        }
                                        if((candidate_ExpressionPattern_node_sub_inlined__sub0_8.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                                        {
                                            continue;
                                        }
                                        if((candidate_ExpressionPattern_node_sub_inlined__sub0_8.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                                        {
                                            continue;
                                        }
                                        // Push alternative matching task for Statement_alt_0_Assignment_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment
                                        AlternativeAction_Statement_alt_0_Assignment_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment taskFor_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment = AlternativeAction_Statement_alt_0_Assignment_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment.getNewTask(actionEnv, openTasks, Pattern_ExpressionPattern.Instance.patternGraph.alternatives[(int)Pattern_ExpressionPattern.ExpressionPattern_AltNums.@alt_0].alternativeCases);
                                        taskFor_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment.ExpressionPattern_node_sub_inlined__sub0_8 = candidate_ExpressionPattern_node_sub_inlined__sub0_8;
                                        taskFor_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment.searchPatternpath = false;
                                        taskFor_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment.matchOfNestingPattern = null;
                                        taskFor_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment.lastMatchAtPreviousNestingLevel = null;
                                        openTasks.Push(taskFor_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment);
                                        uint prevGlobal__candidate_Statement_alt_0_Assignment_node_e;
                                        prevGlobal__candidate_Statement_alt_0_Assignment_node_e = candidate_Statement_alt_0_Assignment_node_e.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        candidate_Statement_alt_0_Assignment_node_e.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        uint prevGlobal__candidate_ExpressionPattern_node_sub_inlined__sub0_8;
                                        prevGlobal__candidate_ExpressionPattern_node_sub_inlined__sub0_8 = candidate_ExpressionPattern_node_sub_inlined__sub0_8.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        candidate_ExpressionPattern_node_sub_inlined__sub0_8.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        uint prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge0;
                                        prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge0 = candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        uint prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge1;
                                        prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge1 = candidate_Statement_alt_0_Assignment_edge__edge1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        candidate_Statement_alt_0_Assignment_edge__edge1.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        uint prevGlobal__candidate_ExpressionPattern_edge__edge0_inlined__sub0_8;
                                        prevGlobal__candidate_ExpressionPattern_edge__edge0_inlined__sub0_8 = candidate_ExpressionPattern_edge__edge0_inlined__sub0_8.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        candidate_ExpressionPattern_edge__edge0_inlined__sub0_8.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        // Match subpatterns 
                                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                                        // Pop alternative matching task for Statement_alt_0_Assignment_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment
                                        openTasks.Pop();
                                        AlternativeAction_Statement_alt_0_Assignment_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment.releaseTask(taskFor_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment);
                                        // Check whether subpatterns were found 
                                        if(matchesList.Count>0) {
                                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                                            {
                                                Pattern_Statement.Match_Statement_alt_0_Assignment match = new Pattern_Statement.Match_Statement_alt_0_Assignment();
                                                Pattern_ExpressionPattern.Match_ExpressionPattern match__sub0 = new Pattern_ExpressionPattern.Match_ExpressionPattern();
                                                match__sub0.SetMatchOfEnclosingPattern(match);
                                                match._node_b = candidate_Statement_node_b;
                                                match._node_e = candidate_Statement_alt_0_Assignment_node_e;
                                                match__sub0._node_e = candidate_ExpressionPattern_node_e_inlined__sub0_8;
                                                match__sub0._node_sub = candidate_ExpressionPattern_node_sub_inlined__sub0_8;
                                                match._edge__edge0 = candidate_Statement_alt_0_Assignment_edge__edge0;
                                                match._edge__edge1 = candidate_Statement_alt_0_Assignment_edge__edge1;
                                                match__sub0._edge__edge0 = candidate_ExpressionPattern_edge__edge0_inlined__sub0_8;
                                                match.__sub0 = match__sub0;
                                                match__sub0._alt_0 = (Pattern_ExpressionPattern.IMatch_ExpressionPattern_alt_0)currentFoundPartialMatch.Pop();
                                                match__sub0._alt_0.SetMatchOfEnclosingPattern(match__sub0);
                                                currentFoundPartialMatch.Push(match);
                                            }
                                            if(matchesList==foundPartialMatches) {
                                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                                            } else {
                                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                                    foundPartialMatches.Add(match);
                                                }
                                                matchesList.Clear();
                                            }
                                            // if enough matches were found, we leave
                                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                                            {
                                                candidate_ExpressionPattern_edge__edge0_inlined__sub0_8.lgspFlags = candidate_ExpressionPattern_edge__edge0_inlined__sub0_8.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_edge__edge0_inlined__sub0_8;
                                                candidate_Statement_alt_0_Assignment_edge__edge1.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge1;
                                                candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge0;
                                                candidate_ExpressionPattern_node_sub_inlined__sub0_8.lgspFlags = candidate_ExpressionPattern_node_sub_inlined__sub0_8.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_node_sub_inlined__sub0_8;
                                                candidate_Statement_alt_0_Assignment_node_e.lgspFlags = candidate_Statement_alt_0_Assignment_node_e.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_node_e;
                                                candidate_Statement_alt_0_Assignment_node_e.lgspFlags = candidate_Statement_alt_0_Assignment_node_e.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Statement_alt_0_Assignment_node_e;
                                                candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Statement_alt_0_Assignment_edge__edge0;
                                                openTasks.Push(this);
                                                return;
                                            }
                                            candidate_ExpressionPattern_edge__edge0_inlined__sub0_8.lgspFlags = candidate_ExpressionPattern_edge__edge0_inlined__sub0_8.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_edge__edge0_inlined__sub0_8;
                                            candidate_Statement_alt_0_Assignment_edge__edge1.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge1;
                                            candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge0;
                                            candidate_ExpressionPattern_node_sub_inlined__sub0_8.lgspFlags = candidate_ExpressionPattern_node_sub_inlined__sub0_8.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_node_sub_inlined__sub0_8;
                                            candidate_Statement_alt_0_Assignment_node_e.lgspFlags = candidate_Statement_alt_0_Assignment_node_e.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_node_e;
                                            continue;
                                        }
                                        candidate_Statement_alt_0_Assignment_node_e.lgspFlags = candidate_Statement_alt_0_Assignment_node_e.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_node_e;
                                        candidate_ExpressionPattern_node_sub_inlined__sub0_8.lgspFlags = candidate_ExpressionPattern_node_sub_inlined__sub0_8.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_node_sub_inlined__sub0_8;
                                        candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge0;
                                        candidate_Statement_alt_0_Assignment_edge__edge1.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Assignment_edge__edge1;
                                        candidate_ExpressionPattern_edge__edge0_inlined__sub0_8.lgspFlags = candidate_ExpressionPattern_edge__edge0_inlined__sub0_8.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_edge__edge0_inlined__sub0_8;
                                    }
                                    while( (candidate_ExpressionPattern_edge__edge0_inlined__sub0_8 = candidate_ExpressionPattern_edge__edge0_inlined__sub0_8.lgspOutNext) != head_candidate_ExpressionPattern_edge__edge0_inlined__sub0_8 );
                                }
                            }
                            while( (candidate_Statement_alt_0_Assignment_edge__edge1 = candidate_Statement_alt_0_Assignment_edge__edge1.lgspOutNext) != head_candidate_Statement_alt_0_Assignment_edge__edge1 );
                        }
                        candidate_Statement_alt_0_Assignment_node_e.lgspFlags = candidate_Statement_alt_0_Assignment_node_e.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Statement_alt_0_Assignment_node_e;
                        candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags = candidate_Statement_alt_0_Assignment_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Statement_alt_0_Assignment_edge__edge0;
                    }
                    while( (candidate_Statement_alt_0_Assignment_edge__edge0 = candidate_Statement_alt_0_Assignment_edge__edge0.lgspOutNext) != head_candidate_Statement_alt_0_Assignment_edge__edge0 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case Statement_alt_0_Call 
            do {
                patternGraph = patternGraphs[(int)Pattern_Statement.Statement_alt_0_CaseNums.@Call];
                // SubPreset Statement_node_b 
                GRGEN_LGSP.LGSPNode candidate_Statement_node_b = Statement_node_b;
                // Extend Outgoing Statement_alt_0_Call_edge__edge0 from Statement_node_b 
                GRGEN_LGSP.LGSPEdge head_candidate_Statement_alt_0_Call_edge__edge0 = candidate_Statement_node_b.lgspOuthead;
                if(head_candidate_Statement_alt_0_Call_edge__edge0 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_Statement_alt_0_Call_edge__edge0 = head_candidate_Statement_alt_0_Call_edge__edge0;
                    do
                    {
                        if(candidate_Statement_alt_0_Call_edge__edge0.lgspType.TypeID!=3 && candidate_Statement_alt_0_Call_edge__edge0.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_Statement_alt_0_Call_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target Statement_alt_0_Call_node_e from Statement_alt_0_Call_edge__edge0 
                        GRGEN_LGSP.LGSPNode candidate_Statement_alt_0_Call_node_e = candidate_Statement_alt_0_Call_edge__edge0.lgspTarget;
                        if(candidate_Statement_alt_0_Call_node_e.lgspType.TypeID!=3) {
                            continue;
                        }
                        if((candidate_Statement_alt_0_Call_node_e.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Element Expressions_node_e_inlined__sub0_9 assigned from other element Statement_alt_0_Call_node_e 
                        GRGEN_LGSP.LGSPNode candidate_Expressions_node_e_inlined__sub0_9 = candidate_Statement_alt_0_Call_node_e;
                        if(candidate_Expressions_node_e_inlined__sub0_9.lgspType.TypeID!=3) {
                            continue;
                        }
                        // Extend Outgoing Statement_alt_0_Call_edge__edge1 from Statement_alt_0_Call_node_e 
                        GRGEN_LGSP.LGSPEdge head_candidate_Statement_alt_0_Call_edge__edge1 = candidate_Statement_alt_0_Call_node_e.lgspOuthead;
                        if(head_candidate_Statement_alt_0_Call_edge__edge1 != null)
                        {
                            GRGEN_LGSP.LGSPEdge candidate_Statement_alt_0_Call_edge__edge1 = head_candidate_Statement_alt_0_Call_edge__edge1;
                            do
                            {
                                if(candidate_Statement_alt_0_Call_edge__edge1.lgspType.TypeID!=9) {
                                    continue;
                                }
                                if((candidate_Statement_alt_0_Call_edge__edge1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                                {
                                    continue;
                                }
                                // Push iterated matching task for Expressions_iter_0_inlined__sub0_9_in_Statement_alt_0_Call
                                IteratedAction_Expressions_iter_0_inlined__sub0_9_in_Statement_alt_0_Call taskFor_iter_0_inlined__sub0_9_in_Statement_alt_0_Call = IteratedAction_Expressions_iter_0_inlined__sub0_9_in_Statement_alt_0_Call.getNewTask(actionEnv, openTasks);
                                taskFor_iter_0_inlined__sub0_9_in_Statement_alt_0_Call.Expressions_node_e_inlined__sub0_9 = candidate_Expressions_node_e_inlined__sub0_9;
                                taskFor_iter_0_inlined__sub0_9_in_Statement_alt_0_Call.searchPatternpath = false;
                                taskFor_iter_0_inlined__sub0_9_in_Statement_alt_0_Call.matchOfNestingPattern = null;
                                taskFor_iter_0_inlined__sub0_9_in_Statement_alt_0_Call.lastMatchAtPreviousNestingLevel = null;
                                openTasks.Push(taskFor_iter_0_inlined__sub0_9_in_Statement_alt_0_Call);
                                uint prevGlobal__candidate_Statement_alt_0_Call_node_e;
                                prevGlobal__candidate_Statement_alt_0_Call_node_e = candidate_Statement_alt_0_Call_node_e.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Call_node_e.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                uint prevGlobal__candidate_Statement_alt_0_Call_edge__edge0;
                                prevGlobal__candidate_Statement_alt_0_Call_edge__edge0 = candidate_Statement_alt_0_Call_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Call_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                uint prevGlobal__candidate_Statement_alt_0_Call_edge__edge1;
                                prevGlobal__candidate_Statement_alt_0_Call_edge__edge1 = candidate_Statement_alt_0_Call_edge__edge1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Call_edge__edge1.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                // Match subpatterns 
                                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                                // Pop iterated matching task for Expressions_iter_0_inlined__sub0_9_in_Statement_alt_0_Call
                                openTasks.Pop();
                                IteratedAction_Expressions_iter_0_inlined__sub0_9_in_Statement_alt_0_Call.releaseTask(taskFor_iter_0_inlined__sub0_9_in_Statement_alt_0_Call);
                                // Check whether subpatterns were found 
                                if(matchesList.Count>0) {
                                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                                    {
                                        Pattern_Statement.Match_Statement_alt_0_Call match = new Pattern_Statement.Match_Statement_alt_0_Call();
                                        Pattern_Expressions.Match_Expressions match__sub0 = new Pattern_Expressions.Match_Expressions();
                                        match__sub0.SetMatchOfEnclosingPattern(match);
                                        match._node_b = candidate_Statement_node_b;
                                        match._node_e = candidate_Statement_alt_0_Call_node_e;
                                        match__sub0._node_e = candidate_Expressions_node_e_inlined__sub0_9;
                                        match._edge__edge0 = candidate_Statement_alt_0_Call_edge__edge0;
                                        match._edge__edge1 = candidate_Statement_alt_0_Call_edge__edge1;
                                        match.__sub0 = match__sub0;
                                        match__sub0._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Expressions.Match_Expressions_iter_0, Pattern_Expressions.IMatch_Expressions_iter_0>(null);
                                        while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Expressions.IMatch_Expressions_iter_0) {
                                            Pattern_Expressions.Match_Expressions_iter_0 cfpm = (Pattern_Expressions.Match_Expressions_iter_0)currentFoundPartialMatch.Pop();
                                            if(cfpm.IsNullMatch) break;
                                            cfpm.SetMatchOfEnclosingPattern(match__sub0);
                                            match__sub0._iter_0.Add(cfpm);
                                        }
                                        currentFoundPartialMatch.Push(match);
                                    }
                                    if(matchesList==foundPartialMatches) {
                                        matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                                    } else {
                                        foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                            foundPartialMatches.Add(match);
                                        }
                                        matchesList.Clear();
                                    }
                                    // if enough matches were found, we leave
                                    if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                                    {
                                        candidate_Statement_alt_0_Call_edge__edge1.lgspFlags = candidate_Statement_alt_0_Call_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_edge__edge1;
                                        candidate_Statement_alt_0_Call_edge__edge0.lgspFlags = candidate_Statement_alt_0_Call_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_edge__edge0;
                                        candidate_Statement_alt_0_Call_node_e.lgspFlags = candidate_Statement_alt_0_Call_node_e.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_node_e;
                                        openTasks.Push(this);
                                        return;
                                    }
                                    candidate_Statement_alt_0_Call_edge__edge1.lgspFlags = candidate_Statement_alt_0_Call_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_edge__edge1;
                                    candidate_Statement_alt_0_Call_edge__edge0.lgspFlags = candidate_Statement_alt_0_Call_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_edge__edge0;
                                    candidate_Statement_alt_0_Call_node_e.lgspFlags = candidate_Statement_alt_0_Call_node_e.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_node_e;
                                    continue;
                                }
                                candidate_Statement_alt_0_Call_node_e.lgspFlags = candidate_Statement_alt_0_Call_node_e.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_node_e;
                                candidate_Statement_alt_0_Call_edge__edge0.lgspFlags = candidate_Statement_alt_0_Call_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_edge__edge0;
                                candidate_Statement_alt_0_Call_edge__edge1.lgspFlags = candidate_Statement_alt_0_Call_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Call_edge__edge1;
                            }
                            while( (candidate_Statement_alt_0_Call_edge__edge1 = candidate_Statement_alt_0_Call_edge__edge1.lgspOutNext) != head_candidate_Statement_alt_0_Call_edge__edge1 );
                        }
                    }
                    while( (candidate_Statement_alt_0_Call_edge__edge0 = candidate_Statement_alt_0_Call_edge__edge0.lgspOutNext) != head_candidate_Statement_alt_0_Call_edge__edge0 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case Statement_alt_0_Return 
            do {
                patternGraph = patternGraphs[(int)Pattern_Statement.Statement_alt_0_CaseNums.@Return];
                // SubPreset Statement_node_b 
                GRGEN_LGSP.LGSPNode candidate_Statement_node_b = Statement_node_b;
                // Extend Outgoing Statement_alt_0_Return_edge__edge0 from Statement_node_b 
                GRGEN_LGSP.LGSPEdge head_candidate_Statement_alt_0_Return_edge__edge0 = candidate_Statement_node_b.lgspOuthead;
                if(head_candidate_Statement_alt_0_Return_edge__edge0 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_Statement_alt_0_Return_edge__edge0 = head_candidate_Statement_alt_0_Return_edge__edge0;
                    do
                    {
                        if(candidate_Statement_alt_0_Return_edge__edge0.lgspType.TypeID!=3 && candidate_Statement_alt_0_Return_edge__edge0.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_Statement_alt_0_Return_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target Statement_alt_0_Return_node_e from Statement_alt_0_Return_edge__edge0 
                        GRGEN_LGSP.LGSPNode candidate_Statement_alt_0_Return_node_e = candidate_Statement_alt_0_Return_edge__edge0.lgspTarget;
                        if(candidate_Statement_alt_0_Return_node_e.lgspType.TypeID!=3) {
                            continue;
                        }
                        if((candidate_Statement_alt_0_Return_node_e.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Extend Outgoing Statement_alt_0_Return_edge__edge1 from Statement_alt_0_Return_node_e 
                        GRGEN_LGSP.LGSPEdge head_candidate_Statement_alt_0_Return_edge__edge1 = candidate_Statement_alt_0_Return_node_e.lgspOuthead;
                        if(head_candidate_Statement_alt_0_Return_edge__edge1 != null)
                        {
                            GRGEN_LGSP.LGSPEdge candidate_Statement_alt_0_Return_edge__edge1 = head_candidate_Statement_alt_0_Return_edge__edge1;
                            do
                            {
                                if(candidate_Statement_alt_0_Return_edge__edge1.lgspType.TypeID!=7) {
                                    continue;
                                }
                                if((candidate_Statement_alt_0_Return_edge__edge1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                                {
                                    continue;
                                }
                                // Check whether there are subpattern matching tasks left to execute
                                if(openTasks.Count==0)
                                {
                                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                                    foundPartialMatches.Add(currentFoundPartialMatch);
                                    Pattern_Statement.Match_Statement_alt_0_Return match = new Pattern_Statement.Match_Statement_alt_0_Return();
                                    match._node_b = candidate_Statement_node_b;
                                    match._node_e = candidate_Statement_alt_0_Return_node_e;
                                    match._edge__edge0 = candidate_Statement_alt_0_Return_edge__edge0;
                                    match._edge__edge1 = candidate_Statement_alt_0_Return_edge__edge1;
                                    currentFoundPartialMatch.Push(match);
                                    // if enough matches were found, we leave
                                    if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                                    {
                                        openTasks.Push(this);
                                        return;
                                    }
                                    continue;
                                }
                                uint prevGlobal__candidate_Statement_alt_0_Return_node_e;
                                prevGlobal__candidate_Statement_alt_0_Return_node_e = candidate_Statement_alt_0_Return_node_e.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Return_node_e.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                uint prevGlobal__candidate_Statement_alt_0_Return_edge__edge0;
                                prevGlobal__candidate_Statement_alt_0_Return_edge__edge0 = candidate_Statement_alt_0_Return_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Return_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                uint prevGlobal__candidate_Statement_alt_0_Return_edge__edge1;
                                prevGlobal__candidate_Statement_alt_0_Return_edge__edge1 = candidate_Statement_alt_0_Return_edge__edge1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                candidate_Statement_alt_0_Return_edge__edge1.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                // Match subpatterns 
                                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                                // Check whether subpatterns were found 
                                if(matchesList.Count>0) {
                                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                                    {
                                        Pattern_Statement.Match_Statement_alt_0_Return match = new Pattern_Statement.Match_Statement_alt_0_Return();
                                        match._node_b = candidate_Statement_node_b;
                                        match._node_e = candidate_Statement_alt_0_Return_node_e;
                                        match._edge__edge0 = candidate_Statement_alt_0_Return_edge__edge0;
                                        match._edge__edge1 = candidate_Statement_alt_0_Return_edge__edge1;
                                        currentFoundPartialMatch.Push(match);
                                    }
                                    if(matchesList==foundPartialMatches) {
                                        matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                                    } else {
                                        foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                            foundPartialMatches.Add(match);
                                        }
                                        matchesList.Clear();
                                    }
                                    // if enough matches were found, we leave
                                    if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                                    {
                                        candidate_Statement_alt_0_Return_edge__edge1.lgspFlags = candidate_Statement_alt_0_Return_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_edge__edge1;
                                        candidate_Statement_alt_0_Return_edge__edge0.lgspFlags = candidate_Statement_alt_0_Return_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_edge__edge0;
                                        candidate_Statement_alt_0_Return_node_e.lgspFlags = candidate_Statement_alt_0_Return_node_e.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_node_e;
                                        openTasks.Push(this);
                                        return;
                                    }
                                    candidate_Statement_alt_0_Return_edge__edge1.lgspFlags = candidate_Statement_alt_0_Return_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_edge__edge1;
                                    candidate_Statement_alt_0_Return_edge__edge0.lgspFlags = candidate_Statement_alt_0_Return_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_edge__edge0;
                                    candidate_Statement_alt_0_Return_node_e.lgspFlags = candidate_Statement_alt_0_Return_node_e.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_node_e;
                                    continue;
                                }
                                candidate_Statement_alt_0_Return_node_e.lgspFlags = candidate_Statement_alt_0_Return_node_e.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_node_e;
                                candidate_Statement_alt_0_Return_edge__edge0.lgspFlags = candidate_Statement_alt_0_Return_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_edge__edge0;
                                candidate_Statement_alt_0_Return_edge__edge1.lgspFlags = candidate_Statement_alt_0_Return_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Statement_alt_0_Return_edge__edge1;
                            }
                            while( (candidate_Statement_alt_0_Return_edge__edge1 = candidate_Statement_alt_0_Return_edge__edge1.lgspOutNext) != head_candidate_Statement_alt_0_Return_edge__edge1 );
                        }
                    }
                    while( (candidate_Statement_alt_0_Return_edge__edge0 = candidate_Statement_alt_0_Return_edge__edge0.lgspOutNext) != head_candidate_Statement_alt_0_Return_edge__edge0 );
                }
            } while(false);
            openTasks.Push(this);
            return;
        }
    }
    
    public class AlternativeAction_Statement_alt_0_Assignment_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment : GRGEN_LGSP.LGSPSubpatternAction
    {
        private AlternativeAction_Statement_alt_0_Assignment_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_)
            : base(patternGraphs_)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
        }

        public static AlternativeAction_Statement_alt_0_Assignment_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_) {
            AlternativeAction_Statement_alt_0_Assignment_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new AlternativeAction_Statement_alt_0_Assignment_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment(actionEnv_, openTasks_, patternGraphs_);
            }
            return newTask;
        }

        public static void releaseTask(AlternativeAction_Statement_alt_0_Assignment_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static AlternativeAction_Statement_alt_0_Assignment_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private AlternativeAction_Statement_alt_0_Assignment_alt_0_inlined__sub0_8_in_Statement_alt_0_Assignment next = null;

        public GRGEN_LGSP.LGSPNode ExpressionPattern_node_sub_inlined__sub0_8;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // Alternative case ExpressionPattern_alt_0_Call 
            do {
                patternGraph = patternGraphs[(int)Pattern_ExpressionPattern.ExpressionPattern_alt_0_CaseNums.@Call];
                // SubPreset ExpressionPattern_node_sub_inlined__sub0_8 
                GRGEN_LGSP.LGSPNode candidate_ExpressionPattern_node_sub_inlined__sub0_8 = ExpressionPattern_node_sub_inlined__sub0_8;
                // Extend Outgoing ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8 from ExpressionPattern_node_sub_inlined__sub0_8 
                GRGEN_LGSP.LGSPEdge head_candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8 = candidate_ExpressionPattern_node_sub_inlined__sub0_8.lgspOuthead;
                if(head_candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8 = head_candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8;
                    do
                    {
                        if(candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8.lgspType.TypeID!=9) {
                            continue;
                        }
                        if((candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Push subpattern matching task for _sub0_inlined__sub0_8
                        PatternAction_Expressions taskFor__sub0_inlined__sub0_8 = PatternAction_Expressions.getNewTask(actionEnv, openTasks);
                        taskFor__sub0_inlined__sub0_8.Expressions_node_e = candidate_ExpressionPattern_node_sub_inlined__sub0_8;
                        taskFor__sub0_inlined__sub0_8.searchPatternpath = false;
                        taskFor__sub0_inlined__sub0_8.matchOfNestingPattern = null;
                        taskFor__sub0_inlined__sub0_8.lastMatchAtPreviousNestingLevel = null;
                        openTasks.Push(taskFor__sub0_inlined__sub0_8);
                        uint prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8;
                        prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8 = candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Pop subpattern matching task for _sub0_inlined__sub0_8
                        openTasks.Pop();
                        PatternAction_Expressions.releaseTask(taskFor__sub0_inlined__sub0_8);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Call match = new Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Call();
                                match._node_sub = candidate_ExpressionPattern_node_sub_inlined__sub0_8;
                                match._edge__edge0 = candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8;
                                match.__sub0 = (@Pattern_Expressions.Match_Expressions)currentFoundPartialMatch.Pop();
                                match.__sub0._matchOfEnclosingPattern = match;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8.lgspFlags = candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8.lgspFlags = candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8;
                            continue;
                        }
                        candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8.lgspFlags = candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8;
                    }
                    while( (candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8 = candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8.lgspOutNext) != head_candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_8 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case ExpressionPattern_alt_0_Use 
            do {
                patternGraph = patternGraphs[(int)Pattern_ExpressionPattern.ExpressionPattern_alt_0_CaseNums.@Use];
                // SubPreset ExpressionPattern_node_sub_inlined__sub0_8 
                GRGEN_LGSP.LGSPNode candidate_ExpressionPattern_node_sub_inlined__sub0_8 = ExpressionPattern_node_sub_inlined__sub0_8;
                // Extend Outgoing ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8 from ExpressionPattern_node_sub_inlined__sub0_8 
                GRGEN_LGSP.LGSPEdge head_candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8 = candidate_ExpressionPattern_node_sub_inlined__sub0_8.lgspOuthead;
                if(head_candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8 = head_candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8;
                    do
                    {
                        if(candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8.lgspType.TypeID!=7) {
                            continue;
                        }
                        if((candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Check whether there are subpattern matching tasks left to execute
                        if(openTasks.Count==0)
                        {
                            Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                            foundPartialMatches.Add(currentFoundPartialMatch);
                            Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Use match = new Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Use();
                            match._node_sub = candidate_ExpressionPattern_node_sub_inlined__sub0_8;
                            match._edge__edge0 = candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8;
                            currentFoundPartialMatch.Push(match);
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                openTasks.Push(this);
                                return;
                            }
                            continue;
                        }
                        uint prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8;
                        prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8 = candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Use match = new Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Use();
                                match._node_sub = candidate_ExpressionPattern_node_sub_inlined__sub0_8;
                                match._edge__edge0 = candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8.lgspFlags = candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8.lgspFlags = candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8;
                            continue;
                        }
                        candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8.lgspFlags = candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8;
                    }
                    while( (candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8 = candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8.lgspOutNext) != head_candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_8 );
                }
            } while(false);
            openTasks.Push(this);
            return;
        }
    }
    
    public class IteratedAction_Expressions_iter_0_inlined__sub0_9_in_Statement_alt_0_Call : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Expressions_iter_0_inlined__sub0_9_in_Statement_alt_0_Call(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Statement.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Expressions_iter_0_inlined__sub0_9_in_Statement_alt_0_Call getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Expressions_iter_0_inlined__sub0_9_in_Statement_alt_0_Call newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Expressions_iter_0_inlined__sub0_9_in_Statement_alt_0_Call(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Expressions_iter_0_inlined__sub0_9_in_Statement_alt_0_Call oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Expressions_iter_0_inlined__sub0_9_in_Statement_alt_0_Call freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Expressions_iter_0_inlined__sub0_9_in_Statement_alt_0_Call next = null;

        public GRGEN_LGSP.LGSPNode Expressions_node_e_inlined__sub0_9;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Expressions_node_e_inlined__sub0_9 
                GRGEN_LGSP.LGSPNode candidate_Expressions_node_e_inlined__sub0_9 = Expressions_node_e_inlined__sub0_9;
                // accept iterated instance match
                ++numMatchesIter;
                // Push subpattern matching task for _sub0_inlined__sub0_9
                PatternAction_ExpressionPattern taskFor__sub0_inlined__sub0_9 = PatternAction_ExpressionPattern.getNewTask(actionEnv, openTasks);
                taskFor__sub0_inlined__sub0_9.ExpressionPattern_node_e = candidate_Expressions_node_e_inlined__sub0_9;
                taskFor__sub0_inlined__sub0_9.searchPatternpath = false;
                taskFor__sub0_inlined__sub0_9.matchOfNestingPattern = null;
                taskFor__sub0_inlined__sub0_9.lastMatchAtPreviousNestingLevel = null;
                openTasks.Push(taskFor__sub0_inlined__sub0_9);
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Pop subpattern matching task for _sub0_inlined__sub0_9
                openTasks.Pop();
                PatternAction_ExpressionPattern.releaseTask(taskFor__sub0_inlined__sub0_9);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    patternFound = true;
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Expressions.Match_Expressions_iter_0 match = new Pattern_Expressions.Match_Expressions_iter_0();
                        match._node_e = candidate_Expressions_node_e_inlined__sub0_9;
                        match.__sub0 = (@Pattern_ExpressionPattern.Match_ExpressionPattern)currentFoundPartialMatch.Pop();
                        match.__sub0._matchOfEnclosingPattern = match;
                        currentFoundPartialMatch.Push(match);
                    }
                    // if enough matches were found, we leave
                    if(true) // as soon as there's a match, it's enough for iterated
                    {
                        --numMatchesIter;
                        continue;
                    }
                    --numMatchesIter;
                    continue;
                }
                --numMatchesIter;
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Expressions.Match_Expressions_iter_0 match = new Pattern_Expressions.Match_Expressions_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Expressions.Match_Expressions_iter_0 match = new Pattern_Expressions.Match_Expressions_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    public class PatternAction_Expressions : GRGEN_LGSP.LGSPSubpatternAction
    {
        private PatternAction_Expressions(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Expressions.Instance.patternGraph;
        }

        public static PatternAction_Expressions getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            PatternAction_Expressions newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new PatternAction_Expressions(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(PatternAction_Expressions oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static PatternAction_Expressions freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private PatternAction_Expressions next = null;

        public GRGEN_LGSP.LGSPNode Expressions_node_e;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // SubPreset Expressions_node_e 
            GRGEN_LGSP.LGSPNode candidate_Expressions_node_e = Expressions_node_e;
            // Push iterated matching task for Expressions_iter_0
            IteratedAction_Expressions_iter_0 taskFor_iter_0 = IteratedAction_Expressions_iter_0.getNewTask(actionEnv, openTasks);
            taskFor_iter_0.Expressions_node_e = candidate_Expressions_node_e;
            taskFor_iter_0.searchPatternpath = false;
            taskFor_iter_0.matchOfNestingPattern = null;
            taskFor_iter_0.lastMatchAtPreviousNestingLevel = null;
            openTasks.Push(taskFor_iter_0);
            // Match subpatterns 
            openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
            // Pop iterated matching task for Expressions_iter_0
            openTasks.Pop();
            IteratedAction_Expressions_iter_0.releaseTask(taskFor_iter_0);
            // Check whether subpatterns were found 
            if(matchesList.Count>0) {
                // subpatterns/alternatives were found, extend the partial matches by our local match object
                foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                {
                    Pattern_Expressions.Match_Expressions match = new Pattern_Expressions.Match_Expressions();
                    match._node_e = candidate_Expressions_node_e;
                    match._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Expressions.Match_Expressions_iter_0, Pattern_Expressions.IMatch_Expressions_iter_0>(null);
                    while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Expressions.IMatch_Expressions_iter_0) {
                        Pattern_Expressions.Match_Expressions_iter_0 cfpm = (Pattern_Expressions.Match_Expressions_iter_0)currentFoundPartialMatch.Pop();
                        if(cfpm.IsNullMatch) break;
                        cfpm.SetMatchOfEnclosingPattern(match);
                        match._iter_0.Add(cfpm);
                    }
                    currentFoundPartialMatch.Push(match);
                }
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
                // if enough matches were found, we leave
                if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                {
                    openTasks.Push(this);
                    return;
                }
                openTasks.Push(this);
                return;
            }
            openTasks.Push(this);
            return;
        }
    }
    
    public class IteratedAction_Expressions_iter_0 : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Expressions_iter_0(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Expressions.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Expressions_iter_0 getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Expressions_iter_0 newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Expressions_iter_0(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Expressions_iter_0 oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Expressions_iter_0 freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Expressions_iter_0 next = null;

        public GRGEN_LGSP.LGSPNode Expressions_node_e;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Expressions_node_e 
                GRGEN_LGSP.LGSPNode candidate_Expressions_node_e = Expressions_node_e;
                // Element ExpressionPattern_node_e_inlined__sub0_10 assigned from other element Expressions_node_e 
                GRGEN_LGSP.LGSPNode candidate_ExpressionPattern_node_e_inlined__sub0_10 = candidate_Expressions_node_e;
                if(candidate_ExpressionPattern_node_e_inlined__sub0_10.lgspType.TypeID!=3) {
                    continue;
                }
                // Extend Outgoing ExpressionPattern_edge__edge0_inlined__sub0_10 from ExpressionPattern_node_e_inlined__sub0_10 
                GRGEN_LGSP.LGSPEdge head_candidate_ExpressionPattern_edge__edge0_inlined__sub0_10 = candidate_ExpressionPattern_node_e_inlined__sub0_10.lgspOuthead;
                if(head_candidate_ExpressionPattern_edge__edge0_inlined__sub0_10 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_ExpressionPattern_edge__edge0_inlined__sub0_10 = head_candidate_ExpressionPattern_edge__edge0_inlined__sub0_10;
                    do
                    {
                        if(candidate_ExpressionPattern_edge__edge0_inlined__sub0_10.lgspType.TypeID!=3 && candidate_ExpressionPattern_edge__edge0_inlined__sub0_10.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_ExpressionPattern_edge__edge0_inlined__sub0_10.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Implicit Target ExpressionPattern_node_sub_inlined__sub0_10 from ExpressionPattern_edge__edge0_inlined__sub0_10 
                        GRGEN_LGSP.LGSPNode candidate_ExpressionPattern_node_sub_inlined__sub0_10 = candidate_ExpressionPattern_edge__edge0_inlined__sub0_10.lgspTarget;
                        if(candidate_ExpressionPattern_node_sub_inlined__sub0_10.lgspType.TypeID!=3) {
                            continue;
                        }
                        if((candidate_ExpressionPattern_node_sub_inlined__sub0_10.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                        {
                            continue;
                        }
                        if((candidate_ExpressionPattern_node_sub_inlined__sub0_10.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // accept iterated instance match
                        ++numMatchesIter;
                        // Push alternative matching task for Expressions_iter_0_alt_0_inlined__sub0_10_in_Expressions_iter_0
                        AlternativeAction_Expressions_iter_0_alt_0_inlined__sub0_10_in_Expressions_iter_0 taskFor_alt_0_inlined__sub0_10_in_Expressions_iter_0 = AlternativeAction_Expressions_iter_0_alt_0_inlined__sub0_10_in_Expressions_iter_0.getNewTask(actionEnv, openTasks, Pattern_ExpressionPattern.Instance.patternGraph.alternatives[(int)Pattern_ExpressionPattern.ExpressionPattern_AltNums.@alt_0].alternativeCases);
                        taskFor_alt_0_inlined__sub0_10_in_Expressions_iter_0.ExpressionPattern_node_sub_inlined__sub0_10 = candidate_ExpressionPattern_node_sub_inlined__sub0_10;
                        taskFor_alt_0_inlined__sub0_10_in_Expressions_iter_0.searchPatternpath = false;
                        taskFor_alt_0_inlined__sub0_10_in_Expressions_iter_0.matchOfNestingPattern = null;
                        taskFor_alt_0_inlined__sub0_10_in_Expressions_iter_0.lastMatchAtPreviousNestingLevel = null;
                        openTasks.Push(taskFor_alt_0_inlined__sub0_10_in_Expressions_iter_0);
                        uint prevGlobal__candidate_ExpressionPattern_node_sub_inlined__sub0_10;
                        prevGlobal__candidate_ExpressionPattern_node_sub_inlined__sub0_10 = candidate_ExpressionPattern_node_sub_inlined__sub0_10.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_ExpressionPattern_node_sub_inlined__sub0_10.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        uint prevGlobal__candidate_ExpressionPattern_edge__edge0_inlined__sub0_10;
                        prevGlobal__candidate_ExpressionPattern_edge__edge0_inlined__sub0_10 = candidate_ExpressionPattern_edge__edge0_inlined__sub0_10.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_ExpressionPattern_edge__edge0_inlined__sub0_10.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Pop alternative matching task for Expressions_iter_0_alt_0_inlined__sub0_10_in_Expressions_iter_0
                        openTasks.Pop();
                        AlternativeAction_Expressions_iter_0_alt_0_inlined__sub0_10_in_Expressions_iter_0.releaseTask(taskFor_alt_0_inlined__sub0_10_in_Expressions_iter_0);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            patternFound = true;
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_Expressions.Match_Expressions_iter_0 match = new Pattern_Expressions.Match_Expressions_iter_0();
                                Pattern_ExpressionPattern.Match_ExpressionPattern match__sub0 = new Pattern_ExpressionPattern.Match_ExpressionPattern();
                                match__sub0.SetMatchOfEnclosingPattern(match);
                                match._node_e = candidate_Expressions_node_e;
                                match__sub0._node_e = candidate_ExpressionPattern_node_e_inlined__sub0_10;
                                match__sub0._node_sub = candidate_ExpressionPattern_node_sub_inlined__sub0_10;
                                match__sub0._edge__edge0 = candidate_ExpressionPattern_edge__edge0_inlined__sub0_10;
                                match.__sub0 = match__sub0;
                                match__sub0._alt_0 = (Pattern_ExpressionPattern.IMatch_ExpressionPattern_alt_0)currentFoundPartialMatch.Pop();
                                match__sub0._alt_0.SetMatchOfEnclosingPattern(match__sub0);
                                currentFoundPartialMatch.Push(match);
                            }
                            // if enough matches were found, we leave
                            if(true) // as soon as there's a match, it's enough for iterated
                            {
                                candidate_ExpressionPattern_edge__edge0_inlined__sub0_10.lgspFlags = candidate_ExpressionPattern_edge__edge0_inlined__sub0_10.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_edge__edge0_inlined__sub0_10;
                                candidate_ExpressionPattern_node_sub_inlined__sub0_10.lgspFlags = candidate_ExpressionPattern_node_sub_inlined__sub0_10.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_node_sub_inlined__sub0_10;
                                --numMatchesIter;
                                goto maxMatchesIterReached;
                            }
                            candidate_ExpressionPattern_edge__edge0_inlined__sub0_10.lgspFlags = candidate_ExpressionPattern_edge__edge0_inlined__sub0_10.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_edge__edge0_inlined__sub0_10;
                            candidate_ExpressionPattern_node_sub_inlined__sub0_10.lgspFlags = candidate_ExpressionPattern_node_sub_inlined__sub0_10.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_node_sub_inlined__sub0_10;
                            --numMatchesIter;
                            continue;
                        }
                        candidate_ExpressionPattern_node_sub_inlined__sub0_10.lgspFlags = candidate_ExpressionPattern_node_sub_inlined__sub0_10.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_node_sub_inlined__sub0_10;
                        candidate_ExpressionPattern_edge__edge0_inlined__sub0_10.lgspFlags = candidate_ExpressionPattern_edge__edge0_inlined__sub0_10.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_edge__edge0_inlined__sub0_10;
                        --numMatchesIter;
                    }
                    while( (candidate_ExpressionPattern_edge__edge0_inlined__sub0_10 = candidate_ExpressionPattern_edge__edge0_inlined__sub0_10.lgspOutNext) != head_candidate_ExpressionPattern_edge__edge0_inlined__sub0_10 );
                }
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Expressions.Match_Expressions_iter_0 match = new Pattern_Expressions.Match_Expressions_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Expressions.Match_Expressions_iter_0 match = new Pattern_Expressions.Match_Expressions_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    public class AlternativeAction_Expressions_iter_0_alt_0_inlined__sub0_10_in_Expressions_iter_0 : GRGEN_LGSP.LGSPSubpatternAction
    {
        private AlternativeAction_Expressions_iter_0_alt_0_inlined__sub0_10_in_Expressions_iter_0(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_)
            : base(patternGraphs_)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
        }

        public static AlternativeAction_Expressions_iter_0_alt_0_inlined__sub0_10_in_Expressions_iter_0 getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_) {
            AlternativeAction_Expressions_iter_0_alt_0_inlined__sub0_10_in_Expressions_iter_0 newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new AlternativeAction_Expressions_iter_0_alt_0_inlined__sub0_10_in_Expressions_iter_0(actionEnv_, openTasks_, patternGraphs_);
            }
            return newTask;
        }

        public static void releaseTask(AlternativeAction_Expressions_iter_0_alt_0_inlined__sub0_10_in_Expressions_iter_0 oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static AlternativeAction_Expressions_iter_0_alt_0_inlined__sub0_10_in_Expressions_iter_0 freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private AlternativeAction_Expressions_iter_0_alt_0_inlined__sub0_10_in_Expressions_iter_0 next = null;

        public GRGEN_LGSP.LGSPNode ExpressionPattern_node_sub_inlined__sub0_10;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // Alternative case ExpressionPattern_alt_0_Call 
            do {
                patternGraph = patternGraphs[(int)Pattern_ExpressionPattern.ExpressionPattern_alt_0_CaseNums.@Call];
                // SubPreset ExpressionPattern_node_sub_inlined__sub0_10 
                GRGEN_LGSP.LGSPNode candidate_ExpressionPattern_node_sub_inlined__sub0_10 = ExpressionPattern_node_sub_inlined__sub0_10;
                // Extend Outgoing ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10 from ExpressionPattern_node_sub_inlined__sub0_10 
                GRGEN_LGSP.LGSPEdge head_candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10 = candidate_ExpressionPattern_node_sub_inlined__sub0_10.lgspOuthead;
                if(head_candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10 = head_candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10;
                    do
                    {
                        if(candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10.lgspType.TypeID!=9) {
                            continue;
                        }
                        if((candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Push subpattern matching task for _sub0_inlined__sub0_10
                        PatternAction_Expressions taskFor__sub0_inlined__sub0_10 = PatternAction_Expressions.getNewTask(actionEnv, openTasks);
                        taskFor__sub0_inlined__sub0_10.Expressions_node_e = candidate_ExpressionPattern_node_sub_inlined__sub0_10;
                        taskFor__sub0_inlined__sub0_10.searchPatternpath = false;
                        taskFor__sub0_inlined__sub0_10.matchOfNestingPattern = null;
                        taskFor__sub0_inlined__sub0_10.lastMatchAtPreviousNestingLevel = null;
                        openTasks.Push(taskFor__sub0_inlined__sub0_10);
                        uint prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10;
                        prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10 = candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Pop subpattern matching task for _sub0_inlined__sub0_10
                        openTasks.Pop();
                        PatternAction_Expressions.releaseTask(taskFor__sub0_inlined__sub0_10);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Call match = new Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Call();
                                match._node_sub = candidate_ExpressionPattern_node_sub_inlined__sub0_10;
                                match._edge__edge0 = candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10;
                                match.__sub0 = (@Pattern_Expressions.Match_Expressions)currentFoundPartialMatch.Pop();
                                match.__sub0._matchOfEnclosingPattern = match;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10.lgspFlags = candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10.lgspFlags = candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10;
                            continue;
                        }
                        candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10.lgspFlags = candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10;
                    }
                    while( (candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10 = candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10.lgspOutNext) != head_candidate_ExpressionPattern_alt_0_Call_edge__edge0_inlined__sub0_10 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case ExpressionPattern_alt_0_Use 
            do {
                patternGraph = patternGraphs[(int)Pattern_ExpressionPattern.ExpressionPattern_alt_0_CaseNums.@Use];
                // SubPreset ExpressionPattern_node_sub_inlined__sub0_10 
                GRGEN_LGSP.LGSPNode candidate_ExpressionPattern_node_sub_inlined__sub0_10 = ExpressionPattern_node_sub_inlined__sub0_10;
                // Extend Outgoing ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10 from ExpressionPattern_node_sub_inlined__sub0_10 
                GRGEN_LGSP.LGSPEdge head_candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10 = candidate_ExpressionPattern_node_sub_inlined__sub0_10.lgspOuthead;
                if(head_candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10 = head_candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10;
                    do
                    {
                        if(candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10.lgspType.TypeID!=7) {
                            continue;
                        }
                        if((candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Check whether there are subpattern matching tasks left to execute
                        if(openTasks.Count==0)
                        {
                            Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                            foundPartialMatches.Add(currentFoundPartialMatch);
                            Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Use match = new Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Use();
                            match._node_sub = candidate_ExpressionPattern_node_sub_inlined__sub0_10;
                            match._edge__edge0 = candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10;
                            currentFoundPartialMatch.Push(match);
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                openTasks.Push(this);
                                return;
                            }
                            continue;
                        }
                        uint prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10;
                        prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10 = candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Use match = new Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Use();
                                match._node_sub = candidate_ExpressionPattern_node_sub_inlined__sub0_10;
                                match._edge__edge0 = candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10.lgspFlags = candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10.lgspFlags = candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10;
                            continue;
                        }
                        candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10.lgspFlags = candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10;
                    }
                    while( (candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10 = candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10.lgspOutNext) != head_candidate_ExpressionPattern_alt_0_Use_edge__edge0_inlined__sub0_10 );
                }
            } while(false);
            openTasks.Push(this);
            return;
        }
    }
    
    public class PatternAction_ExpressionPattern : GRGEN_LGSP.LGSPSubpatternAction
    {
        private PatternAction_ExpressionPattern(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_ExpressionPattern.Instance.patternGraph;
        }

        public static PatternAction_ExpressionPattern getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            PatternAction_ExpressionPattern newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new PatternAction_ExpressionPattern(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(PatternAction_ExpressionPattern oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static PatternAction_ExpressionPattern freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private PatternAction_ExpressionPattern next = null;

        public GRGEN_LGSP.LGSPNode ExpressionPattern_node_e;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // SubPreset ExpressionPattern_node_e 
            GRGEN_LGSP.LGSPNode candidate_ExpressionPattern_node_e = ExpressionPattern_node_e;
            // Extend Outgoing ExpressionPattern_edge__edge0 from ExpressionPattern_node_e 
            GRGEN_LGSP.LGSPEdge head_candidate_ExpressionPattern_edge__edge0 = candidate_ExpressionPattern_node_e.lgspOuthead;
            if(head_candidate_ExpressionPattern_edge__edge0 != null)
            {
                GRGEN_LGSP.LGSPEdge candidate_ExpressionPattern_edge__edge0 = head_candidate_ExpressionPattern_edge__edge0;
                do
                {
                    if(candidate_ExpressionPattern_edge__edge0.lgspType.TypeID!=3 && candidate_ExpressionPattern_edge__edge0.lgspType.TypeID!=11) {
                        continue;
                    }
                    if((candidate_ExpressionPattern_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                    {
                        continue;
                    }
                    // Implicit Target ExpressionPattern_node_sub from ExpressionPattern_edge__edge0 
                    GRGEN_LGSP.LGSPNode candidate_ExpressionPattern_node_sub = candidate_ExpressionPattern_edge__edge0.lgspTarget;
                    if(candidate_ExpressionPattern_node_sub.lgspType.TypeID!=3) {
                        continue;
                    }
                    if((candidate_ExpressionPattern_node_sub.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                    {
                        continue;
                    }
                    if((candidate_ExpressionPattern_node_sub.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                    {
                        continue;
                    }
                    // Push alternative matching task for ExpressionPattern_alt_0
                    AlternativeAction_ExpressionPattern_alt_0 taskFor_alt_0 = AlternativeAction_ExpressionPattern_alt_0.getNewTask(actionEnv, openTasks, Pattern_ExpressionPattern.Instance.patternGraph.alternatives[(int)Pattern_ExpressionPattern.ExpressionPattern_AltNums.@alt_0].alternativeCases);
                    taskFor_alt_0.ExpressionPattern_node_sub = candidate_ExpressionPattern_node_sub;
                    taskFor_alt_0.searchPatternpath = false;
                    taskFor_alt_0.matchOfNestingPattern = null;
                    taskFor_alt_0.lastMatchAtPreviousNestingLevel = null;
                    openTasks.Push(taskFor_alt_0);
                    uint prevGlobal__candidate_ExpressionPattern_node_sub;
                    prevGlobal__candidate_ExpressionPattern_node_sub = candidate_ExpressionPattern_node_sub.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                    candidate_ExpressionPattern_node_sub.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                    uint prevGlobal__candidate_ExpressionPattern_edge__edge0;
                    prevGlobal__candidate_ExpressionPattern_edge__edge0 = candidate_ExpressionPattern_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                    candidate_ExpressionPattern_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                    // Match subpatterns 
                    openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                    // Pop alternative matching task for ExpressionPattern_alt_0
                    openTasks.Pop();
                    AlternativeAction_ExpressionPattern_alt_0.releaseTask(taskFor_alt_0);
                    // Check whether subpatterns were found 
                    if(matchesList.Count>0) {
                        // subpatterns/alternatives were found, extend the partial matches by our local match object
                        foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                        {
                            Pattern_ExpressionPattern.Match_ExpressionPattern match = new Pattern_ExpressionPattern.Match_ExpressionPattern();
                            match._node_e = candidate_ExpressionPattern_node_e;
                            match._node_sub = candidate_ExpressionPattern_node_sub;
                            match._edge__edge0 = candidate_ExpressionPattern_edge__edge0;
                            match._alt_0 = (Pattern_ExpressionPattern.IMatch_ExpressionPattern_alt_0)currentFoundPartialMatch.Pop();
                            match._alt_0.SetMatchOfEnclosingPattern(match);
                            currentFoundPartialMatch.Push(match);
                        }
                        if(matchesList==foundPartialMatches) {
                            matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                        } else {
                            foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                foundPartialMatches.Add(match);
                            }
                            matchesList.Clear();
                        }
                        // if enough matches were found, we leave
                        if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                        {
                            candidate_ExpressionPattern_edge__edge0.lgspFlags = candidate_ExpressionPattern_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_edge__edge0;
                            candidate_ExpressionPattern_node_sub.lgspFlags = candidate_ExpressionPattern_node_sub.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_node_sub;
                            openTasks.Push(this);
                            return;
                        }
                        candidate_ExpressionPattern_edge__edge0.lgspFlags = candidate_ExpressionPattern_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_edge__edge0;
                        candidate_ExpressionPattern_node_sub.lgspFlags = candidate_ExpressionPattern_node_sub.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_node_sub;
                        continue;
                    }
                    candidate_ExpressionPattern_node_sub.lgspFlags = candidate_ExpressionPattern_node_sub.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_node_sub;
                    candidate_ExpressionPattern_edge__edge0.lgspFlags = candidate_ExpressionPattern_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_edge__edge0;
                }
                while( (candidate_ExpressionPattern_edge__edge0 = candidate_ExpressionPattern_edge__edge0.lgspOutNext) != head_candidate_ExpressionPattern_edge__edge0 );
            }
            openTasks.Push(this);
            return;
        }
    }
    
    public class AlternativeAction_ExpressionPattern_alt_0 : GRGEN_LGSP.LGSPSubpatternAction
    {
        private AlternativeAction_ExpressionPattern_alt_0(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_)
            : base(patternGraphs_)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
        }

        public static AlternativeAction_ExpressionPattern_alt_0 getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_, GRGEN_LGSP.PatternGraph[] patternGraphs_) {
            AlternativeAction_ExpressionPattern_alt_0 newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new AlternativeAction_ExpressionPattern_alt_0(actionEnv_, openTasks_, patternGraphs_);
            }
            return newTask;
        }

        public static void releaseTask(AlternativeAction_ExpressionPattern_alt_0 oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static AlternativeAction_ExpressionPattern_alt_0 freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private AlternativeAction_ExpressionPattern_alt_0 next = null;

        public GRGEN_LGSP.LGSPNode ExpressionPattern_node_sub;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // Alternative case ExpressionPattern_alt_0_Call 
            do {
                patternGraph = patternGraphs[(int)Pattern_ExpressionPattern.ExpressionPattern_alt_0_CaseNums.@Call];
                // SubPreset ExpressionPattern_node_sub 
                GRGEN_LGSP.LGSPNode candidate_ExpressionPattern_node_sub = ExpressionPattern_node_sub;
                // Element Expressions_node_e_inlined__sub0_11 assigned from other element ExpressionPattern_node_sub 
                GRGEN_LGSP.LGSPNode candidate_Expressions_node_e_inlined__sub0_11 = candidate_ExpressionPattern_node_sub;
                if(candidate_Expressions_node_e_inlined__sub0_11.lgspType.TypeID!=3) {
                    continue;
                }
                // Extend Outgoing ExpressionPattern_alt_0_Call_edge__edge0 from ExpressionPattern_node_sub 
                GRGEN_LGSP.LGSPEdge head_candidate_ExpressionPattern_alt_0_Call_edge__edge0 = candidate_ExpressionPattern_node_sub.lgspOuthead;
                if(head_candidate_ExpressionPattern_alt_0_Call_edge__edge0 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_ExpressionPattern_alt_0_Call_edge__edge0 = head_candidate_ExpressionPattern_alt_0_Call_edge__edge0;
                    do
                    {
                        if(candidate_ExpressionPattern_alt_0_Call_edge__edge0.lgspType.TypeID!=9) {
                            continue;
                        }
                        if((candidate_ExpressionPattern_alt_0_Call_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Push iterated matching task for Expressions_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call
                        IteratedAction_Expressions_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call taskFor_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call = IteratedAction_Expressions_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call.getNewTask(actionEnv, openTasks);
                        taskFor_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call.Expressions_node_e_inlined__sub0_11 = candidate_Expressions_node_e_inlined__sub0_11;
                        taskFor_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call.searchPatternpath = false;
                        taskFor_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call.matchOfNestingPattern = null;
                        taskFor_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call.lastMatchAtPreviousNestingLevel = null;
                        openTasks.Push(taskFor_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call);
                        uint prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0;
                        prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0 = candidate_ExpressionPattern_alt_0_Call_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_ExpressionPattern_alt_0_Call_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Pop iterated matching task for Expressions_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call
                        openTasks.Pop();
                        IteratedAction_Expressions_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call.releaseTask(taskFor_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Call match = new Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Call();
                                Pattern_Expressions.Match_Expressions match__sub0 = new Pattern_Expressions.Match_Expressions();
                                match__sub0.SetMatchOfEnclosingPattern(match);
                                match._node_sub = candidate_ExpressionPattern_node_sub;
                                match__sub0._node_e = candidate_Expressions_node_e_inlined__sub0_11;
                                match._edge__edge0 = candidate_ExpressionPattern_alt_0_Call_edge__edge0;
                                match.__sub0 = match__sub0;
                                match__sub0._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Expressions.Match_Expressions_iter_0, Pattern_Expressions.IMatch_Expressions_iter_0>(null);
                                while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Expressions.IMatch_Expressions_iter_0) {
                                    Pattern_Expressions.Match_Expressions_iter_0 cfpm = (Pattern_Expressions.Match_Expressions_iter_0)currentFoundPartialMatch.Pop();
                                    if(cfpm.IsNullMatch) break;
                                    cfpm.SetMatchOfEnclosingPattern(match__sub0);
                                    match__sub0._iter_0.Add(cfpm);
                                }
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_ExpressionPattern_alt_0_Call_edge__edge0.lgspFlags = candidate_ExpressionPattern_alt_0_Call_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_ExpressionPattern_alt_0_Call_edge__edge0.lgspFlags = candidate_ExpressionPattern_alt_0_Call_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0;
                            continue;
                        }
                        candidate_ExpressionPattern_alt_0_Call_edge__edge0.lgspFlags = candidate_ExpressionPattern_alt_0_Call_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Call_edge__edge0;
                    }
                    while( (candidate_ExpressionPattern_alt_0_Call_edge__edge0 = candidate_ExpressionPattern_alt_0_Call_edge__edge0.lgspOutNext) != head_candidate_ExpressionPattern_alt_0_Call_edge__edge0 );
                }
            } while(false);
            if(matchesList.Count>0) {
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
            }
            // Alternative case ExpressionPattern_alt_0_Use 
            do {
                patternGraph = patternGraphs[(int)Pattern_ExpressionPattern.ExpressionPattern_alt_0_CaseNums.@Use];
                // SubPreset ExpressionPattern_node_sub 
                GRGEN_LGSP.LGSPNode candidate_ExpressionPattern_node_sub = ExpressionPattern_node_sub;
                // Extend Outgoing ExpressionPattern_alt_0_Use_edge__edge0 from ExpressionPattern_node_sub 
                GRGEN_LGSP.LGSPEdge head_candidate_ExpressionPattern_alt_0_Use_edge__edge0 = candidate_ExpressionPattern_node_sub.lgspOuthead;
                if(head_candidate_ExpressionPattern_alt_0_Use_edge__edge0 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_ExpressionPattern_alt_0_Use_edge__edge0 = head_candidate_ExpressionPattern_alt_0_Use_edge__edge0;
                    do
                    {
                        if(candidate_ExpressionPattern_alt_0_Use_edge__edge0.lgspType.TypeID!=7) {
                            continue;
                        }
                        if((candidate_ExpressionPattern_alt_0_Use_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        // Check whether there are subpattern matching tasks left to execute
                        if(openTasks.Count==0)
                        {
                            Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                            foundPartialMatches.Add(currentFoundPartialMatch);
                            Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Use match = new Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Use();
                            match._node_sub = candidate_ExpressionPattern_node_sub;
                            match._edge__edge0 = candidate_ExpressionPattern_alt_0_Use_edge__edge0;
                            currentFoundPartialMatch.Push(match);
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                openTasks.Push(this);
                                return;
                            }
                            continue;
                        }
                        uint prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0;
                        prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0 = candidate_ExpressionPattern_alt_0_Use_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        candidate_ExpressionPattern_alt_0_Use_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                        // Match subpatterns 
                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                        // Check whether subpatterns were found 
                        if(matchesList.Count>0) {
                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                            {
                                Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Use match = new Pattern_ExpressionPattern.Match_ExpressionPattern_alt_0_Use();
                                match._node_sub = candidate_ExpressionPattern_node_sub;
                                match._edge__edge0 = candidate_ExpressionPattern_alt_0_Use_edge__edge0;
                                currentFoundPartialMatch.Push(match);
                            }
                            if(matchesList==foundPartialMatches) {
                                matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                            } else {
                                foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                    foundPartialMatches.Add(match);
                                }
                                matchesList.Clear();
                            }
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                            {
                                candidate_ExpressionPattern_alt_0_Use_edge__edge0.lgspFlags = candidate_ExpressionPattern_alt_0_Use_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0;
                                openTasks.Push(this);
                                return;
                            }
                            candidate_ExpressionPattern_alt_0_Use_edge__edge0.lgspFlags = candidate_ExpressionPattern_alt_0_Use_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0;
                            continue;
                        }
                        candidate_ExpressionPattern_alt_0_Use_edge__edge0.lgspFlags = candidate_ExpressionPattern_alt_0_Use_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_ExpressionPattern_alt_0_Use_edge__edge0;
                    }
                    while( (candidate_ExpressionPattern_alt_0_Use_edge__edge0 = candidate_ExpressionPattern_alt_0_Use_edge__edge0.lgspOutNext) != head_candidate_ExpressionPattern_alt_0_Use_edge__edge0 );
                }
            } while(false);
            openTasks.Push(this);
            return;
        }
    }
    
    public class IteratedAction_Expressions_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Expressions_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_ExpressionPattern.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Expressions_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Expressions_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Expressions_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Expressions_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Expressions_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Expressions_iter_0_inlined__sub0_11_in_ExpressionPattern_alt_0_Call next = null;

        public GRGEN_LGSP.LGSPNode Expressions_node_e_inlined__sub0_11;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Expressions_node_e_inlined__sub0_11 
                GRGEN_LGSP.LGSPNode candidate_Expressions_node_e_inlined__sub0_11 = Expressions_node_e_inlined__sub0_11;
                // accept iterated instance match
                ++numMatchesIter;
                // Push subpattern matching task for _sub0_inlined__sub0_11
                PatternAction_ExpressionPattern taskFor__sub0_inlined__sub0_11 = PatternAction_ExpressionPattern.getNewTask(actionEnv, openTasks);
                taskFor__sub0_inlined__sub0_11.ExpressionPattern_node_e = candidate_Expressions_node_e_inlined__sub0_11;
                taskFor__sub0_inlined__sub0_11.searchPatternpath = false;
                taskFor__sub0_inlined__sub0_11.matchOfNestingPattern = null;
                taskFor__sub0_inlined__sub0_11.lastMatchAtPreviousNestingLevel = null;
                openTasks.Push(taskFor__sub0_inlined__sub0_11);
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Pop subpattern matching task for _sub0_inlined__sub0_11
                openTasks.Pop();
                PatternAction_ExpressionPattern.releaseTask(taskFor__sub0_inlined__sub0_11);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    patternFound = true;
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Expressions.Match_Expressions_iter_0 match = new Pattern_Expressions.Match_Expressions_iter_0();
                        match._node_e = candidate_Expressions_node_e_inlined__sub0_11;
                        match.__sub0 = (@Pattern_ExpressionPattern.Match_ExpressionPattern)currentFoundPartialMatch.Pop();
                        match.__sub0._matchOfEnclosingPattern = match;
                        currentFoundPartialMatch.Push(match);
                    }
                    // if enough matches were found, we leave
                    if(true) // as soon as there's a match, it's enough for iterated
                    {
                        --numMatchesIter;
                        continue;
                    }
                    --numMatchesIter;
                    continue;
                }
                --numMatchesIter;
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Expressions.Match_Expressions_iter_0 match = new Pattern_Expressions.Match_Expressions_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Expressions.Match_Expressions_iter_0 match = new Pattern_Expressions.Match_Expressions_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    public class PatternAction_Bodies : GRGEN_LGSP.LGSPSubpatternAction
    {
        private PatternAction_Bodies(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Bodies.Instance.patternGraph;
        }

        public static PatternAction_Bodies getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            PatternAction_Bodies newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new PatternAction_Bodies(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(PatternAction_Bodies oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static PatternAction_Bodies freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private PatternAction_Bodies next = null;

        public GRGEN_LGSP.LGSPNode Bodies_node_m5;
        public GRGEN_LGSP.LGSPNode Bodies_node_c1;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // SubPreset Bodies_node_m5 
            GRGEN_LGSP.LGSPNode candidate_Bodies_node_m5 = Bodies_node_m5;
            // SubPreset Bodies_node_c1 
            GRGEN_LGSP.LGSPNode candidate_Bodies_node_c1 = Bodies_node_c1;
            // Push iterated matching task for Bodies_iter_0
            IteratedAction_Bodies_iter_0 taskFor_iter_0 = IteratedAction_Bodies_iter_0.getNewTask(actionEnv, openTasks);
            taskFor_iter_0.Bodies_node_m5 = candidate_Bodies_node_m5;
            taskFor_iter_0.Bodies_node_c1 = candidate_Bodies_node_c1;
            taskFor_iter_0.searchPatternpath = false;
            taskFor_iter_0.matchOfNestingPattern = null;
            taskFor_iter_0.lastMatchAtPreviousNestingLevel = null;
            openTasks.Push(taskFor_iter_0);
            // Match subpatterns 
            openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
            // Pop iterated matching task for Bodies_iter_0
            openTasks.Pop();
            IteratedAction_Bodies_iter_0.releaseTask(taskFor_iter_0);
            // Check whether subpatterns were found 
            if(matchesList.Count>0) {
                // subpatterns/alternatives were found, extend the partial matches by our local match object
                foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                {
                    Pattern_Bodies.Match_Bodies match = new Pattern_Bodies.Match_Bodies();
                    match._node_m5 = candidate_Bodies_node_m5;
                    match._node_c1 = candidate_Bodies_node_c1;
                    match._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Bodies.Match_Bodies_iter_0, Pattern_Bodies.IMatch_Bodies_iter_0>(null);
                    while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Bodies.IMatch_Bodies_iter_0) {
                        Pattern_Bodies.Match_Bodies_iter_0 cfpm = (Pattern_Bodies.Match_Bodies_iter_0)currentFoundPartialMatch.Pop();
                        if(cfpm.IsNullMatch) break;
                        cfpm.SetMatchOfEnclosingPattern(match);
                        match._iter_0.Add(cfpm);
                    }
                    currentFoundPartialMatch.Push(match);
                }
                if(matchesList==foundPartialMatches) {
                    matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                } else {
                    foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                        foundPartialMatches.Add(match);
                    }
                    matchesList.Clear();
                }
                // if enough matches were found, we leave
                if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                {
                    openTasks.Push(this);
                    return;
                }
                openTasks.Push(this);
                return;
            }
            openTasks.Push(this);
            return;
        }
    }
    
    public class IteratedAction_Bodies_iter_0 : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Bodies_iter_0(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Bodies.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Bodies_iter_0 getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Bodies_iter_0 newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Bodies_iter_0(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Bodies_iter_0 oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Bodies_iter_0 freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Bodies_iter_0 next = null;

        public GRGEN_LGSP.LGSPNode Bodies_node_m5;
        public GRGEN_LGSP.LGSPNode Bodies_node_c1;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Bodies_node_m5 
                GRGEN_LGSP.LGSPNode candidate_Bodies_node_m5 = Bodies_node_m5;
                // SubPreset Bodies_node_c1 
                GRGEN_LGSP.LGSPNode candidate_Bodies_node_c1 = Bodies_node_c1;
                // Element Body_node_c1_inlined_b_12 assigned from other element Bodies_node_c1 
                GRGEN_LGSP.LGSPNode candidate_Body_node_c1_inlined_b_12 = candidate_Bodies_node_c1;
                if(candidate_Body_node_c1_inlined_b_12.lgspType.TypeID!=5) {
                    continue;
                }
                // Extend Outgoing Body_edge__edge0_inlined_b_12 from Body_node_c1_inlined_b_12 
                GRGEN_LGSP.LGSPEdge head_candidate_Body_edge__edge0_inlined_b_12 = candidate_Body_node_c1_inlined_b_12.lgspOuthead;
                if(head_candidate_Body_edge__edge0_inlined_b_12 != null)
                {
                    GRGEN_LGSP.LGSPEdge candidate_Body_edge__edge0_inlined_b_12 = head_candidate_Body_edge__edge0_inlined_b_12;
                    do
                    {
                        if(candidate_Body_edge__edge0_inlined_b_12.lgspType.TypeID!=3 && candidate_Body_edge__edge0_inlined_b_12.lgspType.TypeID!=11) {
                            continue;
                        }
                        if((candidate_Body_edge__edge0_inlined_b_12.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            continue;
                        }
                        uint prev__candidate_Body_edge__edge0_inlined_b_12;
                        prev__candidate_Body_edge__edge0_inlined_b_12 = candidate_Body_edge__edge0_inlined_b_12.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                        candidate_Body_edge__edge0_inlined_b_12.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                        // Implicit Target Body_node_c2_inlined_b_12 from Body_edge__edge0_inlined_b_12 
                        GRGEN_LGSP.LGSPNode candidate_Body_node_c2_inlined_b_12 = candidate_Body_edge__edge0_inlined_b_12.lgspTarget;
                        if(candidate_Body_node_c2_inlined_b_12.lgspType.TypeID!=5) {
                            candidate_Body_edge__edge0_inlined_b_12.lgspFlags = candidate_Body_edge__edge0_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Body_edge__edge0_inlined_b_12;
                            continue;
                        }
                        if((candidate_Body_node_c2_inlined_b_12.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                        {
                            candidate_Body_edge__edge0_inlined_b_12.lgspFlags = candidate_Body_edge__edge0_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Body_edge__edge0_inlined_b_12;
                            continue;
                        }
                        if((candidate_Body_node_c2_inlined_b_12.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                        {
                            candidate_Body_edge__edge0_inlined_b_12.lgspFlags = candidate_Body_edge__edge0_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Body_edge__edge0_inlined_b_12;
                            continue;
                        }
                        // Extend Outgoing Body_edge__edge1_inlined_b_12 from Body_node_c2_inlined_b_12 
                        GRGEN_LGSP.LGSPEdge head_candidate_Body_edge__edge1_inlined_b_12 = candidate_Body_node_c2_inlined_b_12.lgspOuthead;
                        if(head_candidate_Body_edge__edge1_inlined_b_12 != null)
                        {
                            GRGEN_LGSP.LGSPEdge candidate_Body_edge__edge1_inlined_b_12 = head_candidate_Body_edge__edge1_inlined_b_12;
                            do
                            {
                                if(candidate_Body_edge__edge1_inlined_b_12.lgspType.TypeID!=3 && candidate_Body_edge__edge1_inlined_b_12.lgspType.TypeID!=11) {
                                    continue;
                                }
                                if((candidate_Body_edge__edge1_inlined_b_12.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                                {
                                    continue;
                                }
                                if((candidate_Body_edge__edge1_inlined_b_12.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                                {
                                    continue;
                                }
                                // Implicit Target Body_node_b_inlined_b_12 from Body_edge__edge1_inlined_b_12 
                                GRGEN_LGSP.LGSPNode candidate_Body_node_b_inlined_b_12 = candidate_Body_edge__edge1_inlined_b_12.lgspTarget;
                                if(candidate_Body_node_b_inlined_b_12.lgspType.TypeID!=2) {
                                    continue;
                                }
                                if((candidate_Body_node_b_inlined_b_12.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                                {
                                    continue;
                                }
                                // Extend Outgoing Body_edge__edge2_inlined_b_12 from Body_node_b_inlined_b_12 
                                GRGEN_LGSP.LGSPEdge head_candidate_Body_edge__edge2_inlined_b_12 = candidate_Body_node_b_inlined_b_12.lgspOuthead;
                                if(head_candidate_Body_edge__edge2_inlined_b_12 != null)
                                {
                                    GRGEN_LGSP.LGSPEdge candidate_Body_edge__edge2_inlined_b_12 = head_candidate_Body_edge__edge2_inlined_b_12;
                                    do
                                    {
                                        if(candidate_Body_edge__edge2_inlined_b_12.lgspType.TypeID!=6) {
                                            continue;
                                        }
                                        if((candidate_Body_edge__edge2_inlined_b_12.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                                        {
                                            continue;
                                        }
                                        // Implicit Target Body_node_m5_inlined_b_12 from Body_edge__edge2_inlined_b_12 
                                        GRGEN_LGSP.LGSPNode candidate_Body_node_m5_inlined_b_12 = candidate_Body_edge__edge2_inlined_b_12.lgspTarget;
                                        if(candidate_Body_node_m5_inlined_b_12.lgspType.TypeID!=7) {
                                            continue;
                                        }
                                        if((candidate_Body_node_m5_inlined_b_12.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                                        {
                                            continue;
                                        }
                                        if(candidate_Body_node_m5_inlined_b_12!=candidate_Bodies_node_m5) {
                                            continue;
                                        }
                                        // accept iterated instance match
                                        ++numMatchesIter;
                                        // Push subpattern matching task for s_inlined_b_12
                                        PatternAction_Statements taskFor_s_inlined_b_12 = PatternAction_Statements.getNewTask(actionEnv, openTasks);
                                        taskFor_s_inlined_b_12.Statements_node_b = candidate_Body_node_b_inlined_b_12;
                                        taskFor_s_inlined_b_12.searchPatternpath = false;
                                        taskFor_s_inlined_b_12.matchOfNestingPattern = null;
                                        taskFor_s_inlined_b_12.lastMatchAtPreviousNestingLevel = null;
                                        openTasks.Push(taskFor_s_inlined_b_12);
                                        // Push subpattern matching task for p_inlined_b_12
                                        PatternAction_Parameters taskFor_p_inlined_b_12 = PatternAction_Parameters.getNewTask(actionEnv, openTasks);
                                        taskFor_p_inlined_b_12.Parameters_node_b = candidate_Body_node_b_inlined_b_12;
                                        taskFor_p_inlined_b_12.searchPatternpath = false;
                                        taskFor_p_inlined_b_12.matchOfNestingPattern = null;
                                        taskFor_p_inlined_b_12.lastMatchAtPreviousNestingLevel = null;
                                        openTasks.Push(taskFor_p_inlined_b_12);
                                        uint prevGlobal__candidate_Body_node_c2_inlined_b_12;
                                        prevGlobal__candidate_Body_node_c2_inlined_b_12 = candidate_Body_node_c2_inlined_b_12.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        candidate_Body_node_c2_inlined_b_12.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        uint prevGlobal__candidate_Body_node_b_inlined_b_12;
                                        prevGlobal__candidate_Body_node_b_inlined_b_12 = candidate_Body_node_b_inlined_b_12.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        candidate_Body_node_b_inlined_b_12.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        uint prevGlobal__candidate_Body_edge__edge0_inlined_b_12;
                                        prevGlobal__candidate_Body_edge__edge0_inlined_b_12 = candidate_Body_edge__edge0_inlined_b_12.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        candidate_Body_edge__edge0_inlined_b_12.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        uint prevGlobal__candidate_Body_edge__edge1_inlined_b_12;
                                        prevGlobal__candidate_Body_edge__edge1_inlined_b_12 = candidate_Body_edge__edge1_inlined_b_12.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        candidate_Body_edge__edge1_inlined_b_12.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        uint prevGlobal__candidate_Body_edge__edge2_inlined_b_12;
                                        prevGlobal__candidate_Body_edge__edge2_inlined_b_12 = candidate_Body_edge__edge2_inlined_b_12.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        candidate_Body_edge__edge2_inlined_b_12.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                        // Match subpatterns 
                                        openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                                        // Pop subpattern matching task for p_inlined_b_12
                                        openTasks.Pop();
                                        PatternAction_Parameters.releaseTask(taskFor_p_inlined_b_12);
                                        // Pop subpattern matching task for s_inlined_b_12
                                        openTasks.Pop();
                                        PatternAction_Statements.releaseTask(taskFor_s_inlined_b_12);
                                        // Check whether subpatterns were found 
                                        if(matchesList.Count>0) {
                                            patternFound = true;
                                            // subpatterns/alternatives were found, extend the partial matches by our local match object
                                            foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                                            {
                                                Pattern_Bodies.Match_Bodies_iter_0 match = new Pattern_Bodies.Match_Bodies_iter_0();
                                                Pattern_Body.Match_Body match_b = new Pattern_Body.Match_Body();
                                                match_b.SetMatchOfEnclosingPattern(match);
                                                match._node_m5 = candidate_Bodies_node_m5;
                                                match._node_c1 = candidate_Bodies_node_c1;
                                                match_b._node_c1 = candidate_Body_node_c1_inlined_b_12;
                                                match_b._node_c2 = candidate_Body_node_c2_inlined_b_12;
                                                match_b._node_b = candidate_Body_node_b_inlined_b_12;
                                                match_b._node_m5 = candidate_Body_node_m5_inlined_b_12;
                                                match_b._edge__edge0 = candidate_Body_edge__edge0_inlined_b_12;
                                                match_b._edge__edge1 = candidate_Body_edge__edge1_inlined_b_12;
                                                match_b._edge__edge2 = candidate_Body_edge__edge2_inlined_b_12;
                                                match._b = match_b;
                                                match_b._p = (@Pattern_Parameters.Match_Parameters)currentFoundPartialMatch.Pop();
                                                match_b._p._matchOfEnclosingPattern = match_b;
                                                match_b._s = (@Pattern_Statements.Match_Statements)currentFoundPartialMatch.Pop();
                                                match_b._s._matchOfEnclosingPattern = match_b;
                                                currentFoundPartialMatch.Push(match);
                                            }
                                            // if enough matches were found, we leave
                                            if(true) // as soon as there's a match, it's enough for iterated
                                            {
                                                candidate_Body_edge__edge2_inlined_b_12.lgspFlags = candidate_Body_edge__edge2_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge2_inlined_b_12;
                                                candidate_Body_edge__edge1_inlined_b_12.lgspFlags = candidate_Body_edge__edge1_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge1_inlined_b_12;
                                                candidate_Body_edge__edge0_inlined_b_12.lgspFlags = candidate_Body_edge__edge0_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge0_inlined_b_12;
                                                candidate_Body_node_b_inlined_b_12.lgspFlags = candidate_Body_node_b_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_node_b_inlined_b_12;
                                                candidate_Body_node_c2_inlined_b_12.lgspFlags = candidate_Body_node_c2_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_node_c2_inlined_b_12;
                                                --numMatchesIter;
                                                candidate_Body_edge__edge0_inlined_b_12.lgspFlags = candidate_Body_edge__edge0_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Body_edge__edge0_inlined_b_12;
                                                goto maxMatchesIterReached;
                                            }
                                            candidate_Body_edge__edge2_inlined_b_12.lgspFlags = candidate_Body_edge__edge2_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge2_inlined_b_12;
                                            candidate_Body_edge__edge1_inlined_b_12.lgspFlags = candidate_Body_edge__edge1_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge1_inlined_b_12;
                                            candidate_Body_edge__edge0_inlined_b_12.lgspFlags = candidate_Body_edge__edge0_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge0_inlined_b_12;
                                            candidate_Body_node_b_inlined_b_12.lgspFlags = candidate_Body_node_b_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_node_b_inlined_b_12;
                                            candidate_Body_node_c2_inlined_b_12.lgspFlags = candidate_Body_node_c2_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_node_c2_inlined_b_12;
                                            --numMatchesIter;
                                            continue;
                                        }
                                        candidate_Body_node_c2_inlined_b_12.lgspFlags = candidate_Body_node_c2_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_node_c2_inlined_b_12;
                                        candidate_Body_node_b_inlined_b_12.lgspFlags = candidate_Body_node_b_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_node_b_inlined_b_12;
                                        candidate_Body_edge__edge0_inlined_b_12.lgspFlags = candidate_Body_edge__edge0_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge0_inlined_b_12;
                                        candidate_Body_edge__edge1_inlined_b_12.lgspFlags = candidate_Body_edge__edge1_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge1_inlined_b_12;
                                        candidate_Body_edge__edge2_inlined_b_12.lgspFlags = candidate_Body_edge__edge2_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge2_inlined_b_12;
                                        --numMatchesIter;
                                    }
                                    while( (candidate_Body_edge__edge2_inlined_b_12 = candidate_Body_edge__edge2_inlined_b_12.lgspOutNext) != head_candidate_Body_edge__edge2_inlined_b_12 );
                                }
                            }
                            while( (candidate_Body_edge__edge1_inlined_b_12 = candidate_Body_edge__edge1_inlined_b_12.lgspOutNext) != head_candidate_Body_edge__edge1_inlined_b_12 );
                        }
                        candidate_Body_edge__edge0_inlined_b_12.lgspFlags = candidate_Body_edge__edge0_inlined_b_12.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Body_edge__edge0_inlined_b_12;
                    }
                    while( (candidate_Body_edge__edge0_inlined_b_12 = candidate_Body_edge__edge0_inlined_b_12.lgspOutNext) != head_candidate_Body_edge__edge0_inlined_b_12 );
                }
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Bodies.Match_Bodies_iter_0 match = new Pattern_Bodies.Match_Bodies_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Bodies.Match_Bodies_iter_0 match = new Pattern_Bodies.Match_Bodies_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    public class PatternAction_Body : GRGEN_LGSP.LGSPSubpatternAction
    {
        private PatternAction_Body(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Body.Instance.patternGraph;
        }

        public static PatternAction_Body getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            PatternAction_Body newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new PatternAction_Body(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(PatternAction_Body oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static PatternAction_Body freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private PatternAction_Body next = null;

        public GRGEN_LGSP.LGSPNode Body_node_c1;
        public GRGEN_LGSP.LGSPNode Body_node_m5;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            openTasks.Pop();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // SubPreset Body_node_c1 
            GRGEN_LGSP.LGSPNode candidate_Body_node_c1 = Body_node_c1;
            // SubPreset Body_node_m5 
            GRGEN_LGSP.LGSPNode candidate_Body_node_m5 = Body_node_m5;
            // Extend Outgoing Body_edge__edge0 from Body_node_c1 
            GRGEN_LGSP.LGSPEdge head_candidate_Body_edge__edge0 = candidate_Body_node_c1.lgspOuthead;
            if(head_candidate_Body_edge__edge0 != null)
            {
                GRGEN_LGSP.LGSPEdge candidate_Body_edge__edge0 = head_candidate_Body_edge__edge0;
                do
                {
                    if(candidate_Body_edge__edge0.lgspType.TypeID!=3 && candidate_Body_edge__edge0.lgspType.TypeID!=11) {
                        continue;
                    }
                    if((candidate_Body_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                    {
                        continue;
                    }
                    uint prev__candidate_Body_edge__edge0;
                    prev__candidate_Body_edge__edge0 = candidate_Body_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                    candidate_Body_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                    // Implicit Target Body_node_c2 from Body_edge__edge0 
                    GRGEN_LGSP.LGSPNode candidate_Body_node_c2 = candidate_Body_edge__edge0.lgspTarget;
                    if(candidate_Body_node_c2.lgspType.TypeID!=5) {
                        candidate_Body_edge__edge0.lgspFlags = candidate_Body_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Body_edge__edge0;
                        continue;
                    }
                    if((candidate_Body_node_c2.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                    {
                        candidate_Body_edge__edge0.lgspFlags = candidate_Body_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Body_edge__edge0;
                        continue;
                    }
                    if((candidate_Body_node_c2.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                    {
                        candidate_Body_edge__edge0.lgspFlags = candidate_Body_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Body_edge__edge0;
                        continue;
                    }
                    // Extend Outgoing Body_edge__edge1 from Body_node_c2 
                    GRGEN_LGSP.LGSPEdge head_candidate_Body_edge__edge1 = candidate_Body_node_c2.lgspOuthead;
                    if(head_candidate_Body_edge__edge1 != null)
                    {
                        GRGEN_LGSP.LGSPEdge candidate_Body_edge__edge1 = head_candidate_Body_edge__edge1;
                        do
                        {
                            if(candidate_Body_edge__edge1.lgspType.TypeID!=3 && candidate_Body_edge__edge1.lgspType.TypeID!=11) {
                                continue;
                            }
                            if((candidate_Body_edge__edge1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                            {
                                continue;
                            }
                            if((candidate_Body_edge__edge1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                            {
                                continue;
                            }
                            // Implicit Target Body_node_b from Body_edge__edge1 
                            GRGEN_LGSP.LGSPNode candidate_Body_node_b = candidate_Body_edge__edge1.lgspTarget;
                            if(candidate_Body_node_b.lgspType.TypeID!=2) {
                                continue;
                            }
                            if((candidate_Body_node_b.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                            {
                                continue;
                            }
                            // Element Statements_node_b_inlined_s_14 assigned from other element Body_node_b 
                            GRGEN_LGSP.LGSPNode candidate_Statements_node_b_inlined_s_14 = candidate_Body_node_b;
                            if(candidate_Statements_node_b_inlined_s_14.lgspType.TypeID!=2) {
                                continue;
                            }
                            // Element Parameters_node_b_inlined_p_13 assigned from other element Body_node_b 
                            GRGEN_LGSP.LGSPNode candidate_Parameters_node_b_inlined_p_13 = candidate_Body_node_b;
                            if(candidate_Parameters_node_b_inlined_p_13.lgspType.TypeID!=2) {
                                continue;
                            }
                            // Extend Outgoing Body_edge__edge2 from Body_node_b 
                            GRGEN_LGSP.LGSPEdge head_candidate_Body_edge__edge2 = candidate_Body_node_b.lgspOuthead;
                            if(head_candidate_Body_edge__edge2 != null)
                            {
                                GRGEN_LGSP.LGSPEdge candidate_Body_edge__edge2 = head_candidate_Body_edge__edge2;
                                do
                                {
                                    if(candidate_Body_edge__edge2.lgspType.TypeID!=6) {
                                        continue;
                                    }
                                    if(candidate_Body_edge__edge2.lgspTarget != candidate_Body_node_m5) {
                                        continue;
                                    }
                                    if((candidate_Body_edge__edge2.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)==(uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace)
                                    {
                                        continue;
                                    }
                                    // Push iterated matching task for Statements_iter_0_inlined_s_14_in_Body
                                    IteratedAction_Statements_iter_0_inlined_s_14_in_Body taskFor_iter_0_inlined_s_14_in_Body = IteratedAction_Statements_iter_0_inlined_s_14_in_Body.getNewTask(actionEnv, openTasks);
                                    taskFor_iter_0_inlined_s_14_in_Body.Statements_node_b_inlined_s_14 = candidate_Statements_node_b_inlined_s_14;
                                    taskFor_iter_0_inlined_s_14_in_Body.searchPatternpath = false;
                                    taskFor_iter_0_inlined_s_14_in_Body.matchOfNestingPattern = null;
                                    taskFor_iter_0_inlined_s_14_in_Body.lastMatchAtPreviousNestingLevel = null;
                                    openTasks.Push(taskFor_iter_0_inlined_s_14_in_Body);
                                    // Push iterated matching task for Parameters_iter_0_inlined_p_13_in_Body
                                    IteratedAction_Parameters_iter_0_inlined_p_13_in_Body taskFor_iter_0_inlined_p_13_in_Body = IteratedAction_Parameters_iter_0_inlined_p_13_in_Body.getNewTask(actionEnv, openTasks);
                                    taskFor_iter_0_inlined_p_13_in_Body.Parameters_node_b_inlined_p_13 = candidate_Parameters_node_b_inlined_p_13;
                                    taskFor_iter_0_inlined_p_13_in_Body.searchPatternpath = false;
                                    taskFor_iter_0_inlined_p_13_in_Body.matchOfNestingPattern = null;
                                    taskFor_iter_0_inlined_p_13_in_Body.lastMatchAtPreviousNestingLevel = null;
                                    openTasks.Push(taskFor_iter_0_inlined_p_13_in_Body);
                                    uint prevGlobal__candidate_Body_node_c2;
                                    prevGlobal__candidate_Body_node_c2 = candidate_Body_node_c2.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    candidate_Body_node_c2.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    uint prevGlobal__candidate_Body_node_b;
                                    prevGlobal__candidate_Body_node_b = candidate_Body_node_b.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    candidate_Body_node_b.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    uint prevGlobal__candidate_Body_edge__edge0;
                                    prevGlobal__candidate_Body_edge__edge0 = candidate_Body_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    candidate_Body_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    uint prevGlobal__candidate_Body_edge__edge1;
                                    prevGlobal__candidate_Body_edge__edge1 = candidate_Body_edge__edge1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    candidate_Body_edge__edge1.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    uint prevGlobal__candidate_Body_edge__edge2;
                                    prevGlobal__candidate_Body_edge__edge2 = candidate_Body_edge__edge2.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    candidate_Body_edge__edge2.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    // Match subpatterns 
                                    openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                                    // Pop iterated matching task for Parameters_iter_0_inlined_p_13_in_Body
                                    openTasks.Pop();
                                    IteratedAction_Parameters_iter_0_inlined_p_13_in_Body.releaseTask(taskFor_iter_0_inlined_p_13_in_Body);
                                    // Pop iterated matching task for Statements_iter_0_inlined_s_14_in_Body
                                    openTasks.Pop();
                                    IteratedAction_Statements_iter_0_inlined_s_14_in_Body.releaseTask(taskFor_iter_0_inlined_s_14_in_Body);
                                    // Check whether subpatterns were found 
                                    if(matchesList.Count>0) {
                                        // subpatterns/alternatives were found, extend the partial matches by our local match object
                                        foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                                        {
                                            Pattern_Body.Match_Body match = new Pattern_Body.Match_Body();
                                            Pattern_Parameters.Match_Parameters match_p = new Pattern_Parameters.Match_Parameters();
                                            match_p.SetMatchOfEnclosingPattern(match);
                                            Pattern_Statements.Match_Statements match_s = new Pattern_Statements.Match_Statements();
                                            match_s.SetMatchOfEnclosingPattern(match);
                                            match._node_c1 = candidate_Body_node_c1;
                                            match._node_c2 = candidate_Body_node_c2;
                                            match._node_b = candidate_Body_node_b;
                                            match._node_m5 = candidate_Body_node_m5;
                                            match_p._node_b = candidate_Parameters_node_b_inlined_p_13;
                                            match_s._node_b = candidate_Statements_node_b_inlined_s_14;
                                            match._edge__edge0 = candidate_Body_edge__edge0;
                                            match._edge__edge1 = candidate_Body_edge__edge1;
                                            match._edge__edge2 = candidate_Body_edge__edge2;
                                            match._p = match_p;
                                            match._s = match_s;
                                            match_p._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Parameters.Match_Parameters_iter_0, Pattern_Parameters.IMatch_Parameters_iter_0>(null);
                                            while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Parameters.IMatch_Parameters_iter_0) {
                                                Pattern_Parameters.Match_Parameters_iter_0 cfpm = (Pattern_Parameters.Match_Parameters_iter_0)currentFoundPartialMatch.Pop();
                                                if(cfpm.IsNullMatch) break;
                                                cfpm.SetMatchOfEnclosingPattern(match_p);
                                                match_p._iter_0.Add(cfpm);
                                            }
                                            match_s._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Statements.Match_Statements_iter_0, Pattern_Statements.IMatch_Statements_iter_0>(null);
                                            while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Statements.IMatch_Statements_iter_0) {
                                                Pattern_Statements.Match_Statements_iter_0 cfpm = (Pattern_Statements.Match_Statements_iter_0)currentFoundPartialMatch.Pop();
                                                if(cfpm.IsNullMatch) break;
                                                cfpm.SetMatchOfEnclosingPattern(match_s);
                                                match_s._iter_0.Add(cfpm);
                                            }
                                            currentFoundPartialMatch.Push(match);
                                        }
                                        if(matchesList==foundPartialMatches) {
                                            matchesList = new List<Stack<GRGEN_LIBGR.IMatch>>();
                                        } else {
                                            foreach(Stack<GRGEN_LIBGR.IMatch> match in matchesList) {
                                                foundPartialMatches.Add(match);
                                            }
                                            matchesList.Clear();
                                        }
                                        // if enough matches were found, we leave
                                        if(maxMatches > 0 && foundPartialMatches.Count >= maxMatches)
                                        {
                                            candidate_Body_edge__edge2.lgspFlags = candidate_Body_edge__edge2.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge2;
                                            candidate_Body_edge__edge1.lgspFlags = candidate_Body_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge1;
                                            candidate_Body_edge__edge0.lgspFlags = candidate_Body_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge0;
                                            candidate_Body_node_b.lgspFlags = candidate_Body_node_b.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_node_b;
                                            candidate_Body_node_c2.lgspFlags = candidate_Body_node_c2.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_node_c2;
                                            candidate_Body_edge__edge0.lgspFlags = candidate_Body_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Body_edge__edge0;
                                            openTasks.Push(this);
                                            return;
                                        }
                                        candidate_Body_edge__edge2.lgspFlags = candidate_Body_edge__edge2.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge2;
                                        candidate_Body_edge__edge1.lgspFlags = candidate_Body_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge1;
                                        candidate_Body_edge__edge0.lgspFlags = candidate_Body_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge0;
                                        candidate_Body_node_b.lgspFlags = candidate_Body_node_b.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_node_b;
                                        candidate_Body_node_c2.lgspFlags = candidate_Body_node_c2.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_node_c2;
                                        continue;
                                    }
                                    candidate_Body_node_c2.lgspFlags = candidate_Body_node_c2.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_node_c2;
                                    candidate_Body_node_b.lgspFlags = candidate_Body_node_b.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_node_b;
                                    candidate_Body_edge__edge0.lgspFlags = candidate_Body_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge0;
                                    candidate_Body_edge__edge1.lgspFlags = candidate_Body_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge1;
                                    candidate_Body_edge__edge2.lgspFlags = candidate_Body_edge__edge2.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_Body_edge__edge2;
                                }
                                while( (candidate_Body_edge__edge2 = candidate_Body_edge__edge2.lgspOutNext) != head_candidate_Body_edge__edge2 );
                            }
                        }
                        while( (candidate_Body_edge__edge1 = candidate_Body_edge__edge1.lgspOutNext) != head_candidate_Body_edge__edge1 );
                    }
                    candidate_Body_edge__edge0.lgspFlags = candidate_Body_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_Body_edge__edge0;
                }
                while( (candidate_Body_edge__edge0 = candidate_Body_edge__edge0.lgspOutNext) != head_candidate_Body_edge__edge0 );
            }
            openTasks.Push(this);
            return;
        }
    }
    
    public class IteratedAction_Parameters_iter_0_inlined_p_13_in_Body : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Parameters_iter_0_inlined_p_13_in_Body(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Body.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Parameters_iter_0_inlined_p_13_in_Body getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Parameters_iter_0_inlined_p_13_in_Body newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Parameters_iter_0_inlined_p_13_in_Body(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Parameters_iter_0_inlined_p_13_in_Body oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Parameters_iter_0_inlined_p_13_in_Body freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Parameters_iter_0_inlined_p_13_in_Body next = null;

        public GRGEN_LGSP.LGSPNode Parameters_node_b_inlined_p_13;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Parameters_node_b_inlined_p_13 
                GRGEN_LGSP.LGSPNode candidate_Parameters_node_b_inlined_p_13 = Parameters_node_b_inlined_p_13;
                // accept iterated instance match
                ++numMatchesIter;
                // Push subpattern matching task for _sub0_inlined_p_13
                PatternAction_Parameter taskFor__sub0_inlined_p_13 = PatternAction_Parameter.getNewTask(actionEnv, openTasks);
                taskFor__sub0_inlined_p_13.Parameter_node_b = candidate_Parameters_node_b_inlined_p_13;
                taskFor__sub0_inlined_p_13.searchPatternpath = false;
                taskFor__sub0_inlined_p_13.matchOfNestingPattern = null;
                taskFor__sub0_inlined_p_13.lastMatchAtPreviousNestingLevel = null;
                openTasks.Push(taskFor__sub0_inlined_p_13);
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Pop subpattern matching task for _sub0_inlined_p_13
                openTasks.Pop();
                PatternAction_Parameter.releaseTask(taskFor__sub0_inlined_p_13);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    patternFound = true;
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Parameters.Match_Parameters_iter_0 match = new Pattern_Parameters.Match_Parameters_iter_0();
                        match._node_b = candidate_Parameters_node_b_inlined_p_13;
                        match.__sub0 = (@Pattern_Parameter.Match_Parameter)currentFoundPartialMatch.Pop();
                        match.__sub0._matchOfEnclosingPattern = match;
                        currentFoundPartialMatch.Push(match);
                    }
                    // if enough matches were found, we leave
                    if(true) // as soon as there's a match, it's enough for iterated
                    {
                        --numMatchesIter;
                        continue;
                    }
                    --numMatchesIter;
                    continue;
                }
                --numMatchesIter;
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Parameters.Match_Parameters_iter_0 match = new Pattern_Parameters.Match_Parameters_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Parameters.Match_Parameters_iter_0 match = new Pattern_Parameters.Match_Parameters_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    public class IteratedAction_Statements_iter_0_inlined_s_14_in_Body : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Statements_iter_0_inlined_s_14_in_Body(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Pattern_Body.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Statements_iter_0_inlined_s_14_in_Body getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Statements_iter_0_inlined_s_14_in_Body newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Statements_iter_0_inlined_s_14_in_Body(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Statements_iter_0_inlined_s_14_in_Body oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Statements_iter_0_inlined_s_14_in_Body freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Statements_iter_0_inlined_s_14_in_Body next = null;

        public GRGEN_LGSP.LGSPNode Statements_node_b_inlined_s_14;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Statements_node_b_inlined_s_14 
                GRGEN_LGSP.LGSPNode candidate_Statements_node_b_inlined_s_14 = Statements_node_b_inlined_s_14;
                // accept iterated instance match
                ++numMatchesIter;
                // Push subpattern matching task for _sub0_inlined_s_14
                PatternAction_Statement taskFor__sub0_inlined_s_14 = PatternAction_Statement.getNewTask(actionEnv, openTasks);
                taskFor__sub0_inlined_s_14.Statement_node_b = candidate_Statements_node_b_inlined_s_14;
                taskFor__sub0_inlined_s_14.searchPatternpath = false;
                taskFor__sub0_inlined_s_14.matchOfNestingPattern = null;
                taskFor__sub0_inlined_s_14.lastMatchAtPreviousNestingLevel = null;
                openTasks.Push(taskFor__sub0_inlined_s_14);
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Pop subpattern matching task for _sub0_inlined_s_14
                openTasks.Pop();
                PatternAction_Statement.releaseTask(taskFor__sub0_inlined_s_14);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    patternFound = true;
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Statements.Match_Statements_iter_0 match = new Pattern_Statements.Match_Statements_iter_0();
                        match._node_b = candidate_Statements_node_b_inlined_s_14;
                        match.__sub0 = (@Pattern_Statement.Match_Statement)currentFoundPartialMatch.Pop();
                        match.__sub0._matchOfEnclosingPattern = match;
                        currentFoundPartialMatch.Push(match);
                    }
                    // if enough matches were found, we leave
                    if(true) // as soon as there's a match, it's enough for iterated
                    {
                        --numMatchesIter;
                        continue;
                    }
                    --numMatchesIter;
                    continue;
                }
                --numMatchesIter;
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Statements.Match_Statements_iter_0 match = new Pattern_Statements.Match_Statements_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Statements.Match_Statements_iter_0 match = new Pattern_Statements.Match_Statements_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    /// <summary>
    /// An object representing an executable rule - same as IAction, but with exact types and distinct parameters.
    /// </summary>
    public interface IAction_createProgramGraphExample
    {
        /// <summary> same as IAction.Match, but with exact types and distinct parameters. </summary>
        GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphExample.IMatch_createProgramGraphExample> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches);
        /// <summary> same as IAction.Modify, but with exact types and distinct parameters. </summary>
        void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_createProgramGraphExample.IMatch_createProgramGraphExample match);
        /// <summary> same as IAction.ModifyAll, but with exact types and distinct parameters. </summary>
        void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphExample.IMatch_createProgramGraphExample> matches);
        /// <summary> same as IAction.Apply, but with exact types and distinct parameters; returns true if applied </summary>
        bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyAll, but with exact types and distinct parameters; returns the number of matches found/applied. </summary>
        int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyStar, but with exact types and distinct parameters. </summary>
        bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyPlus, but with exact types and distinct parameters. </summary>
        bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyMinMax, but with exact types and distinct parameters. </summary>
        bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max);
    }
    
    public class Action_createProgramGraphExample : GRGEN_LGSP.LGSPAction, GRGEN_LIBGR.IAction, IAction_createProgramGraphExample
    {
        public Action_createProgramGraphExample()
            : base(Rule_createProgramGraphExample.Instance.patternGraph)
        {
            _rulePattern = Rule_createProgramGraphExample.Instance;
            DynamicMatch = myMatch;
        }

        public Rule_createProgramGraphExample _rulePattern;
        public override GRGEN_LGSP.LGSPRulePattern rulePattern { get { return _rulePattern; } }
        public override string Name { get { return "createProgramGraphExample"; } }
        [ThreadStatic] private static GRGEN_LGSP.LGSPMatchesList<Rule_createProgramGraphExample.Match_createProgramGraphExample, Rule_createProgramGraphExample.IMatch_createProgramGraphExample> matches;

        // Performance optimization: saves us usage of new for the return array or the return arrays. In the object/string-style modify/apply methods of the action interface implementation.
        [ThreadStatic] public static object[] ReturnArray;
        [ThreadStatic] public static List<object[]> ReturnArrayListForAll;
        [ThreadStatic] public static List<object[]> AvailableReturnArrays;
        public static Action_createProgramGraphExample Instance { get { return instance; } set { instance = value; } }
        private static Action_createProgramGraphExample instance = new Action_createProgramGraphExample();
        
        public GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphExample.IMatch_createProgramGraphExample> myMatch(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            if(matches == null)
                matches = new GRGEN_LGSP.LGSPMatchesList<Rule_createProgramGraphExample.Match_createProgramGraphExample, Rule_createProgramGraphExample.IMatch_createProgramGraphExample>(this);
            matches.Clear();
            if(ReturnArray == null)
                ReturnArray = new object[0];
            int isoSpace = 0;
            Rule_createProgramGraphExample.Match_createProgramGraphExample match = matches.GetNextUnfilledPosition();
            matches.PositionWasFilledFixIt();
            // if enough matches were found, we leave
            if(maxMatches > 0 && matches.Count >= maxMatches)
            {
                return matches;
            }
            return matches;
        }
        /// <summary> Type of the matcher method (with parameters processing environment containing host graph, maximum number of matches to search for (zero=unlimited), and rule parameters; returning found matches). </summary>
        public delegate GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphExample.IMatch_createProgramGraphExample> MatchInvoker(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches);
        /// <summary> A delegate pointing to the current matcher program for this rule. </summary>
        public MatchInvoker DynamicMatch;
        /// <summary> The RulePattern object from which this LGSPAction object has been created. </summary>
        public GRGEN_LIBGR.IRulePattern RulePattern { get { return _rulePattern; } }
        public GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphExample.IMatch_createProgramGraphExample> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches)
        {
            return DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches);
        }
        public void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_createProgramGraphExample.IMatch_createProgramGraphExample match)
        {
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
        }
        public void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphExample.IMatch_createProgramGraphExample> matches)
        {
            foreach(Rule_createProgramGraphExample.IMatch_createProgramGraphExample match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
        }
        public bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphExample.IMatch_createProgramGraphExample> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            if(matches.Count <= 0) return false;
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            return true;
        }
        public int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphExample.IMatch_createProgramGraphExample> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches);
            if(matches.Count <= 0) return 0;
            foreach(Rule_createProgramGraphExample.IMatch_createProgramGraphExample match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
            return matches.Count;
        }
        public bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphExample.IMatch_createProgramGraphExample> matches;
            
            while(true)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
                if(matches.Count <= 0) return true;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
        }
        public bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphExample.IMatch_createProgramGraphExample> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            if(matches.Count <= 0) return false;
            
            do
            {
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            }
            while(matches.Count > 0) ;
            return true;
        }
        public bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphExample.IMatch_createProgramGraphExample> matches;
            
            for(int i = 0; i < max; i++)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
                if(matches.Count <= 0) return i >= min;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
            return true;
        }
        // implementation of inexact action interface by delegation to exact action interface
        public GRGEN_LIBGR.IMatches Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches, object[] parameters)
        {
            return Match(actionEnv, maxMatches);
        }
        public object[] Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch match)
        {
            
            Modify(actionEnv, (Rule_createProgramGraphExample.IMatch_createProgramGraphExample)match);
            return ReturnArray;
        }
        public List<object[]> ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches)
        {
            ModifyAll(actionEnv, (GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphExample.IMatch_createProgramGraphExample>)matches);
            while(AvailableReturnArrays.Count < matches.Count) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matches.Count; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            
            if(Apply(actionEnv)) {
                return ReturnArray;
            }
            else return null;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            
            if(Apply(actionEnv)) {
                return ReturnArray;
            }
            else return null;
        }
        public List<object[]> Reserve(int numReturns)
        {
            if(AvailableReturnArrays == null)
                AvailableReturnArrays = new List<object[]>();
            while(AvailableReturnArrays.Count < numReturns) AvailableReturnArrays.Add(new object[0]);
            if(ReturnArrayListForAll == null)
                ReturnArrayListForAll = new List<object[]>();
            ReturnArrayListForAll.Clear();
            for(int i=0; i<numReturns; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            int matchesCount = ApplyAll(maxMatches, actionEnv);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            int matchesCount = ApplyAll(maxMatches, actionEnv);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            return ApplyStar(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyStar(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            return ApplyPlus(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyPlus(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            return ApplyMinMax(actionEnv, min, max);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max, params object[] parameters)
        {
            return ApplyMinMax(actionEnv, min, max);
        }
        public void Filter(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches, GRGEN_LIBGR.FilterCallWithArguments filter)
        {
            switch(filter.PackagePrefixedName) {
                case "keepFirst": matches.Filter_keepFirst((System.Int32)(filter.Arguments[0])); break;
                case "keepLast": matches.Filter_keepLast((System.Int32)(filter.Arguments[0])); break;
                case "keepFirstFraction": matches.Filter_keepFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "keepLastFraction": matches.Filter_keepLastFraction((System.Double)(filter.Arguments[0])); break;
                case "removeFirst": matches.Filter_removeFirst((System.Int32)(filter.Arguments[0])); break;
                case "removeLast": matches.Filter_removeLast((System.Int32)(filter.Arguments[0])); break;
                case "removeFirstFraction": matches.Filter_removeFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "removeLastFraction": matches.Filter_removeLastFraction((System.Double)(filter.Arguments[0])); break;
                default: throw new Exception("Unknown filter name " + filter.PackagePrefixedName + "!");
            }
        }
    }
    
    /// <summary>
    /// An object representing an executable rule - same as IAction, but with exact types and distinct parameters.
    /// </summary>
    public interface IAction_createProgramGraphPullUp
    {
        /// <summary> same as IAction.Match, but with exact types and distinct parameters. </summary>
        GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches);
        /// <summary> same as IAction.Modify, but with exact types and distinct parameters. </summary>
        void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp match, out GRGEN_MODEL.IClass output_0, out GRGEN_MODEL.IMethodBody output_1);
        /// <summary> same as IAction.ModifyAll, but with exact types and distinct parameters. </summary>
        void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp> matches, List<GRGEN_MODEL.IClass> output_0, List<GRGEN_MODEL.IMethodBody> output_1);
        /// <summary> same as IAction.Apply, but with exact types and distinct parameters; returns true if applied </summary>
        bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, ref GRGEN_MODEL.IClass output_0, ref GRGEN_MODEL.IMethodBody output_1);
        /// <summary> same as IAction.ApplyAll, but with exact types and distinct parameters; returns the number of matches found/applied. </summary>
        int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, List<GRGEN_MODEL.IClass> output_0, List<GRGEN_MODEL.IMethodBody> output_1);
        /// <summary> same as IAction.ApplyStar, but with exact types and distinct parameters. </summary>
        bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyPlus, but with exact types and distinct parameters. </summary>
        bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyMinMax, but with exact types and distinct parameters. </summary>
        bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max);
    }
    
    public class Action_createProgramGraphPullUp : GRGEN_LGSP.LGSPAction, GRGEN_LIBGR.IAction, IAction_createProgramGraphPullUp
    {
        public Action_createProgramGraphPullUp()
            : base(Rule_createProgramGraphPullUp.Instance.patternGraph)
        {
            _rulePattern = Rule_createProgramGraphPullUp.Instance;
            DynamicMatch = myMatch;
        }

        public Rule_createProgramGraphPullUp _rulePattern;
        public override GRGEN_LGSP.LGSPRulePattern rulePattern { get { return _rulePattern; } }
        public override string Name { get { return "createProgramGraphPullUp"; } }
        [ThreadStatic] private static GRGEN_LGSP.LGSPMatchesList<Rule_createProgramGraphPullUp.Match_createProgramGraphPullUp, Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp> matches;

        // Performance optimization: saves us usage of new for the return array or the return arrays. In the object/string-style modify/apply methods of the action interface implementation.
        [ThreadStatic] public static object[] ReturnArray;
        [ThreadStatic] public static List<object[]> ReturnArrayListForAll;
        [ThreadStatic] public static List<object[]> AvailableReturnArrays;
        public static Action_createProgramGraphPullUp Instance { get { return instance; } set { instance = value; } }
        private static Action_createProgramGraphPullUp instance = new Action_createProgramGraphPullUp();
        
        public GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp> myMatch(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            if(matches == null)
                matches = new GRGEN_LGSP.LGSPMatchesList<Rule_createProgramGraphPullUp.Match_createProgramGraphPullUp, Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp>(this);
            matches.Clear();
            if(ReturnArray == null)
                ReturnArray = new object[2];
            int isoSpace = 0;
            Rule_createProgramGraphPullUp.Match_createProgramGraphPullUp match = matches.GetNextUnfilledPosition();
            matches.PositionWasFilledFixIt();
            // if enough matches were found, we leave
            if(maxMatches > 0 && matches.Count >= maxMatches)
            {
                return matches;
            }
            return matches;
        }
        /// <summary> Type of the matcher method (with parameters processing environment containing host graph, maximum number of matches to search for (zero=unlimited), and rule parameters; returning found matches). </summary>
        public delegate GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp> MatchInvoker(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches);
        /// <summary> A delegate pointing to the current matcher program for this rule. </summary>
        public MatchInvoker DynamicMatch;
        /// <summary> The RulePattern object from which this LGSPAction object has been created. </summary>
        public GRGEN_LIBGR.IRulePattern RulePattern { get { return _rulePattern; } }
        List<GRGEN_MODEL.IClass> output_list_0 = new List<GRGEN_MODEL.IClass>();
        List<GRGEN_MODEL.IMethodBody> output_list_1 = new List<GRGEN_MODEL.IMethodBody>();
        public GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches)
        {
            return DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches);
        }
        public void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp match, out GRGEN_MODEL.IClass output_0, out GRGEN_MODEL.IMethodBody output_1)
        {
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match, out output_0, out output_1);
        }
        public void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp> matches, List<GRGEN_MODEL.IClass> output_0, List<GRGEN_MODEL.IMethodBody> output_1)
        {
            foreach(Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp match in matches)
            {
                GRGEN_MODEL.IClass output_local_0; GRGEN_MODEL.IMethodBody output_local_1; 
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match, out output_local_0, out output_local_1);
                output_0.Add(output_local_0);
                output_1.Add(output_local_1);
            }
        }
        public bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, ref GRGEN_MODEL.IClass output_0, ref GRGEN_MODEL.IMethodBody output_1)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            if(matches.Count <= 0) return false;
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First, out output_0, out output_1);
            return true;
        }
        public int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, List<GRGEN_MODEL.IClass> output_0, List<GRGEN_MODEL.IMethodBody> output_1)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches);
            if(matches.Count <= 0) return 0;
            foreach(Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp match in matches)
            {
                GRGEN_MODEL.IClass output_local_0; GRGEN_MODEL.IMethodBody output_local_1; 
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match, out output_local_0, out output_local_1);
                output_0.Add(output_local_0);
                output_1.Add(output_local_1);
            }
            return matches.Count;
        }
        public bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp> matches;
            GRGEN_MODEL.IClass output_0; GRGEN_MODEL.IMethodBody output_1; 
            while(true)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
                if(matches.Count <= 0) return true;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First, out output_0, out output_1);
            }
        }
        public bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            if(matches.Count <= 0) return false;
            GRGEN_MODEL.IClass output_0; GRGEN_MODEL.IMethodBody output_1; 
            do
            {
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First, out output_0, out output_1);
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            }
            while(matches.Count > 0) ;
            return true;
        }
        public bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp> matches;
            GRGEN_MODEL.IClass output_0; GRGEN_MODEL.IMethodBody output_1; 
            for(int i = 0; i < max; i++)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
                if(matches.Count <= 0) return i >= min;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First, out output_0, out output_1);
            }
            return true;
        }
        // implementation of inexact action interface by delegation to exact action interface
        public GRGEN_LIBGR.IMatches Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches, object[] parameters)
        {
            return Match(actionEnv, maxMatches);
        }
        public object[] Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch match)
        {
            GRGEN_MODEL.IClass output_0; GRGEN_MODEL.IMethodBody output_1; 
            Modify(actionEnv, (Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp)match, out output_0, out output_1);
            ReturnArray[0] = output_0;
            ReturnArray[1] = output_1;
            return ReturnArray;
        }
        public List<object[]> ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches)
        {
            output_list_0.Clear();
            output_list_1.Clear();
            ModifyAll(actionEnv, (GRGEN_LIBGR.IMatchesExact<Rule_createProgramGraphPullUp.IMatch_createProgramGraphPullUp>)matches, output_list_0, output_list_1);
            while(AvailableReturnArrays.Count < matches.Count) AvailableReturnArrays.Add(new object[2]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matches.Count; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
                ReturnArrayListForAll[i][0] = output_list_0[i];
                ReturnArrayListForAll[i][1] = output_list_1[i];
            }
            return ReturnArrayListForAll;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_MODEL.IClass output_0 = null; GRGEN_MODEL.IMethodBody output_1 = null; 
            if(Apply(actionEnv, ref output_0, ref output_1)) {
                ReturnArray[0] = output_0;
                ReturnArray[1] = output_1;
                return ReturnArray;
            }
            else return null;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            GRGEN_MODEL.IClass output_0 = null; GRGEN_MODEL.IMethodBody output_1 = null; 
            if(Apply(actionEnv, ref output_0, ref output_1)) {
                ReturnArray[0] = output_0;
                ReturnArray[1] = output_1;
                return ReturnArray;
            }
            else return null;
        }
        public List<object[]> Reserve(int numReturns)
        {
            if(AvailableReturnArrays == null)
                AvailableReturnArrays = new List<object[]>();
            while(AvailableReturnArrays.Count < numReturns) AvailableReturnArrays.Add(new object[2]);
            if(ReturnArrayListForAll == null)
                ReturnArrayListForAll = new List<object[]>();
            ReturnArrayListForAll.Clear();
            for(int i=0; i<numReturns; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            output_list_0.Clear();
            output_list_1.Clear();
            int matchesCount = ApplyAll(maxMatches, actionEnv, output_list_0, output_list_1);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[2]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
                ReturnArrayListForAll[i][0] = output_list_0[i];
                ReturnArrayListForAll[i][1] = output_list_1[i];
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            output_list_0.Clear();
            output_list_1.Clear();
            int matchesCount = ApplyAll(maxMatches, actionEnv, output_list_0, output_list_1);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[2]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
                ReturnArrayListForAll[i][0] = output_list_0[i];
                ReturnArrayListForAll[i][1] = output_list_1[i];
            }
            return ReturnArrayListForAll;
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            return ApplyStar(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyStar(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            return ApplyPlus(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyPlus(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            return ApplyMinMax(actionEnv, min, max);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max, params object[] parameters)
        {
            return ApplyMinMax(actionEnv, min, max);
        }
        public void Filter(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches, GRGEN_LIBGR.FilterCallWithArguments filter)
        {
            switch(filter.PackagePrefixedName) {
                case "keepFirst": matches.Filter_keepFirst((System.Int32)(filter.Arguments[0])); break;
                case "keepLast": matches.Filter_keepLast((System.Int32)(filter.Arguments[0])); break;
                case "keepFirstFraction": matches.Filter_keepFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "keepLastFraction": matches.Filter_keepLastFraction((System.Double)(filter.Arguments[0])); break;
                case "removeFirst": matches.Filter_removeFirst((System.Int32)(filter.Arguments[0])); break;
                case "removeLast": matches.Filter_removeLast((System.Int32)(filter.Arguments[0])); break;
                case "removeFirstFraction": matches.Filter_removeFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "removeLastFraction": matches.Filter_removeLastFraction((System.Double)(filter.Arguments[0])); break;
                default: throw new Exception("Unknown filter name " + filter.PackagePrefixedName + "!");
            }
        }
    }
    
    /// <summary>
    /// An object representing an executable rule - same as IAction, but with exact types and distinct parameters.
    /// </summary>
    public interface IAction_pullUpMethod
    {
        /// <summary> same as IAction.Match, but with exact types and distinct parameters. </summary>
        GRGEN_LIBGR.IMatchesExact<Rule_pullUpMethod.IMatch_pullUpMethod> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches, GRGEN_MODEL.IClass pullUpMethod_node_c1, GRGEN_MODEL.IMethodBody pullUpMethod_node_b4);
        /// <summary> same as IAction.Modify, but with exact types and distinct parameters. </summary>
        void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_pullUpMethod.IMatch_pullUpMethod match);
        /// <summary> same as IAction.ModifyAll, but with exact types and distinct parameters. </summary>
        void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_pullUpMethod.IMatch_pullUpMethod> matches);
        /// <summary> same as IAction.Apply, but with exact types and distinct parameters; returns true if applied </summary>
        bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass pullUpMethod_node_c1, GRGEN_MODEL.IMethodBody pullUpMethod_node_b4);
        /// <summary> same as IAction.ApplyAll, but with exact types and distinct parameters; returns the number of matches found/applied. </summary>
        int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass pullUpMethod_node_c1, GRGEN_MODEL.IMethodBody pullUpMethod_node_b4);
        /// <summary> same as IAction.ApplyStar, but with exact types and distinct parameters. </summary>
        bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass pullUpMethod_node_c1, GRGEN_MODEL.IMethodBody pullUpMethod_node_b4);
        /// <summary> same as IAction.ApplyPlus, but with exact types and distinct parameters. </summary>
        bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass pullUpMethod_node_c1, GRGEN_MODEL.IMethodBody pullUpMethod_node_b4);
        /// <summary> same as IAction.ApplyMinMax, but with exact types and distinct parameters. </summary>
        bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max, GRGEN_MODEL.IClass pullUpMethod_node_c1, GRGEN_MODEL.IMethodBody pullUpMethod_node_b4);
    }
    
    public class Action_pullUpMethod : GRGEN_LGSP.LGSPAction, GRGEN_LIBGR.IAction, IAction_pullUpMethod
    {
        public Action_pullUpMethod()
            : base(Rule_pullUpMethod.Instance.patternGraph)
        {
            _rulePattern = Rule_pullUpMethod.Instance;
            DynamicMatch = myMatch;
        }

        public Rule_pullUpMethod _rulePattern;
        public override GRGEN_LGSP.LGSPRulePattern rulePattern { get { return _rulePattern; } }
        public override string Name { get { return "pullUpMethod"; } }
        [ThreadStatic] private static GRGEN_LGSP.LGSPMatchesList<Rule_pullUpMethod.Match_pullUpMethod, Rule_pullUpMethod.IMatch_pullUpMethod> matches;

        // Performance optimization: saves us usage of new for the return array or the return arrays. In the object/string-style modify/apply methods of the action interface implementation.
        [ThreadStatic] public static object[] ReturnArray;
        [ThreadStatic] public static List<object[]> ReturnArrayListForAll;
        [ThreadStatic] public static List<object[]> AvailableReturnArrays;
        public static Action_pullUpMethod Instance { get { return instance; } set { instance = value; } }
        private static Action_pullUpMethod instance = new Action_pullUpMethod();
        
        public GRGEN_LIBGR.IMatchesExact<Rule_pullUpMethod.IMatch_pullUpMethod> myMatch(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches, GRGEN_MODEL.IClass pullUpMethod_node_c1, GRGEN_MODEL.IMethodBody pullUpMethod_node_b4)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            if(matches == null)
                matches = new GRGEN_LGSP.LGSPMatchesList<Rule_pullUpMethod.Match_pullUpMethod, Rule_pullUpMethod.IMatch_pullUpMethod>(this);
            matches.Clear();
            if(ReturnArray == null)
                ReturnArray = new object[0];
            int isoSpace = 0;
            Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks = new Stack<GRGEN_LGSP.LGSPSubpatternAction>();
            List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches = new List<Stack<GRGEN_LIBGR.IMatch>>();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            // Preset pullUpMethod_node_c1 
            GRGEN_LGSP.LGSPNode candidate_pullUpMethod_node_c1 = (GRGEN_LGSP.LGSPNode)pullUpMethod_node_c1;
            if(candidate_pullUpMethod_node_c1.lgspType.TypeID!=5) {
                return matches;
            }
            uint prev__candidate_pullUpMethod_node_c1;
            prev__candidate_pullUpMethod_node_c1 = candidate_pullUpMethod_node_c1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
            candidate_pullUpMethod_node_c1.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
            // Preset pullUpMethod_node_b4 
            GRGEN_LGSP.LGSPNode candidate_pullUpMethod_node_b4 = (GRGEN_LGSP.LGSPNode)pullUpMethod_node_b4;
            if(candidate_pullUpMethod_node_b4.lgspType.TypeID!=2) {
                candidate_pullUpMethod_node_c1.lgspFlags = candidate_pullUpMethod_node_c1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_pullUpMethod_node_c1;
                return matches;
            }
            // Element Bodies_node_c1_inlined_bs_15 assigned from other element pullUpMethod_node_c1 
            GRGEN_LGSP.LGSPNode candidate_Bodies_node_c1_inlined_bs_15 = candidate_pullUpMethod_node_c1;
            if(candidate_Bodies_node_c1_inlined_bs_15.lgspType.TypeID!=5) {
                candidate_pullUpMethod_node_c1.lgspFlags = candidate_pullUpMethod_node_c1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_pullUpMethod_node_c1;
                return matches;
            }
            // Extend Outgoing pullUpMethod_edge__edge0 from pullUpMethod_node_c1 
            GRGEN_LGSP.LGSPEdge head_candidate_pullUpMethod_edge__edge0 = candidate_pullUpMethod_node_c1.lgspOuthead;
            if(head_candidate_pullUpMethod_edge__edge0 != null)
            {
                GRGEN_LGSP.LGSPEdge candidate_pullUpMethod_edge__edge0 = head_candidate_pullUpMethod_edge__edge0;
                do
                {
                    if(candidate_pullUpMethod_edge__edge0.lgspType.TypeID!=3 && candidate_pullUpMethod_edge__edge0.lgspType.TypeID!=11) {
                        continue;
                    }
                    uint prev__candidate_pullUpMethod_edge__edge0;
                    prev__candidate_pullUpMethod_edge__edge0 = candidate_pullUpMethod_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                    candidate_pullUpMethod_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                    // Implicit Target pullUpMethod_node_c3 from pullUpMethod_edge__edge0 
                    GRGEN_LGSP.LGSPNode candidate_pullUpMethod_node_c3 = candidate_pullUpMethod_edge__edge0.lgspTarget;
                    if(candidate_pullUpMethod_node_c3.lgspType.TypeID!=5) {
                        candidate_pullUpMethod_edge__edge0.lgspFlags = candidate_pullUpMethod_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_pullUpMethod_edge__edge0;
                        continue;
                    }
                    if((candidate_pullUpMethod_node_c3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                    {
                        candidate_pullUpMethod_edge__edge0.lgspFlags = candidate_pullUpMethod_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_pullUpMethod_edge__edge0;
                        continue;
                    }
                    // Extend Outgoing pullUpMethod_edge__edge1 from pullUpMethod_node_b4 
                    GRGEN_LGSP.LGSPEdge head_candidate_pullUpMethod_edge__edge1 = candidate_pullUpMethod_node_b4.lgspOuthead;
                    if(head_candidate_pullUpMethod_edge__edge1 != null)
                    {
                        GRGEN_LGSP.LGSPEdge candidate_pullUpMethod_edge__edge1 = head_candidate_pullUpMethod_edge__edge1;
                        do
                        {
                            if(candidate_pullUpMethod_edge__edge1.lgspType.TypeID!=6) {
                                continue;
                            }
                            // Implicit Target pullUpMethod_node_m5 from pullUpMethod_edge__edge1 
                            GRGEN_LGSP.LGSPNode candidate_pullUpMethod_node_m5 = candidate_pullUpMethod_edge__edge1.lgspTarget;
                            if(candidate_pullUpMethod_node_m5.lgspType.TypeID!=7) {
                                continue;
                            }
                            // Element Bodies_node_m5_inlined_bs_15 assigned from other element pullUpMethod_node_m5 
                            GRGEN_LGSP.LGSPNode candidate_Bodies_node_m5_inlined_bs_15 = candidate_pullUpMethod_node_m5;
                            if(candidate_Bodies_node_m5_inlined_bs_15.lgspType.TypeID!=7) {
                                continue;
                            }
                            // Extend Outgoing pullUpMethod_edge_m from pullUpMethod_node_c3 
                            GRGEN_LGSP.LGSPEdge head_candidate_pullUpMethod_edge_m = candidate_pullUpMethod_node_c3.lgspOuthead;
                            if(head_candidate_pullUpMethod_edge_m != null)
                            {
                                GRGEN_LGSP.LGSPEdge candidate_pullUpMethod_edge_m = head_candidate_pullUpMethod_edge_m;
                                do
                                {
                                    if(candidate_pullUpMethod_edge_m.lgspType.TypeID!=3 && candidate_pullUpMethod_edge_m.lgspType.TypeID!=11) {
                                        continue;
                                    }
                                    if(candidate_pullUpMethod_edge_m.lgspTarget != candidate_pullUpMethod_node_b4) {
                                        continue;
                                    }
                                    if((candidate_pullUpMethod_edge_m.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                                    {
                                        continue;
                                    }
                                    // Push iterated matching task for Bodies_iter_0_inlined_bs_15_in_pullUpMethod
                                    IteratedAction_Bodies_iter_0_inlined_bs_15_in_pullUpMethod taskFor_iter_0_inlined_bs_15_in_pullUpMethod = IteratedAction_Bodies_iter_0_inlined_bs_15_in_pullUpMethod.getNewTask(actionEnv, openTasks);
                                    taskFor_iter_0_inlined_bs_15_in_pullUpMethod.Bodies_node_m5_inlined_bs_15 = candidate_Bodies_node_m5_inlined_bs_15;
                                    taskFor_iter_0_inlined_bs_15_in_pullUpMethod.Bodies_node_c1_inlined_bs_15 = candidate_Bodies_node_c1_inlined_bs_15;
                                    taskFor_iter_0_inlined_bs_15_in_pullUpMethod.searchPatternpath = false;
                                    taskFor_iter_0_inlined_bs_15_in_pullUpMethod.matchOfNestingPattern = null;
                                    taskFor_iter_0_inlined_bs_15_in_pullUpMethod.lastMatchAtPreviousNestingLevel = null;
                                    openTasks.Push(taskFor_iter_0_inlined_bs_15_in_pullUpMethod);
                                    uint prevGlobal__candidate_pullUpMethod_node_c1;
                                    prevGlobal__candidate_pullUpMethod_node_c1 = candidate_pullUpMethod_node_c1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    candidate_pullUpMethod_node_c1.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    uint prevGlobal__candidate_pullUpMethod_node_c3;
                                    prevGlobal__candidate_pullUpMethod_node_c3 = candidate_pullUpMethod_node_c3.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    candidate_pullUpMethod_node_c3.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    uint prevGlobal__candidate_pullUpMethod_node_b4;
                                    prevGlobal__candidate_pullUpMethod_node_b4 = candidate_pullUpMethod_node_b4.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    candidate_pullUpMethod_node_b4.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    uint prevGlobal__candidate_pullUpMethod_node_m5;
                                    prevGlobal__candidate_pullUpMethod_node_m5 = candidate_pullUpMethod_node_m5.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    candidate_pullUpMethod_node_m5.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    uint prevGlobal__candidate_pullUpMethod_edge__edge0;
                                    prevGlobal__candidate_pullUpMethod_edge__edge0 = candidate_pullUpMethod_edge__edge0.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    candidate_pullUpMethod_edge__edge0.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    uint prevGlobal__candidate_pullUpMethod_edge_m;
                                    prevGlobal__candidate_pullUpMethod_edge_m = candidate_pullUpMethod_edge_m.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    candidate_pullUpMethod_edge_m.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    uint prevGlobal__candidate_pullUpMethod_edge__edge1;
                                    prevGlobal__candidate_pullUpMethod_edge__edge1 = candidate_pullUpMethod_edge__edge1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    candidate_pullUpMethod_edge__edge1.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
                                    // Match subpatterns 
                                    openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                                    // Pop iterated matching task for Bodies_iter_0_inlined_bs_15_in_pullUpMethod
                                    openTasks.Pop();
                                    IteratedAction_Bodies_iter_0_inlined_bs_15_in_pullUpMethod.releaseTask(taskFor_iter_0_inlined_bs_15_in_pullUpMethod);
                                    // Check whether subpatterns were found 
                                    if(matchesList.Count>0) {
                                        // subpatterns/alternatives were found, extend the partial matches by our local match object, becoming a complete match object and save it
                                        foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                                        {
                                            Rule_pullUpMethod.Match_pullUpMethod match = matches.GetNextUnfilledPosition();
                                            Pattern_Bodies.Match_Bodies match_bs = new Pattern_Bodies.Match_Bodies();
                                            match_bs.SetMatchOfEnclosingPattern(match);
                                            match._node_c1 = candidate_pullUpMethod_node_c1;
                                            match._node_c3 = candidate_pullUpMethod_node_c3;
                                            match._node_b4 = candidate_pullUpMethod_node_b4;
                                            match._node_m5 = candidate_pullUpMethod_node_m5;
                                            match_bs._node_m5 = candidate_Bodies_node_m5_inlined_bs_15;
                                            match_bs._node_c1 = candidate_Bodies_node_c1_inlined_bs_15;
                                            match._edge__edge0 = candidate_pullUpMethod_edge__edge0;
                                            match._edge_m = candidate_pullUpMethod_edge_m;
                                            match._edge__edge1 = candidate_pullUpMethod_edge__edge1;
                                            match._bs = match_bs;
                                            match_bs._iter_0 = new GRGEN_LGSP.LGSPMatchesList<Pattern_Bodies.Match_Bodies_iter_0, Pattern_Bodies.IMatch_Bodies_iter_0>(null);
                                            while(currentFoundPartialMatch.Count>0 && currentFoundPartialMatch.Peek() is Pattern_Bodies.IMatch_Bodies_iter_0) {
                                                Pattern_Bodies.Match_Bodies_iter_0 cfpm = (Pattern_Bodies.Match_Bodies_iter_0)currentFoundPartialMatch.Pop();
                                                if(cfpm.IsNullMatch) break;
                                                cfpm.SetMatchOfEnclosingPattern(match_bs);
                                                match_bs._iter_0.Add(cfpm);
                                            }
                                            matches.PositionWasFilledFixIt();
                                        }
                                        matchesList.Clear();
                                        // if enough matches were found, we leave
                                        if(maxMatches > 0 && matches.Count >= maxMatches)
                                        {
                                            candidate_pullUpMethod_edge__edge1.lgspFlags = candidate_pullUpMethod_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_edge__edge1;
                                            candidate_pullUpMethod_edge_m.lgspFlags = candidate_pullUpMethod_edge_m.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_edge_m;
                                            candidate_pullUpMethod_edge__edge0.lgspFlags = candidate_pullUpMethod_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_edge__edge0;
                                            candidate_pullUpMethod_node_m5.lgspFlags = candidate_pullUpMethod_node_m5.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_node_m5;
                                            candidate_pullUpMethod_node_b4.lgspFlags = candidate_pullUpMethod_node_b4.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_node_b4;
                                            candidate_pullUpMethod_node_c3.lgspFlags = candidate_pullUpMethod_node_c3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_node_c3;
                                            candidate_pullUpMethod_node_c1.lgspFlags = candidate_pullUpMethod_node_c1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_node_c1;
                                            candidate_pullUpMethod_edge__edge0.lgspFlags = candidate_pullUpMethod_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_pullUpMethod_edge__edge0;
                                            candidate_pullUpMethod_node_c1.lgspFlags = candidate_pullUpMethod_node_c1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_pullUpMethod_node_c1;
                                            return matches;
                                        }
                                        candidate_pullUpMethod_edge__edge1.lgspFlags = candidate_pullUpMethod_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_edge__edge1;
                                        candidate_pullUpMethod_edge_m.lgspFlags = candidate_pullUpMethod_edge_m.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_edge_m;
                                        candidate_pullUpMethod_edge__edge0.lgspFlags = candidate_pullUpMethod_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_edge__edge0;
                                        candidate_pullUpMethod_node_m5.lgspFlags = candidate_pullUpMethod_node_m5.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_node_m5;
                                        candidate_pullUpMethod_node_b4.lgspFlags = candidate_pullUpMethod_node_b4.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_node_b4;
                                        candidate_pullUpMethod_node_c3.lgspFlags = candidate_pullUpMethod_node_c3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_node_c3;
                                        candidate_pullUpMethod_node_c1.lgspFlags = candidate_pullUpMethod_node_c1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_node_c1;
                                        continue;
                                    }
                                    candidate_pullUpMethod_node_c1.lgspFlags = candidate_pullUpMethod_node_c1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_node_c1;
                                    candidate_pullUpMethod_node_c3.lgspFlags = candidate_pullUpMethod_node_c3.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_node_c3;
                                    candidate_pullUpMethod_node_b4.lgspFlags = candidate_pullUpMethod_node_b4.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_node_b4;
                                    candidate_pullUpMethod_node_m5.lgspFlags = candidate_pullUpMethod_node_m5.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_node_m5;
                                    candidate_pullUpMethod_edge__edge0.lgspFlags = candidate_pullUpMethod_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_edge__edge0;
                                    candidate_pullUpMethod_edge_m.lgspFlags = candidate_pullUpMethod_edge_m.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_edge_m;
                                    candidate_pullUpMethod_edge__edge1.lgspFlags = candidate_pullUpMethod_edge__edge1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_pullUpMethod_edge__edge1;
                                }
                                while( (candidate_pullUpMethod_edge_m = candidate_pullUpMethod_edge_m.lgspOutNext) != head_candidate_pullUpMethod_edge_m );
                            }
                        }
                        while( (candidate_pullUpMethod_edge__edge1 = candidate_pullUpMethod_edge__edge1.lgspOutNext) != head_candidate_pullUpMethod_edge__edge1 );
                    }
                    candidate_pullUpMethod_edge__edge0.lgspFlags = candidate_pullUpMethod_edge__edge0.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_pullUpMethod_edge__edge0;
                }
                while( (candidate_pullUpMethod_edge__edge0 = candidate_pullUpMethod_edge__edge0.lgspOutNext) != head_candidate_pullUpMethod_edge__edge0 );
            }
            candidate_pullUpMethod_node_c1.lgspFlags = candidate_pullUpMethod_node_c1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_pullUpMethod_node_c1;
            return matches;
        }
        /// <summary> Type of the matcher method (with parameters processing environment containing host graph, maximum number of matches to search for (zero=unlimited), and rule parameters; returning found matches). </summary>
        public delegate GRGEN_LIBGR.IMatchesExact<Rule_pullUpMethod.IMatch_pullUpMethod> MatchInvoker(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches, GRGEN_MODEL.IClass pullUpMethod_node_c1, GRGEN_MODEL.IMethodBody pullUpMethod_node_b4);
        /// <summary> A delegate pointing to the current matcher program for this rule. </summary>
        public MatchInvoker DynamicMatch;
        /// <summary> The RulePattern object from which this LGSPAction object has been created. </summary>
        public GRGEN_LIBGR.IRulePattern RulePattern { get { return _rulePattern; } }
        public GRGEN_LIBGR.IMatchesExact<Rule_pullUpMethod.IMatch_pullUpMethod> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches, GRGEN_MODEL.IClass pullUpMethod_node_c1, GRGEN_MODEL.IMethodBody pullUpMethod_node_b4)
        {
            return DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches, pullUpMethod_node_c1, pullUpMethod_node_b4);
        }
        public void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_pullUpMethod.IMatch_pullUpMethod match)
        {
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
        }
        public void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_pullUpMethod.IMatch_pullUpMethod> matches)
        {
            foreach(Rule_pullUpMethod.IMatch_pullUpMethod match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
        }
        public bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass pullUpMethod_node_c1, GRGEN_MODEL.IMethodBody pullUpMethod_node_b4)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_pullUpMethod.IMatch_pullUpMethod> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1, pullUpMethod_node_c1, pullUpMethod_node_b4);
            if(matches.Count <= 0) return false;
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            return true;
        }
        public int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass pullUpMethod_node_c1, GRGEN_MODEL.IMethodBody pullUpMethod_node_b4)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_pullUpMethod.IMatch_pullUpMethod> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches, pullUpMethod_node_c1, pullUpMethod_node_b4);
            if(matches.Count <= 0) return 0;
            foreach(Rule_pullUpMethod.IMatch_pullUpMethod match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
            return matches.Count;
        }
        public bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass pullUpMethod_node_c1, GRGEN_MODEL.IMethodBody pullUpMethod_node_b4)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_pullUpMethod.IMatch_pullUpMethod> matches;
            
            while(true)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1, pullUpMethod_node_c1, pullUpMethod_node_b4);
                if(matches.Count <= 0) return true;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
        }
        public bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass pullUpMethod_node_c1, GRGEN_MODEL.IMethodBody pullUpMethod_node_b4)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_pullUpMethod.IMatch_pullUpMethod> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1, pullUpMethod_node_c1, pullUpMethod_node_b4);
            if(matches.Count <= 0) return false;
            
            do
            {
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1, pullUpMethod_node_c1, pullUpMethod_node_b4);
            }
            while(matches.Count > 0) ;
            return true;
        }
        public bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max, GRGEN_MODEL.IClass pullUpMethod_node_c1, GRGEN_MODEL.IMethodBody pullUpMethod_node_b4)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_pullUpMethod.IMatch_pullUpMethod> matches;
            
            for(int i = 0; i < max; i++)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1, pullUpMethod_node_c1, pullUpMethod_node_b4);
                if(matches.Count <= 0) return i >= min;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
            return true;
        }
        // implementation of inexact action interface by delegation to exact action interface
        public GRGEN_LIBGR.IMatches Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches, object[] parameters)
        {
            return Match(actionEnv, maxMatches, (GRGEN_MODEL.IClass) parameters[0], (GRGEN_MODEL.IMethodBody) parameters[1]);
        }
        public object[] Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch match)
        {
            
            Modify(actionEnv, (Rule_pullUpMethod.IMatch_pullUpMethod)match);
            return ReturnArray;
        }
        public List<object[]> ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches)
        {
            ModifyAll(actionEnv, (GRGEN_LIBGR.IMatchesExact<Rule_pullUpMethod.IMatch_pullUpMethod>)matches);
            while(AvailableReturnArrays.Count < matches.Count) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matches.Count; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            throw new Exception();
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            
            if(Apply(actionEnv, (GRGEN_MODEL.IClass) parameters[0], (GRGEN_MODEL.IMethodBody) parameters[1])) {
                return ReturnArray;
            }
            else return null;
        }
        public List<object[]> Reserve(int numReturns)
        {
            if(AvailableReturnArrays == null)
                AvailableReturnArrays = new List<object[]>();
            while(AvailableReturnArrays.Count < numReturns) AvailableReturnArrays.Add(new object[0]);
            if(ReturnArrayListForAll == null)
                ReturnArrayListForAll = new List<object[]>();
            ReturnArrayListForAll.Clear();
            for(int i=0; i<numReturns; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            throw new Exception();
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            int matchesCount = ApplyAll(maxMatches, actionEnv, (GRGEN_MODEL.IClass) parameters[0], (GRGEN_MODEL.IMethodBody) parameters[1]);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            throw new Exception(); return false;
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyStar(actionEnv, (GRGEN_MODEL.IClass) parameters[0], (GRGEN_MODEL.IMethodBody) parameters[1]);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            throw new Exception(); return false;
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyPlus(actionEnv, (GRGEN_MODEL.IClass) parameters[0], (GRGEN_MODEL.IMethodBody) parameters[1]);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            throw new Exception(); return false;
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max, params object[] parameters)
        {
            return ApplyMinMax(actionEnv, min, max, (GRGEN_MODEL.IClass) parameters[0], (GRGEN_MODEL.IMethodBody) parameters[1]);
        }
        public void Filter(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches, GRGEN_LIBGR.FilterCallWithArguments filter)
        {
            switch(filter.PackagePrefixedName) {
                case "keepFirst": matches.Filter_keepFirst((System.Int32)(filter.Arguments[0])); break;
                case "keepLast": matches.Filter_keepLast((System.Int32)(filter.Arguments[0])); break;
                case "keepFirstFraction": matches.Filter_keepFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "keepLastFraction": matches.Filter_keepLastFraction((System.Double)(filter.Arguments[0])); break;
                case "removeFirst": matches.Filter_removeFirst((System.Int32)(filter.Arguments[0])); break;
                case "removeLast": matches.Filter_removeLast((System.Int32)(filter.Arguments[0])); break;
                case "removeFirstFraction": matches.Filter_removeFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "removeLastFraction": matches.Filter_removeLastFraction((System.Double)(filter.Arguments[0])); break;
                default: throw new Exception("Unknown filter name " + filter.PackagePrefixedName + "!");
            }
        }
    }
    
    public class IteratedAction_Bodies_iter_0_inlined_bs_15_in_pullUpMethod : GRGEN_LGSP.LGSPSubpatternAction
    {
        private IteratedAction_Bodies_iter_0_inlined_bs_15_in_pullUpMethod(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_)
            : base(null)
        {
            actionEnv = actionEnv_; openTasks = openTasks_;
            patternGraph = Rule_pullUpMethod.Instance.patternGraph;
            minMatchesIter = 0;
            maxMatchesIter = 0;
            numMatchesIter = 0;
        }

        int minMatchesIter;
        int maxMatchesIter;
        int numMatchesIter;

        public static IteratedAction_Bodies_iter_0_inlined_bs_15_in_pullUpMethod getNewTask(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv_, Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks_) {
            IteratedAction_Bodies_iter_0_inlined_bs_15_in_pullUpMethod newTask;
            if(numFreeTasks>0) {
                newTask = freeListHead;
                newTask.actionEnv = actionEnv_; newTask.openTasks = openTasks_;
                freeListHead = newTask.next;
                newTask.next = null;
                --numFreeTasks;
            } else {
                newTask = new IteratedAction_Bodies_iter_0_inlined_bs_15_in_pullUpMethod(actionEnv_, openTasks_);
            }
            return newTask;
        }

        public static void releaseTask(IteratedAction_Bodies_iter_0_inlined_bs_15_in_pullUpMethod oldTask) {
            if(numFreeTasks<MAX_NUM_FREE_TASKS) {
                oldTask.next = freeListHead;
                oldTask.actionEnv = null; oldTask.openTasks = null;
                freeListHead = oldTask;
                ++numFreeTasks;
            }
        }

        private static IteratedAction_Bodies_iter_0_inlined_bs_15_in_pullUpMethod freeListHead = null;
        private static int numFreeTasks = 0;
        private const int MAX_NUM_FREE_TASKS = 100;

        private IteratedAction_Bodies_iter_0_inlined_bs_15_in_pullUpMethod next = null;

        public GRGEN_LGSP.LGSPNode Bodies_node_m5_inlined_bs_15;
        public GRGEN_LGSP.LGSPNode Bodies_node_c1_inlined_bs_15;
        
        public override void myMatch(List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches, int maxMatches, int isoSpace)
        {
            bool patternFound = false;
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            if(matchesList.Count!=0) throw new ApplicationException(); //debug assert
            // if the maximum number of matches of the iterated is reached, we complete iterated matching by building the null match object
            if(maxMatchesIter>0 && numMatchesIter>=maxMatchesIter) goto maxMatchesIterReached;
            // dummy loop for iterated matching return prevention
            do
            {
                // SubPreset Bodies_node_m5_inlined_bs_15 
                GRGEN_LGSP.LGSPNode candidate_Bodies_node_m5_inlined_bs_15 = Bodies_node_m5_inlined_bs_15;
                // SubPreset Bodies_node_c1_inlined_bs_15 
                GRGEN_LGSP.LGSPNode candidate_Bodies_node_c1_inlined_bs_15 = Bodies_node_c1_inlined_bs_15;
                // accept iterated instance match
                ++numMatchesIter;
                // Push subpattern matching task for b_inlined_bs_15
                PatternAction_Body taskFor_b_inlined_bs_15 = PatternAction_Body.getNewTask(actionEnv, openTasks);
                taskFor_b_inlined_bs_15.Body_node_m5 = candidate_Bodies_node_m5_inlined_bs_15;
                taskFor_b_inlined_bs_15.Body_node_c1 = candidate_Bodies_node_c1_inlined_bs_15;
                taskFor_b_inlined_bs_15.searchPatternpath = false;
                taskFor_b_inlined_bs_15.matchOfNestingPattern = null;
                taskFor_b_inlined_bs_15.lastMatchAtPreviousNestingLevel = null;
                openTasks.Push(taskFor_b_inlined_bs_15);
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Pop subpattern matching task for b_inlined_bs_15
                openTasks.Pop();
                PatternAction_Body.releaseTask(taskFor_b_inlined_bs_15);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    patternFound = true;
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Bodies.Match_Bodies_iter_0 match = new Pattern_Bodies.Match_Bodies_iter_0();
                        match._node_m5 = candidate_Bodies_node_m5_inlined_bs_15;
                        match._node_c1 = candidate_Bodies_node_c1_inlined_bs_15;
                        match._b = (@Pattern_Body.Match_Body)currentFoundPartialMatch.Pop();
                        match._b._matchOfEnclosingPattern = match;
                        currentFoundPartialMatch.Push(match);
                    }
                    // if enough matches were found, we leave
                    if(true) // as soon as there's a match, it's enough for iterated
                    {
                        --numMatchesIter;
                        continue;
                    }
                    --numMatchesIter;
                    continue;
                }
                --numMatchesIter;
            } while(false);
            // Check whether the iterated pattern null match was found
maxMatchesIterReached:
            if(!patternFound && numMatchesIter>=minMatchesIter)
            {
                openTasks.Pop();
                // Check whether there are subpattern matching tasks left to execute
                if(openTasks.Count==0)
                {
                    Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch = new Stack<GRGEN_LIBGR.IMatch>();
                    foundPartialMatches.Add(currentFoundPartialMatch);
                    Pattern_Bodies.Match_Bodies_iter_0 match = new Pattern_Bodies.Match_Bodies_iter_0();
                    match._isNullMatch = true; // null match of iterated pattern
                    currentFoundPartialMatch.Push(match);
                    openTasks.Push(this);
                    return;
                }
                // Match subpatterns 
                openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
                // Check whether subpatterns were found 
                if(matchesList.Count>0) {
                    // subpatterns/alternatives were found, extend the partial matches by our local match object
                    foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                    {
                        Pattern_Bodies.Match_Bodies_iter_0 match = new Pattern_Bodies.Match_Bodies_iter_0();
                        match._isNullMatch = true; // null match of iterated pattern
                        currentFoundPartialMatch.Push(match);
                    }
                }
                openTasks.Push(this);
                return;
            }
            return;
        }
    }
    
    /// <summary>
    /// An object representing an executable rule - same as IAction, but with exact types and distinct parameters.
    /// </summary>
    public interface IAction_matchAll
    {
        /// <summary> same as IAction.Match, but with exact types and distinct parameters. </summary>
        GRGEN_LIBGR.IMatchesExact<Rule_matchAll.IMatch_matchAll> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches, GRGEN_MODEL.IClass matchAll_node_c1);
        /// <summary> same as IAction.Modify, but with exact types and distinct parameters. </summary>
        void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_matchAll.IMatch_matchAll match);
        /// <summary> same as IAction.ModifyAll, but with exact types and distinct parameters. </summary>
        void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_matchAll.IMatch_matchAll> matches);
        /// <summary> same as IAction.Apply, but with exact types and distinct parameters; returns true if applied </summary>
        bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass matchAll_node_c1);
        /// <summary> same as IAction.ApplyAll, but with exact types and distinct parameters; returns the number of matches found/applied. </summary>
        int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass matchAll_node_c1);
        /// <summary> same as IAction.ApplyStar, but with exact types and distinct parameters. </summary>
        bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass matchAll_node_c1);
        /// <summary> same as IAction.ApplyPlus, but with exact types and distinct parameters. </summary>
        bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass matchAll_node_c1);
        /// <summary> same as IAction.ApplyMinMax, but with exact types and distinct parameters. </summary>
        bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max, GRGEN_MODEL.IClass matchAll_node_c1);
    }
    
    public class Action_matchAll : GRGEN_LGSP.LGSPAction, GRGEN_LIBGR.IAction, IAction_matchAll
    {
        public Action_matchAll()
            : base(Rule_matchAll.Instance.patternGraph)
        {
            _rulePattern = Rule_matchAll.Instance;
            DynamicMatch = myMatch;
        }

        public Rule_matchAll _rulePattern;
        public override GRGEN_LGSP.LGSPRulePattern rulePattern { get { return _rulePattern; } }
        public override string Name { get { return "matchAll"; } }
        [ThreadStatic] private static GRGEN_LGSP.LGSPMatchesList<Rule_matchAll.Match_matchAll, Rule_matchAll.IMatch_matchAll> matches;

        // Performance optimization: saves us usage of new for the return array or the return arrays. In the object/string-style modify/apply methods of the action interface implementation.
        [ThreadStatic] public static object[] ReturnArray;
        [ThreadStatic] public static List<object[]> ReturnArrayListForAll;
        [ThreadStatic] public static List<object[]> AvailableReturnArrays;
        public static Action_matchAll Instance { get { return instance; } set { instance = value; } }
        private static Action_matchAll instance = new Action_matchAll();
        
        public GRGEN_LIBGR.IMatchesExact<Rule_matchAll.IMatch_matchAll> myMatch(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches, GRGEN_MODEL.IClass matchAll_node_c1)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            if(matches == null)
                matches = new GRGEN_LGSP.LGSPMatchesList<Rule_matchAll.Match_matchAll, Rule_matchAll.IMatch_matchAll>(this);
            matches.Clear();
            if(ReturnArray == null)
                ReturnArray = new object[0];
            int isoSpace = 0;
            Stack<GRGEN_LGSP.LGSPSubpatternAction> openTasks = new Stack<GRGEN_LGSP.LGSPSubpatternAction>();
            List<Stack<GRGEN_LIBGR.IMatch>> foundPartialMatches = new List<Stack<GRGEN_LIBGR.IMatch>>();
            List<Stack<GRGEN_LIBGR.IMatch>> matchesList = foundPartialMatches;
            // Preset matchAll_node_c1 
            GRGEN_LGSP.LGSPNode candidate_matchAll_node_c1 = (GRGEN_LGSP.LGSPNode)matchAll_node_c1;
            if(candidate_matchAll_node_c1.lgspType.TypeID!=5) {
                return matches;
            }
            // Element Subclass_node_sub_inlined__sub0_16 assigned from other element matchAll_node_c1 
            GRGEN_LGSP.LGSPNode candidate_Subclass_node_sub_inlined__sub0_16 = candidate_matchAll_node_c1;
            if(candidate_Subclass_node_sub_inlined__sub0_16.lgspType.TypeID!=5) {
                return matches;
            }
            // Push subpattern matching task for _sub1_inlined__sub0_16
            PatternAction_Subclasses taskFor__sub1_inlined__sub0_16 = PatternAction_Subclasses.getNewTask(actionEnv, openTasks);
            taskFor__sub1_inlined__sub0_16.Subclasses_node_c = candidate_Subclass_node_sub_inlined__sub0_16;
            taskFor__sub1_inlined__sub0_16.searchPatternpath = false;
            taskFor__sub1_inlined__sub0_16.matchOfNestingPattern = null;
            taskFor__sub1_inlined__sub0_16.lastMatchAtPreviousNestingLevel = null;
            openTasks.Push(taskFor__sub1_inlined__sub0_16);
            // Push subpattern matching task for _sub0_inlined__sub0_16
            PatternAction_Features taskFor__sub0_inlined__sub0_16 = PatternAction_Features.getNewTask(actionEnv, openTasks);
            taskFor__sub0_inlined__sub0_16.Features_node_c = candidate_Subclass_node_sub_inlined__sub0_16;
            taskFor__sub0_inlined__sub0_16.searchPatternpath = false;
            taskFor__sub0_inlined__sub0_16.matchOfNestingPattern = null;
            taskFor__sub0_inlined__sub0_16.lastMatchAtPreviousNestingLevel = null;
            openTasks.Push(taskFor__sub0_inlined__sub0_16);
            uint prevGlobal__candidate_matchAll_node_c1;
            prevGlobal__candidate_matchAll_node_c1 = candidate_matchAll_node_c1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
            candidate_matchAll_node_c1.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace;
            // Match subpatterns 
            openTasks.Peek().myMatch(matchesList, maxMatches - foundPartialMatches.Count, isoSpace);
            // Pop subpattern matching task for _sub0_inlined__sub0_16
            openTasks.Pop();
            PatternAction_Features.releaseTask(taskFor__sub0_inlined__sub0_16);
            // Pop subpattern matching task for _sub1_inlined__sub0_16
            openTasks.Pop();
            PatternAction_Subclasses.releaseTask(taskFor__sub1_inlined__sub0_16);
            // Check whether subpatterns were found 
            if(matchesList.Count>0) {
                // subpatterns/alternatives were found, extend the partial matches by our local match object, becoming a complete match object and save it
                foreach(Stack<GRGEN_LIBGR.IMatch> currentFoundPartialMatch in matchesList)
                {
                    Rule_matchAll.Match_matchAll match = matches.GetNextUnfilledPosition();
                    Pattern_Subclass.Match_Subclass match__sub0 = new Pattern_Subclass.Match_Subclass();
                    match__sub0.SetMatchOfEnclosingPattern(match);
                    match._node_c1 = candidate_matchAll_node_c1;
                    match__sub0._node_sub = candidate_Subclass_node_sub_inlined__sub0_16;
                    match.__sub0 = match__sub0;
                    match__sub0.__sub0 = (@Pattern_Features.Match_Features)currentFoundPartialMatch.Pop();
                    match__sub0.__sub0._matchOfEnclosingPattern = match__sub0;
                    match__sub0.__sub1 = (@Pattern_Subclasses.Match_Subclasses)currentFoundPartialMatch.Pop();
                    match__sub0.__sub1._matchOfEnclosingPattern = match__sub0;
                    matches.PositionWasFilledFixIt();
                }
                matchesList.Clear();
                // if enough matches were found, we leave
                if(maxMatches > 0 && matches.Count >= maxMatches)
                {
                    candidate_matchAll_node_c1.lgspFlags = candidate_matchAll_node_c1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_matchAll_node_c1;
                    return matches;
                }
                candidate_matchAll_node_c1.lgspFlags = candidate_matchAll_node_c1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_matchAll_node_c1;
                return matches;
            }
            candidate_matchAll_node_c1.lgspFlags = candidate_matchAll_node_c1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED_BY_ENCLOSING_PATTERN << isoSpace) | prevGlobal__candidate_matchAll_node_c1;
            return matches;
        }
        /// <summary> Type of the matcher method (with parameters processing environment containing host graph, maximum number of matches to search for (zero=unlimited), and rule parameters; returning found matches). </summary>
        public delegate GRGEN_LIBGR.IMatchesExact<Rule_matchAll.IMatch_matchAll> MatchInvoker(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches, GRGEN_MODEL.IClass matchAll_node_c1);
        /// <summary> A delegate pointing to the current matcher program for this rule. </summary>
        public MatchInvoker DynamicMatch;
        /// <summary> The RulePattern object from which this LGSPAction object has been created. </summary>
        public GRGEN_LIBGR.IRulePattern RulePattern { get { return _rulePattern; } }
        public GRGEN_LIBGR.IMatchesExact<Rule_matchAll.IMatch_matchAll> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches, GRGEN_MODEL.IClass matchAll_node_c1)
        {
            return DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches, matchAll_node_c1);
        }
        public void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_matchAll.IMatch_matchAll match)
        {
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
        }
        public void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_matchAll.IMatch_matchAll> matches)
        {
            foreach(Rule_matchAll.IMatch_matchAll match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
        }
        public bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass matchAll_node_c1)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_matchAll.IMatch_matchAll> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1, matchAll_node_c1);
            if(matches.Count <= 0) return false;
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            return true;
        }
        public int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass matchAll_node_c1)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_matchAll.IMatch_matchAll> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches, matchAll_node_c1);
            if(matches.Count <= 0) return 0;
            foreach(Rule_matchAll.IMatch_matchAll match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
            return matches.Count;
        }
        public bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass matchAll_node_c1)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_matchAll.IMatch_matchAll> matches;
            
            while(true)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1, matchAll_node_c1);
                if(matches.Count <= 0) return true;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
        }
        public bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_MODEL.IClass matchAll_node_c1)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_matchAll.IMatch_matchAll> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1, matchAll_node_c1);
            if(matches.Count <= 0) return false;
            
            do
            {
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1, matchAll_node_c1);
            }
            while(matches.Count > 0) ;
            return true;
        }
        public bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max, GRGEN_MODEL.IClass matchAll_node_c1)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_matchAll.IMatch_matchAll> matches;
            
            for(int i = 0; i < max; i++)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1, matchAll_node_c1);
                if(matches.Count <= 0) return i >= min;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
            return true;
        }
        // implementation of inexact action interface by delegation to exact action interface
        public GRGEN_LIBGR.IMatches Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches, object[] parameters)
        {
            return Match(actionEnv, maxMatches, (GRGEN_MODEL.IClass) parameters[0]);
        }
        public object[] Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch match)
        {
            
            Modify(actionEnv, (Rule_matchAll.IMatch_matchAll)match);
            return ReturnArray;
        }
        public List<object[]> ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches)
        {
            ModifyAll(actionEnv, (GRGEN_LIBGR.IMatchesExact<Rule_matchAll.IMatch_matchAll>)matches);
            while(AvailableReturnArrays.Count < matches.Count) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matches.Count; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            throw new Exception();
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            
            if(Apply(actionEnv, (GRGEN_MODEL.IClass) parameters[0])) {
                return ReturnArray;
            }
            else return null;
        }
        public List<object[]> Reserve(int numReturns)
        {
            if(AvailableReturnArrays == null)
                AvailableReturnArrays = new List<object[]>();
            while(AvailableReturnArrays.Count < numReturns) AvailableReturnArrays.Add(new object[0]);
            if(ReturnArrayListForAll == null)
                ReturnArrayListForAll = new List<object[]>();
            ReturnArrayListForAll.Clear();
            for(int i=0; i<numReturns; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            throw new Exception();
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            int matchesCount = ApplyAll(maxMatches, actionEnv, (GRGEN_MODEL.IClass) parameters[0]);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            throw new Exception(); return false;
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyStar(actionEnv, (GRGEN_MODEL.IClass) parameters[0]);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            throw new Exception(); return false;
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyPlus(actionEnv, (GRGEN_MODEL.IClass) parameters[0]);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            throw new Exception(); return false;
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max, params object[] parameters)
        {
            return ApplyMinMax(actionEnv, min, max, (GRGEN_MODEL.IClass) parameters[0]);
        }
        public void Filter(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches, GRGEN_LIBGR.FilterCallWithArguments filter)
        {
            switch(filter.PackagePrefixedName) {
                case "keepFirst": matches.Filter_keepFirst((System.Int32)(filter.Arguments[0])); break;
                case "keepLast": matches.Filter_keepLast((System.Int32)(filter.Arguments[0])); break;
                case "keepFirstFraction": matches.Filter_keepFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "keepLastFraction": matches.Filter_keepLastFraction((System.Double)(filter.Arguments[0])); break;
                case "removeFirst": matches.Filter_removeFirst((System.Int32)(filter.Arguments[0])); break;
                case "removeLast": matches.Filter_removeLast((System.Int32)(filter.Arguments[0])); break;
                case "removeFirstFraction": matches.Filter_removeFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "removeLastFraction": matches.Filter_removeLastFraction((System.Double)(filter.Arguments[0])); break;
                default: throw new Exception("Unknown filter name " + filter.PackagePrefixedName + "!");
            }
        }
    }
    
    /// <summary>
    /// An object representing an executable rule - same as IAction, but with exact types and distinct parameters.
    /// </summary>
    public interface IAction_InsertHelperEdgesForNestedLayout
    {
        /// <summary> same as IAction.Match, but with exact types and distinct parameters. </summary>
        GRGEN_LIBGR.IMatchesExact<Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches);
        /// <summary> same as IAction.Modify, but with exact types and distinct parameters. </summary>
        void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout match);
        /// <summary> same as IAction.ModifyAll, but with exact types and distinct parameters. </summary>
        void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout> matches);
        /// <summary> same as IAction.Apply, but with exact types and distinct parameters; returns true if applied </summary>
        bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyAll, but with exact types and distinct parameters; returns the number of matches found/applied. </summary>
        int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyStar, but with exact types and distinct parameters. </summary>
        bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyPlus, but with exact types and distinct parameters. </summary>
        bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyMinMax, but with exact types and distinct parameters. </summary>
        bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max);
    }
    
    public class Action_InsertHelperEdgesForNestedLayout : GRGEN_LGSP.LGSPAction, GRGEN_LIBGR.IAction, IAction_InsertHelperEdgesForNestedLayout
    {
        public Action_InsertHelperEdgesForNestedLayout()
            : base(Rule_InsertHelperEdgesForNestedLayout.Instance.patternGraph)
        {
            _rulePattern = Rule_InsertHelperEdgesForNestedLayout.Instance;
            DynamicMatch = myMatch;
        }

        public Rule_InsertHelperEdgesForNestedLayout _rulePattern;
        public override GRGEN_LGSP.LGSPRulePattern rulePattern { get { return _rulePattern; } }
        public override string Name { get { return "InsertHelperEdgesForNestedLayout"; } }
        [ThreadStatic] private static GRGEN_LGSP.LGSPMatchesList<Rule_InsertHelperEdgesForNestedLayout.Match_InsertHelperEdgesForNestedLayout, Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout> matches;

        // Performance optimization: saves us usage of new for the return array or the return arrays. In the object/string-style modify/apply methods of the action interface implementation.
        [ThreadStatic] public static object[] ReturnArray;
        [ThreadStatic] public static List<object[]> ReturnArrayListForAll;
        [ThreadStatic] public static List<object[]> AvailableReturnArrays;
        public static Action_InsertHelperEdgesForNestedLayout Instance { get { return instance; } set { instance = value; } }
        private static Action_InsertHelperEdgesForNestedLayout instance = new Action_InsertHelperEdgesForNestedLayout();
        
        public GRGEN_LIBGR.IMatchesExact<Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout> myMatch(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            if(matches == null)
                matches = new GRGEN_LGSP.LGSPMatchesList<Rule_InsertHelperEdgesForNestedLayout.Match_InsertHelperEdgesForNestedLayout, Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout>(this);
            matches.Clear();
            if(ReturnArray == null)
                ReturnArray = new object[0];
            int isoSpace = 0;
            Rule_InsertHelperEdgesForNestedLayout.Match_InsertHelperEdgesForNestedLayout match = matches.GetNextUnfilledPosition();
            matches.PositionWasFilledFixIt();
            // if enough matches were found, we leave
            if(maxMatches > 0 && matches.Count >= maxMatches)
            {
                return matches;
            }
            return matches;
        }
        /// <summary> Type of the matcher method (with parameters processing environment containing host graph, maximum number of matches to search for (zero=unlimited), and rule parameters; returning found matches). </summary>
        public delegate GRGEN_LIBGR.IMatchesExact<Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout> MatchInvoker(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches);
        /// <summary> A delegate pointing to the current matcher program for this rule. </summary>
        public MatchInvoker DynamicMatch;
        /// <summary> The RulePattern object from which this LGSPAction object has been created. </summary>
        public GRGEN_LIBGR.IRulePattern RulePattern { get { return _rulePattern; } }
        public GRGEN_LIBGR.IMatchesExact<Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches)
        {
            return DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches);
        }
        public void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout match)
        {
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
        }
        public void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout> matches)
        {
            foreach(Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
        }
        public bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            if(matches.Count <= 0) return false;
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            return true;
        }
        public int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches);
            if(matches.Count <= 0) return 0;
            foreach(Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
            return matches.Count;
        }
        public bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout> matches;
            
            while(true)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
                if(matches.Count <= 0) return true;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
        }
        public bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            if(matches.Count <= 0) return false;
            
            do
            {
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            }
            while(matches.Count > 0) ;
            return true;
        }
        public bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout> matches;
            
            for(int i = 0; i < max; i++)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
                if(matches.Count <= 0) return i >= min;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
            return true;
        }
        // implementation of inexact action interface by delegation to exact action interface
        public GRGEN_LIBGR.IMatches Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches, object[] parameters)
        {
            return Match(actionEnv, maxMatches);
        }
        public object[] Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch match)
        {
            
            Modify(actionEnv, (Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout)match);
            return ReturnArray;
        }
        public List<object[]> ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches)
        {
            ModifyAll(actionEnv, (GRGEN_LIBGR.IMatchesExact<Rule_InsertHelperEdgesForNestedLayout.IMatch_InsertHelperEdgesForNestedLayout>)matches);
            while(AvailableReturnArrays.Count < matches.Count) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matches.Count; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            
            if(Apply(actionEnv)) {
                return ReturnArray;
            }
            else return null;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            
            if(Apply(actionEnv)) {
                return ReturnArray;
            }
            else return null;
        }
        public List<object[]> Reserve(int numReturns)
        {
            if(AvailableReturnArrays == null)
                AvailableReturnArrays = new List<object[]>();
            while(AvailableReturnArrays.Count < numReturns) AvailableReturnArrays.Add(new object[0]);
            if(ReturnArrayListForAll == null)
                ReturnArrayListForAll = new List<object[]>();
            ReturnArrayListForAll.Clear();
            for(int i=0; i<numReturns; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            int matchesCount = ApplyAll(maxMatches, actionEnv);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            int matchesCount = ApplyAll(maxMatches, actionEnv);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            return ApplyStar(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyStar(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            return ApplyPlus(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyPlus(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            return ApplyMinMax(actionEnv, min, max);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max, params object[] parameters)
        {
            return ApplyMinMax(actionEnv, min, max);
        }
        public void Filter(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches, GRGEN_LIBGR.FilterCallWithArguments filter)
        {
            switch(filter.PackagePrefixedName) {
                case "keepFirst": matches.Filter_keepFirst((System.Int32)(filter.Arguments[0])); break;
                case "keepLast": matches.Filter_keepLast((System.Int32)(filter.Arguments[0])); break;
                case "keepFirstFraction": matches.Filter_keepFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "keepLastFraction": matches.Filter_keepLastFraction((System.Double)(filter.Arguments[0])); break;
                case "removeFirst": matches.Filter_removeFirst((System.Int32)(filter.Arguments[0])); break;
                case "removeLast": matches.Filter_removeLast((System.Int32)(filter.Arguments[0])); break;
                case "removeFirstFraction": matches.Filter_removeFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "removeLastFraction": matches.Filter_removeLastFraction((System.Double)(filter.Arguments[0])); break;
                default: throw new Exception("Unknown filter name " + filter.PackagePrefixedName + "!");
            }
        }
    }
    
    /// <summary>
    /// An object representing an executable rule - same as IAction, but with exact types and distinct parameters.
    /// </summary>
    public interface IAction_LinkMethodBodyToContainedEntity
    {
        /// <summary> same as IAction.Match, but with exact types and distinct parameters. </summary>
        GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches);
        /// <summary> same as IAction.Modify, but with exact types and distinct parameters. </summary>
        void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity match);
        /// <summary> same as IAction.ModifyAll, but with exact types and distinct parameters. </summary>
        void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> matches);
        /// <summary> same as IAction.Apply, but with exact types and distinct parameters; returns true if applied </summary>
        bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyAll, but with exact types and distinct parameters; returns the number of matches found/applied. </summary>
        int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyStar, but with exact types and distinct parameters. </summary>
        bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyPlus, but with exact types and distinct parameters. </summary>
        bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyMinMax, but with exact types and distinct parameters. </summary>
        bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max);
    }
    
    public class Action_LinkMethodBodyToContainedEntity : GRGEN_LGSP.LGSPAction, GRGEN_LIBGR.IAction, IAction_LinkMethodBodyToContainedEntity
    {
        public Action_LinkMethodBodyToContainedEntity()
            : base(Rule_LinkMethodBodyToContainedEntity.Instance.patternGraph)
        {
            _rulePattern = Rule_LinkMethodBodyToContainedEntity.Instance;
            DynamicMatch = myMatch;
        }

        public Rule_LinkMethodBodyToContainedEntity _rulePattern;
        public override GRGEN_LGSP.LGSPRulePattern rulePattern { get { return _rulePattern; } }
        public override string Name { get { return "LinkMethodBodyToContainedEntity"; } }
        [ThreadStatic] private static GRGEN_LGSP.LGSPMatchesList<Rule_LinkMethodBodyToContainedEntity.Match_LinkMethodBodyToContainedEntity, Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> matches;

        // Performance optimization: saves us usage of new for the return array or the return arrays. In the object/string-style modify/apply methods of the action interface implementation.
        [ThreadStatic] public static object[] ReturnArray;
        [ThreadStatic] public static List<object[]> ReturnArrayListForAll;
        [ThreadStatic] public static List<object[]> AvailableReturnArrays;
        public static Action_LinkMethodBodyToContainedEntity Instance { get { return instance; } set { instance = value; } }
        private static Action_LinkMethodBodyToContainedEntity instance = new Action_LinkMethodBodyToContainedEntity();
        
        public GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> myMatch(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            if(matches == null)
                matches = new GRGEN_LGSP.LGSPMatchesList<Rule_LinkMethodBodyToContainedEntity.Match_LinkMethodBodyToContainedEntity, Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>(this);
            matches.Clear();
            if(ReturnArray == null)
                ReturnArray = new object[0];
            int isoSpace = 0;
            // Lookup LinkMethodBodyToContainedEntity_edge__edge0 
            foreach(GRGEN_LIBGR.EdgeType type_candidate_LinkMethodBodyToContainedEntity_edge__edge0 in GRGEN_MODEL.EdgeType_contains.typeVar.SubOrSameTypes)
            {
                int type_id_candidate_LinkMethodBodyToContainedEntity_edge__edge0 = type_candidate_LinkMethodBodyToContainedEntity_edge__edge0.TypeID;
                for(GRGEN_LGSP.LGSPEdge head_candidate_LinkMethodBodyToContainedEntity_edge__edge0 = graph.edgesByTypeHeads[type_id_candidate_LinkMethodBodyToContainedEntity_edge__edge0], candidate_LinkMethodBodyToContainedEntity_edge__edge0 = head_candidate_LinkMethodBodyToContainedEntity_edge__edge0.lgspTypeNext; candidate_LinkMethodBodyToContainedEntity_edge__edge0 != head_candidate_LinkMethodBodyToContainedEntity_edge__edge0; candidate_LinkMethodBodyToContainedEntity_edge__edge0 = candidate_LinkMethodBodyToContainedEntity_edge__edge0.lgspTypeNext)
                {
                    // Implicit Source LinkMethodBodyToContainedEntity_node_mb from LinkMethodBodyToContainedEntity_edge__edge0 
                    GRGEN_LGSP.LGSPNode candidate_LinkMethodBodyToContainedEntity_node_mb = candidate_LinkMethodBodyToContainedEntity_edge__edge0.lgspSource;
                    if(candidate_LinkMethodBodyToContainedEntity_node_mb.lgspType.TypeID!=2) {
                        continue;
                    }
                    uint prev__candidate_LinkMethodBodyToContainedEntity_node_mb;
                    prev__candidate_LinkMethodBodyToContainedEntity_node_mb = candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                    candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                    // Implicit Target LinkMethodBodyToContainedEntity_node_e from LinkMethodBodyToContainedEntity_edge__edge0 
                    GRGEN_LGSP.LGSPNode candidate_LinkMethodBodyToContainedEntity_node_e = candidate_LinkMethodBodyToContainedEntity_edge__edge0.lgspTarget;
                    if(!GRGEN_MODEL.NodeType_Entity.isMyType[candidate_LinkMethodBodyToContainedEntity_node_e.lgspType.TypeID]) {
                        candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags = candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_LinkMethodBodyToContainedEntity_node_mb;
                        continue;
                    }
                    if((candidate_LinkMethodBodyToContainedEntity_node_e.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                    {
                        candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags = candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_LinkMethodBodyToContainedEntity_node_mb;
                        continue;
                    }
                    // NegativePattern 
                    {
                        ++isoSpace;
                        uint prev_neg_0__candidate_LinkMethodBodyToContainedEntity_node_mb;
                        prev_neg_0__candidate_LinkMethodBodyToContainedEntity_node_mb = candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                        candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                        if((candidate_LinkMethodBodyToContainedEntity_node_e.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                        {
                            candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags = candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev_neg_0__candidate_LinkMethodBodyToContainedEntity_node_mb;
                            --isoSpace;
                            goto label0;
                        }
                        // Extend Outgoing LinkMethodBodyToContainedEntity_neg_0_edge__edge0 from LinkMethodBodyToContainedEntity_node_mb 
                        GRGEN_LGSP.LGSPEdge head_candidate_LinkMethodBodyToContainedEntity_neg_0_edge__edge0 = candidate_LinkMethodBodyToContainedEntity_node_mb.lgspOuthead;
                        if(head_candidate_LinkMethodBodyToContainedEntity_neg_0_edge__edge0 != null)
                        {
                            GRGEN_LGSP.LGSPEdge candidate_LinkMethodBodyToContainedEntity_neg_0_edge__edge0 = head_candidate_LinkMethodBodyToContainedEntity_neg_0_edge__edge0;
                            do
                            {
                                if(candidate_LinkMethodBodyToContainedEntity_neg_0_edge__edge0.lgspType.TypeID!=10) {
                                    continue;
                                }
                                if(candidate_LinkMethodBodyToContainedEntity_neg_0_edge__edge0.lgspTarget != candidate_LinkMethodBodyToContainedEntity_node_e) {
                                    continue;
                                }
                                // negative pattern found
                                candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags = candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev_neg_0__candidate_LinkMethodBodyToContainedEntity_node_mb;
                                --isoSpace;
                                candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags = candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_LinkMethodBodyToContainedEntity_node_mb;
                                goto label1;
                            }
                            while( (candidate_LinkMethodBodyToContainedEntity_neg_0_edge__edge0 = candidate_LinkMethodBodyToContainedEntity_neg_0_edge__edge0.lgspOutNext) != head_candidate_LinkMethodBodyToContainedEntity_neg_0_edge__edge0 );
                        }
                        candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags = candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev_neg_0__candidate_LinkMethodBodyToContainedEntity_node_mb;
                        --isoSpace;
                    }
label0: ;
                    Rule_LinkMethodBodyToContainedEntity.Match_LinkMethodBodyToContainedEntity match = matches.GetNextUnfilledPosition();
                    match._node_mb = candidate_LinkMethodBodyToContainedEntity_node_mb;
                    match._node_e = candidate_LinkMethodBodyToContainedEntity_node_e;
                    match._edge__edge0 = candidate_LinkMethodBodyToContainedEntity_edge__edge0;
                    matches.PositionWasFilledFixIt();
                    // if enough matches were found, we leave
                    if(maxMatches > 0 && matches.Count >= maxMatches)
                    {
                        graph.MoveHeadAfter(candidate_LinkMethodBodyToContainedEntity_edge__edge0);
                        candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags = candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_LinkMethodBodyToContainedEntity_node_mb;
                        return matches;
                    }
                    candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags = candidate_LinkMethodBodyToContainedEntity_node_mb.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_LinkMethodBodyToContainedEntity_node_mb;
label1: ;
                }
            }
            return matches;
        }
        /// <summary> Type of the matcher method (with parameters processing environment containing host graph, maximum number of matches to search for (zero=unlimited), and rule parameters; returning found matches). </summary>
        public delegate GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> MatchInvoker(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches);
        /// <summary> A delegate pointing to the current matcher program for this rule. </summary>
        public MatchInvoker DynamicMatch;
        /// <summary> The RulePattern object from which this LGSPAction object has been created. </summary>
        public GRGEN_LIBGR.IRulePattern RulePattern { get { return _rulePattern; } }
        public GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches)
        {
            return DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches);
        }
        public void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity match)
        {
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
        }
        public void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> matches)
        {
            foreach(Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
        }
        public bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            if(matches.Count <= 0) return false;
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            return true;
        }
        public int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches);
            if(matches.Count <= 0) return 0;
            foreach(Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
            return matches.Count;
        }
        public bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> matches;
            
            while(true)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
                if(matches.Count <= 0) return true;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
        }
        public bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            if(matches.Count <= 0) return false;
            
            do
            {
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            }
            while(matches.Count > 0) ;
            return true;
        }
        public bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity> matches;
            
            for(int i = 0; i < max; i++)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
                if(matches.Count <= 0) return i >= min;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
            return true;
        }
        // implementation of inexact action interface by delegation to exact action interface
        public GRGEN_LIBGR.IMatches Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches, object[] parameters)
        {
            return Match(actionEnv, maxMatches);
        }
        public object[] Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch match)
        {
            
            Modify(actionEnv, (Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity)match);
            return ReturnArray;
        }
        public List<object[]> ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches)
        {
            ModifyAll(actionEnv, (GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedEntity.IMatch_LinkMethodBodyToContainedEntity>)matches);
            while(AvailableReturnArrays.Count < matches.Count) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matches.Count; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            
            if(Apply(actionEnv)) {
                return ReturnArray;
            }
            else return null;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            
            if(Apply(actionEnv)) {
                return ReturnArray;
            }
            else return null;
        }
        public List<object[]> Reserve(int numReturns)
        {
            if(AvailableReturnArrays == null)
                AvailableReturnArrays = new List<object[]>();
            while(AvailableReturnArrays.Count < numReturns) AvailableReturnArrays.Add(new object[0]);
            if(ReturnArrayListForAll == null)
                ReturnArrayListForAll = new List<object[]>();
            ReturnArrayListForAll.Clear();
            for(int i=0; i<numReturns; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            int matchesCount = ApplyAll(maxMatches, actionEnv);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            int matchesCount = ApplyAll(maxMatches, actionEnv);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            return ApplyStar(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyStar(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            return ApplyPlus(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyPlus(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            return ApplyMinMax(actionEnv, min, max);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max, params object[] parameters)
        {
            return ApplyMinMax(actionEnv, min, max);
        }
        public void Filter(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches, GRGEN_LIBGR.FilterCallWithArguments filter)
        {
            switch(filter.PackagePrefixedName) {
                case "keepFirst": matches.Filter_keepFirst((System.Int32)(filter.Arguments[0])); break;
                case "keepLast": matches.Filter_keepLast((System.Int32)(filter.Arguments[0])); break;
                case "keepFirstFraction": matches.Filter_keepFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "keepLastFraction": matches.Filter_keepLastFraction((System.Double)(filter.Arguments[0])); break;
                case "removeFirst": matches.Filter_removeFirst((System.Int32)(filter.Arguments[0])); break;
                case "removeLast": matches.Filter_removeLast((System.Int32)(filter.Arguments[0])); break;
                case "removeFirstFraction": matches.Filter_removeFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "removeLastFraction": matches.Filter_removeLastFraction((System.Double)(filter.Arguments[0])); break;
                default: throw new Exception("Unknown filter name " + filter.PackagePrefixedName + "!");
            }
        }
    }
    
    /// <summary>
    /// An object representing an executable rule - same as IAction, but with exact types and distinct parameters.
    /// </summary>
    public interface IAction_LinkMethodBodyToContainedExpressionTransitive
    {
        /// <summary> same as IAction.Match, but with exact types and distinct parameters. </summary>
        GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches);
        /// <summary> same as IAction.Modify, but with exact types and distinct parameters. </summary>
        void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive match);
        /// <summary> same as IAction.ModifyAll, but with exact types and distinct parameters. </summary>
        void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> matches);
        /// <summary> same as IAction.Apply, but with exact types and distinct parameters; returns true if applied </summary>
        bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyAll, but with exact types and distinct parameters; returns the number of matches found/applied. </summary>
        int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyStar, but with exact types and distinct parameters. </summary>
        bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyPlus, but with exact types and distinct parameters. </summary>
        bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyMinMax, but with exact types and distinct parameters. </summary>
        bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max);
    }
    
    public class Action_LinkMethodBodyToContainedExpressionTransitive : GRGEN_LGSP.LGSPAction, GRGEN_LIBGR.IAction, IAction_LinkMethodBodyToContainedExpressionTransitive
    {
        public Action_LinkMethodBodyToContainedExpressionTransitive()
            : base(Rule_LinkMethodBodyToContainedExpressionTransitive.Instance.patternGraph)
        {
            _rulePattern = Rule_LinkMethodBodyToContainedExpressionTransitive.Instance;
            DynamicMatch = myMatch;
        }

        public Rule_LinkMethodBodyToContainedExpressionTransitive _rulePattern;
        public override GRGEN_LGSP.LGSPRulePattern rulePattern { get { return _rulePattern; } }
        public override string Name { get { return "LinkMethodBodyToContainedExpressionTransitive"; } }
        [ThreadStatic] private static GRGEN_LGSP.LGSPMatchesList<Rule_LinkMethodBodyToContainedExpressionTransitive.Match_LinkMethodBodyToContainedExpressionTransitive, Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> matches;

        // Performance optimization: saves us usage of new for the return array or the return arrays. In the object/string-style modify/apply methods of the action interface implementation.
        [ThreadStatic] public static object[] ReturnArray;
        [ThreadStatic] public static List<object[]> ReturnArrayListForAll;
        [ThreadStatic] public static List<object[]> AvailableReturnArrays;
        public static Action_LinkMethodBodyToContainedExpressionTransitive Instance { get { return instance; } set { instance = value; } }
        private static Action_LinkMethodBodyToContainedExpressionTransitive instance = new Action_LinkMethodBodyToContainedExpressionTransitive();
        
        public GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> myMatch(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            if(matches == null)
                matches = new GRGEN_LGSP.LGSPMatchesList<Rule_LinkMethodBodyToContainedExpressionTransitive.Match_LinkMethodBodyToContainedExpressionTransitive, Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>(this);
            matches.Clear();
            if(ReturnArray == null)
                ReturnArray = new object[0];
            int isoSpace = 0;
            // Lookup LinkMethodBodyToContainedExpressionTransitive_edge__edge1 
            foreach(GRGEN_LIBGR.EdgeType type_candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1 in GRGEN_MODEL.EdgeType_contains.typeVar.SubOrSameTypes)
            {
                int type_id_candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1 = type_candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1.TypeID;
                for(GRGEN_LGSP.LGSPEdge head_candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1 = graph.edgesByTypeHeads[type_id_candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1], candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1 = head_candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1.lgspTypeNext; candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1 != head_candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1; candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1 = candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1.lgspTypeNext)
                {
                    // Implicit Source LinkMethodBodyToContainedExpressionTransitive_node_e1 from LinkMethodBodyToContainedExpressionTransitive_edge__edge1 
                    GRGEN_LGSP.LGSPNode candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1 = candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1.lgspSource;
                    if(candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspType.TypeID!=3) {
                        continue;
                    }
                    uint prev__candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1;
                    prev__candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1 = candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                    candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                    // Implicit Target LinkMethodBodyToContainedExpressionTransitive_node_e2 from LinkMethodBodyToContainedExpressionTransitive_edge__edge1 
                    GRGEN_LGSP.LGSPNode candidate_LinkMethodBodyToContainedExpressionTransitive_node_e2 = candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1.lgspTarget;
                    if(candidate_LinkMethodBodyToContainedExpressionTransitive_node_e2.lgspType.TypeID!=3) {
                        candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags = candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1;
                        continue;
                    }
                    if((candidate_LinkMethodBodyToContainedExpressionTransitive_node_e2.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                    {
                        candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags = candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1;
                        continue;
                    }
                    // NegativePattern 
                    {
                        ++isoSpace;
                        uint prev_neg_0__candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1;
                        prev_neg_0__candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1 = candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                        candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                        if((candidate_LinkMethodBodyToContainedExpressionTransitive_node_e2.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                        {
                            candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags = candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev_neg_0__candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1;
                            --isoSpace;
                            goto label2;
                        }
                        // Extend Outgoing LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0 from LinkMethodBodyToContainedExpressionTransitive_node_e1 
                        GRGEN_LGSP.LGSPEdge head_candidate_LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0 = candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspOuthead;
                        if(head_candidate_LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0 != null)
                        {
                            GRGEN_LGSP.LGSPEdge candidate_LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0 = head_candidate_LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0;
                            do
                            {
                                if(candidate_LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0.lgspType.TypeID!=10) {
                                    continue;
                                }
                                if(candidate_LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0.lgspTarget != candidate_LinkMethodBodyToContainedExpressionTransitive_node_e2) {
                                    continue;
                                }
                                // negative pattern found
                                candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags = candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev_neg_0__candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1;
                                --isoSpace;
                                candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags = candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1;
                                goto label3;
                            }
                            while( (candidate_LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0 = candidate_LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0.lgspOutNext) != head_candidate_LinkMethodBodyToContainedExpressionTransitive_neg_0_edge__edge0 );
                        }
                        candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags = candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev_neg_0__candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1;
                        --isoSpace;
                    }
label2: ;
                    // Extend Incoming LinkMethodBodyToContainedExpressionTransitive_edge__edge0 from LinkMethodBodyToContainedExpressionTransitive_node_e1 
                    GRGEN_LGSP.LGSPEdge head_candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge0 = candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspInhead;
                    if(head_candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge0 != null)
                    {
                        GRGEN_LGSP.LGSPEdge candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge0 = head_candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge0;
                        do
                        {
                            if(candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge0.lgspType.TypeID!=10) {
                                continue;
                            }
                            // Implicit Source LinkMethodBodyToContainedExpressionTransitive_node_mb from LinkMethodBodyToContainedExpressionTransitive_edge__edge0 
                            GRGEN_LGSP.LGSPNode candidate_LinkMethodBodyToContainedExpressionTransitive_node_mb = candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge0.lgspSource;
                            if(candidate_LinkMethodBodyToContainedExpressionTransitive_node_mb.lgspType.TypeID!=2) {
                                continue;
                            }
                            Rule_LinkMethodBodyToContainedExpressionTransitive.Match_LinkMethodBodyToContainedExpressionTransitive match = matches.GetNextUnfilledPosition();
                            match._node_mb = candidate_LinkMethodBodyToContainedExpressionTransitive_node_mb;
                            match._node_e1 = candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1;
                            match._node_e2 = candidate_LinkMethodBodyToContainedExpressionTransitive_node_e2;
                            match._edge__edge0 = candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge0;
                            match._edge__edge1 = candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1;
                            matches.PositionWasFilledFixIt();
                            // if enough matches were found, we leave
                            if(maxMatches > 0 && matches.Count >= maxMatches)
                            {
                                candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.MoveInHeadAfter(candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge0);
                                graph.MoveHeadAfter(candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge1);
                                candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags = candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1;
                                return matches;
                            }
                        }
                        while( (candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge0 = candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge0.lgspInNext) != head_candidate_LinkMethodBodyToContainedExpressionTransitive_edge__edge0 );
                    }
                    candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags = candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_LinkMethodBodyToContainedExpressionTransitive_node_e1;
label3: ;
                }
            }
            return matches;
        }
        /// <summary> Type of the matcher method (with parameters processing environment containing host graph, maximum number of matches to search for (zero=unlimited), and rule parameters; returning found matches). </summary>
        public delegate GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> MatchInvoker(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches);
        /// <summary> A delegate pointing to the current matcher program for this rule. </summary>
        public MatchInvoker DynamicMatch;
        /// <summary> The RulePattern object from which this LGSPAction object has been created. </summary>
        public GRGEN_LIBGR.IRulePattern RulePattern { get { return _rulePattern; } }
        public GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches)
        {
            return DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches);
        }
        public void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive match)
        {
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
        }
        public void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> matches)
        {
            foreach(Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
        }
        public bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            if(matches.Count <= 0) return false;
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            return true;
        }
        public int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches);
            if(matches.Count <= 0) return 0;
            foreach(Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
            return matches.Count;
        }
        public bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> matches;
            
            while(true)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
                if(matches.Count <= 0) return true;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
        }
        public bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            if(matches.Count <= 0) return false;
            
            do
            {
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            }
            while(matches.Count > 0) ;
            return true;
        }
        public bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive> matches;
            
            for(int i = 0; i < max; i++)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
                if(matches.Count <= 0) return i >= min;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
            return true;
        }
        // implementation of inexact action interface by delegation to exact action interface
        public GRGEN_LIBGR.IMatches Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches, object[] parameters)
        {
            return Match(actionEnv, maxMatches);
        }
        public object[] Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch match)
        {
            
            Modify(actionEnv, (Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive)match);
            return ReturnArray;
        }
        public List<object[]> ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches)
        {
            ModifyAll(actionEnv, (GRGEN_LIBGR.IMatchesExact<Rule_LinkMethodBodyToContainedExpressionTransitive.IMatch_LinkMethodBodyToContainedExpressionTransitive>)matches);
            while(AvailableReturnArrays.Count < matches.Count) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matches.Count; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            
            if(Apply(actionEnv)) {
                return ReturnArray;
            }
            else return null;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            
            if(Apply(actionEnv)) {
                return ReturnArray;
            }
            else return null;
        }
        public List<object[]> Reserve(int numReturns)
        {
            if(AvailableReturnArrays == null)
                AvailableReturnArrays = new List<object[]>();
            while(AvailableReturnArrays.Count < numReturns) AvailableReturnArrays.Add(new object[0]);
            if(ReturnArrayListForAll == null)
                ReturnArrayListForAll = new List<object[]>();
            ReturnArrayListForAll.Clear();
            for(int i=0; i<numReturns; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            int matchesCount = ApplyAll(maxMatches, actionEnv);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            int matchesCount = ApplyAll(maxMatches, actionEnv);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            return ApplyStar(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyStar(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            return ApplyPlus(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyPlus(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            return ApplyMinMax(actionEnv, min, max);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max, params object[] parameters)
        {
            return ApplyMinMax(actionEnv, min, max);
        }
        public void Filter(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches, GRGEN_LIBGR.FilterCallWithArguments filter)
        {
            switch(filter.PackagePrefixedName) {
                case "keepFirst": matches.Filter_keepFirst((System.Int32)(filter.Arguments[0])); break;
                case "keepLast": matches.Filter_keepLast((System.Int32)(filter.Arguments[0])); break;
                case "keepFirstFraction": matches.Filter_keepFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "keepLastFraction": matches.Filter_keepLastFraction((System.Double)(filter.Arguments[0])); break;
                case "removeFirst": matches.Filter_removeFirst((System.Int32)(filter.Arguments[0])); break;
                case "removeLast": matches.Filter_removeLast((System.Int32)(filter.Arguments[0])); break;
                case "removeFirstFraction": matches.Filter_removeFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "removeLastFraction": matches.Filter_removeLastFraction((System.Double)(filter.Arguments[0])); break;
                default: throw new Exception("Unknown filter name " + filter.PackagePrefixedName + "!");
            }
        }
    }
    
    /// <summary>
    /// An object representing an executable rule - same as IAction, but with exact types and distinct parameters.
    /// </summary>
    public interface IAction_RemoveMethodBodyContainsBetweenExpressions
    {
        /// <summary> same as IAction.Match, but with exact types and distinct parameters. </summary>
        GRGEN_LIBGR.IMatchesExact<Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches);
        /// <summary> same as IAction.Modify, but with exact types and distinct parameters. </summary>
        void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions match);
        /// <summary> same as IAction.ModifyAll, but with exact types and distinct parameters. </summary>
        void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> matches);
        /// <summary> same as IAction.Apply, but with exact types and distinct parameters; returns true if applied </summary>
        bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyAll, but with exact types and distinct parameters; returns the number of matches found/applied. </summary>
        int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyStar, but with exact types and distinct parameters. </summary>
        bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyPlus, but with exact types and distinct parameters. </summary>
        bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyMinMax, but with exact types and distinct parameters. </summary>
        bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max);
    }
    
    public class Action_RemoveMethodBodyContainsBetweenExpressions : GRGEN_LGSP.LGSPAction, GRGEN_LIBGR.IAction, IAction_RemoveMethodBodyContainsBetweenExpressions
    {
        public Action_RemoveMethodBodyContainsBetweenExpressions()
            : base(Rule_RemoveMethodBodyContainsBetweenExpressions.Instance.patternGraph)
        {
            _rulePattern = Rule_RemoveMethodBodyContainsBetweenExpressions.Instance;
            DynamicMatch = myMatch;
        }

        public Rule_RemoveMethodBodyContainsBetweenExpressions _rulePattern;
        public override GRGEN_LGSP.LGSPRulePattern rulePattern { get { return _rulePattern; } }
        public override string Name { get { return "RemoveMethodBodyContainsBetweenExpressions"; } }
        [ThreadStatic] private static GRGEN_LGSP.LGSPMatchesList<Rule_RemoveMethodBodyContainsBetweenExpressions.Match_RemoveMethodBodyContainsBetweenExpressions, Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> matches;

        // Performance optimization: saves us usage of new for the return array or the return arrays. In the object/string-style modify/apply methods of the action interface implementation.
        [ThreadStatic] public static object[] ReturnArray;
        [ThreadStatic] public static List<object[]> ReturnArrayListForAll;
        [ThreadStatic] public static List<object[]> AvailableReturnArrays;
        public static Action_RemoveMethodBodyContainsBetweenExpressions Instance { get { return instance; } set { instance = value; } }
        private static Action_RemoveMethodBodyContainsBetweenExpressions instance = new Action_RemoveMethodBodyContainsBetweenExpressions();
        
        public GRGEN_LIBGR.IMatchesExact<Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> myMatch(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            if(matches == null)
                matches = new GRGEN_LGSP.LGSPMatchesList<Rule_RemoveMethodBodyContainsBetweenExpressions.Match_RemoveMethodBodyContainsBetweenExpressions, Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>(this);
            matches.Clear();
            if(ReturnArray == null)
                ReturnArray = new object[0];
            int isoSpace = 0;
            // Lookup RemoveMethodBodyContainsBetweenExpressions_edge_mbc 
            int type_id_candidate_RemoveMethodBodyContainsBetweenExpressions_edge_mbc = 10;
            for(GRGEN_LGSP.LGSPEdge head_candidate_RemoveMethodBodyContainsBetweenExpressions_edge_mbc = graph.edgesByTypeHeads[type_id_candidate_RemoveMethodBodyContainsBetweenExpressions_edge_mbc], candidate_RemoveMethodBodyContainsBetweenExpressions_edge_mbc = head_candidate_RemoveMethodBodyContainsBetweenExpressions_edge_mbc.lgspTypeNext; candidate_RemoveMethodBodyContainsBetweenExpressions_edge_mbc != head_candidate_RemoveMethodBodyContainsBetweenExpressions_edge_mbc; candidate_RemoveMethodBodyContainsBetweenExpressions_edge_mbc = candidate_RemoveMethodBodyContainsBetweenExpressions_edge_mbc.lgspTypeNext)
            {
                // Implicit Source RemoveMethodBodyContainsBetweenExpressions_node_e1 from RemoveMethodBodyContainsBetweenExpressions_edge_mbc 
                GRGEN_LGSP.LGSPNode candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1 = candidate_RemoveMethodBodyContainsBetweenExpressions_edge_mbc.lgspSource;
                if(candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1.lgspType.TypeID!=3) {
                    continue;
                }
                uint prev__candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1;
                prev__candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1 = candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                // Implicit Target RemoveMethodBodyContainsBetweenExpressions_node_e2 from RemoveMethodBodyContainsBetweenExpressions_edge_mbc 
                GRGEN_LGSP.LGSPNode candidate_RemoveMethodBodyContainsBetweenExpressions_node_e2 = candidate_RemoveMethodBodyContainsBetweenExpressions_edge_mbc.lgspTarget;
                if(candidate_RemoveMethodBodyContainsBetweenExpressions_node_e2.lgspType.TypeID!=3) {
                    candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1.lgspFlags = candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1;
                    continue;
                }
                if((candidate_RemoveMethodBodyContainsBetweenExpressions_node_e2.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                {
                    candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1.lgspFlags = candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1;
                    continue;
                }
                Rule_RemoveMethodBodyContainsBetweenExpressions.Match_RemoveMethodBodyContainsBetweenExpressions match = matches.GetNextUnfilledPosition();
                match._node_e1 = candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1;
                match._node_e2 = candidate_RemoveMethodBodyContainsBetweenExpressions_node_e2;
                match._edge_mbc = candidate_RemoveMethodBodyContainsBetweenExpressions_edge_mbc;
                matches.PositionWasFilledFixIt();
                // if enough matches were found, we leave
                if(maxMatches > 0 && matches.Count >= maxMatches)
                {
                    graph.MoveHeadAfter(candidate_RemoveMethodBodyContainsBetweenExpressions_edge_mbc);
                    candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1.lgspFlags = candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1;
                    return matches;
                }
                candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1.lgspFlags = candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_RemoveMethodBodyContainsBetweenExpressions_node_e1;
            }
            return matches;
        }
        /// <summary> Type of the matcher method (with parameters processing environment containing host graph, maximum number of matches to search for (zero=unlimited), and rule parameters; returning found matches). </summary>
        public delegate GRGEN_LIBGR.IMatchesExact<Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> MatchInvoker(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches);
        /// <summary> A delegate pointing to the current matcher program for this rule. </summary>
        public MatchInvoker DynamicMatch;
        /// <summary> The RulePattern object from which this LGSPAction object has been created. </summary>
        public GRGEN_LIBGR.IRulePattern RulePattern { get { return _rulePattern; } }
        public GRGEN_LIBGR.IMatchesExact<Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches)
        {
            return DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches);
        }
        public void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions match)
        {
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
        }
        public void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> matches)
        {
            foreach(Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
        }
        public bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            if(matches.Count <= 0) return false;
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            return true;
        }
        public int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches);
            if(matches.Count <= 0) return 0;
            foreach(Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
            return matches.Count;
        }
        public bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> matches;
            
            while(true)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
                if(matches.Count <= 0) return true;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
        }
        public bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            if(matches.Count <= 0) return false;
            
            do
            {
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            }
            while(matches.Count > 0) ;
            return true;
        }
        public bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions> matches;
            
            for(int i = 0; i < max; i++)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
                if(matches.Count <= 0) return i >= min;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
            return true;
        }
        // implementation of inexact action interface by delegation to exact action interface
        public GRGEN_LIBGR.IMatches Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches, object[] parameters)
        {
            return Match(actionEnv, maxMatches);
        }
        public object[] Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch match)
        {
            
            Modify(actionEnv, (Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions)match);
            return ReturnArray;
        }
        public List<object[]> ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches)
        {
            ModifyAll(actionEnv, (GRGEN_LIBGR.IMatchesExact<Rule_RemoveMethodBodyContainsBetweenExpressions.IMatch_RemoveMethodBodyContainsBetweenExpressions>)matches);
            while(AvailableReturnArrays.Count < matches.Count) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matches.Count; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            
            if(Apply(actionEnv)) {
                return ReturnArray;
            }
            else return null;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            
            if(Apply(actionEnv)) {
                return ReturnArray;
            }
            else return null;
        }
        public List<object[]> Reserve(int numReturns)
        {
            if(AvailableReturnArrays == null)
                AvailableReturnArrays = new List<object[]>();
            while(AvailableReturnArrays.Count < numReturns) AvailableReturnArrays.Add(new object[0]);
            if(ReturnArrayListForAll == null)
                ReturnArrayListForAll = new List<object[]>();
            ReturnArrayListForAll.Clear();
            for(int i=0; i<numReturns; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            int matchesCount = ApplyAll(maxMatches, actionEnv);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            int matchesCount = ApplyAll(maxMatches, actionEnv);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            return ApplyStar(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyStar(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            return ApplyPlus(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyPlus(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            return ApplyMinMax(actionEnv, min, max);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max, params object[] parameters)
        {
            return ApplyMinMax(actionEnv, min, max);
        }
        public void Filter(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches, GRGEN_LIBGR.FilterCallWithArguments filter)
        {
            switch(filter.PackagePrefixedName) {
                case "keepFirst": matches.Filter_keepFirst((System.Int32)(filter.Arguments[0])); break;
                case "keepLast": matches.Filter_keepLast((System.Int32)(filter.Arguments[0])); break;
                case "keepFirstFraction": matches.Filter_keepFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "keepLastFraction": matches.Filter_keepLastFraction((System.Double)(filter.Arguments[0])); break;
                case "removeFirst": matches.Filter_removeFirst((System.Int32)(filter.Arguments[0])); break;
                case "removeLast": matches.Filter_removeLast((System.Int32)(filter.Arguments[0])); break;
                case "removeFirstFraction": matches.Filter_removeFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "removeLastFraction": matches.Filter_removeLastFraction((System.Double)(filter.Arguments[0])); break;
                default: throw new Exception("Unknown filter name " + filter.PackagePrefixedName + "!");
            }
        }
    }
    
    /// <summary>
    /// An object representing an executable rule - same as IAction, but with exact types and distinct parameters.
    /// </summary>
    public interface IAction_RetypeClassContainment
    {
        /// <summary> same as IAction.Match, but with exact types and distinct parameters. </summary>
        GRGEN_LIBGR.IMatchesExact<Rule_RetypeClassContainment.IMatch_RetypeClassContainment> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches);
        /// <summary> same as IAction.Modify, but with exact types and distinct parameters. </summary>
        void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_RetypeClassContainment.IMatch_RetypeClassContainment match);
        /// <summary> same as IAction.ModifyAll, but with exact types and distinct parameters. </summary>
        void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_RetypeClassContainment.IMatch_RetypeClassContainment> matches);
        /// <summary> same as IAction.Apply, but with exact types and distinct parameters; returns true if applied </summary>
        bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyAll, but with exact types and distinct parameters; returns the number of matches found/applied. </summary>
        int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyStar, but with exact types and distinct parameters. </summary>
        bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyPlus, but with exact types and distinct parameters. </summary>
        bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv);
        /// <summary> same as IAction.ApplyMinMax, but with exact types and distinct parameters. </summary>
        bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max);
    }
    
    public class Action_RetypeClassContainment : GRGEN_LGSP.LGSPAction, GRGEN_LIBGR.IAction, IAction_RetypeClassContainment
    {
        public Action_RetypeClassContainment()
            : base(Rule_RetypeClassContainment.Instance.patternGraph)
        {
            _rulePattern = Rule_RetypeClassContainment.Instance;
            DynamicMatch = myMatch;
        }

        public Rule_RetypeClassContainment _rulePattern;
        public override GRGEN_LGSP.LGSPRulePattern rulePattern { get { return _rulePattern; } }
        public override string Name { get { return "RetypeClassContainment"; } }
        [ThreadStatic] private static GRGEN_LGSP.LGSPMatchesList<Rule_RetypeClassContainment.Match_RetypeClassContainment, Rule_RetypeClassContainment.IMatch_RetypeClassContainment> matches;

        // Performance optimization: saves us usage of new for the return array or the return arrays. In the object/string-style modify/apply methods of the action interface implementation.
        [ThreadStatic] public static object[] ReturnArray;
        [ThreadStatic] public static List<object[]> ReturnArrayListForAll;
        [ThreadStatic] public static List<object[]> AvailableReturnArrays;
        public static Action_RetypeClassContainment Instance { get { return instance; } set { instance = value; } }
        private static Action_RetypeClassContainment instance = new Action_RetypeClassContainment();
        
        public GRGEN_LIBGR.IMatchesExact<Rule_RetypeClassContainment.IMatch_RetypeClassContainment> myMatch(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches)
        {
            GRGEN_LGSP.LGSPGraph graph = actionEnv.graph;
            if(matches == null)
                matches = new GRGEN_LGSP.LGSPMatchesList<Rule_RetypeClassContainment.Match_RetypeClassContainment, Rule_RetypeClassContainment.IMatch_RetypeClassContainment>(this);
            matches.Clear();
            if(ReturnArray == null)
                ReturnArray = new object[0];
            int isoSpace = 0;
            // Lookup RetypeClassContainment_edge_c 
            int type_id_candidate_RetypeClassContainment_edge_c = 3;
            for(GRGEN_LGSP.LGSPEdge head_candidate_RetypeClassContainment_edge_c = graph.edgesByTypeHeads[type_id_candidate_RetypeClassContainment_edge_c], candidate_RetypeClassContainment_edge_c = head_candidate_RetypeClassContainment_edge_c.lgspTypeNext; candidate_RetypeClassContainment_edge_c != head_candidate_RetypeClassContainment_edge_c; candidate_RetypeClassContainment_edge_c = candidate_RetypeClassContainment_edge_c.lgspTypeNext)
            {
                // Implicit Source RetypeClassContainment_node_c1 from RetypeClassContainment_edge_c 
                GRGEN_LGSP.LGSPNode candidate_RetypeClassContainment_node_c1 = candidate_RetypeClassContainment_edge_c.lgspSource;
                if(candidate_RetypeClassContainment_node_c1.lgspType.TypeID!=5) {
                    continue;
                }
                uint prev__candidate_RetypeClassContainment_node_c1;
                prev__candidate_RetypeClassContainment_node_c1 = candidate_RetypeClassContainment_node_c1.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                candidate_RetypeClassContainment_node_c1.lgspFlags |= (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace;
                // Implicit Target RetypeClassContainment_node_c2 from RetypeClassContainment_edge_c 
                GRGEN_LGSP.LGSPNode candidate_RetypeClassContainment_node_c2 = candidate_RetypeClassContainment_edge_c.lgspTarget;
                if(candidate_RetypeClassContainment_node_c2.lgspType.TypeID!=5) {
                    candidate_RetypeClassContainment_node_c1.lgspFlags = candidate_RetypeClassContainment_node_c1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_RetypeClassContainment_node_c1;
                    continue;
                }
                if((candidate_RetypeClassContainment_node_c2.lgspFlags & (uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) != 0)
                {
                    candidate_RetypeClassContainment_node_c1.lgspFlags = candidate_RetypeClassContainment_node_c1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_RetypeClassContainment_node_c1;
                    continue;
                }
                Rule_RetypeClassContainment.Match_RetypeClassContainment match = matches.GetNextUnfilledPosition();
                match._node_c1 = candidate_RetypeClassContainment_node_c1;
                match._node_c2 = candidate_RetypeClassContainment_node_c2;
                match._edge_c = candidate_RetypeClassContainment_edge_c;
                matches.PositionWasFilledFixIt();
                // if enough matches were found, we leave
                if(maxMatches > 0 && matches.Count >= maxMatches)
                {
                    graph.MoveHeadAfter(candidate_RetypeClassContainment_edge_c);
                    candidate_RetypeClassContainment_node_c1.lgspFlags = candidate_RetypeClassContainment_node_c1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_RetypeClassContainment_node_c1;
                    return matches;
                }
                candidate_RetypeClassContainment_node_c1.lgspFlags = candidate_RetypeClassContainment_node_c1.lgspFlags & ~((uint)GRGEN_LGSP.LGSPElemFlags.IS_MATCHED << isoSpace) | prev__candidate_RetypeClassContainment_node_c1;
            }
            return matches;
        }
        /// <summary> Type of the matcher method (with parameters processing environment containing host graph, maximum number of matches to search for (zero=unlimited), and rule parameters; returning found matches). </summary>
        public delegate GRGEN_LIBGR.IMatchesExact<Rule_RetypeClassContainment.IMatch_RetypeClassContainment> MatchInvoker(GRGEN_LGSP.LGSPActionExecutionEnvironment actionEnv, int maxMatches);
        /// <summary> A delegate pointing to the current matcher program for this rule. </summary>
        public MatchInvoker DynamicMatch;
        /// <summary> The RulePattern object from which this LGSPAction object has been created. </summary>
        public GRGEN_LIBGR.IRulePattern RulePattern { get { return _rulePattern; } }
        public GRGEN_LIBGR.IMatchesExact<Rule_RetypeClassContainment.IMatch_RetypeClassContainment> Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches)
        {
            return DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches);
        }
        public void Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, Rule_RetypeClassContainment.IMatch_RetypeClassContainment match)
        {
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
        }
        public void ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatchesExact<Rule_RetypeClassContainment.IMatch_RetypeClassContainment> matches)
        {
            foreach(Rule_RetypeClassContainment.IMatch_RetypeClassContainment match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
        }
        public bool Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_RetypeClassContainment.IMatch_RetypeClassContainment> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            if(matches.Count <= 0) return false;
            _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            return true;
        }
        public int ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_RetypeClassContainment.IMatch_RetypeClassContainment> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, maxMatches);
            if(matches.Count <= 0) return 0;
            foreach(Rule_RetypeClassContainment.IMatch_RetypeClassContainment match in matches)
            {
                
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, match);
            }
            return matches.Count;
        }
        public bool ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_RetypeClassContainment.IMatch_RetypeClassContainment> matches;
            
            while(true)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
                if(matches.Count <= 0) return true;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
        }
        public bool ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_RetypeClassContainment.IMatch_RetypeClassContainment> matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            if(matches.Count <= 0) return false;
            
            do
            {
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
            }
            while(matches.Count > 0) ;
            return true;
        }
        public bool ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            GRGEN_LIBGR.IMatchesExact<Rule_RetypeClassContainment.IMatch_RetypeClassContainment> matches;
            
            for(int i = 0; i < max; i++)
            {
                matches = DynamicMatch((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, 1);
                if(matches.Count <= 0) return i >= min;
                _rulePattern.Modify((GRGEN_LGSP.LGSPActionExecutionEnvironment)actionEnv, matches.First);
            }
            return true;
        }
        // implementation of inexact action interface by delegation to exact action interface
        public GRGEN_LIBGR.IMatches Match(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int maxMatches, object[] parameters)
        {
            return Match(actionEnv, maxMatches);
        }
        public object[] Modify(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatch match)
        {
            
            Modify(actionEnv, (Rule_RetypeClassContainment.IMatch_RetypeClassContainment)match);
            return ReturnArray;
        }
        public List<object[]> ModifyAll(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches)
        {
            ModifyAll(actionEnv, (GRGEN_LIBGR.IMatchesExact<Rule_RetypeClassContainment.IMatch_RetypeClassContainment>)matches);
            while(AvailableReturnArrays.Count < matches.Count) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matches.Count; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            
            if(Apply(actionEnv)) {
                return ReturnArray;
            }
            else return null;
        }
        object[] GRGEN_LIBGR.IAction.Apply(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            
            if(Apply(actionEnv)) {
                return ReturnArray;
            }
            else return null;
        }
        public List<object[]> Reserve(int numReturns)
        {
            if(AvailableReturnArrays == null)
                AvailableReturnArrays = new List<object[]>();
            while(AvailableReturnArrays.Count < numReturns) AvailableReturnArrays.Add(new object[0]);
            if(ReturnArrayListForAll == null)
                ReturnArrayListForAll = new List<object[]>();
            ReturnArrayListForAll.Clear();
            for(int i=0; i<numReturns; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            int matchesCount = ApplyAll(maxMatches, actionEnv);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        List<object[]> GRGEN_LIBGR.IAction.ApplyAll(int maxMatches, GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            int matchesCount = ApplyAll(maxMatches, actionEnv);
            while(AvailableReturnArrays.Count < matchesCount) AvailableReturnArrays.Add(new object[0]);
            ReturnArrayListForAll.Clear();
            for(int i=0; i<matchesCount; ++i)
            {
                ReturnArrayListForAll.Add(AvailableReturnArrays[i]);
            }
            return ReturnArrayListForAll;
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            return ApplyStar(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyStar(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyStar(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv)
        {
            return ApplyPlus(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyPlus(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, params object[] parameters)
        {
            return ApplyPlus(actionEnv);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max)
        {
            return ApplyMinMax(actionEnv, min, max);
        }
        bool GRGEN_LIBGR.IAction.ApplyMinMax(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, int min, int max, params object[] parameters)
        {
            return ApplyMinMax(actionEnv, min, max);
        }
        public void Filter(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IMatches matches, GRGEN_LIBGR.FilterCallWithArguments filter)
        {
            switch(filter.PackagePrefixedName) {
                case "keepFirst": matches.Filter_keepFirst((System.Int32)(filter.Arguments[0])); break;
                case "keepLast": matches.Filter_keepLast((System.Int32)(filter.Arguments[0])); break;
                case "keepFirstFraction": matches.Filter_keepFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "keepLastFraction": matches.Filter_keepLastFraction((System.Double)(filter.Arguments[0])); break;
                case "removeFirst": matches.Filter_removeFirst((System.Int32)(filter.Arguments[0])); break;
                case "removeLast": matches.Filter_removeLast((System.Int32)(filter.Arguments[0])); break;
                case "removeFirstFraction": matches.Filter_removeFirstFraction((System.Double)(filter.Arguments[0])); break;
                case "removeLastFraction": matches.Filter_removeLastFraction((System.Double)(filter.Arguments[0])); break;
                default: throw new Exception("Unknown filter name " + filter.PackagePrefixedName + "!");
            }
        }
    }
    

    // class which instantiates and stores all the compiled actions of the module,
    // dynamic regeneration and compilation causes the old action to be overwritten by the new one
    // matching/rule patterns are analyzed at creation time here, once, so that later regeneration runs have all the information available
    public class ProgramGraphsOriginalActions : GRGEN_LGSP.LGSPActions
    {
        public ProgramGraphsOriginalActions(GRGEN_LGSP.LGSPGraph lgspgraph, string modelAsmName, string actionsAsmName)
            : base(lgspgraph, modelAsmName, actionsAsmName)
        {
            InitActions();
        }

        public ProgramGraphsOriginalActions(GRGEN_LGSP.LGSPGraph lgspgraph)
            : base(lgspgraph)
        {
            InitActions();
        }

        private void InitActions()
        {
            packages = new string[0];
            GRGEN_LGSP.PatternGraphAnalyzer analyzer = new GRGEN_LGSP.PatternGraphAnalyzer();
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Subclasses.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Pattern_Subclasses.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Pattern_Subclasses.Instance);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Subclass.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Pattern_Subclass.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Pattern_Subclass.Instance);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Features.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Pattern_Features.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Pattern_Features.Instance);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_FeaturePattern.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Pattern_FeaturePattern.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Pattern_FeaturePattern.Instance);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Parameters.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Pattern_Parameters.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Pattern_Parameters.Instance);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Parameter.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Pattern_Parameter.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Pattern_Parameter.Instance);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Statements.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Pattern_Statements.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Pattern_Statements.Instance);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Statement.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Pattern_Statement.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Pattern_Statement.Instance);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Expressions.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Pattern_Expressions.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Pattern_Expressions.Instance);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_ExpressionPattern.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Pattern_ExpressionPattern.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Pattern_ExpressionPattern.Instance);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Bodies.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Pattern_Bodies.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Pattern_Bodies.Instance);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Body.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Pattern_Body.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Pattern_Body.Instance);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_createProgramGraphExample.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Rule_createProgramGraphExample.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Rule_createProgramGraphExample.Instance);
            actions.Add("createProgramGraphExample", (GRGEN_LGSP.LGSPAction) GRGEN_ACTIONS.Action_createProgramGraphExample.Instance);
            @createProgramGraphExample = GRGEN_ACTIONS.Action_createProgramGraphExample.Instance;
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_createProgramGraphPullUp.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Rule_createProgramGraphPullUp.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Rule_createProgramGraphPullUp.Instance);
            actions.Add("createProgramGraphPullUp", (GRGEN_LGSP.LGSPAction) GRGEN_ACTIONS.Action_createProgramGraphPullUp.Instance);
            @createProgramGraphPullUp = GRGEN_ACTIONS.Action_createProgramGraphPullUp.Instance;
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_pullUpMethod.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Rule_pullUpMethod.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Rule_pullUpMethod.Instance);
            actions.Add("pullUpMethod", (GRGEN_LGSP.LGSPAction) GRGEN_ACTIONS.Action_pullUpMethod.Instance);
            @pullUpMethod = GRGEN_ACTIONS.Action_pullUpMethod.Instance;
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_matchAll.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Rule_matchAll.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Rule_matchAll.Instance);
            actions.Add("matchAll", (GRGEN_LGSP.LGSPAction) GRGEN_ACTIONS.Action_matchAll.Instance);
            @matchAll = GRGEN_ACTIONS.Action_matchAll.Instance;
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_InsertHelperEdgesForNestedLayout.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Rule_InsertHelperEdgesForNestedLayout.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Rule_InsertHelperEdgesForNestedLayout.Instance);
            actions.Add("InsertHelperEdgesForNestedLayout", (GRGEN_LGSP.LGSPAction) GRGEN_ACTIONS.Action_InsertHelperEdgesForNestedLayout.Instance);
            @InsertHelperEdgesForNestedLayout = GRGEN_ACTIONS.Action_InsertHelperEdgesForNestedLayout.Instance;
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.Instance);
            actions.Add("LinkMethodBodyToContainedEntity", (GRGEN_LGSP.LGSPAction) GRGEN_ACTIONS.Action_LinkMethodBodyToContainedEntity.Instance);
            @LinkMethodBodyToContainedEntity = GRGEN_ACTIONS.Action_LinkMethodBodyToContainedEntity.Instance;
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.Instance);
            actions.Add("LinkMethodBodyToContainedExpressionTransitive", (GRGEN_LGSP.LGSPAction) GRGEN_ACTIONS.Action_LinkMethodBodyToContainedExpressionTransitive.Instance);
            @LinkMethodBodyToContainedExpressionTransitive = GRGEN_ACTIONS.Action_LinkMethodBodyToContainedExpressionTransitive.Instance;
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.Instance);
            actions.Add("RemoveMethodBodyContainsBetweenExpressions", (GRGEN_LGSP.LGSPAction) GRGEN_ACTIONS.Action_RemoveMethodBodyContainsBetweenExpressions.Instance);
            @RemoveMethodBodyContainsBetweenExpressions = GRGEN_ACTIONS.Action_RemoveMethodBodyContainsBetweenExpressions.Instance;
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_RetypeClassContainment.Instance.patternGraph, false);
            GRGEN_LGSP.PatternGraphAnalyzer.PrepareInline(GRGEN_ACTIONS.Rule_RetypeClassContainment.Instance.patternGraph);
            analyzer.RememberMatchingPattern(GRGEN_ACTIONS.Rule_RetypeClassContainment.Instance);
            actions.Add("RetypeClassContainment", (GRGEN_LGSP.LGSPAction) GRGEN_ACTIONS.Action_RetypeClassContainment.Instance);
            @RetypeClassContainment = GRGEN_ACTIONS.Action_RetypeClassContainment.Instance;
            analyzer.ComputeInterPatternRelations(false);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Pattern_Subclasses.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Pattern_Subclass.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Pattern_Features.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Pattern_FeaturePattern.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Pattern_Parameters.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Pattern_Parameter.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Pattern_Statements.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Pattern_Statement.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Pattern_Expressions.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Pattern_ExpressionPattern.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Pattern_Bodies.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Pattern_Body.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Rule_createProgramGraphExample.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Rule_createProgramGraphPullUp.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Rule_pullUpMethod.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Rule_matchAll.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Rule_InsertHelperEdgesForNestedLayout.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.Instance.patternGraph);
            analyzer.AnalyzeWithInterPatternRelationsKnown(GRGEN_ACTIONS.Rule_RetypeClassContainment.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Pattern_Subclasses.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Pattern_Subclass.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Pattern_Features.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Pattern_FeaturePattern.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Pattern_Parameters.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Pattern_Parameter.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Pattern_Statements.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Pattern_Statement.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Pattern_Expressions.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Pattern_ExpressionPattern.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Pattern_Bodies.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Pattern_Body.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Rule_createProgramGraphExample.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Rule_createProgramGraphPullUp.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Rule_pullUpMethod.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Rule_matchAll.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Rule_InsertHelperEdgesForNestedLayout.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.Instance.patternGraph);
            analyzer.InlineSubpatternUsages(GRGEN_ACTIONS.Rule_RetypeClassContainment.Instance.patternGraph);
            GRGEN_ACTIONS.Pattern_Subclasses.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Pattern_Subclass.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Pattern_Features.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Pattern_FeaturePattern.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Pattern_Parameters.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Pattern_Parameter.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Pattern_Statements.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Pattern_Statement.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Pattern_Expressions.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Pattern_ExpressionPattern.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Pattern_Bodies.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Pattern_Body.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Rule_createProgramGraphExample.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Rule_createProgramGraphPullUp.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Rule_pullUpMethod.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Rule_matchAll.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Rule_InsertHelperEdgesForNestedLayout.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.Instance.patternGraph.maxIsoSpace = 0;
            GRGEN_ACTIONS.Rule_RetypeClassContainment.Instance.patternGraph.maxIsoSpace = 0;
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Subclasses.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Subclass.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Features.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_FeaturePattern.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Parameters.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Parameter.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Statements.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Statement.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Expressions.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_ExpressionPattern.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Bodies.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Pattern_Body.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_createProgramGraphExample.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_createProgramGraphPullUp.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_pullUpMethod.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_matchAll.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_InsertHelperEdgesForNestedLayout.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.Instance.patternGraph, true);
            analyzer.AnalyzeNestingOfPatternGraph(GRGEN_ACTIONS.Rule_RetypeClassContainment.Instance.patternGraph, true);
            analyzer.ComputeInterPatternRelations(true);
        }
        
        public GRGEN_ACTIONS.IAction_createProgramGraphExample @createProgramGraphExample;
        public GRGEN_ACTIONS.IAction_createProgramGraphPullUp @createProgramGraphPullUp;
        public GRGEN_ACTIONS.IAction_pullUpMethod @pullUpMethod;
        public GRGEN_ACTIONS.IAction_matchAll @matchAll;
        public GRGEN_ACTIONS.IAction_InsertHelperEdgesForNestedLayout @InsertHelperEdgesForNestedLayout;
        public GRGEN_ACTIONS.IAction_LinkMethodBodyToContainedEntity @LinkMethodBodyToContainedEntity;
        public GRGEN_ACTIONS.IAction_LinkMethodBodyToContainedExpressionTransitive @LinkMethodBodyToContainedExpressionTransitive;
        public GRGEN_ACTIONS.IAction_RemoveMethodBodyContainsBetweenExpressions @RemoveMethodBodyContainsBetweenExpressions;
        public GRGEN_ACTIONS.IAction_RetypeClassContainment @RetypeClassContainment;
        
        
        public override string[] Packages { get { return packages; } }
        private string[] packages;
        
        public override string Name { get { return "ProgramGraphsOriginalActions"; } }
        public override string StatisticsPath { get { return null; } }
        public override bool LazyNIC { get { return false; } }
        public override bool InlineIndependents { get { return true; } }
        public override bool Profile { get { return false; } }

        public override IList ArrayOrderAscendingBy(IList array, string member)
        {
            if(array.Count == 0)
                return array;
            string arrayType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array.GetType());
            string arrayValueType = GRGEN_LIBGR.TypesHelper.ExtractSrc(arrayType);
            if(!arrayValueType.StartsWith("match<"))
                return null;
            if(array[0] == null)
                return null;
            if(arrayValueType == "match<>")
                arrayValueType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array[0].GetType());
            if(arrayValueType.StartsWith("match<class "))
            {
                switch(arrayValueType.Substring(12, arrayValueType.Length - 12 - 1))
                {
                default:
                    return null;
                }
            }
            else
            {
                switch(arrayValueType.Substring(6, arrayValueType.Length - 6 - 1))
                {
                case "createProgramGraphExample":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "createProgramGraphPullUp":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "pullUpMethod":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "matchAll":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "InsertHelperEdgesForNestedLayout":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "LinkMethodBodyToContainedEntity":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "LinkMethodBodyToContainedExpressionTransitive":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "RemoveMethodBodyContainsBetweenExpressions":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "RetypeClassContainment":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                default:
                    return null;
                }
            }
        }

        public override IList ArrayOrderDescendingBy(IList array, string member)
        {
            if(array.Count == 0)
                return array;
            string arrayType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array.GetType());
            string arrayValueType = GRGEN_LIBGR.TypesHelper.ExtractSrc(arrayType);
            if(!arrayValueType.StartsWith("match<"))
                return null;
            if(array[0] == null)
                return null;
            if(arrayValueType == "match<>")
                arrayValueType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array[0].GetType());
            if(arrayValueType.StartsWith("match<class "))
            {
                switch(arrayValueType.Substring(12, arrayValueType.Length - 12 - 1))
                {
                default:
                    return null;
                }
            }
            else
            {
                switch(arrayValueType.Substring(6, arrayValueType.Length - 6 - 1))
                {
                case "createProgramGraphExample":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "createProgramGraphPullUp":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "pullUpMethod":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "matchAll":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "InsertHelperEdgesForNestedLayout":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "LinkMethodBodyToContainedEntity":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "LinkMethodBodyToContainedExpressionTransitive":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "RemoveMethodBodyContainsBetweenExpressions":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "RetypeClassContainment":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                default:
                    return null;
                }
            }
        }

        public override IList ArrayGroupBy(IList array, string member)
        {
            if(array.Count == 0)
                return array;
            string arrayType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array.GetType());
            string arrayValueType = GRGEN_LIBGR.TypesHelper.ExtractSrc(arrayType);
            if(!arrayValueType.StartsWith("match<"))
                return null;
            if(array[0] == null)
                return null;
            if(arrayValueType == "match<>")
                arrayValueType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array[0].GetType());
            if(arrayValueType.StartsWith("match<class "))
            {
                switch(arrayValueType.Substring(12, arrayValueType.Length - 12 - 1))
                {
                default:
                    return null;
                }
            }
            else
            {
                switch(arrayValueType.Substring(6, arrayValueType.Length - 6 - 1))
                {
                case "createProgramGraphExample":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "createProgramGraphPullUp":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "pullUpMethod":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_pullUpMethod_groupBy_c1(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array));
                    case "c3":
                        return ArrayHelper.Array_pullUpMethod_groupBy_c3(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array));
                    case "b4":
                        return ArrayHelper.Array_pullUpMethod_groupBy_b4(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array));
                    case "m5":
                        return ArrayHelper.Array_pullUpMethod_groupBy_m5(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array));
                    case "_edge0":
                        return ArrayHelper.Array_pullUpMethod_groupBy__edge0(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array));
                    case "m":
                        return ArrayHelper.Array_pullUpMethod_groupBy_m(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array));
                    case "_edge1":
                        return ArrayHelper.Array_pullUpMethod_groupBy__edge1(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array));
                    default:
                        return null;
                    }
                case "matchAll":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_matchAll_groupBy_c1(GRGEN_ACTIONS.Rule_matchAll.ConvertAsNeeded(array));
                    default:
                        return null;
                    }
                case "InsertHelperEdgesForNestedLayout":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "LinkMethodBodyToContainedEntity":
                    switch(member)
                    {
                    case "mb":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_groupBy_mb(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array));
                    case "e":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_groupBy_e(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array));
                    case "_edge0":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_groupBy__edge0(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array));
                    default:
                        return null;
                    }
                case "LinkMethodBodyToContainedExpressionTransitive":
                    switch(member)
                    {
                    case "mb":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_groupBy_mb(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array));
                    case "e1":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_groupBy_e1(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array));
                    case "e2":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_groupBy_e2(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array));
                    case "_edge0":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_groupBy__edge0(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array));
                    case "_edge1":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_groupBy__edge1(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array));
                    default:
                        return null;
                    }
                case "RemoveMethodBodyContainsBetweenExpressions":
                    switch(member)
                    {
                    case "e1":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_groupBy_e1(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array));
                    case "e2":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_groupBy_e2(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array));
                    case "mbc":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_groupBy_mbc(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array));
                    default:
                        return null;
                    }
                case "RetypeClassContainment":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_RetypeClassContainment_groupBy_c1(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array));
                    case "c2":
                        return ArrayHelper.Array_RetypeClassContainment_groupBy_c2(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array));
                    case "c":
                        return ArrayHelper.Array_RetypeClassContainment_groupBy_c(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array));
                    default:
                        return null;
                    }
                default:
                    return null;
                }
            }
        }

        public override IList ArrayKeepOneForEach(IList array, string member)
        {
            if(array.Count == 0)
                return array;
            string arrayType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array.GetType());
            string arrayValueType = GRGEN_LIBGR.TypesHelper.ExtractSrc(arrayType);
            if(!arrayValueType.StartsWith("match<"))
                return null;
            if(array[0] == null)
                return null;
            if(arrayValueType == "match<>")
                arrayValueType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array[0].GetType());
            if(arrayValueType.StartsWith("match<class "))
            {
                switch(arrayValueType.Substring(12, arrayValueType.Length - 12 - 1))
                {
                default:
                    return null;
                }
            }
            else
            {
                switch(arrayValueType.Substring(6, arrayValueType.Length - 6 - 1))
                {
                case "createProgramGraphExample":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "createProgramGraphPullUp":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "pullUpMethod":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_pullUpMethod_keepOneForEachBy_c1(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array));
                    case "c3":
                        return ArrayHelper.Array_pullUpMethod_keepOneForEachBy_c3(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array));
                    case "b4":
                        return ArrayHelper.Array_pullUpMethod_keepOneForEachBy_b4(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array));
                    case "m5":
                        return ArrayHelper.Array_pullUpMethod_keepOneForEachBy_m5(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array));
                    case "_edge0":
                        return ArrayHelper.Array_pullUpMethod_keepOneForEachBy__edge0(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array));
                    case "m":
                        return ArrayHelper.Array_pullUpMethod_keepOneForEachBy_m(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array));
                    case "_edge1":
                        return ArrayHelper.Array_pullUpMethod_keepOneForEachBy__edge1(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array));
                    default:
                        return null;
                    }
                case "matchAll":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_matchAll_keepOneForEachBy_c1(GRGEN_ACTIONS.Rule_matchAll.ConvertAsNeeded(array));
                    default:
                        return null;
                    }
                case "InsertHelperEdgesForNestedLayout":
                    switch(member)
                    {
                    default:
                        return null;
                    }
                case "LinkMethodBodyToContainedEntity":
                    switch(member)
                    {
                    case "mb":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_keepOneForEachBy_mb(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array));
                    case "e":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_keepOneForEachBy_e(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array));
                    case "_edge0":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_keepOneForEachBy__edge0(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array));
                    default:
                        return null;
                    }
                case "LinkMethodBodyToContainedExpressionTransitive":
                    switch(member)
                    {
                    case "mb":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_keepOneForEachBy_mb(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array));
                    case "e1":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_keepOneForEachBy_e1(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array));
                    case "e2":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_keepOneForEachBy_e2(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array));
                    case "_edge0":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_keepOneForEachBy__edge0(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array));
                    case "_edge1":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_keepOneForEachBy__edge1(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array));
                    default:
                        return null;
                    }
                case "RemoveMethodBodyContainsBetweenExpressions":
                    switch(member)
                    {
                    case "e1":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_keepOneForEachBy_e1(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array));
                    case "e2":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_keepOneForEachBy_e2(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array));
                    case "mbc":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_keepOneForEachBy_mbc(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array));
                    default:
                        return null;
                    }
                case "RetypeClassContainment":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_RetypeClassContainment_keepOneForEachBy_c1(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array));
                    case "c2":
                        return ArrayHelper.Array_RetypeClassContainment_keepOneForEachBy_c2(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array));
                    case "c":
                        return ArrayHelper.Array_RetypeClassContainment_keepOneForEachBy_c(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array));
                    default:
                        return null;
                    }
                default:
                    return null;
                }
            }
        }

        public override int ArrayIndexOfBy(IList array, string member, object value)
        {
            if(array.Count == 0)
                return -1;
            string arrayType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array.GetType());
            string arrayValueType = GRGEN_LIBGR.TypesHelper.ExtractSrc(arrayType);
            if(!arrayValueType.StartsWith("match<"))
                return -1;
            if(array[0] == null)
                return -1;
            if(arrayValueType == "match<>")
                arrayValueType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array[0].GetType());
            if(arrayValueType.StartsWith("match<class "))
            {
                switch(arrayValueType.Substring(12, arrayValueType.Length - 12 - 1))
                {
                default:
                    return -1;
                }
            }
            else
            {
                switch(arrayValueType.Substring(6, arrayValueType.Length - 6 - 1))
                {
                case "createProgramGraphExample":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "createProgramGraphPullUp":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "pullUpMethod":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_pullUpMethod_indexOfBy_c1(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value);
                    case "c3":
                        return ArrayHelper.Array_pullUpMethod_indexOfBy_c3(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value);
                    case "b4":
                        return ArrayHelper.Array_pullUpMethod_indexOfBy_b4(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodBody)value);
                    case "m5":
                        return ArrayHelper.Array_pullUpMethod_indexOfBy_m5(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodSignature)value);
                    case "_edge0":
                        return ArrayHelper.Array_pullUpMethod_indexOfBy__edge0(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value);
                    case "m":
                        return ArrayHelper.Array_pullUpMethod_indexOfBy_m(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value);
                    case "_edge1":
                        return ArrayHelper.Array_pullUpMethod_indexOfBy__edge1(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IbindsTo)value);
                    default:
                        return -1;
                    }
                case "matchAll":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_matchAll_indexOfBy_c1(GRGEN_ACTIONS.Rule_matchAll.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value);
                    default:
                        return -1;
                    }
                case "InsertHelperEdgesForNestedLayout":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "LinkMethodBodyToContainedEntity":
                    switch(member)
                    {
                    case "mb":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_indexOfBy_mb(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodBody)value);
                    case "e":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_indexOfBy_e(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array), (GRGEN_MODEL.IEntity)value);
                    case "_edge0":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_indexOfBy__edge0(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value);
                    default:
                        return -1;
                    }
                case "LinkMethodBodyToContainedExpressionTransitive":
                    switch(member)
                    {
                    case "mb":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy_mb(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodBody)value);
                    case "e1":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy_e1(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value);
                    case "e2":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy_e2(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value);
                    case "_edge0":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy__edge0(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.ImethodBodyContains)value);
                    case "_edge1":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy__edge1(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value);
                    default:
                        return -1;
                    }
                case "RemoveMethodBodyContainsBetweenExpressions":
                    switch(member)
                    {
                    case "e1":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_indexOfBy_e1(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value);
                    case "e2":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_indexOfBy_e2(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value);
                    case "mbc":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_indexOfBy_mbc(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array), (GRGEN_MODEL.ImethodBodyContains)value);
                    default:
                        return -1;
                    }
                case "RetypeClassContainment":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_RetypeClassContainment_indexOfBy_c1(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value);
                    case "c2":
                        return ArrayHelper.Array_RetypeClassContainment_indexOfBy_c2(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value);
                    case "c":
                        return ArrayHelper.Array_RetypeClassContainment_indexOfBy_c(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value);
                    default:
                        return -1;
                    }
                default:
                    return -1;
                }
            }
        }

        public override int ArrayIndexOfBy(IList array, string member, object value, int startIndex)
        {
            if(array.Count == 0)
                return -1;
            string arrayType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array.GetType());
            string arrayValueType = GRGEN_LIBGR.TypesHelper.ExtractSrc(arrayType);
            if(!arrayValueType.StartsWith("match<"))
                return -1;
            if(array[0] == null)
                return -1;
            if(arrayValueType == "match<>")
                arrayValueType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array[0].GetType());
            if(arrayValueType.StartsWith("match<class "))
            {
                switch(arrayValueType.Substring(12, arrayValueType.Length - 12 - 1))
                {
                default:
                    return -1;
                }
            }
            else
            {
                switch(arrayValueType.Substring(6, arrayValueType.Length - 6 - 1))
                {
                case "createProgramGraphExample":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "createProgramGraphPullUp":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "pullUpMethod":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_pullUpMethod_indexOfBy_c1(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value, startIndex);
                    case "c3":
                        return ArrayHelper.Array_pullUpMethod_indexOfBy_c3(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value, startIndex);
                    case "b4":
                        return ArrayHelper.Array_pullUpMethod_indexOfBy_b4(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodBody)value, startIndex);
                    case "m5":
                        return ArrayHelper.Array_pullUpMethod_indexOfBy_m5(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodSignature)value, startIndex);
                    case "_edge0":
                        return ArrayHelper.Array_pullUpMethod_indexOfBy__edge0(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value, startIndex);
                    case "m":
                        return ArrayHelper.Array_pullUpMethod_indexOfBy_m(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value, startIndex);
                    case "_edge1":
                        return ArrayHelper.Array_pullUpMethod_indexOfBy__edge1(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IbindsTo)value, startIndex);
                    default:
                        return -1;
                    }
                case "matchAll":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_matchAll_indexOfBy_c1(GRGEN_ACTIONS.Rule_matchAll.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value, startIndex);
                    default:
                        return -1;
                    }
                case "InsertHelperEdgesForNestedLayout":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "LinkMethodBodyToContainedEntity":
                    switch(member)
                    {
                    case "mb":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_indexOfBy_mb(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodBody)value, startIndex);
                    case "e":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_indexOfBy_e(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array), (GRGEN_MODEL.IEntity)value, startIndex);
                    case "_edge0":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_indexOfBy__edge0(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value, startIndex);
                    default:
                        return -1;
                    }
                case "LinkMethodBodyToContainedExpressionTransitive":
                    switch(member)
                    {
                    case "mb":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy_mb(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodBody)value, startIndex);
                    case "e1":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy_e1(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value, startIndex);
                    case "e2":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy_e2(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value, startIndex);
                    case "_edge0":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy__edge0(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.ImethodBodyContains)value, startIndex);
                    case "_edge1":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_indexOfBy__edge1(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value, startIndex);
                    default:
                        return -1;
                    }
                case "RemoveMethodBodyContainsBetweenExpressions":
                    switch(member)
                    {
                    case "e1":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_indexOfBy_e1(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value, startIndex);
                    case "e2":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_indexOfBy_e2(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value, startIndex);
                    case "mbc":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_indexOfBy_mbc(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array), (GRGEN_MODEL.ImethodBodyContains)value, startIndex);
                    default:
                        return -1;
                    }
                case "RetypeClassContainment":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_RetypeClassContainment_indexOfBy_c1(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value, startIndex);
                    case "c2":
                        return ArrayHelper.Array_RetypeClassContainment_indexOfBy_c2(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value, startIndex);
                    case "c":
                        return ArrayHelper.Array_RetypeClassContainment_indexOfBy_c(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value, startIndex);
                    default:
                        return -1;
                    }
                default:
                    return -1;
                }
            }
        }

        public override int ArrayLastIndexOfBy(IList array, string member, object value)
        {
            if(array.Count == 0)
                return -1;
            string arrayType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array.GetType());
            string arrayValueType = GRGEN_LIBGR.TypesHelper.ExtractSrc(arrayType);
            if(!arrayValueType.StartsWith("match<"))
                return -1;
            if(array[0] == null)
                return -1;
            if(arrayValueType == "match<>")
                arrayValueType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array[0].GetType());
            if(arrayValueType.StartsWith("match<class "))
            {
                switch(arrayValueType.Substring(12, arrayValueType.Length - 12 - 1))
                {
                default:
                    return -1;
                }
            }
            else
            {
                switch(arrayValueType.Substring(6, arrayValueType.Length - 6 - 1))
                {
                case "createProgramGraphExample":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "createProgramGraphPullUp":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "pullUpMethod":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_pullUpMethod_lastIndexOfBy_c1(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value);
                    case "c3":
                        return ArrayHelper.Array_pullUpMethod_lastIndexOfBy_c3(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value);
                    case "b4":
                        return ArrayHelper.Array_pullUpMethod_lastIndexOfBy_b4(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodBody)value);
                    case "m5":
                        return ArrayHelper.Array_pullUpMethod_lastIndexOfBy_m5(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodSignature)value);
                    case "_edge0":
                        return ArrayHelper.Array_pullUpMethod_lastIndexOfBy__edge0(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value);
                    case "m":
                        return ArrayHelper.Array_pullUpMethod_lastIndexOfBy_m(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value);
                    case "_edge1":
                        return ArrayHelper.Array_pullUpMethod_lastIndexOfBy__edge1(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IbindsTo)value);
                    default:
                        return -1;
                    }
                case "matchAll":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_matchAll_lastIndexOfBy_c1(GRGEN_ACTIONS.Rule_matchAll.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value);
                    default:
                        return -1;
                    }
                case "InsertHelperEdgesForNestedLayout":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "LinkMethodBodyToContainedEntity":
                    switch(member)
                    {
                    case "mb":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_lastIndexOfBy_mb(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodBody)value);
                    case "e":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_lastIndexOfBy_e(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array), (GRGEN_MODEL.IEntity)value);
                    case "_edge0":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_lastIndexOfBy__edge0(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value);
                    default:
                        return -1;
                    }
                case "LinkMethodBodyToContainedExpressionTransitive":
                    switch(member)
                    {
                    case "mb":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy_mb(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodBody)value);
                    case "e1":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy_e1(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value);
                    case "e2":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy_e2(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value);
                    case "_edge0":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy__edge0(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.ImethodBodyContains)value);
                    case "_edge1":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy__edge1(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value);
                    default:
                        return -1;
                    }
                case "RemoveMethodBodyContainsBetweenExpressions":
                    switch(member)
                    {
                    case "e1":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_lastIndexOfBy_e1(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value);
                    case "e2":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_lastIndexOfBy_e2(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value);
                    case "mbc":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_lastIndexOfBy_mbc(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array), (GRGEN_MODEL.ImethodBodyContains)value);
                    default:
                        return -1;
                    }
                case "RetypeClassContainment":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_RetypeClassContainment_lastIndexOfBy_c1(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value);
                    case "c2":
                        return ArrayHelper.Array_RetypeClassContainment_lastIndexOfBy_c2(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value);
                    case "c":
                        return ArrayHelper.Array_RetypeClassContainment_lastIndexOfBy_c(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value);
                    default:
                        return -1;
                    }
                default:
                    return -1;
                }
            }
        }

        public override int ArrayLastIndexOfBy(IList array, string member, object value, int startIndex)
        {
            if(array.Count == 0)
                return -1;
            string arrayType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array.GetType());
            string arrayValueType = GRGEN_LIBGR.TypesHelper.ExtractSrc(arrayType);
            if(!arrayValueType.StartsWith("match<"))
                return -1;
            if(array[0] == null)
                return -1;
            if(arrayValueType == "match<>")
                arrayValueType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array[0].GetType());
            if(arrayValueType.StartsWith("match<class "))
            {
                switch(arrayValueType.Substring(12, arrayValueType.Length - 12 - 1))
                {
                default:
                    return -1;
                }
            }
            else
            {
                switch(arrayValueType.Substring(6, arrayValueType.Length - 6 - 1))
                {
                case "createProgramGraphExample":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "createProgramGraphPullUp":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "pullUpMethod":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_pullUpMethod_lastIndexOfBy_c1(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value, startIndex);
                    case "c3":
                        return ArrayHelper.Array_pullUpMethod_lastIndexOfBy_c3(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value, startIndex);
                    case "b4":
                        return ArrayHelper.Array_pullUpMethod_lastIndexOfBy_b4(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodBody)value, startIndex);
                    case "m5":
                        return ArrayHelper.Array_pullUpMethod_lastIndexOfBy_m5(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodSignature)value, startIndex);
                    case "_edge0":
                        return ArrayHelper.Array_pullUpMethod_lastIndexOfBy__edge0(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value, startIndex);
                    case "m":
                        return ArrayHelper.Array_pullUpMethod_lastIndexOfBy_m(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value, startIndex);
                    case "_edge1":
                        return ArrayHelper.Array_pullUpMethod_lastIndexOfBy__edge1(GRGEN_ACTIONS.Rule_pullUpMethod.ConvertAsNeeded(array), (GRGEN_MODEL.IbindsTo)value, startIndex);
                    default:
                        return -1;
                    }
                case "matchAll":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_matchAll_lastIndexOfBy_c1(GRGEN_ACTIONS.Rule_matchAll.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value, startIndex);
                    default:
                        return -1;
                    }
                case "InsertHelperEdgesForNestedLayout":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "LinkMethodBodyToContainedEntity":
                    switch(member)
                    {
                    case "mb":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_lastIndexOfBy_mb(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodBody)value, startIndex);
                    case "e":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_lastIndexOfBy_e(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array), (GRGEN_MODEL.IEntity)value, startIndex);
                    case "_edge0":
                        return ArrayHelper.Array_LinkMethodBodyToContainedEntity_lastIndexOfBy__edge0(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedEntity.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value, startIndex);
                    default:
                        return -1;
                    }
                case "LinkMethodBodyToContainedExpressionTransitive":
                    switch(member)
                    {
                    case "mb":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy_mb(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.IMethodBody)value, startIndex);
                    case "e1":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy_e1(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value, startIndex);
                    case "e2":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy_e2(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value, startIndex);
                    case "_edge0":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy__edge0(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.ImethodBodyContains)value, startIndex);
                    case "_edge1":
                        return ArrayHelper.Array_LinkMethodBodyToContainedExpressionTransitive_lastIndexOfBy__edge1(GRGEN_ACTIONS.Rule_LinkMethodBodyToContainedExpressionTransitive.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value, startIndex);
                    default:
                        return -1;
                    }
                case "RemoveMethodBodyContainsBetweenExpressions":
                    switch(member)
                    {
                    case "e1":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_lastIndexOfBy_e1(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value, startIndex);
                    case "e2":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_lastIndexOfBy_e2(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array), (GRGEN_MODEL.IExpression)value, startIndex);
                    case "mbc":
                        return ArrayHelper.Array_RemoveMethodBodyContainsBetweenExpressions_lastIndexOfBy_mbc(GRGEN_ACTIONS.Rule_RemoveMethodBodyContainsBetweenExpressions.ConvertAsNeeded(array), (GRGEN_MODEL.ImethodBodyContains)value, startIndex);
                    default:
                        return -1;
                    }
                case "RetypeClassContainment":
                    switch(member)
                    {
                    case "c1":
                        return ArrayHelper.Array_RetypeClassContainment_lastIndexOfBy_c1(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value, startIndex);
                    case "c2":
                        return ArrayHelper.Array_RetypeClassContainment_lastIndexOfBy_c2(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array), (GRGEN_MODEL.IClass)value, startIndex);
                    case "c":
                        return ArrayHelper.Array_RetypeClassContainment_lastIndexOfBy_c(GRGEN_ACTIONS.Rule_RetypeClassContainment.ConvertAsNeeded(array), (GRGEN_MODEL.Icontains)value, startIndex);
                    default:
                        return -1;
                    }
                default:
                    return -1;
                }
            }
        }

        public override int ArrayIndexOfOrderedBy(IList array, string member, object value)
        {
            if(array.Count == 0)
                return -1;
            string arrayType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array.GetType());
            string arrayValueType = GRGEN_LIBGR.TypesHelper.ExtractSrc(arrayType);
            if(!arrayValueType.StartsWith("match<"))
                return -1;
            if(array[0] == null)
                return -1;
            if(arrayValueType == "match<>")
                arrayValueType = GRGEN_LIBGR.TypesHelper.DotNetTypeToXgrsType(array[0].GetType());
            if(arrayValueType.StartsWith("match<class "))
            {
                switch(arrayValueType.Substring(12, arrayValueType.Length - 12 - 1))
                {
                default:
                    return -1;
                }
            }
            else
            {
                switch(arrayValueType.Substring(6, arrayValueType.Length - 6 - 1))
                {
                case "createProgramGraphExample":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "createProgramGraphPullUp":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "pullUpMethod":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "matchAll":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "InsertHelperEdgesForNestedLayout":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "LinkMethodBodyToContainedEntity":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "LinkMethodBodyToContainedExpressionTransitive":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "RemoveMethodBodyContainsBetweenExpressions":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                case "RetypeClassContainment":
                    switch(member)
                    {
                    default:
                        return -1;
                    }
                default:
                    return -1;
                }
            }
        }
        public override void FailAssertion() { Debug.Assert(false); }
        public override string ModelMD5Hash { get { return "3e947971465bf83c5691f1c6511014b5"; } }
    }
}