Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/BestSymbolicExpressionTreeAnalyzer.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/BestSymbolicExpressionTreeAnalyzer.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/BestSymbolicExpressionTreeAnalyzer.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/MinAverageMaxSymbolicExpressionTreeLengthAnalyzer.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/MinAverageMaxSymbolicExpressionTreeLengthAnalyzer.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/MinAverageMaxSymbolicExpressionTreeLengthAnalyzer.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionSymbolFrequencyAnalyzer.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionSymbolFrequencyAnalyzer.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionSymbolFrequencyAnalyzer.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionTreeLengthAnalyzer.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionTreeLengthAnalyzer.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionTreeLengthAnalyzer.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionTreeLengthCalculator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionTreeLengthCalculator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionTreeLengthCalculator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentCreater.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentCreater.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentCreater.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentDeleter.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentDeleter.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentDeleter.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentDuplicater.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentDuplicater.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentDuplicater.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/GrammarModifier.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/GrammarModifier.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/GrammarModifier.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineCreater.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineCreater.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineCreater.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDeleter.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDeleter.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDeleter.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDuplicater.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDuplicater.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDuplicater.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SymbolicExpressionTreeArchitectureManipulator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SymbolicExpressionTreeArchitectureManipulator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SymbolicExpressionTreeArchitectureManipulator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/LinearInstruction.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/LinearInstruction.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/LinearInstruction.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeCompiler.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeCompiler.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeCompiler.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeLinearCompiler.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeLinearCompiler.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeLinearCompiler.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -38,6 +38,4 @@
     private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
     private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
-    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
-    private const string ClonedSymbolicExpressionTreeGrammarParameterName = "ClonedSymbolicExpressionTreeGrammar";
 
     #region Parameter Properties
@@ -49,13 +47,4 @@
       get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
     }
-
-    public IValueLookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionTreeGrammarParameter {
-      get { return (IValueLookupParameter<ISymbolicExpressionGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
-    }
-
-    public ILookupParameter<ISymbolicExpressionGrammar> ClonedSymbolicExpressionTreeGrammarParameter {
-      get { return (ILookupParameter<ISymbolicExpressionGrammar>)Parameters[ClonedSymbolicExpressionTreeGrammarParameterName]; }
-    }
-
     #endregion
     #region Properties
@@ -66,8 +55,4 @@
     public IntValue MaximumSymbolicExpressionTreeLength {
       get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
-    }
-
-    public ISymbolicExpressionGrammar ClonedSymbolicExpressionTreeGrammar {
-      get { return ClonedSymbolicExpressionTreeGrammarParameter.ActualValue; }
     }
 
@@ -84,8 +69,4 @@
       Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName,
         "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
-      Parameters.Add(new ValueLookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName,
-        "The tree grammar that defines the correct syntax of symbolic expression trees that should be created."));
-      Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(ClonedSymbolicExpressionTreeGrammarParameterName,
-        "An immutable clone of the concrete grammar that is actually used to create and manipulate trees."));
     }
 
@@ -94,19 +75,7 @@
     }
 
-    public override IOperation InstrumentedApply() {
-      if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) {
-        SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true;
-        IScope globalScope = ExecutionContext.Scope;
-        while (globalScope.Parent != null)
-          globalScope = globalScope.Parent;
-
-        globalScope.Variables.Add(new Variable(ClonedSymbolicExpressionTreeGrammarParameterName,
-          (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone()));
-      }
-      return base.InstrumentedApply();
-    }
 
     protected override ISymbolicExpressionTree Create(IRandom random) {
-      return Create(random, ClonedSymbolicExpressionTreeGrammar, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
+      return Create(random, ClonedSymbolicExpressionTreeGrammarParameter.ActualValue, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
     }
 
@@ -129,9 +98,9 @@
       var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
       if (rootNode.HasLocalParameters) rootNode.ResetLocalParameters(random);
-      rootNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
+      rootNode.SetGrammar(grammar.CreateExpressionTreeGrammar());
 
       var startNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode();
       if (startNode.HasLocalParameters) startNode.ResetLocalParameters(random);
-      startNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
+      startNode.SetGrammar(grammar.CreateExpressionTreeGrammar());
 
       rootNode.AddSubtree(startNode);
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/GrowTreeCreator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/GrowTreeCreator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/GrowTreeCreator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -38,6 +38,4 @@
     private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
     private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
-    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
-    private const string ClonedSymbolicExpressionTreeGrammarParameterName = "ClonedSymbolicExpressionTreeGrammar";
 
     #region Parameter Properties
@@ -48,12 +46,4 @@
     public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
       get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
-    }
-
-    public IValueLookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionTreeGrammarParameter {
-      get { return (IValueLookupParameter<ISymbolicExpressionGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
-    }
-
-    public ILookupParameter<ISymbolicExpressionGrammar> ClonedSymbolicExpressionTreeGrammarParameter {
-      get { return (ILookupParameter<ISymbolicExpressionGrammar>)Parameters[ClonedSymbolicExpressionTreeGrammarParameterName]; }
     }
 
@@ -67,9 +57,4 @@
       get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
     }
-
-    public ISymbolicExpressionGrammar ClonedSymbolicExpressionTreeGrammar {
-      get { return ClonedSymbolicExpressionTreeGrammarParameter.ActualValue; }
-    }
-
     #endregion
 
@@ -84,8 +69,4 @@
       Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName,
         "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
-      Parameters.Add(new ValueLookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName,
-        "The tree grammar that defines the correct syntax of symbolic expression trees that should be created."));
-      Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(ClonedSymbolicExpressionTreeGrammarParameterName,
-        "An immutable clone of the concrete grammar that is actually used to create and manipulate trees."));
     }
 
@@ -94,19 +75,7 @@
     }
 
-    public override IOperation InstrumentedApply() {
-      if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) {
-        SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true;
-        IScope globalScope = ExecutionContext.Scope;
-        while (globalScope.Parent != null)
-          globalScope = globalScope.Parent;
-
-        globalScope.Variables.Add(new Variable(ClonedSymbolicExpressionTreeGrammarParameterName,
-          (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone()));
-      }
-      return base.InstrumentedApply();
-    }
 
     protected override ISymbolicExpressionTree Create(IRandom random) {
-      return Create(random, ClonedSymbolicExpressionTreeGrammar,
+      return Create(random, ClonedSymbolicExpressionTreeGrammarParameter.ActualValue,
         MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
     }
@@ -128,10 +97,11 @@
       var tree = new SymbolicExpressionTree();
       var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
-      rootNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
       if (rootNode.HasLocalParameters) rootNode.ResetLocalParameters(random);
+      rootNode.SetGrammar(grammar.CreateExpressionTreeGrammar());
+
 
       var startNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode();
       if (startNode.HasLocalParameters) startNode.ResetLocalParameters(random);
-      startNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
+      startNode.SetGrammar(grammar.CreateExpressionTreeGrammar());
 
       rootNode.AddSubtree(startNode);
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/ProbabilisticTreeCreator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/ProbabilisticTreeCreator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/ProbabilisticTreeCreator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -39,6 +39,4 @@
     private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
     private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
-    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
-    private const string ClonedSymbolicExpressionTreeGrammarParameterName = "ClonedSymbolicExpressionTreeGrammar";
     #region Parameter Properties
     public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
@@ -47,10 +45,4 @@
     public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
       get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
-    }
-    public IValueLookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionTreeGrammarParameter {
-      get { return (IValueLookupParameter<ISymbolicExpressionGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
-    }
-    public ILookupParameter<ISymbolicExpressionGrammar> ClonedSymbolicExpressionTreeGrammarParameter {
-      get { return (ILookupParameter<ISymbolicExpressionGrammar>)Parameters[ClonedSymbolicExpressionTreeGrammarParameterName]; }
     }
     #endregion
@@ -61,7 +53,4 @@
     public IntValue MaximumSymbolicExpressionTreeDepth {
       get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; }
-    }
-    public ISymbolicExpressionGrammar SymbolicExpressionTreeGrammar {
-      get { return ClonedSymbolicExpressionTreeGrammarParameter.ActualValue; }
     }
     #endregion
@@ -74,6 +63,4 @@
       Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
       Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
-      Parameters.Add(new ValueLookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName, "The tree grammar that defines the correct syntax of symbolic expression trees that should be created."));
-      Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(ClonedSymbolicExpressionTreeGrammarParameterName, "An immutable clone of the concrete grammar that is actually used to create and manipulate trees."));
     }
 
@@ -81,24 +68,8 @@
       return new ProbabilisticTreeCreator(this, cloner);
     }
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      if (!Parameters.ContainsKey(ClonedSymbolicExpressionTreeGrammarParameterName))
-        Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(ClonedSymbolicExpressionTreeGrammarParameterName, "An immutable clone of the concrete grammar that is actually used to create and manipulate trees."));
-    }
-
-    public override IOperation InstrumentedApply() {
-      if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) {
-        SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true;
-        IScope globalScope = ExecutionContext.Scope;
-        while (globalScope.Parent != null)
-          globalScope = globalScope.Parent;
-
-        globalScope.Variables.Add(new Variable(ClonedSymbolicExpressionTreeGrammarParameterName, (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone()));
-      }
-      return base.InstrumentedApply();
-    }
+
 
     protected override ISymbolicExpressionTree Create(IRandom random) {
-      return Create(random, SymbolicExpressionTreeGrammar, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
+      return Create(random, ClonedSymbolicExpressionTreeGrammarParameter.ActualValue, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
     }
 
@@ -111,8 +82,10 @@
       var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
       if (rootNode.HasLocalParameters) rootNode.ResetLocalParameters(random);
-      rootNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
+      rootNode.SetGrammar(grammar.CreateExpressionTreeGrammar());
+
       var startNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode();
-      startNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
       if (startNode.HasLocalParameters) startNode.ResetLocalParameters(random);
+      startNode.SetGrammar(grammar.CreateExpressionTreeGrammar());
+
       rootNode.AddSubtree(startNode);
       PTC2(random, startNode, maxTreeLength, maxTreeDepth);
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/RampedHalfAndHalfTreeCreator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/RampedHalfAndHalfTreeCreator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/RampedHalfAndHalfTreeCreator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -36,6 +36,4 @@
     private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
     private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
-    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
-    private const string ClonedSymbolicExpressionTreeGrammarParameterName = "ClonedSymbolicExpressionTreeGrammar";
 
     #region Parameter Properties
@@ -48,16 +46,4 @@
     }
 
-    public IValueLookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionTreeGrammarParameter {
-      get {
-        return (IValueLookupParameter<ISymbolicExpressionGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName];
-      }
-    }
-
-    public ILookupParameter<ISymbolicExpressionGrammar> ClonedSymbolicExpressionTreeGrammarParameter {
-      get {
-        return (ILookupParameter<ISymbolicExpressionGrammar>)Parameters[ClonedSymbolicExpressionTreeGrammarParameterName];
-      }
-    }
-
     #endregion
     #region Properties
@@ -68,8 +54,4 @@
     public IntValue MaximumSymbolicExpressionTreeLength {
       get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
-    }
-
-    public ISymbolicExpressionGrammar ClonedSymbolicExpressionTreeGrammar {
-      get { return ClonedSymbolicExpressionTreeGrammarParameter.ActualValue; }
     }
     #endregion
@@ -85,8 +67,4 @@
       Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName,
         "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
-      Parameters.Add(new ValueLookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName,
-        "The tree grammar that defines the correct syntax of symbolic expression trees that should be created."));
-      Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(ClonedSymbolicExpressionTreeGrammarParameterName,
-        "An immutable clone of the concrete grammar that is actually used to create and manipulate trees."));
     }
 
@@ -95,19 +73,6 @@
     }
 
