Index: trunk/sources/HeuristicLab.Common/3.3/EnumerableStatisticExtensions.cs
===================================================================
--- trunk/sources/HeuristicLab.Common/3.3/EnumerableStatisticExtensions.cs	(revision 3462)
+++ trunk/sources/HeuristicLab.Common/3.3/EnumerableStatisticExtensions.cs	(revision 3462)
@@ -0,0 +1,92 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using System.Linq;
+
+namespace HeuristicLab.Common {
+  public static class EnumerableStatisticExtensions {
+    /// <summary>
+    /// Calculates the median element of the enumeration.
+    /// </summary>
+    /// <param name="values"></param>
+    /// <returns></returns>
+    public static double Median(this IEnumerable<double> values) {
+      int n = values.Count();
+      if (n == 0) throw new InvalidOperationException("Enumeration contains no elements.");
+
+      double[] sortedValues = new double[n];
+      int i = 0;
+      foreach (double x in values)
+        sortedValues[i++] = x;
+
+      Array.Sort(sortedValues);
+
+      // return the middle element (if n is uneven) or the average of the two middle elements if n is even.
+      if (n % 2 == 1) {
+        return sortedValues[n / 2];
+      } else {
+        return (sortedValues[(n / 2) - 1] + sortedValues[n / 2]) / 2.0;
+      }
+    }
+
+
+    /// <summary>
+    /// Calculates the standard deviation of values.
+    /// </summary>
+    /// <param name="values"></param>
+    /// <returns></returns>
+    public static double StandardDeviation(this IEnumerable<double> values) {
+      return Math.Sqrt(Variance(values));
+    }
+
+    /// <summary>
+    /// Calculates the variance of values. (sum (x - x_mean)² / n)
+    /// </summary>
+    /// <param name="values"></param>
+    /// <returns></returns>
+    public static double Variance(this IEnumerable<double> values) {
+      IList<double> list = values as IList<double>;
+      if (list == null) {
+        list = values.ToList();
+      }
+      if (list.Count == 0) throw new ArgumentException("Enumeration contains no elements.");
+
+      double mean = list.Average();
+      double squaredErrorsSum = 0.0;
+      int n = list.Count;
+      int s = 0;
+      for (int i = 0; i < n; i++) {
+        if (!double.IsNaN(list[i])) {
+          double d = list[i] - mean;
+          squaredErrorsSum += d * d;
+          s++;
+        }
+      }
+      if (s == 0) {
+        throw new ArgumentException("Enumeration contains no non-NaN elements.");
+      }
+      return squaredErrorsSum / n;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Common/3.3/HeuristicLab.Common-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Common/3.3/HeuristicLab.Common-3.3.csproj	(revision 3461)
+++ trunk/sources/HeuristicLab.Common/3.3/HeuristicLab.Common-3.3.csproj	(revision 3462)
@@ -95,4 +95,5 @@
     <Compile Include="DeepCloneable.cs" />
     <Compile Include="Content\IContent.cs" />
+    <Compile Include="EnumerableStatisticExtensions.cs" />
     <Compile Include="IDeepCloneable.cs" />
     <Compile Include="ReferenceEqualityComparer.cs" />
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/ArgumentCreater.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/ArgumentCreater.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/ArgumentCreater.cs	(revision 3462)
@@ -29,5 +29,5 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using System.Collections.Generic;
 using System.Text;
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/ArgumentDeleter.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/ArgumentDeleter.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/ArgumentDeleter.cs	(revision 3462)
@@ -29,5 +29,5 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using System.Collections.Generic;
 using System.Text;
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/ArgumentDuplicater.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/ArgumentDuplicater.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/ArgumentDuplicater.cs	(revision 3462)
@@ -29,5 +29,5 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using System.Collections.Generic;
 using System.Text;
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/GrammarModifier.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/GrammarModifier.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/GrammarModifier.cs	(revision 3462)
@@ -29,5 +29,5 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using System.Collections.Generic;
 using System.Text;
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/RandomArchitectureAlteringOperator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/RandomArchitectureAlteringOperator.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/RandomArchitectureAlteringOperator.cs	(revision 3462)
@@ -29,5 +29,5 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using System.Collections.Generic;
 using System.Text;
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/SubroutineCreater.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/SubroutineCreater.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/SubroutineCreater.cs	(revision 3462)
@@ -29,5 +29,5 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using System.Collections.Generic;
 using System.Text;
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/SubroutineDeleter.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/SubroutineDeleter.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/SubroutineDeleter.cs	(revision 3462)
@@ -29,8 +29,9 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using System.Collections.Generic;
 using System.Text;
 using System.Diagnostics;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureAlteringOperators {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/SubroutineDuplicater.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/SubroutineDuplicater.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/SubroutineDuplicater.cs	(revision 3462)
@@ -29,5 +29,5 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using System.Collections.Generic;
 using System.Text;
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/SymbolicExpressionTreeArchitectureAlteringOperator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/SymbolicExpressionTreeArchitectureAlteringOperator.cs	(revision 3462)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureAlteringOperators/SymbolicExpressionTreeArchitectureAlteringOperator.cs	(revision 3462)
@@ -0,0 +1,81 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureAlteringOperators {
+  /// <summary>
+  /// Base class for architecture altering operators for symbolic expression trees.
+  /// </summary>
+  [StorableClass]
+  public abstract class SymbolicExpressionTreeArchitectureAlteringOperator : SymbolicExpressionTreeManipulator {
+    private const string MaxFunctionArgumentsParameterName = "MaxFunctionArguments";
+    private const string MaxFunctionDefiningBranchesParameterName = "MaxFunctionDefiningBranches";
+    public override bool CanChangeName {
+      get { return false; }
+    }
+
+    public IValueLookupParameter<IntValue> MaxFunctionDefiningBranchesParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaxFunctionDefiningBranchesParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaxFunctionArgumentsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaxFunctionArgumentsParameterName]; }
+    }
+    public IntValue MaxFunctionDefiningBranches {
+      get { return MaxFunctionDefiningBranchesParameter.ActualValue; }
+    }
+    public IntValue MaxFunctionArguments {
+      get { return MaxFunctionArgumentsParameter.ActualValue; }
+    }
+    public SymbolicExpressionTreeArchitectureAlteringOperator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaxFunctionDefiningBranchesParameterName, "The maximal allowed number of function defining branches."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaxFunctionArgumentsParameterName, "The maximal allowed number of arguments of a newly created function."));
+    }
+
+    protected override sealed void Manipulate(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar, IntValue maxTreeSize, IntValue maxTreeHeight, out bool success) {
+      ModifyArchitecture(random, symbolicExpressionTree, grammar, maxTreeSize, maxTreeHeight, MaxFunctionDefiningBranches, MaxFunctionArguments, out success);
+    }
+
+    public abstract void ModifyArchitecture(
+      IRandom random,
+      SymbolicExpressionTree tree,
+      ISymbolicExpressionGrammar grammar,
+      IntValue maxTreeSize,
+      IntValue maxTreeHeight,
+      IntValue maxFunctionDefiningBranches,
+      IntValue maxFunctionArguments,
+      out bool success
+      );
+  }
+}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Compiler/Instruction.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Compiler/Instruction.cs	(revision 3462)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Compiler/Instruction.cs	(revision 3462)
@@ -0,0 +1,44 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using System.Collections.Generic;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Compiler {
+  // total size of this struct should be small to improve cache access while executing the code
+  // should be aligned to 8/16/32 byte
+  // size = 4(8) + 1 + 1 + 2 = 8 (12)
+  public struct Instruction {
+    // the tree node can hold additional data that is necessary for the execution of this instruction
+    public SymbolicExpressionTreeNode dynamicNode;
+    // op code of the function that determines what operation should be executed
+    public byte opCode;
+    // number of arguments of the current instruction
+    public byte nArguments;
+    // an optional short value (addresses for calls, argument index for arguments)
+    public ushort iArg0;
+  }
+}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Compiler/SymbolicExpressionTreeCompiler.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Compiler/SymbolicExpressionTreeCompiler.cs	(revision 3462)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Compiler/SymbolicExpressionTreeCompiler.cs	(revision 3462)
@@ -0,0 +1,91 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Linq;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using System.Collections.Generic;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Compiler {
+  public class SymbolicExpressionTreeCompiler {
+    private Dictionary<string, ushort> entryPoint = new Dictionary<string, ushort>();
+    private List<Func<Instruction, Instruction>> postInstructionCompiledHooks = new List<Func<Instruction, Instruction>>();
+
+    public Instruction[] Compile(SymbolicExpressionTree tree, Func<SymbolicExpressionTreeNode, byte> opCodeMapper) {
+      List<Instruction> code = new List<Instruction>();
+      entryPoint.Clear();
+      // compile main body
+      code.AddRange(Compile(tree.Root.SubTrees[0].SubTrees[0], opCodeMapper));
+      // compile branches
+      var functionBranches = from node in tree.IterateNodesPrefix()
+                             where node.Symbol is Defun
+                             select node;
+      foreach (DefunTreeNode branch in functionBranches) {
+        if (code.Count > ushort.MaxValue) throw new ArgumentException("Code for the tree is too long (> ushort.MaxValue).");
+        entryPoint[branch.FunctionName] = (ushort)code.Count;
+        code.AddRange(Compile(branch.SubTrees[0], opCodeMapper));
+      }
+      // address of all functions is fixed now
+      // iterate through code again and fill in the jump locations
+      for (int i = 0; i < code.Count; i++) {
+        Instruction instr = code[i];
+        if (instr.dynamicNode.Symbol is InvokeFunction) {
+          var invokeNode = (InvokeFunctionTreeNode)instr.dynamicNode;
+          instr.iArg0 = entryPoint[invokeNode.Symbol.FunctionName];
+          code[i] = instr;
+        }
+      }
+
+      return code.ToArray();
+    }
+
+    private IEnumerable<Instruction> Compile(SymbolicExpressionTreeNode branch, Func<SymbolicExpressionTreeNode, byte> opCodeMapper) {
+      foreach (var node in branch.IterateNodesPrefix()) {
+        Instruction instr = new Instruction();
+        if (node.SubTrees.Count > 255) throw new ArgumentException("Number of subtrees is too big (>255)");
+        instr.nArguments = (byte)node.SubTrees.Count;
+        instr.opCode = opCodeMapper(node);
+        if (branch.Symbol is Argument) {
+          var argNode = (ArgumentTreeNode)node;
+          instr.iArg0 = (ushort)argNode.Symbol.ArgumentIndex;
+        }
+        instr.dynamicNode = node;
+        foreach (var hook in postInstructionCompiledHooks) {
+          instr = hook(instr);
+        }
+        yield return instr;
+      }
+    }
+
+    /// <summary>
+    /// Adds a function that will be called every time an instruction is compiled.
+    /// The compiled will insert the instruction returned by the hook into the code.
+    /// </summary>
+    /// <param name="hook">The hook that should be called for each compiled instruction.</param>
+    public void AddInstructionPostProcessingHook(Func<Instruction, Instruction> hook) {
+      postInstructionCompiledHooks.Add(hook);
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/ProbabilisticTreeCreator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/ProbabilisticTreeCreator.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/ProbabilisticTreeCreator.cs	(revision 3462)
@@ -20,17 +20,17 @@
 #endregion
 
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Random;
-using System;
-using System.Linq;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Collections.Generic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
-using System.Text;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureAlteringOperators;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators {
   [StorableClass]
   [Item("ProbabilisticTreeCreator", "An operator that creates new symbolic expression trees with uniformly distributed size")]
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/SymbolicExpressionTreeCreator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/SymbolicExpressionTreeCreator.cs	(revision 3462)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/SymbolicExpressionTreeCreator.cs	(revision 3462)
@@ -0,0 +1,77 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators {
+  /// <summary>
+  /// A base class for operators creating symbolic expression trees.
+  /// </summary>
+  [Item("SymbolicExpressionTreeCreator", "A base class for operators creating symbolic expression trees.")]
+  [StorableClass]
+  public abstract class SymbolicExpressionTreeCreator : SymbolicExpressionTreeOperator, ISolutionCreator {
+    private const string MaxFunctionDefinitionsParameterName = "MaxFunctionDefinitions";
+    private const string MaxFunctionArgumentsParameterName = "MaxFunctionArguments";
+    #region Parameter Properties
+    public IValueLookupParameter<IntValue> MaxFunctionDefinitionsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaxFunctionDefinitionsParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaxFunctionArgumentsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaxFunctionArgumentsParameterName]; }
+    }
+    #endregion
+
+    #region Propeties
+    public IntValue MaxFunctionDefinitions {
+      get { return MaxFunctionDefinitionsParameter.ActualValue; }
+    }
+    public IntValue MaxFunctionArguments {
+      get { return MaxFunctionArgumentsParameter.ActualValue; }
+    }
+
+    #endregion
+    protected SymbolicExpressionTreeCreator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaxFunctionDefinitionsParameterName, "Maximal number of function definitions in the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaxFunctionArgumentsParameterName, "Maximal number of arguments of automatically defined functions in the symbolic expression tree."));
+    }
+
+    public sealed override IOperation Apply() {
+      SymbolicExpressionTreeParameter.ActualValue = Create(Random, SymbolicExpressionGrammar,
+        MaxTreeSize, MaxTreeHeight, MaxFunctionDefinitions, MaxFunctionArguments);
+      return null;
+    }
+
+    protected abstract SymbolicExpressionTree Create(
+      IRandom random,
+      ISymbolicExpressionGrammar grammar,
+      IntValue maxTreeSize, IntValue maxTreeHeight,
+      IntValue maxFunctionDefinitions, IntValue maxFunctionArguments
+      );
+  }
+}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SubtreeCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SubtreeCrossover.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SubtreeCrossover.cs	(revision 3462)
@@ -28,8 +28,7 @@
 using System;
 using HeuristicLab.Parameters;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