-    public override IOperation InstrumentedApply() {
-      if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) {
-        SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true;
-        IScope globalScope = ExecutionContext.Scope;
-        while (globalScope.Parent != null)
-          globalScope = globalScope.Parent;
-
-        globalScope.Variables.Add(new Variable(ClonedSymbolicExpressionTreeGrammarParameterName,
-          (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone()));
-      }
-      return base.InstrumentedApply();
-    }
-
     protected override ISymbolicExpressionTree Create(IRandom random) {
-      return Create(random, ClonedSymbolicExpressionTreeGrammar, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
+      return Create(random, ClonedSymbolicExpressionTreeGrammarParameter.ActualValue, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
     }
 
@@ -129,9 +94,9 @@
       var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
       if (rootNode.HasLocalParameters) rootNode.ResetLocalParameters(random);
-      rootNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
+      rootNode.SetGrammar(grammar.CreateExpressionTreeGrammar());
 
       var startNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode();
       if (startNode.HasLocalParameters) startNode.ResetLocalParameters(random);
-      startNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
+      startNode.SetGrammar(grammar.CreateExpressionTreeGrammar());
 
       rootNode.AddSubtree(startNode);
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/SymbolicExpressionTreeCreator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/SymbolicExpressionTreeCreator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/SymbolicExpressionTreeCreator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -33,17 +33,21 @@
   public abstract class SymbolicExpressionTreeCreator : SymbolicExpressionTreeOperator, ISymbolicExpressionTreeCreator {
     private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
+    private const string ClonedSymbolicExpressionTreeGrammarParameterName = "ClonedSymbolicExpressionTreeGrammar";
+
     #region Parameter Properties
     public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
       get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
     }
+
+    public IValueLookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionTreeGrammarParameter {
+      get { return (IValueLookupParameter<ISymbolicExpressionGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
+    }
+
+    public ILookupParameter<ISymbolicExpressionGrammar> ClonedSymbolicExpressionTreeGrammarParameter {
+      get { return (ILookupParameter<ISymbolicExpressionGrammar>)Parameters[ClonedSymbolicExpressionTreeGrammarParameterName]; }
+    }
     #endregion
 
-    #region Properties
-    public ISymbolicExpressionTree SymbolicExpressionTree {
-      get { return SymbolicExpressionTreeParameter.ActualValue; }
-      set { SymbolicExpressionTreeParameter.ActualValue = value; }
-    }
-
-    #endregion
     [StorableConstructor]
     protected SymbolicExpressionTreeCreator(bool deserializing) : base(deserializing) { }
@@ -52,8 +56,27 @@
       : base() {
       Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree that should be created."));
+      Parameters.Add(new ValueLookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName,
+        "The tree grammar that defines the correct syntax of symbolic expression trees that should be created."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(ClonedSymbolicExpressionTreeGrammarParameterName,
+        "An immutable clone of the concrete grammar that is actually used to create and manipulate trees."));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (!Parameters.ContainsKey(ClonedSymbolicExpressionTreeGrammarParameterName))
+        Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(ClonedSymbolicExpressionTreeGrammarParameterName, "An immutable clone of the concrete grammar that is actually used to create and manipulate trees."));
     }
 
     public override IOperation InstrumentedApply() {
-      SymbolicExpressionTree = Create(Random);
+      if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) {
+        SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true;
+        IScope globalScope = ExecutionContext.Scope;
+        while (globalScope.Parent != null)
+          globalScope = globalScope.Parent;
+
+        globalScope.Variables.Add(new Variable(ClonedSymbolicExpressionTreeGrammarParameterName,
+          (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone()));
+      }
+      SymbolicExpressionTreeParameter.ActualValue = Create(Random);
       return base.InstrumentedApply();
     }
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SubtreeCrossover.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SubtreeCrossover.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SubtreeCrossover.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SymbolicExpressionTreeCrossover.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SymbolicExpressionTreeCrossover.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SymbolicExpressionTreeCrossover.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/CutPoint.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/CutPoint.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/CutPoint.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -23,19 +23,21 @@
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
   public class CutPoint {
-    public ISymbolicExpressionTreeNode Parent { get; set; }
-    public ISymbolicExpressionTreeNode Child { get; set; }
-    private int childIndex;
-    public int ChildIndex {
-      get { return childIndex; }
-    }
-    public CutPoint(ISymbolicExpressionTreeNode parent, ISymbolicExpressionTreeNode child) {
+    public ISymbolicExpressionTreeNode Parent { get; private set; }
+    public ISymbolicExpressionTreeNode Child { get; private set; }
+    private readonly ISymbolicExpressionTreeGrammar grammar;
+
+    public int ChildIndex { get; private set; }
+
+    public CutPoint(ISymbolicExpressionTreeNode parent, ISymbolicExpressionTreeNode child) {      
       this.Parent = parent;
       this.Child = child;
-      this.childIndex = parent.IndexOfSubtree(child);
+      this.ChildIndex = parent.IndexOfSubtree(child);
+      this.grammar = parent.Grammar;
     }
     public CutPoint(ISymbolicExpressionTreeNode parent, int childIndex) {
       this.Parent = parent;
-      this.childIndex = childIndex;
+      this.ChildIndex = childIndex;
       this.Child = null;
+      this.grammar = parent.Grammar;
     }
 
@@ -44,10 +46,10 @@
       if (newChild == null) {
         // make sure that one subtree can be removed and that only the last subtree is removed 
-        return parent.Grammar.GetMinimumSubtreeCount(parent.Symbol) < parent.SubtreeCount &&
+        return grammar.GetMinimumSubtreeCount(parent.Symbol) < parent.SubtreeCount &&
           this.ChildIndex == parent.SubtreeCount - 1;
       } else {
         // check syntax constraints of direct parent - child relation
-        if (!parent.Grammar.ContainsSymbol(newChild.Symbol) ||
-            !parent.Grammar.IsAllowedChildSymbol(parent.Symbol, newChild.Symbol, this.ChildIndex))
+        if (!grammar.ContainsSymbol(newChild.Symbol) ||
+            !grammar.IsAllowedChildSymbol(parent.Symbol, newChild.Symbol, this.ChildIndex))
           return false;
 
@@ -57,7 +59,7 @@
           result =
             result &&
-            parent.Grammar.ContainsSymbol(n.Symbol) &&
-            n.SubtreeCount >= parent.Grammar.GetMinimumSubtreeCount(n.Symbol) &&
-            n.SubtreeCount <= parent.Grammar.GetMaximumSubtreeCount(n.Symbol);
+            grammar.ContainsSymbol(n.Symbol) &&
+            n.SubtreeCount >= grammar.GetMinimumSubtreeCount(n.Symbol) &&
+            n.SubtreeCount <= grammar.GetMaximumSubtreeCount(n.Symbol);
         });
         return result;
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/EnumerableExtensions.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/EnumerableExtensions.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/EnumerableExtensions.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeGraphvizFormatter.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeGraphvizFormatter.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeGraphvizFormatter.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeStringFormatter.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeStringFormatter.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeStringFormatter.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/EmptySymbolicExpressionTreeGrammar.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/EmptySymbolicExpressionTreeGrammar.cs	(revision 11576)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/EmptySymbolicExpressionTreeGrammar.cs	(revision 11576)
@@ -0,0 +1,143 @@
+﻿#region License Information
+
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+
+  [StorableClass]
+  internal sealed class EmptySymbolicExpressionTreeGrammar : NamedItem, ISymbolicExpressionTreeGrammar {
+    [Storable]
+    private ISymbolicExpressionGrammar grammar;
+
+    [StorableConstructor]
+    private EmptySymbolicExpressionTreeGrammar(bool deserializing) : base(deserializing) {}
+    internal EmptySymbolicExpressionTreeGrammar(ISymbolicExpressionGrammar grammar)
+      : base() {
+      if (grammar == null) throw new ArgumentNullException();
+      this.grammar = grammar;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return this;
+    }
+
+    public IEnumerable<ISymbol> Symbols {
+      get { return grammar.Symbols; }
+    }
+    public IEnumerable<ISymbol> AllowedSymbols {
+      get { return grammar.AllowedSymbols; }
+    }
+
+    public ISymbol GetSymbol(string symbolName) {
+      return grammar.GetSymbol(symbolName);
+    }
+
+    public bool ContainsSymbol(ISymbol symbol) {
+      return grammar.ContainsSymbol(symbol);
+    }
+
+    public bool IsAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      return grammar.IsAllowedChildSymbol(parent, child);
+    }
+    public bool IsAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      return grammar.IsAllowedChildSymbol(parent, child, argumentIndex);
+    }
+
+    IEnumerable<ISymbol> ISymbolicExpressionGrammarBase.GetAllowedChildSymbols(ISymbol parent) {
+      return grammar.GetAllowedChildSymbols(parent);
+    }
+
+    IEnumerable<ISymbol> ISymbolicExpressionGrammarBase.GetAllowedChildSymbols(ISymbol parent, int argumentIndex) {
+      return grammar.GetAllowedChildSymbols(parent, argumentIndex);
+    }
+
+    public int GetMinimumSubtreeCount(ISymbol symbol) {
+      return grammar.GetMinimumSubtreeCount(symbol);
+    }
+    public int GetMaximumSubtreeCount(ISymbol symbol) {
+      return grammar.GetMaximumSubtreeCount(symbol);
+    }
+
+    int ISymbolicExpressionGrammarBase.GetMinimumExpressionDepth(ISymbol symbol) {
+      return grammar.GetMinimumExpressionDepth(symbol);
+    }
+    int ISymbolicExpressionGrammarBase.GetMaximumExpressionDepth(ISymbol symbol) {
+      return grammar.GetMaximumExpressionDepth(symbol);
+    }
+    int ISymbolicExpressionGrammarBase.GetMinimumExpressionLength(ISymbol symbol) {
+      return grammar.GetMinimumExpressionLength(symbol);
+    }
+    int ISymbolicExpressionGrammarBase.GetMaximumExpressionLength(ISymbol symbol, int maxDepth) {
+      return grammar.GetMaximumExpressionLength(symbol, maxDepth);
+    }
+
+
+    #region ISymbolicExpressionTreeGrammar Members
+    IEnumerable<ISymbol> ISymbolicExpressionTreeGrammar.ModifyableSymbols {
+      get { return Enumerable.Empty<ISymbol>(); }
+    }
+
+    bool ISymbolicExpressionTreeGrammar.IsModifyableSymbol(ISymbol symbol) {
+      return false;
+    }
+
+    void ISymbolicExpressionTreeGrammar.AddSymbol(ISymbol symbol) {
+      throw new NotSupportedException();
+    }
+
+    void ISymbolicExpressionTreeGrammar.RemoveSymbol(ISymbol symbol) {
+      throw new NotSupportedException();
+    }
+
+    void ISymbolicExpressionTreeGrammar.AddAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      throw new NotSupportedException();
+    }
+
+    void ISymbolicExpressionTreeGrammar.AddAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      throw new NotSupportedException();
+    }
+
+    void ISymbolicExpressionTreeGrammar.RemoveAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      throw new NotSupportedException();
+    }
+
+    void ISymbolicExpressionTreeGrammar.RemoveAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      throw new NotSupportedException();
+    }
+
+    void ISymbolicExpressionTreeGrammar.SetSubtreeCount(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount) {
+      throw new NotSupportedException();
+    }
+    
+    #pragma warning disable 0169 //disable usage warning
+    public event EventHandler Changed;
+    #pragma warning restore 0169
+    #endregion
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/SymbolicExpressionGrammar.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/SymbolicExpressionGrammar.cs	(revision 11576)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/SymbolicExpressionGrammar.cs	(revision 11576)
@@ -0,0 +1,368 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  public abstract class SymbolicExpressionGrammar : SymbolicExpressionGrammarBase, ISymbolicExpressionGrammar {
+    #region fields & properties
+    [Storable(DefaultValue = false)]
+    private bool readOnly;
+    public bool ReadOnly {
+      get { return readOnly; }
+      set {
+        if (readOnly != value) {
+          readOnly = value;
+          OnReadOnlyChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private int minimumFunctionDefinitions;
+    public int MinimumFunctionDefinitions {
+      get { return minimumFunctionDefinitions; }
+      set {
+        minimumFunctionDefinitions = value;
+        UpdateAdfConstraints();
+      }
+    }
+    [Storable]
+    private int maximumFunctionDefinitions;
+    public int MaximumFunctionDefinitions {
+      get { return maximumFunctionDefinitions; }
+      set {
+        maximumFunctionDefinitions = value;
+        UpdateAdfConstraints();
+      }
+    }
+    [Storable]
+    private int minimumFunctionArguments;
+    public int MinimumFunctionArguments {
+      get { return minimumFunctionArguments; }
+      set { minimumFunctionArguments = value; }
+    }
+    [Storable]
+    private int maximumFunctionArguments;
+    public int MaximumFunctionArguments {
+      get { return maximumFunctionArguments; }
+      set { maximumFunctionArguments = value; }
+    }
+
+    private ProgramRootSymbol programRootSymbol;
+    public ProgramRootSymbol ProgramRootSymbol {
+      get { return programRootSymbol; }
+    }
+    ISymbol ISymbolicExpressionGrammar.ProgramRootSymbol {
+      get { return ProgramRootSymbol; }
+    }
+    [Storable(Name = "ProgramRootSymbol")]
+    private ISymbol StorableProgramRootSymbol {
+      get { return programRootSymbol; }
+      set { programRootSymbol = (ProgramRootSymbol)value; }
+    }
+
+    private StartSymbol startSymbol;
+    public StartSymbol StartSymbol {
+      get { return startSymbol; }
+    }
+    ISymbol ISymbolicExpressionGrammar.StartSymbol {
+      get { return StartSymbol; }
+    }
+    [Storable(Name = "StartSymbol")]
+    private ISymbol StorableStartSymbol {
+      get { return startSymbol; }
+      set { startSymbol = (StartSymbol)value; }
+    }
+
+    private Defun defunSymbol;
+    protected Defun DefunSymbol {
+      get { return defunSymbol; }
+    }
+    [Storable(Name = "DefunSymbol")]
+    private ISymbol StorableDefunSymbol {
+      get { return defunSymbol; }
+      set { defunSymbol = (Defun)value; }
+    }
+
+    private readonly ISymbolicExpressionTreeGrammar emptyGrammar;
+    #endregion
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      foreach (ISymbol symbol in symbols.Values)
+        RegisterSymbolEvents(symbol);
+    }
+
+    [StorableConstructor]
+    protected SymbolicExpressionGrammar(bool deserializing)
+      : base(deserializing) {
+      emptyGrammar = new EmptySymbolicExpressionTreeGrammar(this);
+    }
+    protected SymbolicExpressionGrammar(SymbolicExpressionGrammar original, Cloner cloner)
+      : base(original, cloner) {
+      emptyGrammar = new EmptySymbolicExpressionTreeGrammar(this);
+
+      foreach (ISymbol symbol in symbols.Values)
+        RegisterSymbolEvents(symbol);
+
+      programRootSymbol = cloner.Clone(original.programRootSymbol);
+      startSymbol = cloner.Clone(original.StartSymbol);
+      defunSymbol = cloner.Clone(original.defunSymbol);
+
+      maximumFunctionArguments = original.maximumFunctionArguments;
+      minimumFunctionArguments = original.minimumFunctionArguments;
+      maximumFunctionDefinitions = original.maximumFunctionDefinitions;
+      minimumFunctionDefinitions = original.minimumFunctionDefinitions;
+    }
+
+    protected SymbolicExpressionGrammar(string name, string description)
+      : base(name, description) {
+      emptyGrammar = new EmptySymbolicExpressionTreeGrammar(this);
+
+      programRootSymbol = new ProgramRootSymbol();
+      AddSymbol(programRootSymbol);
+      SetSubtreeCount(programRootSymbol, 1, 1);
+
+      startSymbol = new StartSymbol();
+      AddSymbol(startSymbol);
+      SetSubtreeCount(startSymbol, 1, 1);
+
+      defunSymbol = new Defun();
+      AddSymbol(defunSymbol);
+      SetSubtreeCount(defunSymbol, 1, 1);
+
+      AddAllowedChildSymbol(programRootSymbol, startSymbol, 0);
+      UpdateAdfConstraints();
+    }
+
+    private void UpdateAdfConstraints() {
+      SetSubtreeCount(programRootSymbol, minimumFunctionDefinitions + 1, maximumFunctionDefinitions + 1);
+
+      // ADF branches maxFunctionDefinitions 
+      for (int argumentIndex = 1; argumentIndex < maximumFunctionDefinitions + 1; argumentIndex++) {
+        RemoveAllowedChildSymbol(programRootSymbol, defunSymbol, argumentIndex);
+        AddAllowedChildSymbol(programRootSymbol, defunSymbol, argumentIndex);
+      }
+    }
+
+    public ISymbolicExpressionTreeGrammar CreateExpressionTreeGrammar() {
+      if (MaximumFunctionDefinitions == 0) return emptyGrammar;
+      else return new SymbolicExpressionTreeGrammar(this);
+    }
+
+    protected override sealed void AddSymbol(ISymbol symbol) {
+      base.AddSymbol(symbol);
+      RegisterSymbolEvents(symbol);
+      OnChanged();
+    }
+    protected override sealed void RemoveSymbol(ISymbol symbol) {
+      DeregisterSymbolEvents(symbol);
+      base.RemoveSymbol(symbol);
+      OnChanged();
+    }
+
+    public event EventHandler ReadOnlyChanged;
+    protected virtual void OnReadOnlyChanged() {
+      var handler = ReadOnlyChanged;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+
+    #region IStatefulItem methods
+    void IStatefulItem.InitializeState() {
+      ReadOnly = false;
+    }
+    void IStatefulItem.ClearState() {
+      ReadOnly = false;
+    }
+    #endregion
+
+    #region ISymbolicExpressionGrammar methods
+    void ISymbolicExpressionGrammar.AddSymbol(ISymbol symbol) {
+      if (ReadOnly) throw new InvalidOperationException();
+      AddSymbol(symbol);
+    }
+    void ISymbolicExpressionGrammar.RemoveSymbol(ISymbol symbol) {
+      if (ReadOnly) throw new InvalidOperationException();
+      RemoveSymbol(symbol);
+    }
+
+    void ISymbolicExpressionGrammar.AddAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      if (ReadOnly) throw new InvalidOperationException();
+      base.AddAllowedChildSymbol(parent, child);
+    }
+    void ISymbolicExpressionGrammar.AddAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      if (ReadOnly) throw new InvalidOperationException();
+      base.AddAllowedChildSymbol(parent, child, argumentIndex);
+    }
+    void ISymbolicExpressionGrammar.RemoveAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      if (ReadOnly) throw new InvalidOperationException();
+      base.RemoveAllowedChildSymbol(parent, child);
+    }
+    void ISymbolicExpressionGrammar.RemoveAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      if (ReadOnly) throw new InvalidOperationException();
+      base.RemoveAllowedChildSymbol(parent, child, argumentIndex);
+    }
+
+    void ISymbolicExpressionGrammar.SetSubtreeCount(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount) {
+      if (ReadOnly) throw new InvalidOperationException();
+      base.SetSubtreeCount(symbol, minimumSubtreeCount, maximumSubtreeCount);
+    }
+
+    private bool suppressEvents = false;
+    void ISymbolicExpressionGrammar.StartGrammarManipulation() {
+      suppressEvents = true;
+    }
+    void ISymbolicExpressionGrammar.FinishedGrammarManipulation() {
+      suppressEvents = false;
+      OnChanged();
+    }
+
+    protected override void OnChanged() {
+      if (suppressEvents) return;
+      base.OnChanged();
+    }
+    #endregion
+
+    #region symbol events
+    private void RegisterSymbolEvents(ISymbol symbol) {
+      foreach (var s in symbol.Flatten()) {
+        s.NameChanging += new EventHandler<CancelEventArgs<string>>(Symbol_NameChanging);
+        s.NameChanged += new EventHandler(Symbol_NameChanged);
+
+        var groupSymbol = s as GroupSymbol;
+        if (groupSymbol != null) RegisterGroupSymbolEvents(groupSymbol);
+        else s.Changed += new EventHandler(Symbol_Changed);
+      }
+    }
+    private void DeregisterSymbolEvents(ISymbol symbol) {
+      foreach (var s in symbol.Flatten()) {
+        s.NameChanging -= new EventHandler<CancelEventArgs<string>>(Symbol_NameChanging);
+        s.NameChanged -= new EventHandler(Symbol_NameChanged);
+
+        var groupSymbol = s as GroupSymbol;
+        if (groupSymbol != null) DeregisterGroupSymbolEvents(groupSymbol);
+        else s.Changed -= new EventHandler(Symbol_Changed);
+      }
+    }
+
+    private void RegisterGroupSymbolEvents(GroupSymbol groupSymbol) {
+      groupSymbol.Changed += new EventHandler(GroupSymbol_Changed);
+      groupSymbol.SymbolsCollection.ItemsAdded += new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_ItemsAdded);
+      groupSymbol.SymbolsCollection.ItemsRemoved += new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_ItemsRemoved);
+      groupSymbol.SymbolsCollection.CollectionReset += new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_CollectionReset);
+    }
+    private void DeregisterGroupSymbolEvents(GroupSymbol groupSymbol) {
+      groupSymbol.Changed -= new EventHandler(GroupSymbol_Changed);
+      groupSymbol.SymbolsCollection.ItemsAdded -= new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_ItemsAdded);
+      groupSymbol.SymbolsCollection.ItemsRemoved -= new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_ItemsRemoved);
+      groupSymbol.SymbolsCollection.CollectionReset -= new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_CollectionReset);
+    }
+
+    private void Symbol_Changed(object sender, EventArgs e) {
+      ClearCaches();
+      OnChanged();
+    }
+
+    private void GroupSymbol_Changed(object sender, EventArgs e) {
+      GroupSymbol groupSymbol = (GroupSymbol)sender;
+      foreach (ISymbol symbol in groupSymbol.Flatten())
+        symbol.Enabled = groupSymbol.Enabled;
+
+      ClearCaches();
+      OnChanged();
+    }
+
+    private void Symbol_NameChanging(object sender, CancelEventArgs<string> e) {
+      if (symbols.ContainsKey(e.Value)) e.Cancel = true;
+    }
+    private void Symbol_NameChanged(object sender, EventArgs e) {
+      ISymbol symbol = (ISymbol)sender;
+      string oldName = symbols.Where(x => x.Value == symbol).First().Key;
+      string newName = symbol.Name;
+
+      symbols.Remove(oldName);
+      symbols.Add(newName, symbol);
+
+      var subtreeCount = symbolSubtreeCount[oldName];
+      symbolSubtreeCount.Remove(oldName);
+      symbolSubtreeCount.Add(newName, subtreeCount);
+
+      List<string> allowedChilds;
+      if (allowedChildSymbols.TryGetValue(oldName, out allowedChilds)) {
+        allowedChildSymbols.Remove(oldName);
+        allowedChildSymbols.Add(newName, allowedChilds);
+      }
+
+      for (int i = 0; i < GetMaximumSubtreeCount(symbol); i++) {
+        if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(oldName, i), out allowedChilds)) {
+          allowedChildSymbolsPerIndex.Remove(Tuple.Create(oldName, i));
+          allowedChildSymbolsPerIndex.Add(Tuple.Create(newName, i), allowedChilds);
+        }
+      }
+
+      foreach (var parent in Symbols) {
+        if (allowedChildSymbols.TryGetValue(parent.Name, out allowedChilds))
+          if (allowedChilds.Remove(oldName))
+            allowedChilds.Add(newName);
+
+        for (int i = 0; i < GetMaximumSubtreeCount(parent); i++) {
+          if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(parent.Name, i), out allowedChilds))
+            if (allowedChilds.Remove(oldName)) allowedChilds.Add(newName);
+        }
+      }
+
+      ClearCaches();
+      OnChanged();
+    }
+
+    private void GroupSymbol_ItemsAdded(object sender, CollectionItemsChangedEventArgs<ISymbol> e) {
+      foreach (ISymbol symbol in e.Items)
+        if (!ContainsSymbol(symbol))
+          AddSymbol(symbol);
+      OnChanged();
+    }
+    private void GroupSymbol_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<ISymbol> e) {
+      foreach (ISymbol symbol in e.Items)
+        if (ContainsSymbol(symbol))
+          RemoveSymbol(symbol);
+      OnChanged();
+    }
+    private void GroupSymbol_CollectionReset(object sender, CollectionItemsChangedEventArgs<ISymbol> e) {
+      foreach (ISymbol symbol in e.Items)
+        if (!ContainsSymbol(symbol))
+          AddSymbol(symbol);
+      foreach (ISymbol symbol in e.OldItems)
+        if (ContainsSymbol(symbol))
+          RemoveSymbol(symbol);
+      OnChanged();
+    }
+    #endregion
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/SymbolicExpressionGrammarBase.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/SymbolicExpressionGrammarBase.cs	(revision 11576)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/SymbolicExpressionGrammarBase.cs	(revision 11576)
@@ -0,0 +1,515 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// The default symbolic expression grammar stores symbols and syntactic constraints for symbols.
+  /// Symbols are treated as equvivalent if they have the same name.
+  /// Syntactic constraints limit the number of allowed sub trees for a node with a symbol and which symbols are allowed 
+  /// in the sub-trees of a symbol (can be specified for each sub-tree index separately).
+  /// </summary>
+  [StorableClass]
+  public abstract class SymbolicExpressionGrammarBase : NamedItem, ISymbolicExpressionGrammarBase {
+
+    #region properties for separation between implementation and persistence
+    [Storable(Name = "Symbols")]
+    private IEnumerable<ISymbol> StorableSymbols {
+      get { return symbols.Values.ToArray(); }
+      set { symbols = value.ToDictionary(sym => sym.Name); }
+    }
+
+    [Storable(Name = "SymbolSubtreeCount")]
+    private IEnumerable<KeyValuePair<ISymbol, Tuple<int, int>>> StorableSymbolSubtreeCount {
+      get { return symbolSubtreeCount.Select(x => new KeyValuePair<ISymbol, Tuple<int, int>>(GetSymbol(x.Key), x.Value)).ToArray(); }
+      set { symbolSubtreeCount = value.ToDictionary(x => x.Key.Name, x => x.Value); }
+    }
+
+    [Storable(Name = "AllowedChildSymbols")]
+    private IEnumerable<KeyValuePair<ISymbol, IEnumerable<ISymbol>>> StorableAllowedChildSymbols {
+      get { return allowedChildSymbols.Select(x => new KeyValuePair<ISymbol, IEnumerable<ISymbol>>(GetSymbol(x.Key), x.Value.Select(GetSymbol).ToArray())).ToArray(); }
+      set { allowedChildSymbols = value.ToDictionary(x => x.Key.Name, x => x.Value.Select(y => y.Name).ToList()); }
+    }
+
+    [Storable(Name = "AllowedChildSymbolsPerIndex")]
+    private IEnumerable<KeyValuePair<Tuple<ISymbol, int>, IEnumerable<ISymbol>>> StorableAllowedChildSymbolsPerIndex {
+      get { return allowedChildSymbolsPerIndex.Select(x => new KeyValuePair<Tuple<ISymbol, int>, IEnumerable<ISymbol>>(Tuple.Create<ISymbol, int>(GetSymbol(x.Key.Item1), x.Key.Item2), x.Value.Select(y => GetSymbol(y)).ToArray())).ToArray(); }
+      set { allowedChildSymbolsPerIndex = value.ToDictionary(x => Tuple.Create(x.Key.Item1.Name, x.Key.Item2), x => x.Value.Select(y => y.Name).ToList()); }
+    }
+    #endregion
+
+    private bool suppressEvents;
+    protected Dictionary<string, ISymbol> symbols;
+    protected Dictionary<string, Tuple<int, int>> symbolSubtreeCount;
+    protected Dictionary<string, List<string>> allowedChildSymbols;
+    protected Dictionary<Tuple<string, int>, List<string>> allowedChildSymbolsPerIndex;
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    [StorableConstructor]
+    protected SymbolicExpressionGrammarBase(bool deserializing)
+      : base(deserializing) {
+      cachedMinExpressionLength = new Dictionary<string, int>();
+      cachedMaxExpressionLength = new Dictionary<Tuple<string, int>, int>();
+      cachedMinExpressionDepth = new Dictionary<string, int>();
+      cachedMaxExpressionDepth = new Dictionary<string, int>();
+
+      cachedIsAllowedChildSymbol = new Dictionary<Tuple<string, string>, bool>();
+      cachedIsAllowedChildSymbolIndex = new Dictionary<Tuple<string, string, int>, bool>();
+
+      suppressEvents = false;
+    }
+
+    protected SymbolicExpressionGrammarBase(SymbolicExpressionGrammarBase original, Cloner cloner)
+      : base(original, cloner) {
+      cachedMinExpressionLength = new Dictionary<string, int>();
+      cachedMaxExpressionLength = new Dictionary<Tuple<string, int>, int>();
+      cachedMinExpressionDepth = new Dictionary<string, int>();
+      cachedMaxExpressionDepth = new Dictionary<string, int>();
+
+      cachedIsAllowedChildSymbol = new Dictionary<Tuple<string, string>, bool>();
+      cachedIsAllowedChildSymbolIndex = new Dictionary<Tuple<string, string, int>, bool>();
+
+      symbols = original.symbols.ToDictionary(x => x.Key, y => cloner.Clone(y.Value));
+      symbolSubtreeCount = new Dictionary<string, Tuple<int, int>>(original.symbolSubtreeCount);
+
+      allowedChildSymbols = new Dictionary<string, List<string>>();
+      foreach (var element in original.allowedChildSymbols)
+        allowedChildSymbols.Add(element.Key, new List<string>(element.Value));
+
+      allowedChildSymbolsPerIndex = new Dictionary<Tuple<string, int>, List<string>>();
+      foreach (var element in original.allowedChildSymbolsPerIndex)
+        allowedChildSymbolsPerIndex.Add(element.Key, new List<string>(element.Value));
+
+      suppressEvents = false;
+    }
+
+    protected SymbolicExpressionGrammarBase(string name, string description)
+      : base(name, description) {
+      cachedMinExpressionLength = new Dictionary<string, int>();
+      cachedMaxExpressionLength = new Dictionary<Tuple<string, int>, int>();
+      cachedMinExpressionDepth = new Dictionary<string, int>();
+      cachedMaxExpressionDepth = new Dictionary<string, int>();
+
+      cachedIsAllowedChildSymbol = new Dictionary<Tuple<string, string>, bool>();
+      cachedIsAllowedChildSymbolIndex = new Dictionary<Tuple<string, string, int>, bool>();
+
+      symbols = new Dictionary<string, ISymbol>();
+      symbolSubtreeCount = new Dictionary<string, Tuple<int, int>>();
+      allowedChildSymbols = new Dictionary<string, List<string>>();
+      allowedChildSymbolsPerIndex = new Dictionary<Tuple<string, int>, List<string>>();
+
+      suppressEvents = false;
+    }
+
+    #region protected grammar manipulation methods
+    protected virtual void AddSymbol(ISymbol symbol) {
+      if (ContainsSymbol(symbol)) throw new ArgumentException("Symbol " + symbol + " is already defined.");
+      foreach (var s in symbol.Flatten()) {
+        symbols.Add(s.Name, s);
+        int maxSubTreeCount = Math.Min(s.MinimumArity + 1, s.MaximumArity);
+        symbolSubtreeCount.Add(s.Name, Tuple.Create(s.MinimumArity, maxSubTreeCount));
+      }
+      ClearCaches();
+    }
+
+    protected virtual void RemoveSymbol(ISymbol symbol) {
+      foreach (var s in symbol.Flatten()) {
+        symbols.Remove(s.Name);
+        allowedChildSymbols.Remove(s.Name);
+        for (int i = 0; i < GetMaximumSubtreeCount(s); i++)
+          allowedChildSymbolsPerIndex.Remove(Tuple.Create(s.Name, i));
+        symbolSubtreeCount.Remove(s.Name);
+
+        foreach (var parent in Symbols) {
+          List<string> allowedChilds;
+          if (allowedChildSymbols.TryGetValue(parent.Name, out allowedChilds))
+            allowedChilds.Remove(s.Name);
+
+          for (int i = 0; i < GetMaximumSubtreeCount(parent); i++) {
+            if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(parent.Name, i), out allowedChilds))
+              allowedChilds.Remove(s.Name);
+          }
+        }
+        suppressEvents = true;
+        foreach (var groupSymbol in Symbols.OfType<GroupSymbol>())
+          groupSymbol.SymbolsCollection.Remove(symbol);
+        suppressEvents = false;
+      }
+      ClearCaches();
+    }
+
+    public virtual ISymbol GetSymbol(string symbolName) {
+      ISymbol symbol;
+      if (symbols.TryGetValue(symbolName, out symbol)) return symbol;
+      return null;
+    }
+
+    protected void AddAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      bool changed = false;
+
+      foreach (ISymbol p in parent.Flatten().Where(p => !(p is GroupSymbol)))
+        changed |= AddAllowedChildSymbolToDictionaries(p, child);
+
+      if (changed) {
+        ClearCaches();
+        OnChanged();
+      }
+    }
+
+    private bool AddAllowedChildSymbolToDictionaries(ISymbol parent, ISymbol child) {
+      List<string> childSymbols;
+      if (!allowedChildSymbols.TryGetValue(parent.Name, out childSymbols)) {
+        childSymbols = new List<string>();
+        allowedChildSymbols.Add(parent.Name, childSymbols);
+      }
+      if (childSymbols.Contains(child.Name)) return false;
+
+      suppressEvents = true;
+      for (int argumentIndex = 0; argumentIndex < GetMaximumSubtreeCount(parent); argumentIndex++)
+        RemoveAllowedChildSymbol(parent, child, argumentIndex);
+      suppressEvents = false;
+
+      childSymbols.Add(child.Name);
+      return true;
+    }
+
+    protected void AddAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      bool changed = false;
+
+      foreach (ISymbol p in parent.Flatten().Where(p => !(p is GroupSymbol)))
+        changed |= AddAllowedChildSymbolToDictionaries(p, child, argumentIndex);
+
+      if (changed) {
+        ClearCaches();
+        OnChanged();
+      }
+    }
+
+
+    private bool AddAllowedChildSymbolToDictionaries(ISymbol parent, ISymbol child, int argumentIndex) {
+      List<string> childSymbols;
+      if (!allowedChildSymbols.TryGetValue(parent.Name, out childSymbols)) {
+        childSymbols = new List<string>();
+        allowedChildSymbols.Add(parent.Name, childSymbols);
+      }
+      if (childSymbols.Contains(child.Name)) return false;
+
+
+      var key = Tuple.Create(parent.Name, argumentIndex);
+      if (!allowedChildSymbolsPerIndex.TryGetValue(key, out childSymbols)) {
+        childSymbols = new List<string>();
+        allowedChildSymbolsPerIndex.Add(key, childSymbols);
+      }
+
+      if (childSymbols.Contains(child.Name)) return false;
+
+      childSymbols.Add(child.Name);
+      return true;
+    }
+
+    protected void RemoveAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      bool changed = false;
+      List<string> childSymbols;
+      if (allowedChildSymbols.TryGetValue(child.Name, out childSymbols)) {
+        changed |= childSymbols.Remove(child.Name);
+      }
+
+      for (int argumentIndex = 0; argumentIndex < GetMaximumSubtreeCount(parent); argumentIndex++) {
+        var key = Tuple.Create(parent.Name, argumentIndex);
+        if (allowedChildSymbolsPerIndex.TryGetValue(key, out childSymbols))
+          changed |= childSymbols.Remove(child.Name);
+      }
+
+      if (changed) {
+        ClearCaches();
+        OnChanged();
+      }
+    }
+
+    protected void RemoveAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      bool changed = false;
+
+      suppressEvents = true;
+      List<string> childSymbols;
+      if (allowedChildSymbols.TryGetValue(parent.Name, out childSymbols)) {
+        if (childSymbols.Remove(child.Name)) {
+          for (int i = 0; i < GetMaximumSubtreeCount(parent); i++) {
+            if (i != argumentIndex) AddAllowedChildSymbol(parent, child, i);
+          }
+          changed = true;
+        }
+      }
+      suppressEvents = false;
+
+      var key = Tuple.Create(parent.Name, argumentIndex);
+      if (allowedChildSymbolsPerIndex.TryGetValue(key, out childSymbols))
+        changed |= childSymbols.Remove(child.Name);
+
+      if (changed) {
+        ClearCaches();
+        OnChanged();
+      }
+    }
+
+    protected void SetSubtreeCount(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount) {
+      var symbols = symbol.Flatten().Where(s => !(s is GroupSymbol));
+      if (symbols.Any(s => s.MinimumArity > minimumSubtreeCount)) throw new ArgumentException("Invalid minimum subtree count " + minimumSubtreeCount + " for " + symbol);
+      if (symbols.Any(s => s.MaximumArity < maximumSubtreeCount)) throw new ArgumentException("Invalid maximum subtree count " + maximumSubtreeCount + " for " + symbol);
+
+      foreach (ISymbol s in symbols)
+        SetSubTreeCountInDictionaries(s, minimumSubtreeCount, maximumSubtreeCount);
+
+      ClearCaches();
+      OnChanged();
+    }
+
+    private void SetSubTreeCountInDictionaries(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount) {
+      for (int i = maximumSubtreeCount; i < GetMaximumSubtreeCount(symbol); i++) {
+        var key = Tuple.Create(symbol.Name, i);
+        allowedChildSymbolsPerIndex.Remove(key);
+      }
+
+      symbolSubtreeCount[symbol.Name] = Tuple.Create(minimumSubtreeCount, maximumSubtreeCount);
+    }
+    #endregion
+
+    public virtual IEnumerable<ISymbol> Symbols {
+      get { return symbols.Values; }
+    }
+    public virtual IEnumerable<ISymbol> AllowedSymbols {
+      get { foreach (var s in Symbols) if (s.Enabled) yield return s; }
+    }
+    public virtual bool ContainsSymbol(ISymbol symbol) {
+      return symbols.ContainsKey(symbol.Name);
+    }
+
+    private readonly Dictionary<Tuple<string, string>, bool> cachedIsAllowedChildSymbol;
+    public virtual bool IsAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      if (allowedChildSymbols.Count == 0) return false;
+      if (!child.Enabled) return false;
+
+      bool result;
+      var key = Tuple.Create(parent.Name, child.Name);
+      if (cachedIsAllowedChildSymbol.TryGetValue(key, out result)) return result;
+
+      // value has to be calculated and cached make sure this is done in only one thread
+      lock (cachedIsAllowedChildSymbol) {
+        // in case the value has been calculated on another thread in the meanwhile
+        if (cachedIsAllowedChildSymbol.TryGetValue(key, out result)) return result;
+
+        List<string> temp;
+        if (allowedChildSymbols.TryGetValue(parent.Name, out temp)) {
+          if (temp.SelectMany(s => GetSymbol(s).Flatten()).Any(s => s.Name == child.Name)) {
+            cachedIsAllowedChildSymbol.Add(key, true);
+            return true;
+          }
+        }
+        cachedIsAllowedChildSymbol.Add(key, false);
+        return false;
+      }
+    }
+
+    private readonly Dictionary<Tuple<string, string, int>, bool> cachedIsAllowedChildSymbolIndex;
+    public virtual bool IsAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      if (!child.Enabled) return false;
+      if (IsAllowedChildSymbol(parent, child)) return true;
+      if (allowedChildSymbolsPerIndex.Count == 0) return false;
+
+      bool result;
+      var key = Tuple.Create(parent.Name, child.Name, argumentIndex);
+      if (cachedIsAllowedChildSymbolIndex.TryGetValue(key, out result)) return result;
+
+      // value has to be calculated and cached make sure this is done in only one thread
+      lock (cachedIsAllowedChildSymbolIndex) {
+        // in case the value has been calculated on another thread in the meanwhile
+        if (cachedIsAllowedChildSymbolIndex.TryGetValue(key, out result)) return result;
+
+        List<string> temp;
+        if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(parent.Name, argumentIndex), out temp)) {
+          if (temp.SelectMany(s => GetSymbol(s).Flatten()).Any(s => s.Name == child.Name)) {
+            cachedIsAllowedChildSymbolIndex.Add(key, true);
+            return true;
+          }
+        }
+        cachedIsAllowedChildSymbolIndex.Add(key, false);
+        return false;
+      }
+    }
+
+    public IEnumerable<ISymbol> GetAllowedChildSymbols(ISymbol parent) {
+      foreach (ISymbol child in AllowedSymbols) {
+        if (IsAllowedChildSymbol(parent, child)) yield return child;
+      }
+    }
+
+    public IEnumerable<ISymbol> GetAllowedChildSymbols(ISymbol parent, int argumentIndex) {
+      foreach (ISymbol child in AllowedSymbols) {
+        if (IsAllowedChildSymbol(parent, child, argumentIndex)) yield return child;
+      }
+    }
+
+    public virtual int GetMinimumSubtreeCount(ISymbol symbol) {
+      return symbolSubtreeCount[symbol.Name].Item1;
+    }
+    public virtual int GetMaximumSubtreeCount(ISymbol symbol) {
+      return symbolSubtreeCount[symbol.Name].Item2;
+    }
+
+    protected void ClearCaches() {
+      cachedMinExpressionLength.Clear();
+      cachedMaxExpressionLength.Clear();
+      cachedMinExpressionDepth.Clear();
+      cachedMaxExpressionDepth.Clear();
+
+      cachedIsAllowedChildSymbol.Clear();
+      cachedIsAllowedChildSymbolIndex.Clear();
+    }
+
+    private readonly Dictionary<string, int> cachedMinExpressionLength;
+    public int GetMinimumExpressionLength(ISymbol symbol) {
+      int res;
+      if (cachedMinExpressionLength.TryGetValue(symbol.Name, out res))
+        return res;
+
+      // value has to be calculated and cached make sure this is done in only one thread
+      lock (cachedMinExpressionLength) {
+        // in case the value has been calculated on another thread in the meanwhile
+        if (cachedMinExpressionLength.TryGetValue(symbol.Name, out res)) return res;
+
+        res = GetMinimumExpressionLengthRec(symbol);
+        foreach (var entry in cachedMinExpressionLength.Where(e => e.Value >= int.MaxValue).ToList()) {
+          if (entry.Key != symbol.Name) cachedMinExpressionLength.Remove(entry.Key);
+        }
+        return res;
+      }
+    }
+
+    private int GetMinimumExpressionLengthRec(ISymbol symbol) {
+      int temp;
+      if (!cachedMinExpressionLength.TryGetValue(symbol.Name, out temp)) {
+        cachedMinExpressionLength[symbol.Name] = int.MaxValue; // prevent infinite recursion
+        long sumOfMinExpressionLengths = 1 + (from argIndex in Enumerable.Range(0, GetMinimumSubtreeCount(symbol))
+                                              let minForSlot = (long)(from s in GetAllowedChildSymbols(symbol, argIndex)
+                                                                      where s.InitialFrequency > 0.0
+                                                                      select GetMinimumExpressionLengthRec(s)).DefaultIfEmpty(0).Min()
+                                              select minForSlot).DefaultIfEmpty(0).Sum();
+
+        cachedMinExpressionLength[symbol.Name] = (int)Math.Min(sumOfMinExpressionLengths, int.MaxValue);
+        return cachedMinExpressionLength[symbol.Name];
+      }
+      return temp;
+    }
+
+    private readonly Dictionary<Tuple<string, int>, int> cachedMaxExpressionLength;
+    public int GetMaximumExpressionLength(ISymbol symbol, int maxDepth) {
+      int temp;
+      var key = Tuple.Create(symbol.Name, maxDepth);
+      if (cachedMaxExpressionLength.TryGetValue(key, out temp)) return temp;
+      // value has to be calculated and cached make sure this is done in only one thread
+      lock (cachedMaxExpressionLength) {
+        // in case the value has been calculated on another thread in the meanwhile
+        if (cachedMaxExpressionLength.TryGetValue(key, out temp)) return temp;
+
+        cachedMaxExpressionLength[key] = int.MaxValue; // prevent infinite recursion
+        long sumOfMaxTrees = 1 + (from argIndex in Enumerable.Range(0, GetMaximumSubtreeCount(symbol))
+                                  let maxForSlot = (long)(from s in GetAllowedChildSymbols(symbol, argIndex)
+                                                          where s.InitialFrequency > 0.0
+                                                          where GetMinimumExpressionDepth(s) < maxDepth
+                                                          select GetMaximumExpressionLength(s, maxDepth - 1)).DefaultIfEmpty(0).Max()
+                                  select maxForSlot).DefaultIfEmpty(0).Sum();
+        cachedMaxExpressionLength[key] = (int)Math.Min(sumOfMaxTrees, int.MaxValue);
+        return cachedMaxExpressionLength[key];
+      }
+    }
+
+    private readonly Dictionary<string, int> cachedMinExpressionDepth;
+    public int GetMinimumExpressionDepth(ISymbol symbol) {
+      int res;
+      if (cachedMinExpressionDepth.TryGetValue(symbol.Name, out res))
+        return res;
+
+      // value has to be calculated and cached make sure this is done in only one thread
+      lock (cachedMinExpressionDepth) {
+        // in case the value has been calculated on another thread in the meanwhile
+        if (cachedMinExpressionDepth.TryGetValue(symbol.Name, out res)) return res;
+
+        res = GetMinimumExpressionDepthRec(symbol);
+        foreach (var entry in cachedMinExpressionDepth.Where(e => e.Value >= int.MaxValue).ToList()) {
+          if (entry.Key != symbol.Name) cachedMinExpressionDepth.Remove(entry.Key);
+        }
+        return res;
+      }
+    }
+    private int GetMinimumExpressionDepthRec(ISymbol symbol) {
+      int temp;
+      if (!cachedMinExpressionDepth.TryGetValue(symbol.Name, out temp)) {
+        cachedMinExpressionDepth[symbol.Name] = int.MaxValue; // prevent infinite recursion
+        long minDepth = 1 + (from argIndex in Enumerable.Range(0, GetMinimumSubtreeCount(symbol))
+                             let minForSlot = (long)(from s in GetAllowedChildSymbols(symbol, argIndex)
+                                                     where s.InitialFrequency > 0.0
+                                                     select GetMinimumExpressionDepthRec(s)).DefaultIfEmpty(0).Min()
+                             select minForSlot).DefaultIfEmpty(0).Max();
+        cachedMinExpressionDepth[symbol.Name] = (int)Math.Min(minDepth, int.MaxValue);
+        return cachedMinExpressionDepth[symbol.Name];
+      }
+      return temp;
+    }
+
+    private readonly Dictionary<string, int> cachedMaxExpressionDepth;
+    public int GetMaximumExpressionDepth(ISymbol symbol) {
+      int temp;
+      if (cachedMaxExpressionDepth.TryGetValue(symbol.Name, out temp)) return temp;
+      // value has to be calculated and cached make sure this is done in only one thread
+      lock (cachedMaxExpressionDepth) {
+        // in case the value has been calculated on another thread in the meanwhile
+        if (cachedMaxExpressionDepth.TryGetValue(symbol.Name, out temp)) return temp;
+
+        cachedMaxExpressionDepth[symbol.Name] = int.MaxValue;
+        long maxDepth = 1 + (from argIndex in Enumerable.Range(0, GetMaximumSubtreeCount(symbol))
+                             let maxForSlot = (long)(from s in GetAllowedChildSymbols(symbol, argIndex)
+                                                     where s.InitialFrequency > 0.0
+                                                     select GetMaximumExpressionDepth(s)).DefaultIfEmpty(0).Max()
+                             select maxForSlot).DefaultIfEmpty(0).Max();
+        cachedMaxExpressionDepth[symbol.Name] = (int)Math.Min(maxDepth, int.MaxValue);
+        return cachedMaxExpressionDepth[symbol.Name];
+      }
+    }
+
+    public event EventHandler Changed;
+    protected virtual void OnChanged() {
+      if (suppressEvents) return;
+      var handler = Changed;
+      if (handler != null) Changed(this, EventArgs.Empty);
+    }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/SymbolicExpressionTreeGrammar.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/SymbolicExpressionTreeGrammar.cs	(revision 11576)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/SymbolicExpressionTreeGrammar.cs	(revision 11576)
@@ -0,0 +1,137 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  internal sealed class SymbolicExpressionTreeGrammar : SymbolicExpressionGrammarBase, ISymbolicExpressionTreeGrammar {
+    [StorableConstructor]
+    private SymbolicExpressionTreeGrammar(bool deserializing) : base(deserializing) { }
+    private SymbolicExpressionTreeGrammar(SymbolicExpressionTreeGrammar original, Cloner cloner)
+      : base(original, cloner) {
+      this.grammar = original.grammar;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      foreach (ISymbol symbol in base.Symbols)
+        if (!cloner.ClonedObjectRegistered(symbol))
+          cloner.RegisterClonedObject(symbol, symbol);
+      return new SymbolicExpressionTreeGrammar(this, cloner);
+    }
+
+    [Storable]
+    private ISymbolicExpressionGrammar grammar;
+    public SymbolicExpressionTreeGrammar(ISymbolicExpressionGrammar grammar)
+      : base("SymbolicExpressionTreeGrammar", "A grammar that is used held by symbolic expression trees and allows extensions to the wrapped grammar.") {
+      if (grammar == null) throw new ArgumentNullException();
+      this.grammar = grammar;
+    }
+
+    public override IEnumerable<ISymbol> Symbols {
+      get {
+        foreach (var s in grammar.Symbols) yield return s;
+        foreach (var s in base.symbols.Values) yield return s;
+      }
+    }
+    public override IEnumerable<ISymbol> AllowedSymbols {
+      get { return base.AllowedSymbols; }
+    }
+    public IEnumerable<ISymbol> ModifyableSymbols {
+      get { return base.symbols.Values; }
+    }
+    public bool IsModifyableSymbol(ISymbol symbol) {
+      return base.symbols.ContainsKey(symbol.Name);
+    }
+
+    public override bool ContainsSymbol(ISymbol symbol) {
+      return grammar.ContainsSymbol(symbol) || base.ContainsSymbol(symbol);
+    }
+    public override ISymbol GetSymbol(string symbolName) {
+      var symbol = grammar.GetSymbol(symbolName);
+      if (symbol != null) return symbol;
+      symbol = base.GetSymbol(symbolName);
+      if (symbol != null) return symbol;
+      throw new ArgumentException();
+    }
+
+    public override bool IsAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      return grammar.IsAllowedChildSymbol(parent, child) || base.IsAllowedChildSymbol(parent, child);
+    }
+    public override bool IsAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      return grammar.IsAllowedChildSymbol(parent, child, argumentIndex) || base.IsAllowedChildSymbol(parent, child, argumentIndex);
+    }
+
+    public override int GetMinimumSubtreeCount(ISymbol symbol) {
+      if (grammar.ContainsSymbol(symbol)) return grammar.GetMinimumSubtreeCount(symbol);
+      return base.GetMinimumSubtreeCount(symbol);
+    }
+    public override int GetMaximumSubtreeCount(ISymbol symbol) {
+      if (grammar.ContainsSymbol(symbol)) return grammar.GetMaximumSubtreeCount(symbol);
+      return base.GetMaximumSubtreeCount(symbol);
+    }
+
+    void ISymbolicExpressionTreeGrammar.AddSymbol(ISymbol symbol) {
+      base.AddSymbol(symbol);
+    }
+    void ISymbolicExpressionTreeGrammar.RemoveSymbol(ISymbol symbol) {
+      if (!IsModifyableSymbol(symbol)) throw new InvalidOperationException();
+      base.RemoveSymbol(symbol);
+    }
+    void ISymbolicExpressionTreeGrammar.AddAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      base.AddAllowedChildSymbol(parent, child);
+    }
+    void ISymbolicExpressionTreeGrammar.AddAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      base.AddAllowedChildSymbol(parent, child, argumentIndex);
+    }
+    void ISymbolicExpressionTreeGrammar.RemoveAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      base.RemoveAllowedChildSymbol(parent, child);
+    }
+    void ISymbolicExpressionTreeGrammar.RemoveAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      base.RemoveAllowedChildSymbol(parent, child, argumentIndex);
+    }
+
+    void ISymbolicExpressionTreeGrammar.SetSubtreeCount(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount) {
+      if (!IsModifyableSymbol(symbol)) throw new InvalidOperationException();
+      base.SetSubtreeCount(symbol, minimumSubtreeCount, maximumSubtreeCount);
+    }
+
+    int ISymbolicExpressionGrammarBase.GetMinimumExpressionDepth(ISymbol symbol) {
+      if (symbols.Count == 0) return grammar.GetMinimumExpressionDepth(symbol);
+      else return base.GetMinimumExpressionDepth(symbol);
+    }
+    int ISymbolicExpressionGrammarBase.GetMaximumExpressionDepth(ISymbol symbol) {
+      if (symbols.Count == 0) return grammar.GetMaximumExpressionDepth(symbol);
+      else return base.GetMaximumExpressionDepth(symbol);
+    }
+    int ISymbolicExpressionGrammarBase.GetMinimumExpressionLength(ISymbol symbol) {
+      if (symbols.Count == 0) return grammar.GetMinimumExpressionLength(symbol);
+      else return base.GetMinimumExpressionLength(symbol);
+    }
+    int ISymbolicExpressionGrammarBase.GetMaximumExpressionLength(ISymbol symbol, int maxDepth) {
+      if (symbols.Count == 0) return grammar.GetMaximumExpressionLength(symbol, maxDepth);
+      else return base.GetMaximumExpressionLength(symbol, maxDepth);
+    }
+
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj	(revision 11576)
@@ -136,4 +136,5 @@
     <Compile Include="Formatters\SymbolicExpressionTreeGraphvizFormatter.cs" />
     <Compile Include="Formatters\SymbolicExpressionTreeHierarchicalFormatter.cs" />