-
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers {
   /// <summary>
   /// Takes two parent individuals P0 and P1 each. Selects a random node N0 of P0 and a random node N1 of P1.
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SymbolicExpressionTreeCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SymbolicExpressionTreeCrossover.cs	(revision 3462)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SymbolicExpressionTreeCrossover.cs	(revision 3462)
@@ -0,0 +1,92 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System;
+using System.Diagnostics;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers {
+  /// <summary>
+  /// A base class for operators that perform a crossover of symbolic expression trees.
+  /// </summary>
+  [Item("SymbolicExpressionTreeCrossover", "A base class for operators that perform a crossover of symbolic expression trees.")]
+  [StorableClass]
+  public abstract class SymbolicExpressionTreeCrossover : SymbolicExpressionTreeOperator, ICrossover {
+    private const string ParentsParameterName = "Parents";
+    private const string ChildParameterName = "Child";
+    private const string FailedCrossoverEventsParameterName = "FailedCrossoverEvents";
+    public ILookupParameter<ItemArray<SymbolicExpressionTree>> ParentsParameter {
+      get { return (SubScopesLookupParameter<SymbolicExpressionTree>)Parameters[ParentsParameterName]; }
+    }
+    public ILookupParameter<SymbolicExpressionTree> ChildParameter {
+      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[ChildParameterName]; }
+    }
+    public IValueParameter<IntValue> FailedCrossoverEventsParameter {
+      get { return (ValueParameter<IntValue>)Parameters[FailedCrossoverEventsParameterName]; }
+    }
+
+    public IntValue FailedCrossoverEvents {
+      get { return FailedCrossoverEventsParameter.Value; }
+    }
+    protected SymbolicExpressionTreeCrossover()
+      : base() {
+      Parameters.Add(new SubScopesLookupParameter<SymbolicExpressionTree>(ParentsParameterName, "The parent symbolic expression trees which should be crossed."));
+      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(ChildParameterName, "The child symbolic expression tree resulting from the crossover."));
+      Parameters.Add(new ValueParameter<IntValue>(FailedCrossoverEventsParameterName, "The number of failed crossover events (child is an exact copy of a parent)", new IntValue()));
+    }
+
+    public sealed override IOperation Apply() {
+      if (ParentsParameter.ActualValue.Length != 2)
+        throw new ArgumentException("Number of parents must be exactly two for symbolic expression tree crossover operators.");
+
+      SymbolicExpressionTree parent0 = ParentsParameter.ActualValue[0];
+      SymbolicExpressionTree parent1 = ParentsParameter.ActualValue[1];
+
+      IRandom random = RandomParameter.ActualValue;
+
+      // randomly swap parents to remove a possible bias from selection (e.g. when using gender-specific selection)
+      if (random.NextDouble() < 0.5) {
+        var tmp = parent0;
+        parent0 = parent1;
+        parent1 = tmp;
+      }
+
+      bool success;
+      SymbolicExpressionTree result = Cross(random, parent0, parent1,
+        MaxTreeSizeParameter.ActualValue, MaxTreeHeightParameter.ActualValue, out success);
+      
+      if (!success) FailedCrossoverEvents.Value++;
+
+      ChildParameter.ActualValue = result;
+      return base.Apply();
+    }
+
+    protected abstract SymbolicExpressionTree Cross(IRandom random, 
+      SymbolicExpressionTree parent0, SymbolicExpressionTree parent1,
+      IntValue maxTreeSize, IntValue maxTreeHeight, out bool success);
+  }
+}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/DefaultSymbolicExpressionGrammar.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/DefaultSymbolicExpressionGrammar.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/DefaultSymbolicExpressionGrammar.cs	(revision 3462)
@@ -28,5 +28,5 @@
 using System.Xml;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/GlobalSymbolicExpressionGrammar.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/GlobalSymbolicExpressionGrammar.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/GlobalSymbolicExpressionGrammar.cs	(revision 3462)
@@ -28,5 +28,5 @@
 using System.Xml;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.csproj	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.csproj	(revision 3462)
@@ -93,4 +93,10 @@
     <Compile Include="ArchitectureAlteringOperators\SubroutineDeleter.cs" />
     <Compile Include="ArchitectureAlteringOperators\SubroutineDuplicater.cs" />
+    <Compile Include="ArchitectureAlteringOperators\SymbolicExpressionTreeArchitectureAlteringOperator.cs" />
+    <Compile Include="Compiler\Instruction.cs" />
+    <Compile Include="Compiler\SymbolicExpressionTreeCompiler.cs" />
+    <Compile Include="Creators\SymbolicExpressionTreeCreator.cs" />
+    <Compile Include="Crossovers\SymbolicExpressionTreeCrossover.cs" />
+    <Compile Include="Manipulators\SymbolicExpressionTreeManipulator.cs" />
     <Compile Include="SymbolicExpressionTreeTopLevelNode.cs" />
     <Compile Include="Crossovers\SubtreeCrossover.cs">
@@ -102,9 +108,5 @@
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="SymbolicExpressionTreeArchitectureAlteringOperator.cs" />
     <Compile Include="SymbolicExpressionTreeOperator.cs" />
-    <Compile Include="Instruction.cs" />
-    <Compile Include="SymbolicExpressionTreeCompiler.cs" />
-    <Compile Include="SymbolicExpressionTreeManipulator.cs" />
     <Compile Include="SymbolicExpressionTreeTerminalNode.cs" />
     <Compile Include="Interfaces\ISymbolicExpressionGrammar.cs" />
@@ -112,11 +114,7 @@
     <Compile Include="HeuristicLabEncodingsSymbolicExpressionTreeEncodingPlugin.cs" />
     <Compile Include="Interfaces\ISymbolicExpressionTreeOperator.cs" />
-    <Compile Include="SymbolicExpressionTreeCreator.cs" />
     <Compile Include="SymbolicExpressionTree.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Symbol.cs" />
-    <Compile Include="SymbolicExpressionTreeCrossover.cs" />
     <Compile Include="SymbolicExpressionTreeNode.cs" />
-    <Compile Include="Symbols\Addition.cs" />
     <Compile Include="Symbols\Argument.cs" />
     <Compile Include="Symbols\ArgumentTreeNode.cs" />
@@ -127,7 +125,5 @@
     <Compile Include="Symbols\Defun.cs" />
     <Compile Include="Symbols\ProgramRootSymbol.cs" />
-    <Compile Include="Symbols\Division.cs" />
-    <Compile Include="Symbols\Multiplication.cs" />
-    <Compile Include="Symbols\Subtraction.cs" />
+    <Compile Include="Symbols\Symbol.cs" />
   </ItemGroup>
   <ItemGroup>
@@ -178,7 +174,4 @@
     </ProjectReference>
   </ItemGroup>