+    <Compile Include="Grammars\EmptySymbolicExpressionTreeGrammar.cs" />
     <Compile Include="Interfaces\IReadOnlySymbol.cs" />
     <Compile Include="Interfaces\ISymbolicExpressionGrammar.cs" />
@@ -166,7 +167,7 @@
     <Compile Include="Manipulators\SymbolicExpressionTreeManipulator.cs" />
     <Compile Include="Plugin.cs" />
-    <Compile Include="SymbolicExpressionGrammarBase.cs" />
-    <Compile Include="SymbolicExpressionGrammar.cs" />
-    <Compile Include="SymbolicExpressionTreeGrammar.cs" />
+    <Compile Include="Grammars\SymbolicExpressionGrammarBase.cs" />
+    <Compile Include="Grammars\SymbolicExpressionGrammar.cs" />
+    <Compile Include="Grammars\SymbolicExpressionTreeGrammar.cs" />
     <Compile Include="SymbolicExpressionTreeTopLevelNode.cs" />
     <Compile Include="Crossovers\SubtreeCrossover.cs">
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/IReadOnlySymbol.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/IReadOnlySymbol.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/IReadOnlySymbol.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbol.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbol.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbol.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionGrammar.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionGrammar.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionGrammar.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -48,4 +48,6 @@
     void StartGrammarManipulation();
     void FinishedGrammarManipulation();