-  <ItemGroup>
-    <Folder Include="Manipulators\" />
-  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Instruction.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Instruction.cs	(revision 3461)
+++ 	(revision )
@@ -1,47 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using System.Collections.Generic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
-  public enum CodeSymbol : byte { 
-    Add,
-    Sub,
-    Mul,
-    Div,
-    Call,
-    Arg,
-    Values,
-    Dynamic
-  };
-  public struct Instruction {
-    public byte nArguments;
-    public CodeSymbol symbol;
-    public short iArg0;
-    public SymbolicExpressionTreeNode dynamicNode;
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionGrammar.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionGrammar.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionGrammar.cs	(revision 3462)
@@ -28,4 +28,5 @@
 using System.Xml;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/SymbolicExpressionTreeManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/SymbolicExpressionTreeManipulator.cs	(revision 3462)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/SymbolicExpressionTreeManipulator.cs	(revision 3462)
@@ -0,0 +1,69 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators {
+  /// <summary>
+  /// A base class for operators that manipulate real-valued vectors.
+  /// </summary>
+  [Item("SymbolicExpressionTreeManipulator", "A base class for operators that manipulate symbolic expression trees.")]
+  [StorableClass]
+  public abstract class SymbolicExpressionTreeManipulator : SymbolicExpressionTreeOperator, IManipulator {
+    private const string FailedManipulationEventsParameterName = "FailedManipulationEvents";
+
+    #region Parameter Properties
+    public IValueParameter<IntValue> FailedManipulationEventsParameter {
+      get { return (IValueParameter<IntValue>)Parameters[FailedManipulationEventsParameterName]; }
+    }
+    #endregion
+
+    #region Properties
+    public IntValue FailedManipulationEvents {
+      get { return FailedManipulationEventsParameter.Value; }
+    }
+    #endregion
+
+    public SymbolicExpressionTreeManipulator()
+      : base() {
+      Parameters.Add(new ValueParameter<IntValue>(FailedManipulationEventsParameterName, "The number of failed manipulation events.", new IntValue()));
+    }
+
+    public sealed override IOperation Apply() {
+      SymbolicExpressionTree tree = SymbolicExpressionTreeParameter.ActualValue;
+      bool success;
+      Manipulate(RandomParameter.ActualValue, tree, SymbolicExpressionGrammarParameter.ActualValue,
+        MaxTreeSizeParameter.ActualValue, MaxTreeHeightParameter.ActualValue, out success);
+
+      if (!success) FailedManipulationEvents.Value++;
+      return base.Apply();
+    }
+
+    protected abstract void Manipulate(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar,
+      IntValue maxTreeSize, IntValue maxTreeHeight, out bool success);
+  }
+}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbol.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbol.cs	(revision 3461)
+++ 	(revision )
@@ -1,58 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Text;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using System.Linq;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
-  [StorableClass]
-  [Item("Symbol", "Represents a symbol in a symbolic function tree.")]
-  public abstract class Symbol : NamedItem {
-    #region Properties
-    private double initialFrequency;
-    public double InitialFrequency {
-      get { return initialFrequency; }
-      set {
-        if (value < 0.0) throw new ArgumentException("InitialFrequency must be positive");
-        initialFrequency = value;
-      }
-    }
-    #endregion
-
-    protected Symbol()
-      : base() {
-      this.name = ItemName;
-      this.description = ItemDescription;
-      initialFrequency = 1.0;
-    }
-
-    public virtual SymbolicExpressionTreeNode CreateTreeNode() {
-      return new SymbolicExpressionTreeNode(this);
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeArchitectureAlteringOperator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeArchitectureAlteringOperator.cs	(revision 3461)
+++ 	(revision )
@@ -1,80 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
-using System.Collections.Generic;
-using System.Text;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
-  /// <summary>
-  /// Base class for architecture altering operators for symbolic expression trees.
-  /// </summary>
-  [StorableClass]
-  public abstract class SymbolicExpressionTreeArchitectureAlteringOperator : SymbolicExpressionTreeManipulator {
-    private const string MaxFunctionArgumentsParameterName = "MaxFunctionArguments";
-    private const string MaxFunctionDefiningBranchesParameterName = "MaxFunctionDefiningBranches";
-    public override bool CanChangeName {
-      get { return false; }
-    }
-
-    public IValueLookupParameter<IntValue> MaxFunctionDefiningBranchesParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters[MaxFunctionDefiningBranchesParameterName]; }
-    }
-    public IValueLookupParameter<IntValue> MaxFunctionArgumentsParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters[MaxFunctionArgumentsParameterName]; }
-    }
-    public IntValue MaxFunctionDefiningBranches {
-      get { return MaxFunctionDefiningBranchesParameter.ActualValue; }
-    }
-    public IntValue MaxFunctionArguments {
-      get { return MaxFunctionArgumentsParameter.ActualValue; }
-    }
-    public SymbolicExpressionTreeArchitectureAlteringOperator()
-      : base() {
-      Parameters.Add(new ValueLookupParameter<IntValue>(MaxFunctionDefiningBranchesParameterName, "The maximal allowed number of function defining branches."));
-      Parameters.Add(new ValueLookupParameter<IntValue>(MaxFunctionArgumentsParameterName, "The maximal allowed number of arguments of a newly created function."));
-    }
-
-    protected override sealed void Manipulate(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar, IntValue maxTreeSize, IntValue maxTreeHeight, out bool success) {
-      ModifyArchitecture(random, symbolicExpressionTree, grammar, maxTreeSize, maxTreeHeight, MaxFunctionDefiningBranches, MaxFunctionArguments, out success);
-    }
-
-    public abstract void ModifyArchitecture(
-      IRandom random,
-      SymbolicExpressionTree tree,
-      ISymbolicExpressionGrammar grammar,
-      IntValue maxTreeSize,
-      IntValue maxTreeHeight,
-      IntValue maxFunctionDefiningBranches,
-      IntValue maxFunctionArguments,
-      out bool success
-      );
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeCompiler.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeCompiler.cs	(revision 3461)
+++ 	(revision )
@@ -1,101 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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.Linq;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using System.Collections.Generic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
-  public class SymbolicExpressionTreeCompiler {
-    private Dictionary<Type, CodeSymbol> codeSymbol = new Dictionary<Type, CodeSymbol>() {
-      {typeof(Addition), CodeSymbol.Add},
-      {typeof(Subtraction), CodeSymbol.Sub},
-      {typeof(Multiplication), CodeSymbol.Mul},
-      {typeof(Division), CodeSymbol.Div},
-      {typeof(InvokeFunction), CodeSymbol.Call},
-      {typeof(Argument), CodeSymbol.Arg},
-      //{typeof(Values), CodeSymbol.Values}
-    };
-    private Dictionary<string, short> entryPoint = new Dictionary<string, short>();
-
-    public Instruction[] Compile(SymbolicExpressionTree tree) {
-      List<Instruction> code = new List<Instruction>();
-      entryPoint.Clear();
-      // compile main body
-      code.AddRange(Compile(tree.Root.SubTrees[0].SubTrees[0]));
-      // compile branches
-      var functionBranches = from node in tree.IterateNodesPrefix()
-                             where node.Symbol is Defun
-                             select node;
-      foreach (DefunTreeNode branch in functionBranches) {
-        entryPoint[branch.FunctionName] = (short)code.Count;
-        code.AddRange(Compile(branch.SubTrees[0]));
-      }
-      // address of all functions is fixed now
-      // iterate through code again and fill in the jump locations
-      for (int i = 0; i < code.Count; i++) {
-        Instruction instr = code[i];
-        if (instr.symbol == CodeSymbol.Call) {
-          var invokeNode = (InvokeFunctionTreeNode)instr.dynamicNode;
-          instr.iArg0 = entryPoint[invokeNode.Symbol.FunctionName];
-          instr.dynamicNode = null;
-          code[i] = instr;
-        }
-      }
-
-      return code.ToArray();
-    }
-
-    private IEnumerable<Instruction> Compile(SymbolicExpressionTreeNode branch) {
-      foreach (var node in IteratePrefix(branch)) {
-        Instruction instr = new Instruction();
-        if (node.SubTrees.Count > 255) throw new ArgumentException();
-        instr.nArguments = (byte)node.SubTrees.Count;
-        if (codeSymbol.ContainsKey(node.Symbol.GetType())) {
-          instr.symbol = codeSymbol[node.Symbol.GetType()];
-          if (instr.symbol == CodeSymbol.Arg) {
-            var argNode = (ArgumentTreeNode)node;
-            instr.iArg0 = (short)argNode.Symbol.ArgumentIndex;
-          } else if (instr.symbol == CodeSymbol.Call) {
-            instr.dynamicNode = node; // save node for fixup of jump addresses in second iteration
-          }
-        } else {
-          instr.symbol = CodeSymbol.Dynamic;
-          instr.dynamicNode = node;
-        }
-        yield return instr;
-      }
-    }
-
-    private IEnumerable<SymbolicExpressionTreeNode> IteratePrefix(SymbolicExpressionTreeNode branch) {
-      yield return branch;
-      foreach (var subtree in branch.SubTrees) {
-        foreach (var node in IteratePrefix(subtree))
-          yield return node;
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeCreator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeCreator.cs	(revision 3461)
+++ 	(revision )
@@ -1,77 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
-  /// <summary>
-  /// A base class for operators creating symbolic expression trees.
-  /// </summary>
-  [Item("SymbolicExpressionTreeCreator", "A base class for operators creating symbolic expression trees.")]
-  [StorableClass]
-  public abstract class SymbolicExpressionTreeCreator : SymbolicExpressionTreeOperator, ISolutionCreator {
-    private const string MaxFunctionDefinitionsParameterName = "MaxFunctionDefinitions";
-    private const string MaxFunctionArgumentsParameterName = "MaxFunctionArguments";
-    #region Parameter Properties
-    public IValueLookupParameter<IntValue> MaxFunctionDefinitionsParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters[MaxFunctionDefinitionsParameterName]; }
-    }
-    public IValueLookupParameter<IntValue> MaxFunctionArgumentsParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters[MaxFunctionArgumentsParameterName]; }
-    }
-    #endregion
-
-    #region Propeties
-    public IntValue MaxFunctionDefinitions {
-      get { return MaxFunctionDefinitionsParameter.ActualValue; }
-    }
-    public IntValue MaxFunctionArguments {
-      get { return MaxFunctionArgumentsParameter.ActualValue; }
-    }
-
-    #endregion
-    protected SymbolicExpressionTreeCreator()
-      : base() {
-      Parameters.Add(new ValueLookupParameter<IntValue>(MaxFunctionDefinitionsParameterName, "Maximal number of function definitions in the symbolic expression tree."));
-      Parameters.Add(new ValueLookupParameter<IntValue>(MaxFunctionArgumentsParameterName, "Maximal number of arguments of automatically defined functions in the symbolic expression tree."));
-    }
-
-    public sealed override IOperation Apply() {
-      SymbolicExpressionTreeParameter.ActualValue = Create(Random, SymbolicExpressionGrammar,
-        MaxTreeSize, MaxTreeHeight, MaxFunctionDefinitions, MaxFunctionArguments);
-      return null;
-    }
-
-    protected abstract SymbolicExpressionTree Create(
-      IRandom random,
-      ISymbolicExpressionGrammar grammar,
-      IntValue maxTreeSize, IntValue maxTreeHeight,
-      IntValue maxFunctionDefinitions, IntValue maxFunctionArguments
-      );
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeCrossover.cs	(revision 3461)
+++ 	(revision )
@@ -1,92 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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 HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System;
-using System.Diagnostics;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
-  /// <summary>
-  /// A base class for operators that perform a crossover of symbolic expression trees.
-  /// </summary>
-  [Item("SymbolicExpressionTreeCrossover", "A base class for operators that perform a crossover of symbolic expression trees.")]
-  [StorableClass]
-  public abstract class SymbolicExpressionTreeCrossover : SymbolicExpressionTreeOperator, ICrossover {
-    private const string ParentsParameterName = "Parents";
-    private const string ChildParameterName = "Child";
-    private const string FailedCrossoverEventsParameterName = "FailedCrossoverEvents";
-    public ILookupParameter<ItemArray<SymbolicExpressionTree>> ParentsParameter {
-      get { return (SubScopesLookupParameter<SymbolicExpressionTree>)Parameters[ParentsParameterName]; }
-    }
-    public ILookupParameter<SymbolicExpressionTree> ChildParameter {
-      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[ChildParameterName]; }
-    }
-    public IValueParameter<IntValue> FailedCrossoverEventsParameter {
-      get { return (ValueParameter<IntValue>)Parameters[FailedCrossoverEventsParameterName]; }
-    }
-
-    public IntValue FailedCrossoverEvents {
-      get { return FailedCrossoverEventsParameter.Value; }
-    }
-    protected SymbolicExpressionTreeCrossover()
-      : base() {
-      Parameters.Add(new SubScopesLookupParameter<SymbolicExpressionTree>(ParentsParameterName, "The parent symbolic expression trees which should be crossed."));
-      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(ChildParameterName, "The child symbolic expression tree resulting from the crossover."));
-      Parameters.Add(new ValueParameter<IntValue>(FailedCrossoverEventsParameterName, "The number of failed crossover events (child is an exact copy of a parent)", new IntValue()));
-    }
-
-    public sealed override IOperation Apply() {
-      if (ParentsParameter.ActualValue.Length != 2)
-        throw new ArgumentException("Number of parents must be exactly two for symbolic expression tree crossover operators.");
-
-      SymbolicExpressionTree parent0 = ParentsParameter.ActualValue[0];
-      SymbolicExpressionTree parent1 = ParentsParameter.ActualValue[1];
-
-      IRandom random = RandomParameter.ActualValue;
-
-      // randomly swap parents to remove a possible bias from selection (e.g. when using gender-specific selection)
-      if (random.NextDouble() < 0.5) {
-        var tmp = parent0;
-        parent0 = parent1;
-        parent1 = tmp;
-      }
-
-      bool success;
-      SymbolicExpressionTree result = Cross(random, parent0, parent1,
-        MaxTreeSizeParameter.ActualValue, MaxTreeHeightParameter.ActualValue, out success);
-      
-      if (!success) FailedCrossoverEvents.Value++;
-
-      ChildParameter.ActualValue = result;
-      return base.Apply();
-    }
-
-    protected abstract SymbolicExpressionTree Cross(IRandom random, 
-      SymbolicExpressionTree parent0, SymbolicExpressionTree parent1,
-      IntValue maxTreeSize, IntValue maxTreeHeight, out bool success);
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeManipulator.cs	(revision 3461)
+++ 	(revision )
@@ -1,69 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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 HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
-  /// <summary>
-  /// A base class for operators that manipulate real-valued vectors.
-  /// </summary>
-  [Item("SymbolicExpressionTreeManipulator", "A base class for operators that manipulate symbolic expression trees.")]
-  [StorableClass]
-  public abstract class SymbolicExpressionTreeManipulator : SymbolicExpressionTreeOperator, IManipulator {
-    private const string FailedManipulationEventsParameterName = "FailedManipulationEvents";
-
-    #region Parameter Properties
-    public IValueParameter<IntValue> FailedManipulationEventsParameter {
-      get { return (IValueParameter<IntValue>)Parameters[FailedManipulationEventsParameterName]; }
-    }
-    #endregion
-
-    #region Properties
-    public IntValue FailedManipulationEvents {
-      get { return FailedManipulationEventsParameter.Value; }
-    }
-    #endregion
-
-    public SymbolicExpressionTreeManipulator()
-      : base() {
-      Parameters.Add(new ValueParameter<IntValue>(FailedManipulationEventsParameterName, "The number of failed manipulation events.", new IntValue()));
-    }
-
-    public sealed override IOperation Apply() {
-      SymbolicExpressionTree tree = SymbolicExpressionTreeParameter.ActualValue;
-      bool success;
-      Manipulate(RandomParameter.ActualValue, tree, SymbolicExpressionGrammarParameter.ActualValue,
-        MaxTreeSizeParameter.ActualValue, MaxTreeHeightParameter.ActualValue, out success);
-
-      if (!success) FailedManipulationEvents.Value++;
-      return base.Apply();
-    }
-
-    protected abstract void Manipulate(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar,
-      IntValue maxTreeSize, IntValue maxTreeHeight, out bool success);
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeNode.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeNode.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeNode.cs	(revision 3462)
@@ -30,4 +30,5 @@
 using HeuristicLab.Data;
 using System.Diagnostics;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
@@ -38,5 +39,6 @@
     [Storable]
     private Symbol symbol;
-    //[Storable]
+
+    // parent relation is not persisted or cloned (will be set on AddSubtree or RemoveSubtree)
     private SymbolicExpressionTreeNode parent;
 
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTerminalNode.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTerminalNode.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTerminalNode.cs	(revision 3462)
@@ -28,4 +28,5 @@
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTopLevelNode.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTopLevelNode.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTopLevelNode.cs	(revision 3462)
@@ -30,4 +30,5 @@
 using HeuristicLab.Data;
 using System.Diagnostics;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
@@ -44,12 +45,5 @@
 
     private ISymbolicExpressionGrammar grammar;
-    //internal virtual ISymbolicExpressionGrammar Grammar {
-    //  get { return grammar; }
-    //  set {
-    //    grammar = value;
-    //    //foreach (var subtree in subTrees)
-    //    //  subtree.Grammar = value;
-    //  }
-    //}
+
     internal override ISymbolicExpressionGrammar Grammar {
       get {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Addition.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Addition.cs	(revision 3461)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols {
-  [StorableClass]
-  [Item("Addition", "Symbol that represents the + operator.")]
-  public sealed class Addition : Symbol {
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Argument.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Argument.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Argument.cs	(revision 3462)
@@ -23,5 +23,5 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols {
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   /// <summary>
   /// Symbol for function arguments
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ArgumentTreeNode.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ArgumentTreeNode.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ArgumentTreeNode.cs	(revision 3462)
@@ -22,5 +22,5 @@
 using System;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols {
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   [StorableClass]
   public sealed class ArgumentTreeNode : SymbolicExpressionTreeNode {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Defun.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Defun.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Defun.cs	(revision 3462)
@@ -23,5 +23,5 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols {
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   /// <summary>
   /// Symbol for function defining branches
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/DefunTreeNode.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/DefunTreeNode.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/DefunTreeNode.cs	(revision 3462)
@@ -24,5 +24,5 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols {
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   [StorableClass]
   public sealed class DefunTreeNode : SymbolicExpressionTreeTopLevelNode {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Division.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Division.cs	(revision 3461)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols {
-  [StorableClass]
-  [Item("Division", "Symbol that represents the / operator.")]
-  public sealed class Division : Symbol {
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunction.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunction.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunction.cs	(revision 3462)
@@ -23,5 +23,5 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols {
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   /// <summary>
   /// Symbol for invoking automatically defined functions
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunctionTreeNode.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunctionTreeNode.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunctionTreeNode.cs	(revision 3462)
@@ -22,5 +22,5 @@
 using System;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols {
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   [StorableClass]
   public sealed class InvokeFunctionTreeNode : SymbolicExpressionTreeNode {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Multiplication.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Multiplication.cs	(revision 3461)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols {
-  [StorableClass]
-  [Item("Multiplication", "Symbol that represents the * operator.")]
-  public sealed class Multiplication : Symbol {
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ProgramRootSymbol.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ProgramRootSymbol.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ProgramRootSymbol.cs	(revision 3462)
@@ -23,5 +23,5 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols {
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   [StorableClass]
   [Item("ProgramRootSymbol", "Special symbol that represents the program root node of a symbolic expression tree.")]
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/StartSymbol.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/StartSymbol.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/StartSymbol.cs	(revision 3462)
@@ -23,5 +23,5 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols {
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   [StorableClass]
   [Item("StartSymbol", "Special symbol that represents the starting node of the result producing branch of a symbolic expression tree.")]
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Subtraction.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Subtraction.cs	(revision 3461)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols {
-  [StorableClass]
-  [Item("Subtraction", "Symbol that represents the - operator.")]
-  public sealed class Subtraction : Symbol {
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs	(revision 3462)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs	(revision 3462)
@@ -0,0 +1,58 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using System.Linq;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
+  [StorableClass]
+  [Item("Symbol", "Represents a symbol in a symbolic function tree.")]
+  public abstract class Symbol : NamedItem {
+    #region Properties
+    private double initialFrequency;
+    public double InitialFrequency {
+      get { return initialFrequency; }
+      set {
+        if (value < 0.0) throw new ArgumentException("InitialFrequency must be positive");
+        initialFrequency = value;
+      }
+    }
+    #endregion
+
+    protected Symbol()
+      : base() {
+      this.name = ItemName;
+      this.description = ItemDescription;
+      initialFrequency = 1.0;
+    }
+
+    public virtual SymbolicExpressionTreeNode CreateTreeNode() {
+      return new SymbolicExpressionTreeNode(this);
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/AllArchitectureAlteringOperatorsTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/AllArchitectureAlteringOperatorsTest.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/AllArchitectureAlteringOperatorsTest.cs	(revision 3462)
@@ -30,4 +30,6 @@
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureAlteringOperators;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentCreaterTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentCreaterTest.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentCreaterTest.cs	(revision 3462)
@@ -29,4 +29,5 @@
 using System.Diagnostics;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureAlteringOperators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentDeleterTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentDeleterTest.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentDeleterTest.cs	(revision 3462)
@@ -29,4 +29,5 @@
 using System.Diagnostics;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureAlteringOperators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentDuplicaterTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentDuplicaterTest.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentDuplicaterTest.cs	(revision 3462)
@@ -29,4 +29,5 @@
 using System.Diagnostics;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureAlteringOperators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Grammars.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Grammars.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Grammars.cs	(revision 3462)
@@ -28,5 +28,5 @@
 using HeuristicLab.Random;
 using System.Diagnostics;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ProbabilisticTreeCreaterTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ProbabilisticTreeCreaterTest.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ProbabilisticTreeCreaterTest.cs	(revision 3462)
@@ -28,4 +28,5 @@
 using HeuristicLab.Random;
 using System.Diagnostics;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineCreaterTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineCreaterTest.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineCreaterTest.cs	(revision 3462)
@@ -29,4 +29,5 @@
 using System.Diagnostics;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureAlteringOperators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineDeleterTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineDeleterTest.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineDeleterTest.cs	(revision 3462)
@@ -29,4 +29,5 @@
 using System.Diagnostics;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureAlteringOperators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineDuplicaterTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineDuplicaterTest.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineDuplicaterTest.cs	(revision 3462)
@@ -29,4 +29,5 @@
 using System.Diagnostics;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureAlteringOperators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubtreeCrossoverTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubtreeCrossoverTest.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubtreeCrossoverTest.cs	(revision 3462)
@@ -28,4 +28,6 @@
 using HeuristicLab.Random;
 using System.Diagnostics;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntInterpreter.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntInterpreter.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntInterpreter.cs	(revision 3462)
@@ -25,5 +25,6 @@
 using HeuristicLab.Data;
 using System.Collections.Generic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Problems.ArtificialAnt.Symbols;
 
 namespace HeuristicLab.Problems.ArtificialAnt {
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntExpressionGrammar.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntExpressionGrammar.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntExpressionGrammar.cs	(revision 3462)
@@ -28,5 +28,6 @@
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Problems.ArtificialAnt.Symbols;
 namespace HeuristicLab.Problems.ArtificialAnt {
   [StorableClass]
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblem.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblem.cs	(revision 3462)
@@ -32,4 +32,8 @@
 using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureAlteringOperators;
 
 namespace HeuristicLab.Problems.ArtificialAnt {
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/IfFoodAhead.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/IfFoodAhead.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/IfFoodAhead.cs	(revision 3462)
@@ -24,5 +24,6 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-namespace HeuristicLab.Problems.ArtificialAnt {
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
   [StorableClass]
   [Item("IfFoodAhead", "Represents the if-food-ahead symbol in a artificial ant expression.")]
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Left.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Left.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Left.cs	(revision 3462)
@@ -24,5 +24,6 @@
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-namespace HeuristicLab.Problems.ArtificialAnt {
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
   [StorableClass]
   [Item("Left", "Represents the turn-left symbol in a artificial ant expression.")]
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Move.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Move.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Move.cs	(revision 3462)
@@ -24,5 +24,6 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-namespace HeuristicLab.Problems.ArtificialAnt {
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
   [StorableClass]
   [Item("Move", "Represents the move-forward symbol in a artificial ant expression.")]
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Prog2.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Prog2.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Prog2.cs	(revision 3462)
@@ -25,5 +25,6 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-namespace HeuristicLab.Problems.ArtificialAnt {
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
   [StorableClass]
   [Item("Prog2", "Represents the sequence symbol with 2 sub-trees in a artificial ant expression.")]
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Prog3.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Prog3.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Prog3.cs	(revision 3462)
@@ -24,5 +24,6 @@
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-namespace HeuristicLab.Problems.ArtificialAnt {
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
   [StorableClass]
   [Item("Prog3", "Represents the sequence symbol with 3 sub-trees in a artificial ant expression.")]
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Right.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Right.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Right.cs	(revision 3462)
@@ -24,5 +24,6 @@
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-namespace HeuristicLab.Problems.ArtificialAnt {
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
   [StorableClass]
   [Item("Right", "Represents the turn-right symbol in a artificial ant expression.")]
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/BestValidationSymbolicRegressionSolutionVisualizer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/BestValidationSymbolicRegressionSolutionVisualizer.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/BestValidationSymbolicRegressionSolutionVisualizer.cs	(revision 3462)
@@ -39,5 +39,5 @@
   [StorableClass]
   public sealed class BestValidationSymbolicRegressionSolutionVisualizer : SingleSuccessorOperator, ISingleObjectiveSolutionsVisualizer, ISolutionsVisualizer {
-    private const string EvaluatorParameterName = "Evaluator";
+    private const string SymbolicExpressionTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
     private const string SymbolicRegressionModelParameterName = "SymbolicRegressionModel";
     private const string DataAnalysisProblemDataParameterName = "DataAnalysisProblemData";
@@ -49,6 +49,6 @@
 
     #region parameter properties
-    public ILookupParameter<ISymbolicRegressionEvaluator> EvaluatorParameter {
-      get { return (ILookupParameter<ISymbolicRegressionEvaluator>)Parameters[EvaluatorParameterName]; }
+    public ILookupParameter<ISymbolicExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; }
     }
     public IValueLookupParameter<IntValue> ValidationSamplesStartParameter {
@@ -82,6 +82,6 @@
 
     #region properties
-    public ISymbolicRegressionEvaluator Evaluator {
-      get { return EvaluatorParameter.ActualValue; }
+    public ISymbolicExpressionTreeInterpreter SymbolicExpressionTreeInterpreter {
+      get { return SymbolicExpressionTreeInterpreterParameter.ActualValue; }
     }
     public IntValue ValidationSamplesStart {
@@ -98,4 +98,5 @@
       Parameters.Add(new SubScopesLookupParameter<DoubleValue>(QualityParameterName, "The quality of the symbolic regression solutions."));
       Parameters.Add(new LookupParameter<DataAnalysisProblemData>(DataAnalysisProblemDataParameterName, "The symbolic regression problme data on which the best solution should be evaluated."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of symbolic expression trees."));
       Parameters.Add(new ValueLookupParameter<IntValue>(ValidationSamplesStartParameterName, "The start index of the validation partition (part of the training partition)."));
       Parameters.Add(new ValueLookupParameter<IntValue>(ValidationSamplesEndParameterName, "The end index of the validation partition (part of the training partition)."));
@@ -113,5 +114,9 @@
 
       var currentBestExpression = (from expression in expressions
-                                   let validationQuality = SymbolicRegressionMeanSquaredErrorEvaluator.Calculate(expression, problemData.Dataset, problemData.TargetVariable.Value, validationSamplesStart, validationSamplesEnd)
+                                   let validationQuality =
+                                     SymbolicRegressionMeanSquaredErrorEvaluator.Calculate(
+                                       SymbolicExpressionTreeInterpreter, expression,
+                                       problemData.Dataset, problemData.TargetVariable.Value,
+                                       validationSamplesStart, validationSamplesEnd)
                                    select new { Expression = expression, ValidationQuality = validationQuality })
                                    .OrderBy(x => x.ValidationQuality)
@@ -121,5 +126,5 @@
       if (bestOfRunSolution == null) {
         // no best of run solution yet -> make a solution from the currentBestExpression
-        UpdateBestOfRunSolution(problemData, currentBestExpression.Expression);
+        UpdateBestOfRunSolution(problemData, currentBestExpression.Expression, SymbolicExpressionTreeInterpreter);
       } else {
         // compare quality of current best with best of run solution
@@ -127,5 +132,5 @@
         var bestOfRunValidationQuality = SimpleMSEEvaluator.Calculate(validationValues, estimatedValidationValues);
         if (bestOfRunValidationQuality > currentBestExpression.ValidationQuality) {
-          UpdateBestOfRunSolution(problemData, currentBestExpression.Expression);
+          UpdateBestOfRunSolution(problemData, currentBestExpression.Expression, SymbolicExpressionTreeInterpreter);
         }
       }
@@ -135,7 +140,11 @@
     }
 
-    private void UpdateBestOfRunSolution(DataAnalysisProblemData problemData, SymbolicExpressionTree tree) {
-      var newBestSolution = CreateDataAnalysisSolution(problemData, tree);
-      BestValidationSolutionParameter.ActualValue = newBestSolution;
+    private void UpdateBestOfRunSolution(DataAnalysisProblemData problemData, SymbolicExpressionTree tree, ISymbolicExpressionTreeInterpreter interpreter) {
+      var newBestSolution = CreateDataAnalysisSolution(problemData, tree, interpreter);
+      if (BestValidationSolutionParameter.ActualValue == null)
+        BestValidationSolutionParameter.ActualValue = newBestSolution;
+      else
+        // only update model
+        BestValidationSolutionParameter.ActualValue.Model = newBestSolution.Model;
 
       var trainingValues = problemData.Dataset.GetVariableValues(problemData.TargetVariable.Value, problemData.TrainingSamplesStart.Value, problemData.TrainingSamplesEnd.Value);
@@ -160,10 +169,7 @@
     }
 
-    private SymbolicRegressionModel CreateModel(DataAnalysisProblemData problemData, SymbolicExpressionTree expression) {
-      return new SymbolicRegressionModel(expression, problemData.InputVariables.Select(x => x.Value));
-    }
-
-    private SymbolicRegressionSolution CreateDataAnalysisSolution(DataAnalysisProblemData problemData, SymbolicExpressionTree expression) {
-      return new SymbolicRegressionSolution(problemData, CreateModel(problemData, expression));
+    private SymbolicRegressionSolution CreateDataAnalysisSolution(DataAnalysisProblemData problemData, SymbolicExpressionTree expression, ISymbolicExpressionTreeInterpreter interpreter) {
+      var model = new SymbolicRegressionModel(interpreter, expression, problemData.InputVariables.Select(s => s.Value));
+      return new SymbolicRegressionSolution(problemData, model);
     }
   }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionEvaluator.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionEvaluator.cs	(revision 3462)
@@ -34,4 +34,5 @@
 using HeuristicLab.Problems.DataAnalysis;
 using HeuristicLab.Operators;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
@@ -40,4 +41,5 @@
   public abstract class SymbolicRegressionEvaluator : SingleSuccessorOperator, ISymbolicRegressionEvaluator {
     private const string QualityParameterName = "Quality";
+    private const string SymbolicExpressionTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
     private const string FunctionTreeParameterName = "FunctionTree";
     private const string RegressionProblemDataParameterName = "RegressionProblemData";
@@ -49,4 +51,8 @@
     public ILookupParameter<DoubleValue> QualityParameter {
       get { return (ILookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+
+    public ILookupParameter<ISymbolicExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; }
     }
 
@@ -72,4 +78,7 @@
     #endregion
     #region properties
+    public ISymbolicExpressionTreeInterpreter SymbolicExpressionTreeInterpreter {
+      get { return SymbolicExpressionTreeInterpreterParameter.ActualValue; }
+    }
     public SymbolicExpressionTree SymbolicExpressionTree {
       get { return SymbolicExpressionTreeParameter.ActualValue; }
@@ -89,4 +98,5 @@
       : base() {
       Parameters.Add(new LookupParameter<DoubleValue>(QualityParameterName, "The quality of the evaluated symbolic regression solution."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic expression tree."));
       Parameters.Add(new LookupParameter<SymbolicExpressionTree>(FunctionTreeParameterName, "The symbolic regression solution encoded as a symbolic expression tree."));
       Parameters.Add(new LookupParameter<DataAnalysisProblemData>(RegressionProblemDataParameterName, "The problem data on which the symbolic regression solution should be evaluated."));
@@ -98,10 +108,15 @@
     public override IOperation Apply() {
       DoubleValue numberOfEvaluatedNodes = NumberOfEvaluatedNodesParameter.ActualValue;
-      QualityParameter.ActualValue = new DoubleValue(Evaluate(SymbolicExpressionTree, RegressionProblemData.Dataset,
+      QualityParameter.ActualValue = new DoubleValue(Evaluate(SymbolicExpressionTreeInterpreter, SymbolicExpressionTree, RegressionProblemData.Dataset,
         RegressionProblemData.TargetVariable, SamplesStart, SamplesEnd, numberOfEvaluatedNodes));
       return null;
     }
 
-    protected abstract double Evaluate(SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IntValue samplesStart, IntValue samplesEnd, DoubleValue numberOfEvaluatedNodes);
+    protected abstract double Evaluate(ISymbolicExpressionTreeInterpreter interpreter,
+      SymbolicExpressionTree solution,
+      Dataset dataset,
+      StringValue targetVariable,
+      IntValue samplesStart, IntValue samplesEnd,
+      DoubleValue numberOfEvaluatedNodes);
   }
 }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionMeanSquaredErrorEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionMeanSquaredErrorEvaluator.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionMeanSquaredErrorEvaluator.cs	(revision 3462)
@@ -41,14 +41,13 @@
   [StorableClass]
   public class SymbolicRegressionMeanSquaredErrorEvaluator : SymbolicRegressionEvaluator {
-    protected override double Evaluate(SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IntValue samplesStart, IntValue samplesEnd, DoubleValue numberOfEvaluatedNodes) {
-      double mse = Calculate(solution, dataset, targetVariable.Value, samplesStart.Value, samplesEnd.Value);
+    protected override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IntValue samplesStart, IntValue samplesEnd, DoubleValue numberOfEvaluatedNodes) {
+      double mse = Calculate(interpreter, solution, dataset, targetVariable.Value, samplesStart.Value, samplesEnd.Value);
       numberOfEvaluatedNodes.Value += solution.Size * (samplesEnd.Value - samplesStart.Value);
       return mse;
     }
 
-    public static double Calculate(SymbolicExpressionTree solution, Dataset dataset, string targetVariable, int start, int end) {
-      SimpleArithmeticExpressionEvaluator evaluator = new SimpleArithmeticExpressionEvaluator();
+    public static double Calculate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, string targetVariable, int start, int end) {
       int targetVariableIndex = dataset.GetVariableIndex(targetVariable);
-      var estimatedValues = evaluator.EstimatedValues(solution, dataset, Enumerable.Range(start, end - start));
+      var estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, Enumerable.Range(start, end - start));
       var originalValues = from row in Enumerable.Range(start, end - start) select dataset[row, targetVariableIndex];
       return SimpleMSEEvaluator.Calculate(originalValues, estimatedValues);
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionModel.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionModel.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionModel.cs	(revision 3462)
@@ -38,5 +38,6 @@
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
   [StorableClass]
-  public class SymbolicRegressionModel : DeepCloneable, IModel {
+  [Item("SymbolicRegressionModel", "A symbolic regression model represents an entity that provides estimated values based on input values.")]
+  public class SymbolicRegressionModel : Item {
     [Storable]
     private SymbolicExpressionTree tree;
@@ -45,31 +46,34 @@
     }
     [Storable]
-    private SimpleArithmeticExpressionEvaluator evaluator;
-    public SimpleArithmeticExpressionEvaluator Evaluator {
-      get { return evaluator; }
+    private ISymbolicExpressionTreeInterpreter interpreter;
+    public ISymbolicExpressionTreeInterpreter Interpreter {
+      get { return interpreter; }
     }
-    private Dataset emptyDataset;
-    private IEnumerable<int> firstRow = new int[] { 0 };
+    [Storable]
+    private List<string> inputVariables;
+    public IEnumerable<string> InputVariables {
+      get { return inputVariables.AsEnumerable(); }
+    }
 
     public SymbolicRegressionModel() : base() { } // for cloning
 
-    public SymbolicRegressionModel(SymbolicExpressionTree tree, IEnumerable<string> inputVariables)
+    public SymbolicRegressionModel(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree tree, IEnumerable<string> inputVariables)
       : base() {
       this.tree = tree;
-      this.evaluator = new SimpleArithmeticExpressionEvaluator();
-      emptyDataset = new Dataset(inputVariables, new double[1, inputVariables.Count()]);
+      this.interpreter = interpreter;
+      this.inputVariables = inputVariables.ToList();
     }
 
-    #region IModel Members
-
-    public double GetValue(double[] xs) {
-      if (xs.Length != emptyDataset.Columns) throw new ArgumentException("Length of input vector doesn't match model");
-      for (int i = 0; i < xs.Length; i++) {
-        emptyDataset[0, i] = xs[i];
-      }
-      return evaluator.EstimatedValues(tree, emptyDataset, firstRow).First();
+    public IEnumerable<double> GetEstimatedValues(Dataset dataset, int start, int end) {
+      return interpreter.GetSymbolicExpressionTreeValues(tree, dataset, Enumerable.Range(start, end - start));
     }
 
-    #endregion
+    public override IDeepCloneable Clone(Cloner cloner) {
+      var clone = (SymbolicRegressionModel)base.Clone(cloner);
+      clone.tree = (SymbolicExpressionTree)tree.Clone(cloner);
+      clone.interpreter = (ISymbolicExpressionTreeInterpreter)interpreter.Clone(cloner);
+      clone.inputVariables = new List<string>(inputVariables);
+      return clone;
+    }
   }
 }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs	(revision 3462)
@@ -34,4 +34,8 @@
 using HeuristicLab.Problems.DataAnalysis.Regression;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureAlteringOperators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
@@ -144,6 +148,8 @@
       var globalGrammar = new GlobalSymbolicExpressionGrammar(grammar);
       var visualizer = new BestValidationSymbolicRegressionSolutionVisualizer();
+      var interpreter = new SimpleArithmeticExpressionInterpreter();
       Parameters.Add(new ValueParameter<BoolValue>("Maximization", "Set to false as the error of the regression model should be minimized.", new BoolValue(false)));
       Parameters.Add(new ValueParameter<SymbolicExpressionTreeCreator>("SolutionCreator", "The operator which should be used to create new symbolic regression solutions.", creator));
+      Parameters.Add(new ValueParameter<ISymbolicExpressionTreeInterpreter>("SymbolicExpressionTreeInterpreter", "The interpreter that should be used to evaluate the symbolic expression tree.", interpreter));
       Parameters.Add(new ValueParameter<ISymbolicRegressionEvaluator>("Evaluator", "The operator which should be used to evaluate symbolic regression solutions.", evaluator));
       Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The minimal error value that reached by symbolic regression solutions for the problem."));
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionSolution.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionSolution.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionSolution.cs	(revision 3462)
@@ -36,12 +36,61 @@
   [StorableClass]
   public sealed class SymbolicRegressionSolution : DataAnalysisSolution {
-    public new SymbolicRegressionModel Model {
-      get { return (SymbolicRegressionModel)base.Model; }
-      set { base.Model = value; }
+    private SymbolicRegressionModel model;
+    public SymbolicRegressionModel Model {
+      get { return model; }
+      set {
+        if (model != value) {
+          if (value == null) throw new ArgumentNullException();
+          model = value;
+          OnModelChanged(EventArgs.Empty);
+        }
+      }
     }
 
     public SymbolicRegressionSolution() : base() { }
     public SymbolicRegressionSolution(DataAnalysisProblemData problemData, SymbolicRegressionModel model)
-      : base(problemData, model) {
+      : base(problemData) {
+      this.model = model;
+      RecalculateEstimatedValues();
+    }
+
+    public event EventHandler ModelChanged;
+    private void OnModelChanged(EventArgs e) {
+      RecalculateEstimatedValues();
+      var listeners = ModelChanged;
+      if (listeners != null)
+        listeners(this, e);
+    }
+
+    protected override void OnProblemDataChanged(EventArgs e) {
+      RecalculateEstimatedValues();
+    }
+
+    private void RecalculateEstimatedValues() {
+      estimatedValues = model.GetEstimatedValues(ProblemData.Dataset, 0, ProblemData.Dataset.Rows).ToList();
+      OnEstimatedValuesChanged(EventArgs.Empty);
+    }
+
+    private List<double> estimatedValues;
+    public override IEnumerable<double> EstimatedValues {
+      get {
+        return estimatedValues.AsEnumerable();
+      }
+    }
+
+    public override IEnumerable<double> EstimatedTrainingValues {
+      get {
+        int start = ProblemData.TrainingSamplesStart.Value;
+        int n = ProblemData.TrainingSamplesEnd.Value - start;
+        return estimatedValues.Skip(start).Take(n).ToList();
+      }
+    }
+
+    public override IEnumerable<double> EstimatedTestValues {
+      get {
+        int start = ProblemData.TestSamplesStart.Value;
+        int n = ProblemData.TestSamplesEnd.Value - start;
+        return estimatedValues.Skip(start).Take(n).ToList();
+      }
     }
   }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/DataAnalysisProblemDataView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/DataAnalysisProblemDataView.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/DataAnalysisProblemDataView.cs	(revision 3462)
@@ -29,5 +29,9 @@
       : this() {
       Content = content;
-      variableCollectionView.Content = content.Variables.AsReadOnly();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      variableCollectionView.Content = Content.Variables.AsReadOnly();
     }
 
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/EstimatedValuesView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/EstimatedValuesView.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/EstimatedValuesView.cs	(revision 3462)
@@ -68,5 +68,5 @@
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
-      Content.ModelChanged += new EventHandler(Content_ModelChanged);
+      Content.EstimatedValuesChanged += new EventHandler(Content_EstimatedValuesChanged);
       Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
     }
@@ -74,5 +74,5 @@
     protected override void DeregisterContentEvents() {
       base.DeregisterContentEvents();
-      Content.ModelChanged -= new EventHandler(Content_ModelChanged);
+      Content.EstimatedValuesChanged -= new EventHandler(Content_EstimatedValuesChanged);
       Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
     }
@@ -82,5 +82,5 @@
     }
 
-    void Content_ModelChanged(object sender, EventArgs e) {
+    void Content_EstimatedValuesChanged(object sender, EventArgs e) {
       OnContentChanged();
     }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/LineChartView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/LineChartView.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/LineChartView.cs	(revision 3462)
@@ -65,9 +65,15 @@
       : this() {
       Content = dataAnalysisSolution;
-      DrawTargetVariableValues();
-      DrawEstimatedValues();
+      RedrawChart();
     }
 
-    private void DrawEstimatedValues() {
+    private void RedrawChart() {
+      this.chart.Series.Clear();
+      this.chart.Series.Add(TARGETVARIABLE_SERIES_NAME);
+      this.chart.Series[TARGETVARIABLE_SERIES_NAME].LegendText = Content.ProblemData.TargetVariable.Value;
+      this.chart.Series[TARGETVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine;
+      this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindY(Content.ProblemData.Dataset[Content.ProblemData.TargetVariable.Value]);
+      this.UpdateStripLines();
+
       this.chart.Series.Add(ESTIMATEDVALUES_SERIES_NAME);
       this.chart.Series[ESTIMATEDVALUES_SERIES_NAME].LegendText = Content.ItemName;
@@ -77,17 +83,8 @@
     }
 
-    private void DrawTargetVariableValues() {
-      this.chart.Series.Clear();
-      this.chart.Series.Add(TARGETVARIABLE_SERIES_NAME);
-      this.chart.Series[TARGETVARIABLE_SERIES_NAME].LegendText = Content.ProblemData.TargetVariable.Value;
-      this.chart.Series[TARGETVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine;
-      this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindY(Content.ProblemData.Dataset[Content.ProblemData.TargetVariable.Value]);
-      this.UpdateStripLines();
-    }
-
     #region events
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
-      Content.ModelChanged += new EventHandler(Content_ModelChanged);
+      Content.EstimatedValuesChanged += new EventHandler(Content_EstimatedValuesChanged);
       Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
     }
@@ -95,19 +92,19 @@
     protected override void DeregisterContentEvents() {
       base.DeregisterContentEvents();
-      Content.ModelChanged -= new EventHandler(Content_ModelChanged);
+      Content.EstimatedValuesChanged -= new EventHandler(Content_EstimatedValuesChanged);
       Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
     }
 
     void Content_ProblemDataChanged(object sender, EventArgs e) {
-      OnContentChanged();
+      RedrawChart();
     }
 
-    void Content_ModelChanged(object sender, EventArgs e) {
-      OnContentChanged();
+    void Content_EstimatedValuesChanged(object sender, EventArgs e) {
+      UpdateEstimatedValuesLineChart();
     }
 
     protected override void OnContentChanged() {
       base.OnContentChanged();
-      UpdateEstimatedValuesLineChart();
+      RedrawChart();
     }
 
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/ScatterPlotView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/ScatterPlotView.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/ScatterPlotView.cs	(revision 3462)
@@ -84,14 +84,15 @@
       : this() {
       Content = dataAnalysisSolution;
+      UpdateChart();
     }
 
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
-      Content.ModelChanged += new EventHandler(Content_ModelChanged);
+      Content.EstimatedValuesChanged += new EventHandler(Content_EstimatedValuesChanged);
       Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
     }
     protected override void DeregisterContentEvents() {
       base.DeregisterContentEvents();
-      Content.ModelChanged -= new EventHandler(Content_ModelChanged);
+      Content.EstimatedValuesChanged -= new EventHandler(Content_EstimatedValuesChanged);
       Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
     }
@@ -99,9 +100,9 @@
 
     void Content_ProblemDataChanged(object sender, EventArgs e) {
-      OnContentChanged();
-    }
-
-    void Content_ModelChanged(object sender, EventArgs e) {
-      OnContentChanged();
+      UpdateChart();
+    }
+
+    void Content_EstimatedValuesChanged(object sender, EventArgs e) {
+      UpdateSeries();
     }
 
@@ -127,30 +128,33 @@
 
     private void UpdateSeries() {
-      string targetVariableName = Content.ProblemData.TargetVariable.Value;
-      Dataset dataset = Content.ProblemData.Dataset;
-      int trainingStart = Content.ProblemData.TrainingSamplesStart.Value;
-      int trainingEnd = Content.ProblemData.TrainingSamplesEnd.Value;
-      int testStart = Content.ProblemData.TestSamplesStart.Value;
-      int testEnd = Content.ProblemData.TestSamplesEnd.Value;
-      if (this.chart.Series[ALL_SERIES].Points.Count > 0)
-        this.chart.Series[ALL_SERIES].Points.DataBindXY(Content.EstimatedValues.ToArray(), "",
-          dataset[targetVariableName], "");
-      if (this.chart.Series[TRAINING_SERIES].Points.Count > 0)
-        this.chart.Series[TRAINING_SERIES].Points.DataBindXY(Content.EstimatedTrainingValues.ToArray(), "",
-          dataset.GetVariableValues(targetVariableName, trainingStart, trainingEnd), "");
-      if (this.chart.Series[TEST_SERIES].Points.Count > 0)
-        this.chart.Series[TEST_SERIES].Points.DataBindXY(Content.EstimatedTestValues.ToArray(), "",
-          dataset.GetVariableValues(targetVariableName, testStart, testEnd), "");
-
-      double max = Math.Max(Content.EstimatedValues.Max(), dataset.GetMax(targetVariableName));
-      double min = Math.Min(Content.EstimatedValues.Min(), dataset.GetMin(targetVariableName));
-
-      max = Math.Ceiling(max) * 1.2;
-      min = Math.Floor(min) * 0.8;
-
-      this.chart.ChartAreas[0].AxisX.Maximum = max;
-      this.chart.ChartAreas[0].AxisX.Minimum = min;
-      this.chart.ChartAreas[0].AxisY.Maximum = max;
-      this.chart.ChartAreas[0].AxisY.Minimum = min;
+      if (InvokeRequired) Invoke((Action)UpdateSeries);
+      else {
+        string targetVariableName = Content.ProblemData.TargetVariable.Value;
+        Dataset dataset = Content.ProblemData.Dataset;
+        int trainingStart = Content.ProblemData.TrainingSamplesStart.Value;
+        int trainingEnd = Content.ProblemData.TrainingSamplesEnd.Value;
+        int testStart = Content.ProblemData.TestSamplesStart.Value;
+        int testEnd = Content.ProblemData.TestSamplesEnd.Value;
+        if (this.chart.Series[ALL_SERIES].Points.Count > 0)
+          this.chart.Series[ALL_SERIES].Points.DataBindXY(Content.EstimatedValues.ToArray(), "",
+            dataset[targetVariableName], "");
+        if (this.chart.Series[TRAINING_SERIES].Points.Count > 0)
+          this.chart.Series[TRAINING_SERIES].Points.DataBindXY(Content.EstimatedTrainingValues.ToArray(), "",
+            dataset.GetVariableValues(targetVariableName, trainingStart, trainingEnd), "");
+        if (this.chart.Series[TEST_SERIES].Points.Count > 0)
+          this.chart.Series[TEST_SERIES].Points.DataBindXY(Content.EstimatedTestValues.ToArray(), "",
+            dataset.GetVariableValues(targetVariableName, testStart, testEnd), "");
+
+        double max = Math.Max(Content.EstimatedValues.Max(), dataset.GetMax(targetVariableName));
+        double min = Math.Min(Content.EstimatedValues.Min(), dataset.GetMin(targetVariableName));
+
+        max = Math.Ceiling(max) * 1.2;
+        min = Math.Floor(min) * 0.8;
+
+        this.chart.ChartAreas[0].AxisX.Maximum = max;
+        this.chart.ChartAreas[0].AxisX.Minimum = min;
+        this.chart.ChartAreas[0].AxisY.Maximum = max;
+        this.chart.ChartAreas[0].AxisY.Minimum = min;
+      }
     }
 
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SimplifiedSymbolicExpressionModelView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SimplifiedSymbolicExpressionModelView.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SimplifiedSymbolicExpressionModelView.cs	(revision 3462)
@@ -44,5 +44,5 @@
     public new SymbolicRegressionSolution Content {
       get { return (SymbolicRegressionSolution)base.Content; }
-      set {        base.Content = value;       }
+      set { base.Content = value; }
     }
 
@@ -58,6 +58,24 @@
     }
 
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ModelChanged += new EventHandler(Content_ModelChanged);
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ModelChanged -= new EventHandler(Content_ModelChanged);
+    }
+
+    void Content_ModelChanged(object sender, EventArgs e) {
+      UpdateTreeChart();
+    }
+
     protected override void OnContentChanged() {
       base.OnContentChanged();
+      UpdateTreeChart();
+    }
+
+    private void UpdateTreeChart() {
       var simplifier = new SymbolicSimplifier();
       var simplifiedTree = simplifier.Simplify(Content.Model.SymbolicExpressionTree);
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SymbolicExpressionModelView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SymbolicExpressionModelView.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SymbolicExpressionModelView.cs	(revision 3462)
@@ -57,6 +57,25 @@
     }
 
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ModelChanged += new EventHandler(Content_ModelChanged);
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ModelChanged -= new EventHandler(Content_ModelChanged);
+    }
+
+    void Content_ModelChanged(object sender, EventArgs e) {
+      UpdateTreeChart();
+    }
+
     protected override void OnContentChanged() {
       base.OnContentChanged();
+      UpdateTreeChart();
+    }
+
+    private void UpdateTreeChart() {
       viewHost.Content = Content.Model.SymbolicExpressionTree;
     }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisSolution.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisSolution.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisSolution.cs	(revision 3462)
@@ -35,17 +35,5 @@
   [Item("DataAnalysisSolution", "Represents a solution for a data analysis problem which can be visualized in the GUI.")]
   [StorableClass]
-  public class DataAnalysisSolution : Item {
-    [Storable]
-    private IModel model;
-    public IModel Model {
-      get { return model; }
-      set {
-        if (model != value) {
-          model = value;
-          OnModelChanged();
-        }
-      }
-    }
-
+  public abstract class DataAnalysisSolution : Item {
     [Storable]
     private DataAnalysisProblemData problemData;
@@ -58,35 +46,17 @@
           problemData = value;
           RegisterProblemDataEvents();
-          OnProblemDataChanged();
+          OnProblemDataChanged(EventArgs.Empty);
         }
       }
     }
 
-    private List<double> estimatedValues;
-    public IEnumerable<double> EstimatedValues {
-      get {
-        return estimatedValues;
-      }
-    }
+    public abstract IEnumerable<double> EstimatedValues { get; }
+    public abstract IEnumerable<double> EstimatedTrainingValues { get; }
+    public abstract IEnumerable<double> EstimatedTestValues { get; }
 
-    private List<double> estimatedTrainingValues;
-    public IEnumerable<double> EstimatedTrainingValues {
-      get {
-        return estimatedTrainingValues;
-      }
-    }
-
-    private List<double> estimatedTestValues;
-    public IEnumerable<double> EstimatedTestValues {
-      get {
-        return estimatedTestValues;
-      }
-    }
-
-    public DataAnalysisSolution() : base() { }
-    public DataAnalysisSolution(DataAnalysisProblemData problemData, IModel model)
+    protected DataAnalysisSolution() : base() { }
+    protected DataAnalysisSolution(DataAnalysisProblemData problemData)
       : this() {
       this.problemData = problemData;
-      this.model = model;
       Initialize();
     }
@@ -98,30 +68,9 @@
     private void Initialize() {
       if (problemData != null) RegisterProblemDataEvents();
-      if (problemData != null && model != null) RecalculateEstimatedValues();
-    }
-
-    private void RecalculateEstimatedValues() {
-      estimatedValues = GetEstimatedValues(0, problemData.Dataset.Rows).ToList();
-      int nTrainingValues = problemData.TrainingSamplesEnd.Value - problemData.TrainingSamplesStart.Value;
-      estimatedTrainingValues = estimatedValues.Skip(problemData.TrainingSamplesStart.Value).Take(nTrainingValues).ToList();
-      int nTestValues = problemData.TestSamplesEnd.Value - problemData.TestSamplesStart.Value;
-      estimatedTestValues = estimatedValues.Skip(problemData.TestSamplesStart.Value).Take(nTestValues).ToList();
-    }
-
-    private IEnumerable<double> GetEstimatedValues(int start, int end) {
-      double[] xs = new double[ProblemData.InputVariables.Count];
-      for (int row = 0; row < ProblemData.Dataset.Rows; row++) {
-        for (int i = 0; i < xs.Length; i++) {
-          var variableIndex = ProblemData.Dataset.GetVariableIndex(ProblemData.InputVariables[i].Value);
-          xs[i] = ProblemData.Dataset[row, variableIndex];
-        }
-        yield return model.GetValue(xs);
-      }
     }
 
     public override IDeepCloneable Clone(Cloner cloner) {
-      DataAnalysisSolution clone = new DataAnalysisSolution();
-      cloner.RegisterClonedObject(this, clone);
-      clone.model = (IModel)cloner.Clone(model);
+      DataAnalysisSolution clone = (DataAnalysisSolution)base.Clone(cloner);
+      // don't clone the problem data!
       clone.problemData = problemData;
       clone.Initialize();
@@ -130,28 +79,27 @@
 
     #region Events
-    public event EventHandler ModelChanged;
-    private void OnModelChanged() {
-      RecalculateEstimatedValues();
-      var changed = ModelChanged;
-      if (changed != null)
-        changed(this, EventArgs.Empty);
-    }
-    public event EventHandler ProblemDataChanged;
-    private void OnProblemDataChanged() {
-      RecalculateEstimatedValues();
-      var changed = ProblemDataChanged;
-      if (changed != null)
-        changed(this, EventArgs.Empty);
-    }
-
-    private void RegisterProblemDataEvents() {
+    protected virtual void RegisterProblemDataEvents() {
       ProblemData.ProblemDataChanged += new EventHandler(ProblemData_Changed);
     }
-    private void DeregisterProblemDataEvents() {
+    protected virtual void DeregisterProblemDataEvents() {
       ProblemData.ProblemDataChanged += new EventHandler(ProblemData_Changed);
     }
 
     private void ProblemData_Changed(object sender, EventArgs e) {
-      OnProblemDataChanged();
+      OnProblemDataChanged(EventArgs.Empty);
+    }
+
+    public event EventHandler ProblemDataChanged;
+    protected virtual void OnProblemDataChanged(EventArgs e) {
+      var listeners = ProblemDataChanged;
+      if (listeners != null)
+        listeners(this, e);
+    }
+
+    public event EventHandler EstimatedValuesChanged;
+    protected virtual void OnEstimatedValuesChanged(EventArgs e) {
+      var listeners = EstimatedValuesChanged;
+      if (listeners != null)
+        listeners(this, e);
     }
     #endregion
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMSEEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMSEEvaluator.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMSEEvaluator.cs	(revision 3462)
@@ -73,5 +73,5 @@
                      select values[row, ORIGINAL_INDEX];
       var estimated = from row in Enumerable.Range(0, values.Rows)
-                      select values[row, ORIGINAL_INDEX];
+                      select values[row, ESTIMATION_INDEX];
       return Calculate(original, estimated);
     }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleNMSEEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleNMSEEvaluator.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleNMSEEvaluator.cs	(revision 3462)
@@ -24,4 +24,5 @@
 using System.Linq;
 using System.Text;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/HeuristicLab.Problems.DataAnalysis-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/HeuristicLab.Problems.DataAnalysis-3.3.csproj	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/HeuristicLab.Problems.DataAnalysis-3.3.csproj	(revision 3462)
@@ -98,13 +98,16 @@
     <Compile Include="Evaluators\SimpleVarianceAccountedForEvaluator.cs" />
     <Compile Include="HeuristicLabProblemsDataAnalysisPlugin.cs" />
-    <Compile Include="Interfaces\IModel.cs" />
     <Compile Include="MatrixExtensions.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Statistics.cs" />
     <Compile Include="Symbolic\ArithmeticExpressionGrammar.cs" />
-    <Compile Include="Symbolic\SimpleArithmeticExpressionEvaluator.cs" />
+    <Compile Include="Symbolic\ISymbolicExpressionTreeInterpreter.cs" />
+    <Compile Include="Symbolic\SimpleArithmeticExpressionInterpreter.cs" />
     <Compile Include="Symbolic\SymbolicSimplifier.cs" />
+    <Compile Include="Symbolic\Symbols\Addition.cs" />
     <Compile Include="Symbolic\Symbols\Constant.cs" />
     <Compile Include="Symbolic\Symbols\ConstantTreeNode.cs" />
+    <Compile Include="Symbolic\Symbols\Division.cs" />
+    <Compile Include="Symbolic\Symbols\Multiplication.cs" />
+    <Compile Include="Symbolic\Symbols\Subtraction.cs" />
     <Compile Include="Symbolic\Symbols\Variable.cs" />
     <Compile Include="Symbolic\Symbols\VariableTreeNode.cs" />
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Statistics.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Statistics.cs	(revision 3461)
+++ 	(revision )
@@ -1,92 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Text;
-using System.Linq;
-
-namespace HeuristicLab.Problems.DataAnalysis {
-  public static class StatisticExtensions {
-    /// <summary>
-    /// Calculates the median element of the enumeration.
-    /// </summary>
-    /// <param name="values"></param>
-    /// <returns></returns>
-    public static double Median(this IEnumerable<double> values) {
-      int n = values.Count();
-      if (n == 0) throw new InvalidOperationException("Enumeration contains no elements.");
-
-      double[] sortedValues = new double[n];
-      int i = 0;
-      foreach (double x in values)
-        sortedValues[i++] = x;
-
-      Array.Sort(sortedValues);
-
-      // return the middle element (if n is uneven) or the average of the two middle elements if n is even.
-      if (n % 2 == 1) {
-        return sortedValues[n / 2];
-      } else {
-        return (sortedValues[(n / 2) - 1] + sortedValues[n / 2]) / 2.0;
-      }
-    }
-
-
-    /// <summary>
-    /// Calculates the standard deviation of values.
-    /// </summary>
-    /// <param name="values"></param>
-    /// <returns></returns>
-    public static double StandardDeviation(this IEnumerable<double> values) {
-      return Math.Sqrt(Variance(values));
-    }
-
-    /// <summary>
-    /// Calculates the variance of values. (sum (x - x_mean)² / n)
-    /// </summary>
-    /// <param name="values"></param>
-    /// <returns></returns>
-    public static double Variance(this IEnumerable<double> values) {
-      IList<double> list = values as IList<double>;
-      if (list == null) {
-        list = values.ToList();
-      }
-      if (list.Count == 0) throw new ArgumentException("Enumeration contains no elements.");
-
-      double mean = list.Average();
-      double squaredErrorsSum = 0.0;
-      int n = list.Count;
-      int s = 0;
-      for (int i = 0; i < n; i++) {
-        if (!double.IsNaN(list[i])) {
-          double d = list[i] - mean;
-          squaredErrorsSum += d * d;
-          s++;
-        }
-      }
-      if (s == 0) {
-        throw new ArgumentException("Enumeration contains no non-NaN elements.");
-      }
-      return squaredErrorsSum / n;
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/ArithmeticExpressionGrammar.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/ArithmeticExpressionGrammar.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/ArithmeticExpressionGrammar.cs	(revision 3462)
@@ -27,5 +27,5 @@
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Data;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/ISymbolicExpressionTreeInterpreter.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/ISymbolicExpressionTreeInterpreter.cs	(revision 3462)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/ISymbolicExpressionTreeInterpreter.cs	(revision 3462)
@@ -0,0 +1,33 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using System.Collections.Generic;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicExpressionTreeInterpreter : IItem {
+    IEnumerable<double> GetSymbolicExpressionTreeValues(SymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows);
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionEvaluator.cs	(revision 3461)
+++ 	(revision )
@@ -1,121 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using System.Collections.Generic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
-using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-
-namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
-  [StorableClass]
-  [Item("SimpleArithmeticExpressionEvaluator", "Default evaluator for arithmetic symbolic expression trees.")]
-  public class SimpleArithmeticExpressionEvaluator {
-    private Dataset dataset;
-    private int row;
-    private Instruction[] code;
-    private int pc;
-    public IEnumerable<double> EstimatedValues(SymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) {
-      this.dataset = dataset;
-      var compiler = new SymbolicExpressionTreeCompiler();
-      code = compiler.Compile(tree);
-      foreach (var row in rows) {
-        this.row = row;
-        pc = 0;
-        argumentStack.Clear();
-        var estimatedValue = Evaluate();
-        if (double.IsNaN(estimatedValue) || double.IsInfinity(estimatedValue)) yield return 0.0;
-        else yield return estimatedValue;
-      }
-    }
-
-    private Stack<List<double>> argumentStack = new Stack<List<double>>();
-    public double Evaluate() {
-      var currentInstr = code[pc++];
-      switch (currentInstr.symbol) {
-        case CodeSymbol.Add: {
-            double s = 0.0;
-            for (int i = 0; i < currentInstr.nArguments; i++) {
-              s += Evaluate();
-            }
-            return s;
-          }
-        case CodeSymbol.Sub: {
-            double s = Evaluate();
-            for (int i = 1; i < currentInstr.nArguments; i++) {
-              s -= Evaluate();
-            }
-            return s;
-          }
-        case CodeSymbol.Mul: {
-            double p = Evaluate();
-            for (int i = 1; i < currentInstr.nArguments; i++) {
-              p *= Evaluate();
-            }
-            return p;
-          }
-        case CodeSymbol.Div: {
-            double p = Evaluate();
-            for (int i = 1; i < currentInstr.nArguments; i++) {
-              p /= Evaluate();
-            }
-            return p;
-          }
-        case CodeSymbol.Call: {
-            // save current arguments
-            List<double> arguments = new List<double>();
-            // evaluate sub-trees
-            for (int i = 0; i < currentInstr.nArguments; i++) {
-              arguments.Add(Evaluate());
-            }
-            argumentStack.Push(arguments);
-            // save the pc
-            int nextPc = pc;
-            // set pc to start of function  
-            pc = currentInstr.iArg0;
-            // evaluate the function
-            double v = Evaluate();
-            argumentStack.Pop();
-            // restore the pc => evaluation will continue at point after my subtrees  
-            pc = nextPc;
-            return v;
-          }
-        case CodeSymbol.Arg: {
-            return argumentStack.Peek()[currentInstr.iArg0];
-          }
-        case CodeSymbol.Dynamic: {
-            var variableTreeNode = currentInstr.dynamicNode as VariableTreeNode;
-            if (variableTreeNode != null) {
-              return dataset[row, dataset.GetVariableIndex(variableTreeNode.VariableName)] * variableTreeNode.Weight;
-            }
-            var constTreeNode = currentInstr.dynamicNode as ConstantTreeNode;
-            if (constTreeNode != null) {
-              return constTreeNode.Value;
-            } else throw new NotSupportedException();
-          }
-        default: throw new NotSupportedException();
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs	(revision 3462)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs	(revision 3462)
@@ -0,0 +1,153 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using System.Collections.Generic;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Compiler;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("SimpleArithmeticExpressionInterpreter", "Interpreter for arithmetic symbolic expression trees including function calls.")]
+  public class SimpleArithmeticExpressionInterpreter : Item, ISymbolicExpressionTreeInterpreter {
+    private class OpCodes {
+      public const byte Add = 1;
+      public const byte Sub = 2;
+      public const byte Mul = 3;
+      public const byte Div = 4;
+      public const byte Variable = 5;
+      public const byte Constant = 6;
+      public const byte Call = 100;
+      public const byte Arg = 101;
+    }
+
+    private Dataset dataset;
+    private int row;
+    private Instruction[] code;
+    private int pc;
+
+    public IEnumerable<double> GetSymbolicExpressionTreeValues(SymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) {
+      this.dataset = dataset;
+      var compiler = new SymbolicExpressionTreeCompiler();
+      compiler.AddInstructionPostProcessingHook(PostProcessInstruction);
+      code = compiler.Compile(tree, MapSymbolToOpCode);
+      foreach (var row in rows) {
+        this.row = row;
+        pc = 0;
+        argumentStack.Clear();
+        var estimatedValue = Evaluate();
+        if (double.IsNaN(estimatedValue) || double.IsInfinity(estimatedValue)) yield return 0.0;
+        else yield return estimatedValue;
+      }
+    }
+
+    private Instruction PostProcessInstruction(Instruction instr) {
+      if (instr.opCode == OpCodes.Variable) {
+        var variableTreeNode = instr.dynamicNode as VariableTreeNode;
+        instr.iArg0 = (ushort)dataset.GetVariableIndex(variableTreeNode.VariableName);
+      }
+      return instr;
+    }
+
+    private byte MapSymbolToOpCode(SymbolicExpressionTreeNode treeNode) {
+      if (treeNode.Symbol is Addition) return OpCodes.Add;
+      if (treeNode.Symbol is Subtraction) return OpCodes.Sub;
+      if (treeNode.Symbol is Multiplication) return OpCodes.Mul;
+      if (treeNode.Symbol is Division) return OpCodes.Div;
+      if (treeNode.Symbol is HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols.Variable) return OpCodes.Variable;
+      if (treeNode.Symbol is Constant) return OpCodes.Constant;
+      if (treeNode.Symbol is InvokeFunction) return OpCodes.Call;
+      if (treeNode.Symbol is Argument) return OpCodes.Arg;
+      throw new NotSupportedException("Symbol: " + treeNode.Symbol);
+    }
+
+    private Stack<List<double>> argumentStack = new Stack<List<double>>();
+    public double Evaluate() {
+      var currentInstr = code[pc++];
+      switch (currentInstr.opCode) {
+        case OpCodes.Add: {
+            double s = 0.0;
+            for (int i = 0; i < currentInstr.nArguments; i++) {
+              s += Evaluate();
+            }
+            return s;
+          }
+        case OpCodes.Sub: {
+            double s = Evaluate();
+            for (int i = 1; i < currentInstr.nArguments; i++) {
+              s -= Evaluate();
+            }
+            return s;
+          }
+        case OpCodes.Mul: {
+            double p = Evaluate();
+            for (int i = 1; i < currentInstr.nArguments; i++) {
+              p *= Evaluate();
+            }
+            return p;
+          }
+        case OpCodes.Div: {
+            double p = Evaluate();
+            for (int i = 1; i < currentInstr.nArguments; i++) {
+              p /= Evaluate();
+            }
+            return p;
+          }
+        case OpCodes.Call: {
+            // save current arguments
+            List<double> arguments = new List<double>();
+            // evaluate sub-trees
+            for (int i = 0; i < currentInstr.nArguments; i++) {
+              arguments.Add(Evaluate());
+            }
+            argumentStack.Push(arguments);
+            // save the pc
+            int nextPc = pc;
+            // set pc to start of function  
+            pc = currentInstr.iArg0;
+            // evaluate the function
+            double v = Evaluate();
+            argumentStack.Pop();
+            // restore the pc => evaluation will continue at point after my subtrees  
+            pc = nextPc;
+            return v;
+          }
+        case OpCodes.Arg: {
+            return argumentStack.Peek()[currentInstr.iArg0];
+          }
+        case OpCodes.Variable: {
+            var variableTreeNode = currentInstr.dynamicNode as VariableTreeNode;
+            return dataset[row, currentInstr.iArg0] * variableTreeNode.Weight;
+          }
+        case OpCodes.Constant: {
+            var constTreeNode = currentInstr.dynamicNode as ConstantTreeNode;
+            return constTreeNode.Value;
+          }
+        default: throw new NotSupportedException();
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SymbolicSimplifier.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SymbolicSimplifier.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SymbolicSimplifier.cs	(revision 3462)
@@ -25,5 +25,5 @@
 using HeuristicLab.Common;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
 using System.Diagnostics;
@@ -38,4 +38,10 @@
   /// </summary>
   public class SymbolicSimplifier {
+    private Addition addSymbol = new Addition();
+    private Multiplication mulSymbol = new Multiplication();
+    private Division divSymbol = new Division();
+    private Constant constSymbol = new Constant();
+    private Variable varSymbol = new Variable();
+
     public SymbolicExpressionTree Simplify(SymbolicExpressionTree originalTree) {
       var clone = (SymbolicExpressionTreeNode)originalTree.Root.Clone();
@@ -194,5 +200,5 @@
         return a;
       } else {
-        var div = (new Division()).CreateTreeNode();
+        var div = divSymbol.CreateTreeNode();
         div.SubTrees.Add(a);
         div.SubTrees.Add(b);
@@ -215,5 +221,5 @@
       } else if (IsAddition(a) && IsAddition(b)) {
         // merge additions
-        var add = (new Addition()).CreateTreeNode();
+        var add = addSymbol.CreateTreeNode();
         for (int i = 0; i < a.SubTrees.Count - 1; i++) add.AddSubTree(a.SubTrees[i]);
         for (int i = 0; i < b.SubTrees.Count - 1; i++) add.AddSubTree(b.SubTrees[i]);
@@ -232,5 +238,5 @@
         return MakeAddition(b, a);
       } else if (IsAddition(a) && IsConstant(b)) {
-        var add = (new Addition()).CreateTreeNode();
+        var add = addSymbol.CreateTreeNode();
         for (int i = 0; i < a.SubTrees.Count - 1; i++) add.AddSubTree(a.SubTrees[i]);
         if (IsConstant(a.SubTrees.Last()))
@@ -242,5 +248,5 @@
         return add;
       } else if (IsAddition(a)) {
-        var add = (new Addition()).CreateTreeNode();
+        var add = addSymbol.CreateTreeNode();
         add.AddSubTree(b);
         foreach (var subTree in a.SubTrees) {
@@ -250,5 +256,5 @@
         return add;
       } else {
-        var add = (new Addition()).CreateTreeNode();
+        var add = addSymbol.CreateTreeNode();
         add.SubTrees.Add(a);
         add.SubTrees.Add(b);
@@ -296,5 +302,5 @@
         return MakeDivision(MakeMultiplication(b.SubTrees[0], a), b.SubTrees[1]);
       } else if (IsMultiplication(a) && IsMultiplication(b)) {
-        var mul = (new Multiplication()).CreateTreeNode();
+        var mul = mulSymbol.CreateTreeNode();
         for (int i = 0; i < a.SubTrees.Count - 1; i++) mul.AddSubTree(a.SubTrees[i]);
         for (int i = 0; i < b.SubTrees.Count - 1; i++) mul.AddSubTree(b.SubTrees[i]);
@@ -302,15 +308,15 @@
         return mul;
       } else if (IsMultiplication(a)) {
-        var mul = (new Multiplication()).CreateTreeNode();
+        var mul = mulSymbol.CreateTreeNode();
         for (int i = 0; i < a.SubTrees.Count - 1; i++) mul.AddSubTree(a.SubTrees[i]);
         mul.AddSubTree(MakeMultiplication(a.SubTrees.Last(), b));
         return mul;
       } else if (IsMultiplication(b)) {
-        var mul = (new Multiplication()).CreateTreeNode();
+        var mul = mulSymbol.CreateTreeNode();
         for (int i = 0; i < b.SubTrees.Count - 1; i++) mul.AddSubTree(b.SubTrees[i]);
         mul.AddSubTree(MakeMultiplication(b.SubTrees.Last(), a));
         return mul;
       } else {
-        var mul = (new Multiplication()).CreateTreeNode();
+        var mul = mulSymbol.CreateTreeNode();
         mul.SubTrees.Add(a);
         mul.SubTrees.Add(b);
@@ -346,5 +352,5 @@
 
     private SymbolicExpressionTreeNode MakeConstant(double value) {
-      ConstantTreeNode constantTreeNode = (ConstantTreeNode)(new Constant().CreateTreeNode());
+      ConstantTreeNode constantTreeNode = (ConstantTreeNode)(constSymbol.CreateTreeNode());
       constantTreeNode.Value = value;
       return (SymbolicExpressionTreeNode)constantTreeNode;
@@ -352,5 +358,5 @@
 
     private SymbolicExpressionTreeNode MakeVariable(double weight, string name) {
-      var tree = (VariableTreeNode)(new Variable().CreateTreeNode());
+      var tree = (VariableTreeNode)varSymbol.CreateTreeNode();
       tree.Weight = weight;
       tree.VariableName = name;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Addition.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Addition.cs	(revision 3462)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Addition.cs	(revision 3462)
@@ -0,0 +1,31 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
+  [StorableClass]
+  [Item("Addition", "Symbol that represents the + operator.")]
+  public sealed class Addition : Symbol {
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Constant.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Constant.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Constant.cs	(revision 3462)
@@ -27,4 +27,5 @@
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Parameters;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Division.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Division.cs	(revision 3462)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Division.cs	(revision 3462)
@@ -0,0 +1,31 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
+  [StorableClass]
+  [Item("Division", "Symbol that represents the / operator.")]
+  public sealed class Division : Symbol {
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Multiplication.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Multiplication.cs	(revision 3462)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Multiplication.cs	(revision 3462)
@@ -0,0 +1,31 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
+  [StorableClass]
+  [Item("Multiplication", "Symbol that represents the * operator.")]
+  public sealed class Multiplication : Symbol {
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Subtraction.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Subtraction.cs	(revision 3462)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Subtraction.cs	(revision 3462)
@@ -0,0 +1,31 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
+  [StorableClass]
+  [Item("Subtraction", "Symbol that represents the - operator.")]
+  public sealed class Subtraction : Symbol {
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Variable.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Variable.cs	(revision 3461)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Variable.cs	(revision 3462)
@@ -30,4 +30,5 @@
 using System.Collections.Generic;
 using System;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