+
+    ISymbolicExpressionTreeGrammar CreateExpressionTreeGrammar();
   }
 }
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionGrammarBase.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionGrammarBase.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionGrammarBase.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTree.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTree.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTree.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeGrammar.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeGrammar.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeGrammar.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNode.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNode.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNode.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeStringFormatter.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeStringFormatter.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeStringFormatter.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeAnalyzer.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeAnalyzer.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeAnalyzer.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeArchitectureAlteringOperator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeArchitectureAlteringOperator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeArchitectureAlteringOperator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeArchitectureManipulator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeArchitectureManipulator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeArchitectureManipulator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeCreator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeCreator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeCreator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeCrossover.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeCrossover.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeCrossover.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeGrammarBasedOperator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeGrammarBasedOperator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeGrammarBasedOperator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeManipulator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeManipulator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeManipulator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeOperator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeOperator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeOperator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeSizeConstraintOperator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeSizeConstraintOperator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeSizeConstraintOperator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ChangeNodeTypeManipulation.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ChangeNodeTypeManipulation.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ChangeNodeTypeManipulation.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/FullTreeShaker.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/FullTreeShaker.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/FullTreeShaker.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/RemoveBranchManipulation.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/RemoveBranchManipulation.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/RemoveBranchManipulation.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ReplaceBranchManipulation.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ReplaceBranchManipulation.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ReplaceBranchManipulation.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/SymbolicExpressionTreeManipulator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/SymbolicExpressionTreeManipulator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/SymbolicExpressionTreeManipulator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Plugin.cs.frame
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Plugin.cs.frame	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Plugin.cs.frame	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -26,5 +26,5 @@
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
-  [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","Provides operators and related classes for the symbolic expression tree encoding.", "3.4.5.$WCREV$")]
+  [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","Provides operators and related classes for the symbolic expression tree encoding.", "3.4.6.$WCREV$")]
   [PluginFile("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Analysis", "3.3")]
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Properties/AssemblyInfo.cs.frame
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Properties/AssemblyInfo.cs.frame	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Properties/AssemblyInfo.cs.frame	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -32,5 +32,5 @@
 [assembly: AssemblyCompany("")]
 [assembly: AssemblyProduct("HeuristicLab")]
-[assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
+[assembly: AssemblyCopyright("(c) 2002-2014 HEAL")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
@@ -45,3 +45,3 @@
 
 [assembly: AssemblyVersion("3.4.0.0")]
-[assembly: AssemblyFileVersion("3.4.5.$WCREV$")]
+[assembly: AssemblyFileVersion("3.4.6.$WCREV$")]
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammar.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammar.cs	(revision 11062)
+++ 	(revision )
@@ -1,353 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Collections;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
-  [StorableClass]
-  public abstract class SymbolicExpressionGrammar : SymbolicExpressionGrammarBase, ISymbolicExpressionGrammar {
-    #region fields & properties
-    [Storable(DefaultValue = false)]
-    private bool readOnly;
-    public bool ReadOnly {
-      get { return readOnly; }
-      set {
-        if (readOnly != value) {
-          readOnly = value;
-          OnReadOnlyChanged();
-        }
-      }
-    }
-
-    [Storable]
-    private int minimumFunctionDefinitions;
-    public int MinimumFunctionDefinitions {
-      get { return minimumFunctionDefinitions; }
-      set {
-        minimumFunctionDefinitions = value;
-        UpdateAdfConstraints();
-      }
-    }
-    [Storable]
-    private int maximumFunctionDefinitions;
-    public int MaximumFunctionDefinitions {
-      get { return maximumFunctionDefinitions; }
-      set {
-        maximumFunctionDefinitions = value;
-        UpdateAdfConstraints();
-      }
-    }
-    [Storable]
-    private int minimumFunctionArguments;
-    public int MinimumFunctionArguments {
-      get { return minimumFunctionArguments; }
-      set { minimumFunctionArguments = value; }
-    }
-    [Storable]
-    private int maximumFunctionArguments;
-    public int MaximumFunctionArguments {
-      get { return maximumFunctionArguments; }
-      set { maximumFunctionArguments = value; }
-    }
-
-    private ProgramRootSymbol programRootSymbol;
-    public ProgramRootSymbol ProgramRootSymbol {
-      get { return programRootSymbol; }
-    }
-    ISymbol ISymbolicExpressionGrammar.ProgramRootSymbol {
-      get { return ProgramRootSymbol; }
-    }
-    [Storable(Name = "ProgramRootSymbol")]
-    private ISymbol StorableProgramRootSymbol {
-      get { return programRootSymbol; }
-      set { programRootSymbol = (ProgramRootSymbol)value; }
-    }
-
-    private StartSymbol startSymbol;
-    public StartSymbol StartSymbol {
-      get { return startSymbol; }
-    }
-    ISymbol ISymbolicExpressionGrammar.StartSymbol {
-      get { return StartSymbol; }
-    }
-    [Storable(Name = "StartSymbol")]
-    private ISymbol StorableStartSymbol {
-      get { return startSymbol; }
-      set { startSymbol = (StartSymbol)value; }
-    }
-
-    private Defun defunSymbol;
-    protected Defun DefunSymbol {
-      get { return defunSymbol; }
-    }
-    [Storable(Name = "DefunSymbol")]
-    private ISymbol StorableDefunSymbol {
-      get { return defunSymbol; }
-      set { defunSymbol = (Defun)value; }
-    }
-    #endregion
-
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      foreach (ISymbol symbol in symbols.Values)
-        RegisterSymbolEvents(symbol);
-    }
-    [StorableConstructor]
-    protected SymbolicExpressionGrammar(bool deserializing) : base(deserializing) { }
-    protected SymbolicExpressionGrammar(SymbolicExpressionGrammar original, Cloner cloner)
-      : base(original, cloner) {
-      foreach (ISymbol symbol in symbols.Values)
-        RegisterSymbolEvents(symbol);
-
-      programRootSymbol = cloner.Clone(original.programRootSymbol);
-      startSymbol = cloner.Clone(original.StartSymbol);
-      defunSymbol = cloner.Clone(original.defunSymbol);
-
-      maximumFunctionArguments = original.maximumFunctionArguments;
-      minimumFunctionArguments = original.minimumFunctionArguments;
-      maximumFunctionDefinitions = original.maximumFunctionDefinitions;
-      minimumFunctionDefinitions = original.minimumFunctionDefinitions;
-    }
-
-    public SymbolicExpressionGrammar(string name, string description)
-      : base(name, description) {
-      programRootSymbol = new ProgramRootSymbol();
-      AddSymbol(programRootSymbol);
-      SetSubtreeCount(programRootSymbol, 1, 1);
-
-      startSymbol = new StartSymbol();
-      AddSymbol(startSymbol);
-      SetSubtreeCount(startSymbol, 1, 1);
-
-      defunSymbol = new Defun();
-      AddSymbol(defunSymbol);
-      SetSubtreeCount(defunSymbol, 1, 1);
-
-      AddAllowedChildSymbol(programRootSymbol, startSymbol, 0);
-      UpdateAdfConstraints();
-    }
-
-    private void UpdateAdfConstraints() {
-      SetSubtreeCount(programRootSymbol, minimumFunctionDefinitions + 1, maximumFunctionDefinitions + 1);
-
-      // ADF branches maxFunctionDefinitions 
-      for (int argumentIndex = 1; argumentIndex < maximumFunctionDefinitions + 1; argumentIndex++) {
-        RemoveAllowedChildSymbol(programRootSymbol, defunSymbol, argumentIndex);
-        AddAllowedChildSymbol(programRootSymbol, defunSymbol, argumentIndex);
-      }
-    }
-
-    protected override sealed void AddSymbol(ISymbol symbol) {
-      base.AddSymbol(symbol);
-      RegisterSymbolEvents(symbol);
-      OnChanged();
-    }
-    protected override sealed void RemoveSymbol(ISymbol symbol) {
-      DeregisterSymbolEvents(symbol);
-      base.RemoveSymbol(symbol);
-      OnChanged();
-    }
-
-    public event EventHandler ReadOnlyChanged;
-    protected virtual void OnReadOnlyChanged() {
-      var handler = ReadOnlyChanged;
-      if (handler != null)
-        handler(this, EventArgs.Empty);
-    }
-
-    #region IStatefulItem methods
-    void IStatefulItem.InitializeState() {
-      ReadOnly = false;
-    }
-    void IStatefulItem.ClearState() {
-      ReadOnly = false;
-    }
-    #endregion
-
-    #region ISymbolicExpressionGrammar methods
-    void ISymbolicExpressionGrammar.AddSymbol(ISymbol symbol) {
-      if (ReadOnly) throw new InvalidOperationException();
-      AddSymbol(symbol);
-    }
-    void ISymbolicExpressionGrammar.RemoveSymbol(ISymbol symbol) {
-      if (ReadOnly) throw new InvalidOperationException();
-      RemoveSymbol(symbol);
-    }
-
-    void ISymbolicExpressionGrammar.AddAllowedChildSymbol(ISymbol parent, ISymbol child) {
-      if (ReadOnly) throw new InvalidOperationException();
-      base.AddAllowedChildSymbol(parent, child);
-    }
-    void ISymbolicExpressionGrammar.AddAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
-      if (ReadOnly) throw new InvalidOperationException();
-      base.AddAllowedChildSymbol(parent, child, argumentIndex);
-    }
-    void ISymbolicExpressionGrammar.RemoveAllowedChildSymbol(ISymbol parent, ISymbol child) {
-      if (ReadOnly) throw new InvalidOperationException();
-      base.RemoveAllowedChildSymbol(parent, child);
-    }
-    void ISymbolicExpressionGrammar.RemoveAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
-      if (ReadOnly) throw new InvalidOperationException();
-      base.RemoveAllowedChildSymbol(parent, child, argumentIndex);
-    }
-
-    void ISymbolicExpressionGrammar.SetSubtreeCount(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount) {
-      if (ReadOnly) throw new InvalidOperationException();
-      base.SetSubtreeCount(symbol, minimumSubtreeCount, maximumSubtreeCount);
-    }
-
-    private bool suppressEvents = false;
-    void ISymbolicExpressionGrammar.StartGrammarManipulation() {
-      suppressEvents = true;
-    }
-    void ISymbolicExpressionGrammar.FinishedGrammarManipulation() {
-      suppressEvents = false;
-      OnChanged();
-    }
-
-    protected override void OnChanged() {
-      if (suppressEvents) return;
-      base.OnChanged();
-    }
-    #endregion
-
-    #region symbol events
-    private void RegisterSymbolEvents(ISymbol symbol) {
-      foreach (var s in symbol.Flatten()) {
-        s.NameChanging += new EventHandler<CancelEventArgs<string>>(Symbol_NameChanging);
-        s.NameChanged += new EventHandler(Symbol_NameChanged);
-
-        var groupSymbol = s as GroupSymbol;
-        if (groupSymbol != null) RegisterGroupSymbolEvents(groupSymbol);
-        else s.Changed += new EventHandler(Symbol_Changed);
-      }
-    }
-    private void DeregisterSymbolEvents(ISymbol symbol) {
-      foreach (var s in symbol.Flatten()) {
-        s.NameChanging -= new EventHandler<CancelEventArgs<string>>(Symbol_NameChanging);
-        s.NameChanged -= new EventHandler(Symbol_NameChanged);
-
-        var groupSymbol = s as GroupSymbol;
-        if (groupSymbol != null) DeregisterGroupSymbolEvents(groupSymbol);
-        else s.Changed -= new EventHandler(Symbol_Changed);
-      }
-    }
-
-    private void RegisterGroupSymbolEvents(GroupSymbol groupSymbol) {
-      groupSymbol.Changed += new EventHandler(GroupSymbol_Changed);
-      groupSymbol.SymbolsCollection.ItemsAdded += new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_ItemsAdded);
-      groupSymbol.SymbolsCollection.ItemsRemoved += new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_ItemsRemoved);
-      groupSymbol.SymbolsCollection.CollectionReset += new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_CollectionReset);
-    }
-    private void DeregisterGroupSymbolEvents(GroupSymbol groupSymbol) {
-      groupSymbol.Changed -= new EventHandler(GroupSymbol_Changed);
-      groupSymbol.SymbolsCollection.ItemsAdded -= new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_ItemsAdded);
-      groupSymbol.SymbolsCollection.ItemsRemoved -= new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_ItemsRemoved);
-      groupSymbol.SymbolsCollection.CollectionReset -= new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_CollectionReset);
-    }
-
-    private void Symbol_Changed(object sender, EventArgs e) {
-      ClearCaches();
-      OnChanged();
-    }
-
-    private void GroupSymbol_Changed(object sender, EventArgs e) {
-      GroupSymbol groupSymbol = (GroupSymbol)sender;
-      foreach (ISymbol symbol in groupSymbol.Flatten())
-        symbol.Enabled = groupSymbol.Enabled;
-
-      ClearCaches();
-      OnChanged();
-    }
-
-    private void Symbol_NameChanging(object sender, CancelEventArgs<string> e) {
-      if (symbols.ContainsKey(e.Value)) e.Cancel = true;
-    }
-    private void Symbol_NameChanged(object sender, EventArgs e) {
-      ISymbol symbol = (ISymbol)sender;
-      string oldName = symbols.Where(x => x.Value == symbol).First().Key;
-      string newName = symbol.Name;
-
-      symbols.Remove(oldName);
-      symbols.Add(newName, symbol);
-
-      var subtreeCount = symbolSubtreeCount[oldName];
-      symbolSubtreeCount.Remove(oldName);
-      symbolSubtreeCount.Add(newName, subtreeCount);
-
-      List<string> allowedChilds;
-      if (allowedChildSymbols.TryGetValue(oldName, out allowedChilds)) {
-        allowedChildSymbols.Remove(oldName);
-        allowedChildSymbols.Add(newName, allowedChilds);
-      }
-
-      for (int i = 0; i < GetMaximumSubtreeCount(symbol); i++) {
-        if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(oldName, i), out allowedChilds)) {
-          allowedChildSymbolsPerIndex.Remove(Tuple.Create(oldName, i));
-          allowedChildSymbolsPerIndex.Add(Tuple.Create(newName, i), allowedChilds);
-        }
-      }
-
-      foreach (var parent in Symbols) {
-        if (allowedChildSymbols.TryGetValue(parent.Name, out allowedChilds))
-          if (allowedChilds.Remove(oldName))
-            allowedChilds.Add(newName);
-
-        for (int i = 0; i < GetMaximumSubtreeCount(parent); i++) {
-          if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(parent.Name, i), out allowedChilds))
-            if (allowedChilds.Remove(oldName)) allowedChilds.Add(newName);
-        }
-      }
-
-      ClearCaches();
-      OnChanged();
-    }
-
-    private void GroupSymbol_ItemsAdded(object sender, CollectionItemsChangedEventArgs<ISymbol> e) {
-      foreach (ISymbol symbol in e.Items)
-        if (!ContainsSymbol(symbol))
-          AddSymbol(symbol);
-      OnChanged();
-    }
-    private void GroupSymbol_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<ISymbol> e) {
-      foreach (ISymbol symbol in e.Items)
-        if (ContainsSymbol(symbol))
-          RemoveSymbol(symbol);
-      OnChanged();
-    }
-    private void GroupSymbol_CollectionReset(object sender, CollectionItemsChangedEventArgs<ISymbol> e) {
-      foreach (ISymbol symbol in e.Items)
-        if (!ContainsSymbol(symbol))
-          AddSymbol(symbol);
-      foreach (ISymbol symbol in e.OldItems)
-        if (ContainsSymbol(symbol))
-          RemoveSymbol(symbol);
-      OnChanged();
-    }
-    #endregion
-  }
-}
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammarBase.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammarBase.cs	(revision 11062)
+++ 	(revision )
@@ -1,515 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
-  /// <summary>
-  /// The default symbolic expression grammar stores symbols and syntactic constraints for symbols.
-  /// Symbols are treated as equvivalent if they have the same name.
-  /// Syntactic constraints limit the number of allowed sub trees for a node with a symbol and which symbols are allowed 
-  /// in the sub-trees of a symbol (can be specified for each sub-tree index separately).
-  /// </summary>
-  [StorableClass]
-  public abstract class SymbolicExpressionGrammarBase : NamedItem, ISymbolicExpressionGrammarBase {
-
-    #region properties for separation between implementation and persistence
-    [Storable(Name = "Symbols")]
-    private IEnumerable<ISymbol> StorableSymbols {
-      get { return symbols.Values.ToArray(); }
-      set { symbols = value.ToDictionary(sym => sym.Name); }
-    }
-
-    [Storable(Name = "SymbolSubtreeCount")]
-    private IEnumerable<KeyValuePair<ISymbol, Tuple<int, int>>> StorableSymbolSubtreeCount {
-      get { return symbolSubtreeCount.Select(x => new KeyValuePair<ISymbol, Tuple<int, int>>(GetSymbol(x.Key), x.Value)).ToArray(); }
-      set { symbolSubtreeCount = value.ToDictionary(x => x.Key.Name, x => x.Value); }
-    }
-
-    [Storable(Name = "AllowedChildSymbols")]
-    private IEnumerable<KeyValuePair<ISymbol, IEnumerable<ISymbol>>> StorableAllowedChildSymbols {
-      get { return allowedChildSymbols.Select(x => new KeyValuePair<ISymbol, IEnumerable<ISymbol>>(GetSymbol(x.Key), x.Value.Select(GetSymbol).ToArray())).ToArray(); }
-      set { allowedChildSymbols = value.ToDictionary(x => x.Key.Name, x => x.Value.Select(y => y.Name).ToList()); }
-    }
-
-    [Storable(Name = "AllowedChildSymbolsPerIndex")]
-    private IEnumerable<KeyValuePair<Tuple<ISymbol, int>, IEnumerable<ISymbol>>> StorableAllowedChildSymbolsPerIndex {
-      get { return allowedChildSymbolsPerIndex.Select(x => new KeyValuePair<Tuple<ISymbol, int>, IEnumerable<ISymbol>>(Tuple.Create<ISymbol, int>(GetSymbol(x.Key.Item1), x.Key.Item2), x.Value.Select(y => GetSymbol(y)).ToArray())).ToArray(); }
-      set { allowedChildSymbolsPerIndex = value.ToDictionary(x => Tuple.Create(x.Key.Item1.Name, x.Key.Item2), x => x.Value.Select(y => y.Name).ToList()); }
-    }
-    #endregion
-
-    private bool suppressEvents;
-    protected Dictionary<string, ISymbol> symbols;
-    protected Dictionary<string, Tuple<int, int>> symbolSubtreeCount;
-    protected Dictionary<string, List<string>> allowedChildSymbols;
-    protected Dictionary<Tuple<string, int>, List<string>> allowedChildSymbolsPerIndex;
-
-    public override bool CanChangeName {
-      get { return false; }
-    }
-    public override bool CanChangeDescription {
-      get { return false; }
-    }
-
-    [StorableConstructor]
-    protected SymbolicExpressionGrammarBase(bool deserializing)
-      : base(deserializing) {
-      cachedMinExpressionLength = new Dictionary<string, int>();
-      cachedMaxExpressionLength = new Dictionary<Tuple<string, int>, int>();
-      cachedMinExpressionDepth = new Dictionary<string, int>();
-      cachedMaxExpressionDepth = new Dictionary<string, int>();
-
-      cachedIsAllowedChildSymbol = new Dictionary<Tuple<string, string>, bool>();
-      cachedIsAllowedChildSymbolIndex = new Dictionary<Tuple<string, string, int>, bool>();
-
-      suppressEvents = false;
-    }
-
-    protected SymbolicExpressionGrammarBase(SymbolicExpressionGrammarBase original, Cloner cloner)
-      : base(original, cloner) {
-      cachedMinExpressionLength = new Dictionary<string, int>();
-      cachedMaxExpressionLength = new Dictionary<Tuple<string, int>, int>();
-      cachedMinExpressionDepth = new Dictionary<string, int>();
-      cachedMaxExpressionDepth = new Dictionary<string, int>();
-
-      cachedIsAllowedChildSymbol = new Dictionary<Tuple<string, string>, bool>();
-      cachedIsAllowedChildSymbolIndex = new Dictionary<Tuple<string, string, int>, bool>();
-
-      symbols = original.symbols.ToDictionary(x => x.Key, y => cloner.Clone(y.Value));
-      symbolSubtreeCount = new Dictionary<string, Tuple<int, int>>(original.symbolSubtreeCount);
-
-      allowedChildSymbols = new Dictionary<string, List<string>>();
-      foreach (var element in original.allowedChildSymbols)
-        allowedChildSymbols.Add(element.Key, new List<string>(element.Value));
-
-      allowedChildSymbolsPerIndex = new Dictionary<Tuple<string, int>, List<string>>();
-      foreach (var element in original.allowedChildSymbolsPerIndex)
-        allowedChildSymbolsPerIndex.Add(element.Key, new List<string>(element.Value));
-
-      suppressEvents = false;
-    }
-
-    protected SymbolicExpressionGrammarBase(string name, string description)
-      : base(name, description) {
-      cachedMinExpressionLength = new Dictionary<string, int>();
-      cachedMaxExpressionLength = new Dictionary<Tuple<string, int>, int>();
-      cachedMinExpressionDepth = new Dictionary<string, int>();
-      cachedMaxExpressionDepth = new Dictionary<string, int>();
-
-      cachedIsAllowedChildSymbol = new Dictionary<Tuple<string, string>, bool>();
-      cachedIsAllowedChildSymbolIndex = new Dictionary<Tuple<string, string, int>, bool>();
-
-      symbols = new Dictionary<string, ISymbol>();
-      symbolSubtreeCount = new Dictionary<string, Tuple<int, int>>();
-      allowedChildSymbols = new Dictionary<string, List<string>>();
-      allowedChildSymbolsPerIndex = new Dictionary<Tuple<string, int>, List<string>>();
-
-      suppressEvents = false;
-    }
-
-    #region protected grammar manipulation methods
-    protected virtual void AddSymbol(ISymbol symbol) {
-      if (ContainsSymbol(symbol)) throw new ArgumentException("Symbol " + symbol + " is already defined.");
-      foreach (var s in symbol.Flatten()) {
-        symbols.Add(s.Name, s);
-        int maxSubTreeCount = Math.Min(s.MinimumArity + 1, s.MaximumArity);
-        symbolSubtreeCount.Add(s.Name, Tuple.Create(s.MinimumArity, maxSubTreeCount));
-      }
-      ClearCaches();
-    }
-
-    protected virtual void RemoveSymbol(ISymbol symbol) {
-      foreach (var s in symbol.Flatten()) {
-        symbols.Remove(s.Name);
-        allowedChildSymbols.Remove(s.Name);
-        for (int i = 0; i < GetMaximumSubtreeCount(s); i++)
-          allowedChildSymbolsPerIndex.Remove(Tuple.Create(s.Name, i));
-        symbolSubtreeCount.Remove(s.Name);
-
-        foreach (var parent in Symbols) {
-          List<string> allowedChilds;
-          if (allowedChildSymbols.TryGetValue(parent.Name, out allowedChilds))
-            allowedChilds.Remove(s.Name);
-
-          for (int i = 0; i < GetMaximumSubtreeCount(parent); i++) {
-            if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(parent.Name, i), out allowedChilds))
-              allowedChilds.Remove(s.Name);
-          }
-        }
-        suppressEvents = true;
-        foreach (var groupSymbol in Symbols.OfType<GroupSymbol>())
-          groupSymbol.SymbolsCollection.Remove(symbol);
-        suppressEvents = false;
-      }
-      ClearCaches();
-    }
-
-    public virtual ISymbol GetSymbol(string symbolName) {
-      ISymbol symbol;
-      if (symbols.TryGetValue(symbolName, out symbol)) return symbol;
-      return null;
-    }
-
-    protected void AddAllowedChildSymbol(ISymbol parent, ISymbol child) {
-      bool changed = false;
-
-      foreach (ISymbol p in parent.Flatten().Where(p => !(p is GroupSymbol)))
-        changed |= AddAllowedChildSymbolToDictionaries(p, child);
-
-      if (changed) {
-        ClearCaches();
-        OnChanged();
-      }
-    }
-
-    private bool AddAllowedChildSymbolToDictionaries(ISymbol parent, ISymbol child) {
-      List<string> childSymbols;
-      if (!allowedChildSymbols.TryGetValue(parent.Name, out childSymbols)) {
-        childSymbols = new List<string>();
-        allowedChildSymbols.Add(parent.Name, childSymbols);
-      }
-      if (childSymbols.Contains(child.Name)) return false;
-
-      suppressEvents = true;
-      for (int argumentIndex = 0; argumentIndex < GetMaximumSubtreeCount(parent); argumentIndex++)
-        RemoveAllowedChildSymbol(parent, child, argumentIndex);
-      suppressEvents = false;
-
-      childSymbols.Add(child.Name);
-      return true;
-    }
-
-    protected void AddAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
-      bool changed = false;
-
-      foreach (ISymbol p in parent.Flatten().Where(p => !(p is GroupSymbol)))
-        changed |= AddAllowedChildSymbolToDictionaries(p, child, argumentIndex);
-
-      if (changed) {
-        ClearCaches();
-        OnChanged();
-      }
-    }
-
-
-    private bool AddAllowedChildSymbolToDictionaries(ISymbol parent, ISymbol child, int argumentIndex) {
-      List<string> childSymbols;
-      if (!allowedChildSymbols.TryGetValue(parent.Name, out childSymbols)) {
-        childSymbols = new List<string>();
-        allowedChildSymbols.Add(parent.Name, childSymbols);
-      }
-      if (childSymbols.Contains(child.Name)) return false;
-
-
-      var key = Tuple.Create(parent.Name, argumentIndex);
-      if (!allowedChildSymbolsPerIndex.TryGetValue(key, out childSymbols)) {
-        childSymbols = new List<string>();
-        allowedChildSymbolsPerIndex.Add(key, childSymbols);
-      }
-
-      if (childSymbols.Contains(child.Name)) return false;
-
-      childSymbols.Add(child.Name);
-      return true;
-    }
-
-    protected void RemoveAllowedChildSymbol(ISymbol parent, ISymbol child) {
-      bool changed = false;
-      List<string> childSymbols;
-      if (allowedChildSymbols.TryGetValue(child.Name, out childSymbols)) {
-        changed |= childSymbols.Remove(child.Name);
-      }
-
-      for (int argumentIndex = 0; argumentIndex < GetMaximumSubtreeCount(parent); argumentIndex++) {
-        var key = Tuple.Create(parent.Name, argumentIndex);
-        if (allowedChildSymbolsPerIndex.TryGetValue(key, out childSymbols))
-          changed |= childSymbols.Remove(child.Name);
-      }
-
-      if (changed) {
-        ClearCaches();
-        OnChanged();
-      }
-    }
-
-    protected void RemoveAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
-      bool changed = false;
-
-      suppressEvents = true;
-      List<string> childSymbols;
-      if (allowedChildSymbols.TryGetValue(parent.Name, out childSymbols)) {
-        if (childSymbols.Remove(child.Name)) {
-          for (int i = 0; i < GetMaximumSubtreeCount(parent); i++) {
-            if (i != argumentIndex) AddAllowedChildSymbol(parent, child, i);
-          }
-          changed = true;
-        }
-      }
-      suppressEvents = false;
-
-      var key = Tuple.Create(parent.Name, argumentIndex);
-      if (allowedChildSymbolsPerIndex.TryGetValue(key, out childSymbols))
-        changed |= childSymbols.Remove(child.Name);
-
-      if (changed) {
-        ClearCaches();
-        OnChanged();
-      }
-    }
-
-    protected void SetSubtreeCount(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount) {
-      var symbols = symbol.Flatten().Where(s => !(s is GroupSymbol));
-      if (symbols.Any(s => s.MinimumArity > minimumSubtreeCount)) throw new ArgumentException("Invalid minimum subtree count " + minimumSubtreeCount + " for " + symbol);
-      if (symbols.Any(s => s.MaximumArity < maximumSubtreeCount)) throw new ArgumentException("Invalid maximum subtree count " + maximumSubtreeCount + " for " + symbol);
-
-      foreach (ISymbol s in symbols)
-        SetSubTreeCountInDictionaries(s, minimumSubtreeCount, maximumSubtreeCount);
-
-      ClearCaches();
-      OnChanged();
-    }
-
-    private void SetSubTreeCountInDictionaries(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount) {
-      for (int i = maximumSubtreeCount; i < GetMaximumSubtreeCount(symbol); i++) {
-        var key = Tuple.Create(symbol.Name, i);
-        allowedChildSymbolsPerIndex.Remove(key);
-      }
-
-      symbolSubtreeCount[symbol.Name] = Tuple.Create(minimumSubtreeCount, maximumSubtreeCount);
-    }
-    #endregion
-
-    public virtual IEnumerable<ISymbol> Symbols {
-      get { return symbols.Values; }
-    }
-    public virtual IEnumerable<ISymbol> AllowedSymbols {
-      get { foreach (var s in Symbols) if (s.Enabled) yield return s; }
-    }
-    public virtual bool ContainsSymbol(ISymbol symbol) {
-      return symbols.ContainsKey(symbol.Name);
-    }
-
-    private readonly Dictionary<Tuple<string, string>, bool> cachedIsAllowedChildSymbol;
-    public virtual bool IsAllowedChildSymbol(ISymbol parent, ISymbol child) {
-      if (allowedChildSymbols.Count == 0) return false;
-      if (!child.Enabled) return false;
-
-      bool result;
-      var key = Tuple.Create(parent.Name, child.Name);
-      if (cachedIsAllowedChildSymbol.TryGetValue(key, out result)) return result;
-
-      // value has to be calculated and cached make sure this is done in only one thread
-      lock (cachedIsAllowedChildSymbol) {
-        // in case the value has been calculated on another thread in the meanwhile
-        if (cachedIsAllowedChildSymbol.TryGetValue(key, out result)) return result;
-
-        List<string> temp;
-        if (allowedChildSymbols.TryGetValue(parent.Name, out temp)) {
-          if (temp.SelectMany(s => GetSymbol(s).Flatten()).Any(s => s.Name == child.Name)) {
-            cachedIsAllowedChildSymbol.Add(key, true);
-            return true;
-          }
-        }
-        cachedIsAllowedChildSymbol.Add(key, false);
-        return false;
-      }
-    }
-
-    private readonly Dictionary<Tuple<string, string, int>, bool> cachedIsAllowedChildSymbolIndex;
-    public virtual bool IsAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
-      if (!child.Enabled) return false;
-      if (IsAllowedChildSymbol(parent, child)) return true;
-      if (allowedChildSymbolsPerIndex.Count == 0) return false;
-
-      bool result;
-      var key = Tuple.Create(parent.Name, child.Name, argumentIndex);
-      if (cachedIsAllowedChildSymbolIndex.TryGetValue(key, out result)) return result;
-
-      // value has to be calculated and cached make sure this is done in only one thread
-      lock (cachedIsAllowedChildSymbolIndex) {
-        // in case the value has been calculated on another thread in the meanwhile
-        if (cachedIsAllowedChildSymbolIndex.TryGetValue(key, out result)) return result;
-
-        List<string> temp;
-        if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(parent.Name, argumentIndex), out temp)) {
-          if (temp.SelectMany(s => GetSymbol(s).Flatten()).Any(s => s.Name == child.Name)) {
-            cachedIsAllowedChildSymbolIndex.Add(key, true);
-            return true;
-          }
-        }
-        cachedIsAllowedChildSymbolIndex.Add(key, false);
-        return false;
-      }
-    }
-
-    public IEnumerable<ISymbol> GetAllowedChildSymbols(ISymbol parent) {
-      foreach (ISymbol child in AllowedSymbols) {
-        if (IsAllowedChildSymbol(parent, child)) yield return child;
-      }
-    }
-
-    public IEnumerable<ISymbol> GetAllowedChildSymbols(ISymbol parent, int argumentIndex) {
-      foreach (ISymbol child in AllowedSymbols) {
-        if (IsAllowedChildSymbol(parent, child, argumentIndex)) yield return child;
-      }
-    }
-
-    public virtual int GetMinimumSubtreeCount(ISymbol symbol) {
-      return symbolSubtreeCount[symbol.Name].Item1;
-    }
-    public virtual int GetMaximumSubtreeCount(ISymbol symbol) {
-      return symbolSubtreeCount[symbol.Name].Item2;
-    }
-
-    protected void ClearCaches() {
-      cachedMinExpressionLength.Clear();
-      cachedMaxExpressionLength.Clear();
-      cachedMinExpressionDepth.Clear();
-      cachedMaxExpressionDepth.Clear();
-
-      cachedIsAllowedChildSymbol.Clear();
-      cachedIsAllowedChildSymbolIndex.Clear();
-    }
-
-    private readonly Dictionary<string, int> cachedMinExpressionLength;
-    public int GetMinimumExpressionLength(ISymbol symbol) {
-      int res;
-      if (cachedMinExpressionLength.TryGetValue(symbol.Name, out res))
-        return res;
-
-      // value has to be calculated and cached make sure this is done in only one thread
-      lock (cachedMinExpressionLength) {
-        // in case the value has been calculated on another thread in the meanwhile
-        if (cachedMinExpressionLength.TryGetValue(symbol.Name, out res)) return res;
-
-        res = GetMinimumExpressionLengthRec(symbol);
-        foreach (var entry in cachedMinExpressionLength.Where(e => e.Value >= int.MaxValue).ToList()) {
-          if (entry.Key != symbol.Name) cachedMinExpressionLength.Remove(entry.Key);
-        }
-        return res;
-      }
-    }
-
-    private int GetMinimumExpressionLengthRec(ISymbol symbol) {
-      int temp;
-      if (!cachedMinExpressionLength.TryGetValue(symbol.Name, out temp)) {
-        cachedMinExpressionLength[symbol.Name] = int.MaxValue; // prevent infinite recursion
-        long sumOfMinExpressionLengths = 1 + (from argIndex in Enumerable.Range(0, GetMinimumSubtreeCount(symbol))
-                                              let minForSlot = (long)(from s in GetAllowedChildSymbols(symbol, argIndex)
-                                                                      where s.InitialFrequency > 0.0
-                                                                      select GetMinimumExpressionLengthRec(s)).DefaultIfEmpty(0).Min()
-                                              select minForSlot).DefaultIfEmpty(0).Sum();
-
-        cachedMinExpressionLength[symbol.Name] = (int)Math.Min(sumOfMinExpressionLengths, int.MaxValue);
-        return cachedMinExpressionLength[symbol.Name];
-      }
-      return temp;
-    }
-
-    private readonly Dictionary<Tuple<string, int>, int> cachedMaxExpressionLength;
-    public int GetMaximumExpressionLength(ISymbol symbol, int maxDepth) {
-      int temp;
-      var key = Tuple.Create(symbol.Name, maxDepth);
-      if (cachedMaxExpressionLength.TryGetValue(key, out temp)) return temp;
-      // value has to be calculated and cached make sure this is done in only one thread
-      lock (cachedMaxExpressionLength) {
-        // in case the value has been calculated on another thread in the meanwhile
-        if (cachedMaxExpressionLength.TryGetValue(key, out temp)) return temp;
-
-        cachedMaxExpressionLength[key] = int.MaxValue; // prevent infinite recursion
-        long sumOfMaxTrees = 1 + (from argIndex in Enumerable.Range(0, GetMaximumSubtreeCount(symbol))
-                                  let maxForSlot = (long)(from s in GetAllowedChildSymbols(symbol, argIndex)
-                                                          where s.InitialFrequency > 0.0
-                                                          where GetMinimumExpressionDepth(s) < maxDepth
-                                                          select GetMaximumExpressionLength(s, maxDepth - 1)).DefaultIfEmpty(0).Max()
-                                  select maxForSlot).DefaultIfEmpty(0).Sum();
-        cachedMaxExpressionLength[key] = (int)Math.Min(sumOfMaxTrees, int.MaxValue);
-        return cachedMaxExpressionLength[key];
-      }
-    }
-
-    private readonly Dictionary<string, int> cachedMinExpressionDepth;
-    public int GetMinimumExpressionDepth(ISymbol symbol) {
-      int res;
-      if (cachedMinExpressionDepth.TryGetValue(symbol.Name, out res))
-        return res;
-
-      // value has to be calculated and cached make sure this is done in only one thread
-      lock (cachedMinExpressionDepth) {
-        // in case the value has been calculated on another thread in the meanwhile
-        if (cachedMinExpressionDepth.TryGetValue(symbol.Name, out res)) return res;
-
-        res = GetMinimumExpressionDepthRec(symbol);
-        foreach (var entry in cachedMinExpressionDepth.Where(e => e.Value >= int.MaxValue).ToList()) {
-          if (entry.Key != symbol.Name) cachedMinExpressionDepth.Remove(entry.Key);
-        }
-        return res;
-      }
-    }
-    private int GetMinimumExpressionDepthRec(ISymbol symbol) {
-      int temp;
-      if (!cachedMinExpressionDepth.TryGetValue(symbol.Name, out temp)) {
-        cachedMinExpressionDepth[symbol.Name] = int.MaxValue; // prevent infinite recursion
-        long minDepth = 1 + (from argIndex in Enumerable.Range(0, GetMinimumSubtreeCount(symbol))
-                             let minForSlot = (long)(from s in GetAllowedChildSymbols(symbol, argIndex)
-                                                     where s.InitialFrequency > 0.0
-                                                     select GetMinimumExpressionDepthRec(s)).DefaultIfEmpty(0).Min()
-                             select minForSlot).DefaultIfEmpty(0).Max();
-        cachedMinExpressionDepth[symbol.Name] = (int)Math.Min(minDepth, int.MaxValue);
-        return cachedMinExpressionDepth[symbol.Name];
-      }
-      return temp;
-    }
-
-    private readonly Dictionary<string, int> cachedMaxExpressionDepth;
-    public int GetMaximumExpressionDepth(ISymbol symbol) {
-      int temp;
-      if (cachedMaxExpressionDepth.TryGetValue(symbol.Name, out temp)) return temp;
-      // value has to be calculated and cached make sure this is done in only one thread
-      lock (cachedMaxExpressionDepth) {
-        // in case the value has been calculated on another thread in the meanwhile
-        if (cachedMaxExpressionDepth.TryGetValue(symbol.Name, out temp)) return temp;
-
-        cachedMaxExpressionDepth[symbol.Name] = int.MaxValue;
-        long maxDepth = 1 + (from argIndex in Enumerable.Range(0, GetMaximumSubtreeCount(symbol))
-                             let maxForSlot = (long)(from s in GetAllowedChildSymbols(symbol, argIndex)
-                                                     where s.InitialFrequency > 0.0
-                                                     select GetMaximumExpressionDepth(s)).DefaultIfEmpty(0).Max()
-                             select maxForSlot).DefaultIfEmpty(0).Max();
-        cachedMaxExpressionDepth[symbol.Name] = (int)Math.Min(maxDepth, int.MaxValue);
-        return cachedMaxExpressionDepth[symbol.Name];
-      }
-    }
-
-    public event EventHandler Changed;
-    protected virtual void OnChanged() {
-      if (suppressEvents) return;
-      var handler = Changed;
-      if (handler != null) Changed(this, EventArgs.Empty);
-    }
-  }
-}
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTree.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTree.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTree.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeGrammar.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeGrammar.cs	(revision 11062)
+++ 	(revision )
@@ -1,137 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Common;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
-  [StorableClass]
-  internal sealed class SymbolicExpressionTreeGrammar : SymbolicExpressionGrammarBase, ISymbolicExpressionTreeGrammar {
-    [StorableConstructor]
-    private SymbolicExpressionTreeGrammar(bool deserializing) : base(deserializing) { }
-    private SymbolicExpressionTreeGrammar(SymbolicExpressionTreeGrammar original, Cloner cloner)
-      : base(original, cloner) {
-      this.grammar = original.grammar;
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      foreach (ISymbol symbol in base.Symbols)
-        if (!cloner.ClonedObjectRegistered(symbol))
-          cloner.RegisterClonedObject(symbol, symbol);
-      return new SymbolicExpressionTreeGrammar(this, cloner);
-    }
-
-    [Storable]
-    private ISymbolicExpressionGrammar grammar;
-    public SymbolicExpressionTreeGrammar(ISymbolicExpressionGrammar grammar)
-      : base("SymbolicExpressionTreeGrammar", "A grammar that is used held by symbolic expression trees and allows extensions to the wrapped grammar.") {
-      if (grammar == null) throw new ArgumentNullException();
-      this.grammar = grammar;
-    }
-
-    public override IEnumerable<ISymbol> Symbols {
-      get {
-        foreach (var s in grammar.Symbols) yield return s;
-        foreach (var s in base.symbols.Values) yield return s;
-      }
-    }
-    public override IEnumerable<ISymbol> AllowedSymbols {
-      get { return base.AllowedSymbols; }
-    }
-    public IEnumerable<ISymbol> ModifyableSymbols {
-      get { return base.symbols.Values; }
-    }
-    public bool IsModifyableSymbol(ISymbol symbol) {
-      return base.symbols.ContainsKey(symbol.Name);
-    }
-
-    public override bool ContainsSymbol(ISymbol symbol) {
-      return grammar.ContainsSymbol(symbol) || base.ContainsSymbol(symbol);
-    }
-    public override ISymbol GetSymbol(string symbolName) {
-      var symbol = grammar.GetSymbol(symbolName);
-      if (symbol != null) return symbol;
-      symbol = base.GetSymbol(symbolName);
-      if (symbol != null) return symbol;
-      throw new ArgumentException();
-    }
-
-    public override bool IsAllowedChildSymbol(ISymbol parent, ISymbol child) {
-      return grammar.IsAllowedChildSymbol(parent, child) || base.IsAllowedChildSymbol(parent, child);
-    }
-    public override bool IsAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
-      return grammar.IsAllowedChildSymbol(parent, child, argumentIndex) || base.IsAllowedChildSymbol(parent, child, argumentIndex);
-    }
-
-    public override int GetMinimumSubtreeCount(ISymbol symbol) {
-      if (grammar.ContainsSymbol(symbol)) return grammar.GetMinimumSubtreeCount(symbol);
-      return base.GetMinimumSubtreeCount(symbol);
-    }
-    public override int GetMaximumSubtreeCount(ISymbol symbol) {
-      if (grammar.ContainsSymbol(symbol)) return grammar.GetMaximumSubtreeCount(symbol);
-      return base.GetMaximumSubtreeCount(symbol);
-    }
-
-    void ISymbolicExpressionTreeGrammar.AddSymbol(ISymbol symbol) {
-      base.AddSymbol(symbol);
-    }
-    void ISymbolicExpressionTreeGrammar.RemoveSymbol(ISymbol symbol) {
-      if (!IsModifyableSymbol(symbol)) throw new InvalidOperationException();
-      base.RemoveSymbol(symbol);
-    }
-    void ISymbolicExpressionTreeGrammar.AddAllowedChildSymbol(ISymbol parent, ISymbol child) {
-      base.AddAllowedChildSymbol(parent, child);
-    }
-    void ISymbolicExpressionTreeGrammar.AddAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
-      base.AddAllowedChildSymbol(parent, child, argumentIndex);
-    }
-    void ISymbolicExpressionTreeGrammar.RemoveAllowedChildSymbol(ISymbol parent, ISymbol child) {
-      base.RemoveAllowedChildSymbol(parent, child);
-    }
-    void ISymbolicExpressionTreeGrammar.RemoveAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
-      base.RemoveAllowedChildSymbol(parent, child, argumentIndex);
-    }
-
-    void ISymbolicExpressionTreeGrammar.SetSubtreeCount(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount) {
-      if (!IsModifyableSymbol(symbol)) throw new InvalidOperationException();
-      base.SetSubtreeCount(symbol, minimumSubtreeCount, maximumSubtreeCount);
-    }
-
-    int ISymbolicExpressionGrammarBase.GetMinimumExpressionDepth(ISymbol symbol) {
-      if (symbols.Count == 0) return grammar.GetMinimumExpressionDepth(symbol);
-      else return base.GetMinimumExpressionDepth(symbol);
-    }
-    int ISymbolicExpressionGrammarBase.GetMaximumExpressionDepth(ISymbol symbol) {
-      if (symbols.Count == 0) return grammar.GetMaximumExpressionDepth(symbol);
-      else return base.GetMaximumExpressionDepth(symbol);
-    }
-    int ISymbolicExpressionGrammarBase.GetMinimumExpressionLength(ISymbol symbol) {
-      if (symbols.Count == 0) return grammar.GetMinimumExpressionLength(symbol);
-      else return base.GetMinimumExpressionLength(symbol);
-    }
-    int ISymbolicExpressionGrammarBase.GetMaximumExpressionLength(ISymbol symbol, int maxDepth) {
-      if (symbols.Count == 0) return grammar.GetMaximumExpressionLength(symbol, maxDepth);
-      else return base.GetMaximumExpressionLength(symbol, maxDepth);
-    }
-
-  }
-}
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeOperator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeOperator.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeOperator.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTerminalNode.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTerminalNode.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTerminalNode.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTopLevelNode.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTopLevelNode.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTopLevelNode.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Argument.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Argument.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Argument.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/ArgumentTreeNode.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/ArgumentTreeNode.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/ArgumentTreeNode.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Defun.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Defun.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Defun.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/DefunTreeNode.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/DefunTreeNode.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/DefunTreeNode.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/GroupSymbol.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/GroupSymbol.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/GroupSymbol.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/InvokeFunction.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/InvokeFunction.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/InvokeFunction.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/InvokeFunctionTreeNode.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/InvokeFunctionTreeNode.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/InvokeFunctionTreeNode.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/ProgramRootSymbol.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/ProgramRootSymbol.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/ProgramRootSymbol.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/StartSymbol.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/StartSymbol.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/StartSymbol.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Symbol.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Symbol.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Symbol.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
