Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/GraphicalSymbolicExpressionTreeView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/GraphicalSymbolicExpressionTreeView.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/GraphicalSymbolicExpressionTreeView.Designer.cs	(revision 10269)
@@ -0,0 +1,79 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  partial class GraphicalSymbolicExpressionTreeView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.symbolicExpressionTreeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart();
+      this.SuspendLayout();
+      // 
+      // functionTreeChart
+      // 
+      this.symbolicExpressionTreeChart.BackgroundColor = System.Drawing.Color.White;
+      this.symbolicExpressionTreeChart.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.symbolicExpressionTreeChart.Tree = null;
+      this.symbolicExpressionTreeChart.LineColor = System.Drawing.Color.Black;
+      this.symbolicExpressionTreeChart.Location = new System.Drawing.Point(0, 0);
+      this.symbolicExpressionTreeChart.Name = "functionTreeChart";
+      this.symbolicExpressionTreeChart.Size = new System.Drawing.Size(407, 367);
+      this.symbolicExpressionTreeChart.Spacing = 5;
+      this.symbolicExpressionTreeChart.TabIndex = 0;
+      this.symbolicExpressionTreeChart.TextFont = new System.Drawing.Font("Times New Roman", 6F);
+      // 
+      // FunctionTreeView
+      // 
+      this.AllowDrop = true;
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.symbolicExpressionTreeChart);
+      this.Name = "FunctionTreeView";
+      this.Size = new System.Drawing.Size(407, 367);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private SymbolicExpressionTreeChart symbolicExpressionTreeChart;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/GraphicalSymbolicExpressionTreeView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/GraphicalSymbolicExpressionTreeView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/GraphicalSymbolicExpressionTreeView.cs	(revision 10269)
@@ -0,0 +1,55 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  [View("Graphical SymbolicExpressionTree View")]
+  [Content(typeof(ISymbolicExpressionTree), true)]
+  public partial class GraphicalSymbolicExpressionTreeView : ItemView {
+    public new ISymbolicExpressionTree Content {
+      get { return (ISymbolicExpressionTree)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public GraphicalSymbolicExpressionTreeView()
+      : base() {
+      InitializeComponent();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        symbolicExpressionTreeChart.Tree = null;
+      } else {
+        symbolicExpressionTreeChart.Tree = Content;
+      }
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      symbolicExpressionTreeChart.Enabled = Content != null;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.csproj
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.csproj	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.csproj	(revision 10269)
@@ -0,0 +1,280 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{423BD94F-963A-438E-BA45-3BB3D61CD03B}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views</RootNamespace>
+    <AssemblyName>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="HeuristicLab.Collections-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common.Resources-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core.Views-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core.Views-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Data.Views-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data.Views-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization.Views-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Views-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Random-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Visualization.ChartControlsExtensions-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Windows.Forms.DataVisualization" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Plugin.cs" />
+    <Compile Include="SymbolicExpressionGrammarAllowedChildSymbolsControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SymbolicExpressionGrammarAllowedChildSymbolsControl.Designer.cs">
+      <DependentUpon>SymbolicExpressionGrammarAllowedChildSymbolsControl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="SymbolicExpressionGrammarEditorView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SymbolicExpressionGrammarEditorView.Designer.cs">
+      <DependentUpon>SymbolicExpressionGrammarEditorView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="SymbolicExpressionGrammarSampleExpressionTreeView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SymbolicExpressionGrammarSampleExpressionTreeView.Designer.cs">
+      <DependentUpon>SymbolicExpressionGrammarSampleExpressionTreeView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="SymbolicExpressionGrammarView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SymbolicExpressionGrammarView.Designer.cs">
+      <DependentUpon>SymbolicExpressionGrammarView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="SymbolView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SymbolView.Designer.cs">
+      <DependentUpon>SymbolView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="GraphicalSymbolicExpressionTreeView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="GraphicalSymbolicExpressionTreeView.Designer.cs">
+      <DependentUpon>GraphicalSymbolicExpressionTreeView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="SymbolicExpressionTreeChart.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SymbolicExpressionTreeChart.Designer.cs">
+      <DependentUpon>SymbolicExpressionTreeChart.cs</DependentUpon>
+    </Compile>
+    <Compile Include="SymbolicExpressionView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SymbolicExpressionView.Designer.cs">
+      <DependentUpon>SymbolicExpressionView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="VisualSymbolicExpressionTreeNode.cs" />
+    <Compile Include="VisualSymbolicExpressionTreeNodeConnection.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
+      <Project>{06d4a186-9319-48a0-bade-a2058d462eea}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.EvolutionTracking\3.4\HeuristicLab.EvolutionTracking-3.4.csproj">
+      <Project>{1f75cea3-464f-4a6f-b2f0-04b9841ebc16}</Project>
+      <Name>HeuristicLab.EvolutionTracking-3.4</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+</PreBuildEvent>
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+export ProjectDir=$(ProjectDir)
+export SolutionDir=$(SolutionDir)
+
+$SolutionDir/PreBuildEvent.sh
+</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/Plugin.cs.frame
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/Plugin.cs.frame	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/Plugin.cs.frame	(revision 10269)
@@ -0,0 +1,41 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views","Provides views for the symbolic expression tree encoding.", "3.4.5.$WCREV$")]
+  [PluginFile("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")]
+  [PluginDependency("HeuristicLab.MainForm", "3.3")]
+  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
+  [PluginDependency("HeuristicLab.Random","3.3")]
+  public class HeuristicLabEncodingsSymbolicExpressionTreeEncodingViewsPlugin : PluginBase {
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/Properties/AssemblyInfo.cs.frame
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/Properties/AssemblyInfo.cs.frame	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/Properties/AssemblyInfo.cs.frame	(revision 10269)
@@ -0,0 +1,47 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views")]
+[assembly: AssemblyDescription("Provides views for the symbolic expression tree encoding.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("673A0460-B43A-4853-84D2-4125532B7F51")]
+
+[assembly: AssemblyVersion("3.4.0.0")]
+[assembly: AssemblyFileVersion("3.4.5.$WCREV$")]
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolView.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolView.Designer.cs	(revision 10269)
@@ -0,0 +1,184 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  partial class SymbolView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.initialFrequencyLabel = new System.Windows.Forms.Label();
+      this.initialFrequencyTextBox = new System.Windows.Forms.TextBox();
+      this.enabledCheckBox = new System.Windows.Forms.CheckBox();
+      this.minimumArityLabel = new System.Windows.Forms.Label();
+      this.maximumArityLabel = new System.Windows.Forms.Label();
+      this.minimumArityTextBox = new System.Windows.Forms.TextBox();
+      this.maximumArityTextBox = new System.Windows.Forms.TextBox();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      this.nameTextBox.Location = new System.Drawing.Point(93, 0);
+      this.nameTextBox.Size = new System.Drawing.Size(202, 20);
+      // 
+      // infoLabel
+      // 
+      this.infoLabel.Location = new System.Drawing.Point(301, 3);
+      // 
+      // initialFrequencyLabel
+      // 
+      this.initialFrequencyLabel.AutoSize = true;
+      this.initialFrequencyLabel.Location = new System.Drawing.Point(3, 29);
+      this.initialFrequencyLabel.Name = "initialFrequencyLabel";
+      this.initialFrequencyLabel.Size = new System.Drawing.Size(84, 13);
+      this.initialFrequencyLabel.TabIndex = 3;
+      this.initialFrequencyLabel.Text = "Initial frequency:";
+      this.toolTip.SetToolTip(this.initialFrequencyLabel, "Relative frequency of the symbol in randomly created trees");
+      // 
+      // initialFrequencyTextBox
+      // 
+      this.initialFrequencyTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.errorProvider.SetIconAlignment(this.initialFrequencyTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.initialFrequencyTextBox.Location = new System.Drawing.Point(93, 26);
+      this.initialFrequencyTextBox.Name = "initialFrequencyTextBox";
+      this.initialFrequencyTextBox.Size = new System.Drawing.Size(227, 20);
+      this.initialFrequencyTextBox.TabIndex = 4;
+      this.initialFrequencyTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.initialFrequencyTextBox_KeyDown);
+      this.initialFrequencyTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.initialFrequencyTextBox_Validating);
+      this.initialFrequencyTextBox.Validated += new System.EventHandler(this.initialFrequencyTextBox_Validated);
+      // 
+      // enabledCheckBox
+      // 
+      this.enabledCheckBox.AutoSize = true;
+      this.enabledCheckBox.Location = new System.Drawing.Point(93, 104);
+      this.enabledCheckBox.Name = "enabledCheckBox";
+      this.enabledCheckBox.Size = new System.Drawing.Size(65, 17);
+      this.enabledCheckBox.TabIndex = 5;
+      this.enabledCheckBox.Text = "Enabled";
+      this.enabledCheckBox.UseVisualStyleBackColor = true;
+      this.enabledCheckBox.CheckedChanged += new System.EventHandler(this.checkBoxEnabled_CheckedChanged);
+      // 
+      // minimumArityLabel
+      // 
+      this.minimumArityLabel.AutoSize = true;
+      this.minimumArityLabel.Location = new System.Drawing.Point(3, 55);
+      this.minimumArityLabel.Name = "minimumArityLabel";
+      this.minimumArityLabel.Size = new System.Drawing.Size(74, 13);
+      this.minimumArityLabel.TabIndex = 8;
+      this.minimumArityLabel.Text = "Minimum Arity:";
+      this.toolTip.SetToolTip(this.minimumArityLabel, "The minimum arity of the symbol");
+      // 
+      // maximumArityLabel
+      // 
+      this.maximumArityLabel.AutoSize = true;
+      this.maximumArityLabel.Location = new System.Drawing.Point(3, 81);
+      this.maximumArityLabel.Name = "maximumArityLabel";
+      this.maximumArityLabel.Size = new System.Drawing.Size(74, 13);
+      this.maximumArityLabel.TabIndex = 6;
+      this.maximumArityLabel.Text = "Maximum Arity";
+      this.toolTip.SetToolTip(this.maximumArityLabel, "The maximum arity of the symbol");
+      // 
+      // minimumArityTextBox
+      // 
+      this.minimumArityTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.errorProvider.SetIconAlignment(this.minimumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.minimumArityTextBox.Location = new System.Drawing.Point(93, 52);
+      this.minimumArityTextBox.Name = "minimumArityTextBox";
+      this.minimumArityTextBox.ReadOnly = true;
+      this.minimumArityTextBox.Size = new System.Drawing.Size(227, 20);
+      this.minimumArityTextBox.TabIndex = 9;
+      // 
+      // maximumArityTextBox
+      // 
+      this.maximumArityTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.errorProvider.SetIconAlignment(this.maximumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.maximumArityTextBox.Location = new System.Drawing.Point(93, 78);
+      this.maximumArityTextBox.Name = "maximumArityTextBox";
+      this.maximumArityTextBox.ReadOnly = true;
+      this.maximumArityTextBox.Size = new System.Drawing.Size(227, 20);
+      this.maximumArityTextBox.TabIndex = 7;
+      // 
+      // SymbolView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.minimumArityTextBox);
+      this.Controls.Add(this.minimumArityLabel);
+      this.Controls.Add(this.maximumArityTextBox);
+      this.Controls.Add(this.maximumArityLabel);
+      this.Controls.Add(this.initialFrequencyTextBox);
+      this.Controls.Add(this.initialFrequencyLabel);
+      this.Controls.Add(this.enabledCheckBox);
+      this.Name = "SymbolView";
+      this.Size = new System.Drawing.Size(320, 123);
+      this.Controls.SetChildIndex(this.enabledCheckBox, 0);
+      this.Controls.SetChildIndex(this.initialFrequencyLabel, 0);
+      this.Controls.SetChildIndex(this.initialFrequencyTextBox, 0);
+      this.Controls.SetChildIndex(this.maximumArityLabel, 0);
+      this.Controls.SetChildIndex(this.maximumArityTextBox, 0);
+      this.Controls.SetChildIndex(this.minimumArityLabel, 0);
+      this.Controls.SetChildIndex(this.minimumArityTextBox, 0);
+      this.Controls.SetChildIndex(this.infoLabel, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    protected System.Windows.Forms.Label initialFrequencyLabel;
+    protected System.Windows.Forms.TextBox initialFrequencyTextBox;
+    protected System.Windows.Forms.CheckBox enabledCheckBox;
+    protected System.Windows.Forms.Label minimumArityLabel;
+    protected System.Windows.Forms.Label maximumArityLabel;
+    protected System.Windows.Forms.TextBox minimumArityTextBox;
+    protected System.Windows.Forms.TextBox maximumArityTextBox;
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolView.cs	(revision 10269)
@@ -0,0 +1,121 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.ComponentModel;
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  [View("Symbol View")]
+  [Content(typeof(ISymbol), true)]
+  public partial class SymbolView : NamedItemView {
+    public new ISymbol Content {
+      get { return (ISymbol)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public SymbolView() {
+      InitializeComponent();
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.Changed += new EventHandler(Content_Changed);
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.Changed -= new EventHandler(Content_Changed);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      UpdateControl();
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      initialFrequencyTextBox.Enabled = Content != null && !Locked;
+      initialFrequencyTextBox.ReadOnly = ReadOnly;
+      enabledCheckBox.Enabled = Content != null && !Locked && !ReadOnly;
+    }
+
+    #region content event handlers
+    private void Content_Changed(object sender, EventArgs e) {
+      UpdateControl();
+    }
+    #endregion
+
+    #region control event handlers
+    private void initialFrequencyTextBox_KeyDown(object sender, KeyEventArgs e) {
+      if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return))
+        initialFrequencyLabel.Select();  // select label to validate data
+
+      if (e.KeyCode == Keys.Escape) {
+        initialFrequencyTextBox.Text = Content.InitialFrequency.ToString();
+        initialFrequencyLabel.Select();  // select label to validate data
+      }
+    }
+    private void initialFrequencyTextBox_Validating(object sender, CancelEventArgs e) {
+      double freq;
+      if (double.TryParse(initialFrequencyTextBox.Text, out freq) && freq >= 0.0) {
+        errorProvider.SetError(initialFrequencyTextBox, string.Empty);
+        e.Cancel = false;
+      } else {
+        errorProvider.SetError(initialFrequencyTextBox, "Invalid value");
+        e.Cancel = true;
+      }
+    }
+    private void initialFrequencyTextBox_Validated(object sender, EventArgs e) {
+      double freq;
+      if (double.TryParse(initialFrequencyTextBox.Text, out freq) && freq >= 0.0) {
+        Content.InitialFrequency = freq;
+      }
+    }
+
+    private void checkBoxEnabled_CheckedChanged(object sender, EventArgs e) {
+      if (Content != null)
+        Content.Enabled = enabledCheckBox.Checked;
+    }
+    #endregion
+
+    #region helpers
+    private void UpdateControl() {
+      if (Content == null) {
+        initialFrequencyTextBox.Text = string.Empty;
+        minimumArityTextBox.Text = string.Empty;
+        maximumArityTextBox.Text = string.Empty;
+        enabledCheckBox.Checked = false;
+      } else {
+        initialFrequencyTextBox.Text = Content.InitialFrequency.ToString();
+        minimumArityTextBox.Text = Content.MinimumArity.ToString();
+        maximumArityTextBox.Text = Content.MaximumArity.ToString();
+        enabledCheckBox.Checked = Content.Enabled;
+      }
+      SetEnabledStateOfControls();
+    }
+    #endregion
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarAllowedChildSymbolsControl.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarAllowedChildSymbolsControl.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarAllowedChildSymbolsControl.Designer.cs	(revision 10269)
@@ -0,0 +1,102 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  partial class SymbolicExpressionGrammarAllowedChildSymbolsControl {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.allowedChildSymbolsGroupBox = new System.Windows.Forms.GroupBox();
+      this.symbolicExpressionTreeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart();
+      this.allowedChildSymbolsGroupBox.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // allowedChildSymbolsGroupBox
+      // 
+      this.allowedChildSymbolsGroupBox.Controls.Add(this.symbolicExpressionTreeChart);
+      this.allowedChildSymbolsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.allowedChildSymbolsGroupBox.Location = new System.Drawing.Point(0, 0);
+      this.allowedChildSymbolsGroupBox.Name = "allowedChildSymbolsGroupBox";
+      this.allowedChildSymbolsGroupBox.Size = new System.Drawing.Size(651, 405);
+      this.allowedChildSymbolsGroupBox.TabIndex = 2;
+      this.allowedChildSymbolsGroupBox.TabStop = false;
+      this.allowedChildSymbolsGroupBox.Text = "Allowed Child Symbols";
+      // 
+      // allowedChildSymbolsControl
+      // 
+      this.symbolicExpressionTreeChart.AllowDrop = true;
+      this.symbolicExpressionTreeChart.BackgroundColor = System.Drawing.Color.White;
+      this.symbolicExpressionTreeChart.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.symbolicExpressionTreeChart.LineColor = System.Drawing.Color.Black;
+      this.symbolicExpressionTreeChart.Location = new System.Drawing.Point(3, 16);
+      this.symbolicExpressionTreeChart.Name = "allowedChildSymbolsControl";
+      this.symbolicExpressionTreeChart.Size = new System.Drawing.Size(645, 386);
+      this.symbolicExpressionTreeChart.Spacing = 5;
+      this.symbolicExpressionTreeChart.SuspendRepaint = false;
+      this.symbolicExpressionTreeChart.TabIndex = 0;
+      this.symbolicExpressionTreeChart.TextFont = new System.Drawing.Font("Times New Roman", 8F);
+      this.symbolicExpressionTreeChart.Tree = null;
+      this.symbolicExpressionTreeChart.SymbolicExpressionTreeNodeClicked += new System.Windows.Forms.MouseEventHandler(this.symbolicExpressionTreeChart_SymbolicExpressionTreeNodeClicked);
+      this.symbolicExpressionTreeChart.DragDrop += new System.Windows.Forms.DragEventHandler(this.symbolicExpressionTreeChart_DragDrop);
+      this.symbolicExpressionTreeChart.DragEnter += new System.Windows.Forms.DragEventHandler(this.symbolicExpressionTreeChart_DragEnter);
+      this.symbolicExpressionTreeChart.DragOver += new System.Windows.Forms.DragEventHandler(this.symbolicExpressionTreeChart_DragOver);
+      this.symbolicExpressionTreeChart.Paint += new System.Windows.Forms.PaintEventHandler(this.allowedChildSymbolsControl_Paint);
+      this.symbolicExpressionTreeChart.KeyDown += new System.Windows.Forms.KeyEventHandler(this.symbolicExpressionTreeChart_KeyDown);
+      this.symbolicExpressionTreeChart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.allowedChildSymbolsControl_MouseDown);
+      // 
+      // SymbolicExpressionGrammarAllowedChildSymbolsControl
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.allowedChildSymbolsGroupBox);
+      this.Name = "SymbolicExpressionGrammarAllowedChildSymbolsControl";
+      this.Size = new System.Drawing.Size(651, 405);
+      this.allowedChildSymbolsGroupBox.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.GroupBox allowedChildSymbolsGroupBox;
+    private SymbolicExpressionTreeChart symbolicExpressionTreeChart;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarAllowedChildSymbolsControl.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarAllowedChildSymbolsControl.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarAllowedChildSymbolsControl.cs	(revision 10269)
@@ -0,0 +1,341 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  public sealed partial class SymbolicExpressionGrammarAllowedChildSymbolsControl : UserControl {
+    private ObservableList<ISymbolicExpressionTreeNode> selectedSymbolicExpressionTreeNodes;
+
+    public SymbolicExpressionGrammarAllowedChildSymbolsControl() {
+      InitializeComponent();
+      selectedSymbolicExpressionTreeNodes = new ObservableList<ISymbolicExpressionTreeNode>();
+    }
+
+    private ISymbolicExpressionGrammar grammar;
+    public ISymbolicExpressionGrammar Grammar {
+      get { return grammar; }
+      set {
+        if (grammar != value) {
+          if (grammar != null) DeregisterGrammarEvents();
+          grammar = value;
+          if (grammar != null) RegisterGrammarEvents();
+          OnGrammarChanged();
+        }
+      }
+    }
+
+    private ISymbol symbol;
+    public ISymbol Symbol {
+      get { return symbol; }
+      set {
+        if (symbol != value) {
+          if (value != null && grammar == null) throw new InvalidOperationException("grammar is null");
+          if (value != null && !grammar.ContainsSymbol(value)) throw new ArgumentException("grammar does not contain symbol.");
+          symbol = value;
+          OnSymbolChanged();
+        }
+      }
+    }
+
+    private void RegisterGrammarEvents() {
+      grammar.Changed += new EventHandler(Grammar_Changed);
+      grammar.ReadOnlyChanged += new EventHandler(Grammar_ReadOnlyChanged);
+    }
+    private void DeregisterGrammarEvents() {
+      grammar.Changed -= new EventHandler(Grammar_Changed);
+      grammar.ReadOnlyChanged -= new EventHandler(Grammar_ReadOnlyChanged);
+    }
+
+    private void Grammar_Changed(object sender, EventArgs e) {
+      if (Grammar == null) return;
+      if (Symbol == null) return;
+      if (Symbol != null && !Grammar.ContainsSymbol(Symbol)) Symbol = null;
+      else BuildAllowedChildSymbolsTree();
+    }
+
+    private void Grammar_ReadOnlyChanged(object sender, EventArgs e) {
+      if (InvokeRequired) Invoke((MethodInvoker)BuildAllowedChildSymbolsTree);
+      else BuildAllowedChildSymbolsTree();
+    }
+
+    private void OnGrammarChanged() {
+      if (Grammar == null) {
+        symbolicExpressionTreeChart.Tree = null;
+        Symbol = null;
+      }
+    }
+    private void OnSymbolChanged() {
+      if (Symbol == null) symbolicExpressionTreeChart.Tree = null;
+      else BuildAllowedChildSymbolsTree();
+    }
+
+    private void BuildAllowedChildSymbolsTree() {
+      if (Symbol == null) {
+        symbolicExpressionTreeChart.Tree = null;
+        return;
+      }
+
+      var tree = new SymbolicExpressionTree(new SymbolicExpressionTreeNode(Symbol));
+      symbolicExpressionTreeChart.SuspendRepaint = true;
+      if (Grammar.GetMaximumSubtreeCount(Symbol) > 0) {
+        for (int i = 0; i < Grammar.GetMaximumSubtreeCount(Symbol); i++) {
+          var node = new DummySymbol("Subtree " + i).CreateTreeNode();
+          var groupSymbols = grammar.GetAllowedChildSymbols(Symbol, i).OfType<GroupSymbol>().ToList();
+          foreach (var childSymbol in Grammar.GetAllowedChildSymbols(Symbol, i)) {
+            if (!groupSymbols.Any(g => g != childSymbol && g.Flatten().Contains(childSymbol)))
+              node.AddSubtree(new SymbolicExpressionTreeNode(childSymbol));
+          }
+          tree.Root.AddSubtree(node);
+        }
+      }
+      symbolicExpressionTreeChart.Tree = tree;
+
+      foreach (var subtreeNode in tree.Root.Subtrees) {
+        foreach (var allowedChildNode in subtreeNode.Subtrees) {
+          var visualLine = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNodeConnection(subtreeNode, allowedChildNode);
+          visualLine.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;
+        }
+      }
+
+      for (int i = Grammar.GetMinimumSubtreeCount(symbol); i < Grammar.GetMaximumSubtreeCount(symbol); i++) {
+        var subtreeNode = tree.Root.GetSubtree(i);
+        var visualTreeNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(subtreeNode);
+        visualTreeNode.TextColor = Color.Gray;
+        visualTreeNode.LineColor = Color.LightGray;
+
+        var visualLine = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNodeConnection(tree.Root, subtreeNode);
+        visualLine.LineColor = Color.LightGray;
+
+        foreach (var allowedChildNode in subtreeNode.Subtrees) {
+          visualTreeNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(allowedChildNode);
+          visualTreeNode.TextColor = Color.Gray;
+          visualTreeNode.LineColor = Color.LightGray;
+
+          visualLine = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNodeConnection(subtreeNode, allowedChildNode);
+          visualLine.LineColor = Color.LightGray;
+        }
+      }
+
+      symbolicExpressionTreeChart.SuspendRepaint = false;
+      UpdateSelectedSymbolicExpressionTreeNodes();
+    }
+
+    private void UpdateSelectedSymbolicExpressionTreeNodes() {
+      foreach (var node in symbolicExpressionTreeChart.Tree.IterateNodesPrefix()) {
+        var visualNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node);
+        if (!selectedSymbolicExpressionTreeNodes.Contains(node)) visualNode.FillColor = Color.White;
+        else visualNode.FillColor = Color.LightSteelBlue;
+      }
+      symbolicExpressionTreeChart.Repaint();
+    }
+
+    private void symbolicExpressionTreeChart_SymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) {
+      if (Grammar.ReadOnly) return;
+      if ((Control.ModifierKeys & Keys.Control) == 0)
+        selectedSymbolicExpressionTreeNodes.Clear();
+
+      VisualSymbolicExpressionTreeNode clickedNode = (VisualSymbolicExpressionTreeNode)sender;
+      var selectedNode = clickedNode.SymbolicExpressionTreeNode;
+      if (selectedNode.SubtreeCount == 0) {
+        if (!selectedSymbolicExpressionTreeNodes.Contains(selectedNode))
+          selectedSymbolicExpressionTreeNodes.Add(selectedNode);
+        else
+          selectedSymbolicExpressionTreeNodes.Remove(selectedNode);
+      }
+
+      UpdateSelectedSymbolicExpressionTreeNodes();
+    }
+
+    private void symbolicExpressionTreeChart_KeyDown(object sender, KeyEventArgs e) {
+      if (Grammar.ReadOnly) return;
+      if (e.KeyCode == Keys.Delete) {
+        var root = symbolicExpressionTreeChart.Tree.Root;
+        Grammar.StartGrammarManipulation();
+        foreach (var node in selectedSymbolicExpressionTreeNodes) {
+          int argIndex = root.IndexOfSubtree(node.Parent);
+          Grammar.RemoveAllowedChildSymbol(root.Symbol, node.Symbol, argIndex);
+        }
+
+        selectedSymbolicExpressionTreeNodes.Clear();
+        Grammar.FinishedGrammarManipulation();
+      }
+    }
+
+    #region drag & drop operations
+    private bool validDragOperation;
+    private void symbolicExpressionTreeChart_DragEnter(object sender, DragEventArgs e) {
+      validDragOperation = false;
+      if (Grammar.ReadOnly) return;
+
+      var data = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
+      var symbol = data as ISymbol;
+      var symbols = data as IEnumerable<ISymbol>;
+      if (symbol != null && !(symbol is IReadOnlySymbol) && Grammar.ContainsSymbol(symbol)) validDragOperation = true;
+      else if (symbols != null && symbols.All(s => !(symbol is IReadOnlySymbol) && Grammar.ContainsSymbol(s))) validDragOperation = true;
+    }
+
+    private void symbolicExpressionTreeChart_DragOver(object sender, DragEventArgs e) {
+      e.Effect = DragDropEffects.None;
+      if (validDragOperation) {
+        Point coordinates = symbolicExpressionTreeChart.PointToClient(new Point(e.X, e.Y));
+        var visualNode = symbolicExpressionTreeChart.FindVisualSymbolicExpressionTreeNodeAt(coordinates.X, coordinates.Y);
+        if (visualNode != null) {
+          var node = visualNode.SymbolicExpressionTreeNode;
+          var root = symbolicExpressionTreeChart.Tree.Root;
+          if (node == root || node.Parent == root) e.Effect = DragDropEffects.Copy;
+        }
+      }
+    }
+
+    private void symbolicExpressionTreeChart_DragDrop(object sender, DragEventArgs e) {
+      Point coordinates = symbolicExpressionTreeChart.PointToClient(new Point(e.X, e.Y));
+      var node = symbolicExpressionTreeChart.FindVisualSymbolicExpressionTreeNodeAt(coordinates.X, coordinates.Y);
+      var root = symbolicExpressionTreeChart.Tree.Root;
+
+      var data = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
+      var symbol = data as ISymbol;
+      var symbols = data as IEnumerable<ISymbol>;
+
+      if (node.SymbolicExpressionTreeNode == root) {
+        if (symbol != null)
+          Grammar.AddAllowedChildSymbol(root.Symbol, symbol);
+        else if (symbols != null)
+          foreach (var s in symbols) Grammar.AddAllowedChildSymbol(root.Symbol, s);
+      } else {
+        int argumentIndex = root.IndexOfSubtree(node.SymbolicExpressionTreeNode);
+        if (symbol != null)
+          Grammar.AddAllowedChildSymbol(root.Symbol, symbol, argumentIndex);
+        else if (symbols != null)
+          foreach (var s in symbols) Grammar.AddAllowedChildSymbol(root.Symbol, s, argumentIndex);
+      }
+      BuildAllowedChildSymbolsTree();
+    }
+    #endregion
+
+    #region draw and handle root node with buttons to manipulate the subtree count
+    private RectangleF increaseMinimumSubtreeCountRectangle;
+    private RectangleF decreaseMinimumSubtreeCountRectangle;
+    private RectangleF increaseMaximumSubtreeCountRectangle;
+    private RectangleF decreaseMaximumSubtreeCountRectangle;
+    private void allowedChildSymbolsControl_Paint(object sender, PaintEventArgs e) {
+      increaseMinimumSubtreeCountRectangle = RectangleF.Empty;
+      decreaseMinimumSubtreeCountRectangle = RectangleF.Empty;
+      increaseMaximumSubtreeCountRectangle = RectangleF.Empty;
+      decreaseMaximumSubtreeCountRectangle = RectangleF.Empty;
+
+      if (Grammar == null) return;
+      if (symbolicExpressionTreeChart.Tree == null) return;
+
+      var rootNode = symbolicExpressionTreeChart.Tree.Root;
+      var visualRootNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(rootNode);
+      var graphics = e.Graphics;
+
+      if (rootNode.Symbol is IReadOnlySymbol) return;
+      if (rootNode.Symbol.MinimumArity == rootNode.Symbol.MaximumArity) return;
+
+      using (Pen pen = new Pen(Color.Black)) {
+        using (Font font = new Font("Times New Roman", 8)) {
+          var stringFormat = new StringFormat();
+          stringFormat.Alignment = StringAlignment.Center;
+          stringFormat.LineAlignment = StringAlignment.Center;
+          int spacing = 5;
+          int size = (visualRootNode.Height - spacing * 3) / 2;
+
+          increaseMinimumSubtreeCountRectangle = new RectangleF(visualRootNode.X - spacing - size, visualRootNode.Y + spacing, size, size);
+          decreaseMinimumSubtreeCountRectangle = new RectangleF(visualRootNode.X - spacing - size, visualRootNode.Y + size + 2 * spacing, size, size);
+          increaseMaximumSubtreeCountRectangle = new RectangleF(visualRootNode.X + visualRootNode.Width + spacing, visualRootNode.Y + spacing, size, size);
+          decreaseMaximumSubtreeCountRectangle = new RectangleF(visualRootNode.X + visualRootNode.Width + spacing, visualRootNode.Y + size + 2 * spacing, size, size);
+
+          pen.Color = Grammar.ReadOnly || Grammar.GetMaximumSubtreeCount(rootNode.Symbol) == Grammar.GetMinimumSubtreeCount(rootNode.Symbol) ? Color.LightGray : Color.Black;
+          graphics.DrawString("+", font, pen.Brush, increaseMinimumSubtreeCountRectangle, stringFormat);
+          graphics.DrawRectangle(pen, Rectangle.Round(increaseMinimumSubtreeCountRectangle));
+          if (pen.Color == Color.LightGray) increaseMinimumSubtreeCountRectangle = RectangleF.Empty;
+
+          pen.Color = Grammar.ReadOnly || Grammar.GetMinimumSubtreeCount(rootNode.Symbol) == rootNode.Symbol.MinimumArity ? Color.LightGray : Color.Black;
+          graphics.DrawString("-", font, pen.Brush, decreaseMinimumSubtreeCountRectangle, stringFormat);
+          graphics.DrawRectangle(pen, Rectangle.Round(decreaseMinimumSubtreeCountRectangle));
+          if (pen.Color == Color.LightGray) decreaseMinimumSubtreeCountRectangle = RectangleF.Empty;
+
+          pen.Color = Grammar.ReadOnly || Grammar.GetMaximumSubtreeCount(rootNode.Symbol) == rootNode.Symbol.MaximumArity ? Color.LightGray : Color.Black;
+          graphics.DrawRectangle(pen, Rectangle.Round(increaseMaximumSubtreeCountRectangle));
+          graphics.DrawString("+", font, pen.Brush, increaseMaximumSubtreeCountRectangle, stringFormat);
+          if (pen.Color == Color.LightGray) increaseMaximumSubtreeCountRectangle = RectangleF.Empty;
+
+          pen.Color = Grammar.ReadOnly || Grammar.GetMaximumSubtreeCount(rootNode.Symbol) == Grammar.GetMinimumSubtreeCount(rootNode.Symbol) ? Color.LightGray : Color.Black;
+          graphics.DrawRectangle(pen, Rectangle.Round(decreaseMaximumSubtreeCountRectangle));
+          graphics.DrawString("-", font, pen.Brush, decreaseMaximumSubtreeCountRectangle, stringFormat);
+          if (pen.Color == Color.LightGray) decreaseMaximumSubtreeCountRectangle = RectangleF.Empty;
+        }
+      }
+    }
+
+    private void allowedChildSymbolsControl_MouseDown(object sender, MouseEventArgs e) {
+      if (Grammar == null || Grammar.ReadOnly) return;
+      if (symbolicExpressionTreeChart.Tree == null) return;
+
+      var pointF = new PointF(e.X, e.Y);
+      var rootSymbol = symbolicExpressionTreeChart.Tree.Root.Symbol;
+      int minimumSubtreeCount = Grammar.GetMinimumSubtreeCount(rootSymbol);
+      int maximumSubtreecount = Grammar.GetMaximumSubtreeCount(rootSymbol);
+
+      bool changed = true;
+      if (increaseMinimumSubtreeCountRectangle.Contains(pointF))
+        Grammar.SetSubtreeCount(rootSymbol, minimumSubtreeCount + 1, maximumSubtreecount);
+      else if (decreaseMinimumSubtreeCountRectangle.Contains(pointF))
+        Grammar.SetSubtreeCount(rootSymbol, minimumSubtreeCount - 1, maximumSubtreecount);
+      else if (increaseMaximumSubtreeCountRectangle.Contains(pointF))
+        Grammar.SetSubtreeCount(rootSymbol, minimumSubtreeCount, maximumSubtreecount + 1);
+      else if (decreaseMaximumSubtreeCountRectangle.Contains(pointF))
+        Grammar.SetSubtreeCount(rootSymbol, minimumSubtreeCount, maximumSubtreecount - 1);
+      else
+        changed = false;
+
+      if (changed) BuildAllowedChildSymbolsTree();
+    }
+    #endregion
+
+  }
+
+  [NonDiscoverableType]
+  internal class DummySymbol : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = byte.MaxValue;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    public DummySymbol(DummySymbol original, Cloner cloner) : base(original, cloner) { }
+    public DummySymbol(string name) : base(name, "DummySymbol for views") { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new DummySymbol(this, cloner); }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarEditorView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarEditorView.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarEditorView.Designer.cs	(revision 10269)
@@ -0,0 +1,309 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  partial class SymbolicExpressionGrammarEditorView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SymbolicExpressionGrammarEditorView));
+      this.grpSymbols = new System.Windows.Forms.GroupBox();
+      this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+      this.copyButton = new System.Windows.Forms.Button();
+      this.showDetailsCheckBox = new System.Windows.Forms.CheckBox();
+      this.removeButton = new System.Windows.Forms.Button();
+      this.addButton = new System.Windows.Forms.Button();
+      this.symbolsTreeView = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.CheckBoxTreeView();
+      this.imageList = new System.Windows.Forms.ImageList(this.components);
+      this.splitContainer2 = new System.Windows.Forms.SplitContainer();
+      this.allowedChildSymbolsControl = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionGrammarAllowedChildSymbolsControl();
+      this.symbolDetailsGroupBox = new System.Windows.Forms.GroupBox();
+      this.symbolDetailsViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      this.showSampleTreeButton = new System.Windows.Forms.Button();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.grpSymbols.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
+      this.splitContainer1.Panel1.SuspendLayout();
+      this.splitContainer1.Panel2.SuspendLayout();
+      this.splitContainer1.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
+      this.splitContainer2.Panel1.SuspendLayout();
+      this.splitContainer2.Panel2.SuspendLayout();
+      this.splitContainer2.SuspendLayout();
+      this.symbolDetailsGroupBox.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      this.nameTextBox.Size = new System.Drawing.Size(686, 20);
+      // 
+      // infoLabel
+      // 
+      this.infoLabel.Location = new System.Drawing.Point(750, 3);
+      // 
+      // grpSymbols
+      // 
+      this.grpSymbols.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.grpSymbols.Controls.Add(this.splitContainer1);
+      this.grpSymbols.Location = new System.Drawing.Point(0, 26);
+      this.grpSymbols.Name = "grpSymbols";
+      this.grpSymbols.Size = new System.Drawing.Size(769, 378);
+      this.grpSymbols.TabIndex = 3;
+      this.grpSymbols.TabStop = false;
+      this.grpSymbols.Text = "Symbols";
+      // 
+      // splitContainer1
+      // 
+      this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer1.Location = new System.Drawing.Point(3, 16);
+      this.splitContainer1.Name = "splitContainer1";
+      // 
+      // splitContainer1.Panel1
+      // 
+      this.splitContainer1.Panel1.Controls.Add(this.showSampleTreeButton);
+      this.splitContainer1.Panel1.Controls.Add(this.copyButton);
+      this.splitContainer1.Panel1.Controls.Add(this.showDetailsCheckBox);
+      this.splitContainer1.Panel1.Controls.Add(this.removeButton);
+      this.splitContainer1.Panel1.Controls.Add(this.addButton);
+      this.splitContainer1.Panel1.Controls.Add(this.symbolsTreeView);
+      // 
+      // splitContainer1.Panel2
+      // 
+      this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
+      this.splitContainer1.Size = new System.Drawing.Size(763, 359);
+      this.splitContainer1.SplitterDistance = 191;
+      this.splitContainer1.TabIndex = 0;
+      // 
+      // copyButton
+      // 
+      this.copyButton.Enabled = false;
+      this.copyButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Copy;
+      this.copyButton.Location = new System.Drawing.Point(33, 3);
+      this.copyButton.Name = "copyButton";
+      this.copyButton.Size = new System.Drawing.Size(24, 24);
+      this.copyButton.TabIndex = 8;
+      this.toolTip.SetToolTip(this.copyButton, "Copy Symbol");
+      this.copyButton.UseVisualStyleBackColor = true;
+      this.copyButton.Click += new System.EventHandler(this.copyButton_Click);
+      // 
+      // showDetailsCheckBox
+      // 
+      this.showDetailsCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
+      this.showDetailsCheckBox.Checked = true;
+      this.showDetailsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
+      this.showDetailsCheckBox.Image = HeuristicLab.Common.Resources.VSImageLibrary.Properties;
+      this.showDetailsCheckBox.Location = new System.Drawing.Point(93, 3);
+      this.showDetailsCheckBox.Name = "showDetailsCheckBox";
+      this.showDetailsCheckBox.Size = new System.Drawing.Size(24, 24);
+      this.showDetailsCheckBox.TabIndex = 7;
+      this.toolTip.SetToolTip(this.showDetailsCheckBox, "Show/Hide Details");
+      this.showDetailsCheckBox.UseVisualStyleBackColor = true;
+      this.showDetailsCheckBox.CheckedChanged += new System.EventHandler(this.showDetailsCheckBox_CheckedChanged);
+      // 
+      // removeButton
+      // 
+      this.removeButton.Enabled = false;
+      this.removeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Remove;
+      this.removeButton.Location = new System.Drawing.Point(63, 3);
+      this.removeButton.Name = "removeButton";
+      this.removeButton.Size = new System.Drawing.Size(24, 24);
+      this.removeButton.TabIndex = 6;
+      this.toolTip.SetToolTip(this.removeButton, "Remove Symbol");
+      this.removeButton.UseVisualStyleBackColor = true;
+      this.removeButton.Click += new System.EventHandler(this.removeButton_Click);
+      // 
+      // addButton
+      // 
+      this.addButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Add;
+      this.addButton.Location = new System.Drawing.Point(3, 3);
+      this.addButton.Name = "addButton";
+      this.addButton.Size = new System.Drawing.Size(24, 24);
+      this.addButton.TabIndex = 5;
+      this.toolTip.SetToolTip(this.addButton, "Add Symbol");
+      this.addButton.UseVisualStyleBackColor = true;
+      this.addButton.Click += new System.EventHandler(this.addButton_Click);
+      // 
+      // symbolsTreeView
+      // 
+      this.symbolsTreeView.AllowDrop = true;
+      this.symbolsTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.symbolsTreeView.CheckBoxes = true;
+      this.symbolsTreeView.HideSelection = false;
+      this.symbolsTreeView.ImageIndex = 0;
+      this.symbolsTreeView.ImageList = this.imageList;
+      this.symbolsTreeView.Location = new System.Drawing.Point(3, 28);
+      this.symbolsTreeView.Name = "symbolsTreeView";
+      this.symbolsTreeView.SelectedImageIndex = 0;
+      this.symbolsTreeView.Size = new System.Drawing.Size(185, 299);
+      this.symbolsTreeView.TabIndex = 0;
+      this.symbolsTreeView.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.symbolsTreeView_AfterCheck);
+      this.symbolsTreeView.BeforeCheck += new System.Windows.Forms.TreeViewCancelEventHandler(symbolsTreeView_BeforeCheck);
+      this.symbolsTreeView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.symbolsTreeView_ItemDrag);
+      this.symbolsTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.symbolsTreeView_AfterSelect);
+      this.symbolsTreeView.DragDrop += new System.Windows.Forms.DragEventHandler(this.symbolsTreeView_DragDrop);
+      this.symbolsTreeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.symbolsTreeView_DragEnter);
+      this.symbolsTreeView.DragOver += new System.Windows.Forms.DragEventHandler(this.symbolsTreeView_DragOver);
+      this.symbolsTreeView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.symbolsTreeView_KeyDown);
+      this.symbolsTreeView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.symbolsTreeView_MouseDown);
+      this.symbolsTreeView.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(symbolsTreeView_NodeMouseDoubleClick);
+      // 
+      // imageList
+      // 
+      this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+      this.imageList.ImageSize = new System.Drawing.Size(16, 16);
+      this.imageList.TransparentColor = System.Drawing.Color.Transparent;
+      // 
+      // splitContainer2
+      // 
+      this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer2.Location = new System.Drawing.Point(0, 0);
+      this.splitContainer2.Name = "splitContainer2";
+      this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
+      // 
+      // splitContainer2.Panel1
+      // 
+      this.splitContainer2.Panel1.Controls.Add(this.allowedChildSymbolsControl);
+      // 
+      // splitContainer2.Panel2
+      // 
+      this.splitContainer2.Panel2.Controls.Add(this.symbolDetailsGroupBox);
+      this.splitContainer2.Size = new System.Drawing.Size(568, 359);
+      this.splitContainer2.SplitterDistance = 165;
+      this.splitContainer2.TabIndex = 0;
+      // 
+      // allowedChildSymbolsControl
+      // 
+      this.allowedChildSymbolsControl.AllowDrop = true;
+      this.allowedChildSymbolsControl.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.allowedChildSymbolsControl.Grammar = null;
+      this.allowedChildSymbolsControl.Location = new System.Drawing.Point(0, 0);
+      this.allowedChildSymbolsControl.Name = "allowedChildSymbolsControl";
+      this.allowedChildSymbolsControl.Size = new System.Drawing.Size(568, 165);
+      this.allowedChildSymbolsControl.Symbol = null;
+      this.allowedChildSymbolsControl.TabIndex = 0;
+      // 
+      // symbolDetailsGroupBox
+      // 
+      this.symbolDetailsGroupBox.Controls.Add(this.symbolDetailsViewHost);
+      this.symbolDetailsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.symbolDetailsGroupBox.Location = new System.Drawing.Point(0, 0);
+      this.symbolDetailsGroupBox.Name = "symbolDetailsGroupBox";
+      this.symbolDetailsGroupBox.Size = new System.Drawing.Size(568, 190);
+      this.symbolDetailsGroupBox.TabIndex = 1;
+      this.symbolDetailsGroupBox.TabStop = false;
+      this.symbolDetailsGroupBox.Text = "Symbol Details";
+      // 
+      // symbolDetailsViewHost
+      // 
+      this.symbolDetailsViewHost.Caption = "View";
+      this.symbolDetailsViewHost.Content = null;
+      this.symbolDetailsViewHost.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.symbolDetailsViewHost.Enabled = false;
+      this.symbolDetailsViewHost.Location = new System.Drawing.Point(3, 16);
+      this.symbolDetailsViewHost.Name = "symbolDetailsViewHost";
+      this.symbolDetailsViewHost.ReadOnly = false;
+      this.symbolDetailsViewHost.Size = new System.Drawing.Size(562, 171);
+      this.symbolDetailsViewHost.TabIndex = 1;
+      this.symbolDetailsViewHost.ViewsLabelVisible = true;
+      this.symbolDetailsViewHost.ViewType = null;
+      // 
+      // showSampleTreeButton
+      // 
+      this.showSampleTreeButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.showSampleTreeButton.Location = new System.Drawing.Point(3, 333);
+      this.showSampleTreeButton.Name = "showSampleTreeButton";
+      this.showSampleTreeButton.Size = new System.Drawing.Size(185, 23);
+      this.showSampleTreeButton.TabIndex = 9;
+      this.showSampleTreeButton.Text = "Show Sample Tree";
+      this.showSampleTreeButton.UseVisualStyleBackColor = true;
+      this.showSampleTreeButton.Click += new System.EventHandler(this.showSampleTreeButton_Click);
+      // 
+      // SymbolicExpressionGrammarEditorView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.grpSymbols);
+      this.Name = "SymbolicExpressionGrammarEditorView";
+      this.Size = new System.Drawing.Size(769, 404);
+      this.Controls.SetChildIndex(this.grpSymbols, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.Controls.SetChildIndex(this.infoLabel, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.grpSymbols.ResumeLayout(false);
+      this.splitContainer1.Panel1.ResumeLayout(false);
+      this.splitContainer1.Panel2.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
+      this.splitContainer1.ResumeLayout(false);
+      this.splitContainer2.Panel1.ResumeLayout(false);
+      this.splitContainer2.Panel2.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
+      this.splitContainer2.ResumeLayout(false);
+      this.symbolDetailsGroupBox.ResumeLayout(false);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+    #endregion
+
+    private System.Windows.Forms.GroupBox grpSymbols;
+    private System.Windows.Forms.SplitContainer splitContainer1;
+    private CheckBoxTreeView symbolsTreeView;
+    private System.Windows.Forms.SplitContainer splitContainer2;
+    private System.Windows.Forms.ImageList imageList;
+    protected System.Windows.Forms.CheckBox showDetailsCheckBox;
+    protected System.Windows.Forms.Button removeButton;
+    protected System.Windows.Forms.Button addButton;
+    private System.Windows.Forms.GroupBox symbolDetailsGroupBox;
+    private MainForm.WindowsForms.ViewHost symbolDetailsViewHost;
+    protected System.Windows.Forms.Button copyButton;
+    private SymbolicExpressionGrammarAllowedChildSymbolsControl allowedChildSymbolsControl;
+    private System.Windows.Forms.Button showSampleTreeButton;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarEditorView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarEditorView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarEditorView.cs	(revision 10269)
@@ -0,0 +1,450 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Common;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  [View("Symbolic Expression Grammar Editor")]
+  [Content(typeof(ISymbolicExpressionGrammar), true)]
+  public partial class SymbolicExpressionGrammarEditorView : NamedItemView {
+    public SymbolicExpressionGrammarEditorView() {
+      InitializeComponent();
+    }
+
+    public override bool ReadOnly {
+      get {
+        if ((Content != null) && Content.ReadOnly) return true;
+        return base.ReadOnly;
+      }
+      set {
+        if ((Content != null) && Content.ReadOnly) base.ReadOnly = true;
+        else base.ReadOnly = value;
+      }
+    }
+
+    public new ISymbolicExpressionGrammar Content {
+      get { return (ISymbolicExpressionGrammar)base.Content; }
+      set { base.Content = value; }
+    }
+
+    private Color treeViewBackColor = Color.Empty;
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      if (Content == null || Content.ReadOnly || ReadOnly || Locked) {
+        addButton.Enabled = false;
+        removeButton.Enabled = false;
+        copyButton.Enabled = false;
+        treeViewBackColor = symbolsTreeView.BackColor;
+        symbolsTreeView.BackColor = Color.FromArgb(255, 240, 240, 240);
+      } else {
+        addButton.Enabled = true;
+        if (symbolsTreeView.SelectedNode != null && !(symbolsTreeView.SelectedNode.Tag is IReadOnlySymbol)) {
+          removeButton.Enabled = true;
+          copyButton.Enabled = true;
+        }
+        treeViewBackColor = Color.Empty;
+        symbolsTreeView.BackColor = treeViewBackColor;
+      }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content != null) {
+        symbolsTreeView.Nodes.Clear();
+        UpdateSymbolsTreeView();
+
+        symbolsTreeView.CollapseAll();
+        foreach (var node in IterateTreeNodes())
+          if (node.Checked) node.Expand();
+
+        allowedChildSymbolsControl.Grammar = Content;
+        allowedChildSymbolsControl.Symbol = null;
+        symbolDetailsViewHost.Content = null;
+      } else {
+        symbolsTreeView.Nodes.Clear();
+        allowedChildSymbolsControl.Grammar = null;
+        symbolDetailsViewHost.Content = null;
+      }
+    }
+
+    #region events
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ReadOnlyChanged += new System.EventHandler(Content_ReadOnlyChanged);
+      Content.Changed += new System.EventHandler(Content_Changed);
+    }
+    protected override void DeregisterContentEvents() {
+      Content.ReadOnlyChanged -= new System.EventHandler(Content_ReadOnlyChanged);
+      Content.Changed -= new System.EventHandler(Content_Changed);
+      base.DeregisterContentEvents();
+    }
+
+    private void Content_ReadOnlyChanged(object sender, EventArgs e) {
+      ReadOnly = Content.ReadOnly;
+    }
+
+    private void Content_Changed(object sender, EventArgs e) {
+      ISymbol symbol = null;
+      if (symbolsTreeView.SelectedNode != null)
+        symbol = (ISymbol)symbolsTreeView.SelectedNode.Tag;
+
+      allowedChildSymbolsControl.Grammar = Content;
+
+      UpdateSymbolsTreeView();
+      if (symbol != null && Content.ContainsSymbol(symbol)) {
+        symbolsTreeView.SelectedNode = IterateTreeNodes().Where(n => n.Tag == symbol).ToList().FirstOrDefault();
+        UpdateSymbolDetailsViews();
+      }
+    }
+    #endregion
+
+    private void UpdateSymbolsTreeView() {
+      var symbols = Content.Symbols.ToList();
+      foreach (var treeNode in IterateTreeNodes().ToList()) {
+        var symbol = treeNode.Tag as ISymbol;
+        if (!symbols.Contains(symbol))
+          treeNode.Remove();
+      }
+
+      var groupSymbols = symbols.OfType<GroupSymbol>().ToList();
+      var topLevelSymbols = Content.Symbols.Where(s => !groupSymbols.Any(g => g.Symbols.Contains(s)));
+      UpdateChildTreeNodes(symbolsTreeView.Nodes, topLevelSymbols);
+
+      RebuildImageList();
+    }
+
+    private void UpdateChildTreeNodes(TreeNodeCollection collection, IEnumerable<ISymbol> symbols) {
+      foreach (ISymbol symbol in symbols) {
+        if (symbol is ProgramRootSymbol) continue;
+        if (symbol is Defun) continue;
+
+        TreeNode node = collection.Cast<TreeNode>().Where(n => n.Tag == symbol).FirstOrDefault();
+        if (node == null) {
+          node = new TreeNode();
+          node.Tag = symbol;
+          collection.Add(node);
+        }
+        node.Checked = symbol.Enabled;
+        node.Text = symbol.Name;
+
+        var groupSymbol = symbol as GroupSymbol;
+        if (groupSymbol != null) UpdateChildTreeNodes(node.Nodes, groupSymbol.Symbols);
+      }
+    }
+
+    private void symbolsTreeView_AfterSelect(object sender, TreeViewEventArgs e) {
+      if (e.Action != TreeViewAction.Unknown) UpdateSymbolDetailsViews();
+      SetEnabledStateOfControls();
+    }
+
+    private void symbolsTreeView_BeforeCheck(object sender, TreeViewCancelEventArgs e) {
+      if (e.Action == TreeViewAction.Unknown) return;
+      e.Cancel = Content == null || Content.ReadOnly || ReadOnly || Locked;
+    }
+
+    private void symbolsTreeView_AfterCheck(object sender, TreeViewEventArgs e) {
+      if (e.Action == TreeViewAction.Unknown) return;
+      Content.StartGrammarManipulation();
+      allowedChildSymbolsControl.Symbol = null;
+      var symbol = (ISymbol)e.Node.Tag;
+      symbol.Enabled = e.Node.Checked;
+      foreach (var node in IterateTreeNodes())
+        node.Checked = ((ISymbol)node.Tag).Enabled;
+
+      Content.FinishedGrammarManipulation();
+    }
+
+    #region drag & drop operations
+    private void symbolsTreeView_ItemDrag(object sender, ItemDragEventArgs e) {
+      if (!Locked) {
+        var treeNode = e.Item as TreeNode;
+        var data = new DataObject();
+        data.SetData(HeuristicLab.Common.Constants.DragDropDataFormat, treeNode.Tag);
+        validDragOperation = true;
+        DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Move);
+      }
+    }
+
+
+    private bool validDragOperation;
+    private void symbolsTreeView_DragEnter(object sender, DragEventArgs e) {
+      validDragOperation = false;
+      if (Content == null || Content.ReadOnly || ReadOnly || Locked) return;
+
+      var data = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
+      var symbol = data as ISymbol;
+      if (symbol != null && !(symbol is IReadOnlySymbol)) validDragOperation = true;
+    }
+    private void symbolsTreeView_DragOver(object sender, DragEventArgs e) {
+      e.Effect = DragDropEffects.None;
+      if (validDragOperation) {
+        GroupSymbol groupSymbol = null;
+        Point mouse = symbolsTreeView.PointToClient(new Point(e.X, e.Y));
+        TreeNode node = symbolsTreeView.GetNodeAt(mouse);
+        if (node == null) return;
+        groupSymbol = node.Tag as GroupSymbol;
+        if (groupSymbol == null) return;
+        var symbol = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
+        if (symbol == groupSymbol) return;
+
+        if (e.AllowedEffect.HasFlag(DragDropEffects.Copy)) e.Effect = DragDropEffects.Copy;
+      }
+    }
+    private void symbolsTreeView_DragDrop(object sender, DragEventArgs e) {
+      var symbol = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) as ISymbol;
+
+      GroupSymbol groupSymbol = null;
+      Point mouse = symbolsTreeView.PointToClient(new Point(e.X, e.Y));
+      TreeNode node = symbolsTreeView.GetNodeAt(mouse);
+      if (node != null) groupSymbol = node.Tag as GroupSymbol;
+      if (node != null && groupSymbol == null) groupSymbol = node.Parent.Tag as GroupSymbol;
+
+      Content.StartGrammarManipulation();
+      Cloner cloner = new Cloner();
+      var clonedSymbol = cloner.Clone(symbol);
+      ChangeDuplicateSymbolNames(clonedSymbol);
+
+      if (groupSymbol != null) groupSymbol.SymbolsCollection.Add(clonedSymbol);
+      else Content.AddSymbol(clonedSymbol);
+
+      UpdateGrammerConstraintsForClonedSymbol(symbol, cloner);
+      Content.FinishedGrammarManipulation();
+    }
+    #endregion
+
+    private void symbolsTreeView_MouseDown(object sender, MouseEventArgs e) {
+      // enables deselection of treeNodes
+      Point coordinates = new Point(e.X, e.Y);
+      TreeNode node = symbolsTreeView.GetNodeAt(coordinates);
+      if (e.Button == MouseButtons.Left && node == null) {
+        symbolsTreeView.SelectedNode = null;
+        symbolDetailsViewHost.Content = null;
+        SetEnabledStateOfControls();
+      }
+    }
+
+    private void symbolsTreeView_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) {
+      var symbol = e.Node.Tag as ISymbol;
+      if (symbol == null) return;
+      if (e.Button != MouseButtons.Left) return;
+      if (e.X < e.Node.Bounds.Left - symbolsTreeView.ImageList.Images[e.Node.ImageIndex].Width || e.X > e.Node.Bounds.Right) return;
+      MainFormManager.MainForm.ShowContent(symbol);
+      e.Node.Toggle();
+    }
+
+    private void symbolsTreeView_KeyDown(object sender, KeyEventArgs e) {
+      if (Content == null || Content.ReadOnly || ReadOnly || Locked) return;
+      if (symbolsTreeView.SelectedNode == null) return;
+      if (e.KeyCode != Keys.Delete) return;
+
+      var symbol = (ISymbol)symbolsTreeView.SelectedNode.Tag;
+      if (!(symbol is IReadOnlySymbol))
+        Content.RemoveSymbol(symbol);
+
+      SetEnabledStateOfControls();
+      UpdateSymbolDetailsViews();
+      RebuildImageList();
+    }
+
+    #region button events
+    private TypeSelectorDialog typeSelectorDialog;
+    private void addButton_Click(object sender, EventArgs e) {
+      if (typeSelectorDialog == null) {
+        typeSelectorDialog = new TypeSelectorDialog();
+        typeSelectorDialog.Caption = "Select Symbol";
+        typeSelectorDialog.TypeSelector.Caption = "Available Symbols";
+        typeSelectorDialog.TypeSelector.Configure(typeof(ISymbol), false, false, (t) => { return !typeof(IReadOnlySymbol).IsAssignableFrom(t); });
+      }
+      if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
+        try {
+          ISymbol symbol = (ISymbol)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
+          ChangeDuplicateSymbolNames(symbol);
+          GroupSymbol groupSymbol = null;
+
+          TreeNode selectedNode = symbolsTreeView.SelectedNode;
+          if (selectedNode != null) {
+            groupSymbol = selectedNode.Tag as GroupSymbol;
+            if (groupSymbol == null && selectedNode.Parent != null) groupSymbol = selectedNode.Parent.Tag as GroupSymbol;
+          }
+          if (groupSymbol != null) groupSymbol.SymbolsCollection.Add(symbol);
+          else Content.AddSymbol(symbol);
+        }
+        catch (Exception ex) {
+          ErrorHandling.ShowErrorDialog(this, ex);
+        }
+      }
+    }
+
+    private void copyButton_Click(object sender, EventArgs e) {
+      var symbol = symbolsTreeView.SelectedNode.Tag as ISymbol;
+      if (symbol != null && !(symbol is IReadOnlySymbol)) {
+
+        Content.StartGrammarManipulation();
+        Cloner cloner = new Cloner();
+        var clonedSymbol = cloner.Clone(symbol);
+        ChangeDuplicateSymbolNames(clonedSymbol);
+
+        GroupSymbol groupSymbol = null;
+        if (symbolsTreeView.SelectedNode.Parent != null) groupSymbol = symbolsTreeView.SelectedNode.Parent.Tag as GroupSymbol;
+
+        if (groupSymbol != null) groupSymbol.SymbolsCollection.Add(clonedSymbol);
+        else Content.AddSymbol(clonedSymbol);
+
+        UpdateGrammerConstraintsForClonedSymbol(symbol, cloner);
+        Content.FinishedGrammarManipulation();
+      }
+    }
+
+    private void removeButton_Click(object sender, EventArgs e) {
+      var symbol = symbolsTreeView.SelectedNode.Tag as ISymbol;
+      if (symbol != null && !(symbol is IReadOnlySymbol)) {
+        Content.RemoveSymbol(symbol);
+      }
+    }
+
+    private void showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) {
+      splitContainer1.Panel2Collapsed = !showDetailsCheckBox.Checked;
+    }
+
+    private void showSampleTreeButton_Click(object sender, EventArgs e) {
+      SymbolicExpressionGrammarSampleExpressionTreeView view = new SymbolicExpressionGrammarSampleExpressionTreeView();
+      view.Content = Content;
+      view.Show();
+    }
+
+    #endregion
+
+    #region helpers
+    private void UpdateGrammerConstraintsForClonedSymbol(ISymbol symbol, Cloner cloner) {
+      foreach (var s in symbol.Flatten().Where(x => !(x is GroupSymbol))) {
+        if (!cloner.ClonedObjectRegistered(s)) throw new InvalidOperationException();
+        var clone = cloner.Clone(s);
+        Content.SetSubtreeCount(clone, Content.GetMinimumSubtreeCount(s), Content.GetMaximumSubtreeCount(s));
+        foreach (var childSymbol in Content.GetAllowedChildSymbols(s)) {
+          var newChildSymbol = childSymbol;
+          if (cloner.ClonedObjectRegistered(childSymbol)) newChildSymbol = cloner.Clone(childSymbol);
+          Content.AddAllowedChildSymbol(clone, newChildSymbol);
+        }
+        for (int i = 0; i < Content.GetMaximumSubtreeCount(s); i++) {
+          foreach (var childSymbol in Content.GetAllowedChildSymbols(s, i)) {
+            var newChildSymbol = childSymbol;
+            if (cloner.ClonedObjectRegistered(childSymbol)) newChildSymbol = cloner.Clone(childSymbol);
+            Content.AddAllowedChildSymbol(clone, newChildSymbol, i);
+          }
+        }
+      }
+    }
+
+    private void ChangeDuplicateSymbolNames(ISymbol symbol) {
+      foreach (var s in symbol.Flatten()) {
+        var originalSymbolName = s.Name;
+        int i = 1;
+        while (Content.ContainsSymbol(s)) {
+          s.Name = originalSymbolName + i;
+          i++;
+        }
+      }
+    }
+
+    private void UpdateSymbolDetailsViews() {
+      if (symbolsTreeView.SelectedNode != null) {
+        symbolDetailsViewHost.Content = (ISymbol)symbolsTreeView.SelectedNode.Tag;
+        allowedChildSymbolsControl.Symbol = (ISymbol)symbolsTreeView.SelectedNode.Tag;
+      } else {
+        symbolDetailsViewHost.Content = null;
+        allowedChildSymbolsControl.Symbol = null;
+      }
+    }
+
+    private IEnumerable<TreeNode> IterateTreeNodes(TreeNode node = null) {
+      TreeNodeCollection nodes;
+      if (node == null)
+        nodes = symbolsTreeView.Nodes;
+      else {
+        nodes = node.Nodes;
+        yield return node;
+      }
+
+      foreach (var childNode in nodes.OfType<TreeNode>())
+        foreach (var n in IterateTreeNodes(childNode))
+          yield return n;
+    }
+
+    protected virtual void RebuildImageList() {
+      symbolsTreeView.ImageList.Images.Clear();
+      foreach (TreeNode treeNode in IterateTreeNodes()) {
+        var symbol = (ISymbol)treeNode.Tag;
+        symbolsTreeView.ImageList.Images.Add(symbol == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : symbol.ItemImage);
+        treeNode.ImageIndex = symbolsTreeView.ImageList.Images.Count - 1;
+      }
+    }
+
+    //necessary code to handle dock correctly regarding the expanded nodes
+    bool[] expandendedState;
+    protected override void OnHandleCreated(EventArgs e) {
+      base.OnHandleCreated(e);
+      if (expandendedState == null) return;
+      var nodes = IterateTreeNodes().ToList();
+      for (int i = 0; i < nodes.Count; i++)
+        if (expandendedState[i]) nodes[i].Expand();
+    }
+    protected override void OnHandleDestroyed(EventArgs e) {
+      base.OnHandleDestroyed(e);
+      var nodes = IterateTreeNodes().ToList();
+      expandendedState = new bool[nodes.Count];
+      for (int i = 0; i < nodes.Count; i++)
+        expandendedState[i] = nodes[i].IsExpanded;
+    }
+    #endregion
+  }
+
+  //this class is necessary to prevent double clicks which do not fire the checkbox checked event
+  //workaround taken from http://connect.microsoft.com/VisualStudio/feedback/details/374516/treeview-control-does-not-fire-events-reliably-when-double-clicking-on-checkbox
+  internal class CheckBoxTreeView : TreeView {
+    protected override void WndProc(ref Message m) {
+      // Suppress WM_LBUTTONDBLCLK
+      if (m.Msg == 0x203 && IsOnCheckBox(m)) { m.Result = IntPtr.Zero; } else base.WndProc(ref m);
+    }
+
+    private int GetXLParam(IntPtr lParam) {
+      return lParam.ToInt32() & 0xffff;
+    }
+
+    private int GetYLParam(IntPtr lParam) {
+      return lParam.ToInt32() >> 16;
+    }
+
+    private bool IsOnCheckBox(Message m) {
+      int x = GetXLParam(m.LParam);
+      int y = GetYLParam(m.LParam);
+      TreeNode node = this.GetNodeAt(x, y);
+      return ((x <= node.Bounds.Left - 20) && (x >= node.Bounds.Left - 32));
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarSampleExpressionTreeView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarSampleExpressionTreeView.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarSampleExpressionTreeView.Designer.cs	(revision 10269)
@@ -0,0 +1,215 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  partial class SymbolicExpressionGrammarSampleExpressionTreeView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.sampleTreeGroupBox = new System.Windows.Forms.GroupBox();
+      this.sampleTreeView = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.GraphicalSymbolicExpressionTreeView();
+      this.maxTreeLengthLabel = new System.Windows.Forms.Label();
+      this.maxTreeDepthLabel = new System.Windows.Forms.Label();
+      this.maxTreeLengthTextBox = new System.Windows.Forms.TextBox();
+      this.maxTreeDepthTextBox = new System.Windows.Forms.TextBox();
+      this.generateSampleTreeButton = new System.Windows.Forms.Button();
+      this.treeCreatorComboBox = new System.Windows.Forms.ComboBox();
+      this.treeCreatorLabel = new System.Windows.Forms.Label();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.sampleTreeGroupBox.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      this.nameTextBox.Location = new System.Drawing.Point(93, 0);
+      this.nameTextBox.Size = new System.Drawing.Size(319, 20);
+      // 
+      // infoLabel
+      // 
+      this.infoLabel.Location = new System.Drawing.Point(418, 3);
+      // 
+      // sampleTreeGroupBox
+      // 
+      this.sampleTreeGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.sampleTreeGroupBox.Controls.Add(this.sampleTreeView);
+      this.sampleTreeGroupBox.Location = new System.Drawing.Point(3, 134);
+      this.sampleTreeGroupBox.Name = "sampleTreeGroupBox";
+      this.sampleTreeGroupBox.Size = new System.Drawing.Size(431, 265);
+      this.sampleTreeGroupBox.TabIndex = 3;
+      this.sampleTreeGroupBox.TabStop = false;
+      this.sampleTreeGroupBox.Text = "Sample SymbolicExpressionTree";
+      // 
+      // sampleTreeView
+      // 
+      this.sampleTreeView.AllowDrop = true;
+      this.sampleTreeView.Caption = "Graphical SymbolicExpressionTree View";
+      this.sampleTreeView.Content = null;
+      this.sampleTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.sampleTreeView.Location = new System.Drawing.Point(3, 16);
+      this.sampleTreeView.Name = "sampleTreeView";
+      this.sampleTreeView.ReadOnly = false;
+      this.sampleTreeView.Size = new System.Drawing.Size(425, 246);
+      this.sampleTreeView.TabIndex = 0;
+      // 
+      // maxTreeLengthLabel
+      // 
+      this.maxTreeLengthLabel.AutoSize = true;
+      this.maxTreeLengthLabel.Location = new System.Drawing.Point(3, 29);
+      this.maxTreeLengthLabel.Name = "maxTreeLengthLabel";
+      this.maxTreeLengthLabel.Size = new System.Drawing.Size(88, 13);
+      this.maxTreeLengthLabel.TabIndex = 4;
+      this.maxTreeLengthLabel.Text = "Max TreeLength:";
+      // 
+      // maxTreeDepthLabel
+      // 
+      this.maxTreeDepthLabel.AutoSize = true;
+      this.maxTreeDepthLabel.Location = new System.Drawing.Point(3, 55);
+      this.maxTreeDepthLabel.Name = "maxTreeDepthLabel";
+      this.maxTreeDepthLabel.Size = new System.Drawing.Size(84, 13);
+      this.maxTreeDepthLabel.TabIndex = 5;
+      this.maxTreeDepthLabel.Text = "Max TreeDepth:";
+      // 
+      // maxTreeLengthTextBox
+      // 
+      this.maxTreeLengthTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.maxTreeLengthTextBox.Location = new System.Drawing.Point(93, 26);
+      this.maxTreeLengthTextBox.Name = "maxTreeLengthTextBox";
+      this.maxTreeLengthTextBox.Size = new System.Drawing.Size(341, 20);
+      this.maxTreeLengthTextBox.TabIndex = 6;
+      this.maxTreeLengthTextBox.Text = "50";
+      this.maxTreeLengthTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.maxTreeLengthTextBox_Validating);
+      this.maxTreeLengthTextBox.Validated += new System.EventHandler(this.maxTreeLengthTextBox_Validated);
+      // 
+      // maxTreeDepthTextBox
+      // 
+      this.maxTreeDepthTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.maxTreeDepthTextBox.Location = new System.Drawing.Point(93, 52);
+      this.maxTreeDepthTextBox.Name = "maxTreeDepthTextBox";
+      this.maxTreeDepthTextBox.Size = new System.Drawing.Size(341, 20);
+      this.maxTreeDepthTextBox.TabIndex = 7;
+      this.maxTreeDepthTextBox.Text = "10";
+      this.maxTreeDepthTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.maxTreeDepthTextBox_Validating);
+      this.maxTreeDepthTextBox.Validated += new System.EventHandler(this.maxTreeDepthTextBox_Validated);
+      // 
+      // generateSampleTreeButton
+      // 
+      this.generateSampleTreeButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.generateSampleTreeButton.Location = new System.Drawing.Point(6, 105);
+      this.generateSampleTreeButton.Name = "generateSampleTreeButton";
+      this.generateSampleTreeButton.Size = new System.Drawing.Size(431, 23);
+      this.generateSampleTreeButton.TabIndex = 8;
+      this.generateSampleTreeButton.Text = "Generate SymbolicExpressionTree";
+      this.generateSampleTreeButton.UseVisualStyleBackColor = true;
+      this.generateSampleTreeButton.Click += new System.EventHandler(this.generateSampleTreeButton_Click);
+      // 
+      // treeCreatorComboBox
+      // 
+      this.treeCreatorComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.treeCreatorComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.treeCreatorComboBox.FormattingEnabled = true;
+      this.treeCreatorComboBox.Location = new System.Drawing.Point(93, 78);
+      this.treeCreatorComboBox.Name = "treeCreatorComboBox";
+      this.treeCreatorComboBox.Size = new System.Drawing.Size(341, 21);
+      this.treeCreatorComboBox.TabIndex = 9;
+      this.treeCreatorComboBox.SelectedIndexChanged += new System.EventHandler(this.treeCreatorComboBox_SelectedIndexChanged);
+      // 
+      // treeCreatorLabel
+      // 
+      this.treeCreatorLabel.AutoSize = true;
+      this.treeCreatorLabel.Location = new System.Drawing.Point(3, 81);
+      this.treeCreatorLabel.Name = "treeCreatorLabel";
+      this.treeCreatorLabel.Size = new System.Drawing.Size(69, 13);
+      this.treeCreatorLabel.TabIndex = 10;
+      this.treeCreatorLabel.Text = "Tree Creator:";
+      // 
+      // SymbolicExpressionGrammarSampleExpressionTreeView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.treeCreatorLabel);
+      this.Controls.Add(this.sampleTreeGroupBox);
+      this.Controls.Add(this.maxTreeDepthLabel);
+      this.Controls.Add(this.maxTreeLengthTextBox);
+      this.Controls.Add(this.treeCreatorComboBox);
+      this.Controls.Add(this.maxTreeLengthLabel);
+      this.Controls.Add(this.maxTreeDepthTextBox);
+      this.Controls.Add(this.generateSampleTreeButton);
+      this.Name = "SymbolicExpressionGrammarSampleExpressionTreeView";
+      this.Size = new System.Drawing.Size(437, 402);
+      this.Controls.SetChildIndex(this.generateSampleTreeButton, 0);
+      this.Controls.SetChildIndex(this.maxTreeDepthTextBox, 0);
+      this.Controls.SetChildIndex(this.maxTreeLengthLabel, 0);
+      this.Controls.SetChildIndex(this.treeCreatorComboBox, 0);
+      this.Controls.SetChildIndex(this.maxTreeLengthTextBox, 0);
+      this.Controls.SetChildIndex(this.maxTreeDepthLabel, 0);
+      this.Controls.SetChildIndex(this.sampleTreeGroupBox, 0);
+      this.Controls.SetChildIndex(this.treeCreatorLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.Controls.SetChildIndex(this.infoLabel, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.sampleTreeGroupBox.ResumeLayout(false);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.GroupBox sampleTreeGroupBox;
+    private System.Windows.Forms.Label maxTreeLengthLabel;
+    private System.Windows.Forms.Label maxTreeDepthLabel;
+    private System.Windows.Forms.TextBox maxTreeLengthTextBox;
+    private System.Windows.Forms.TextBox maxTreeDepthTextBox;
+    private System.Windows.Forms.Button generateSampleTreeButton;
+    private GraphicalSymbolicExpressionTreeView sampleTreeView;
+    private System.Windows.Forms.ComboBox treeCreatorComboBox;
+    private System.Windows.Forms.Label treeCreatorLabel;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarSampleExpressionTreeView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarSampleExpressionTreeView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarSampleExpressionTreeView.cs	(revision 10269)
@@ -0,0 +1,158 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.ComponentModel;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  [View("Symbolic Expression Grammar Sample Tree")]
+  public partial class SymbolicExpressionGrammarSampleExpressionTreeView : NamedItemView {
+    private IRandom random;
+    public SymbolicExpressionGrammarSampleExpressionTreeView() {
+      InitializeComponent();
+      random = new MersenneTwister();
+      maxSampleTreeLength = int.Parse(maxTreeLengthTextBox.Text);
+      maxSampleTreeDepth = int.Parse(maxTreeDepthTextBox.Text);
+      foreach (var treeCreator in ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeCreator>()) {
+        treeCreatorComboBox.Items.Add(treeCreator);
+      }
+      treeCreatorComboBox.SelectedIndex = 0;
+    }
+
+    private int maxSampleTreeLength;
+    public int MaxSampleTreeLength {
+      get { return maxSampleTreeLength; }
+      set {
+        if (maxSampleTreeLength != value) {
+          maxSampleTreeLength = value;
+          UpdateSampleTreeView();
+        }
+      }
+    }
+
+    private int maxSampleTreeDepth;
+    public int MaxSampleTreeDepth {
+      get { return maxSampleTreeDepth; }
+      set {
+        if (maxSampleTreeDepth != value) {
+          maxSampleTreeDepth = value;
+          UpdateSampleTreeView();
+        }
+      }
+    }
+
+    public new ISymbolicExpressionGrammar Content {
+      get { return (ISymbolicExpressionGrammar)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      maxTreeLengthTextBox.Enabled = Content != null;
+      maxTreeDepthTextBox.Enabled = Content != null;
+      generateSampleTreeButton.Enabled = Content != null;
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.Changed += new EventHandler(Content_Changed);
+    }
+
+    protected override void DeregisterContentEvents() {
+      Content.Changed -= new EventHandler(Content_Changed);
+      base.DeregisterContentEvents();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) sampleTreeView.Content = null;
+      else UpdateSampleTreeView();
+    }
+
+    private void Content_Changed(object sender, System.EventArgs e) {
+      UpdateSampleTreeView();
+    }
+
+    private void UpdateSampleTreeView() {
+      try {
+        ISymbolicExpressionTreeCreator creator = (ISymbolicExpressionTreeCreator)treeCreatorComboBox.SelectedItem;
+        ISymbolicExpressionTree tree = creator.CreateTree(random, Content, MaxSampleTreeLength, MaxSampleTreeDepth);
+        foreach (var node in tree.Root.IterateNodesPrefix().OfType<SymbolicExpressionTreeTopLevelNode>())
+          node.SetGrammar(null);
+        sampleTreeView.Content = tree;
+      }
+      catch (Exception ex) {
+        sampleTreeView.Content = null;
+        ErrorHandling.ShowErrorDialog(ex);
+      }
+    }
+
+    #region control events
+    private void generateSampleTreeButton_Click(object sender, EventArgs e) {
+      UpdateSampleTreeView();
+    }
+
+    private void maxTreeLengthTextBox_Validating(object sender, CancelEventArgs e) {
+      int maxTreeLength;
+      if (int.TryParse(maxTreeLengthTextBox.Text, out maxTreeLength) && maxTreeLength > 3) {
+        errorProvider.SetError(maxTreeLengthTextBox, string.Empty);
+        e.Cancel = false;
+      } else {
+        errorProvider.SetError(maxTreeLengthTextBox, "Invalid value: maximum tree length must be larger than 3.");
+        e.Cancel = true;
+      }
+    }
+    private void maxTreeLengthTextBox_Validated(object sender, EventArgs e) {
+      int maxTreeLength;
+      if (int.TryParse(maxTreeLengthTextBox.Text, out maxTreeLength) && maxTreeLength > 3) {
+        MaxSampleTreeLength = maxTreeLength;
+      }
+    }
+
+    private void maxTreeDepthTextBox_Validating(object sender, CancelEventArgs e) {
+      int maxTreeDepth;
+      if (int.TryParse(maxTreeDepthTextBox.Text, out maxTreeDepth) && maxTreeDepth > 3) {
+        errorProvider.SetError(maxTreeDepthTextBox, string.Empty);
+        e.Cancel = false;
+      } else {
+        errorProvider.SetError(maxTreeDepthTextBox, "Invalid value: maximum tree depth must be larger than 3.");
+        e.Cancel = true;
+      }
+    }
+    private void maxTreeDepthTextBox_Validated(object sender, EventArgs e) {
+      int maxTreeDepth;
+      if (int.TryParse(maxTreeDepthTextBox.Text, out maxTreeDepth) && maxTreeDepth > 3) {
+        MaxSampleTreeDepth = maxTreeDepth;
+      }
+    }
+    #endregion
+
+    private void treeCreatorComboBox_SelectedIndexChanged(object sender, EventArgs e) {
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarView.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarView.Designer.cs	(revision 10269)
@@ -0,0 +1,72 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  partial class SymbolicExpressionGrammarView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.checkedItemListView = new HeuristicLab.Core.Views.CheckedItemListView<ISymbol>();
+      this.SuspendLayout();
+      this.checkedItemListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.checkedItemListView.Location = new System.Drawing.Point(0, 52);
+      this.checkedItemListView.Name = "itemListView";
+      this.checkedItemListView.Size = new System.Drawing.Size(351, 190);
+      this.checkedItemListView.TabIndex = 0;
+      //                                        
+      // DefaultSymbolicExpressionGrammarView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.checkedItemListView);
+      this.Name = "DefaultSymbolicExpressionGrammarView";
+      this.Size = new System.Drawing.Size(351, 245);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    protected HeuristicLab.Core.Views.CheckedItemListView<ISymbol> checkedItemListView;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarView.cs	(revision 10269)
@@ -0,0 +1,118 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Windows.Forms;
+using HeuristicLab.Collections;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  [View("Symbolic Expression Grammar View")]
+  [Content(typeof(ISymbolicExpressionGrammar), false)]
+  public partial class SymbolicExpressionGrammarView : NamedItemView {
+    private CheckedItemList<ISymbol> symbols;
+
+    public new ISymbolicExpressionGrammar Content {
+      get { return (ISymbolicExpressionGrammar)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public override bool ReadOnly {
+      get {
+        if ((Content != null) && Content.ReadOnly) return true;
+        return base.ReadOnly;
+      }
+      set {
+        if ((Content != null) && Content.ReadOnly) base.ReadOnly = true;
+        else base.ReadOnly = value;
+      }
+    }
+
+    public SymbolicExpressionGrammarView() {
+      InitializeComponent();
+      symbols = new CheckedItemList<ISymbol>();
+      symbols.CheckedItemsChanged += new CollectionItemsChangedEventHandler<IndexedItem<ISymbol>>(symbols_CheckedItemsChanged);
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ReadOnlyChanged += new EventHandler(Content_ReadOnlyChanged);
+    }
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ReadOnlyChanged -= new EventHandler(Content_ReadOnlyChanged);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      UpdateControl();
+    }
+
+    private void Content_ReadOnlyChanged(object sender, EventArgs e) {
+      ReadOnly = Content.ReadOnly;
+    }
+
+    #region content event handlers
+    private void Content_Changed(object sender, EventArgs e) {
+      UpdateControl();
+    }
+    #endregion
+
+    #region helpers
+    private void UpdateControl() {
+      if (Content == null) {
+        ClearSymbols();
+        checkedItemListView.Content = symbols.AsReadOnly();
+      } else {
+        ClearSymbols();
+        foreach (ISymbol symbol in Content.Symbols) {
+          if (!(symbol is IReadOnlySymbol)) {
+            symbol.Changed += new EventHandler(symbol_Changed);
+            symbols.Add(symbol, symbol.Enabled);
+          }
+        }
+        checkedItemListView.Content = symbols.AsReadOnly();
+      }
+      SetEnabledStateOfControls();
+    }
+
+
+    private void symbol_Changed(object sender, EventArgs e) {
+      ISymbol symbol = (ISymbol)sender;
+      symbols.SetItemCheckedState(symbol, symbol.Enabled);
+    }
+
+    private void symbols_CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<ISymbol>> e) {
+      ICheckedItemList<ISymbol> checkedItemList = (ICheckedItemList<ISymbol>)sender;
+      foreach (var indexedItem in e.Items)
+        indexedItem.Value.Enabled = checkedItemList.ItemChecked(indexedItem.Value);
+    }
+    private void ClearSymbols() {
+      foreach (Symbol s in symbols)
+        s.Changed -= new EventHandler(symbol_Changed);
+      symbols.Clear();
+    }
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.Designer.cs	(revision 10269)
@@ -0,0 +1,96 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  public partial class SymbolicExpressionTreeChart {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+      this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
+      this.saveImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
+      this.contextMenuStrip.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // contextMenuStrip
+      // 
+      this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.saveImageToolStripMenuItem});
+      this.contextMenuStrip.Name = "contextMenuStrip";
+      this.contextMenuStrip.Size = new System.Drawing.Size(135, 26);
+      // 
+      // saveImageToolStripMenuItem
+      // 
+      this.saveImageToolStripMenuItem.Name = "saveImageToolStripMenuItem";
+      this.saveImageToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
+      this.saveImageToolStripMenuItem.Text = "Save Image";
+      this.saveImageToolStripMenuItem.Click += new System.EventHandler(this.saveImageToolStripMenuItem_Click);
+      // 
+      // saveFileDialog
+      // 
+      this.saveFileDialog.Filter = "Bitmap (*.bmp)|*.bmp|EMF (*.emf)|*.emf";
+      this.saveFileDialog.FilterIndex = 1;
+      // SymbolicExpressionTreeChart
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.ContextMenuStrip = this.contextMenuStrip;
+      this.Name = "SymbolicExpressionTreeChart";
+      this.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SymbolicExpressionTreeChart_MouseClick);
+      this.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SymbolicExpressionTreeChart_MouseDoubleClick);
+      this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SymbolicExpressionTreeChart_MouseDown);
+      this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.SymbolicExpressionTreeChart_MouseMove);
+      this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.SymbolicExpressionTreeChart_MouseUp);
+      this.contextMenuStrip.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    protected System.Windows.Forms.ToolTip toolTip;
+    protected System.Windows.Forms.ContextMenuStrip contextMenuStrip;
+    protected System.Windows.Forms.ToolStripMenuItem saveImageToolStripMenuItem;
+    protected System.Windows.Forms.SaveFileDialog saveFileDialog;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs	(revision 10269)
@@ -0,0 +1,402 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Windows.Forms;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  public partial class SymbolicExpressionTreeChart : UserControl {
+    private Image image;
+    private StringFormat stringFormat;
+    private Dictionary<ISymbolicExpressionTreeNode, VisualSymbolicExpressionTreeNode> visualTreeNodes;
+    private Dictionary<Tuple<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode>, VisualSymbolicExpressionTreeNodeConnection> visualLines;
+
+    public SymbolicExpressionTreeChart() {
+      InitializeComponent();
+      this.image = new Bitmap(Width, Height);
+      this.stringFormat = new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center };
+      this.spacing = 5;
+      this.lineColor = Color.Black;
+      this.backgroundColor = Color.White;
+      this.textFont = new Font("Times New Roman", 8);
+    }
+
+    public SymbolicExpressionTreeChart(ISymbolicExpressionTree tree)
+      : this() {
+      this.Tree = tree;
+    }
+
+    private int spacing;
+    public int Spacing {
+      get { return this.spacing; }
+      set {
+        this.spacing = value;
+        this.Repaint();
+      }
+    }
+
+    private Color lineColor;
+    public Color LineColor {
+      get { return this.lineColor; }
+      set {
+        this.lineColor = value;
+        this.Repaint();
+      }
+    }
+
+    private Color backgroundColor;
+    public Color BackgroundColor {
+      get { return this.backgroundColor; }
+      set {
+        this.backgroundColor = value;
+        this.Repaint();
+      }
+    }
+
+    private Font textFont;
+    public Font TextFont {
+      get { return this.textFont; }
+      set {
+        this.textFont = value;
+        this.Repaint();
+      }
+    }
+
+    private ISymbolicExpressionTree tree;
+    public ISymbolicExpressionTree Tree {
+      get { return this.tree; }
+      set {
+        tree = value;
+        visualTreeNodes = new Dictionary<ISymbolicExpressionTreeNode, VisualSymbolicExpressionTreeNode>();
+        visualLines = new Dictionary<Tuple<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode>, VisualSymbolicExpressionTreeNodeConnection>();
+        if (tree != null) {
+          foreach (ISymbolicExpressionTreeNode node in tree.IterateNodesPrefix()) {
+            visualTreeNodes[node] = new VisualSymbolicExpressionTreeNode(node);
+            if (node.Parent != null) visualLines[Tuple.Create(node.Parent, node)] = new VisualSymbolicExpressionTreeNodeConnection();
+          }
+        }
+        Repaint();
+      }
+    }
+
+    private bool suspendRepaint;
+    public bool SuspendRepaint {
+      get { return suspendRepaint; }
+      set { suspendRepaint = value; }
+    }
+
+    protected override void OnPaint(PaintEventArgs e) {
+      e.Graphics.DrawImage(image, 0, 0);
+      base.OnPaint(e);
+    }
+    protected override void OnResize(EventArgs e) {
+      base.OnResize(e);
+      if (this.Width <= 1 || this.Height <= 1)
+        this.image = new Bitmap(1, 1);
+      else
+        this.image = new Bitmap(Width, Height);
+      this.Repaint();
+    }
+
+    public void Repaint() {
+      if (!suspendRepaint) {
+        this.GenerateImage();
+        this.Refresh();
+      }
+    }
+
+    public void RepaintNodes() {
+      if (!suspendRepaint) {
+        using (var graphics = Graphics.FromImage(image)) {
+          graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
+          graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
+          foreach (var visualNode in visualTreeNodes.Values) {
+            DrawTreeNode(graphics, visualNode);
+          }
+        }
+        this.Refresh();
+      }
+    }
+
+    public void RepaintNode(VisualSymbolicExpressionTreeNode visualNode) {
+      if (!suspendRepaint) {
+        using (var graphics = Graphics.FromImage(image)) {
+          graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
+          graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
+          DrawTreeNode(graphics, visualNode);
+        }
+        this.Refresh();
+      }
+    }
+
+    private void GenerateImage() {
+      using (Graphics graphics = Graphics.FromImage(image)) {
+        graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
+        graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
+        graphics.Clear(backgroundColor);
+        if (tree != null) {
+          int height = this.Height / tree.Depth;
+          DrawFunctionTree(tree, graphics, 0, 0, this.Width, height);
+        }
+      }
+    }
+
+    public VisualSymbolicExpressionTreeNode GetVisualSymbolicExpressionTreeNode(ISymbolicExpressionTreeNode symbolicExpressionTreeNode) {
+      if (visualTreeNodes.ContainsKey(symbolicExpressionTreeNode))
+        return visualTreeNodes[symbolicExpressionTreeNode];
+      return null;
+    }
+
+    public VisualSymbolicExpressionTreeNodeConnection GetVisualSymbolicExpressionTreeNodeConnection(ISymbolicExpressionTreeNode parent, ISymbolicExpressionTreeNode child) {
+      if (child.Parent != parent) throw new ArgumentException();
+      var key = Tuple.Create(parent, child);
+      VisualSymbolicExpressionTreeNodeConnection connection = null;
+      visualLines.TryGetValue(key, out connection);
+      return connection;
+    }
+
+    #region events
+    public event MouseEventHandler SymbolicExpressionTreeNodeClicked;
+    protected virtual void OnSymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) {
+      var clicked = SymbolicExpressionTreeNodeClicked;
+      if (clicked != null)
+        clicked(sender, e);
+    }
+
+    protected virtual void SymbolicExpressionTreeChart_MouseClick(object sender, MouseEventArgs e) {
+      VisualSymbolicExpressionTreeNode visualTreeNode = FindVisualSymbolicExpressionTreeNodeAt(e.X, e.Y);
+      if (visualTreeNode != null) {
+        OnSymbolicExpressionTreeNodeClicked(visualTreeNode, e);
+      }
+    }
+
+    public event MouseEventHandler SymbolicExpressionTreeNodeDoubleClicked;
+    protected virtual void OnSymbolicExpressionTreeNodeDoubleClicked(object sender, MouseEventArgs e) {
+      var doubleClicked = SymbolicExpressionTreeNodeDoubleClicked;
+      if (doubleClicked != null)
+        doubleClicked(sender, e);
+    }
+
+    protected virtual void SymbolicExpressionTreeChart_MouseDoubleClick(object sender, MouseEventArgs e) {
+      VisualSymbolicExpressionTreeNode visualTreeNode = FindVisualSymbolicExpressionTreeNodeAt(e.X, e.Y);
+      if (visualTreeNode != null)
+        OnSymbolicExpressionTreeNodeDoubleClicked(visualTreeNode, e);
+    }
+
+    public event ItemDragEventHandler SymbolicExpressionTreeNodeDrag;
+    protected virtual void OnSymbolicExpressionTreeNodeDragDrag(object sender, ItemDragEventArgs e) {
+      var dragged = SymbolicExpressionTreeNodeDrag;
+      if (dragged != null)
+        dragged(sender, e);
+    }
+
+    private VisualSymbolicExpressionTreeNode draggedSymbolicExpressionTree;
+    private MouseButtons dragButtons;
+    private void SymbolicExpressionTreeChart_MouseDown(object sender, MouseEventArgs e) {
+      this.dragButtons = e.Button;
+      this.draggedSymbolicExpressionTree = FindVisualSymbolicExpressionTreeNodeAt(e.X, e.Y);
+    }
+    private void SymbolicExpressionTreeChart_MouseUp(object sender, MouseEventArgs e) {
+      this.draggedSymbolicExpressionTree = null;
+      this.dragButtons = MouseButtons.None;
+    }
+
+    private void SymbolicExpressionTreeChart_MouseMove(object sender, MouseEventArgs e) {
+      VisualSymbolicExpressionTreeNode visualTreeNode = FindVisualSymbolicExpressionTreeNodeAt(e.X, e.Y);
+      if (draggedSymbolicExpressionTree != null &&
+        draggedSymbolicExpressionTree != visualTreeNode) {
+        OnSymbolicExpressionTreeNodeDragDrag(draggedSymbolicExpressionTree, new ItemDragEventArgs(dragButtons, draggedSymbolicExpressionTree));
+        draggedSymbolicExpressionTree = null;
+      } else if (draggedSymbolicExpressionTree == null &&
+        visualTreeNode != null) {
+        string tooltipText = visualTreeNode.ToolTip;
+        if (this.toolTip.GetToolTip(this) != tooltipText)
+          this.toolTip.SetToolTip(this, tooltipText);
+
+      } else if (visualTreeNode == null)
+        this.toolTip.SetToolTip(this, "");
+    }
+
+    public VisualSymbolicExpressionTreeNode FindVisualSymbolicExpressionTreeNodeAt(int x, int y) {
+      foreach (var visualTreeNode in visualTreeNodes.Values) {
+        if (x >= visualTreeNode.X && x <= visualTreeNode.X + visualTreeNode.Width &&
+            y >= visualTreeNode.Y && y <= visualTreeNode.Y + visualTreeNode.Height)
+          return visualTreeNode;
+      }
+      return null;
+    }
+    #endregion
+
+    #region methods for painting the symbolic expression tree
+    private void DrawFunctionTree(ISymbolicExpressionTree tree, Graphics graphics, int x, int y, int width, int height) {
+      DrawFunctionTree(tree.Root, graphics, x, y, width, height, Point.Empty);
+    }
+
+    /// <summary>
+    /// 
+    /// </summary>
+    /// <param name="functionTree"> function tree to draw</param>
+    /// <param name="graphics">graphics object to draw on</param>
+    /// <param name="x">x coordinate of drawing area</param>
+    /// <param name="y">y coordinate of drawing area</param>
+    /// <param name="width">width of drawing area</param>
+    /// <param name="height">height of drawing area</param>
+    private void DrawFunctionTree(ISymbolicExpressionTreeNode node, Graphics graphics, int x, int y, int width, int height, Point connectionPoint) {
+      VisualSymbolicExpressionTreeNode visualTreeNode = visualTreeNodes[node];
+      float center_x = x + width / 2;
+      float center_y = y + height / 2;
+      int actualWidth = width - spacing;
+      int actualHeight = height - spacing;
+
+      using (var textBrush = new SolidBrush(visualTreeNode.TextColor))
+      using (var nodeLinePen = new Pen(visualTreeNode.LineColor))
+      using (var nodeFillBrush = new SolidBrush(visualTreeNode.FillColor)) {
+
+        //calculate size of node
+        if (actualWidth >= visualTreeNode.PreferredWidth && actualHeight >= visualTreeNode.PreferredHeight) {
+          visualTreeNode.Width = visualTreeNode.PreferredWidth;
+          visualTreeNode.Height = visualTreeNode.PreferredHeight;
+          visualTreeNode.X = (int)center_x - visualTreeNode.Width / 2;
+          visualTreeNode.Y = (int)center_y - visualTreeNode.Height / 2;
+        }
+          //width too small to draw in desired sized
+        else if (actualWidth < visualTreeNode.PreferredWidth && actualHeight >= visualTreeNode.PreferredHeight) {
+          visualTreeNode.Width = actualWidth;
+          visualTreeNode.Height = visualTreeNode.PreferredHeight;
+          visualTreeNode.X = x;
+          visualTreeNode.Y = (int)center_y - visualTreeNode.Height / 2;
+        }
+          //height too small to draw in desired sized
+        else if (actualWidth >= visualTreeNode.PreferredWidth && actualHeight < visualTreeNode.PreferredHeight) {
+          visualTreeNode.Width = visualTreeNode.PreferredWidth;
+          visualTreeNode.Height = actualHeight;
+          visualTreeNode.X = (int)center_x - visualTreeNode.Width / 2;
+          visualTreeNode.Y = y;
+        }
+          //width and height too small to draw in desired size
+        else {
+          visualTreeNode.Width = actualWidth;
+          visualTreeNode.Height = actualHeight;
+          visualTreeNode.X = x;
+          visualTreeNode.Y = y;
+        }
+
+        //draw terminal node
+        if (node.SubtreeCount == 0) {
+          graphics.FillRectangle(nodeFillBrush, visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height);
+          graphics.DrawRectangle(nodeLinePen, visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height);
+        } else {
+          graphics.FillEllipse(nodeFillBrush, visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height);
+          graphics.DrawEllipse(nodeLinePen, visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height);
+        }
+
+        //draw name of symbol
+        var text = node.ToString();
+        graphics.DrawString(text, textFont, textBrush, new RectangleF(visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height), stringFormat);
+
+        //draw connection line to parent node
+        if (!connectionPoint.IsEmpty && node.Parent != null) {
+          var visualLine = GetVisualSymbolicExpressionTreeNodeConnection(node.Parent, node);
+          using (Pen linePen = new Pen(visualLine.LineColor)) {
+            linePen.DashStyle = visualLine.DashStyle;
+            graphics.DrawLine(linePen, connectionPoint, new Point(visualTreeNode.X + visualTreeNode.Width / 2, visualTreeNode.Y));
+          }
+        }
+
+        //calculate areas for the subtrees according to their tree size and call drawFunctionTree
+        Point connectFrom = new Point(visualTreeNode.X + visualTreeNode.Width / 2, visualTreeNode.Y + visualTreeNode.Height);
+        int[] xBoundaries = new int[node.SubtreeCount + 1];
+        xBoundaries[0] = x;
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          xBoundaries[i + 1] = (int)(xBoundaries[i] + (width * (double)node.GetSubtree(i).GetLength()) / (node.GetLength() - 1));
+          DrawFunctionTree(node.GetSubtree(i), graphics, xBoundaries[i], y + height, xBoundaries[i + 1] - xBoundaries[i], height, connectFrom);
+        }
+      }
+    }
+
+    protected void DrawTreeNode(VisualSymbolicExpressionTreeNode visualTreeNode) {
+      using (var graphics = Graphics.FromImage(image)) {
+        graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
+        graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
+        DrawTreeNode(graphics, visualTreeNode);
+      }
+    }
+
+    protected void DrawTreeNode(Graphics graphics, VisualSymbolicExpressionTreeNode visualTreeNode) {
+      graphics.Clip = new Region(new Rectangle(visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width + 1, visualTreeNode.Height + 1));
+      graphics.Clear(backgroundColor);
+      var node = visualTreeNode.SymbolicExpressionTreeNode;
+      using (var textBrush = new SolidBrush(visualTreeNode.TextColor))
+      using (var nodeLinePen = new Pen(visualTreeNode.LineColor))
+      using (var nodeFillBrush = new SolidBrush(visualTreeNode.FillColor)) {
+        //draw terminal node
+        if (node.SubtreeCount == 0) {
+          graphics.FillRectangle(nodeFillBrush, visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height);
+          graphics.DrawRectangle(nodeLinePen, visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height);
+        } else {
+          graphics.FillEllipse(nodeFillBrush, visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height);
+          graphics.DrawEllipse(nodeLinePen, visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height);
+        }
+        //draw name of symbol
+        var text = node.ToString();
+        graphics.DrawString(text, textFont, textBrush, new RectangleF(visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height), stringFormat);
+      }
+    }
+    #endregion
+
+    #region save image
+    private void saveImageToolStripMenuItem_Click(object sender, EventArgs e) {
+      if (saveFileDialog.ShowDialog() == DialogResult.OK) {
+        string filename = saveFileDialog.FileName.ToLower();
+        if (filename.EndsWith("bmp")) SaveImageAsBitmap(filename);
+        else if (filename.EndsWith("emf")) SaveImageAsEmf(filename);
+        else SaveImageAsBitmap(filename);
+      }
+    }
+
+    public void SaveImageAsBitmap(string filename) {
+      if (tree == null) return;
+      Image image = new Bitmap(Width, Height);
+      using (Graphics g = Graphics.FromImage(image)) {
+        int height = this.Height / tree.Depth;
+        DrawFunctionTree(tree, g, 0, 0, Width, height);
+      }
+      image.Save(filename);
+    }
+
+    public void SaveImageAsEmf(string filename) {
+      if (tree == null) return;
+      using (Graphics g = CreateGraphics()) {
+        using (Metafile file = new Metafile(filename, g.GetHdc())) {
+          using (Graphics emfFile = Graphics.FromImage(file)) {
+            int height = this.Height / tree.Depth;
+            DrawFunctionTree(tree, emfFile, 0, 0, Width, height);
+          }
+        }
+        g.ReleaseHdc();
+      }
+    }
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionView.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionView.Designer.cs	(revision 10269)
@@ -0,0 +1,107 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  partial class SymbolicExpressionView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.textBox = new System.Windows.Forms.TextBox();
+      this.formattersComboBox = new System.Windows.Forms.ComboBox();
+      this.formatterLabel = new System.Windows.Forms.Label();
+      this.SuspendLayout();
+      // 
+      // textBox
+      // 
+      this.textBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.textBox.BackColor = System.Drawing.Color.White;
+      this.textBox.Location = new System.Drawing.Point(3, 30);
+      this.textBox.Multiline = true;
+      this.textBox.Name = "textBox";
+      this.textBox.ReadOnly = true;
+      this.textBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+      this.textBox.Size = new System.Drawing.Size(475, 282);
+      this.textBox.TabIndex = 0;
+      // 
+      // formattersComboBox
+      // 
+      this.formattersComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.formattersComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.formattersComboBox.FormattingEnabled = true;
+      this.formattersComboBox.Location = new System.Drawing.Point(72, 3);
+      this.formattersComboBox.Name = "formattersComboBox";
+      this.formattersComboBox.Size = new System.Drawing.Size(406, 21);
+      this.formattersComboBox.TabIndex = 1;
+      this.formattersComboBox.SelectedIndexChanged += new System.EventHandler(this.formattersComboBox_SelectedIndexChanged);
+      // 
+      // formatterLabel
+      // 
+      this.formatterLabel.AutoSize = true;
+      this.formatterLabel.Location = new System.Drawing.Point(3, 6);
+      this.formatterLabel.Name = "formatterLabel";
+      this.formatterLabel.Size = new System.Drawing.Size(54, 13);
+      this.formatterLabel.TabIndex = 2;
+      this.formatterLabel.Text = "Formatter:";
+      // 
+      // SymbolicExpressionView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.formatterLabel);
+      this.Controls.Add(this.formattersComboBox);
+      this.Controls.Add(this.textBox);
+      this.Name = "SymbolicExpressionView";
+      this.Size = new System.Drawing.Size(481, 315);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.TextBox textBox;
+    private System.Windows.Forms.ComboBox formattersComboBox;
+    private System.Windows.Forms.Label formatterLabel;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionView.cs	(revision 10269)
@@ -0,0 +1,81 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  [View("SymbolicExpression View")]
+  [Content(typeof(ISymbolicExpressionTree), false)]
+  public partial class SymbolicExpressionView : AsynchronousContentView {
+    private readonly List<ISymbolicExpressionTreeStringFormatter> treeFormattersList = new List<ISymbolicExpressionTreeStringFormatter>();
+
+    public new ISymbolicExpressionTree Content {
+      get { return (ISymbolicExpressionTree)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public SymbolicExpressionView() {
+      InitializeComponent();
+      IEnumerable<ISymbolicExpressionTreeStringFormatter> formatters = ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeStringFormatter>();
+      treeFormattersList = new List<ISymbolicExpressionTreeStringFormatter>();
+      foreach (ISymbolicExpressionTreeStringFormatter formatter in formatters) {
+        treeFormattersList.Add(formatter);
+        formattersComboBox.Items.Add(formatter.Name);
+      }
+      if (formattersComboBox.Items.Count > 0)
+        formattersComboBox.SelectedIndex = treeFormattersList.FindIndex(0, treeFormattersList.Count, (f) => f.Name.Contains("Default"));
+      else
+        formattersComboBox.SelectedIndex = -1;
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      UpdateTextbox();
+    }
+
+    private void UpdateTextbox() {
+      if (Content == null || formattersComboBox.SelectedIndex < 0)
+        textBox.Text = string.Empty;
+      else {
+        try {
+          textBox.Text = treeFormattersList[formattersComboBox.SelectedIndex].Format(Content);
+        }
+        catch (ArgumentException) { textBox.Text = "Cannot format the symbolic expression tree with the selected formatter."; }
+        catch (NotSupportedException) { textBox.Text = "Formatting of the symbolic expression tree is not supported by the selected formatter."; }
+      }
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      textBox.Enabled = Content != null;
+      textBox.ReadOnly = ReadOnly;
+    }
+
+    private void formattersComboBox_SelectedIndexChanged(object sender, System.EventArgs e) {
+      UpdateTextbox();
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/VisualSymbolicExpressionTreeNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/VisualSymbolicExpressionTreeNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/VisualSymbolicExpressionTreeNode.cs	(revision 10269)
@@ -0,0 +1,129 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Drawing;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  public class VisualSymbolicExpressionTreeNode : object {
+    private static readonly Color defaultLineColor = Color.Black;
+    private static readonly Color defaultTextColor = Color.Black;
+    private static readonly Color defaultFillColor = Color.White;
+    private const int defaultPreferredWidth = 70;
+    private const int defaultPreferredHeight = 46;
+
+    public VisualSymbolicExpressionTreeNode(ISymbolicExpressionTreeNode symbolicExpressionTreeNode) :
+      this(symbolicExpressionTreeNode, defaultLineColor) {
+    }
+
+    public VisualSymbolicExpressionTreeNode(ISymbolicExpressionTreeNode symbolicExpressionTreeNode, Color lineColor) :
+      this(symbolicExpressionTreeNode, lineColor, defaultTextColor) {
+    }
+
+    public VisualSymbolicExpressionTreeNode(ISymbolicExpressionTreeNode symbolicExpressionTreeNode, Color lineColor, Color textColor) :
+      this(symbolicExpressionTreeNode, lineColor, textColor, defaultFillColor) {
+    }
+
+    public VisualSymbolicExpressionTreeNode(ISymbolicExpressionTreeNode symbolicExpressionTreeNode, Color lineColor, Color textColor, Color fillColor) :
+      this(symbolicExpressionTreeNode, lineColor, textColor, fillColor, defaultPreferredWidth, defaultPreferredHeight) {
+    }
+
+    public VisualSymbolicExpressionTreeNode(ISymbolicExpressionTreeNode symbolicExpressionTreeNode, Color lineColor, Color textColor, Color fillColor, int width, int height) {
+      this.symbolicExpressionTreeNode = symbolicExpressionTreeNode;
+      this.lineColor = lineColor;
+      this.textColor = textColor;
+      this.fillColor = fillColor;
+      this.preferredWidth = width;
+      this.preferredHeight = height;
+      this.ToolTip = symbolicExpressionTreeNode.ToString();
+    }
+
+    #region members for internal use only
+    private int x;
+    public int X {
+      get { return x; }
+      internal set { this.x = value; }
+    }
+
+    private int y;
+    public int Y {
+      get { return y; }
+      internal set { this.y = value; }
+    }
+
+    private int width;
+    public int Width {
+      get { return this.width; }
+      internal set { this.width = value; }
+    }
+
+    private int height;
+    public int Height {
+      get { return this.height; }
+      internal set { this.height = value; }
+    }
+    #endregion
+
+    private ISymbolicExpressionTreeNode symbolicExpressionTreeNode;
+    public ISymbolicExpressionTreeNode SymbolicExpressionTreeNode {
+      get { return this.symbolicExpressionTreeNode; }
+      set {
+        symbolicExpressionTreeNode = value;
+        ToolTip = SymbolicExpressionTreeNode.ToString();
+      }
+    }
+
+    private int preferredWidth;
+    public int PreferredWidth {
+      get { return this.preferredWidth; }
+      set { this.preferredWidth = value; }
+    }
+
+    private int preferredHeight;
+    public int PreferredHeight {
+      get { return this.preferredHeight; }
+      set { this.preferredHeight = value; }
+    }
+
+    private Color lineColor;
+    public Color LineColor {
+      get { return this.lineColor; }
+      set { this.lineColor = value; }
+    }
+
+    private Color textColor;
+    public Color TextColor {
+      get { return this.textColor; }
+      set { this.textColor = value; }
+    }
+
+    private Color fillColor;
+    public Color FillColor {
+      get { return this.fillColor; }
+      set { this.fillColor = value; }
+    }
+
+    private string toolTip;
+    public string ToolTip {
+      get { return toolTip; }
+      set { toolTip = value; }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/VisualSymbolicExpressionTreeNodeConnection.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/VisualSymbolicExpressionTreeNodeConnection.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/VisualSymbolicExpressionTreeNodeConnection.cs	(revision 10269)
@@ -0,0 +1,48 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Drawing;
+using System.Drawing.Drawing2D;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
+  public class VisualSymbolicExpressionTreeNodeConnection : object {
+    private static readonly Color defaultLineColor = Color.Black;
+    private static readonly DashStyle defaultDashStyle = DashStyle.Solid;
+
+    private Color lineColor;
+    public Color LineColor {
+      get { return lineColor; }
+      set { lineColor = value; }
+    }
+
+    private DashStyle dashStyle;
+    public DashStyle DashStyle {
+      get { return dashStyle; }
+      set { dashStyle = value; }
+    }
+
+    public VisualSymbolicExpressionTreeNodeConnection()
+      : base() {
+      lineColor = defaultLineColor;
+      dashStyle = defaultDashStyle;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/BestSymbolicExpressionTreeAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/BestSymbolicExpressionTreeAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/BestSymbolicExpressionTreeAnalyzer.cs	(revision 10269)
@@ -0,0 +1,132 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using 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.PluginInfrastructure;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// An operator that tracks the best symbolic expression trees
+  /// </summary>
+  [Item("BestSymbolicExpressionTreeAnalyzer", "An operator that tracks the best symbolic expression trees")]
+  [StorableClass]
+  [NonDiscoverableType]
+  public sealed class BestSymbolicExpressionTreeAnalyzer : SingleSuccessorOperator, ISymbolicExpressionTreeAnalyzer {
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string ResultsParameterName = "Results";
+    private const string QualityParameterName = "Quality";
+    private const string BestTreeQualityParameterName = "BestTreeQuality";
+    private const string MaximizationParameterName = "Maximization";
+
+    #region Parameter properties
+    public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+    public ILookupParameter<BoolValue> MaximizationParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters[MaximizationParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> BestTreeQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[BestTreeQualityParameterName]; }
+    }
+    public ILookupParameter<ResultCollection> ResultsParameter {
+      get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; }
+    }
+    #endregion
+
+    #region Properties
+    public bool EnabledByDefault {
+      get { return true; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private BestSymbolicExpressionTreeAnalyzer(bool deserializing) : base(deserializing) { }
+    private BestSymbolicExpressionTreeAnalyzer(BestSymbolicExpressionTreeAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BestSymbolicExpressionTreeAnalyzer(this, cloner);
+    }
+    public BestSymbolicExpressionTreeAnalyzer()
+      : base() {
+      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees from which the best should be determined."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The quality value of a tree."));
+      Parameters.Add(new LookupParameter<BoolValue>(MaximizationParameterName, "The order relation for qualities of trees."));
+      Parameters.Add(new LookupParameter<DoubleValue>(BestTreeQualityParameterName, "The quality of the best tree so far."));
+      Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The results collection where the best symbolic expression tree should be stored."));
+
+      SymbolicExpressionTreeParameter.Hidden = true;
+      QualityParameter.Hidden = true;
+      MaximizationParameter.Hidden = true;
+      ResultsParameter.Hidden = true;
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override IOperation Apply() {
+      var qualities = QualityParameter.ActualValue;
+      var trees = SymbolicExpressionTreeParameter.ActualValue;
+      bool maximization = MaximizationParameter.ActualValue.Value;
+      int bestIdx = 0;
+      double bestQuality = qualities[bestIdx].Value;
+      if (maximization) {
+        for (int i = 1; i < qualities.Length; i++)
+          if (qualities[i].Value > bestQuality) {
+            bestIdx = i;
+            bestQuality = qualities[i].Value;
+          }
+      } else {
+        for (int i = 1; i < qualities.Length; i++)
+          if (qualities[i].Value < bestQuality) {
+            bestIdx = i;
+            bestQuality = qualities[i].Value;
+          }
+      }
+      var bestTree = trees[bestIdx];
+
+      var res = ResultsParameter.ActualValue;
+      if (res.ContainsKey("Best tree")) {
+        var prevBestQuality = (DoubleValue)BestTreeQualityParameter.ActualValue;
+        if ((maximization && prevBestQuality.Value < bestQuality) ||
+            (!maximization && prevBestQuality.Value > bestQuality)) {
+          res["Best tree"].Value = bestTree;
+          prevBestQuality.Value = bestQuality;
+        }
+      } else {
+        BestTreeQualityParameter.ActualValue = new DoubleValue(bestQuality);
+        res.Add(new Result("Best tree", bestTree));
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/MinAverageMaxSymbolicExpressionTreeLengthAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/MinAverageMaxSymbolicExpressionTreeLengthAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/MinAverageMaxSymbolicExpressionTreeLengthAnalyzer.cs	(revision 10269)
@@ -0,0 +1,136 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// An operator that tracks the min average and max length of symbolic expression trees.
+  /// </summary>
+  [Item("MinAverageMaxSymbolicExpressionTreeLengthAnalyzer", "An operator that tracks the min avgerage and max length of symbolic expression trees.")]
+  [StorableClass]
+  public sealed class MinAverageMaxSymbolicExpressionTreeLengthAnalyzer : AlgorithmOperator, ISymbolicExpressionTreeAnalyzer {
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string SymbolicExpressionTreeLengthParameterName = "SymbolicExpressionTreeLength";
+    private const string SymbolicExpressionTreeLengthsParameterName = "Symbolic expression tree length";
+    private const string MinTreeLengthParameterName = "Minimal symbolic expression tree length";
+    private const string AverageTreeLengthParameterName = "Average symbolic expression tree length";
+    private const string MaxTreeLengthParameterName = "Maximal symbolic expression tree length";
+    private const string ResultsParameterName = "Results";
+
+    public bool EnabledByDefault {
+      get { return true; }
+    }
+
+    #region parameter properties
+    public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> SymbolicExpressionTreeLengthParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters[SymbolicExpressionTreeLengthParameterName]; }
+    }
+    public ValueLookupParameter<DataTable> SymbolicExpressionTreeLengthsParameter {
+      get { return (ValueLookupParameter<DataTable>)Parameters[SymbolicExpressionTreeLengthsParameterName]; }
+    }
+    public ValueLookupParameter<VariableCollection> ResultsParameter {
+      get { return (ValueLookupParameter<VariableCollection>)Parameters[ResultsParameterName]; }
+    }
+
+    [Storable]
+    private MinAverageMaxValueAnalyzer valueAnalyzer;
+    [Storable]
+    private UniformSubScopesProcessor subScopesProcessor;
+
+    #endregion
+
+    [StorableConstructor]
+    private MinAverageMaxSymbolicExpressionTreeLengthAnalyzer(bool deserializing) : base() { }
+    private MinAverageMaxSymbolicExpressionTreeLengthAnalyzer(MinAverageMaxSymbolicExpressionTreeLengthAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+      valueAnalyzer = cloner.Clone(original.valueAnalyzer);
+      subScopesProcessor = cloner.Clone(original.subScopesProcessor);
+      AfterDeserialization();
+    }
+    public MinAverageMaxSymbolicExpressionTreeLengthAnalyzer()
+      : base() {
+      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree whose length should be calculated."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(SymbolicExpressionTreeLengthParameterName, "The length of the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<DataTable>(SymbolicExpressionTreeLengthsParameterName, "The data table to store the symbolic expression tree lengths."));
+      Parameters.Add(new ValueLookupParameter<VariableCollection>(ResultsParameterName, "The results collection where the analysis values should be stored."));
+
+      subScopesProcessor = new UniformSubScopesProcessor();
+      SymbolicExpressionTreeLengthCalculator lengthCalculator = new SymbolicExpressionTreeLengthCalculator();
+      valueAnalyzer = new MinAverageMaxValueAnalyzer();
+
+      subScopesProcessor.Depth.Value = SymbolicExpressionTreeParameter.Depth;
+      lengthCalculator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name;
+      lengthCalculator.SymbolicExpressionTreeLengthParameter.ActualName = SymbolicExpressionTreeLengthParameter.Name;
+      valueAnalyzer.ValueParameter.ActualName = lengthCalculator.SymbolicExpressionTreeLengthParameter.Name;
+      valueAnalyzer.ValueParameter.Depth = SymbolicExpressionTreeLengthParameter.Depth;
+      valueAnalyzer.AverageValueParameter.ActualName = AverageTreeLengthParameterName;
+      valueAnalyzer.CollectAverageValueInResultsParameter.Value = new BoolValue(false);
+      valueAnalyzer.MaxValueParameter.ActualName = MaxTreeLengthParameterName;
+      valueAnalyzer.CollectMaxValueInResultsParameter.Value = new BoolValue(false);
+      valueAnalyzer.MinValueParameter.ActualName = MinTreeLengthParameterName;
+      valueAnalyzer.CollectMinValueInResultsParameter.Value = new BoolValue(false);
+      valueAnalyzer.ValuesParameter.ActualName = SymbolicExpressionTreeLengthsParameter.Name;
+
+      OperatorGraph.InitialOperator = subScopesProcessor;
+      subScopesProcessor.Operator = lengthCalculator;
+      lengthCalculator.Successor = null;
+      subScopesProcessor.Successor = valueAnalyzer;
+      valueAnalyzer.Successor = null;
+
+      AfterDeserialization();
+    }
+
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      SymbolicExpressionTreeParameter.DepthChanged += new EventHandler(SymbolicExpressionTreeParameter_DepthChanged);
+      SymbolicExpressionTreeLengthParameter.DepthChanged += new EventHandler(SymbolicExpressionTreeLengthParameter_DepthChanged);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer(this, cloner);
+    }
+
+    private void SymbolicExpressionTreeParameter_DepthChanged(object sender, EventArgs e) {
+      OnDepthParameterChanged();
+    }
+
+    private void SymbolicExpressionTreeLengthParameter_DepthChanged(object sender, EventArgs e) {
+      OnDepthParameterChanged();
+    }
+
+    private void OnDepthParameterChanged() {
+      valueAnalyzer.ValueParameter.Depth = SymbolicExpressionTreeParameter.Depth;
+      subScopesProcessor.Depth.Value = SymbolicExpressionTreeParameter.Depth;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionSymbolFrequencyAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionSymbolFrequencyAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionSymbolFrequencyAnalyzer.cs	(revision 10269)
@@ -0,0 +1,143 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Analysis;
+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>
+  /// An operator that tracks the frequencies of distinct symbols in symbolic expression trees.
+  /// </summary>
+  [Item("SymbolicExpressionSymbolFrequencyAnalyzer", "An operator that tracks frequencies of symbols in symbolic expression trees.")]
+  [StorableClass]
+  public class SymbolicExpressionSymbolFrequencyAnalyzer : SingleSuccessorOperator, ISymbolicExpressionTreeAnalyzer {
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string ResultsParameterName = "Results";
+    private const string SymbolFrequenciesParameterName = "SymbolFrequencies";
+    private const string AggregateSymbolsWithDifferentSubtreeCountParameterName = "AggregateSymbolsWithDifferentSubtreeCount";
+
+    #region parameter properties
+    public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    public ILookupParameter<DataTable> SymbolFrequenciesParameter {
+      get { return (ILookupParameter<DataTable>)Parameters[SymbolFrequenciesParameterName]; }
+    }
+    public ILookupParameter<ResultCollection> ResultsParameter {
+      get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; }
+    }
+    public IValueParameter<BoolValue> AggregateSymbolsWithDifferentSubtreeCountParameter {
+      get { return (IValueParameter<BoolValue>)Parameters[AggregateSymbolsWithDifferentSubtreeCountParameterName]; }
+    }
+    #endregion
+    #region properties
+    public virtual bool EnabledByDefault {
+      get { return true; }
+    }
+    public BoolValue AggregrateSymbolsWithDifferentSubtreeCount {
+      get { return AggregateSymbolsWithDifferentSubtreeCountParameter.Value; }
+      set { AggregateSymbolsWithDifferentSubtreeCountParameter.Value = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicExpressionSymbolFrequencyAnalyzer(bool deserializing) : base(deserializing) { }
+    protected SymbolicExpressionSymbolFrequencyAnalyzer(SymbolicExpressionSymbolFrequencyAnalyzer original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicExpressionSymbolFrequencyAnalyzer()
+      : base() {
+      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees to analyze."));
+      Parameters.Add(new LookupParameter<DataTable>(SymbolFrequenciesParameterName, "The data table to store the symbol frequencies."));
+      Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The result collection where the symbol frequencies should be stored."));
+      Parameters.Add(new ValueParameter<BoolValue>(AggregateSymbolsWithDifferentSubtreeCountParameterName, "Flag that indicates if the frequencies of symbols with the same name but different number of sub-trees should be aggregated.", new BoolValue(true)));
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicExpressionSymbolFrequencyAnalyzer(this, cloner);
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      #region remove with HL 3.4
+      if (!Parameters.ContainsKey(AggregateSymbolsWithDifferentSubtreeCountParameterName))
+        Parameters.Add(new ValueParameter<BoolValue>(AggregateSymbolsWithDifferentSubtreeCountParameterName, "Flag that indicates if the frequencies of symbols with the same name but different number of sub-trees should be aggregated.", new BoolValue(true)));
+      #endregion
+    }
+
+    public override IOperation Apply() {
+      ItemArray<ISymbolicExpressionTree> expressions = SymbolicExpressionTreeParameter.ActualValue;
+      ResultCollection results = ResultsParameter.ActualValue;
+      DataTable symbolFrequencies = SymbolFrequenciesParameter.ActualValue;
+      if (symbolFrequencies == null) {
+        symbolFrequencies = new DataTable("Symbol frequencies", "Relative frequency of symbols aggregated over the whole population.");
+        symbolFrequencies.VisualProperties.YAxisTitle = "Relative Symbol Frequency";
+
+        SymbolFrequenciesParameter.ActualValue = symbolFrequencies;
+        results.Add(new Result("Symbol frequencies", symbolFrequencies));
+      }
+
+      // all rows must have the same number of values so we can just take the first
+      int numberOfValues = symbolFrequencies.Rows.Select(r => r.Values.Count).DefaultIfEmpty().First();
+
+      foreach (var pair in SymbolicExpressionSymbolFrequencyAnalyzer.CalculateSymbolFrequencies(expressions, AggregrateSymbolsWithDifferentSubtreeCount.Value)) {
+        if (!symbolFrequencies.Rows.ContainsKey(pair.Key)) {
+          // initialize a new row for the symbol and pad with zeros
+          DataRow row = new DataRow(pair.Key, "", Enumerable.Repeat(0.0, numberOfValues));
+          row.VisualProperties.StartIndexZero = true;
+          symbolFrequencies.Rows.Add(row);
+        }
+        symbolFrequencies.Rows[pair.Key].Values.Add(Math.Round(pair.Value, 3));
+      }
+
+      // add a zero for each data row that was not modified in the previous loop 
+      foreach (var row in symbolFrequencies.Rows.Where(r => r.Values.Count != numberOfValues + 1))
+        row.Values.Add(0.0);
+
+      return base.Apply();
+    }
+
+    public static IEnumerable<KeyValuePair<string, double>> CalculateSymbolFrequencies(IEnumerable<ISymbolicExpressionTree> trees, bool aggregateDifferentNumberOfSubtrees = true) {
+      Dictionary<string, double> symbolFrequencies = new Dictionary<string, double>();
+      int totalNumberOfSymbols = 0;
+
+      foreach (var tree in trees) {
+        foreach (var node in tree.IterateNodesPrefix()) {
+          string symbolName;
+          if (aggregateDifferentNumberOfSubtrees) symbolName = node.Symbol.Name;
+          else symbolName = node.Symbol.Name + "-" + node.SubtreeCount;
+          if (symbolFrequencies.ContainsKey(symbolName)) symbolFrequencies[symbolName] += 1;
+          else symbolFrequencies.Add(symbolName, 1);
+          totalNumberOfSymbols++;
+        }
+      }
+
+      foreach (var pair in symbolFrequencies)
+        yield return new KeyValuePair<string, double>(pair.Key, pair.Value / totalNumberOfSymbols);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionTreeLengthAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionTreeLengthAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionTreeLengthAnalyzer.cs	(revision 10269)
@@ -0,0 +1,253 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using HeuristicLab.Analysis;
+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>
+  /// An operator that tracks tree lengths of Symbolic Expression Trees
+  /// </summary>
+  [Item("SymbolicExpressionTreeLengthAnalyzer", "An operator that tracks tree lengths of Symbolic Expression Trees")]
+  [StorableClass]
+  public sealed class SymbolicExpressionTreeLengthAnalyzer : SingleSuccessorOperator, ISymbolicExpressionTreeAnalyzer {
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string SymbolicExpressionTreeLengthsParameterName = "SymbolicExpressionTreeLengthsTable";
+    private const string SymbolicExpressionTreeLengthsHistoryParameterName = "SymbolicExpressionTreeLengthsHistoryTable";
+    private const string ResultsParameterName = "Results";
+    private const string StoreHistoryParameterName = "StoreHistory";
+    private const string UpdateIntervalParameterName = "UpdateInterval";
+    private const string UpdateCounterParameterName = "UpdateCounter";
+
+    #region Parameter properties
+    public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    public ValueLookupParameter<DataTable> SymbolicExpressionTreeLengthsParameter {
+      get { return (ValueLookupParameter<DataTable>)Parameters[SymbolicExpressionTreeLengthsParameterName]; }
+    }
+    public ValueLookupParameter<DataTableHistory> SymbolicExpressionTreeLengthsHistoryParameter {
+      get { return (ValueLookupParameter<DataTableHistory>)Parameters[SymbolicExpressionTreeLengthsHistoryParameterName]; }
+    }
+    public ValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (ValueLookupParameter<ResultCollection>)Parameters[ResultsParameterName]; }
+    }
+    // history
+    public ValueParameter<BoolValue> StoreHistoryParameter {
+      get { return (ValueParameter<BoolValue>)Parameters[StoreHistoryParameterName]; }
+    }
+    public ValueParameter<IntValue> UpdateIntervalParameter {
+      get { return (ValueParameter<IntValue>)Parameters[UpdateIntervalParameterName]; }
+    }
+    public ValueParameter<IntValue> UpdateCounterParameter {
+      get { return (ValueParameter<IntValue>)Parameters[UpdateCounterParameterName]; }
+    }
+    #endregion
+
+    #region Properties
+    public bool EnabledByDefault {
+      get { return true; }
+    }
+    public IntValue UpdateInterval {
+      get { return UpdateIntervalParameter.Value; }
+    }
+    public IntValue UpdateCounter {
+      get { return UpdateCounterParameter.Value; }
+    }
+    public BoolValue StoreHistory {
+      get { return StoreHistoryParameter.Value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private SymbolicExpressionTreeLengthAnalyzer(bool deserializing) : base(deserializing) { }
+    private SymbolicExpressionTreeLengthAnalyzer(SymbolicExpressionTreeLengthAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicExpressionTreeLengthAnalyzer(this, cloner);
+    }
+    public SymbolicExpressionTreeLengthAnalyzer()
+      : base() {
+      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree whose length should be calculated."));
+      Parameters.Add(new LookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximum allowed symbolic expression tree length"));
+      Parameters.Add(new ValueLookupParameter<DataTable>(SymbolicExpressionTreeLengthsParameterName, "The data table to store the symbolic expression tree lengths."));
+      Parameters.Add(new ValueLookupParameter<DataTableHistory>(SymbolicExpressionTreeLengthsHistoryParameterName, "The data table to store the symbolic expression tree lengths history."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>(ResultsParameterName, "The results collection where the analysis values should be stored."));
+      Parameters.Add(new ValueParameter<BoolValue>(StoreHistoryParameterName, "True if the tree lengths history of the population should be stored.", new BoolValue(false)));
+      Parameters.Add(new ValueParameter<IntValue>(UpdateIntervalParameterName, "The interval in which the tree length analysis should be applied.", new IntValue(1)));
+      Parameters.Add(new ValueParameter<IntValue>(UpdateCounterParameterName, "The value which counts how many times the operator was called since the last update", new IntValue(0)));
+
+      SymbolicExpressionTreeLengthsParameter.Hidden = true;
+      SymbolicExpressionTreeLengthsHistoryParameter.Hidden = true;
+      ResultsParameter.Hidden = true;
+      UpdateCounterParameter.Hidden = true;
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      // check if all the parameters are present and accounted for 
+      if (!Parameters.ContainsKey(StoreHistoryParameterName)) {
+        Parameters.Add(new ValueParameter<BoolValue>(StoreHistoryParameterName, "True if the tree lengths history of the population should be stored.", new BoolValue(false)));
+      }
+      if (!Parameters.ContainsKey(UpdateIntervalParameterName)) {
+        Parameters.Add(new ValueParameter<IntValue>(UpdateIntervalParameterName, "The interval in which the tree length analysis should be applied.", new IntValue(1)));
+      }
+      //necessary code to correct UpdateCounterParameter - type was changed from LookupParameter to ValueParameter
+      if (Parameters.ContainsKey(UpdateCounterParameterName) && (Parameters[UpdateCounterParameterName] is LookupParameter<IntValue>))
+        Parameters.Remove(UpdateCounterParameterName);
+      if (!Parameters.ContainsKey(UpdateCounterParameterName)) {
+        Parameters.Add(new ValueParameter<IntValue>(UpdateCounterParameterName, "The value which counts how many times the operator was called since the last update", new IntValue(0)));
+        UpdateCounterParameter.Hidden = true;
+      }
+    }
+
+    #region IStatefulItem members
+    public override void InitializeState() {
+      base.InitializeState();
+      UpdateCounter.Value = 0;
+    }
+    public override void ClearState() {
+      base.ClearState();
+      UpdateCounter.Value = 0;
+    }
+    #endregion
+
+    public override IOperation Apply() {
+      UpdateCounter.Value++;
+      // the analyzer runs periodically, every 'updateInterval' times
+      if (UpdateCounter.Value == UpdateInterval.Value) {
+        UpdateCounter.Value = 0; // reset counter
+
+        // compute all tree lengths and store them in the lengthsTable
+        var solutions = SymbolicExpressionTreeParameter.ActualValue;
+
+        var treeLengthsTable = SymbolicExpressionTreeLengthsParameter.ActualValue;
+        // if the table was not created yet, we create it here
+        if (treeLengthsTable == null) {
+          treeLengthsTable = new DataTable("Tree Length Histogram");
+          SymbolicExpressionTreeLengthsParameter.ActualValue = treeLengthsTable;
+        }
+
+        // data table which stores tree length values
+        DataRow treeLengthsTableRow;
+
+        const string treeLengthsTableRowName = "Symbolic expression tree lengths";
+        const string treeLengthsTableRowDesc = "The distribution of symbolic expression tree lengths";
+        const string xAxisTitle = "Symbolic expression tree lengths";
+        const string yAxisTitle = "Frequency / Number of tree individuals";
+
+        var treeLengths = solutions.Select(s => (int)s.Length).ToList();
+
+        int maxLength = treeLengths.Max(t => t);
+        int minLength = treeLengths.Min(t => t);
+
+        if (!treeLengthsTable.Rows.ContainsKey(treeLengthsTableRowName)) {
+          treeLengthsTableRow = new DataRow(treeLengthsTableRowName, treeLengthsTableRowDesc, treeLengths.Select(x => (double)x));
+          treeLengthsTable.Rows.Add(treeLengthsTableRow);
+        } else {
+          treeLengthsTableRow = treeLengthsTable.Rows[treeLengthsTableRowName];
+          treeLengthsTableRow.Values.Replace(treeLengths.Select(x => (double)x));
+        }
+
+        double maximumAllowedTreeLength = ((LookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]).ActualValue.Value;
+
+        treeLengthsTableRow.VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Histogram;
+        treeLengthsTableRow.VisualProperties.ExactBins = false;
+
+        int range = maxLength - minLength;
+        if (range == 0) range = 1;
+        // the following trick should result in an integer intervalWidth of 1,2,4,...
+        treeLengthsTableRow.VisualProperties.Bins = range;
+
+        if (maxLength <= 25) // [0,25]
+          treeLengthsTableRow.VisualProperties.ScaleFactor = 1.0;
+        else if (maxLength <= 100) // [26,100]
+          treeLengthsTableRow.VisualProperties.ScaleFactor = 1.0 / 2.0;
+        else if (maxLength <= 250) // [101,250]
+          treeLengthsTableRow.VisualProperties.ScaleFactor = 1.0 / 5.0;
+        else if (maxLength <= 500) // [251,500]
+          treeLengthsTableRow.VisualProperties.ScaleFactor = 1.0 / 10.0;
+        else
+          treeLengthsTableRow.VisualProperties.ScaleFactor = 1.0 / 20.0; // [501,inf]
+
+        treeLengthsTableRow.VisualProperties.IsVisibleInLegend = false;
+
+        // visual properties for the X-axis
+        treeLengthsTable.VisualProperties.XAxisMinimumAuto = false;
+        treeLengthsTable.VisualProperties.XAxisMaximumAuto = false;
+        treeLengthsTable.VisualProperties.XAxisMinimumFixedValue = 0.0;
+        if (maxLength > maximumAllowedTreeLength + 1)
+          treeLengthsTable.VisualProperties.XAxisMaximumFixedValue = maxLength + 1; // +1 so the histogram column for the maximum length won't get trimmed
+        else
+          treeLengthsTable.VisualProperties.XAxisMaximumFixedValue = maximumAllowedTreeLength + 1;
+        treeLengthsTable.VisualProperties.XAxisTitle = xAxisTitle;
+        //visual properties for the Y-axis
+        treeLengthsTable.VisualProperties.YAxisMinimumAuto = false;
+        treeLengthsTable.VisualProperties.YAxisMaximumAuto = false;
+        treeLengthsTable.VisualProperties.YAxisMinimumFixedValue = 0.0;
+        int maxFreq = (int)Math.Round(solutions.GroupBy(s => s.Length).Max(g => g.Count()) / treeLengthsTableRow.VisualProperties.ScaleFactor);
+        if (maxFreq % 5 != 0)
+          maxFreq += (5 - maxFreq % 5);
+        double yAxisMaximumFixedValue = maxFreq;
+
+        treeLengthsTable.VisualProperties.YAxisMaximumFixedValue = yAxisMaximumFixedValue;
+        treeLengthsTable.VisualProperties.YAxisTitle = yAxisTitle;
+
+        var results = ResultsParameter.ActualValue;
+
+        if (!results.ContainsKey(treeLengthsTableRowName)) {
+          results.Add(new Result(treeLengthsTableRowName, treeLengthsTable));
+        } else {
+          results[treeLengthsTableRowName].Value = treeLengthsTable;
+        }
+
+        bool storeHistory = StoreHistoryParameter.Value.Value;
+        const string treeLengthHistoryTableName = "Tree lengths history";
+
+        if (storeHistory) {
+          var treeLengthsHistory = SymbolicExpressionTreeLengthsHistoryParameter.ActualValue;
+          if (treeLengthsHistory == null) {
+            treeLengthsHistory = new DataTableHistory();
+            SymbolicExpressionTreeLengthsHistoryParameter.ActualValue = treeLengthsHistory;
+          }
+          treeLengthsHistory.Add((DataTable)treeLengthsTable.Clone());
+
+          if (!results.ContainsKey(treeLengthHistoryTableName)) {
+            results.Add(new Result(treeLengthHistoryTableName, treeLengthsHistory));
+          } else {
+            results[treeLengthHistoryTableName].Value = treeLengthsHistory;
+          }
+        }
+      }
+      return base.Apply();
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionTreeLengthCalculator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionTreeLengthCalculator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionTreeLengthCalculator.cs	(revision 10269)
@@ -0,0 +1,76 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// An operator that outputs the length of a symbolic expression tree.
+  /// </summary>
+  [Item("SymbolicExpressionTreeLengthCalculator", "An operator that outputs the length of a symbolic expression tree.")]
+  [StorableClass]
+  public sealed class SymbolicExpressionTreeLengthCalculator : SingleSuccessorOperator {
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string SymbolicExpressionTreeLengthParameterName = "SymbolicExpressionTreeLength";
+
+    #region parameter properties
+    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> SymbolicExpressionTreeLengthParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[SymbolicExpressionTreeLengthParameterName]; }
+    }
+    #endregion
+
+    #region properties
+    public SymbolicExpressionTree SymbolicExpressionTree {
+      get { return SymbolicExpressionTreeParameter.ActualValue; }
+    }
+    public DoubleValue SymbolicExpressionTreeLength {
+      get { return SymbolicExpressionTreeLengthParameter.ActualValue; }
+      set { SymbolicExpressionTreeLengthParameter.ActualValue = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private SymbolicExpressionTreeLengthCalculator(bool deserializing) : base(deserializing) { }
+    private SymbolicExpressionTreeLengthCalculator(SymbolicExpressionTreeLengthCalculator original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicExpressionTreeLengthCalculator()
+      : base() {
+      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree whose length should be calculated."));
+      Parameters.Add(new LookupParameter<DoubleValue>(SymbolicExpressionTreeLengthParameterName, "The length of the symbolic expression tree."));
+    }
+
+    public override IOperation Apply() {
+      SymbolicExpressionTreeLength = new DoubleValue(SymbolicExpressionTree.Length);
+      return base.Apply();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicExpressionTreeLengthCalculator(this, cloner);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentCreater.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentCreater.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentCreater.cs	(revision 10269)
@@ -0,0 +1,213 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Creates a new argument within one function-defining branch of a symbolic expression tree.
+  /// As described in Koza, Bennett, Andre, Keane, Genetic Programming III - Darwinian Invention and Problem Solving, 1999, pp. 106
+  /// </summary>
+  [Item("ArgumentCreater", "Manipulates a symbolic expression by creating a new argument within one function-defining branch. As described in Koza, Bennett, Andre, Keane, Genetic Programming III - Darwinian Invention and Problem Solving, 1999, pp. 106")]
+  [StorableClass]
+  public sealed class ArgumentCreater : SymbolicExpressionTreeArchitectureManipulator, ISymbolicExpressionTreeSizeConstraintOperator {
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    #region Parameter Properties
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    #endregion
+    #region Properties
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
+    }
+    public IntValue MaximumSymbolicExpressionTreeDepth {
+      get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; }
+    }
+    #endregion
+    [StorableConstructor]
+    private ArgumentCreater(bool deserializing) : base(deserializing) { }
+    private ArgumentCreater(ArgumentCreater original, Cloner cloner) : base(original, cloner) { }
+    public ArgumentCreater()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
+    }
+
+    public override sealed void ModifyArchitecture(
+      IRandom random,
+      ISymbolicExpressionTree symbolicExpressionTree,
+      IntValue maxFunctionDefinitions, IntValue maxFunctionArguments) {
+      CreateNewArgument(random, symbolicExpressionTree, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value, maxFunctionDefinitions.Value, maxFunctionArguments.Value);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ArgumentCreater(this, cloner);
+    }
+
+    public static bool CreateNewArgument(
+      IRandom random,
+      ISymbolicExpressionTree symbolicExpressionTree,
+      int maxTreeLength, int maxTreeDepth,
+      int maxFunctionDefinitions, int maxFunctionArguments) {
+      // work on a copy in case we find out later that the tree would be too big
+      // in this case it's easiest to simply return the original tree.
+      ISymbolicExpressionTree clonedTree = (ISymbolicExpressionTree)symbolicExpressionTree.Clone();
+
+      var functionDefiningBranches = clonedTree.IterateNodesPrefix().OfType<DefunTreeNode>();
+      if (functionDefiningBranches.Count() == 0)
+        // no function defining branch found => abort
+        return false;
+
+      // select a random function defining branch
+      var selectedDefunBranch = functionDefiningBranches.SelectRandom(random);
+      var definedArguments = (from symbol in selectedDefunBranch.Grammar.Symbols.OfType<Argument>()
+                              select symbol.ArgumentIndex).Distinct();
+      if (definedArguments.Count() >= maxFunctionArguments)
+        // max number of arguments reached => abort
+        return false;
+
+      var allowedArgumentIndexes = Enumerable.Range(0, maxFunctionArguments);
+      var newArgumentIndex = allowedArgumentIndexes.Except(definedArguments).First();
+      ArgumentTreeNode newArgumentNode = MakeArgumentNode(newArgumentIndex);
+
+      // this operation potentially creates very big trees so the access to the length property might throw overflow exception
+      try {
+        if (CreateNewArgumentForDefun(random, clonedTree, selectedDefunBranch, newArgumentNode) && clonedTree.Length <= maxTreeLength && clonedTree.Depth <= maxTreeDepth) {
+
+          // size constraints are fulfilled 
+          // replace root of original tree with root of manipulated tree
+          symbolicExpressionTree.Root = clonedTree.Root;
+          return true;
+        } else {
+          // keep originalTree
+          return false;
+        }
+      }
+      catch (OverflowException) {
+        // keep original tree
+        return false;
+      }
+    }
+
+    private static bool CreateNewArgumentForDefun(IRandom random, ISymbolicExpressionTree tree, DefunTreeNode defunBranch, ArgumentTreeNode newArgumentNode) {
+      // select a random cut point in the function defining branch
+      // the branch at the cut point is to be replaced by a new argument node
+      var cutPoints = (from node in defunBranch.IterateNodesPrefix()
+                       where node.Subtrees.Count() > 0 &&
+                             !node.IterateNodesPrefix().OfType<ArgumentTreeNode>().Any() &&
+                             !node.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>().Any()
+                       from subtree in node.Subtrees
+                       select new CutPoint(node, subtree)).ToList();
+
+      if (cutPoints.Count() == 0)
+        // no cut point found => abort;
+        return false;
+      var selectedCutPoint = cutPoints[random.Next(cutPoints.Count)];
+      // replace the branch at the cut point with an argument node
+      var replacedBranch = selectedCutPoint.Child;
+      selectedCutPoint.Parent.RemoveSubtree(selectedCutPoint.ChildIndex);
+      selectedCutPoint.Parent.InsertSubtree(selectedCutPoint.ChildIndex, newArgumentNode);
+
+      // find all old invocations of the selected ADF and attach a cloned version of the replaced branch (with all argument-nodes expanded)
+      // iterate in post-fix order to make sure that the subtrees of n are already adapted when n is processed
+      var invocationNodes = (from node in tree.IterateNodesPostfix().OfType<InvokeFunctionTreeNode>()
+                             where node.Symbol.FunctionName == defunBranch.FunctionName
+                             where node.Subtrees.Count() == defunBranch.NumberOfArguments
+                             select node).ToList();
+      // do this repeatedly until no matching invocations are found      
+      while (invocationNodes.Count > 0) {
+        List<ISymbolicExpressionTreeNode> newlyAddedBranches = new List<ISymbolicExpressionTreeNode>();
+        foreach (var invocationNode in invocationNodes) {
+          // check that the invocation node really has the correct number of arguments
+          if (invocationNode.Subtrees.Count() != defunBranch.NumberOfArguments) throw new InvalidOperationException();
+          // append a new argument branch after expanding all argument nodes
+          var clonedBranch = (ISymbolicExpressionTreeNode)replacedBranch.Clone();
+          clonedBranch = ReplaceArgumentsInBranch(clonedBranch, invocationNode.Subtrees);
+          invocationNode.InsertSubtree(newArgumentNode.Symbol.ArgumentIndex, clonedBranch);
+          newlyAddedBranches.Add(clonedBranch);
+        }
+        // iterate in post-fix order to make sure that the subtrees of n are already adapted when n is processed
+        invocationNodes = (from newlyAddedBranch in newlyAddedBranches
+                           from node in newlyAddedBranch.IterateNodesPostfix().OfType<InvokeFunctionTreeNode>()
+                           where node.Symbol.FunctionName == defunBranch.FunctionName
+                           where node.Subtrees.Count() == defunBranch.NumberOfArguments
+                           select node).ToList();
+      }
+      // increase expected number of arguments of function defining branch
+      // it's possible that the number of actually referenced arguments was reduced (all references were replaced by a single new argument)
+      // but the number of expected arguments is increased anyway
+      defunBranch.NumberOfArguments++;
+      defunBranch.Grammar.AddSymbol(newArgumentNode.Symbol);
+      defunBranch.Grammar.SetSubtreeCount(newArgumentNode.Symbol, 0, 0);
+      // allow the argument as child of any other symbol
+      GrammarModifier.SetAllowedParentSymbols(defunBranch.Grammar, selectedCutPoint.Child.Symbol, newArgumentNode.Symbol);
+
+      foreach (var subtree in tree.Root.Subtrees) {
+        // when the changed function is known in the branch then update the number of arguments
+        var matchingSymbol = subtree.Grammar.Symbols.OfType<InvokeFunction>().Where(s => s.FunctionName == defunBranch.FunctionName).SingleOrDefault();
+        if (matchingSymbol != null) {
+          subtree.Grammar.SetSubtreeCount(matchingSymbol, defunBranch.NumberOfArguments, defunBranch.NumberOfArguments);
+          foreach (var symb in subtree.Grammar.Symbols) {
+            if (symb is StartSymbol || symb is ProgramRootSymbol) continue;
+            if (symb.Name == matchingSymbol.Name) continue; //don't allow invoke as child of invoke
+            if (subtree.Grammar.IsAllowedChildSymbol(selectedCutPoint.Parent.Symbol, symb, selectedCutPoint.ChildIndex))
+              subtree.Grammar.AddAllowedChildSymbol(matchingSymbol, symb, newArgumentNode.Symbol.ArgumentIndex);
+          }
+        }
+      }
+
+      return true;
+    }
+
+    private static ISymbolicExpressionTreeNode ReplaceArgumentsInBranch(ISymbolicExpressionTreeNode branch, IEnumerable<ISymbolicExpressionTreeNode> argumentTrees) {
+      ArgumentTreeNode argNode = branch as ArgumentTreeNode;
+      if (argNode != null) {
+        // replace argument nodes by a clone of the original subtree that provided the result for the argument node
+        return (SymbolicExpressionTreeNode)argumentTrees.ElementAt(argNode.Symbol.ArgumentIndex).Clone();
+      } else {
+        // call recursively for all subtree
+        List<ISymbolicExpressionTreeNode> subtrees = new List<ISymbolicExpressionTreeNode>(branch.Subtrees);
+        while (branch.Subtrees.Count() > 0) branch.RemoveSubtree(0);
+        foreach (var subtree in subtrees) {
+          branch.AddSubtree(ReplaceArgumentsInBranch(subtree, argumentTrees));
+        }
+        return branch;
+      }
+    }
+
+    private static ArgumentTreeNode MakeArgumentNode(int argIndex) {
+      var node = (ArgumentTreeNode)(new Argument(argIndex)).CreateTreeNode();
+      return node;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentDeleter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentDeleter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentDeleter.cs	(revision 10269)
@@ -0,0 +1,106 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// As described in Koza, Bennett, Andre, Keane, Genetic Programming III - Darwinian Invention and Problem Solving, 1999, pp. 112
+  /// </summary>
+  [Item("ArgumentDeleter", "Manipulates a symbolic expression by deleting an argument from an existing function defining branch. As described in Koza, Bennett, Andre, Keane, Genetic Programming III - Darwinian Invention and Problem Solving, 1999, pp. 112")]
+  [StorableClass]
+  public sealed class ArgumentDeleter : SymbolicExpressionTreeArchitectureManipulator {
+    [StorableConstructor]
+    private ArgumentDeleter(bool deserializing) : base(deserializing) { }
+    private ArgumentDeleter(ArgumentDeleter original, Cloner cloner) : base(original, cloner) { }
+    public ArgumentDeleter() : base() { }
+
+    public override sealed void ModifyArchitecture(
+      IRandom random,
+      ISymbolicExpressionTree symbolicExpressionTree,
+      IntValue maxFunctionDefinitions, IntValue maxFunctionArguments) {
+      DeleteArgument(random, symbolicExpressionTree, maxFunctionDefinitions.Value, maxFunctionArguments.Value);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ArgumentDeleter(this, cloner);
+    }
+
+    public static bool DeleteArgument(
+      IRandom random,
+      ISymbolicExpressionTree symbolicExpressionTree,
+      int maxFunctionDefinitions, int maxFunctionArguments) {
+
+      var functionDefiningBranches = symbolicExpressionTree.IterateNodesPrefix().OfType<DefunTreeNode>();
+      if (functionDefiningBranches.Count() == 0)
+        // no function defining branch => abort
+        return false;
+      var selectedDefunBranch = functionDefiningBranches.SelectRandom(random);
+      if (selectedDefunBranch.NumberOfArguments <= 1)
+        // argument deletion by consolidation is not possible => abort
+        return false;
+      // the argument to be removed is always the one with the largest index 
+      // (otherwise we would have to decrement the index of the larger argument symbols)
+      var removedArgument = (from sym in selectedDefunBranch.Grammar.Symbols.OfType<Argument>()
+                             select sym.ArgumentIndex).Distinct().OrderBy(x => x).Last();
+      // find invocations of the manipulated funcion and remove the specified argument tree
+      var invocationNodes = (from node in symbolicExpressionTree.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()
+                             where node.Symbol.FunctionName == selectedDefunBranch.FunctionName
+                             select node).ToList();
+      foreach (var invokeNode in invocationNodes) {
+        invokeNode.RemoveSubtree(removedArgument);
+      }
+
+      DeleteArgumentByConsolidation(random, selectedDefunBranch, removedArgument);
+
+      // delete the dynamic argument symbol that matches the argument to be removed
+      var matchingSymbol = selectedDefunBranch.Grammar.Symbols.OfType<Argument>().Where(s => s.ArgumentIndex == removedArgument).Single();
+      selectedDefunBranch.Grammar.RemoveSymbol(matchingSymbol);
+      selectedDefunBranch.NumberOfArguments--;
+      // reduce arity in known functions of all root branches
+      foreach (var subtree in symbolicExpressionTree.Root.Subtrees) {
+        var matchingInvokeSymbol = subtree.Grammar.Symbols.OfType<InvokeFunction>().Where(s => s.FunctionName == selectedDefunBranch.FunctionName).SingleOrDefault();
+        if (matchingInvokeSymbol != null) {
+          subtree.Grammar.SetSubtreeCount(matchingInvokeSymbol, selectedDefunBranch.NumberOfArguments, selectedDefunBranch.NumberOfArguments);
+        }
+      }
+      return true;
+    }
+
+    private static void DeleteArgumentByConsolidation(IRandom random, DefunTreeNode branch, int removedArgumentIndex) {
+      // replace references to the deleted argument with random references to existing arguments
+      var possibleArgumentSymbols = (from sym in branch.Grammar.Symbols.OfType<Argument>()
+                                     where sym.ArgumentIndex != removedArgumentIndex
+                                     select sym).ToList();
+      var argNodes = from node in branch.IterateNodesPrefix().OfType<ArgumentTreeNode>()
+                     where node.Symbol.ArgumentIndex == removedArgumentIndex
+                     select node;
+      foreach (var argNode in argNodes) {
+        var replacementSymbol = possibleArgumentSymbols.SelectRandom(random);
+        argNode.Symbol = replacementSymbol;
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentDuplicater.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentDuplicater.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentDuplicater.cs	(revision 10269)
@@ -0,0 +1,131 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Manipulates a symbolic expression by duplicating an existing argument node of a function-defining branch.
+  /// As described in Koza, Bennett, Andre, Keane, Genetic Programming III - Darwinian Invention and Problem Solving, 1999, pp. 94
+  /// </summary>
+  [Item("ArgumentDuplicater", "Manipulates a symbolic expression by duplicating an existing argument node of a function-defining branch. As described in Koza, Bennett, Andre, Keane, Genetic Programming III - Darwinian Invention and Problem Solving, 1999, pp. 94")]
+  [StorableClass]
+  public sealed class ArgumentDuplicater : SymbolicExpressionTreeArchitectureManipulator {
+    [StorableConstructor]
+    private ArgumentDuplicater(bool deserializing) : base(deserializing) { }
+    private ArgumentDuplicater(ArgumentDuplicater original, Cloner cloner) : base(original, cloner) { }
+    public ArgumentDuplicater() : base() { }
+
+    public override sealed void ModifyArchitecture(
+      IRandom random,
+      ISymbolicExpressionTree symbolicExpressionTree,
+      IntValue maxFunctionDefinitions, IntValue maxFunctionArguments) {
+      DuplicateArgument(random, symbolicExpressionTree, maxFunctionDefinitions.Value, maxFunctionArguments.Value);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ArgumentDuplicater(this, cloner);
+    }
+
+    public static bool DuplicateArgument(
+      IRandom random,
+      ISymbolicExpressionTree symbolicExpressionTree,
+      int maxFunctionDefinitions, int maxFunctionArguments) {
+      var functionDefiningBranches = symbolicExpressionTree.IterateNodesPrefix().OfType<DefunTreeNode>();
+
+      var allowedArgumentIndexes = Enumerable.Range(0, maxFunctionArguments);
+      if (functionDefiningBranches.Count() == 0)
+        // no function defining branches => abort
+        return false;
+
+      var selectedDefunBranch = functionDefiningBranches.SelectRandom(random);
+      var argumentSymbols = selectedDefunBranch.Grammar.Symbols.OfType<Argument>();
+      if (argumentSymbols.Count() == 0 || argumentSymbols.Count() >= maxFunctionArguments)
+        // when no argument or number of arguments is already at max allowed value => abort
+        return false;
+      var selectedArgumentSymbol = argumentSymbols.SelectRandom(random);
+      var takenIndexes = argumentSymbols.Select(s => s.ArgumentIndex);
+      var newArgumentIndex = allowedArgumentIndexes.Except(takenIndexes).First();
+
+      var newArgSymbol = new Argument(newArgumentIndex);
+
+      // replace existing references to the original argument with references to the new argument randomly in the selectedBranch
+      var argumentNodes = selectedDefunBranch.IterateNodesPrefix().OfType<ArgumentTreeNode>();
+      foreach (var argNode in argumentNodes) {
+        if (argNode.Symbol == selectedArgumentSymbol) {
+          if (random.NextDouble() < 0.5) {
+            argNode.Symbol = newArgSymbol;
+          }
+        }
+      }
+      // find invocations of the functions and duplicate the matching argument branch
+      var invocationNodes = (from node in symbolicExpressionTree.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()
+                             where node.Symbol.FunctionName == selectedDefunBranch.FunctionName
+                             where node.Subtrees.Count() == selectedDefunBranch.NumberOfArguments
+                             select node).ToList();
+      // do this repeatedly until no matching invocations are found      
+      while (invocationNodes.Count() > 0) {
+        List<ISymbolicExpressionTreeNode> newlyAddedBranches = new List<ISymbolicExpressionTreeNode>();
+        foreach (var invokeNode in invocationNodes) {
+          // check that the invocation node really has the correct number of arguments
+          if (invokeNode.Subtrees.Count() != selectedDefunBranch.NumberOfArguments) throw new InvalidOperationException();
+          var argumentBranch = invokeNode.GetSubtree(selectedArgumentSymbol.ArgumentIndex);
+          var clonedArgumentBranch = (ISymbolicExpressionTreeNode)argumentBranch.Clone();
+          invokeNode.InsertSubtree(newArgumentIndex, clonedArgumentBranch);
+          newlyAddedBranches.Add(clonedArgumentBranch);
+        }
+        invocationNodes = (from newlyAddedBranch in newlyAddedBranches
+                           from node in newlyAddedBranch.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()
+                           where node.Symbol.FunctionName == selectedDefunBranch.FunctionName
+                           where node.Subtrees.Count() == selectedDefunBranch.NumberOfArguments
+                           select node).ToList();
+      }
+      // register the new argument symbol and increase the number of arguments of the ADF
+      selectedDefunBranch.Grammar.AddSymbol(newArgSymbol);
+      selectedDefunBranch.Grammar.SetSubtreeCount(newArgSymbol, 0, 0);
+      // allow the duplicated argument as child of all other arguments where the orginal argument was allowed
+      GrammarModifier.SetAllowedParentSymbols(selectedDefunBranch.Grammar, selectedArgumentSymbol, newArgSymbol);
+      selectedDefunBranch.NumberOfArguments++;
+
+      // increase the arity of the changed ADF in all branches that can use this ADF
+      foreach (var subtree in symbolicExpressionTree.Root.Subtrees) {
+        var matchingInvokeSymbol = (from symb in subtree.Grammar.Symbols.OfType<InvokeFunction>()
+                                    where symb.FunctionName == selectedDefunBranch.FunctionName
+                                    select symb).SingleOrDefault();
+        if (matchingInvokeSymbol != null) {
+          subtree.Grammar.SetSubtreeCount(matchingInvokeSymbol, selectedDefunBranch.NumberOfArguments, selectedDefunBranch.NumberOfArguments);
+          foreach (var symb in subtree.Grammar.Symbols) {
+            if (symb is StartSymbol || symb is ProgramRootSymbol) continue;
+            if (subtree.Grammar.IsAllowedChildSymbol(matchingInvokeSymbol, symb, selectedArgumentSymbol.ArgumentIndex))
+              subtree.Grammar.AddAllowedChildSymbol(matchingInvokeSymbol, symb, newArgumentIndex);
+          }
+        }
+      }
+      return true;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/GrammarModifier.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/GrammarModifier.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/GrammarModifier.cs	(revision 10269)
@@ -0,0 +1,88 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public static class GrammarModifier {
+    internal static void AddInvokeSymbol(ISymbolicExpressionTreeGrammar grammar, string functionName, int nArgs, CutPoint startCutPoint, IEnumerable<CutPoint> argumentCutPoints) {
+      if (!grammar.ContainsSymbol(startCutPoint.Child.Symbol)) return;
+
+      var invokeSym = new InvokeFunction(functionName);
+      grammar.AddSymbol(invokeSym);
+      grammar.SetSubtreeCount(invokeSym, nArgs, nArgs);
+
+      //allow invoke symbol everywhere, where the child of the startCutPoint was allowed
+      SetAllowedParentSymbols(grammar, startCutPoint.Child.Symbol, invokeSym);
+
+      if (nArgs > 0) {
+        //set allowed child symbols of invoke symbol 
+        foreach (ISymbol child in grammar.Symbols) {
+          if (child.Name == invokeSym.Name) continue;
+          int i = 0;
+          foreach (CutPoint argumentCutPoint in argumentCutPoints) {
+            if (grammar.IsAllowedChildSymbol(argumentCutPoint.Parent.Symbol, child, argumentCutPoint.ChildIndex))
+              grammar.AddAllowedChildSymbol(invokeSym, child, i);
+            i++;
+          }
+        }
+      }
+    }
+
+
+
+    internal static void AddArgumentSymbol(ISymbolicExpressionTreeGrammar originalGrammar, ISymbolicExpressionTreeGrammar grammar, IEnumerable<int> argumentIndexes, IEnumerable<CutPoint> argumentCutPoints) {
+      foreach (var pair in argumentIndexes.Zip(argumentCutPoints, (a, b) => new { Index = a, CutPoint = b })) {
+        var argSymbol = new Argument(pair.Index);
+        grammar.AddSymbol(argSymbol);
+        grammar.SetSubtreeCount(argSymbol, 0, 0);
+
+        foreach (var symb in grammar.Symbols) {
+          if (symb is ProgramRootSymbol || symb is StartSymbol) continue;
+          if (originalGrammar.IsAllowedChildSymbol(symb, pair.CutPoint.Child.Symbol))
+            grammar.AddAllowedChildSymbol(symb, argSymbol);
+          else {
+            for (int i = 0; i < grammar.GetMaximumSubtreeCount(symb); i++) {
+              if (originalGrammar.IsAllowedChildSymbol(symb, pair.CutPoint.Child.Symbol, i))
+                grammar.AddAllowedChildSymbol(symb, argSymbol, i);
+            }
+          }
+        }
+      }
+    }
+
+    internal static void SetAllowedParentSymbols(ISymbolicExpressionTreeGrammar grammar, ISymbol symbol, ISymbol newSymbol) {
+      foreach (var symb in grammar.Symbols) {
+        if (symb is ProgramRootSymbol) continue;
+        if (newSymbol is Argument && symb is StartSymbol) continue;
+        if (grammar.IsAllowedChildSymbol(symb, symbol))
+          grammar.AddAllowedChildSymbol(symb, newSymbol);
+        else {
+          for (int i = 0; i < grammar.GetMaximumSubtreeCount(symb); i++) {
+            if (grammar.IsAllowedChildSymbol(symb, symbol, i))
+              grammar.AddAllowedChildSymbol(symb, newSymbol, i);
+          }
+        }
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs	(revision 10269)
@@ -0,0 +1,141 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [Item("MultiSymbolicExpressionTreeArchitectureManipulator", "Randomly selects and applies one of its architecture manipulators every time it is called.")]
+  [StorableClass]
+  public sealed class MultiSymbolicExpressionTreeArchitectureManipulator : StochasticMultiBranch<ISymbolicExpressionTreeManipulator>,
+    ISymbolicExpressionTreeArchitectureManipulator,
+    ISymbolicExpressionTreeSizeConstraintOperator,
+    IStochasticOperator {
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string MaximumFunctionArgumentsParameterName = "MaximumFunctionArguments";
+    private const string MaximumFunctionDefinitionsParameterName = "MaximumFunctionDefinitions";
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    protected override bool CreateChildOperation {
+      get { return true; }
+    }
+    #region Parameter properties
+    public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumFunctionDefinitionsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumFunctionDefinitionsParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumFunctionArgumentsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumFunctionArgumentsParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    #endregion
+    #region Parameter Properties
+    public IntValue MaximumFunctionDefinitions {
+      get { return MaximumFunctionDefinitionsParameter.ActualValue; }
+    }
+    public IntValue MaximumFunctionArguments {
+      get { return MaximumFunctionArgumentsParameter.ActualValue; }
+    }
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
+    }
+    public IntValue MaximumSymbolicExpressionTreeDepth {
+      get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; }
+    }
+    #endregion
+
+
+    [StorableConstructor]
+    private MultiSymbolicExpressionTreeArchitectureManipulator(bool deserializing) : base(deserializing) { }
+    private MultiSymbolicExpressionTreeArchitectureManipulator(MultiSymbolicExpressionTreeArchitectureManipulator original, Cloner cloner) : base(original, cloner) { }
+    public MultiSymbolicExpressionTreeArchitectureManipulator()
+      : base() {
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree on which the operator should be applied."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumFunctionDefinitionsParameterName, "The maximal allowed number of automatically defined functions."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumFunctionArgumentsParameterName, "The maximal allowed number of arguments of a automatically defined functions."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
+
+      List<ISymbolicExpressionTreeManipulator> list = new List<ISymbolicExpressionTreeManipulator>();
+      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(ISymbolicExpressionTreeManipulator))) {
+        if (this.GetType().Assembly != type.Assembly) continue;
+        if (typeof(IMultiOperator<ISymbolicExpressionTreeManipulator>).IsAssignableFrom(type)) continue;
+        list.Add((ISymbolicExpressionTreeManipulator)Activator.CreateInstance(type));
+      }
+      CheckedItemList<ISymbolicExpressionTreeManipulator> checkedItemList = new CheckedItemList<ISymbolicExpressionTreeManipulator>();
+      checkedItemList.AddRange(list.OrderBy(op => op.Name));
+      Operators = checkedItemList.AsReadOnly();
+      Operators_ItemsAdded(this, new CollectionItemsChangedEventArgs<IndexedItem<ISymbolicExpressionTreeManipulator>>(Operators.CheckedItems));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MultiSymbolicExpressionTreeArchitectureManipulator(this, cloner);
+    }
+
+    protected override void Operators_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<ISymbolicExpressionTreeManipulator>> e) {
+      base.Operators_ItemsReplaced(sender, e);
+      ParameterizeManipulators();
+    }
+
+    protected override void Operators_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<ISymbolicExpressionTreeManipulator>> e) {
+      base.Operators_ItemsAdded(sender, e);
+      ParameterizeManipulators();
+    }
+
+    private void ParameterizeManipulators() {
+      foreach (ISymbolicExpressionTreeArchitectureManipulator manipulator in Operators.OfType<ISymbolicExpressionTreeArchitectureManipulator>()) {
+        manipulator.MaximumFunctionArgumentsParameter.ActualName = MaximumFunctionArgumentsParameter.Name;
+        manipulator.MaximumFunctionDefinitionsParameter.ActualName = MaximumFunctionDefinitionsParameter.Name;
+      }
+      foreach (ISymbolicExpressionTreeSizeConstraintOperator manipulator in Operators.OfType<ISymbolicExpressionTreeSizeConstraintOperator>()) {
+        manipulator.MaximumSymbolicExpressionTreeDepthParameter.ActualName = MaximumSymbolicExpressionTreeDepthParameter.Name;
+        manipulator.MaximumSymbolicExpressionTreeLengthParameter.ActualName = MaximumSymbolicExpressionTreeLengthParameter.Name;
+      }
+      foreach (ISymbolicExpressionTreeManipulator manipulator in Operators.OfType<ISymbolicExpressionTreeManipulator>()) {
+        manipulator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name;
+      }
+      foreach (IStochasticOperator manipulator in Operators.OfType<IStochasticOperator>()) {
+        manipulator.RandomParameter.ActualName = RandomParameter.Name;
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineCreater.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineCreater.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineCreater.cs	(revision 10269)
@@ -0,0 +1,248 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Manipulates a symbolic expression by adding one new function-defining branch containing
+  /// a proportion of a preexisting branch and by creating a reference to the new branch.
+  /// As described in Koza, Bennett, Andre, Keane, Genetic Programming III - Darwinian Invention and Problem Solving, 1999, pp. 97
+  /// </summary>
+  [Item("SubroutineCreater", "Manipulates a symbolic expression by adding one new function-defining branch containing a proportion of a preexisting branch and by creating a reference to the new branch. As described in Koza, Bennett, Andre, Keane, Genetic Programming III - Darwinian Invention and Problem Solving, 1999, pp. 97")]
+  [StorableClass]
+  public sealed class SubroutineCreater : SymbolicExpressionTreeArchitectureManipulator, ISymbolicExpressionTreeSizeConstraintOperator {
+    private const double ARGUMENT_CUTOFF_PROBABILITY = 0.05;
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    #region Parameter Properties
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    #endregion
+    #region Properties
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
+    }
+    public IntValue MaximumSymbolicExpressionTreeDepth {
+      get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; }
+    }
+    #endregion
+    [StorableConstructor]
+    private SubroutineCreater(bool deserializing) : base(deserializing) { }
+    private SubroutineCreater(SubroutineCreater original, Cloner cloner) : base(original, cloner) { }
+    public SubroutineCreater()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SubroutineCreater(this, cloner);
+    }
+
+    public override sealed void ModifyArchitecture(
+      IRandom random,
+      ISymbolicExpressionTree symbolicExpressionTree,
+      IntValue maxFunctionDefinitions, IntValue maxFunctionArguments) {
+      CreateSubroutine(random, symbolicExpressionTree, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value, maxFunctionDefinitions.Value, maxFunctionArguments.Value);
+    }
+
+    public static bool CreateSubroutine(
+      IRandom random,
+      ISymbolicExpressionTree symbolicExpressionTree,
+      int maxTreeLength, int maxTreeDepth,
+      int maxFunctionDefinitions, int maxFunctionArguments) {
+      var functionDefiningBranches = symbolicExpressionTree.IterateNodesPrefix().OfType<DefunTreeNode>();
+      if (functionDefiningBranches.Count() >= maxFunctionDefinitions)
+        // allowed maximum number of ADF reached => abort
+        return false;
+      if (symbolicExpressionTree.Length + 4 > maxTreeLength)
+        // defining a new function causes an length increase by 4 nodes (max) if the max tree length is reached => abort
+        return false;
+      string formatString = new StringBuilder().Append('0', (int)Math.Log10(maxFunctionDefinitions * 10 - 1)).ToString(); // >= 100 functions => ###
+      var allowedFunctionNames = from index in Enumerable.Range(0, maxFunctionDefinitions)
+                                 select "ADF" + index.ToString(formatString);
+
+      // select a random body (either the result producing branch or an ADF branch)
+      var bodies = from node in symbolicExpressionTree.Root.Subtrees
+                   select new { Tree = node, Length = node.GetLength() };
+      var totalNumberOfBodyNodes = bodies.Select(x => x.Length).Sum();
+      int r = random.Next(totalNumberOfBodyNodes);
+      int aggregatedNumberOfBodyNodes = 0;
+      ISymbolicExpressionTreeNode selectedBody = null;
+      foreach (var body in bodies) {
+        aggregatedNumberOfBodyNodes += body.Length;
+        if (aggregatedNumberOfBodyNodes > r)
+          selectedBody = body.Tree;
+      }
+      // sanity check
+      if (selectedBody == null) throw new InvalidOperationException();
+
+      // select a random cut point in the selected branch
+      var allCutPoints = (from parent in selectedBody.IterateNodesPrefix()
+                          from subtree in parent.Subtrees
+                          select new CutPoint(parent, subtree)).ToList();
+      if (allCutPoints.Count() == 0)
+        // no cut points => abort
+        return false;
+      string newFunctionName = allowedFunctionNames.Except(functionDefiningBranches.Select(x => x.FunctionName)).First();
+      var selectedCutPoint = allCutPoints.SelectRandom(random);
+      // select random branches as argument cut-off points (replaced by argument terminal nodes in the function)
+      List<CutPoint> argumentCutPoints = SelectRandomArgumentBranches(selectedCutPoint.Child, random, ARGUMENT_CUTOFF_PROBABILITY, maxFunctionArguments);
+      ISymbolicExpressionTreeNode functionBody = selectedCutPoint.Child;
+      // disconnect the function body from the tree
+      selectedCutPoint.Parent.RemoveSubtree(selectedCutPoint.ChildIndex);
+      // disconnect the argument branches from the function
+      functionBody = DisconnectBranches(functionBody, argumentCutPoints);
+      // insert a function invocation symbol instead
+      var invokeNode = (InvokeFunctionTreeNode)(new InvokeFunction(newFunctionName)).CreateTreeNode();
+      selectedCutPoint.Parent.InsertSubtree(selectedCutPoint.ChildIndex, invokeNode);
+      // add the branches selected as argument as subtrees of the function invocation node
+      foreach (var argumentCutPoint in argumentCutPoints)
+        invokeNode.AddSubtree(argumentCutPoint.Child);
+
+      // insert a new function defining branch
+      var defunNode = (DefunTreeNode)(new Defun()).CreateTreeNode();
+      defunNode.FunctionName = newFunctionName;
+      defunNode.AddSubtree(functionBody);
+      symbolicExpressionTree.Root.AddSubtree(defunNode);
+      // the grammar in the newly defined function is a clone of the grammar of the originating branch
+      defunNode.SetGrammar((ISymbolicExpressionTreeGrammar)selectedBody.Grammar.Clone());
+
+      var allowedChildSymbols = selectedBody.Grammar.GetAllowedChildSymbols(selectedBody.Symbol);
+      foreach (var allowedChildSymbol in allowedChildSymbols)
+        defunNode.Grammar.AddAllowedChildSymbol(defunNode.Symbol, allowedChildSymbol);
+      var maxSubtrees = selectedBody.Grammar.GetMaximumSubtreeCount(selectedBody.Symbol);
+      for (int i = 0; i < maxSubtrees; i++) {
+        foreach (var allowedChildSymbol in selectedBody.Grammar.GetAllowedChildSymbols(selectedBody.Symbol, i))
+          defunNode.Grammar.AddAllowedChildSymbol(defunNode.Symbol, allowedChildSymbol);
+      }
+
+      // remove all argument symbols from grammar except that one contained in cutpoints
+      var oldArgumentSymbols = selectedBody.Grammar.Symbols.OfType<Argument>().ToList();
+      foreach (var oldArgSymb in oldArgumentSymbols)
+        defunNode.Grammar.RemoveSymbol(oldArgSymb);
+      // find unique argument indexes and matching symbols in the function defining branch 
+      var newArgumentIndexes = (from node in defunNode.IterateNodesPrefix().OfType<ArgumentTreeNode>()
+                                select node.Symbol.ArgumentIndex).Distinct();
+      // add argument symbols to grammar of function defining branch
+      GrammarModifier.AddArgumentSymbol(selectedBody.Grammar, defunNode.Grammar, newArgumentIndexes, argumentCutPoints);
+      defunNode.NumberOfArguments = newArgumentIndexes.Count();
+      if (defunNode.NumberOfArguments != argumentCutPoints.Count) throw new InvalidOperationException();
+      // add invoke symbol for newly defined function to the original branch 
+      GrammarModifier.AddInvokeSymbol(selectedBody.Grammar, defunNode.FunctionName, defunNode.NumberOfArguments, selectedCutPoint, argumentCutPoints);
+
+      // when the new function body was taken from another function definition
+      // add invoke symbol for newly defined function to all branches that are allowed to invoke the original branch
+      if (selectedBody.Symbol is Defun) {
+        var originalFunctionDefinition = selectedBody as DefunTreeNode;
+        foreach (var subtree in symbolicExpressionTree.Root.Subtrees) {
+          var originalBranchInvokeSymbol = (from symb in subtree.Grammar.Symbols.OfType<InvokeFunction>()
+                                            where symb.FunctionName == originalFunctionDefinition.FunctionName
+                                            select symb).SingleOrDefault();
+          // when the original branch can be invoked from the subtree then also allow invocation of the function
+          if (originalBranchInvokeSymbol != null) {
+            GrammarModifier.AddInvokeSymbol(subtree.Grammar, defunNode.FunctionName, defunNode.NumberOfArguments, selectedCutPoint, argumentCutPoints);
+          }
+        }
+      }
+      return true;
+    }
+
+    private static ISymbolicExpressionTreeNode DisconnectBranches(ISymbolicExpressionTreeNode node, List<CutPoint> argumentCutPoints) {
+      int argumentIndex = argumentCutPoints.FindIndex(x => x.Child == node);
+      if (argumentIndex != -1) {
+        var argSymbol = new Argument(argumentIndex);
+        return argSymbol.CreateTreeNode();
+      }
+      // remove the subtrees so that we can clone only the root node
+      List<ISymbolicExpressionTreeNode> subtrees = new List<ISymbolicExpressionTreeNode>(node.Subtrees);
+      while (node.Subtrees.Count() > 0) node.RemoveSubtree(0);
+      // recursively apply function for subtrees or append a argument terminal node
+      foreach (var subtree in subtrees) {
+        node.AddSubtree(DisconnectBranches(subtree, argumentCutPoints));
+      }
+      return node;
+    }
+
+    private static List<CutPoint> SelectRandomArgumentBranches(ISymbolicExpressionTreeNode selectedRoot,
+      IRandom random,
+      double cutProbability,
+      int maxArguments) {
+      // breadth first determination of argument cut-off points
+      // we must make sure that we cut off all original argument nodes and that the number of new argument is smaller than the limit
+      List<CutPoint> argumentBranches = new List<CutPoint>();
+      if (selectedRoot is ArgumentTreeNode) {
+        argumentBranches.Add(new CutPoint(selectedRoot.Parent, selectedRoot));
+        return argumentBranches;
+      } else {
+        // get the number of argument nodes (which must be cut-off) in the sub-trees
+        var numberOfArgumentsInSubtrees = (from subtree in selectedRoot.Subtrees
+                                           let nArgumentsInTree = subtree.IterateNodesPrefix().OfType<ArgumentTreeNode>().Count()
+                                           select nArgumentsInTree).ToList();
+        // determine the minimal number of new argument nodes for each sub-tree
+        //if we exceed the maxArguments return the same cutpoint as the start cutpoint to create a ADF that returns only its argument
+        var minNewArgumentsForSubtrees = numberOfArgumentsInSubtrees.Select(x => x > 0 ? 1 : 0).ToList();
+        if (minNewArgumentsForSubtrees.Sum() > maxArguments) {
+          argumentBranches.Add(new CutPoint(selectedRoot.Parent, selectedRoot));
+          return argumentBranches;
+        }
+        // cut-off in the sub-trees in random order
+        var randomIndexes = (from index in Enumerable.Range(0, selectedRoot.Subtrees.Count())
+                             select new { Index = index, OrderValue = random.NextDouble() })
+                             .OrderBy(x => x.OrderValue)
+                             .Select(x => x.Index);
+        foreach (var subtreeIndex in randomIndexes) {
+          var subtree = selectedRoot.GetSubtree(subtreeIndex);
+          minNewArgumentsForSubtrees[subtreeIndex] = 0;
+          // => cut-off at 0..n points somewhere in the current sub-tree
+          // determine the maximum number of new arguments that should be created in the branch
+          // as the maximum for the whole branch minus already added arguments minus minimal number of arguments still left
+          int maxArgumentsFromBranch = maxArguments - argumentBranches.Count - minNewArgumentsForSubtrees.Sum();
+          // when no argument is allowed from the current branch then we have to include the whole branch into the function
+          // otherwise: choose randomly wether to cut off immediately or wether to extend the function body into the branch
+          if (maxArgumentsFromBranch == 0) {
+            // don't cut at all => the whole sub-tree branch is included in the function body
+            // (we already checked ahead of time that there are no arguments left over in the subtree)
+          } else if (random.NextDouble() >= cutProbability) {
+            argumentBranches.AddRange(SelectRandomArgumentBranches(subtree, random, cutProbability, maxArgumentsFromBranch));
+          } else {
+            // cut-off at current sub-tree
+            argumentBranches.Add(new CutPoint(subtree.Parent, subtree));
+          }
+        }
+        return argumentBranches;
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDeleter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDeleter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDeleter.cs	(revision 10269)
@@ -0,0 +1,115 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Manipulates a symbolic expression by deleting a preexisting function-defining branch.
+  /// As described in Koza, Bennett, Andre, Keane, Genetic Programming III - Darwinian Invention and Problem Solving, 1999, pp. 108
+  /// </summary>
+  [Item("SubroutineDeleter", "Manipulates a symbolic expression by deleting a preexisting function-defining branch. As described in Koza, Bennett, Andre, Keane, Genetic Programming III - Darwinian Invention and Problem Solving, 1999, pp. 108")]
+  [StorableClass]
+  public sealed class SubroutineDeleter : SymbolicExpressionTreeArchitectureManipulator {
+    [StorableConstructor]
+    private SubroutineDeleter(bool deserializing) : base(deserializing) { }
+    private SubroutineDeleter(SubroutineDeleter original, Cloner cloner) : base(original, cloner) { }
+    public SubroutineDeleter() : base() { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SubroutineDeleter(this, cloner);
+    }
+
+    public override sealed void ModifyArchitecture(
+      IRandom random,
+      ISymbolicExpressionTree symbolicExpressionTree,
+      IntValue maxFunctionDefinitions, IntValue maxFunctionArguments) {
+      DeleteSubroutine(random, symbolicExpressionTree, maxFunctionDefinitions.Value, maxFunctionArguments.Value);
+    }
+
+    public static bool DeleteSubroutine(
+      IRandom random,
+      ISymbolicExpressionTree symbolicExpressionTree,
+      int maxFunctionDefinitions, int maxFunctionArguments) {
+      var functionDefiningBranches = symbolicExpressionTree.IterateNodesPrefix().OfType<DefunTreeNode>();
+
+      if (functionDefiningBranches.Count() == 0)
+        // no ADF to delete => abort
+        return false;
+      var selectedDefunBranch = functionDefiningBranches.SelectRandom(random);
+      // remove the selected defun
+      int defunSubtreeIndex = symbolicExpressionTree.Root.IndexOfSubtree(selectedDefunBranch);
+      symbolicExpressionTree.Root.RemoveSubtree(defunSubtreeIndex);
+
+      // remove references to deleted function
+      foreach (var subtree in symbolicExpressionTree.Root.Subtrees.OfType<SymbolicExpressionTreeTopLevelNode>()) {
+        var matchingInvokeSymbol = (from symb in subtree.Grammar.Symbols.OfType<InvokeFunction>()
+                                    where symb.FunctionName == selectedDefunBranch.FunctionName
+                                    select symb).SingleOrDefault();
+        if (matchingInvokeSymbol != null) {
+          subtree.Grammar.RemoveSymbol(matchingInvokeSymbol);
+        }
+      }
+
+      DeletionByRandomRegeneration(random, symbolicExpressionTree, selectedDefunBranch);
+      return true;
+    }
+
+    private static void DeletionByRandomRegeneration(IRandom random, ISymbolicExpressionTree symbolicExpressionTree, DefunTreeNode selectedDefunBranch) {
+      // find first invocation and replace it with a randomly generated tree
+      // can't find all invocations in one step because once we replaced a top level invocation
+      // the invocations below it are removed already
+      var invocationCutPoint = (from node in symbolicExpressionTree.IterateNodesPrefix()
+                                from subtree in node.Subtrees.OfType<InvokeFunctionTreeNode>()
+                                where subtree.Symbol.FunctionName == selectedDefunBranch.FunctionName
+                                select new CutPoint(node, subtree)).FirstOrDefault();
+      while (invocationCutPoint != null) {
+        // deletion by random regeneration
+        ISymbolicExpressionTreeNode replacementTree = null;
+        var allowedSymbolsList = invocationCutPoint.Parent.Grammar.GetAllowedChildSymbols(invocationCutPoint.Parent.Symbol, invocationCutPoint.ChildIndex).ToList();
+        var weights = allowedSymbolsList.Select(s => s.InitialFrequency);
+        var selectedSymbol = allowedSymbolsList.SelectRandom(weights, random);
+
+        int minPossibleLength = invocationCutPoint.Parent.Grammar.GetMinimumExpressionLength(selectedSymbol);
+        int maxLength = Math.Max(minPossibleLength, invocationCutPoint.Child.GetLength());
+        int minPossibleDepth = invocationCutPoint.Parent.Grammar.GetMinimumExpressionDepth(selectedSymbol);
+        int maxDepth = Math.Max(minPossibleDepth, invocationCutPoint.Child.GetDepth());
+        replacementTree = selectedSymbol.CreateTreeNode();
+        if (replacementTree.HasLocalParameters)
+          replacementTree.ResetLocalParameters(random);
+        invocationCutPoint.Parent.RemoveSubtree(invocationCutPoint.ChildIndex);
+        invocationCutPoint.Parent.InsertSubtree(invocationCutPoint.ChildIndex, replacementTree);
+
+        ProbabilisticTreeCreator.PTC2(random, replacementTree, maxLength, maxDepth);
+
+        invocationCutPoint = (from node in symbolicExpressionTree.IterateNodesPrefix()
+                              from subtree in node.Subtrees.OfType<InvokeFunctionTreeNode>()
+                              where subtree.Symbol.FunctionName == selectedDefunBranch.FunctionName
+                              select new CutPoint(node, subtree)).FirstOrDefault();
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDuplicater.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDuplicater.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDuplicater.cs	(revision 10269)
@@ -0,0 +1,137 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Manipulates a symbolic expression by duplicating a preexisting function-defining branch.
+  /// As described in Koza, Bennett, Andre, Keane, Genetic Programming III - Darwinian Invention and Problem Solving, 1999, pp. 88
+  /// </summary>
+  [Item("SubroutineDuplicater", "Manipulates a symbolic expression by duplicating a preexisting function-defining branch. As described in Koza, Bennett, Andre, Keane, Genetic Programming III - Darwinian Invention and Problem Solving, 1999, pp. 88")]
+  [StorableClass]
+  public sealed class SubroutineDuplicater : SymbolicExpressionTreeArchitectureManipulator {
+    [StorableConstructor]
+    private SubroutineDuplicater(bool deserializing) : base(deserializing) { }
+    private SubroutineDuplicater(SubroutineDuplicater original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public SubroutineDuplicater() : base() { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SubroutineDuplicater(this, cloner);
+    }
+
+    public override sealed void ModifyArchitecture(
+      IRandom random,
+      ISymbolicExpressionTree symbolicExpressionTree,
+      IntValue maxFunctionDefinitions, IntValue maxFunctionArguments) {
+      DuplicateSubroutine(random, symbolicExpressionTree, maxFunctionDefinitions.Value, maxFunctionArguments.Value);
+    }
+
+    public static bool DuplicateSubroutine(
+      IRandom random,
+      ISymbolicExpressionTree symbolicExpressionTree,
+      int maxFunctionDefinitions, int maxFunctionArguments) {
+      var functionDefiningBranches = symbolicExpressionTree.IterateNodesPrefix().OfType<DefunTreeNode>();
+      if (functionDefiningBranches.Count() == 0 || functionDefiningBranches.Count() == maxFunctionDefinitions)
+        // no function defining branches to duplicate or already reached the max number of ADFs
+        return false;
+
+      string formatString = new StringBuilder().Append('0', (int)Math.Log10(maxFunctionDefinitions) + 1).ToString(); // >= 100 functions => ###
+      var allowedFunctionNames = from index in Enumerable.Range(0, maxFunctionDefinitions)
+                                 select "ADF" + index.ToString(formatString);
+      var selectedBranch = functionDefiningBranches.SelectRandom(random);
+      var duplicatedDefunBranch = (DefunTreeNode)selectedBranch.Clone();
+      string newFunctionName = allowedFunctionNames.Except(UsedFunctionNames(symbolicExpressionTree)).First();
+      duplicatedDefunBranch.FunctionName = newFunctionName;
+      symbolicExpressionTree.Root.AddSubtree(duplicatedDefunBranch);
+      duplicatedDefunBranch.SetGrammar((ISymbolicExpressionTreeGrammar)selectedBranch.Grammar.Clone());
+
+      var allowedChildSymbols = selectedBranch.Grammar.GetAllowedChildSymbols(selectedBranch.Symbol);
+      foreach (var allowedChildSymbol in allowedChildSymbols)
+        duplicatedDefunBranch.Grammar.AddAllowedChildSymbol(duplicatedDefunBranch.Symbol, allowedChildSymbol);
+      var maxSubtrees = selectedBranch.Grammar.GetMaximumSubtreeCount(selectedBranch.Symbol);
+      for (int i = 0; i < maxSubtrees; i++) {
+        foreach (var allowedChildSymbol in selectedBranch.Grammar.GetAllowedChildSymbols(selectedBranch.Symbol, i))
+          duplicatedDefunBranch.Grammar.AddAllowedChildSymbol(duplicatedDefunBranch.Symbol, allowedChildSymbol);
+      }
+
+      // add an invoke symbol for each branch that is allowed to invoke the original function
+      foreach (var subtree in symbolicExpressionTree.Root.Subtrees.OfType<SymbolicExpressionTreeTopLevelNode>()) {
+        var matchingInvokeSymbol = (from symb in subtree.Grammar.Symbols.OfType<InvokeFunction>()
+                                    where symb.FunctionName == selectedBranch.FunctionName
+                                    select symb).SingleOrDefault();
+        if (matchingInvokeSymbol != null) {
+          var invokeSymbol = new InvokeFunction(duplicatedDefunBranch.FunctionName);
+          subtree.Grammar.AddSymbol(invokeSymbol);
+          subtree.Grammar.SetSubtreeCount(invokeSymbol, duplicatedDefunBranch.NumberOfArguments, duplicatedDefunBranch.NumberOfArguments);
+
+          foreach (ISymbol symbol in subtree.Grammar.Symbols) {
+            if (subtree.Grammar.IsAllowedChildSymbol(symbol, matchingInvokeSymbol))
+              subtree.Grammar.AddAllowedChildSymbol(symbol, invokeSymbol);
+            else {
+              for (int i = 0; i < subtree.Grammar.GetMaximumSubtreeCount(symbol); i++)
+                if (subtree.Grammar.IsAllowedChildSymbol(symbol, matchingInvokeSymbol, i))
+                  subtree.Grammar.AddAllowedChildSymbol(symbol, invokeSymbol, i);
+            }
+          }
+
+          foreach (ISymbol symbol in subtree.Grammar.GetAllowedChildSymbols(matchingInvokeSymbol))
+            if (symbol != invokeSymbol) //avoid duplicate entry invokesymbol / invokesymbol
+              subtree.Grammar.AddAllowedChildSymbol(invokeSymbol, symbol);
+          for (int i = 0; i < subtree.Grammar.GetMaximumSubtreeCount(matchingInvokeSymbol); i++) {
+            foreach (ISymbol symbol in subtree.Grammar.GetAllowedChildSymbols(matchingInvokeSymbol, i).Except(subtree.Grammar.GetAllowedChildSymbols(matchingInvokeSymbol)))
+              subtree.Grammar.AddAllowedChildSymbol(invokeSymbol, symbol, i);
+          }
+        }
+        // in the current subtree:
+        // for all invoke nodes of the original function replace the invoke of the original function with an invoke of the new function randomly
+        var originalFunctionInvocations = from node in subtree.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()
+                                          where node.Symbol.FunctionName == selectedBranch.FunctionName
+                                          select node;
+        foreach (var originalFunctionInvokeNode in originalFunctionInvocations) {
+          var newInvokeSymbol = (from symb in subtree.Grammar.Symbols.OfType<InvokeFunction>()
+                                 where symb.FunctionName == duplicatedDefunBranch.FunctionName
+                                 select symb).Single();
+          // flip coin wether to replace with newly defined function
+          if (random.NextDouble() < 0.5) {
+            originalFunctionInvokeNode.Symbol = newInvokeSymbol;
+          }
+        }
+      }
+      return true;
+    }
+
+    private static IEnumerable<string> UsedFunctionNames(ISymbolicExpressionTree symbolicExpressionTree) {
+      return from node in symbolicExpressionTree.IterateNodesPrefix()
+             where node.Symbol is Defun
+             select ((DefunTreeNode)node).FunctionName;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SymbolicExpressionTreeArchitectureManipulator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SymbolicExpressionTreeArchitectureManipulator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SymbolicExpressionTreeArchitectureManipulator.cs	(revision 10269)
@@ -0,0 +1,74 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Base class for architecture altering operators for symbolic expression trees.
+  /// </summary>
+  [StorableClass]
+  public abstract class SymbolicExpressionTreeArchitectureManipulator : SymbolicExpressionTreeManipulator, ISymbolicExpressionTreeArchitectureManipulator {
+    private const string MaximumFunctionArgumentsParameterName = "MaximumFunctionArguments";
+    private const string MaximumFunctionDefinitionsParameterName = "MaximumFunctionDefinitions";
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    #region parameter properties
+    public IValueLookupParameter<IntValue> MaximumFunctionDefinitionsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumFunctionDefinitionsParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumFunctionArgumentsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumFunctionArgumentsParameterName]; }
+    }
+    #endregion
+    #region properties
+    public IntValue MaximumFunctionDefinitions {
+      get { return MaximumFunctionDefinitionsParameter.ActualValue; }
+    }
+    public IntValue MaximumFunctionArguments {
+      get { return MaximumFunctionArgumentsParameter.ActualValue; }
+    }
+    #endregion
+    [StorableConstructor]
+    protected SymbolicExpressionTreeArchitectureManipulator(bool deserializing) : base(deserializing) { }
+    protected SymbolicExpressionTreeArchitectureManipulator(SymbolicExpressionTreeArchitectureManipulator original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicExpressionTreeArchitectureManipulator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumFunctionDefinitionsParameterName, "The maximal allowed number of automatically defined functions."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumFunctionArgumentsParameterName, "The maximal allowed number of arguments of a automatically defined functions."));
+    }
+
+    protected override sealed void Manipulate(IRandom random, ISymbolicExpressionTree symbolicExpressionTree) {
+      ModifyArchitecture(random, symbolicExpressionTree, MaximumFunctionDefinitions, MaximumFunctionArguments);
+    }
+
+    public abstract void ModifyArchitecture(
+      IRandom random,
+      ISymbolicExpressionTree tree,
+      IntValue maxFunctionDefinitions,
+      IntValue maxFunctionArguments);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs	(revision 10269)
@@ -0,0 +1,35 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  // total size of this class should be small to improve cache access while executing the code
+  public class Instruction {
+    // the tree node can hold additional data that is necessary for the execution of this instruction
+    public ISymbolicExpressionTreeNode 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 object value (addresses for calls, argument index for arguments)
+    public object data;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/LinearInstruction.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/LinearInstruction.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/LinearInstruction.cs	(revision 10269)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  // total size of this class should be small to improve cache access while executing the code
+  public class LinearInstruction : Instruction {
+    public double value;
+    public byte childIndex;
+    public bool skip;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeCompiler.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeCompiler.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeCompiler.cs	(revision 10269)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public static class SymbolicExpressionTreeCompiler {
+
+    public static Instruction[] Compile(ISymbolicExpressionTree tree, Func<ISymbolicExpressionTreeNode, byte> opCodeMapper) {
+      return Compile(tree, opCodeMapper, Enumerable.Empty<Func<Instruction, Instruction>>());
+    }
+    public static Instruction[] Compile(ISymbolicExpressionTree tree, Func<ISymbolicExpressionTreeNode, byte> opCodeMapper, IEnumerable<Func<Instruction, Instruction>> postInstructionCompiledHooks) {
+      Dictionary<string, ushort> entryPoint = new Dictionary<string, ushort>();
+      List<Instruction> code = new List<Instruction>();
+      // compile main body branches
+      foreach (var branch in tree.Root.GetSubtree(0).Subtrees) {
+        code.AddRange(Compile(branch, opCodeMapper, postInstructionCompiledHooks));
+      }
+      // compile function 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.GetSubtree(0), opCodeMapper, postInstructionCompiledHooks));
+      }
+      // 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.data = entryPoint[invokeNode.Symbol.FunctionName];
+        }
+      }
+
+      return code.ToArray();
+    }
+
+    private static IEnumerable<Instruction> Compile(ISymbolicExpressionTreeNode branch, Func<ISymbolicExpressionTreeNode, byte> opCodeMapper, IEnumerable<Func<Instruction, Instruction>> postInstructionCompiledHooks) {
+      foreach (var node in branch.IterateNodesPrefix()) {
+        Instruction instr = new Instruction();
+        int subtreesCount = node.SubtreeCount;
+        if (subtreesCount > 255) throw new ArgumentException("Number of subtrees is too big (>255)");
+        instr.nArguments = (byte)subtreesCount;
+        instr.opCode = opCodeMapper(node);
+        if (node.Symbol is Argument) {
+          var argNode = (ArgumentTreeNode)node;
+          instr.data = (ushort)argNode.Symbol.ArgumentIndex;
+        }
+        instr.dynamicNode = node;
+        foreach (var hook in postInstructionCompiledHooks) {
+          instr = hook(instr);
+        }
+        yield return instr;
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeLinearCompiler.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeLinearCompiler.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeLinearCompiler.cs	(revision 10269)
@@ -0,0 +1,43 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public static class SymbolicExpressionTreeLinearCompiler {
+    public static LinearInstruction[] Compile(ISymbolicExpressionTree tree, Func<ISymbolicExpressionTreeNode, byte> opCodeMapper) {
+      var root = tree.Root.GetSubtree(0).GetSubtree(0);
+      var code = new LinearInstruction[root.GetLength()];
+      code[0] = new LinearInstruction { dynamicNode = root, nArguments = (byte)root.SubtreeCount, opCode = opCodeMapper(root) };
+      int c = 1, i = 0;
+      foreach (var node in root.IterateNodesBreadth()) {
+        for (int j = 0; j < node.SubtreeCount; ++j) {
+          var s = node.GetSubtree(j);
+          code[c + j] = new LinearInstruction { dynamicNode = s, nArguments = (byte)s.SubtreeCount, opCode = opCodeMapper(s) };
+        }
+        code[i].childIndex = (byte)c;
+        c += node.SubtreeCount;
+        ++i;
+      }
+      return code;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs	(revision 10269)
@@ -0,0 +1,207 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [NonDiscoverableType]
+  [StorableClass]
+  [Item("FullTreeCreator", "An operator that creates new symbolic expression trees using the 'Full' method")]
+  public class FullTreeCreator : SymbolicExpressionTreeCreator,
+                                 ISymbolicExpressionTreeSizeConstraintOperator,
+                                 ISymbolicExpressionTreeGrammarBasedOperator {
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
+    private const string ClonedSymbolicExpressionTreeGrammarParameterName = "ClonedSymbolicExpressionTreeGrammar";
+
+    #region Parameter Properties
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+
+    public IValueLookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionTreeGrammarParameter {
+      get { return (IValueLookupParameter<ISymbolicExpressionGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
+    }
+
+    public ILookupParameter<ISymbolicExpressionGrammar> ClonedSymbolicExpressionTreeGrammarParameter {
+      get { return (ILookupParameter<ISymbolicExpressionGrammar>)Parameters[ClonedSymbolicExpressionTreeGrammarParameterName]; }
+    }
+
+    #endregion
+    #region Properties
+    public IntValue MaximumSymbolicExpressionTreeDepth {
+      get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; }
+    }
+
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
+    }
+
+    public ISymbolicExpressionGrammar ClonedSymbolicExpressionTreeGrammar {
+      get { return ClonedSymbolicExpressionTreeGrammarParameter.ActualValue; }
+    }
+
+    #endregion
+
+    [StorableConstructor]
+    protected FullTreeCreator(bool deserializing) : base(deserializing) { }
+    protected FullTreeCreator(FullTreeCreator original, Cloner cloner) : base(original, cloner) { }
+
+    public FullTreeCreator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName,
+        "The maximal length (number of nodes) of the symbolic expression tree (this parameter is ignored)."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName,
+        "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
+      Parameters.Add(new ValueLookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName,
+        "The tree grammar that defines the correct syntax of symbolic expression trees that should be created."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(ClonedSymbolicExpressionTreeGrammarParameterName,
+        "An immutable clone of the concrete grammar that is actually used to create and manipulate trees."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new FullTreeCreator(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) {
+        SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true;
+        IScope globalScope = ExecutionContext.Scope;
+        while (globalScope.Parent != null)
+          globalScope = globalScope.Parent;
+
+        globalScope.Variables.Add(new Variable(ClonedSymbolicExpressionTreeGrammarParameterName,
+          (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone()));
+      }
+      return base.Apply();
+    }
+
+    protected override ISymbolicExpressionTree Create(IRandom random) {
+      return Create(random, ClonedSymbolicExpressionTreeGrammar, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
+    }
+
+    public override ISymbolicExpressionTree CreateTree(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth) {
+      return Create(random, grammar, maxTreeLength, maxTreeDepth);
+    }
+
+    /// <summary>
+    /// Create a symbolic expression tree using the 'Full' method.
+    /// Function symbols are used for all nodes situated on a level above the maximum tree depth. 
+    /// Nodes on the last tree level will have Terminal symbols.
+    /// </summary>
+    /// <param name="random">Random generator</param>
+    /// <param name="grammar">Available tree grammar</param>
+    /// <param name="maxTreeDepth">Maximum tree depth</param>
+    /// <param name="maxTreeLength">Maximum tree length. This parameter is not used.</param>
+    /// <returns></returns>
+    public static ISymbolicExpressionTree Create(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth) {
+      var tree = new SymbolicExpressionTree();
+      var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
+      if (rootNode.HasLocalParameters) rootNode.ResetLocalParameters(random);
+      rootNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
+
+      var startNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode();
+      if (startNode.HasLocalParameters) startNode.ResetLocalParameters(random);
+      startNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
+
+      rootNode.AddSubtree(startNode);
+
+      Create(random, startNode, maxTreeDepth - 2);
+      tree.Root = rootNode;
+      return tree;
+    }
+
+    public static void Create(IRandom random, ISymbolicExpressionTreeNode seedNode, int maxDepth) {
+      // make sure it is possible to create a trees smaller than maxDepth
+      if (seedNode.Grammar.GetMinimumExpressionDepth(seedNode.Symbol) > maxDepth)
+        throw new ArgumentException("Cannot create trees of depth " + maxDepth + " or smaller because of grammar constraints.", "maxDepth");
+
+
+      int arity = seedNode.Grammar.GetMaximumSubtreeCount(seedNode.Symbol);
+      // Throw an exception if the seedNode happens to be a terminal, since in this case we cannot grow a tree.
+      if (arity <= 0)
+        throw new ArgumentException("Cannot grow tree. Seed node shouldn't have arity zero.");
+
+      var allowedSymbols = seedNode.Grammar.AllowedSymbols
+        .Where(s => s.InitialFrequency > 0.0 && seedNode.Grammar.GetMaximumSubtreeCount(s) > 0)
+        .ToList();
+
+      for (var i = 0; i < arity; i++) {
+        var possibleSymbols = allowedSymbols
+          .Where(s => seedNode.Grammar.IsAllowedChildSymbol(seedNode.Symbol, s, i))
+          .ToList();
+        var weights = possibleSymbols.Select(s => s.InitialFrequency).ToList();
+        var selectedSymbol = possibleSymbols.SelectRandom(weights, random);
+        var tree = selectedSymbol.CreateTreeNode();
+        if (tree.HasLocalParameters) tree.ResetLocalParameters(random);
+        seedNode.AddSubtree(tree);
+      }
+
+      // Only iterate over the non-terminal nodes (those which have arity > 0)
+      // Start from depth 2 since the first two levels are formed by the rootNode and the seedNode
+      foreach (var subTree in seedNode.Subtrees)
+        if (subTree.Grammar.GetMaximumSubtreeCount(subTree.Symbol) > 0)
+          RecursiveCreate(random, subTree, 2, maxDepth);
+    }
+
+    private static void RecursiveCreate(IRandom random, ISymbolicExpressionTreeNode root, int currentDepth, int maxDepth) {
+      var arity = root.Grammar.GetMaximumSubtreeCount(root.Symbol);
+      // In the 'Full' grow method, we cannot have terminals on the intermediate tree levels.
+      if (arity <= 0)
+        throw new ArgumentException("Cannot grow node of arity zero. Expected a function node.");
+
+      var allowedSymbols = root.Grammar.AllowedSymbols
+        .Where(s => s.InitialFrequency > 0.0)
+        .ToList();
+
+      for (var i = 0; i < arity; i++) {
+        var possibleSymbols = allowedSymbols
+          .Where(s => root.Grammar.IsAllowedChildSymbol(root.Symbol, s, i) &&
+            root.Grammar.GetMinimumExpressionDepth(s) - 1 <= maxDepth - currentDepth &&
+            root.Grammar.GetMaximumExpressionDepth(s) > maxDepth - currentDepth)
+          .ToList();
+        if (!possibleSymbols.Any())
+          throw new InvalidOperationException("No symbols are available for the tree.");
+        var weights = possibleSymbols.Select(s => s.InitialFrequency).ToList();
+        var selectedSymbol = possibleSymbols.SelectRandom(weights, random);
+        var tree = selectedSymbol.CreateTreeNode();
+        if (tree.HasLocalParameters) tree.ResetLocalParameters(random);
+        root.AddSubtree(tree);
+      }
+
+      foreach (var subTree in root.Subtrees)
+        if (subTree.Grammar.GetMaximumSubtreeCount(subTree.Symbol) > 0)
+          RecursiveCreate(random, subTree, currentDepth + 1, maxDepth);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/GrowTreeCreator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/GrowTreeCreator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/GrowTreeCreator.cs	(revision 10269)
@@ -0,0 +1,210 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [NonDiscoverableType]
+  [StorableClass]
+  [Item("GrowTreeCreator", "An operator that creates new symbolic expression trees using the 'Grow' method")]
+  public class GrowTreeCreator : SymbolicExpressionTreeCreator,
+                                 ISymbolicExpressionTreeSizeConstraintOperator,
+                                 ISymbolicExpressionTreeGrammarBasedOperator {
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
+    private const string ClonedSymbolicExpressionTreeGrammarParameterName = "ClonedSymbolicExpressionTreeGrammar";
+
+    #region Parameter Properties
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+
+    public IValueLookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionTreeGrammarParameter {
+      get { return (IValueLookupParameter<ISymbolicExpressionGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
+    }
+
+    public ILookupParameter<ISymbolicExpressionGrammar> ClonedSymbolicExpressionTreeGrammarParameter {
+      get { return (ILookupParameter<ISymbolicExpressionGrammar>)Parameters[ClonedSymbolicExpressionTreeGrammarParameterName]; }
+    }
+
+    #endregion
+    #region Properties
+    public IntValue MaximumSymbolicExpressionTreeDepth {
+      get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; }
+    }
+
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
+    }
+
+    public ISymbolicExpressionGrammar ClonedSymbolicExpressionTreeGrammar {
+      get { return ClonedSymbolicExpressionTreeGrammarParameter.ActualValue; }
+    }
+
+    #endregion
+
+    [StorableConstructor]
+    protected GrowTreeCreator(bool deserializing) : base(deserializing) { }
+    protected GrowTreeCreator(GrowTreeCreator original, Cloner cloner) : base(original, cloner) { }
+
+    public GrowTreeCreator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName,
+        "The maximal length (number of nodes) of the symbolic expression tree (this parameter is ignored)."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName,
+        "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
+      Parameters.Add(new ValueLookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName,
+        "The tree grammar that defines the correct syntax of symbolic expression trees that should be created."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(ClonedSymbolicExpressionTreeGrammarParameterName,
+        "An immutable clone of the concrete grammar that is actually used to create and manipulate trees."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GrowTreeCreator(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) {
+        SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true;
+        IScope globalScope = ExecutionContext.Scope;
+        while (globalScope.Parent != null)
+          globalScope = globalScope.Parent;
+
+        globalScope.Variables.Add(new Variable(ClonedSymbolicExpressionTreeGrammarParameterName,
+          (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone()));
+      }
+      return base.Apply();
+    }
+
+    protected override ISymbolicExpressionTree Create(IRandom random) {
+      return Create(random, ClonedSymbolicExpressionTreeGrammar,
+        MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
+    }
+
+    public override ISymbolicExpressionTree CreateTree(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth) {
+      return Create(random, grammar, maxTreeLength, maxTreeDepth);
+    }
+
+    /// <summary>
+    /// Create a symbolic expression tree using the 'Grow' method.
+    /// All symbols are allowed for nodes, so the resulting trees can be of any shape and size. 
+    /// </summary>
+    /// <param name="random">Random generator</param>
+    /// <param name="grammar">Available tree grammar</param>
+    /// <param name="maxTreeDepth">Maximum tree depth</param>
+    /// <param name="maxTreeLength">Maximum tree length. This parameter is not used.</param>
+    /// <returns></returns>
+    public static ISymbolicExpressionTree Create(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth) {
+      var tree = new SymbolicExpressionTree();
+      var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
+      rootNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
+      if (rootNode.HasLocalParameters) rootNode.ResetLocalParameters(random);
+
+      var startNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode();
+      if (startNode.HasLocalParameters) startNode.ResetLocalParameters(random);
+      startNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
+
+      rootNode.AddSubtree(startNode);
+
+      Create(random, startNode, maxTreeDepth - 2);
+      tree.Root = rootNode;
+      return tree;
+    }
+
+    public static void Create(IRandom random, ISymbolicExpressionTreeNode seedNode, int maxDepth) {
+      // make sure it is possible to create a trees smaller than maxDepth
+      if (seedNode.Grammar.GetMinimumExpressionDepth(seedNode.Symbol) > maxDepth)
+        throw new ArgumentException("Cannot create trees of depth " + maxDepth + " or smaller because of grammar constraints.", "maxDepth");
+
+      var arity = SampleArity(random, seedNode);
+      // throw an exception if the seedNode happens to be a terminal, since in this case we cannot grow a tree
+      if (arity <= 0)
+        throw new ArgumentException("Cannot grow tree. Seed node shouldn't have arity zero.");
+
+      var allowedSymbols = seedNode.Grammar.AllowedSymbols
+        .Where(s => s.InitialFrequency > 0.0)
+        .ToList();
+
+      for (var i = 0; i < arity; i++) {
+        var possibleSymbols = allowedSymbols
+          .Where(s => seedNode.Grammar.IsAllowedChildSymbol(seedNode.Symbol, s, i))
+          .ToList();
+        var weights = possibleSymbols.Select(s => s.InitialFrequency).ToList();
+        var selectedSymbol = possibleSymbols.SelectRandom(weights, random);
+        var tree = selectedSymbol.CreateTreeNode();
+        if (tree.HasLocalParameters) tree.ResetLocalParameters(random);
+        seedNode.AddSubtree(tree);
+      }
+
+      // Only iterate over the non-terminal nodes (those which have arity > 0)
+      // Start from depth 2 since the first two levels are formed by the rootNode and the seedNode
+      foreach (var subTree in seedNode.Subtrees)
+        if (subTree.Grammar.GetMaximumSubtreeCount(subTree.Symbol) > 0)
+          RecursiveCreate(random, subTree, 2, maxDepth);
+    }
+
+    private static void RecursiveCreate(IRandom random, ISymbolicExpressionTreeNode root, int currentDepth, int maxDepth) {
+      var arity = SampleArity(random, root);
+      if (arity <= 0)
+        throw new ArgumentException("Cannot grow node of arity zero. Expected a function node.");
+
+      var allowedSymbols = root.Grammar.AllowedSymbols.Where(s => s.InitialFrequency > 0.0).ToList();
+
+      for (var i = 0; i < arity; i++) {
+        var possibleSymbols = allowedSymbols
+          .Where(s => root.Grammar.IsAllowedChildSymbol(root.Symbol, s, i) &&
+            root.Grammar.GetMinimumExpressionDepth(s) - 1 <= maxDepth - currentDepth)
+          .ToList();
+
+        if (!possibleSymbols.Any())
+          throw new InvalidOperationException("No symbols are available for the tree.");
+        var weights = possibleSymbols.Select(s => s.InitialFrequency).ToList();
+        var selectedSymbol = possibleSymbols.SelectRandom(weights, random);
+        var tree = selectedSymbol.CreateTreeNode();
+        if (tree.HasLocalParameters) tree.ResetLocalParameters(random);
+        root.AddSubtree(tree);
+      }
+
+      foreach (var subTree in root.Subtrees)
+        if (subTree.Grammar.GetMaximumSubtreeCount(subTree.Symbol) != 0)
+          RecursiveCreate(random, subTree, currentDepth + 1, maxDepth);
+    }
+
+    private static int SampleArity(IRandom random, ISymbolicExpressionTreeNode node) {
+      var minArity = node.Grammar.GetMinimumSubtreeCount(node.Symbol);
+      var maxArity = node.Grammar.GetMaximumSubtreeCount(node.Symbol);
+
+      return random.Next(minArity, maxArity + 1);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/ProbabilisticTreeCreator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/ProbabilisticTreeCreator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/ProbabilisticTreeCreator.cs	(revision 10269)
@@ -0,0 +1,334 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [NonDiscoverableType]
+  [StorableClass]
+  [Item("ProbabilisticTreeCreator", "An operator that creates new symbolic expression trees with uniformly distributed length")]
+  public class ProbabilisticTreeCreator : SymbolicExpressionTreeCreator,
+    ISymbolicExpressionTreeSizeConstraintOperator, ISymbolicExpressionTreeGrammarBasedOperator {
+    private const int MAX_TRIES = 100;
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
+    private const string ClonedSymbolicExpressionTreeGrammarParameterName = "ClonedSymbolicExpressionTreeGrammar";
+    #region Parameter Properties
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    public IValueLookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionTreeGrammarParameter {
+      get { return (IValueLookupParameter<ISymbolicExpressionGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
+    }
+    public ILookupParameter<ISymbolicExpressionGrammar> ClonedSymbolicExpressionTreeGrammarParameter {
+      get { return (ILookupParameter<ISymbolicExpressionGrammar>)Parameters[ClonedSymbolicExpressionTreeGrammarParameterName]; }
+    }
+    #endregion
+    #region Properties
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
+    }
+    public IntValue MaximumSymbolicExpressionTreeDepth {
+      get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; }
+    }
+    public ISymbolicExpressionGrammar SymbolicExpressionTreeGrammar {
+      get { return ClonedSymbolicExpressionTreeGrammarParameter.ActualValue; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected ProbabilisticTreeCreator(bool deserializing) : base(deserializing) { }
+    protected ProbabilisticTreeCreator(ProbabilisticTreeCreator original, Cloner cloner) : base(original, cloner) { }
+    public ProbabilisticTreeCreator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
+      Parameters.Add(new ValueLookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName, "The tree grammar that defines the correct syntax of symbolic expression trees that should be created."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(ClonedSymbolicExpressionTreeGrammarParameterName, "An immutable clone of the concrete grammar that is actually used to create and manipulate trees."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ProbabilisticTreeCreator(this, cloner);
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (!Parameters.ContainsKey(ClonedSymbolicExpressionTreeGrammarParameterName))
+        Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(ClonedSymbolicExpressionTreeGrammarParameterName, "An immutable clone of the concrete grammar that is actually used to create and manipulate trees."));
+    }
+
+    public override IOperation Apply() {
+      if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) {
+        SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true;
+        IScope globalScope = ExecutionContext.Scope;
+        while (globalScope.Parent != null)
+          globalScope = globalScope.Parent;
+
+        globalScope.Variables.Add(new Variable(ClonedSymbolicExpressionTreeGrammarParameterName, (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone()));
+      }
+      return base.Apply();
+    }
+
+    protected override ISymbolicExpressionTree Create(IRandom random) {
+      return Create(random, SymbolicExpressionTreeGrammar, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
+    }
+
+    public override ISymbolicExpressionTree CreateTree(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth) {
+      return Create(random, grammar, maxTreeLength, maxTreeDepth);
+    }
+
+    public static ISymbolicExpressionTree Create(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth) {
+      SymbolicExpressionTree tree = new SymbolicExpressionTree();
+      var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
+      if (rootNode.HasLocalParameters) rootNode.ResetLocalParameters(random);
+      rootNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
+      var startNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode();
+      startNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
+      if (startNode.HasLocalParameters) startNode.ResetLocalParameters(random);
+      rootNode.AddSubtree(startNode);
+      PTC2(random, startNode, maxTreeLength, maxTreeDepth);
+      tree.Root = rootNode;
+      return tree;
+    }
+
+    private class TreeExtensionPoint {
+      public ISymbolicExpressionTreeNode Parent { get; set; }
+      public int ChildIndex { get; set; }
+      public int ExtensionPointDepth { get; set; }
+      public int MaximumExtensionLength { get; set; }
+      public int MinimumExtensionLength { get; set; }
+    }
+
+    public static void PTC2(IRandom random, ISymbolicExpressionTreeNode seedNode,
+      int maxLength, int maxDepth) {
+      // make sure it is possible to create a trees smaller than maxLength and maxDepth
+      if (seedNode.Grammar.GetMinimumExpressionLength(seedNode.Symbol) > maxLength)
+        throw new ArgumentException("Cannot create trees of length " + maxLength + " or shorter because of grammar constraints.", "maxLength");
+      if (seedNode.Grammar.GetMinimumExpressionDepth(seedNode.Symbol) > maxDepth)
+        throw new ArgumentException("Cannot create trees of depth " + maxDepth + " or smaller because of grammar constraints.", "maxDepth");
+
+      // tree length is limited by the grammar and by the explicit size constraints
+      int allowedMinLength = seedNode.Grammar.GetMinimumExpressionLength(seedNode.Symbol);
+      int allowedMaxLength = Math.Min(maxLength, seedNode.Grammar.GetMaximumExpressionLength(seedNode.Symbol, maxDepth));
+      int tries = 0;
+      while (tries++ < MAX_TRIES) {
+        // select a target tree length uniformly in the possible range (as determined by explicit limits and limits of the grammar)
+        int targetTreeLength;
+        targetTreeLength = random.Next(allowedMinLength, allowedMaxLength + 1);
+        if (targetTreeLength <= 1 || maxDepth <= 1) return;
+
+        bool success = TryCreateFullTreeFromSeed(random, seedNode, targetTreeLength - 1, maxDepth - 1);
+
+        // if successful => check constraints and return the tree if everything looks ok        
+        if (success && seedNode.GetLength() <= maxLength && seedNode.GetDepth() <= maxDepth) {
+          return;
+        } else {
+          // clean seedNode
+          while (seedNode.Subtrees.Count() > 0) seedNode.RemoveSubtree(0);
+        }
+        // try a different length MAX_TRIES times
+      }
+      throw new ArgumentException("Couldn't create a random valid tree.");
+    }
+
+    private static bool TryCreateFullTreeFromSeed(IRandom random, ISymbolicExpressionTreeNode root,
+      int targetLength, int maxDepth) {
+      List<TreeExtensionPoint> extensionPoints = new List<TreeExtensionPoint>();
+      int currentLength = 0;
+      int actualArity = SampleArity(random, root, targetLength, maxDepth);
+      if (actualArity < 0) return false;
+
+      for (int i = 0; i < actualArity; i++) {
+        // insert a dummy sub-tree and add the pending extension to the list
+        var dummy = new SymbolicExpressionTreeNode();
+        root.AddSubtree(dummy);
+        var x = new TreeExtensionPoint { Parent = root, ChildIndex = i, ExtensionPointDepth = 0 };
+        FillExtensionLengths(x, maxDepth);
+        extensionPoints.Add(x);
+      }
+      //necessary to use long data type as the extension point length could be int.MaxValue
+      long minExtensionPointsLength = extensionPoints.Select(x => (long)x.MinimumExtensionLength).Sum();
+      long maxExtensionPointsLength = extensionPoints.Select(x => (long)x.MaximumExtensionLength).Sum();
+
+      // while there are pending extension points and we have not reached the limit of adding new extension points
+      while (extensionPoints.Count > 0 && minExtensionPointsLength + currentLength <= targetLength) {
+        int randomIndex = random.Next(extensionPoints.Count);
+        TreeExtensionPoint nextExtension = extensionPoints[randomIndex];
+        extensionPoints.RemoveAt(randomIndex);
+        ISymbolicExpressionTreeNode parent = nextExtension.Parent;
+        int argumentIndex = nextExtension.ChildIndex;
+        int extensionDepth = nextExtension.ExtensionPointDepth;
+
+        if (parent.Grammar.GetMinimumExpressionDepth(parent.Symbol) > maxDepth - extensionDepth) {
+          ReplaceWithMinimalTree(random, root, parent, argumentIndex);
+          int insertedTreeLength = parent.GetSubtree(argumentIndex).GetLength();
+          currentLength += insertedTreeLength;
+          minExtensionPointsLength -= insertedTreeLength;
+          maxExtensionPointsLength -= insertedTreeLength;
+        } else {
+          //remove currently chosen extension point from calculation
+          minExtensionPointsLength -= nextExtension.MinimumExtensionLength;
+          maxExtensionPointsLength -= nextExtension.MaximumExtensionLength;
+
+          var symbols = from s in parent.Grammar.GetAllowedChildSymbols(parent.Symbol, argumentIndex)
+                        where s.InitialFrequency > 0.0
+                        where parent.Grammar.GetMinimumExpressionDepth(s) <= maxDepth - extensionDepth
+                        where parent.Grammar.GetMinimumExpressionLength(s) <= targetLength - currentLength - minExtensionPointsLength
+                        select s;
+          if (maxExtensionPointsLength < targetLength - currentLength)
+            symbols = from s in symbols
+                      where parent.Grammar.GetMaximumExpressionLength(s, maxDepth - extensionDepth) >= targetLength - currentLength - maxExtensionPointsLength
+                      select s;
+          var allowedSymbols = symbols.ToList();
+
+          if (allowedSymbols.Count == 0) return false;
+          var weights = allowedSymbols.Select(x => x.InitialFrequency).ToList();
+          var selectedSymbol = allowedSymbols.SelectRandom(weights, random);
+          ISymbolicExpressionTreeNode newTree = selectedSymbol.CreateTreeNode();
+          if (newTree.HasLocalParameters) newTree.ResetLocalParameters(random);
+          parent.RemoveSubtree(argumentIndex);
+          parent.InsertSubtree(argumentIndex, newTree);
+
+          var topLevelNode = newTree as SymbolicExpressionTreeTopLevelNode;
+          if (topLevelNode != null)
+            topLevelNode.SetGrammar((ISymbolicExpressionTreeGrammar)root.Grammar.Clone());
+
+          currentLength++;
+          actualArity = SampleArity(random, newTree, targetLength - currentLength, maxDepth - extensionDepth);
+          if (actualArity < 0) return false;
+          for (int i = 0; i < actualArity; i++) {
+            // insert a dummy sub-tree and add the pending extension to the list
+            var dummy = new SymbolicExpressionTreeNode();
+            newTree.AddSubtree(dummy);
+            var x = new TreeExtensionPoint { Parent = newTree, ChildIndex = i, ExtensionPointDepth = extensionDepth + 1 };
+            FillExtensionLengths(x, maxDepth);
+            extensionPoints.Add(x);
+            maxExtensionPointsLength += x.MaximumExtensionLength;
+            minExtensionPointsLength += x.MinimumExtensionLength;
+          }
+        }
+      }
+      // fill all pending extension points
+      while (extensionPoints.Count > 0) {
+        int randomIndex = random.Next(extensionPoints.Count);
+        TreeExtensionPoint nextExtension = extensionPoints[randomIndex];
+        extensionPoints.RemoveAt(randomIndex);
+        ISymbolicExpressionTreeNode parent = nextExtension.Parent;
+        int a = nextExtension.ChildIndex;
+        ReplaceWithMinimalTree(random, root, parent, a);
+      }
+      return true;
+    }
+
+    private static void ReplaceWithMinimalTree(IRandom random, ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode parent,
+      int childIndex) {
+      // determine possible symbols that will lead to the smallest possible tree
+      var possibleSymbols = (from s in parent.Grammar.GetAllowedChildSymbols(parent.Symbol, childIndex)
+                             where s.InitialFrequency > 0.0
+                             group s by parent.Grammar.GetMinimumExpressionLength(s) into g
+                             orderby g.Key
+                             select g).First().ToList();
+      var weights = possibleSymbols.Select(x => x.InitialFrequency).ToList();
+      var selectedSymbol = possibleSymbols.SelectRandom(weights, random);
+      var tree = selectedSymbol.CreateTreeNode();
+      if (tree.HasLocalParameters) tree.ResetLocalParameters(random);
+      parent.RemoveSubtree(childIndex);
+      parent.InsertSubtree(childIndex, tree);
+
+      var topLevelNode = tree as SymbolicExpressionTreeTopLevelNode;
+      if (topLevelNode != null)
+        topLevelNode.SetGrammar((ISymbolicExpressionTreeGrammar)root.Grammar.Clone());
+
+      for (int i = 0; i < tree.Grammar.GetMinimumSubtreeCount(tree.Symbol); i++) {
+        // insert a dummy sub-tree and add the pending extension to the list
+        var dummy = new SymbolicExpressionTreeNode();
+        tree.AddSubtree(dummy);
+        // replace the just inserted dummy by recursive application
+        ReplaceWithMinimalTree(random, root, tree, i);
+      }
+    }
+
+    private static void FillExtensionLengths(TreeExtensionPoint extension, int maxDepth) {
+      var grammar = extension.Parent.Grammar;
+      int maxLength = int.MinValue;
+      int minLength = int.MaxValue;
+      foreach (ISymbol s in grammar.GetAllowedChildSymbols(extension.Parent.Symbol, extension.ChildIndex)) {
+        if (s.InitialFrequency > 0.0) {
+          int max = grammar.GetMaximumExpressionLength(s, maxDepth - extension.ExtensionPointDepth);
+          maxLength = Math.Max(maxLength, max);
+          int min = grammar.GetMinimumExpressionLength(s);
+          minLength = Math.Min(minLength, min);
+        }
+      }
+
+      extension.MaximumExtensionLength = maxLength;
+      extension.MinimumExtensionLength = minLength;
+    }
+
+    private static int SampleArity(IRandom random, ISymbolicExpressionTreeNode node, int targetLength, int maxDepth) {
+      // select actualArity randomly with the constraint that the sub-trees in the minimal arity can become large enough
+      int minArity = node.Grammar.GetMinimumSubtreeCount(node.Symbol);
+      int maxArity = node.Grammar.GetMaximumSubtreeCount(node.Symbol);
+      if (maxArity > targetLength) {
+        maxArity = targetLength;
+      }
+      if (minArity == maxArity) return minArity;
+
+      // the min number of sub-trees has to be set to a value that is large enough so that the largest possible tree is at least tree length
+      // if 1..3 trees are possible and the largest possible first sub-tree is smaller larger than the target length then minArity should be at least 2
+      long aggregatedLongestExpressionLength = 0;
+      for (int i = 0; i < maxArity; i++) {
+        aggregatedLongestExpressionLength += (from s in node.Grammar.GetAllowedChildSymbols(node.Symbol, i)
+                                              where s.InitialFrequency > 0.0
+                                              select node.Grammar.GetMaximumExpressionLength(s, maxDepth)).Max();
+        if (i > minArity && aggregatedLongestExpressionLength < targetLength) minArity = i + 1;
+        else break;
+      }
+
+      // the max number of sub-trees has to be set to a value that is small enough so that the smallest possible tree is at most tree length 
+      // if 1..3 trees are possible and the smallest possible first sub-tree is already larger than the target length then maxArity should be at most 0
+      long aggregatedShortestExpressionLength = 0;
+      for (int i = 0; i < maxArity; i++) {
+        aggregatedShortestExpressionLength += (from s in node.Grammar.GetAllowedChildSymbols(node.Symbol, i)
+                                               where s.InitialFrequency > 0.0
+                                               select node.Grammar.GetMinimumExpressionLength(s)).Min();
+        if (aggregatedShortestExpressionLength > targetLength) {
+          maxArity = i;
+          break;
+        }
+      }
+      if (minArity > maxArity) return -1;
+      return random.Next(minArity, maxArity + 1);
+    }
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/RampedHalfAndHalfTreeCreator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/RampedHalfAndHalfTreeCreator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/RampedHalfAndHalfTreeCreator.cs	(revision 10269)
@@ -0,0 +1,150 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [NonDiscoverableType]
+  [StorableClass]
+  [Item("RampedHalfAndHalfTreeCreator", "An operator that creates new symbolic expression trees in an alternate way: half the trees are created usign the 'Grow' method while the other half are created using the 'Full' method")]
+  public class RampedHalfAndHalfTreeCreator : SymbolicExpressionTreeCreator,
+                                 ISymbolicExpressionTreeSizeConstraintOperator,
+                                 ISymbolicExpressionTreeGrammarBasedOperator {
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
+    private const string ClonedSymbolicExpressionTreeGrammarParameterName = "ClonedSymbolicExpressionTreeGrammar";
+
+    #region Parameter Properties
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+
+    public IValueLookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionTreeGrammarParameter {
+      get {
+        return (IValueLookupParameter<ISymbolicExpressionGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName];
+      }
+    }
+
+    public ILookupParameter<ISymbolicExpressionGrammar> ClonedSymbolicExpressionTreeGrammarParameter {
+      get {
+        return (ILookupParameter<ISymbolicExpressionGrammar>)Parameters[ClonedSymbolicExpressionTreeGrammarParameterName];
+      }
+    }
+
+    #endregion
+    #region Properties
+    public IntValue MaximumSymbolicExpressionTreeDepth {
+      get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; }
+    }
+
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
+    }
+
+    public ISymbolicExpressionGrammar ClonedSymbolicExpressionTreeGrammar {
+      get { return ClonedSymbolicExpressionTreeGrammarParameter.ActualValue; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected RampedHalfAndHalfTreeCreator(bool deserializing) : base(deserializing) { }
+    protected RampedHalfAndHalfTreeCreator(RampedHalfAndHalfTreeCreator original, Cloner cloner) : base(original, cloner) { }
+
+    public RampedHalfAndHalfTreeCreator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName,
+        "The maximal length (number of nodes) of the symbolic expression tree (this parameter is ignored)."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName,
+        "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
+      Parameters.Add(new ValueLookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName,
+        "The tree grammar that defines the correct syntax of symbolic expression trees that should be created."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(ClonedSymbolicExpressionTreeGrammarParameterName,
+        "An immutable clone of the concrete grammar that is actually used to create and manipulate trees."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RampedHalfAndHalfTreeCreator(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) {
+        SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true;
+        IScope globalScope = ExecutionContext.Scope;
+        while (globalScope.Parent != null)
+          globalScope = globalScope.Parent;
+
+        globalScope.Variables.Add(new Variable(ClonedSymbolicExpressionTreeGrammarParameterName,
+          (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone()));
+      }
+      return base.Apply();
+    }
+
+    protected override ISymbolicExpressionTree Create(IRandom random) {
+      return Create(random, ClonedSymbolicExpressionTreeGrammar, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
+    }
+
+    public override ISymbolicExpressionTree CreateTree(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth) {
+      return Create(random, grammar, maxTreeLength, maxTreeDepth);
+    }
+
+    /// <summary>
+    /// Create a symbolic expression tree using 'RampedHalfAndHalf' strategy.
+    /// Half the trees are created with the 'Grow' method, and the other half are created with the 'Full' method.
+    /// </summary>
+    /// <param name="random">Random generator</param>
+    /// <param name="grammar">Available tree grammar</param>
+    /// <param name="maxTreeLength">Maximum tree length (this parameter is ignored)</param>
+    /// <param name="maxTreeDepth">Maximum tree depth</param>
+    /// <returns></returns>
+    public static ISymbolicExpressionTree Create(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth) {
+      var tree = new SymbolicExpressionTree();
+      var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
+      if (rootNode.HasLocalParameters) rootNode.ResetLocalParameters(random);
+      rootNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
+
+      var startNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode();
+      if (startNode.HasLocalParameters) startNode.ResetLocalParameters(random);
+      startNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
+
+      rootNode.AddSubtree(startNode);
+
+      double p = random.NextDouble();
+
+      if (p < 0.5)
+        GrowTreeCreator.Create(random, startNode, maxTreeDepth - 2);
+      else
+        FullTreeCreator.Create(random, startNode, maxTreeDepth - 2);
+
+      tree.Root = rootNode;
+      return tree;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/SymbolicExpressionTreeCreator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/SymbolicExpressionTreeCreator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/SymbolicExpressionTreeCreator.cs	(revision 10269)
@@ -0,0 +1,64 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+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, ISymbolicExpressionTreeCreator {
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    #region Parameter Properties
+    public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    #endregion
+
+    #region Properties
+    public ISymbolicExpressionTree SymbolicExpressionTree {
+      get { return SymbolicExpressionTreeParameter.ActualValue; }
+      set { SymbolicExpressionTreeParameter.ActualValue = value; }
+    }
+
+    #endregion
+    [StorableConstructor]
+    protected SymbolicExpressionTreeCreator(bool deserializing) : base(deserializing) { }
+    protected SymbolicExpressionTreeCreator(SymbolicExpressionTreeCreator original, Cloner cloner) : base(original, cloner) { }
+    protected SymbolicExpressionTreeCreator()
+      : base() {
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree that should be created."));
+    }
+
+    public override IOperation Apply() {
+      SymbolicExpressionTree = Create(Random);
+      return base.Apply();
+    }
+
+    protected abstract ISymbolicExpressionTree Create(IRandom random);
+    public abstract ISymbolicExpressionTree CreateTree(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SubtreeCrossover.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SubtreeCrossover.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SubtreeCrossover.cs	(revision 10269)
@@ -0,0 +1,207 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Takes two parent individuals P0 and P1 each. Selects a random node N0 of P0 and a random node N1 of P1.
+  /// And replaces the branch with root0 N0 in P0 with N1 from P1 if the tree-size limits are not violated.
+  /// When recombination with N0 and N1 would create a tree that is too large or invalid the operator randomly selects new N0 and N1 
+  /// until a valid configuration is found.
+  /// </summary>  
+  [Item("SubtreeSwappingCrossover", "An operator which performs subtree swapping crossover.")]
+  [StorableClass]
+  public class SubtreeCrossover : SymbolicExpressionTreeCrossover, ISymbolicExpressionTreeSizeConstraintOperator {
+    private const string InternalCrossoverPointProbabilityParameterName = "InternalCrossoverPointProbability";
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+
+    #region Parameter Properties
+    public IValueLookupParameter<PercentValue> InternalCrossoverPointProbabilityParameter {
+      get { return (IValueLookupParameter<PercentValue>)Parameters[InternalCrossoverPointProbabilityParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    #endregion
+    #region Properties
+    public PercentValue InternalCrossoverPointProbability {
+      get { return InternalCrossoverPointProbabilityParameter.ActualValue; }
+    }
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
+    }
+    public IntValue MaximumSymbolicExpressionTreeDepth {
+      get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; }
+    }
+    #endregion
+    [StorableConstructor]
+    protected SubtreeCrossover(bool deserializing) : base(deserializing) { }
+    protected SubtreeCrossover(SubtreeCrossover original, Cloner cloner) : base(original, cloner) { }
+    public SubtreeCrossover()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
+      Parameters.Add(new ValueLookupParameter<PercentValue>(InternalCrossoverPointProbabilityParameterName, "The probability to select an internal crossover point (instead of a leaf node).", new PercentValue(0.9)));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SubtreeCrossover(this, cloner);
+    }
+
+    public override ISymbolicExpressionTree Crossover(IRandom random,
+      ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1) {
+      return Cross(random, parent0, parent1, InternalCrossoverPointProbability.Value,
+        MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
+    }
+
+    public static ISymbolicExpressionTree Cross(IRandom random,
+      ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1,
+      double internalCrossoverPointProbability, int maxTreeLength, int maxTreeDepth) {
+      // select a random crossover point in the first parent 
+      CutPoint crossoverPoint0;
+      SelectCrossoverPoint(random, parent0, internalCrossoverPointProbability, maxTreeLength, maxTreeDepth, out crossoverPoint0);
+
+      int childLength = crossoverPoint0.Child != null ? crossoverPoint0.Child.GetLength() : 0;
+      // calculate the max length and depth that the inserted branch can have 
+      int maxInsertedBranchLength = maxTreeLength - (parent0.Length - childLength);
+      int maxInsertedBranchDepth = maxTreeDepth - parent0.Root.GetBranchLevel(crossoverPoint0.Parent);
+
+      List<ISymbolicExpressionTreeNode> allowedBranches = new List<ISymbolicExpressionTreeNode>();
+      parent1.Root.ForEachNodePostfix((n) => {
+        if (n.GetLength() <= maxInsertedBranchLength &&
+            n.GetDepth() <= maxInsertedBranchDepth && crossoverPoint0.IsMatchingPointType(n))
+          allowedBranches.Add(n);
+      });
+      // empty branch
+      if (crossoverPoint0.IsMatchingPointType(null)) allowedBranches.Add(null);
+
+      if (allowedBranches.Count == 0) {
+        return parent0;
+      } else {
+        var selectedBranch = SelectRandomBranch(random, allowedBranches, internalCrossoverPointProbability);
+
+        if (crossoverPoint0.Child != null) {
+          // manipulate the tree of parent0 in place
+          // replace the branch in tree0 with the selected branch from tree1
+          crossoverPoint0.Parent.RemoveSubtree(crossoverPoint0.ChildIndex);
+          if (selectedBranch != null) {
+            crossoverPoint0.Parent.InsertSubtree(crossoverPoint0.ChildIndex, selectedBranch);
+          }
+        } else {
+          // child is null (additional child should be added under the parent)
+          if (selectedBranch != null) {
+            crossoverPoint0.Parent.AddSubtree(selectedBranch);
+          }
+        }
+        return parent0;
+      }
+    }
+
+    private static void SelectCrossoverPoint(IRandom random, ISymbolicExpressionTree parent0, double internalNodeProbability, int maxBranchLength, int maxBranchDepth, out CutPoint crossoverPoint) {
+      if (internalNodeProbability < 0.0 || internalNodeProbability > 1.0) throw new ArgumentException("internalNodeProbability");
+      List<CutPoint> internalCrossoverPoints = new List<CutPoint>();
+      List<CutPoint> leafCrossoverPoints = new List<CutPoint>();
+      parent0.Root.ForEachNodePostfix((n) => {
+        if (n.SubtreeCount > 0 && n != parent0.Root) {
+          foreach (var child in n.Subtrees) {
+            if (child.GetLength() <= maxBranchLength &&
+                child.GetDepth() <= maxBranchDepth) {
+              if (child.SubtreeCount > 0)
+                internalCrossoverPoints.Add(new CutPoint(n, child));
+              else
+                leafCrossoverPoints.Add(new CutPoint(n, child));
+            }
+          }
+
+          // add one additional extension point if the number of sub trees for the symbol is not full
+          if (n.SubtreeCount < n.Grammar.GetMaximumSubtreeCount(n.Symbol)) {
+            // empty extension point
+            internalCrossoverPoints.Add(new CutPoint(n, n.SubtreeCount));
+          }
+        }
+      }
+    );
+
+      if (random.NextDouble() < internalNodeProbability) {
+        // select from internal node if possible
+        if (internalCrossoverPoints.Count > 0) {
+          // select internal crossover point or leaf
+          crossoverPoint = internalCrossoverPoints[random.Next(internalCrossoverPoints.Count)];
+        } else {
+          // otherwise select external node
+          crossoverPoint = leafCrossoverPoints[random.Next(leafCrossoverPoints.Count)];
+        }
+      } else if (leafCrossoverPoints.Count > 0) {
+        // select from leaf crossover point if possible
+        crossoverPoint = leafCrossoverPoints[random.Next(leafCrossoverPoints.Count)];
+      } else {
+        // otherwise select internal crossover point
+        crossoverPoint = internalCrossoverPoints[random.Next(internalCrossoverPoints.Count)];
+      }
+    }
+
+    private static ISymbolicExpressionTreeNode SelectRandomBranch(IRandom random, IEnumerable<ISymbolicExpressionTreeNode> branches, double internalNodeProbability) {
+      if (internalNodeProbability < 0.0 || internalNodeProbability > 1.0) throw new ArgumentException("internalNodeProbability");
+      List<ISymbolicExpressionTreeNode> allowedInternalBranches;
+      List<ISymbolicExpressionTreeNode> allowedLeafBranches;
+      if (random.NextDouble() < internalNodeProbability) {
+        // select internal node if possible
+        allowedInternalBranches = (from branch in branches
+                                   where branch != null && branch.SubtreeCount > 0
+                                   select branch).ToList();
+        if (allowedInternalBranches.Count > 0) {
+          return allowedInternalBranches.SelectRandom(random);
+        } else {
+          // no internal nodes allowed => select leaf nodes
+          allowedLeafBranches = (from branch in branches
+                                 where branch == null || branch.SubtreeCount == 0
+                                 select branch).ToList();
+          return allowedLeafBranches.SelectRandom(random);
+        }
+      } else {
+        // select leaf node if possible
+        allowedLeafBranches = (from branch in branches
+                               where branch == null || branch.SubtreeCount == 0
+                               select branch).ToList();
+        if (allowedLeafBranches.Count > 0) {
+          return allowedLeafBranches.SelectRandom(random);
+        } else {
+          allowedInternalBranches = (from branch in branches
+                                     where branch != null && branch.SubtreeCount > 0
+                                     select branch).ToList();
+          return allowedInternalBranches.SelectRandom(random);
+        }
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SymbolicExpressionTreeCrossover.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SymbolicExpressionTreeCrossover.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SymbolicExpressionTreeCrossover.cs	(revision 10269)
@@ -0,0 +1,77 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+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, ISymbolicExpressionTreeCrossover {
+    private const string ParentsParameterName = "Parents";
+    private const string ChildParameterName = "Child";
+    #region Parameter Properties
+    public ILookupParameter<ItemArray<ISymbolicExpressionTree>> ParentsParameter {
+      get { return (ScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[ParentsParameterName]; }
+    }
+    public ILookupParameter<ISymbolicExpressionTree> ChildParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[ChildParameterName]; }
+    }
+    #endregion
+    #region Properties
+    public ItemArray<ISymbolicExpressionTree> Parents {
+      get { return ParentsParameter.ActualValue; }
+    }
+    public ISymbolicExpressionTree Child {
+      get { return ChildParameter.ActualValue; }
+      set { ChildParameter.ActualValue = value; }
+    }
+    #endregion
+    [StorableConstructor]
+    protected SymbolicExpressionTreeCrossover(bool deserializing) : base(deserializing) { }
+    protected SymbolicExpressionTreeCrossover(SymbolicExpressionTreeCrossover original, Cloner cloner) : base(original, cloner) { }
+    protected SymbolicExpressionTreeCrossover()
+      : base() {
+      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(ParentsParameterName, "The parent symbolic expression trees which should be crossed."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(ChildParameterName, "The child symbolic expression tree resulting from the crossover."));
+      ParentsParameter.ActualName = "SymbolicExpressionTree";
+      ChildParameter.ActualName = "SymbolicExpressionTree";
+    }
+
+    public sealed override IOperation Apply() {
+      if (Parents.Length != 2)
+        throw new ArgumentException("Number of parents must be exactly two for symbolic expression tree crossover operators.");
+
+      ISymbolicExpressionTree result = Crossover(Random, Parents[0], Parents[1]);
+
+      Child = result;
+      return base.Apply();
+    }
+
+    public abstract ISymbolicExpressionTree Crossover(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/CutPoint.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/CutPoint.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/CutPoint.cs	(revision 10269)
@@ -0,0 +1,67 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public class CutPoint {
+    public ISymbolicExpressionTreeNode Parent { get; set; }
+    public ISymbolicExpressionTreeNode Child { get; set; }
+    private int childIndex;
+    public int ChildIndex {
+      get { return childIndex; }
+    }
+    public CutPoint(ISymbolicExpressionTreeNode parent, ISymbolicExpressionTreeNode child) {
+      this.Parent = parent;
+      this.Child = child;
+      this.childIndex = parent.IndexOfSubtree(child);
+    }
+    public CutPoint(ISymbolicExpressionTreeNode parent, int childIndex) {
+      this.Parent = parent;
+      this.childIndex = childIndex;
+      this.Child = null;
+    }
+
+    public bool IsMatchingPointType(ISymbolicExpressionTreeNode newChild) {
+      var parent = this.Parent;
+      if (newChild == null) {
+        // make sure that one subtree can be removed and that only the last subtree is removed 
+        return parent.Grammar.GetMinimumSubtreeCount(parent.Symbol) < parent.SubtreeCount &&
+          this.ChildIndex == parent.SubtreeCount - 1;
+      } else {
+        // check syntax constraints of direct parent - child relation
+        if (!parent.Grammar.ContainsSymbol(newChild.Symbol) ||
+            !parent.Grammar.IsAllowedChildSymbol(parent.Symbol, newChild.Symbol, this.ChildIndex))
+          return false;
+
+        bool result = true;
+        // check point type for the whole branch
+        newChild.ForEachNodePostfix((n) => {
+          result =
+            result &&
+            parent.Grammar.ContainsSymbol(n.Symbol) &&
+            n.SubtreeCount >= parent.Grammar.GetMinimumSubtreeCount(n.Symbol) &&
+            n.SubtreeCount <= parent.Grammar.GetMaximumSubtreeCount(n.Symbol);
+        });
+        return result;
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/EnumerableExtensions.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/EnumerableExtensions.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/EnumerableExtensions.cs	(revision 10269)
@@ -0,0 +1,61 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Core;
+using System;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public static class EnumerableExtensions {
+    public static T SelectRandom<T>(this IEnumerable<T> xs, IRandom random) {
+      var list = xs as IList<T>;
+      if (list != null) {
+        return list[random.Next(list.Count)];
+      } else {
+        list = xs.ToList();
+        return list[random.Next(list.Count)];
+      }
+    }
+    public static T SelectRandom<T>(this IEnumerable<T> xs, IEnumerable<double> weights, IRandom random) {
+      var list = xs as IList<T>;
+      var weightsList = weights as IList<double>;
+      if (list == null) {
+        list = xs.ToList();
+      }
+      if (weightsList == null) {
+        weightsList = weights.ToList();
+      }
+      if (list.Count != weightsList.Count) throw new ArgumentException("Number of elements in enumerations doesn't match.");
+      if (list.Count == 0) throw new ArgumentException("Enumeration is empty", "xs");
+
+      double sum = weightsList.Sum();
+      double r = random.NextDouble() * sum;
+      double agg = 0;
+      for (int i = 0; i < list.Count; i++) {
+        agg += weightsList[i];
+        if (agg > r) return list[i];
+      }
+      // should never happen
+      throw new InvalidOperationException();
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeGraphvizFormatter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeGraphvizFormatter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeGraphvizFormatter.cs	(revision 10269)
@@ -0,0 +1,95 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [Item("GraphViz String Formatter", "Formatter for symbolic expression trees for visualization with GraphViz.")]
+  public sealed class SymbolicExpressionTreeGraphvizFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter {
+    public bool Indent { get; set; }
+
+    private readonly static Dictionary<string, string> symbolNameMap = new Dictionary<string, string>() {
+      // match Koza style
+      {"ProgramRootSymbol", "Prog"},
+      {"StartSymbol", "RPB"}, 
+    };
+
+    public SymbolicExpressionTreeGraphvizFormatter()
+      : base("GraphViz String Formatter", "Formatter for symbolic expression trees for visualization with GraphViz.") {
+      Indent = true;
+    }
+    private SymbolicExpressionTreeGraphvizFormatter(SymbolicExpressionTreeGraphvizFormatter original, Cloner cloner)
+      : base(original, cloner) {
+      this.Indent = original.Indent;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicExpressionTreeGraphvizFormatter(this, cloner);
+    }
+
+    public string Format(ISymbolicExpressionTree symbolicExpressionTree) {
+      int nodeCounter = 1;
+      StringBuilder strBuilder = new StringBuilder();
+      strBuilder.AppendLine("graph {");
+      strBuilder.AppendLine(FormatRecursively(symbolicExpressionTree.Root, 0, ref nodeCounter));
+      strBuilder.AppendLine("}");
+      return strBuilder.ToString();
+    }
+
+    private string FormatRecursively(ISymbolicExpressionTreeNode node, int indentLength, ref int nodeId) {
+      // save id of current node
+      int currentNodeId = nodeId;
+      // increment id for next node
+      nodeId++;
+
+      StringBuilder strBuilder = new StringBuilder();
+      if (Indent) strBuilder.Append(' ', indentLength);
+
+      // get label for node and map if necessary
+      string nodeLabel = node.ToString();
+      if (symbolNameMap.ContainsKey(nodeLabel)) {
+        nodeLabel = symbolNameMap[nodeLabel];
+      }
+
+      strBuilder.Append("node" + currentNodeId + "[label=\"" + nodeLabel + "\"");
+      // leaf nodes should have box shape
+      if (node.SubtreeCount == 0) {
+        strBuilder.AppendLine(", shape=\"box\"];");
+      } else {
+        strBuilder.AppendLine("];");
+      }
+
+      // internal nodes or leaf nodes?
+      foreach (ISymbolicExpressionTreeNode subTree in node.Subtrees) {
+        // add an edge 
+        if (Indent) strBuilder.Append(' ', indentLength);
+        strBuilder.AppendLine("node" + currentNodeId + " -- node" + nodeId + ";");
+        // format the whole subtree
+        strBuilder.Append(FormatRecursively(subTree, indentLength + 2, ref nodeId));
+      }
+
+      return strBuilder.ToString();
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeLatexFormatter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeLatexFormatter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeLatexFormatter.cs	(revision 10269)
@@ -0,0 +1,50 @@
+﻿using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [Item("LaTeX/PDF Formatter", "Formatter for symbolic expression trees for use with latex.")]
+  public class SymbolicExpressionTreeLatexFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter {
+    private readonly static Dictionary<string, string> symbolNameMap = new Dictionary<string, string>
+    {
+      {"ProgramRootSymbol", "Prog"},
+      {"StartSymbol","RPB"}
+    };
+    private ReingoldTilfordLayoutEngine layoutEngine;
+
+    public SymbolicExpressionTreeLatexFormatter() {
+      layoutEngine = new ReingoldTilfordLayoutEngine();
+    }
+
+    protected SymbolicExpressionTreeLatexFormatter(SymbolicExpressionTreeLatexFormatter original, Cloner cloner)
+      : base(original, cloner) {
+      layoutEngine = new ReingoldTilfordLayoutEngine();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicExpressionTreeLatexFormatter(this, cloner);
+    }
+
+    public string Format(ISymbolicExpressionTree symbolicExpressionTree) {
+      layoutEngine.SymbolicExpressionTree = symbolicExpressionTree;
+      var nodeCoordinates = layoutEngine.GetNodeCoordinates();
+      var sb = new StringBuilder();
+      sb.AppendLine("\\begin{figure}");
+      sb.AppendLine("\\begin{tikzpicture}");
+
+      foreach (var node in symbolicExpressionTree.IterateNodesBreadth()) {
+        var symbolName = node.Symbol.Name;
+        var nodeName = symbolNameMap.ContainsKey(symbolName) ? symbolNameMap[symbolName] : symbolName;
+        var coord = nodeCoordinates[node];
+
+        sb.AppendLine(string.Format("\\draw node ({0},{1}) {{{2}}};", coord.X, coord.Y, nodeName));
+      }
+
+      sb.AppendLine("\\end{figure}");
+      sb.AppendLine("\\end{tikzpicture}");
+
+      return sb.ToString();
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeStringFormatter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeStringFormatter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeStringFormatter.cs	(revision 10269)
@@ -0,0 +1,79 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Text;
+using System.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+
+  [Item("Default String Formatter", "The default string formatter for symbolic expression trees.")]
+  [StorableClass]
+  public class SymbolicExpressionTreeStringFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter {
+
+    public bool Indent { get; set; }
+
+    [StorableConstructor]
+    protected SymbolicExpressionTreeStringFormatter(bool deserializing) : base(deserializing) { }
+    protected SymbolicExpressionTreeStringFormatter(SymbolicExpressionTreeStringFormatter original, Cloner cloner)
+      : base(original, cloner) {
+      Indent = original.Indent;
+    }
+    public SymbolicExpressionTreeStringFormatter()
+      : base() {
+      Name = "Default String Formatter";
+      Indent = true;
+    }
+
+    public string Format(ISymbolicExpressionTree symbolicExpressionTree) {
+      return FormatRecursively(symbolicExpressionTree.Root, 0);
+    }
+
+    private string FormatRecursively(ISymbolicExpressionTreeNode node, int indentLength) {
+      StringBuilder strBuilder = new StringBuilder();
+      if (Indent) strBuilder.Append(' ', indentLength);
+      strBuilder.Append("(");
+      // internal nodes or leaf nodes?
+      if (node.Subtrees.Count() > 0) {
+        // symbol on same line as '('
+        strBuilder.AppendLine(node.ToString());
+        // each subtree expression on a new line
+        // and closing ')' also on new line
+        foreach (var subtree in node.Subtrees) {
+          strBuilder.AppendLine(FormatRecursively(subtree, indentLength + 2));
+        }
+        if (Indent) strBuilder.Append(' ', indentLength);
+        strBuilder.Append(")");
+      } else {
+        // symbol in the same line with as '(' and ')'
+        strBuilder.Append(node.ToString());
+        strBuilder.Append(")");
+      }
+      return strBuilder.ToString();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicExpressionTreeStringFormatter(this, cloner);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj	(revision 10269)
@@ -0,0 +1,295 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{06D4A186-9319-48A0-BADE-A2058D462EEA}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding</RootNamespace>
+    <AssemblyName>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="HeuristicLab.Analysis-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Collections-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common.Resources-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization.Operators-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Parameters-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Persistence-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Random-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Analyzers\BestSymbolicExpressionTreeAnalyzer.cs" />
+    <Compile Include="Analyzers\MinAverageMaxSymbolicExpressionTreeLengthAnalyzer.cs" />
+    <Compile Include="Analyzers\SymbolicExpressionSymbolFrequencyAnalyzer.cs" />
+    <Compile Include="Analyzers\SymbolicExpressionTreeLengthAnalyzer.cs" />
+    <Compile Include="Analyzers\SymbolicExpressionTreeLengthCalculator.cs" />
+    <Compile Include="ArchitectureManipulators\ArgumentCreater.cs" />
+    <Compile Include="ArchitectureManipulators\ArgumentDeleter.cs" />
+    <Compile Include="ArchitectureManipulators\ArgumentDuplicater.cs" />
+    <Compile Include="ArchitectureManipulators\GrammarModifier.cs" />
+    <Compile Include="ArchitectureManipulators\MultiSymbolicExpressionTreeArchitectureManipulator.cs" />
+    <Compile Include="ArchitectureManipulators\SubroutineCreater.cs" />
+    <Compile Include="ArchitectureManipulators\SubroutineDeleter.cs" />
+    <Compile Include="ArchitectureManipulators\SubroutineDuplicater.cs" />
+    <Compile Include="ArchitectureManipulators\SymbolicExpressionTreeArchitectureManipulator.cs" />
+    <Compile Include="Compiler\Instruction.cs" />
+    <Compile Include="Compiler\LinearInstruction.cs" />
+    <Compile Include="Compiler\SymbolicExpressionTreeCompiler.cs" />
+    <Compile Include="Compiler\SymbolicExpressionTreeLinearCompiler.cs" />
+    <Compile Include="Creators\FullTreeCreator.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Creators\GrowTreeCreator.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Creators\RampedHalfAndHalfTreeCreator.cs" />
+    <Compile Include="Formatters\SymbolicExpressionTreeGraphvizFormatter.cs" />
+    <Compile Include="Interfaces\IFragment.cs" />
+    <Compile Include="Interfaces\ILayoutAdapter.cs" />
+    <Compile Include="Interfaces\ILayoutNode.cs" />
+    <Compile Include="Interfaces\IReadOnlySymbol.cs" />
+    <Compile Include="Interfaces\ISymbolicExpressionGrammar.cs" />
+    <Compile Include="Interfaces\ISymbolicExpressionGrammarBase.cs" />
+    <Compile Include="Interfaces\ISymbolicExpressionTreeGrammar.cs" />
+    <Compile Include="Interfaces\ISymbolicExpressionTreeNodeComparer.cs" />
+    <Compile Include="Interfaces\ISymbolicExpressionTreeNodeSimilarityComparer.cs" />
+    <Compile Include="Interfaces\Operators\ISymbolicExpressionTreeArchitectureAlteringOperator.cs" />
+    <Compile Include="Interfaces\Operators\ISymbolicExpressionTreeGrammarBasedOperator.cs" />
+    <Compile Include="Creators\SymbolicExpressionTreeCreator.cs" />
+    <Compile Include="CutPoint.cs" />
+    <Compile Include="Crossovers\SymbolicExpressionTreeCrossover.cs" />
+    <Compile Include="Formatters\SymbolicExpressionTreeStringFormatter.cs" />
+    <Compile Include="Interfaces\ISymbol.cs" />
+    <Compile Include="Interfaces\ISymbolicExpressionTree.cs" />
+    <Compile Include="Interfaces\Operators\ISymbolicExpressionTreeAnalyzer.cs" />
+    <Compile Include="Interfaces\Operators\ISymbolicExpressionTreeArchitectureManipulator.cs" />
+    <Compile Include="Interfaces\Operators\ISymbolicExpressionTreeCreator.cs" />
+    <Compile Include="Interfaces\Operators\ISymbolicExpressionTreeCrossover.cs" />
+    <Compile Include="Interfaces\ISymbolicExpressionTreeNode.cs" />
+    <Compile Include="Interfaces\ISymbolicExpressionTreeStringFormatter.cs" />
+    <Compile Include="Interfaces\Operators\ISymbolicExpressionTreeSizeConstraintOperator.cs" />
+    <Compile Include="LayoutEngines\LayoutNode.cs" />
+    <Compile Include="LayoutEngines\ReingoldTilfordLayoutEngine.cs" />
+    <Compile Include="LayoutEngines\SymbolicExpressionTreeLayoutAdapter.cs" />
+    <Compile Include="Manipulators\ChangeNodeTypeManipulation.cs" />
+    <Compile Include="Interfaces\Operators\ISymbolicExpressionTreeManipulator.cs" />
+    <Compile Include="Manipulators\RemoveBranchManipulation.cs" />
+    <Compile Include="Manipulators\ReplaceBranchManipulation.cs" />
+    <Compile Include="Manipulators\FullTreeShaker.cs" />
+    <Compile Include="Manipulators\MultiSymbolicExpressionTreeManipulator.cs" />
+    <Compile Include="Manipulators\OnePointShaker.cs" />
+    <Compile Include="Manipulators\SymbolicExpressionTreeManipulator.cs" />
+    <Compile Include="Plugin.cs" />
+    <Compile Include="SymbolicExpressionGrammarBase.cs" />
+    <Compile Include="SymbolicExpressionGrammar.cs" />
+    <Compile Include="SymbolicExpressionTreeGrammar.cs" />
+    <Compile Include="SymbolicExpressionTreeTopLevelNode.cs" />
+    <Compile Include="Crossovers\SubtreeCrossover.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="EnumerableExtensions.cs" />
+    <Compile Include="SymbolicExpressionTreeOperator.cs" />
+    <Compile Include="SymbolicExpressionTreeTerminalNode.cs" />
+    <Compile Include="Creators\ProbabilisticTreeCreator.cs" />
+    <Compile Include="Interfaces\Operators\ISymbolicExpressionTreeOperator.cs" />
+    <Compile Include="SymbolicExpressionTree.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="SymbolicExpressionTreeNode.cs" />
+    <Compile Include="Symbols\Argument.cs" />
+    <Compile Include="Symbols\ArgumentTreeNode.cs" />
+    <Compile Include="Symbols\GroupSymbol.cs" />
+    <Compile Include="Symbols\StartSymbol.cs" />
+    <Compile Include="Symbols\InvokeFunction.cs" />
+    <Compile Include="Symbols\InvokeFunctionTreeNode.cs" />
+    <Compile Include="Symbols\DefunTreeNode.cs" />
+    <Compile Include="Symbols\Defun.cs" />
+    <Compile Include="Symbols\ProgramRootSymbol.cs" />
+    <Compile Include="Symbols\Symbol.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+</PreBuildEvent>
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+export ProjectDir=$(ProjectDir)
+export SolutionDir=$(SolutionDir)
+
+$SolutionDir/PreBuildEvent.sh
+</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/IFragment.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/IFragment.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/IFragment.cs	(revision 10269)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface IFragment : IItem {
+    ISymbolicExpressionTreeNode Root { get; set; }
+    int Length { get; set; }
+    int Index { get; set; }
+    int OldIndex { get; set; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ILayoutAdapter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ILayoutAdapter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ILayoutAdapter.cs	(revision 10269)
@@ -0,0 +1,8 @@
+﻿using System;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ILayoutAdapter<T> where T : class {
+    IEnumerable<ILayoutNode<T>> Convert(T root, Func<T, ILayoutNode<T>> convertFunc);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ILayoutNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ILayoutNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ILayoutNode.cs	(revision 10269)
@@ -0,0 +1,49 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ILayoutNode<T> where T : class {
+    ILayoutNode<T> NextLeft { get; }
+    ILayoutNode<T> NextRight { get; }
+    ILayoutNode<T> LeftSibling { get; }
+    ILayoutNode<T> LeftmostSibling { get; }
+
+    ILayoutNode<T> Thread { get; set; }
+    ILayoutNode<T> Ancestor { get; set; }
+    ILayoutNode<T> Parent { get; set; }
+    List<ILayoutNode<T>> Children { get; set; }
+
+    float Mod { get; set; }
+    float Prelim { get; set; }
+    float Change { get; set; }
+    float Shift { get; set; }
+    int Number { get; set; }
+    int Level { get; set; }
+
+    float X { get; set; }
+    float Y { get; set; }
+
+    bool IsLeaf { get; }
+
+    T Content { get; set; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/IReadOnlySymbol.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/IReadOnlySymbol.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/IReadOnlySymbol.cs	(revision 10269)
@@ -0,0 +1,24 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface IReadOnlySymbol : ISymbol {
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbol.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbol.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbol.cs	(revision 10269)
@@ -0,0 +1,39 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ISymbol : INamedItem {
+    ISymbolicExpressionTreeNode CreateTreeNode();
+    double InitialFrequency { get; set; }
+    bool Enabled { get; set; }
+
+    int MinimumArity { get; }
+    int MaximumArity { get; }
+
+    IEnumerable<ISymbol> Flatten();
+
+    event EventHandler Changed;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionGrammar.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionGrammar.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionGrammar.cs	(revision 10269)
@@ -0,0 +1,51 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+using System;
+using HeuristicLab.Core;
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ISymbolicExpressionGrammar : ISymbolicExpressionGrammarBase, IStatefulItem {
+    ISymbol ProgramRootSymbol { get; }
+    ISymbol StartSymbol { get; }
+
+    int MinimumFunctionDefinitions { get; set; }
+    int MaximumFunctionDefinitions { get; set; }
+    int MinimumFunctionArguments { get; set; }
+    int MaximumFunctionArguments { get; set; }
+
+    bool ReadOnly { get; set; }
+    event EventHandler ReadOnlyChanged;
+
+    void AddSymbol(ISymbol symbol);
+    void RemoveSymbol(ISymbol symbol);
+
+    void AddAllowedChildSymbol(ISymbol parent, ISymbol child);
+    void AddAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex);
+    void RemoveAllowedChildSymbol(ISymbol parent, ISymbol child);
+    void RemoveAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex);
+
+    void SetSubtreeCount(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount);
+
+    void StartGrammarManipulation();
+    void FinishedGrammarManipulation();
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionGrammarBase.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionGrammarBase.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionGrammarBase.cs	(revision 10269)
@@ -0,0 +1,48 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ISymbolicExpressionGrammarBase : INamedItem {
+    IEnumerable<ISymbol> Symbols { get; }
+    ISymbol GetSymbol(string symbolName);
+    IEnumerable<ISymbol> AllowedSymbols { get; }
+    bool ContainsSymbol(ISymbol symbol);
+
+    bool IsAllowedChildSymbol(ISymbol parent, ISymbol child);
+    bool IsAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex);
+    IEnumerable<ISymbol> GetAllowedChildSymbols(ISymbol parent);
+    IEnumerable<ISymbol> GetAllowedChildSymbols(ISymbol parent, int argumentIndex);
+
+    int GetMinimumSubtreeCount(ISymbol symbol);
+    int GetMaximumSubtreeCount(ISymbol symbol);
+
+    int GetMinimumExpressionDepth(ISymbol start);
+    int GetMaximumExpressionDepth(ISymbol start);
+    int GetMinimumExpressionLength(ISymbol start);
+    int GetMaximumExpressionLength(ISymbol start, int maxDepth);
+
+    event EventHandler Changed;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTree.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTree.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTree.cs	(revision 10269)
@@ -0,0 +1,35 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+using System.Collections.Generic;
+using HeuristicLab.Core;
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ISymbolicExpressionTree : IItem {
+    ISymbolicExpressionTreeNode Root { get; set; }
+    int Length { get; }
+    int Depth { get; }
+
+    IEnumerable<ISymbolicExpressionTreeNode> IterateNodesBreadth();
+    IEnumerable<ISymbolicExpressionTreeNode> IterateNodesPrefix();
+    IEnumerable<ISymbolicExpressionTreeNode> IterateNodesPostfix();
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeGrammar.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeGrammar.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeGrammar.cs	(revision 10269)
@@ -0,0 +1,38 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ISymbolicExpressionTreeGrammar : ISymbolicExpressionGrammarBase {
+
+    IEnumerable<ISymbol> ModifyableSymbols { get; }
+    bool IsModifyableSymbol(ISymbol symbol);
+    void AddSymbol(ISymbol symbol);
+    void RemoveSymbol(ISymbol symbol);
+
+    void AddAllowedChildSymbol(ISymbol parent, ISymbol child);
+    void AddAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex);
+    void RemoveAllowedChildSymbol(ISymbol parent, ISymbol child);
+    void RemoveAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex);
+
+    void SetSubtreeCount(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNode.cs	(revision 10269)
@@ -0,0 +1,53 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ISymbolicExpressionTreeNode : IDeepCloneable {
+    ISymbolicExpressionTreeGrammar Grammar { get; }
+    ISymbolicExpressionTreeNode Parent { get; set; }
+    ISymbol Symbol { get; }
+    bool HasLocalParameters { get; }
+
+    int GetDepth();
+    int GetLength();
+    int GetBranchLevel(ISymbolicExpressionTreeNode child);
+
+    IEnumerable<ISymbolicExpressionTreeNode> IterateNodesBreadth();
+    IEnumerable<ISymbolicExpressionTreeNode> IterateNodesPostfix();
+    IEnumerable<ISymbolicExpressionTreeNode> IterateNodesPrefix();
+    void ForEachNodePostfix(Action<ISymbolicExpressionTreeNode> a);
+    void ForEachNodePrefix(Action<ISymbolicExpressionTreeNode> a);
+
+    IEnumerable<ISymbolicExpressionTreeNode> Subtrees { get; }
+    int SubtreeCount { get; }
+    ISymbolicExpressionTreeNode GetSubtree(int index);
+    int IndexOfSubtree(ISymbolicExpressionTreeNode tree);
+    void AddSubtree(ISymbolicExpressionTreeNode tree);
+    void InsertSubtree(int index, ISymbolicExpressionTreeNode tree);
+    void RemoveSubtree(int index);
+
+    void ResetLocalParameters(IRandom random);
+    void ShakeLocalParameters(IRandom random, double shakingFactor);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNodeComparer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNodeComparer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNodeComparer.cs	(revision 10269)
@@ -0,0 +1,7 @@
+﻿using System.Collections.Generic;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ISymbolicExpressionTreeNodeComparer : IComparer<ISymbolicExpressionTreeNode> {
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNodeSimilarityComparer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNodeSimilarityComparer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNodeSimilarityComparer.cs	(revision 10269)
@@ -0,0 +1,10 @@
+﻿using System.Collections.Generic;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ISymbolicExpressionTreeNodeSimilarityComparer : IEqualityComparer<ISymbolicExpressionTreeNode>, IItem {
+    bool MatchConstantValues { get; set; }
+    bool MatchVariableWeights { get; set; }
+    bool MatchVariableNames { get; set; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeStringFormatter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeStringFormatter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeStringFormatter.cs	(revision 10269)
@@ -0,0 +1,28 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ISymbolicExpressionTreeStringFormatter : INamedItem {
+    string Format(ISymbolicExpressionTree symbolicExpressionTree);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeAnalyzer.cs	(revision 10269)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Interface for analyzers that can be applied to symbolic expression trees.
+  /// </summary>
+  public interface ISymbolicExpressionTreeAnalyzer : IAnalyzer {
+    IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter { get; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeArchitectureAlteringOperator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeArchitectureAlteringOperator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeArchitectureAlteringOperator.cs	(revision 10269)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ISymbolicExpressionTreeArchitectureAlteringOperator : ISymbolicExpressionTreeOperator {
+    IValueLookupParameter<IntValue> MaximumFunctionDefinitionsParameter { get; }
+    IValueLookupParameter<IntValue> MaximumFunctionArgumentsParameter { get; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeArchitectureManipulator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeArchitectureManipulator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeArchitectureManipulator.cs	(revision 10269)
@@ -0,0 +1,31 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Interface for operators that manipulate symbolic expression trees.
+  /// </summary>
+  public interface ISymbolicExpressionTreeArchitectureManipulator : ISymbolicExpressionTreeManipulator, ISymbolicExpressionTreeArchitectureAlteringOperator {
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeCreator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeCreator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeCreator.cs	(revision 10269)
@@ -0,0 +1,33 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Interface for operators that create symbolic expression trees.
+  /// </summary>
+  public interface ISymbolicExpressionTreeCreator : ISymbolicExpressionTreeOperator, ISolutionCreator {
+    ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter { get; }
+    ISymbolicExpressionTree CreateTree(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeCrossover.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeCrossover.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeCrossover.cs	(revision 10269)
@@ -0,0 +1,34 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Interface for crossover operators that can be applied to symbolic expression trees.
+  /// </summary>
+  public interface ISymbolicExpressionTreeCrossover : ISymbolicExpressionTreeOperator, ICrossover {
+    ILookupParameter<ItemArray<ISymbolicExpressionTree>> ParentsParameter { get; }
+    ILookupParameter<ISymbolicExpressionTree> ChildParameter { get; }
+    ISymbolicExpressionTree Crossover(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeGrammarBasedOperator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeGrammarBasedOperator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeGrammarBasedOperator.cs	(revision 10269)
@@ -0,0 +1,31 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Interface for operators that can be applied to symbolic expression trees.
+  /// </summary>
+  public interface ISymbolicExpressionTreeGrammarBasedOperator : ISymbolicExpressionTreeOperator {
+    IValueLookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionTreeGrammarParameter { get; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeManipulator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeManipulator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeManipulator.cs	(revision 10269)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Interface for operators that manipulate symbolic expression trees.
+  /// </summary>
+  public interface ISymbolicExpressionTreeManipulator : ISymbolicExpressionTreeOperator, IManipulator {
+    ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter { get; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeOperator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeOperator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeOperator.cs	(revision 10269)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Interface for operators that can be applied to symbolic expression trees.
+  /// </summary>
+  public interface ISymbolicExpressionTreeOperator : IOperator {
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeSizeConstraintOperator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeSizeConstraintOperator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/Operators/ISymbolicExpressionTreeSizeConstraintOperator.cs	(revision 10269)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ISymbolicExpressionTreeSizeConstraintOperator : ISymbolicExpressionTreeOperator {
+    IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter { get; }
+    IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter { get; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/LayoutEngines/LayoutNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/LayoutEngines/LayoutNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/LayoutEngines/LayoutNode.cs	(revision 10269)
@@ -0,0 +1,69 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.LayoutEngines {
+  public class LayoutNode<T> : ILayoutNode<T> where T : class {
+    public ILayoutNode<T> NextLeft {
+      get {
+        return Children == null ? Thread : Children.First();
+      }
+    }
+    public ILayoutNode<T> NextRight {
+      get {
+        return Children == null ? Thread : Children.Last();
+      }
+    }
+    public ILayoutNode<T> LeftSibling {
+      get {
+        if (Parent == null) return null;
+        return Number == 0 ? null : Parent.Children[Number - 1];
+      }
+    }
+    public ILayoutNode<T> LeftmostSibling {
+      get {
+        if (Parent == null) return null;
+        return Number == 0 ? null : Parent.Children[0];
+      }
+    }
+
+    public ILayoutNode<T> Thread { get; set; }
+    public ILayoutNode<T> Ancestor { get; set; }
+    public ILayoutNode<T> Parent { get; set; }
+    public List<ILayoutNode<T>> Children { get; set; }
+    public float Mod { get; set; }
+    public float Prelim { get; set; }
+    public float Change { get; set; }
+    public float Shift { get; set; }
+    public int Number { get; set; }
+    public int Level { get; set; }
+    public float X { get; set; }
+    public float Y { get; set; }
+
+    public bool IsLeaf {
+      get { return Children == null || Children.Count == 0; }
+    }
+
+    public T Content { get; set; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/LayoutEngines/ReingoldTilfordLayoutEngine.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/LayoutEngines/ReingoldTilfordLayoutEngine.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/LayoutEngines/ReingoldTilfordLayoutEngine.cs	(revision 10269)
@@ -0,0 +1,233 @@
+﻿
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public class ReingoldTilfordLayoutEngine<T> where T : class {
+    private readonly Dictionary<T, ILayoutNode<T>> nodes; // provides a reverse mapping T => ILayoutNode
+
+    public ReingoldTilfordLayoutEngine() {
+      nodes = new Dictionary<T, ILayoutNode<T>>();
+    }
+
+    public Dictionary<T, ILayoutNode<T>> Nodes { get { return nodes; } }
+
+    public void AddNode(T content, ILayoutNode<T> node) {
+      if (nodes.ContainsKey(content)) {
+        throw new ArgumentException("Content already present in the dictionary.");
+      }
+      nodes.Add(content, node);
+    }
+
+    public ILayoutNode<T> GetNode(T content) {
+      ILayoutNode<T> ILayoutNode;
+      nodes.TryGetValue(content, out ILayoutNode);
+      return ILayoutNode;
+    }
+
+    private float minHorizontalSpacing = 5;
+    public float MinHorizontalSpacing {
+      get { return minHorizontalSpacing; }
+      set { minHorizontalSpacing = value; }
+    }
+
+    private float minVerticalSpacing = 5;
+    public float MinVerticalSpacing {
+      get { return minVerticalSpacing; }
+      set { minVerticalSpacing = value; }
+    }
+
+    private ILayoutNode<T> root;
+    public ILayoutNode<T> Root {
+      get { return root; }
+      set {
+        root = value;
+      }
+    }
+
+    public void ResetCoordinates() {
+      foreach (var node in nodes.Values) {
+        node.X = 0;
+        node.Y = 0;
+      }
+    }
+
+    /// <summary>
+    /// Transform ILayoutNode coordinates so that all coordinates are positive and start from 0.
+    /// </summary>
+    private void NormalizeCoordinates() {
+      var list = nodes.Values.ToList();
+      float xmin = 0, ymin = 0;
+      for (int i = 0; i != list.Count; ++i) {
+        if (xmin > list[i].X) xmin = list[i].X;
+        if (ymin > list[i].Y) ymin = list[i].Y;
+      }
+      for (int i = 0; i != list.Count; ++i) {
+        list[i].X -= xmin;
+        list[i].Y -= ymin;
+      }
+    }
+
+    public void Reset() {
+      root = null;
+      nodes.Clear();
+    }
+
+    public void ResetParameters() {
+      foreach (var layoutNode in nodes.Values) {
+        // reset layout-related parameters 
+        layoutNode.Ancestor = layoutNode;
+        layoutNode.Thread = null;
+        layoutNode.Change = 0;
+        layoutNode.Shift = 0;
+        layoutNode.Prelim = 0;
+        layoutNode.Mod = 0;
+      }
+    }
+
+    public void CalculateLayout() {
+      if (root == null)
+        throw new Exception("Root cannot be null.");
+      ResetCoordinates(); // reset node X,Y coordinates
+      ResetParameters(); // reset node parameters like Mod, Shift etc. 
+      FirstWalk(root);
+      SecondWalk(root, -root.Prelim);
+      NormalizeCoordinates();
+    }
+
+    /// <summary>
+    /// Returns a map of coordinates for each ILayoutNode in the symbolic expression tree.
+    /// </summary>
+    /// <returns></returns>
+    public Dictionary<T, PointF> GetNodeCoordinates() {
+      return nodes.ToDictionary(x => x.Key, x => new PointF(x.Value.X, x.Value.Y));
+    }
+
+    /// <summary>
+    /// Returns the bounding box for this layout. When the layout is normalized, the rectangle should be [0,0,xmin,xmax].
+    /// </summary>
+    /// <returns></returns>
+    public RectangleF Bounds() {
+      float xmin, xmax, ymin, ymax; xmin = xmax = ymin = ymax = 0;
+      var list = nodes.Values.ToList();
+      for (int i = 0; i != list.Count; ++i) {
+        float x = list[i].X, y = list[i].Y;
+        if (xmin > x) xmin = x;
+        if (xmax < x) xmax = x;
+        if (ymin > y) ymin = y;
+        if (ymax < y) ymax = y;
+      }
+      return new RectangleF(xmin, ymin, xmax + minHorizontalSpacing, ymax + minVerticalSpacing);
+    }
+
+    private void FirstWalk(ILayoutNode<T> v) {
+      ILayoutNode<T> w;
+      if (v.IsLeaf) {
+        w = v.LeftSibling;
+        if (w != null) {
+          v.Prelim = w.Prelim + minHorizontalSpacing;
+        }
+      } else {
+        var defaultAncestor = v.Children[0]; // leftmost child
+
+        foreach (var child in v.Children) {
+          FirstWalk(child);
+          Apportion(child, ref defaultAncestor);
+        }
+        ExecuteShifts(v);
+        var leftmost = v.Children.First();
+        var rightmost = v.Children.Last();
+        float midPoint = (leftmost.Prelim + rightmost.Prelim) / 2;
+        w = v.LeftSibling;
+        if (w != null) {
+          v.Prelim = w.Prelim + minHorizontalSpacing;
+          v.Mod = v.Prelim - midPoint;
+        } else {
+          v.Prelim = midPoint;
+        }
+      }
+    }
+
+    private void SecondWalk(ILayoutNode<T> v, float m) {
+      v.X = v.Prelim + m;
+      v.Y = v.Level * minVerticalSpacing;
+      if (v.IsLeaf) return;
+      foreach (var child in v.Children) {
+        SecondWalk(child, m + v.Mod);
+      }
+    }
+
+    private void Apportion(ILayoutNode<T> v, ref ILayoutNode<T> defaultAncestor) {
+      var w = v.LeftSibling;
+      if (w == null) return;
+      ILayoutNode<T> vip = v;
+      ILayoutNode<T> vop = v;
+      ILayoutNode<T> vim = w;
+      ILayoutNode<T> vom = vip.LeftmostSibling;
+
+      float sip = vip.Mod;
+      float sop = vop.Mod;
+      float sim = vim.Mod;
+      float som = vom.Mod;
+
+      while (vim.NextRight != null && vip.NextLeft != null) {
+        vim = vim.NextRight;
+        vip = vip.NextLeft;
+        vom = vom.NextLeft;
+        vop = vop.NextRight;
+        vop.Ancestor = v;
+        float shift = (vim.Prelim + sim) - (vip.Prelim + sip) + minHorizontalSpacing;
+        if (shift > 0) {
+          var ancestor = Ancestor(vim, v) ?? defaultAncestor;
+          MoveSubtree(ancestor, v, shift);
+          sip += shift;
+          sop += shift;
+        }
+        sim += vim.Mod;
+        sip += vip.Mod;
+        som += vom.Mod;
+        sop += vop.Mod;
+      }
+      if (vim.NextRight != null && vop.NextRight == null) {
+        vop.Thread = vim.NextRight;
+        vop.Mod += (sim - sop);
+      }
+      if (vip.NextLeft != null && vom.NextLeft == null) {
+        vom.Thread = vip.NextLeft;
+        vom.Mod += (sip - som);
+        defaultAncestor = v;
+      }
+    }
+
+    private void MoveSubtree(ILayoutNode<T> wm, ILayoutNode<T> wp, float shift) {
+      int subtrees = wp.Number - wm.Number; // TODO: Investigate possible bug (if the value ever happens to be zero) - happens when the tree is actually a graph
+      if (subtrees == 0) throw new Exception();
+      wp.Change -= shift / subtrees;
+      wp.Shift += shift;
+      wm.Change += shift / subtrees;
+      wp.Prelim += shift;
+      wp.Mod += shift;
+    }
+
+    private void ExecuteShifts(ILayoutNode<T> v) {
+      if (v.IsLeaf) return;
+      float shift = 0;
+      float change = 0;
+      for (int i = v.Children.Count - 1; i >= 0; --i) {
+        var w = v.Children[i];
+        w.Prelim += shift;
+        w.Mod += shift;
+        change += w.Change;
+        shift += (w.Shift + change);
+      }
+    }
+
+    private ILayoutNode<T> Ancestor(ILayoutNode<T> u, ILayoutNode<T> v) {
+      var ancestor = u.Ancestor;
+      if (ancestor == null) return null;
+      return ancestor.Parent == v.Parent ? ancestor : null;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/LayoutEngines/SymbolicExpressionTreeLayoutAdapter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/LayoutEngines/SymbolicExpressionTreeLayoutAdapter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/LayoutEngines/SymbolicExpressionTreeLayoutAdapter.cs	(revision 10269)
@@ -0,0 +1,76 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.LayoutEngines;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  // adapter class that provides some conversion methods from symbolic expression trees to layout nodes (preserving the tree structure)
+  public class SymbolicExpressionTreeLayoutAdapter : ILayoutAdapter<ISymbolicExpressionTreeNode> {
+    // default conversion function between ISymbolicExpressionTreeNode and ILayoutNode<ISymbolicExpressionTree>
+    ILayoutNode<ISymbolicExpressionTreeNode> defaultConvert(ISymbolicExpressionTreeNode node) {
+      var layoutNode = new LayoutNode<ISymbolicExpressionTreeNode> { Content = node };
+      layoutNode.Ancestor = layoutNode;
+      return layoutNode;
+    }
+
+    public IEnumerable<ILayoutNode<ISymbolicExpressionTreeNode>> Convert(ISymbolicExpressionTree tree, Func<ISymbolicExpressionTreeNode, ILayoutNode<ISymbolicExpressionTreeNode>> convertFunc = null) {
+      return Convert(tree.Root, convertFunc);
+    }
+    // translate the symbolic expression tree structure to a layout node tree structure
+    // return an enumerable containing all the layout nodes
+    public IEnumerable<ILayoutNode<ISymbolicExpressionTreeNode>> Convert(ISymbolicExpressionTreeNode root, Func<ISymbolicExpressionTreeNode, ILayoutNode<ISymbolicExpressionTreeNode>> convertFunc = null) {
+      var rootLayoutNode = convertFunc == null ? defaultConvert(root) : convertFunc(root);
+      rootLayoutNode.Ancestor = rootLayoutNode;
+
+      if (root.SubtreeCount > 0) {
+        rootLayoutNode.Children = new List<ILayoutNode<ISymbolicExpressionTreeNode>>(root.SubtreeCount);
+        Expand(rootLayoutNode, convertFunc);
+      }
+
+      var list = new List<ILayoutNode<ISymbolicExpressionTreeNode>> { rootLayoutNode };
+      int i = 0;
+      while (i < list.Count) {
+        if (list[i].Children != null)
+          foreach (ILayoutNode<ISymbolicExpressionTreeNode> child in list[i].Children)
+            list.Add(child);
+        ++i;
+      }
+      return list;
+    }
+
+    private void Expand(ILayoutNode<ISymbolicExpressionTreeNode> layoutNode, Func<ISymbolicExpressionTreeNode, ILayoutNode<ISymbolicExpressionTreeNode>> convertFunc = null) {
+      if (layoutNode.Children == null) return;
+      for (int i = 0; i < layoutNode.Content.SubtreeCount; ++i) {
+        var subtree = layoutNode.Content.GetSubtree(i);
+        var childLayoutNode = convertFunc == null ? defaultConvert(subtree) : convertFunc(subtree);
+        childLayoutNode.Parent = layoutNode;
+        childLayoutNode.Number = i;
+        childLayoutNode.Level = layoutNode.Level + 1;
+        childLayoutNode.Ancestor = childLayoutNode;
+        childLayoutNode.Children = subtree.SubtreeCount > 0 ? new List<ILayoutNode<ISymbolicExpressionTreeNode>>(subtree.SubtreeCount) : null;
+        layoutNode.Children.Add(childLayoutNode);
+        Expand(childLayoutNode, convertFunc);
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ChangeNodeTypeManipulation.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ChangeNodeTypeManipulation.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ChangeNodeTypeManipulation.cs	(revision 10269)
@@ -0,0 +1,96 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  [Item("ChangeNodeTypeManipulation", "Selects a random tree node and changes the symbol.")]
+  public sealed class ChangeNodeTypeManipulation : SymbolicExpressionTreeManipulator {
+    private const int MAX_TRIES = 100;
+
+    [StorableConstructor]
+    private ChangeNodeTypeManipulation(bool deserializing) : base(deserializing) { }
+    private ChangeNodeTypeManipulation(ChangeNodeTypeManipulation original, Cloner cloner) : base(original, cloner) { }
+    public ChangeNodeTypeManipulation() : base() { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ChangeNodeTypeManipulation(this, cloner);
+    }
+
+    protected override void Manipulate(IRandom random, ISymbolicExpressionTree symbolicExpressionTree) {
+      ChangeNodeType(random, symbolicExpressionTree);
+    }
+
+    public static void ChangeNodeType(IRandom random, ISymbolicExpressionTree symbolicExpressionTree) {
+      List<ISymbol> allowedSymbols = new List<ISymbol>();
+      ISymbolicExpressionTreeNode parent;
+      int childIndex;
+      ISymbolicExpressionTreeNode child;
+      // repeat until a fitting parent and child are found (MAX_TRIES times)
+      int tries = 0;
+      do {
+        parent = symbolicExpressionTree.Root.IterateNodesPrefix().Skip(1).Where(n => n.SubtreeCount > 0).SelectRandom(random);
+        childIndex = random.Next(parent.SubtreeCount);
+
+        child = parent.GetSubtree(childIndex);
+        int existingSubtreeCount = child.SubtreeCount;
+        allowedSymbols.Clear();
+        foreach (var symbol in parent.Grammar.GetAllowedChildSymbols(parent.Symbol, childIndex)) {
+          // check basic properties that the new symbol must have
+          if (symbol.Name != child.Symbol.Name &&
+            symbol.InitialFrequency > 0 &&
+            existingSubtreeCount <= parent.Grammar.GetMinimumSubtreeCount(symbol) &&
+            existingSubtreeCount >= parent.Grammar.GetMaximumSubtreeCount(symbol)) {
+            // check that all existing subtrees are also allowed for the new symbol
+            bool allExistingSubtreesAllowed = true;
+            for (int existingSubtreeIndex = 0; existingSubtreeIndex < existingSubtreeCount && allExistingSubtreesAllowed; existingSubtreeIndex++) {
+              var existingSubtree = child.GetSubtree(existingSubtreeIndex);
+              allExistingSubtreesAllowed &= parent.Grammar.IsAllowedChildSymbol(symbol, existingSubtree.Symbol, existingSubtreeIndex);
+            }
+            if (allExistingSubtreesAllowed) {
+              allowedSymbols.Add(symbol);
+            }
+          }
+        }
+        tries++;
+      } while (tries < MAX_TRIES && allowedSymbols.Count == 0);
+
+      if (tries < MAX_TRIES) {
+        var weights = allowedSymbols.Select(s => s.InitialFrequency).ToList();
+        var newSymbol = allowedSymbols.SelectRandom(weights, random);
+
+        // replace the old node with the new node
+        var newNode = newSymbol.CreateTreeNode();
+        if (newNode.HasLocalParameters)
+          newNode.ResetLocalParameters(random);
+        foreach (var subtree in child.Subtrees)
+          newNode.AddSubtree(subtree);
+        parent.RemoveSubtree(childIndex);
+        parent.InsertSubtree(childIndex, newNode);
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/FullTreeShaker.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/FullTreeShaker.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/FullTreeShaker.cs	(revision 10269)
@@ -0,0 +1,64 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  [Item("FullTreeShaker", "Manipulates all nodes that have local parameters.")]
+  public sealed class FullTreeShaker : SymbolicExpressionTreeManipulator {
+    private const string ShakingFactorParameterName = "ShakingFactor";
+    #region parameter properties
+    public IValueParameter<DoubleValue> ShakingFactorParameter {
+      get { return (IValueParameter<DoubleValue>)Parameters[ShakingFactorParameterName]; }
+    }
+    #endregion
+    #region properties
+    public double ShakingFactor {
+      get { return ShakingFactorParameter.Value.Value; }
+      set { ShakingFactorParameter.Value.Value = value; }
+    }
+    #endregion
+    [StorableConstructor]
+    private FullTreeShaker(bool deserializing) : base(deserializing) { }
+    private FullTreeShaker(FullTreeShaker original, Cloner cloner) : base(original, cloner) { }
+    public FullTreeShaker()
+      : base() {
+      Parameters.Add(new FixedValueParameter<DoubleValue>(ShakingFactorParameterName, "The shaking factor that should be used for the manipulation of constants (default=1.0).", new DoubleValue(1.0)));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new FullTreeShaker(this, cloner);
+    }
+
+    protected override void Manipulate(IRandom random, ISymbolicExpressionTree tree) {
+      tree.Root.ForEachNodePostfix(node => {
+        if (node.HasLocalParameters) {
+          node.ShakeLocalParameters(random, ShakingFactor);
+        }
+      });
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs	(revision 10269)
@@ -0,0 +1,114 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [Item("MultiSymbolicExpressionTreeManipulator", "Randomly selects and applies one of its manipulators every time it is called.")]
+  [StorableClass]
+  public sealed class MultiSymbolicExpressionTreeManipulator : StochasticMultiBranch<ISymbolicExpressionTreeManipulator>,
+    ISymbolicExpressionTreeManipulator,
+    IStochasticOperator,
+    ISymbolicExpressionTreeSizeConstraintOperator {
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    protected override bool CreateChildOperation {
+      get { return true; }
+    }
+
+    #region Parameter Properties
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private MultiSymbolicExpressionTreeManipulator(bool deserializing) : base(deserializing) { }
+    private MultiSymbolicExpressionTreeManipulator(MultiSymbolicExpressionTreeManipulator original, Cloner cloner) : base(original, cloner) { }
+    public MultiSymbolicExpressionTreeManipulator()
+      : base() {
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree on which the operator should be applied."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
+
+      List<ISymbolicExpressionTreeManipulator> list = new List<ISymbolicExpressionTreeManipulator>();
+      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(ISymbolicExpressionTreeManipulator))) {
+        if (this.GetType().Assembly != type.Assembly) continue;
+        if (typeof(IMultiOperator<ISymbolicExpressionTreeManipulator>).IsAssignableFrom(type)) continue;
+        if (typeof(ISymbolicExpressionTreeArchitectureAlteringOperator).IsAssignableFrom(type)) continue;
+        list.Add((ISymbolicExpressionTreeManipulator)Activator.CreateInstance(type));
+      }
+      CheckedItemList<ISymbolicExpressionTreeManipulator> checkedItemList = new CheckedItemList<ISymbolicExpressionTreeManipulator>();
+      checkedItemList.AddRange(list.OrderBy(op => op.Name));
+      Operators = checkedItemList.AsReadOnly();
+      Operators_ItemsAdded(this, new CollectionItemsChangedEventArgs<IndexedItem<ISymbolicExpressionTreeManipulator>>(Operators.CheckedItems));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MultiSymbolicExpressionTreeManipulator(this, cloner);
+    }
+
+    protected override void Operators_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<ISymbolicExpressionTreeManipulator>> e) {
+      base.Operators_ItemsReplaced(sender, e);
+      ParameterizeManipulators();
+    }
+
+    protected override void Operators_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<ISymbolicExpressionTreeManipulator>> e) {
+      base.Operators_ItemsAdded(sender, e);
+      ParameterizeManipulators();
+    }
+
+    private void ParameterizeManipulators() {
+      foreach (IStochasticOperator manipulator in Operators.OfType<IStochasticOperator>()) {
+        manipulator.RandomParameter.ActualName = RandomParameter.Name;
+      }
+      foreach (ISymbolicExpressionTreeManipulator manipulator in Operators.OfType<ISymbolicExpressionTreeManipulator>()) {
+        manipulator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name;
+      }
+      foreach (ISymbolicExpressionTreeSizeConstraintOperator manipulator in Operators.OfType<ISymbolicExpressionTreeSizeConstraintOperator>()) {
+        manipulator.MaximumSymbolicExpressionTreeDepthParameter.ActualName = MaximumSymbolicExpressionTreeDepthParameter.Name;
+        manipulator.MaximumSymbolicExpressionTreeLengthParameter.ActualName = MaximumSymbolicExpressionTreeLengthParameter.Name;
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs	(revision 10269)
@@ -0,0 +1,73 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Parameters;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  [Item("OnePointShaker", "Selects a random node with local parameters and manipulates the selected node.")]
+  public sealed class OnePointShaker : SymbolicExpressionTreeManipulator {
+    private const string ShakingFactorParameterName = "ShakingFactor";
+    #region parameter properties
+    public IValueParameter<DoubleValue> ShakingFactorParameter {
+      get { return (IValueParameter<DoubleValue>)Parameters[ShakingFactorParameterName]; }
+    }
+    #endregion
+    #region properties
+    public double ShakingFactor {
+      get { return ShakingFactorParameter.Value.Value; }
+      set { ShakingFactorParameter.Value.Value = value; }
+    }
+    #endregion
+    [StorableConstructor]
+    private OnePointShaker(bool deserializing) : base(deserializing) { }
+    private OnePointShaker(OnePointShaker original, Cloner cloner) : base(original, cloner) { }
+    public OnePointShaker()
+      : base() {
+      Parameters.Add(new FixedValueParameter<DoubleValue>(ShakingFactorParameterName, "The shaking factor that should be used for the manipulation of constants (default=1.0).", new DoubleValue(1.0)));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new OnePointShaker(this, cloner);
+    }
+
+    protected override void Manipulate(IRandom random, ISymbolicExpressionTree tree) {
+      OnePointShaker.Shake(random, tree, ShakingFactor);
+    }
+
+    public static void Shake(IRandom random, ISymbolicExpressionTree tree, double shakingFactor) {
+      List<ISymbolicExpressionTreeNode> parametricNodes = new List<ISymbolicExpressionTreeNode>();
+      tree.Root.ForEachNodePostfix(n => {
+        if (n.HasLocalParameters) parametricNodes.Add(n);
+      });
+      if (parametricNodes.Count > 0) {
+        var selectedPoint = parametricNodes.SelectRandom(random);
+        selectedPoint.ShakeLocalParameters(random, shakingFactor);
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/RemoveBranchManipulation.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/RemoveBranchManipulation.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/RemoveBranchManipulation.cs	(revision 10269)
@@ -0,0 +1,132 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  [Item("RemoveBranchManipulation", "Removes a random sub-tree of the input tree and fixes the tree by generating random subtrees if necessary..")]
+  public sealed class RemoveBranchManipulation : SymbolicExpressionTreeManipulator, ISymbolicExpressionTreeSizeConstraintOperator {
+    private const int MAX_TRIES = 100;
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    #region Parameter Properties
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    #endregion
+    #region Properties
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
+    }
+    public IntValue MaximumSymbolicExpressionTreeDepth {
+      get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private RemoveBranchManipulation(bool deserializing) : base(deserializing) { }
+    private RemoveBranchManipulation(RemoveBranchManipulation original, Cloner cloner) : base(original, cloner) { }
+    public RemoveBranchManipulation()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RemoveBranchManipulation(this, cloner);
+    }
+
+    protected override void Manipulate(IRandom random, ISymbolicExpressionTree symbolicExpressionTree) {
+      RemoveRandomBranch(random, symbolicExpressionTree, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
+    }
+
+    public static void RemoveRandomBranch(IRandom random, ISymbolicExpressionTree symbolicExpressionTree, int maxTreeLength, int maxTreeDepth) {
+      var allowedSymbols = new List<ISymbol>();
+      ISymbolicExpressionTreeNode parent;
+      int childIndex;
+      int maxLength;
+      int maxDepth;
+      // repeat until a fitting parent and child are found (MAX_TRIES times)
+      int tries = 0;
+
+      var nodes = symbolicExpressionTree.Root.IterateNodesPrefix().Skip(1).Where(n => n.SubtreeCount > 0).ToList();
+      do {
+        parent = nodes.SelectRandom(random);
+        childIndex = random.Next(parent.SubtreeCount);
+        var child = parent.GetSubtree(childIndex);
+        maxLength = maxTreeLength - symbolicExpressionTree.Length + child.GetLength();
+        maxDepth = maxTreeDepth - symbolicExpressionTree.Depth + child.GetDepth();
+
+        allowedSymbols.Clear();
+        foreach (var symbol in parent.Grammar.GetAllowedChildSymbols(parent.Symbol, childIndex)) {
+          // check basic properties that the new symbol must have
+          if (symbol.Name != child.Symbol.Name &&
+            symbol.InitialFrequency > 0 &&
+            parent.Grammar.GetMinimumExpressionDepth(symbol) + 1 <= maxDepth &&
+            parent.Grammar.GetMinimumExpressionLength(symbol) <= maxLength) {
+            allowedSymbols.Add(symbol);
+          }
+        }
+        tries++;
+      } while (tries < MAX_TRIES && allowedSymbols.Count == 0);
+
+      if (tries >= MAX_TRIES) return;
+      ReplaceWithMinimalTree(random, symbolicExpressionTree.Root, parent, childIndex);
+    }
+
+    private static void ReplaceWithMinimalTree(IRandom random, ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode parent, int childIndex) {
+      // determine possible symbols that will lead to the smallest possible tree
+      var possibleSymbols = (from s in parent.Grammar.GetAllowedChildSymbols(parent.Symbol, childIndex)
+                             where s.InitialFrequency > 0.0
+                             group s by parent.Grammar.GetMinimumExpressionLength(s) into g
+                             orderby g.Key
+                             select g).First().ToList();
+      var weights = possibleSymbols.Select(x => x.InitialFrequency).ToList();
+      var selectedSymbol = possibleSymbols.SelectRandom(weights, random);
+      var newTreeNode = selectedSymbol.CreateTreeNode();
+      if (newTreeNode.HasLocalParameters) newTreeNode.ResetLocalParameters(random);
+      parent.RemoveSubtree(childIndex);
+      parent.InsertSubtree(childIndex, newTreeNode);
+
+      var topLevelNode = newTreeNode as SymbolicExpressionTreeTopLevelNode;
+      if (topLevelNode != null)
+        topLevelNode.SetGrammar((ISymbolicExpressionTreeGrammar)root.Grammar.Clone());
+
+      for (int i = 0; i < newTreeNode.Grammar.GetMinimumSubtreeCount(newTreeNode.Symbol); i++) {
+        // insert a dummy sub-tree and add the pending extension to the list
+        var dummy = new SymbolicExpressionTreeNode();
+        newTreeNode.AddSubtree(dummy);
+        // replace the just inserted dummy by recursive application
+        ReplaceWithMinimalTree(random, root, newTreeNode, i);
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ReplaceBranchManipulation.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ReplaceBranchManipulation.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ReplaceBranchManipulation.cs	(revision 10269)
@@ -0,0 +1,113 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  [Item("ReplaceBranchManipulation", "Selects a branch of the tree randomly and replaces it with a newly initialized branch (using PTC2).")]
+  public sealed class ReplaceBranchManipulation : SymbolicExpressionTreeManipulator, ISymbolicExpressionTreeSizeConstraintOperator {
+    private const int MAX_TRIES = 100;
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    #region Parameter Properties
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    #endregion
+    #region Properties
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
+    }
+    public IntValue MaximumSymbolicExpressionTreeDepth {
+      get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private ReplaceBranchManipulation(bool deserializing) : base(deserializing) { }
+    private ReplaceBranchManipulation(ReplaceBranchManipulation original, Cloner cloner) : base(original, cloner) { }
+    public ReplaceBranchManipulation()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ReplaceBranchManipulation(this, cloner);
+    }
+
+    protected override void Manipulate(IRandom random, ISymbolicExpressionTree symbolicExpressionTree) {
+      ReplaceRandomBranch(random, symbolicExpressionTree, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
+    }
+
+    public static void ReplaceRandomBranch(IRandom random, ISymbolicExpressionTree symbolicExpressionTree, int maxTreeLength, int maxTreeDepth) {
+      var allowedSymbols = new List<ISymbol>();
+      ISymbolicExpressionTreeNode parent;
+      int childIndex;
+      int maxLength;
+      int maxDepth;
+      // repeat until a fitting parent and child are found (MAX_TRIES times)
+      int tries = 0;
+      do {
+        parent = symbolicExpressionTree.Root.IterateNodesPrefix().Skip(1).Where(n => n.SubtreeCount > 0).SelectRandom(random);
+        childIndex = random.Next(parent.SubtreeCount);
+        var child = parent.GetSubtree(childIndex);
+        maxLength = maxTreeLength - symbolicExpressionTree.Length + child.GetLength();
+        maxDepth = maxTreeDepth - symbolicExpressionTree.Depth + child.GetDepth();
+
+        allowedSymbols.Clear();
+        foreach (var symbol in parent.Grammar.GetAllowedChildSymbols(parent.Symbol, childIndex)) {
+          // check basic properties that the new symbol must have
+          if (symbol.Name != child.Symbol.Name &&
+            symbol.InitialFrequency > 0 &&
+            parent.Grammar.GetMinimumExpressionDepth(symbol) + 1 <= maxDepth &&
+            parent.Grammar.GetMinimumExpressionLength(symbol) <= maxLength) {
+            allowedSymbols.Add(symbol);
+          }
+        }
+        tries++;
+      } while (tries < MAX_TRIES && allowedSymbols.Count == 0);
+
+      if (tries < MAX_TRIES) {
+        var weights = allowedSymbols.Select(s => s.InitialFrequency).ToList();
+        var seedSymbol = allowedSymbols.SelectRandom(weights, random);
+        // replace the old node with the new node
+        var seedNode = seedSymbol.CreateTreeNode();
+        if (seedNode.HasLocalParameters)
+          seedNode.ResetLocalParameters(random);
+
+        parent.RemoveSubtree(childIndex);
+        parent.InsertSubtree(childIndex, seedNode);
+        ProbabilisticTreeCreator.PTC2(random, seedNode, maxLength, maxDepth);
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/SymbolicExpressionTreeManipulator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/SymbolicExpressionTreeManipulator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/SymbolicExpressionTreeManipulator.cs	(revision 10269)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+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, ISymbolicExpressionTreeManipulator {
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+
+    #region Parameter Properties
+    public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    #endregion
+
+    #region Properties
+    public ISymbolicExpressionTree SymbolicExpressionTree {
+      get { return SymbolicExpressionTreeParameter.ActualValue; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicExpressionTreeManipulator(bool deserializing) : base(deserializing) { }
+    protected SymbolicExpressionTreeManipulator(SymbolicExpressionTreeManipulator original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicExpressionTreeManipulator()
+      : base() {
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree on which the operator should be applied."));
+    }
+
+    public sealed override IOperation Apply() {
+      ISymbolicExpressionTree tree = SymbolicExpressionTreeParameter.ActualValue;
+      Manipulate(RandomParameter.ActualValue, tree);
+
+      return base.Apply();
+    }
+
+    protected abstract void Manipulate(IRandom random, ISymbolicExpressionTree symbolicExpressionTree);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Plugin.cs.frame
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Plugin.cs.frame	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Plugin.cs.frame	(revision 10269)
@@ -0,0 +1,42 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","Provides operators and related classes for the symbolic expression tree encoding.", "3.4.5.$WCREV$")]
+  [PluginFile("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  public class HeuristicLabEncodingsSymbolicExpressionTreeEncodingPlugin : PluginBase {
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Properties/AssemblyInfo.cs.frame
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Properties/AssemblyInfo.cs.frame	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Properties/AssemblyInfo.cs.frame	(revision 10269)
@@ -0,0 +1,47 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding")]
+[assembly: AssemblyDescription("Provides operators and related classes for the symbolic expression tree encoding.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("B4A9B316-6336-478B-84E5-16F773DE2512")]
+
+[assembly: AssemblyVersion("3.4.0.0")]
+[assembly: AssemblyFileVersion("3.4.5.$WCREV$")]
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammar.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammar.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammar.cs	(revision 10269)
@@ -0,0 +1,353 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  public abstract class SymbolicExpressionGrammar : SymbolicExpressionGrammarBase, ISymbolicExpressionGrammar {
+    #region fields & properties
+    [Storable(DefaultValue = false)]
+    private bool readOnly;
+    public bool ReadOnly {
+      get { return readOnly; }
+      set {
+        if (readOnly != value) {
+          readOnly = value;
+          OnReadOnlyChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private int minimumFunctionDefinitions;
+    public int MinimumFunctionDefinitions {
+      get { return minimumFunctionDefinitions; }
+      set {
+        minimumFunctionDefinitions = value;
+        UpdateAdfConstraints();
+      }
+    }
+    [Storable]
+    private int maximumFunctionDefinitions;
+    public int MaximumFunctionDefinitions {
+      get { return maximumFunctionDefinitions; }
+      set {
+        maximumFunctionDefinitions = value;
+        UpdateAdfConstraints();
+      }
+    }
+    [Storable]
+    private int minimumFunctionArguments;
+    public int MinimumFunctionArguments {
+      get { return minimumFunctionArguments; }
+      set { minimumFunctionArguments = value; }
+    }
+    [Storable]
+    private int maximumFunctionArguments;
+    public int MaximumFunctionArguments {
+      get { return maximumFunctionArguments; }
+      set { maximumFunctionArguments = value; }
+    }
+
+    private ProgramRootSymbol programRootSymbol;
+    public ProgramRootSymbol ProgramRootSymbol {
+      get { return programRootSymbol; }
+    }
+    ISymbol ISymbolicExpressionGrammar.ProgramRootSymbol {
+      get { return ProgramRootSymbol; }
+    }
+    [Storable(Name = "ProgramRootSymbol")]
+    private ISymbol StorableProgramRootSymbol {
+      get { return programRootSymbol; }
+      set { programRootSymbol = (ProgramRootSymbol)value; }
+    }
+
+    private StartSymbol startSymbol;
+    public StartSymbol StartSymbol {
+      get { return startSymbol; }
+    }
+    ISymbol ISymbolicExpressionGrammar.StartSymbol {
+      get { return StartSymbol; }
+    }
+    [Storable(Name = "StartSymbol")]
+    private ISymbol StorableStartSymbol {
+      get { return startSymbol; }
+      set { startSymbol = (StartSymbol)value; }
+    }
+
+    private Defun defunSymbol;
+    protected Defun DefunSymbol {
+      get { return defunSymbol; }
+    }
+    [Storable(Name = "DefunSymbol")]
+    private ISymbol StorableDefunSymbol {
+      get { return defunSymbol; }
+      set { defunSymbol = (Defun)value; }
+    }
+    #endregion
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      foreach (ISymbol symbol in symbols.Values)
+        RegisterSymbolEvents(symbol);
+    }
+    [StorableConstructor]
+    protected SymbolicExpressionGrammar(bool deserializing) : base(deserializing) { }
+    protected SymbolicExpressionGrammar(SymbolicExpressionGrammar original, Cloner cloner)
+      : base(original, cloner) {
+      foreach (ISymbol symbol in symbols.Values)
+        RegisterSymbolEvents(symbol);
+
+      programRootSymbol = cloner.Clone(original.programRootSymbol);
+      startSymbol = cloner.Clone(original.StartSymbol);
+      defunSymbol = cloner.Clone(original.defunSymbol);
+
+      maximumFunctionArguments = original.maximumFunctionArguments;
+      minimumFunctionArguments = original.minimumFunctionArguments;
+      maximumFunctionDefinitions = original.maximumFunctionDefinitions;
+      minimumFunctionDefinitions = original.minimumFunctionDefinitions;
+    }
+
+    public SymbolicExpressionGrammar(string name, string description)
+      : base(name, description) {
+      programRootSymbol = new ProgramRootSymbol();
+      AddSymbol(programRootSymbol);
+      SetSubtreeCount(programRootSymbol, 1, 1);
+
+      startSymbol = new StartSymbol();
+      AddSymbol(startSymbol);
+      SetSubtreeCount(startSymbol, 1, 1);
+
+      defunSymbol = new Defun();
+      AddSymbol(defunSymbol);
+      SetSubtreeCount(defunSymbol, 1, 1);
+
+      AddAllowedChildSymbol(programRootSymbol, startSymbol, 0);
+      UpdateAdfConstraints();
+    }
+
+    private void UpdateAdfConstraints() {
+      SetSubtreeCount(programRootSymbol, minimumFunctionDefinitions + 1, maximumFunctionDefinitions + 1);
+
+      // ADF branches maxFunctionDefinitions 
+      for (int argumentIndex = 1; argumentIndex < maximumFunctionDefinitions + 1; argumentIndex++) {
+        RemoveAllowedChildSymbol(programRootSymbol, defunSymbol, argumentIndex);
+        AddAllowedChildSymbol(programRootSymbol, defunSymbol, argumentIndex);
+      }
+    }
+
+    protected override sealed void AddSymbol(ISymbol symbol) {
+      base.AddSymbol(symbol);
+      RegisterSymbolEvents(symbol);
+      OnChanged();
+    }
+    protected override sealed void RemoveSymbol(ISymbol symbol) {
+      DeregisterSymbolEvents(symbol);
+      base.RemoveSymbol(symbol);
+      OnChanged();
+    }
+
+    public event EventHandler ReadOnlyChanged;
+    protected virtual void OnReadOnlyChanged() {
+      var handler = ReadOnlyChanged;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+
+    #region IStatefulItem methods
+    void IStatefulItem.InitializeState() {
+      ReadOnly = false;
+    }
+    void IStatefulItem.ClearState() {
+      ReadOnly = false;
+    }
+    #endregion
+
+    #region ISymbolicExpressionGrammar methods
+    void ISymbolicExpressionGrammar.AddSymbol(ISymbol symbol) {
+      if (ReadOnly) throw new InvalidOperationException();
+      AddSymbol(symbol);
+    }
+    void ISymbolicExpressionGrammar.RemoveSymbol(ISymbol symbol) {
+      if (ReadOnly) throw new InvalidOperationException();
+      RemoveSymbol(symbol);
+    }
+
+    void ISymbolicExpressionGrammar.AddAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      if (ReadOnly) throw new InvalidOperationException();
+      base.AddAllowedChildSymbol(parent, child);
+    }
+    void ISymbolicExpressionGrammar.AddAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      if (ReadOnly) throw new InvalidOperationException();
+      base.AddAllowedChildSymbol(parent, child, argumentIndex);
+    }
+    void ISymbolicExpressionGrammar.RemoveAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      if (ReadOnly) throw new InvalidOperationException();
+      base.RemoveAllowedChildSymbol(parent, child);
+    }
+    void ISymbolicExpressionGrammar.RemoveAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      if (ReadOnly) throw new InvalidOperationException();
+      base.RemoveAllowedChildSymbol(parent, child, argumentIndex);
+    }
+
+    void ISymbolicExpressionGrammar.SetSubtreeCount(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount) {
+      if (ReadOnly) throw new InvalidOperationException();
+      base.SetSubtreeCount(symbol, minimumSubtreeCount, maximumSubtreeCount);
+    }
+
+    private bool suppressEvents = false;
+    void ISymbolicExpressionGrammar.StartGrammarManipulation() {
+      suppressEvents = true;
+    }
+    void ISymbolicExpressionGrammar.FinishedGrammarManipulation() {
+      suppressEvents = false;
+      OnChanged();
+    }
+
+    protected override void OnChanged() {
+      if (suppressEvents) return;
+      base.OnChanged();
+    }
+    #endregion
+
+    #region symbol events
+    private void RegisterSymbolEvents(ISymbol symbol) {
+      foreach (var s in symbol.Flatten()) {
+        s.NameChanging += new EventHandler<CancelEventArgs<string>>(Symbol_NameChanging);
+        s.NameChanged += new EventHandler(Symbol_NameChanged);
+
+        var groupSymbol = s as GroupSymbol;
+        if (groupSymbol != null) RegisterGroupSymbolEvents(groupSymbol);
+        else s.Changed += new EventHandler(Symbol_Changed);
+      }
+    }
+    private void DeregisterSymbolEvents(ISymbol symbol) {
+      foreach (var s in symbol.Flatten()) {
+        s.NameChanging -= new EventHandler<CancelEventArgs<string>>(Symbol_NameChanging);
+        s.NameChanged -= new EventHandler(Symbol_NameChanged);
+
+        var groupSymbol = s as GroupSymbol;
+        if (groupSymbol != null) DeregisterGroupSymbolEvents(groupSymbol);
+        else s.Changed -= new EventHandler(Symbol_Changed);
+      }
+    }
+
+    private void RegisterGroupSymbolEvents(GroupSymbol groupSymbol) {
+      groupSymbol.Changed += new EventHandler(GroupSymbol_Changed);
+      groupSymbol.SymbolsCollection.ItemsAdded += new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_ItemsAdded);
+      groupSymbol.SymbolsCollection.ItemsRemoved += new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_ItemsRemoved);
+      groupSymbol.SymbolsCollection.CollectionReset += new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_CollectionReset);
+    }
+    private void DeregisterGroupSymbolEvents(GroupSymbol groupSymbol) {
+      groupSymbol.Changed -= new EventHandler(GroupSymbol_Changed);
+      groupSymbol.SymbolsCollection.ItemsAdded -= new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_ItemsAdded);
+      groupSymbol.SymbolsCollection.ItemsRemoved -= new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_ItemsRemoved);
+      groupSymbol.SymbolsCollection.CollectionReset -= new Collections.CollectionItemsChangedEventHandler<ISymbol>(GroupSymbol_CollectionReset);
+    }
+
+    private void Symbol_Changed(object sender, EventArgs e) {
+      ClearCaches();
+      OnChanged();
+    }
+
+    private void GroupSymbol_Changed(object sender, EventArgs e) {
+      GroupSymbol groupSymbol = (GroupSymbol)sender;
+      foreach (ISymbol symbol in groupSymbol.Flatten())
+        symbol.Enabled = groupSymbol.Enabled;
+
+      ClearCaches();
+      OnChanged();
+    }
+
+    private void Symbol_NameChanging(object sender, CancelEventArgs<string> e) {
+      if (symbols.ContainsKey(e.Value)) e.Cancel = true;
+    }
+    private void Symbol_NameChanged(object sender, EventArgs e) {
+      ISymbol symbol = (ISymbol)sender;
+      string oldName = symbols.Where(x => x.Value == symbol).First().Key;
+      string newName = symbol.Name;
+
+      symbols.Remove(oldName);
+      symbols.Add(newName, symbol);
+
+      var subtreeCount = symbolSubtreeCount[oldName];
+      symbolSubtreeCount.Remove(oldName);
+      symbolSubtreeCount.Add(newName, subtreeCount);
+
+      List<string> allowedChilds;
+      if (allowedChildSymbols.TryGetValue(oldName, out allowedChilds)) {
+        allowedChildSymbols.Remove(oldName);
+        allowedChildSymbols.Add(newName, allowedChilds);
+      }
+
+      for (int i = 0; i < GetMaximumSubtreeCount(symbol); i++) {
+        if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(oldName, i), out allowedChilds)) {
+          allowedChildSymbolsPerIndex.Remove(Tuple.Create(oldName, i));
+          allowedChildSymbolsPerIndex.Add(Tuple.Create(newName, i), allowedChilds);
+        }
+      }
+
+      foreach (var parent in Symbols) {
+        if (allowedChildSymbols.TryGetValue(parent.Name, out allowedChilds))
+          if (allowedChilds.Remove(oldName))
+            allowedChilds.Add(newName);
+
+        for (int i = 0; i < GetMaximumSubtreeCount(parent); i++) {
+          if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(parent.Name, i), out allowedChilds))
+            if (allowedChilds.Remove(oldName)) allowedChilds.Add(newName);
+        }
+      }
+
+      ClearCaches();
+      OnChanged();
+    }
+
+    private void GroupSymbol_ItemsAdded(object sender, CollectionItemsChangedEventArgs<ISymbol> e) {
+      foreach (ISymbol symbol in e.Items)
+        if (!ContainsSymbol(symbol))
+          AddSymbol(symbol);
+      OnChanged();
+    }
+    private void GroupSymbol_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<ISymbol> e) {
+      foreach (ISymbol symbol in e.Items)
+        if (ContainsSymbol(symbol))
+          RemoveSymbol(symbol);
+      OnChanged();
+    }
+    private void GroupSymbol_CollectionReset(object sender, CollectionItemsChangedEventArgs<ISymbol> e) {
+      foreach (ISymbol symbol in e.Items)
+        if (!ContainsSymbol(symbol))
+          AddSymbol(symbol);
+      foreach (ISymbol symbol in e.OldItems)
+        if (ContainsSymbol(symbol))
+          RemoveSymbol(symbol);
+      OnChanged();
+    }
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammarBase.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammarBase.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammarBase.cs	(revision 10269)
@@ -0,0 +1,484 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// The default symbolic expression grammar stores symbols and syntactic constraints for symbols.
+  /// Symbols are treated as equvivalent if they have the same name.
+  /// Syntactic constraints limit the number of allowed sub trees for a node with a symbol and which symbols are allowed 
+  /// in the sub-trees of a symbol (can be specified for each sub-tree index separately).
+  /// </summary>
+  [StorableClass]
+  public abstract class SymbolicExpressionGrammarBase : NamedItem, ISymbolicExpressionGrammarBase {
+
+    #region properties for separation between implementation and persistence
+    [Storable(Name = "Symbols")]
+    private IEnumerable<ISymbol> StorableSymbols {
+      get { return symbols.Values.ToArray(); }
+      set { symbols = value.ToDictionary(sym => sym.Name); }
+    }
+
+    [Storable(Name = "SymbolSubtreeCount")]
+    private IEnumerable<KeyValuePair<ISymbol, Tuple<int, int>>> StorableSymbolSubtreeCount {
+      get { return symbolSubtreeCount.Select(x => new KeyValuePair<ISymbol, Tuple<int, int>>(GetSymbol(x.Key), x.Value)).ToArray(); }
+      set { symbolSubtreeCount = value.ToDictionary(x => x.Key.Name, x => x.Value); }
+    }
+
+    [Storable(Name = "AllowedChildSymbols")]
+    private IEnumerable<KeyValuePair<ISymbol, IEnumerable<ISymbol>>> StorableAllowedChildSymbols {
+      get { return allowedChildSymbols.Select(x => new KeyValuePair<ISymbol, IEnumerable<ISymbol>>(GetSymbol(x.Key), x.Value.Select(GetSymbol).ToArray())).ToArray(); }
+      set { allowedChildSymbols = value.ToDictionary(x => x.Key.Name, x => x.Value.Select(y => y.Name).ToList()); }
+    }
+
+    [Storable(Name = "AllowedChildSymbolsPerIndex")]
+    private IEnumerable<KeyValuePair<Tuple<ISymbol, int>, IEnumerable<ISymbol>>> StorableAllowedChildSymbolsPerIndex {
+      get { return allowedChildSymbolsPerIndex.Select(x => new KeyValuePair<Tuple<ISymbol, int>, IEnumerable<ISymbol>>(Tuple.Create<ISymbol, int>(GetSymbol(x.Key.Item1), x.Key.Item2), x.Value.Select(y => GetSymbol(y)).ToArray())).ToArray(); }
+      set { allowedChildSymbolsPerIndex = value.ToDictionary(x => Tuple.Create(x.Key.Item1.Name, x.Key.Item2), x => x.Value.Select(y => y.Name).ToList()); }
+    }
+    #endregion
+
+    private bool suppressEvents;
+    protected Dictionary<string, ISymbol> symbols;
+    protected Dictionary<string, Tuple<int, int>> symbolSubtreeCount;
+    protected Dictionary<string, List<string>> allowedChildSymbols;
+    protected Dictionary<Tuple<string, int>, List<string>> allowedChildSymbolsPerIndex;
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    [StorableConstructor]
+    protected SymbolicExpressionGrammarBase(bool deserializing)
+      : base(deserializing) {
+      cachedMinExpressionLength = new Dictionary<string, int>();
+      cachedMaxExpressionLength = new Dictionary<Tuple<string, int>, int>();
+      cachedMinExpressionDepth = new Dictionary<string, int>();
+      cachedMaxExpressionDepth = new Dictionary<string, int>();
+
+      cachedIsAllowedChildSymbol = new Dictionary<Tuple<string, string>, bool>();
+      cachedIsAllowedChildSymbolIndex = new Dictionary<Tuple<string, string, int>, bool>();
+
+      suppressEvents = false;
+    }
+
+    protected SymbolicExpressionGrammarBase(SymbolicExpressionGrammarBase original, Cloner cloner)
+      : base(original, cloner) {
+      cachedMinExpressionLength = new Dictionary<string, int>();
+      cachedMaxExpressionLength = new Dictionary<Tuple<string, int>, int>();
+      cachedMinExpressionDepth = new Dictionary<string, int>();
+      cachedMaxExpressionDepth = new Dictionary<string, int>();
+
+      cachedIsAllowedChildSymbol = new Dictionary<Tuple<string, string>, bool>();
+      cachedIsAllowedChildSymbolIndex = new Dictionary<Tuple<string, string, int>, bool>();
+
+      symbols = original.symbols.ToDictionary(x => x.Key, y => cloner.Clone(y.Value));
+      symbolSubtreeCount = new Dictionary<string, Tuple<int, int>>(original.symbolSubtreeCount);
+
+      allowedChildSymbols = new Dictionary<string, List<string>>();
+      foreach (var element in original.allowedChildSymbols)
+        allowedChildSymbols.Add(element.Key, new List<string>(element.Value));
+
+      allowedChildSymbolsPerIndex = new Dictionary<Tuple<string, int>, List<string>>();
+      foreach (var element in original.allowedChildSymbolsPerIndex)
+        allowedChildSymbolsPerIndex.Add(element.Key, new List<string>(element.Value));
+
+      suppressEvents = false;
+    }
+
+    protected SymbolicExpressionGrammarBase(string name, string description)
+      : base(name, description) {
+      cachedMinExpressionLength = new Dictionary<string, int>();
+      cachedMaxExpressionLength = new Dictionary<Tuple<string, int>, int>();
+      cachedMinExpressionDepth = new Dictionary<string, int>();
+      cachedMaxExpressionDepth = new Dictionary<string, int>();
+
+      cachedIsAllowedChildSymbol = new Dictionary<Tuple<string, string>, bool>();
+      cachedIsAllowedChildSymbolIndex = new Dictionary<Tuple<string, string, int>, bool>();
+
+      symbols = new Dictionary<string, ISymbol>();
+      symbolSubtreeCount = new Dictionary<string, Tuple<int, int>>();
+      allowedChildSymbols = new Dictionary<string, List<string>>();
+      allowedChildSymbolsPerIndex = new Dictionary<Tuple<string, int>, List<string>>();
+
+      suppressEvents = false;
+    }
+
+    #region protected grammar manipulation methods
+    protected virtual void AddSymbol(ISymbol symbol) {
+      if (ContainsSymbol(symbol)) throw new ArgumentException("Symbol " + symbol + " is already defined.");
+      foreach (var s in symbol.Flatten()) {
+        symbols.Add(s.Name, s);
+        int maxSubTreeCount = Math.Min(s.MinimumArity + 1, s.MaximumArity);
+        symbolSubtreeCount.Add(s.Name, Tuple.Create(s.MinimumArity, maxSubTreeCount));
+      }
+      ClearCaches();
+    }
+
+    protected virtual void RemoveSymbol(ISymbol symbol) {
+      foreach (var s in symbol.Flatten()) {
+        symbols.Remove(s.Name);
+        allowedChildSymbols.Remove(s.Name);
+        for (int i = 0; i < GetMaximumSubtreeCount(s); i++)
+          allowedChildSymbolsPerIndex.Remove(Tuple.Create(s.Name, i));
+        symbolSubtreeCount.Remove(s.Name);
+
+        foreach (var parent in Symbols) {
+          List<string> allowedChilds;
+          if (allowedChildSymbols.TryGetValue(parent.Name, out allowedChilds))
+            allowedChilds.Remove(s.Name);
+
+          for (int i = 0; i < GetMaximumSubtreeCount(parent); i++) {
+            if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(parent.Name, i), out allowedChilds))
+              allowedChilds.Remove(s.Name);
+          }
+        }
+        suppressEvents = true;
+        foreach (var groupSymbol in Symbols.OfType<GroupSymbol>())
+          groupSymbol.SymbolsCollection.Remove(symbol);
+        suppressEvents = false;
+      }
+      ClearCaches();
+    }
+
+    public virtual ISymbol GetSymbol(string symbolName) {
+      ISymbol symbol;
+      if (symbols.TryGetValue(symbolName, out symbol)) return symbol;
+      return null;
+    }
+
+    protected void AddAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      bool changed = false;
+
+      foreach (ISymbol p in parent.Flatten().Where(p => !(p is GroupSymbol)))
+        changed |= AddAllowedChildSymbolToDictionaries(p, child);
+
+      if (changed) {
+        ClearCaches();
+        OnChanged();
+      }
+    }
+
+    private bool AddAllowedChildSymbolToDictionaries(ISymbol parent, ISymbol child) {
+      List<string> childSymbols;
+      if (!allowedChildSymbols.TryGetValue(parent.Name, out childSymbols)) {
+        childSymbols = new List<string>();
+        allowedChildSymbols.Add(parent.Name, childSymbols);
+      }
+      if (childSymbols.Contains(child.Name)) return false;
+
+      suppressEvents = true;
+      for (int argumentIndex = 0; argumentIndex < GetMaximumSubtreeCount(parent); argumentIndex++)
+        RemoveAllowedChildSymbol(parent, child, argumentIndex);
+      suppressEvents = false;
+
+      childSymbols.Add(child.Name);
+      return true;
+    }
+
+    protected void AddAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      bool changed = false;
+
+      foreach (ISymbol p in parent.Flatten().Where(p => !(p is GroupSymbol)))
+        changed |= AddAllowedChildSymbolToDictionaries(p, child, argumentIndex);
+
+      if (changed) {
+        ClearCaches();
+        OnChanged();
+      }
+    }
+
+
+    private bool AddAllowedChildSymbolToDictionaries(ISymbol parent, ISymbol child, int argumentIndex) {
+      List<string> childSymbols;
+      if (!allowedChildSymbols.TryGetValue(parent.Name, out childSymbols)) {
+        childSymbols = new List<string>();
+        allowedChildSymbols.Add(parent.Name, childSymbols);
+      }
+      if (childSymbols.Contains(child.Name)) return false;
+
+
+      var key = Tuple.Create(parent.Name, argumentIndex);
+      if (!allowedChildSymbolsPerIndex.TryGetValue(key, out childSymbols)) {
+        childSymbols = new List<string>();
+        allowedChildSymbolsPerIndex.Add(key, childSymbols);
+      }
+
+      if (childSymbols.Contains(child.Name)) return false;
+
+      childSymbols.Add(child.Name);
+      return true;
+    }
+
+    protected void RemoveAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      bool changed = false;
+      List<string> childSymbols;
+      if (allowedChildSymbols.TryGetValue(child.Name, out childSymbols)) {
+        changed |= childSymbols.Remove(child.Name);
+      }
+
+      for (int argumentIndex = 0; argumentIndex < GetMaximumSubtreeCount(parent); argumentIndex++) {
+        var key = Tuple.Create(parent.Name, argumentIndex);
+        if (allowedChildSymbolsPerIndex.TryGetValue(key, out childSymbols))
+          changed |= childSymbols.Remove(child.Name);
+      }
+
+      if (changed) {
+        ClearCaches();
+        OnChanged();
+      }
+    }
+
+    protected void RemoveAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      bool changed = false;
+
+      suppressEvents = true;
+      List<string> childSymbols;
+      if (allowedChildSymbols.TryGetValue(parent.Name, out childSymbols)) {
+        if (childSymbols.Remove(child.Name)) {
+          for (int i = 0; i < GetMaximumSubtreeCount(parent); i++) {
+            if (i != argumentIndex) AddAllowedChildSymbol(parent, child, i);
+          }
+          changed = true;
+        }
+      }
+      suppressEvents = false;
+
+      var key = Tuple.Create(parent.Name, argumentIndex);
+      if (allowedChildSymbolsPerIndex.TryGetValue(key, out childSymbols))
+        changed |= childSymbols.Remove(child.Name);
+
+      if (changed) {
+        ClearCaches();
+        OnChanged();
+      }
+    }
+
+    protected void SetSubtreeCount(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount) {
+      var symbols = symbol.Flatten().Where(s => !(s is GroupSymbol));
+      if (symbols.Any(s => s.MinimumArity > minimumSubtreeCount)) throw new ArgumentException("Invalid minimum subtree count " + minimumSubtreeCount + " for " + symbol);
+      if (symbols.Any(s => s.MaximumArity < maximumSubtreeCount)) throw new ArgumentException("Invalid maximum subtree count " + maximumSubtreeCount + " for " + symbol);
+
+      foreach (ISymbol s in symbols)
+        SetSubTreeCountInDictionaries(s, minimumSubtreeCount, maximumSubtreeCount);
+
+      ClearCaches();
+      OnChanged();
+    }
+
+    private void SetSubTreeCountInDictionaries(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount) {
+      for (int i = maximumSubtreeCount; i < GetMaximumSubtreeCount(symbol); i++) {
+        var key = Tuple.Create(symbol.Name, i);
+        allowedChildSymbolsPerIndex.Remove(key);
+      }
+
+      symbolSubtreeCount[symbol.Name] = Tuple.Create(minimumSubtreeCount, maximumSubtreeCount);
+    }
+    #endregion
+
+    public virtual IEnumerable<ISymbol> Symbols {
+      get { return symbols.Values; }
+    }
+    public virtual IEnumerable<ISymbol> AllowedSymbols {
+      get { foreach (var s in Symbols) if (s.Enabled) yield return s; }
+    }
+    public virtual bool ContainsSymbol(ISymbol symbol) {
+      return symbols.ContainsKey(symbol.Name);
+    }
+
+    private readonly Dictionary<Tuple<string, string>, bool> cachedIsAllowedChildSymbol;
+    public virtual bool IsAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      if (allowedChildSymbols.Count == 0) return false;
+      if (!child.Enabled) return false;
+
+      bool result;
+      var key = Tuple.Create(parent.Name, child.Name);
+      if (cachedIsAllowedChildSymbol.TryGetValue(key, out result)) return result;
+
+      List<string> temp;
+      if (allowedChildSymbols.TryGetValue(parent.Name, out temp)) {
+        //if (temp.Contains(child.Name)) return true;
+        if (temp.SelectMany(s => GetSymbol(s).Flatten()).Any(s => s.Name == child.Name)) {
+          cachedIsAllowedChildSymbol.Add(key, true);
+          return true;
+        }
+      }
+      cachedIsAllowedChildSymbol.Add(key, false);
+      return false;
+    }
+
+    private readonly Dictionary<Tuple<string, string, int>, bool> cachedIsAllowedChildSymbolIndex;
+    public virtual bool IsAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      if (!child.Enabled) return false;
+      if (IsAllowedChildSymbol(parent, child)) return true;
+      if (allowedChildSymbolsPerIndex.Count == 0) return false;
+
+      bool result;
+      var key = Tuple.Create(parent.Name, child.Name, argumentIndex);
+      if (cachedIsAllowedChildSymbolIndex.TryGetValue(key, out result)) return result;
+
+      List<string> temp;
+      if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(parent.Name, argumentIndex), out temp)) {
+        if (temp.SelectMany(s => GetSymbol(s).Flatten()).Any(s => s.Name == child.Name)) {
+          cachedIsAllowedChildSymbolIndex.Add(key, true);
+          return true;
+        }
+      }
+      cachedIsAllowedChildSymbolIndex.Add(key, false);
+      return false;
+    }
+
+    public IEnumerable<ISymbol> GetAllowedChildSymbols(ISymbol parent) {
+      foreach (ISymbol child in AllowedSymbols) {
+        if (IsAllowedChildSymbol(parent, child)) yield return child;
+      }
+    }
+
+    public IEnumerable<ISymbol> GetAllowedChildSymbols(ISymbol parent, int argumentIndex) {
+      foreach (ISymbol child in AllowedSymbols) {
+        if (IsAllowedChildSymbol(parent, child, argumentIndex)) yield return child;
+      }
+    }
+
+    public virtual int GetMinimumSubtreeCount(ISymbol symbol) {
+      return symbolSubtreeCount[symbol.Name].Item1;
+    }
+    public virtual int GetMaximumSubtreeCount(ISymbol symbol) {
+      return symbolSubtreeCount[symbol.Name].Item2;
+    }
+
+    protected void ClearCaches() {
+      cachedMinExpressionLength.Clear();
+      cachedMaxExpressionLength.Clear();
+      cachedMinExpressionDepth.Clear();
+      cachedMaxExpressionDepth.Clear();
+
+      cachedIsAllowedChildSymbol.Clear();
+      cachedIsAllowedChildSymbolIndex.Clear();
+    }
+
+    private readonly Dictionary<string, int> cachedMinExpressionLength;
+    public int GetMinimumExpressionLength(ISymbol symbol) {
+      int res;
+      if (cachedMinExpressionLength.TryGetValue(symbol.Name, out res))
+        return res;
+
+      res = GetMinimumExpressionLengthRec(symbol);
+      foreach (var entry in cachedMinExpressionLength.Where(e => e.Value >= int.MaxValue).ToList()) {
+        if (entry.Key != symbol.Name) cachedMinExpressionLength.Remove(entry.Key);
+      }
+      return res;
+    }
+
+    private int GetMinimumExpressionLengthRec(ISymbol symbol) {
+      int temp;
+      if (!cachedMinExpressionLength.TryGetValue(symbol.Name, out temp)) {
+        cachedMinExpressionLength[symbol.Name] = int.MaxValue; // prevent infinite recursion
+        long sumOfMinExpressionLengths = 1 + (from argIndex in Enumerable.Range(0, GetMinimumSubtreeCount(symbol))
+                                              let minForSlot = (long)(from s in GetAllowedChildSymbols(symbol, argIndex)
+                                                                      where s.InitialFrequency > 0.0
+                                                                      select GetMinimumExpressionLengthRec(s)).DefaultIfEmpty(0).Min()
+                                              select minForSlot).DefaultIfEmpty(0).Sum();
+
+        cachedMinExpressionLength[symbol.Name] = (int)Math.Min(sumOfMinExpressionLengths, int.MaxValue);
+        return cachedMinExpressionLength[symbol.Name];
+      }
+      return temp;
+    }
+
+    private readonly Dictionary<Tuple<string, int>, int> cachedMaxExpressionLength;
+    public int GetMaximumExpressionLength(ISymbol symbol, int maxDepth) {
+      int temp;
+      var key = Tuple.Create(symbol.Name, maxDepth);
+      if (!cachedMaxExpressionLength.TryGetValue(key, out temp)) {
+        cachedMaxExpressionLength[key] = int.MaxValue; // prevent infinite recursion
+        long sumOfMaxTrees = 1 + (from argIndex in Enumerable.Range(0, GetMaximumSubtreeCount(symbol))
+                                  let maxForSlot = (long)(from s in GetAllowedChildSymbols(symbol, argIndex)
+                                                          where s.InitialFrequency > 0.0
+                                                          where GetMinimumExpressionDepth(s) < maxDepth
+                                                          select GetMaximumExpressionLength(s, maxDepth - 1)).DefaultIfEmpty(0).Max()
+                                  select maxForSlot).DefaultIfEmpty(0).Sum();
+        cachedMaxExpressionLength[key] = (int)Math.Min(sumOfMaxTrees, int.MaxValue);
+        return cachedMaxExpressionLength[key];
+      }
+      return temp;
+    }
+
+    private readonly Dictionary<string, int> cachedMinExpressionDepth;
+    public int GetMinimumExpressionDepth(ISymbol symbol) {
+      int res;
+      if (cachedMinExpressionDepth.TryGetValue(symbol.Name, out res))
+        return res;
+
+      res = GetMinimumExpressionDepthRec(symbol);
+      foreach (var entry in cachedMinExpressionDepth.Where(e => e.Value >= int.MaxValue).ToList()) {
+        if (entry.Key != symbol.Name) cachedMinExpressionDepth.Remove(entry.Key);
+      }
+      return res;
+    }
+    private int GetMinimumExpressionDepthRec(ISymbol symbol) {
+      int temp;
+      if (!cachedMinExpressionDepth.TryGetValue(symbol.Name, out temp)) {
+        cachedMinExpressionDepth[symbol.Name] = int.MaxValue; // prevent infinite recursion
+        long minDepth = 1 + (from argIndex in Enumerable.Range(0, GetMinimumSubtreeCount(symbol))
+                             let minForSlot = (long)(from s in GetAllowedChildSymbols(symbol, argIndex)
+                                                     where s.InitialFrequency > 0.0
+                                                     select GetMinimumExpressionDepthRec(s)).DefaultIfEmpty(0).Min()
+                             select minForSlot).DefaultIfEmpty(0).Max();
+        cachedMinExpressionDepth[symbol.Name] = (int)Math.Min(minDepth, int.MaxValue);
+        return cachedMinExpressionDepth[symbol.Name];
+      }
+      return temp;
+    }
+
+    private readonly Dictionary<string, int> cachedMaxExpressionDepth;
+    public int GetMaximumExpressionDepth(ISymbol symbol) {
+      int temp;
+      if (!cachedMaxExpressionDepth.TryGetValue(symbol.Name, out temp)) {
+        cachedMaxExpressionDepth[symbol.Name] = int.MaxValue;
+        long maxDepth = 1 + (from argIndex in Enumerable.Range(0, GetMaximumSubtreeCount(symbol))
+                             let maxForSlot = (long)(from s in GetAllowedChildSymbols(symbol, argIndex)
+                                                     where s.InitialFrequency > 0.0
+                                                     select GetMaximumExpressionDepth(s)).DefaultIfEmpty(0).Max()
+                             select maxForSlot).DefaultIfEmpty(0).Max();
+        cachedMaxExpressionDepth[symbol.Name] = (int)Math.Min(maxDepth, int.MaxValue);
+        return cachedMaxExpressionDepth[symbol.Name];
+      }
+      return temp;
+    }
+
+    public event EventHandler Changed;
+    protected virtual void OnChanged() {
+      if (suppressEvents) return;
+      var handler = Changed;
+      if (handler != null) Changed(this, EventArgs.Empty);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTree.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTree.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTree.cs	(revision 10269)
@@ -0,0 +1,99 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  [Item("SymbolicExpressionTree", "Represents a symbolic expression tree.")]
+  public class SymbolicExpressionTree : Item, ISymbolicExpressionTree {
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Function; }
+    }
+    [Storable]
+    private ISymbolicExpressionTreeNode root;
+    public ISymbolicExpressionTreeNode Root {
+      get { return root; }
+      set {
+        if (value == null) throw new ArgumentNullException();
+        else if (value != root) {
+          root = value;
+          OnToStringChanged();
+        }
+      }
+    }
+
+    public int Length {
+      get {
+        if (root == null)
+          return 0;
+        return root.GetLength();
+      }
+    }
+
+    public int Depth {
+      get {
+        if (root == null)
+          return 0;
+        return root.GetDepth();
+      }
+    }
+
+    [StorableConstructor]
+    protected SymbolicExpressionTree(bool deserializing) : base(deserializing) { }
+    protected SymbolicExpressionTree(SymbolicExpressionTree original, Cloner cloner)
+      : base(original, cloner) {
+      root = cloner.Clone(original.Root);
+    }
+    public SymbolicExpressionTree() : base() { }
+    public SymbolicExpressionTree(ISymbolicExpressionTreeNode root)
+      : base() {
+      this.Root = root;
+    }
+
+    public IEnumerable<ISymbolicExpressionTreeNode> IterateNodesBreadth() {
+      if (root == null)
+        return Enumerable.Empty<SymbolicExpressionTreeNode>();
+      return root.IterateNodesBreadth();
+    }
+
+    public IEnumerable<ISymbolicExpressionTreeNode> IterateNodesPrefix() {
+      if (root == null)
+        return Enumerable.Empty<SymbolicExpressionTreeNode>();
+      return root.IterateNodesPrefix();
+    }
+    public IEnumerable<ISymbolicExpressionTreeNode> IterateNodesPostfix() {
+      if (root == null)
+        return Enumerable.Empty<SymbolicExpressionTreeNode>();
+      return root.IterateNodesPostfix();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicExpressionTree(this, cloner);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeGrammar.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeGrammar.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeGrammar.cs	(revision 10269)
@@ -0,0 +1,137 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  internal sealed class SymbolicExpressionTreeGrammar : SymbolicExpressionGrammarBase, ISymbolicExpressionTreeGrammar {
+    [StorableConstructor]
+    private SymbolicExpressionTreeGrammar(bool deserializing) : base(deserializing) { }
+    private SymbolicExpressionTreeGrammar(SymbolicExpressionTreeGrammar original, Cloner cloner)
+      : base(original, cloner) {
+      this.grammar = original.grammar;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      foreach (ISymbol symbol in base.Symbols)
+        if (!cloner.ClonedObjectRegistered(symbol))
+          cloner.RegisterClonedObject(symbol, symbol);
+      return new SymbolicExpressionTreeGrammar(this, cloner);
+    }
+
+    [Storable]
+    private ISymbolicExpressionGrammar grammar;
+    public SymbolicExpressionTreeGrammar(ISymbolicExpressionGrammar grammar)
+      : base("SymbolicExpressionTreeGrammar", "A grammar that is used held by symbolic expression trees and allows extensions to the wrapped grammar.") {
+      if (grammar == null) throw new ArgumentNullException();
+      this.grammar = grammar;
+    }
+
+    public override IEnumerable<ISymbol> Symbols {
+      get {
+        foreach (var s in grammar.Symbols) yield return s;
+        foreach (var s in base.symbols.Values) yield return s;
+      }
+    }
+    public override IEnumerable<ISymbol> AllowedSymbols {
+      get { return base.AllowedSymbols; }
+    }
+    public IEnumerable<ISymbol> ModifyableSymbols {
+      get { return base.symbols.Values; }
+    }
+    public bool IsModifyableSymbol(ISymbol symbol) {
+      return base.symbols.ContainsKey(symbol.Name);
+    }
+
+    public override bool ContainsSymbol(ISymbol symbol) {
+      return grammar.ContainsSymbol(symbol) || base.ContainsSymbol(symbol);
+    }
+    public override ISymbol GetSymbol(string symbolName) {
+      var symbol = grammar.GetSymbol(symbolName);
+      if (symbol != null) return symbol;
+      symbol = base.GetSymbol(symbolName);
+      if (symbol != null) return symbol;
+      throw new ArgumentException();
+    }
+
+    public override bool IsAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      return grammar.IsAllowedChildSymbol(parent, child) || base.IsAllowedChildSymbol(parent, child);
+    }
+    public override bool IsAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      return grammar.IsAllowedChildSymbol(parent, child, argumentIndex) || base.IsAllowedChildSymbol(parent, child, argumentIndex);
+    }
+
+    public override int GetMinimumSubtreeCount(ISymbol symbol) {
+      if (grammar.ContainsSymbol(symbol)) return grammar.GetMinimumSubtreeCount(symbol);
+      return base.GetMinimumSubtreeCount(symbol);
+    }
+    public override int GetMaximumSubtreeCount(ISymbol symbol) {
+      if (grammar.ContainsSymbol(symbol)) return grammar.GetMaximumSubtreeCount(symbol);
+      return base.GetMaximumSubtreeCount(symbol);
+    }
+
+    void ISymbolicExpressionTreeGrammar.AddSymbol(ISymbol symbol) {
+      base.AddSymbol(symbol);
+    }
+    void ISymbolicExpressionTreeGrammar.RemoveSymbol(ISymbol symbol) {
+      if (!IsModifyableSymbol(symbol)) throw new InvalidOperationException();
+      base.RemoveSymbol(symbol);
+    }
+    void ISymbolicExpressionTreeGrammar.AddAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      base.AddAllowedChildSymbol(parent, child);
+    }
+    void ISymbolicExpressionTreeGrammar.AddAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      base.AddAllowedChildSymbol(parent, child, argumentIndex);
+    }
+    void ISymbolicExpressionTreeGrammar.RemoveAllowedChildSymbol(ISymbol parent, ISymbol child) {
+      base.RemoveAllowedChildSymbol(parent, child);
+    }
+    void ISymbolicExpressionTreeGrammar.RemoveAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
+      base.RemoveAllowedChildSymbol(parent, child, argumentIndex);
+    }
+
+    void ISymbolicExpressionTreeGrammar.SetSubtreeCount(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount) {
+      if (!IsModifyableSymbol(symbol)) throw new InvalidOperationException();
+      base.SetSubtreeCount(symbol, minimumSubtreeCount, maximumSubtreeCount);
+    }
+
+    int ISymbolicExpressionGrammarBase.GetMinimumExpressionDepth(ISymbol symbol) {
+      if (symbols.Count == 0) return grammar.GetMinimumExpressionDepth(symbol);
+      else return base.GetMinimumExpressionDepth(symbol);
+    }
+    int ISymbolicExpressionGrammarBase.GetMaximumExpressionDepth(ISymbol symbol) {
+      if (symbols.Count == 0) return grammar.GetMaximumExpressionDepth(symbol);
+      else return base.GetMaximumExpressionDepth(symbol);
+    }
+    int ISymbolicExpressionGrammarBase.GetMinimumExpressionLength(ISymbol symbol) {
+      if (symbols.Count == 0) return grammar.GetMinimumExpressionLength(symbol);
+      else return base.GetMinimumExpressionLength(symbol);
+    }
+    int ISymbolicExpressionGrammarBase.GetMaximumExpressionLength(ISymbol symbol, int maxDepth) {
+      if (symbols.Count == 0) return grammar.GetMaximumExpressionLength(symbol, maxDepth);
+      else return base.GetMaximumExpressionLength(symbol, maxDepth);
+    }
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs	(revision 10269)
@@ -0,0 +1,228 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  public class SymbolicExpressionTreeNode : DeepCloneable, ISymbolicExpressionTreeNode {
+    [Storable]
+    private IList<ISymbolicExpressionTreeNode> subtrees;
+    [Storable]
+    private ISymbol symbol;
+
+    // cached values to prevent unnecessary tree iterations
+    private ushort length;
+    private ushort depth;
+
+    public ISymbol Symbol {
+      get { return symbol; }
+      protected set { symbol = value; }
+    }
+
+    // parent relation is not persisted or cloned (will be set on AddSubtree or RemoveSubtree)
+    private ISymbolicExpressionTreeNode parent;
+    public ISymbolicExpressionTreeNode Parent {
+      get { return parent; }
+      set { parent = value; }
+    }
+
+    [StorableConstructor]
+    protected SymbolicExpressionTreeNode(bool deserializing) { }
+    protected SymbolicExpressionTreeNode(SymbolicExpressionTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      symbol = original.symbol; // symbols are reused
+      length = original.length;
+      depth = original.depth;
+      if (original.subtrees != null) {
+        subtrees = new List<ISymbolicExpressionTreeNode>(original.subtrees.Count);
+        foreach (var subtree in original.subtrees) {
+          var clonedSubtree = cloner.Clone(subtree);
+          subtrees.Add(clonedSubtree);
+          clonedSubtree.Parent = this;
+        }
+      }
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicExpressionTreeNode(this, cloner);
+    }
+
+    internal SymbolicExpressionTreeNode()
+      : base() {
+      // don't allocate subtrees list here!
+      // because we don't want to allocate it in terminal nodes
+    }
+
+    public SymbolicExpressionTreeNode(ISymbol symbol)
+      : base() {
+      subtrees = new List<ISymbolicExpressionTreeNode>(3);
+      this.symbol = symbol;
+    }
+
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (subtrees != null) {
+        foreach (var subtree in subtrees)
+          subtree.Parent = this;
+      }
+    }
+
+    public virtual bool HasLocalParameters {
+      get { return false; }
+    }
+
+    public virtual IEnumerable<ISymbolicExpressionTreeNode> Subtrees {
+      get { return subtrees; }
+    }
+
+    public virtual ISymbolicExpressionTreeGrammar Grammar {
+      get { return parent.Grammar; }
+    }
+
+    public int GetLength() {
+      if (length > 0) return length;
+      else {
+        length = 1;
+        if (subtrees != null) {
+          for (int i = 0; i < subtrees.Count; i++) {
+            checked { length += (ushort)subtrees[i].GetLength(); }
+          }
+        }
+        return length;
+      }
+    }
+
+    public int GetDepth() {
+      if (depth > 0) return depth;
+      else {
+        if (subtrees != null) {
+          for (int i = 0; i < subtrees.Count; i++) depth = Math.Max(depth, (ushort)subtrees[i].GetDepth());
+        }
+        depth++;
+        return depth;
+      }
+    }
+
+    public int GetBranchLevel(ISymbolicExpressionTreeNode child) {
+      return GetBranchLevel(this, child);
+    }
+
+    private static int GetBranchLevel(ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode point) {
+      if (root == point)
+        return 0;
+      foreach (var subtree in root.Subtrees) {
+        int branchLevel = GetBranchLevel(subtree, point);
+        if (branchLevel < int.MaxValue)
+          return 1 + branchLevel;
+      }
+      return int.MaxValue;
+    }
+
+    public virtual void ResetLocalParameters(IRandom random) { }
+    public virtual void ShakeLocalParameters(IRandom random, double shakingFactor) { }
+
+    public int SubtreeCount {
+      get {
+        if (subtrees == null) return 0;
+        return subtrees.Count;
+      }
+    }
+
+    public virtual ISymbolicExpressionTreeNode GetSubtree(int index) {
+      return subtrees[index];
+    }
+    public virtual int IndexOfSubtree(ISymbolicExpressionTreeNode tree) {
+      return subtrees.IndexOf(tree);
+    }
+    public virtual void AddSubtree(ISymbolicExpressionTreeNode tree) {
+      subtrees.Add(tree);
+      tree.Parent = this;
+      ResetCachedValues();
+    }
+    public virtual void InsertSubtree(int index, ISymbolicExpressionTreeNode tree) {
+      subtrees.Insert(index, tree);
+      tree.Parent = this;
+      ResetCachedValues();
+    }
+    public virtual void RemoveSubtree(int index) {
+      subtrees[index].Parent = null;
+      subtrees.RemoveAt(index);
+      ResetCachedValues();
+    }
+
+    public IEnumerable<ISymbolicExpressionTreeNode> IterateNodesBreadth() {
+      var list = new List<ISymbolicExpressionTreeNode>() { this };
+      int i = 0;
+      while (i != list.Count) {
+        for (int j = 0; j != list[i].SubtreeCount; ++j)
+          list.Add(list[i].GetSubtree(j));
+        ++i;
+      }
+      return list;
+    }
+
+    public IEnumerable<ISymbolicExpressionTreeNode> IterateNodesPrefix() {
+      List<ISymbolicExpressionTreeNode> list = new List<ISymbolicExpressionTreeNode>();
+      ForEachNodePrefix((n) => list.Add(n));
+      return list;
+    }
+
+    public void ForEachNodePrefix(Action<ISymbolicExpressionTreeNode> a) {
+      a(this);
+      if (Subtrees != null) {
+        foreach (var subtree in Subtrees) {
+          subtree.ForEachNodePrefix(a);
+        }
+      }
+    }
+
+    public IEnumerable<ISymbolicExpressionTreeNode> IterateNodesPostfix() {
+      List<ISymbolicExpressionTreeNode> list = new List<ISymbolicExpressionTreeNode>();
+      ForEachNodePostfix((n) => list.Add(n));
+      return list;
+    }
+
+    public void ForEachNodePostfix(Action<ISymbolicExpressionTreeNode> a) {
+      if (Subtrees != null) {
+        foreach (var subtree in Subtrees) {
+          subtree.ForEachNodePostfix(a);
+        }
+      }
+      a(this);
+    }
+
+    public override string ToString() {
+      if (Symbol != null) return Symbol.Name;
+      return "SymbolicExpressionTreeNode";
+    }
+
+    private void ResetCachedValues() {
+      length = 0; depth = 0;
+      SymbolicExpressionTreeNode parentNode = parent as SymbolicExpressionTreeNode;
+      if (parentNode != null) parentNode.ResetCachedValues();
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeOperator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeOperator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeOperator.cs	(revision 10269)
@@ -0,0 +1,63 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using 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 for symbolic expression trees.
+  /// </summary>
+  [Item("SymbolicExpressionTreeOperator", "A base class for operators for symbolic expression trees.")]
+  [StorableClass]
+  public abstract class SymbolicExpressionTreeOperator : SingleSuccessorOperator, IStochasticOperator, ISymbolicExpressionTreeOperator {
+    private const string RandomParameterName = "Random";
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+
+    #region Parameter Properties
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters[RandomParameterName]; }
+    }
+    #endregion
+
+    #region Properties
+    public IRandom Random {
+      get { return RandomParameter.ActualValue; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicExpressionTreeOperator(bool deserializing) : base(deserializing) { }
+    protected SymbolicExpressionTreeOperator(SymbolicExpressionTreeOperator original, Cloner cloner) : base(original, cloner) { }
+    protected SymbolicExpressionTreeOperator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>(RandomParameterName, "The pseudo random number generator which should be used for symbolic expression tree operators."));
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTerminalNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTerminalNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTerminalNode.cs	(revision 10269)
@@ -0,0 +1,62 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  public abstract class SymbolicExpressionTreeTerminalNode : SymbolicExpressionTreeNode {
+    public override IEnumerable<ISymbolicExpressionTreeNode> Subtrees {
+      get { return Enumerable.Empty<ISymbolicExpressionTreeNode>(); }
+    }
+
+    [StorableConstructor]
+    protected SymbolicExpressionTreeTerminalNode(bool deserializing) : base(deserializing) { }
+    protected SymbolicExpressionTreeTerminalNode(SymbolicExpressionTreeTerminalNode original, Cloner cloner) : base(original, cloner) { }
+    protected SymbolicExpressionTreeTerminalNode() : base() { }
+
+    protected SymbolicExpressionTreeTerminalNode(ISymbol symbol)
+      : base() {
+      // symbols are reused
+      this.Symbol = symbol;
+    }
+
+    public override int IndexOfSubtree(ISymbolicExpressionTreeNode tree) {
+      return -1;
+    }
+    public override ISymbolicExpressionTreeNode GetSubtree(int index) {
+      throw new NotSupportedException();
+    }
+    public override void AddSubtree(ISymbolicExpressionTreeNode tree) {
+      throw new NotSupportedException();
+    }
+    public override void InsertSubtree(int index, ISymbolicExpressionTreeNode tree) {
+      throw new NotSupportedException();
+    }
+    public override void RemoveSubtree(int index) {
+      throw new NotSupportedException();
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTopLevelNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTopLevelNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTopLevelNode.cs	(revision 10269)
@@ -0,0 +1,51 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  public class SymbolicExpressionTreeTopLevelNode : SymbolicExpressionTreeNode {
+    [Storable]
+    private ISymbolicExpressionTreeGrammar grammar;
+    public override ISymbolicExpressionTreeGrammar Grammar {
+      get { return grammar; }
+    }
+    public void SetGrammar(ISymbolicExpressionTreeGrammar grammar) {
+      this.grammar = grammar;
+    }
+
+    [StorableConstructor]
+    protected SymbolicExpressionTreeTopLevelNode(bool deserializing) : base(deserializing) { }
+    protected SymbolicExpressionTreeTopLevelNode(SymbolicExpressionTreeTopLevelNode original, Cloner cloner)
+      : base(original, cloner) {
+      grammar = cloner.Clone(original.Grammar);
+    }
+    public SymbolicExpressionTreeTopLevelNode() : base() { }
+    public SymbolicExpressionTreeTopLevelNode(ISymbol symbol) : base(symbol) { }
+
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicExpressionTreeTopLevelNode(this, cloner);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Argument.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Argument.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Argument.cs	(revision 10269)
@@ -0,0 +1,71 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Symbol for function arguments
+  /// </summary>
+  [StorableClass]
+  [Item(Argument.ArgumentName, Argument.ArgumentDescription)]
+  public sealed class Argument : Symbol, IReadOnlySymbol {
+    public const string ArgumentName = "Argument";
+    public const string ArgumentDescription = "Symbol that represents a function argument.";
+    private const int minimumArity = 0;
+    private const int maximumArity = 0;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [Storable]
+    private int argumentIndex;
+    public int ArgumentIndex {
+      get { return argumentIndex; }
+    }
+
+    [StorableConstructor]
+    private Argument(bool deserializing) : base(deserializing) { }
+    private Argument(Argument original, Cloner cloner)
+      : base(original, cloner) {
+      argumentIndex = original.argumentIndex;
+      name = "ARG" + original.argumentIndex;
+    }
+    public Argument(int argumentIndex)
+      : base("ARG" + argumentIndex, Argument.ArgumentDescription) {
+      this.argumentIndex = argumentIndex;
+      this.name = "ARG" + argumentIndex;
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new ArgumentTreeNode(this);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Argument(this, cloner);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/ArgumentTreeNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/ArgumentTreeNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/ArgumentTreeNode.cs	(revision 10269)
@@ -0,0 +1,46 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  public sealed class ArgumentTreeNode : SymbolicExpressionTreeTerminalNode {
+    internal new Argument Symbol {
+      get { return (Argument)base.Symbol; }
+      set {
+        if (value == null) throw new ArgumentNullException();
+        if (!(value is Argument)) throw new ArgumentException();
+        base.Symbol = value;
+      }
+    }
+
+    [StorableConstructor]
+    private ArgumentTreeNode(bool deserializing) : base(deserializing) { }
+    private ArgumentTreeNode(ArgumentTreeNode original, Cloner cloner) : base(original, cloner) { }
+    public ArgumentTreeNode(Argument argSymbol) : base(argSymbol) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ArgumentTreeNode(this, cloner);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Defun.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Defun.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Defun.cs	(revision 10269)
@@ -0,0 +1,57 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Symbol for function defining branches
+  /// </summary>
+  [StorableClass]
+  [Item(Defun.DefunName, Defun.DefunDescription)]
+  public sealed class Defun : Symbol, IReadOnlySymbol {
+    public const string DefunName = "Defun";
+    public const string DefunDescription = "Symbol that represents a function defining node.";
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Defun(bool deserializing) : base(deserializing) { }
+    private Defun(Defun original, Cloner cloner) : base(original, cloner) { }
+    public Defun() : base(Defun.DefunName, Defun.DefunDescription) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Defun(this, cloner);
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new DefunTreeNode(this);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/DefunTreeNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/DefunTreeNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/DefunTreeNode.cs	(revision 10269)
@@ -0,0 +1,58 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  public sealed class DefunTreeNode : SymbolicExpressionTreeTopLevelNode {
+    private int numberOfArguments;
+    [Storable]
+    public int NumberOfArguments {
+      get { return numberOfArguments; }
+      set { numberOfArguments = value; }
+    }
+    private string functionName;
+    [Storable]
+    public string FunctionName {
+      get { return functionName; }
+      set { this.functionName = value; }
+    }
+
+    [StorableConstructor]
+    private DefunTreeNode(bool deserializing) : base(deserializing) { }
+    private DefunTreeNode(DefunTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      functionName = original.functionName;
+      numberOfArguments = original.numberOfArguments;
+    }
+
+    public DefunTreeNode(Defun defunSymbol) : base(defunSymbol) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new DefunTreeNode(this, cloner);
+    }
+
+    public override string ToString() {
+      return FunctionName;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/GroupSymbol.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/GroupSymbol.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/GroupSymbol.cs	(revision 10269)
@@ -0,0 +1,72 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  public sealed class GroupSymbol : Symbol {
+    private const int minimumArity = 0;
+    private const int maximumArity = 0;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    private ObservableSet<ISymbol> symbols;
+    public IObservableSet<ISymbol> SymbolsCollection {
+      get { return symbols; }
+    }
+    [Storable]
+    public IEnumerable<ISymbol> Symbols {
+      get { return symbols; }
+      private set { symbols = new ObservableSet<ISymbol>(value); }
+    }
+
+    [StorableConstructor]
+    private GroupSymbol(bool deserializing) : base(deserializing) { }
+    private GroupSymbol(GroupSymbol original, Cloner cloner)
+      : base(original, cloner) {
+      symbols = new ObservableSet<ISymbol>(original.Symbols.Select(s => cloner.Clone(s)));
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GroupSymbol(this, cloner);
+    }
+
+    public GroupSymbol() : this("Group Symbol", Enumerable.Empty<ISymbol>()) { }
+    public GroupSymbol(string name, IEnumerable<ISymbol> symbols)
+      : base(name, "A symbol which groups other symbols") {
+      this.symbols = new ObservableSet<ISymbol>(symbols);
+      InitialFrequency = 0.0;
+    }
+
+    public override IEnumerable<ISymbol> Flatten() {
+      return base.Flatten().Union(symbols.SelectMany(s => s.Flatten()));
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/InvokeFunction.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/InvokeFunction.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/InvokeFunction.cs	(revision 10269)
@@ -0,0 +1,70 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Symbol for invoking automatically defined functions
+  /// </summary>
+  [StorableClass]
+  [Item(InvokeFunction.InvokeFunctionName, InvokeFunction.InvokeFunctionDescription)]
+  public sealed class InvokeFunction : Symbol, IReadOnlySymbol {
+    public const string InvokeFunctionName = "InvokeFunction";
+    public const string InvokeFunctionDescription = "Symbol that the invocation of another function.";
+    private const int minimumArity = 0;
+    private const int maximumArity = byte.MaxValue;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [Storable]
+    private string functionName;
+    public string FunctionName {
+      get { return functionName; }
+    }
+
+    [StorableConstructor]
+    private InvokeFunction(bool deserializing) : base(deserializing) { }
+    private InvokeFunction(InvokeFunction original, Cloner cloner)
+      : base(original, cloner) {
+      functionName = original.functionName;
+      name = "Invoke: " + original.functionName;
+    }
+    public InvokeFunction(string functionName)
+      : base("Invoke: " + functionName, InvokeFunction.InvokeFunctionDescription) {
+      this.functionName = functionName;
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new InvokeFunctionTreeNode(this);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new InvokeFunction(this, cloner);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/InvokeFunctionTreeNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/InvokeFunctionTreeNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/InvokeFunctionTreeNode.cs	(revision 10269)
@@ -0,0 +1,46 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  public sealed class InvokeFunctionTreeNode : SymbolicExpressionTreeNode {
+    public new InvokeFunction Symbol {
+      get { return (InvokeFunction)base.Symbol; }
+      internal set {
+        if (value == null) throw new ArgumentNullException();
+        if (!(value is InvokeFunction)) throw new ArgumentNullException();
+        base.Symbol = value;
+      }
+    }
+
+    [StorableConstructor]
+    private InvokeFunctionTreeNode(bool deserializing) : base(deserializing) { }
+    private InvokeFunctionTreeNode(InvokeFunctionTreeNode original, Cloner cloner) : base(original, cloner) { }
+    public InvokeFunctionTreeNode(InvokeFunction invokeSymbol) : base(invokeSymbol) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new InvokeFunctionTreeNode(this, cloner);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/ProgramRootSymbol.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/ProgramRootSymbol.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/ProgramRootSymbol.cs	(revision 10269)
@@ -0,0 +1,53 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  [Item(ProgramRootSymbol.ProgramRootSymbolName, ProgramRootSymbol.ProgramRootSymbolDescription)]
+  public sealed class ProgramRootSymbol : Symbol, IReadOnlySymbol {
+    public const string ProgramRootSymbolName = "ProgramRootSymbol";
+    public const string ProgramRootSymbolDescription = "Special symbol that represents the program root node of a symbolic expression tree.";
+    private const int minimumArity = 1;
+    private const int maximumArity = byte.MaxValue;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private ProgramRootSymbol(bool deserializing) : base(deserializing) { }
+    private ProgramRootSymbol(ProgramRootSymbol original, Cloner cloner) : base(original, cloner) { }
+    public ProgramRootSymbol() : base(ProgramRootSymbol.ProgramRootSymbolName, ProgramRootSymbol.ProgramRootSymbolDescription) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ProgramRootSymbol(this, cloner);
+    }
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new SymbolicExpressionTreeTopLevelNode(this);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/StartSymbol.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/StartSymbol.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/StartSymbol.cs	(revision 10269)
@@ -0,0 +1,56 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  [Item(StartSymbol.StartSymbolName, StartSymbol.StartSymbolDescription)]
+  public sealed class StartSymbol : Symbol, IReadOnlySymbol {
+    public const string StartSymbolName = "StartSymbol";
+    public const string StartSymbolDescription = "Special symbol that represents the starting node of the result producing branch of a symbolic expression tree.";
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private StartSymbol(bool deserializing)
+      : base(deserializing) {
+    }
+    private StartSymbol(StartSymbol original, Cloner cloner) : base(original, cloner) { }
+    public StartSymbol() : base(StartSymbol.StartSymbolName, StartSymbol.StartSymbolDescription) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new StartSymbol(this, cloner);
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new SymbolicExpressionTreeTopLevelNode(this);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Symbol.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Symbol.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Symbol.cs	(revision 10269)
@@ -0,0 +1,121 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
+  [Item("Symbol", "Represents a symbol in a symbolic function tree.")]
+  public abstract class Symbol : NamedItem, ISymbol {
+    #region Properties
+    [Storable]
+    private double initialFrequency;
+    public double InitialFrequency {
+      get { return initialFrequency; }
+      set {
+        if (value < 0.0) throw new ArgumentException("InitialFrequency must be positive");
+        if (value != initialFrequency) {
+          initialFrequency = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+
+    [Storable(DefaultValue = true)]
+    private bool enabled;
+    public virtual bool Enabled {
+      get { return enabled; }
+      set {
+        if (value != enabled) {
+          enabled = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+
+    [Storable(DefaultValue = false)]
+    private bool @fixed;
+    public bool Fixed {
+      get { return @fixed; }
+      set {
+        if (value != @fixed) {
+          @fixed = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+
+    public override bool CanChangeName {
+      get { return !(this is IReadOnlySymbol); }
+    }
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    public abstract int MinimumArity { get; }
+    public abstract int MaximumArity { get; }
+    #endregion
+
+    [StorableConstructor]
+    protected Symbol(bool deserializing) : base(deserializing) { }
+    protected Symbol(Symbol original, Cloner cloner)
+      : base(original, cloner) {
+      initialFrequency = original.initialFrequency;
+      enabled = original.enabled;
+      @fixed = original.@fixed;
+    }
+
+    protected Symbol(string name, string description)
+      : base(name, description) {
+      initialFrequency = 1.0;
+      enabled = true;
+      @fixed = false;
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      // BackwardsCompatibility3.3
+      #region Backwards compatible code, remove with 3.4
+      if (initialFrequency.IsAlmost(0.0) && !(this is GroupSymbol)) enabled = false;
+      #endregion
+
+    }
+
+    public virtual ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new SymbolicExpressionTreeNode(this);
+    }
+
+    public virtual IEnumerable<ISymbol> Flatten() {
+      yield return this;
+    }
+
+    public event EventHandler Changed;
+    protected virtual void OnChanged(EventArgs e) {
+      EventHandler handlers = Changed;
+      if (handlers != null)
+        handlers(this, e);
+    }
+  }
+}
Index: anches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/ExtendedSymbolicExpressionTreeCanvas.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/ExtendedSymbolicExpressionTreeCanvas.cs	(revision 10268)
+++ 	(revision )
@@ -1,340 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.EvolutionaryTracking.Views.Primitives;
-using HeuristicLab.Visualization;
-
-namespace HeuristicLab.EvolutionaryTracking.Views {
-  public class ExtendedSymbolicExpressionTreeCanvas : ChartControl {
-    private const int HSize = 20;
-    private const int VSize = 15;
-    private const int HDistance = 5;
-    private const int VDistance = 5;
-    private const int MinGroupHorizontalSpacing = 200;
-    private const int MinGroupVerticalSpacing = 200;
-    private const int HorizontalGroupDistance = 20;
-    private const int VerticalGroupDistance = 20;
-
-    public ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode> TreeLayoutEngine { get; set; }
-    public ReingoldTilfordLayoutEngine<ISymbolicExpressionTree> GroupsLayoutEngine { get; set; }
-
-    private SymbolicExpressionTreeLayoutAdapter layoutAdapter;
-
-    private Dictionary<ISymbolicExpressionTreeNode, IPrimitive> nodesToPrimitives;
-    private Dictionary<ISymbolicExpressionTree, IPrimitive> treesToGroups;
-
-    private Dictionary<Tuple<IPrimitive, IPrimitive>, Line> primitiveConnections;
-    private Dictionary<Tuple<IPrimitive, IPrimitive>, Line> groupsConnections;
-
-    private ISymbolicExpressionTreeNode currentSelected;
-    private ISymbolicExpressionTreeNode SelectedSubtree {
-      get { return currentSelected; }
-      set {
-        if (Chart == null)
-          Chart = new Chart(0, 0, PreferredSize.Width, PreferredSize.Height);
-
-        if (value == currentSelected) return;
-        var previousSelected = currentSelected;
-        currentSelected = value;
-
-        DisableUpdate();
-        if (previousSelected != null) HighlightSubtree(previousSelected, Color.Black); // un-highlight the previously selected subtree
-        if (currentSelected != null) HighlightSubtree(currentSelected, Color.DeepSkyBlue); // highlight the new selected subtree
-        EnableUpdate();
-        EnforceUpdate();
-      }
-    }
-
-    public ISymbolicExpressionTreeGenealogyGraph GenealogyGraph { get; set; }
-
-    private void ClearDictionaries() {
-      if (nodesToPrimitives == null) nodesToPrimitives = new Dictionary<ISymbolicExpressionTreeNode, IPrimitive>();
-      nodesToPrimitives.Clear();
-
-      if (treesToGroups == null) treesToGroups = new Dictionary<ISymbolicExpressionTree, IPrimitive>();
-      treesToGroups.Clear();
-
-      if (groupsConnections == null) groupsConnections = new Dictionary<Tuple<IPrimitive, IPrimitive>, Line>();
-      groupsConnections.Clear();
-
-      if (primitiveConnections == null) primitiveConnections = new Dictionary<Tuple<IPrimitive, IPrimitive>, Line>();
-      primitiveConnections.Clear();
-    }
-
-    private ISymbolicExpressionTree root;
-    public ISymbolicExpressionTree Root {
-      get {
-        return root;
-      }
-      set {
-        if (value == null)
-          throw new ArgumentNullException();
-
-        if (root == value) return;
-
-        ClearDictionaries();
-        TreeLayoutEngine.Reset();
-        GroupsLayoutEngine.Reset();
-
-        root = value;
-        currentSelected = null;
-
-        if (Chart == null)
-          Chart = new Chart(0, 0, PreferredSize.Width, PreferredSize.Height);
-
-        DisableUpdate();
-        Chart.Group.Clear();
-        var group = LayoutTree(root);
-        group.Ancestor = group;
-        group.Content = root;
-        Chart.Group.Add(group);
-        GroupsLayoutEngine.Root = group;
-        GroupsLayoutEngine.AddNode(group.Content, group);
-        treesToGroups.Add(group.Content, group);
-
-        // highlight the received fragment
-        var graphNode = GenealogyGraph.GetGraphNodes(root).First();
-        if (graphNode.InEdges != null) {
-          var arc = graphNode.InEdges.Last(x => x.Source != x.Target);
-          var fragment = (IFragment)arc.Data;
-          if (fragment != null && fragment.Root != null) {
-            HighlightSubtree(fragment.Root, Color.Orange);
-          }
-        }
-
-        EnableUpdate();
-        EnforceUpdate();
-      }
-    }
-
-    public ExtendedSymbolicExpressionTreeCanvas() {
-      TreeLayoutEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode> { MinHorizontalSpacing = HDistance + HSize, MinVerticalSpacing = VDistance + VSize };
-      layoutAdapter = new SymbolicExpressionTreeLayoutAdapter();
-      GroupsLayoutEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTree> { MinHorizontalSpacing = MinGroupHorizontalSpacing, MinVerticalSpacing = MinGroupVerticalSpacing };
-      if (Chart == null)
-        Chart = new Chart(0, 0, PreferredSize.Width, PreferredSize.Height);
-      nodesToPrimitives = new Dictionary<ISymbolicExpressionTreeNode, IPrimitive>();
-      treesToGroups = new Dictionary<ISymbolicExpressionTree, IPrimitive>();
-      groupsConnections = new Dictionary<Tuple<IPrimitive, IPrimitive>, Line>();
-      primitiveConnections = new Dictionary<Tuple<IPrimitive, IPrimitive>, Line>();
-    }
-
-    /// <summary>
-    /// Draws a symbolic expression tree using HeuristicLab.Visualization primitives and the ReingoldTilford layout algorithm.
-    /// </summary>
-    /// <param name="tree">The symbolic expression tree</param>
-    /// <returns>An IChart containing a group of primitives representing the tree.</returns>
-    private PrimitiveGroup LayoutTree(ISymbolicExpressionTree tree) {
-      var group = LayoutTree(tree.Root.GetSubtree(0).GetSubtree(0));
-      group.Content = tree;
-      return group;
-    }
-
-    // this function is used by the SymbolicExpressionTreeLayoutAdapter
-    private ILayoutNode<ISymbolicExpressionTreeNode> ConvertFunction(ISymbolicExpressionTreeNode node) {
-      ILayoutNode<ISymbolicExpressionTreeNode> layoutNode;
-      if (node.SubtreeCount == 0) {
-        layoutNode = new LabeledRectangle(Chart, 0, 0, HSize, VSize) { Text = node.ToString(), Font = new Font(FontFamily.GenericSansSerif, 12) };
-      } else {
-        layoutNode = new LabeledEllipse(Chart, 0, 0, HSize, VSize) { Text = node.ToString(), Font = new Font(FontFamily.GenericSansSerif, 12) };
-      }
-      // layoutNode.Children are not initialized here, but when the adapter expands the tree
-      layoutNode.Ancestor = layoutNode;
-      layoutNode.Content = node;
-      return layoutNode;
-    }
-
-    private PrimitiveGroup LayoutTree(ISymbolicExpressionTreeNode treeRoot) {
-      if (treeRoot == null) throw new ArgumentNullException();
-
-      var layoutNodes = layoutAdapter.Convert(treeRoot, ConvertFunction).ToList(); // returns a list of layoutNodes in breadth order (relative to the tree traversal)
-      TreeLayoutEngine.Reset();
-      var group = new PrimitiveGroup(Chart);
-      // add primitives (rectangles and ellipses corresponding to terminal/function nodes)
-      foreach (var layoutNode in layoutNodes) {
-        var brush = new SolidBrush(Color.Transparent);
-        var pen = new Pen(Color.Black);
-        var fontBrush = new SolidBrush(pen.Color);
-        var treeNode = layoutNode.Content;
-        layoutNode.Number = layoutNode.Parent == null ? 0 : layoutNode.Parent.Content.IndexOfSubtree(layoutNode.Content);
-        var primitive = (IPrimitive)layoutNode;
-        primitive.Brush = brush;
-        primitive.Pen = pen;
-        if (treeNode.SubtreeCount == 0) {
-          var rectangle = (LabeledRectangle)primitive;
-          rectangle.FontBrush = fontBrush;
-        } else {
-          var ellipse = (LabeledEllipse)primitive;
-          ellipse.FontBrush = fontBrush;
-        }
-        TreeLayoutEngine.AddNode(treeNode, layoutNode);
-        group.Add(primitive);
-        nodesToPrimitives.Add(treeNode, primitive);
-      }
-      TreeLayoutEngine.Root = (ILayoutNode<ISymbolicExpressionTreeNode>)nodesToPrimitives[treeRoot];
-      TreeLayoutEngine.CalculateLayout(); // calculate X,Y coordinates for each layout node
-
-      foreach (var layoutNode in layoutNodes) {
-        var primitive = (RectangularPrimitiveBase)layoutNode;
-        var lowerLeft = new PointD(layoutNode.X, layoutNode.Y);
-        primitive.SetPosition(lowerLeft, lowerLeft + new Offset(primitive.Size));
-      }
-      // connect nodes with lines
-      foreach (var layoutNode in layoutNodes) {
-        var primitive = (RectangularPrimitiveBase)layoutNode;
-        var pen = new Pen(Color.Black);
-        var node = layoutNode.Content;
-        if (node.SubtreeCount == 0) continue;
-        foreach (var subtree in node.Subtrees) {
-          var subtreePrimitive = (RectangularPrimitiveBase)nodesToPrimitives[subtree];
-          var start = new PointD(primitive.UpperRight.X - primitive.Size.Width / 2f, primitive.UpperRight.Y);
-          var end = new PointD(subtreePrimitive.LowerLeft.X + subtreePrimitive.Size.Width / 2f, subtreePrimitive.LowerLeft.Y);
-          var line = new Line(Chart, start, end, pen);
-          group.Add(line);
-          primitiveConnections.Add(new Tuple<IPrimitive, IPrimitive>(primitive, subtreePrimitive), line);
-        }
-      }
-      // once the coordonates for each primitive are updated according to the calculated layout, we update the bounds of the group (LowerLeft and UpperRight)
-      group.UpdateBounds();
-      return group;
-    }
-    /// <summary>
-    /// Handler for the user click event inside the ExtendedSymbolicExpressionTreeCanvas. When the user clicks, the following things should happen:
-    /// 1) The group of primitives containing the clicked screen point is identified
-    /// 2) The corresponding symbolic expression tree is retrieved from the groupsToTreesDictionary
-    /// 3) The corresponding genealogy graph node is retrieved from the GenealogyGraph
-    /// 4) The parents and the fragment are retrieved from the graph
-    /// 5) Both parents are laid out using the symbolic expression tree layout engine and the resulting groups of primitives are added to the canvas
-    /// 6) The fragment is highlighted in the root parent and in the other parent 
-    /// </summary>
-    /// <param name="sender"></param>
-    /// <param name="e"></param>
-    protected override void pictureBox_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) {
-      // STEP 1: Get the primitives and the group
-      var primitives = Chart.GetAllPrimitives(e.Location).Where(p => p is PrimitiveGroup).ToList();
-      if (primitives.Count == 0) return;
-      if (primitives.Count > 1) throw new Exception("Groups/trees should not overlap."); // in the extended canvas, the PrimitiveGroups (each representing a symbolic expression tree) should not overlap
-      var selectedGroup = (PrimitiveGroup)primitives[0];
-      var selectedPrimitive = selectedGroup.GetAllPrimitives(Chart.TransformPixelToWorld(e.Location)).First(p => p is ILayoutNode<ISymbolicExpressionTreeNode>); // similarly with the above condition, there should only be one primitive in that location
-      // STEP 2: Get the selected tree and the selected subtree
-      SelectedSubtree = ((ILayoutNode<ISymbolicExpressionTreeNode>)selectedPrimitive).Content;
-      var selectedTree = ((ILayoutNode<ISymbolicExpressionTree>)selectedGroup).Content;
-      // STEP 3: Get the genealogy graph node, the parents and the fragment
-      var graphNode = GenealogyGraph.GetGraphNodes(selectedTree).First(); // get the GenealogyGraphNode corresponding to the tree
-      var parentVertices = graphNode.InEdges.Select(edge => (SymbolicExpressionTreeGenealogyGraphNode)edge.Source).ToList();
-
-      DisableUpdate();
-
-      foreach (var edge in graphNode.InEdges) {
-        var parentVertex = (SymbolicExpressionTreeGenealogyGraphNode)edge.Source;
-        var parent = parentVertex.SymbolicExpressionTree;
-        if (treesToGroups.ContainsKey(parent)) continue;
-        var childGroup = LayoutTree(parent); // from the layout perspective, roles are reversed and genealogical parents become layout children
-        treesToGroups.Add(parent, childGroup);
-        Chart.Group.Add(childGroup);
-        if (selectedGroup.Children == null) selectedGroup.Children = new List<ILayoutNode<ISymbolicExpressionTree>>();
-        selectedGroup.Children.Add(childGroup);
-        childGroup.Parent = selectedGroup;
-        childGroup.Level = childGroup.Parent.Level + 1;
-        childGroup.Number = childGroup.Parent.Children.Count - 1;
-        childGroup.Ancestor = childGroup;
-        childGroup.Content = parent;
-        GroupsLayoutEngine.AddNode(childGroup.Content, childGroup);
-      }
-      var parents = parentVertices.Select(x => x.SymbolicExpressionTree).ToList();
-      // highlight the fragment
-      if (graphNode.InEdges.Count == 2) {
-        // highlight the fragment
-        var fragment = (IFragment)graphNode.InEdges.Last().Data;
-        if (!(fragment == null || fragment.Root == null)) {
-
-          var subtree0 = parents[0].IterateNodesPrefix().ElementAt(fragment.Index);
-          HighlightSubtree(subtree0, Color.Red);
-
-          var subtree1 = parents[1].IterateNodesPrefix().ElementAt(fragment.OldIndex);
-          HighlightSubtree(subtree1, Color.LimeGreen);
-        }
-      }
-      // layout the groups
-      var groups = Chart.Group.Primitives.Where(p => p is PrimitiveGroup).Cast<PrimitiveGroup>().ToList();
-      var maxSize = new SizeF(groups.Max(g => g.Size.Width), groups.Max(g => g.Size.Height));
-      GroupsLayoutEngine.MinHorizontalSpacing = maxSize.Width + HorizontalGroupDistance;
-      GroupsLayoutEngine.MinVerticalSpacing = maxSize.Height + VerticalGroupDistance;
-
-      GroupsLayoutEngine.CalculateLayout();
-      foreach (var group in Chart.Group.Primitives.Where(p => p is PrimitiveGroup).Cast<PrimitiveGroup>()) {
-        group.Move(new PointD(group.X, group.Y) - group.LowerLeft);
-      }
-      // draw or update (start,end) coordinates of group connections
-      foreach (var group in Chart.Group.Primitives.Where(p => p is PrimitiveGroup).Cast<PrimitiveGroup>()) {
-        if (group.Children == null) continue;
-        var start = new PointD(group.UpperRight.X - group.Size.Width / 2, group.UpperRight.Y);
-        foreach (var childGroup in group.Children.Cast<PrimitiveGroup>()) {
-          var tuple = new Tuple<IPrimitive, IPrimitive>(group, childGroup);
-          var childRoot = (RectangularPrimitiveBase)nodesToPrimitives[childGroup.Content.Root.GetSubtree(0).GetSubtree(0)];
-          var end = new PointD(childRoot.LowerLeft.X + childRoot.Size.Width / 2, childRoot.LowerLeft.Y);
-          if (groupsConnections.ContainsKey(tuple)) {
-            var line = groupsConnections[tuple];
-            line.SetPosition(start, end);
-          } else {
-            var line = new Line(Chart, start, end) { Pen = new Pen(Color.Black) };
-            Chart.Group.Add(line);
-            groupsConnections.Add(tuple, line);
-          }
-        }
-      }
-
-      EnableUpdate();
-      EnforceUpdate();
-
-      base.pictureBox_MouseUp(sender, e);
-    }
-    // highlight a given subtree with the specified color
-    public void HighlightSubtree(ISymbolicExpressionTreeNode subtree, Color color) {
-      foreach (var node in subtree.IterateNodesBreadth()) {
-        var primitive = nodesToPrimitives[node];
-        primitive.Pen.Brush = new SolidBrush(color);
-      }
-    }
-    // the (0,0) point of the HeuristicLab.Visualization.Chart is at the bottom left corner of the screen, while the (0,0) point of the layout engine 
-    // and of the actual user control is at the top left corner. so we have to vertically flip everything to maintain correct orientation.
-    private void FlipVertical() {
-      foreach (var primitive in Chart.Group.Primitives) {
-        var group = primitive as PrimitiveGroup;
-        if (group != null) {
-          foreach (var groupPrimitive in group.Primitives) {
-            var rp = groupPrimitive as RectangularPrimitiveBase;
-            if (rp != null) {
-              rp.SetPosition(rp.LowerLeft.X, Height - rp.UpperRight.Y, rp.UpperRight.X, Height - rp.LowerLeft.Y);
-            } else {
-              var lp = groupPrimitive as LinearPrimitiveBase;
-              if (lp != null) {
-                lp.SetPosition(lp.Start.X, Height - lp.Start.Y, lp.End.X, Height - lp.End.Y);
-              }
-            }
-          }
-        } else {
-          var lp = primitive as LinearPrimitiveBase;
-          if (lp != null) {
-            lp.SetPosition(lp.Start.X, Height - lp.Start.Y, lp.End.X, Height - lp.End.Y);
-          }
-        }
-      }
-    }
-    // some convenience methods for the lazy (enabling, disabling updates for the Chart)
-    private void EnableUpdate() {
-      Chart.UpdateEnabled = true;
-    }
-    private void DisableUpdate() {
-      Chart.UpdateEnabled = false;
-    }
-    private void EnforceUpdate() {
-      DisableUpdate();
-      FlipVertical();
-      EnableUpdate();
-      Chart.EnforceUpdate();
-    }
-  }
-}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.Designer.cs	(revision 10268)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.Designer.cs	(revision 10269)
@@ -1,24 +1,3 @@
-﻿#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
-
-namespace HeuristicLab.EvolutionaryTracking.Views {
+﻿namespace HeuristicLab.EvolutionaryTracking.Views {
   partial class GenealogyGraphChart {
     /// <summary> 
@@ -45,21 +24,6 @@
     /// </summary>
     private void InitializeComponent() {
-      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
-      this.SuspendLayout();
-      // 
-      // pictureBox
-      // 
-      this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
-      this.pictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
-      // 
-      // GenealogyGraphChart
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      components = new System.ComponentModel.Container();
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Name = "GenealogyGraphChart";
-      this.Controls.SetChildIndex(this.pictureBox, 0);
-      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
-      this.ResumeLayout(false);
-
     }
 
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.cs	(revision 10268)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.cs	(revision 10269)
@@ -1,24 +1,3 @@
-﻿#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;
 using System.Collections.Generic;
 using System.Drawing;
@@ -27,57 +6,63 @@
 using System.Windows.Forms;
 using HeuristicLab.Common;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Visualization;
 
 namespace HeuristicLab.EvolutionaryTracking.Views {
   public partial class GenealogyGraphChart : ChartControl {
-    private Dictionary<string, VisualGenealogyGraphNode> visualNodeMap; // map the uid of the genealogy graph vertex with a visual node (in this way each node is uniquely determined)
-    private Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc> visualArcMap;
-    private const int Diameter = 20; // node diameter
-    private int x, y; // coordinates for positioning each node
-    private const int Cx = 30, Cy = 30; // position increments
-    private VisualGenealogyGraphNode selectedGenealogyGraphNode;
-    public VisualGenealogyGraphNode SelectedGenealogyGraphNode { get { return selectedGenealogyGraphNode; } }
-    private Visualization.Rectangle targetRectangle; // provides a  rectangle mark of the currently selected genealogy graph node
+    private GenealogyGraph genealogyGraph;
+
+    private const double XIncrement = 30;
+    private const double YIncrement = 30;
+    private const double Diameter = 20;
+
+    public GenealogyGraph GenealogyGraph {
+      get { return genealogyGraph; }
+      set {
+        if (value == null) return;
+        genealogyGraph = value;
+        Clear();
+        DrawGraph(XIncrement, YIncrement, Diameter);
+      }
+    }
+
+    private void Clear() {
+      if (nodeMap == null)
+        nodeMap = new Dictionary<IGenealogyGraphNode, VisualGenealogyGraphNode>();
+      else nodeMap.Clear();
+
+      if (arcMap == null)
+        arcMap = new Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc>();
+      else arcMap.Clear();
+
+      Chart.Group.Clear();
+    }
+
+    private Dictionary<IGenealogyGraphNode, VisualGenealogyGraphNode> nodeMap;
+    private Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc> arcMap;
 
     public bool SimpleLineages { get; set; }
     public bool LockGenealogy { get; set; }
-
-    private bool drawing;
-
-    private SymbolicExpressionTreeGenealogyGraph graph;
-    public SymbolicExpressionTreeGenealogyGraph Graph {
-      get { return graph; }
-      internal set {
-        graph = value;
-        if (graph == null) return;
-
-        visualNodeMap = new Dictionary<string, VisualGenealogyGraphNode>();
-        visualArcMap = new Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc>();
-
-        Chart.Group.Clear();
-        DrawGraph();
-      }
-    }
-
-    private VisualGenealogyGraphNode GetVisualGenealogyGraphNode(IVertex node) {
-      VisualGenealogyGraphNode visualNode;
-      visualNodeMap.TryGetValue(node.Id, out visualNode);
-      return visualNode;
-    }
-
-    private VisualGenealogyGraphArc GetVisualGenealogyGraphArc(IVertex source, IVertex target) {
-      VisualGenealogyGraphNode visualSource;
-      VisualGenealogyGraphNode visualTarget;
-      visualNodeMap.TryGetValue(source.Id, out visualSource);
-      visualNodeMap.TryGetValue(target.Id, out visualTarget);
-      if (visualSource != null && visualTarget != null) {
-        VisualGenealogyGraphArc visualArc;
-        visualArcMap.TryGetValue(
-          new Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>(visualSource, visualTarget), out visualArc);
-        if (visualArc != null) return visualArc;
-      }
-      return null;
-    }
+    private Visualization.Rectangle TargetRectangle { get; set; }
+
+    private VisualGenealogyGraphNode GetMappedNode(IGenealogyGraphNode node) {
+      VisualGenealogyGraphNode v;
+      nodeMap.TryGetValue(node, out v);
+      return v;
+    }
+
+    private VisualGenealogyGraphArc GetMappedArc(IGenealogyGraphNode source, IGenealogyGraphNode target) {
+      VisualGenealogyGraphNode visualSource, visualTarget;
+      nodeMap.TryGetValue(source, out visualSource);
+      nodeMap.TryGetValue(target, out visualTarget);
+
+      if (visualSource == null || visualTarget == null) return null;
+
+      VisualGenealogyGraphArc arc;
+      arcMap.TryGetValue(new Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>(visualSource, visualTarget), out arc);
+      return arc;
+    }
+
+    private bool DrawInProgress { get; set; } // do not try to update the chart while the drawing is not finished
+    private VisualGenealogyGraphNode SelectedVisualNode { get; set; }
 
     public event MouseEventHandler GenealogyGraphNodeClicked;
@@ -88,41 +73,24 @@
 
     public GenealogyGraphChart() {
-      //      InitializeComponent();
-      Chart = new Chart(0, 0, PreferredSize.Width, PreferredSize.Height);
-      x = 0;
-      y = PreferredSize.Height + Cx + 2 * Diameter;
-      Chart.Mode = ChartMode.Select;
-    }
-
-    public void DrawGraph() {
-      if (graph == null) return;
+      InitializeComponent();
+    }
+
+    protected virtual void DrawGraph(double xIncrement, double yIncrement, double diameter) {
       Chart.UpdateEnabled = false;
-
-      drawing = true;
-
-      var layers = Graph.Nodes.GroupBy(n => n.Rank).OrderBy(g => g.Key).Select(g => new { Rank = g.Key, Nodes = g.ToList() }).ToList();
-
-      y = PreferredSize.Height + Cx + 2 * Diameter;
-
-      for (int i = 0; i != layers.Count; ++i) {
-        x = 0;
-        layers[i].Nodes.Sort((b, a) => Graph.Compare(a, b));
-        double rank = Math.Floor(layers[i].Rank);
-        if (layers[i].Rank.IsAlmost(rank)) {
-          var visualTextNode = new VisualGenealogyGraphTextLabel(Chart, x, y + 2, x + Diameter, y + Diameter) {
-            FontBrush = new SolidBrush(Color.Black),
-            Font = new Font("Arial", Diameter - 4, FontStyle.Regular, GraphicsUnit.Pixel),
-            Text = String.Format("{0:0}", rank)
-          };
-          Chart.Group.Add(visualTextNode);
-        }
-
-        // sort descending by quality (using comparison defined in GenealogyGraphNode class)
-        x += (int)Math.Floor(1.5 * Cx); // reset horizontal coordinate
-
-        foreach (var node in layers[i].Nodes) {
+      DrawInProgress = true;
+
+      var ranks = GenealogyGraph.Ranks.Select(t => new { Rank = t.Key, Nodes = t.Value }).OrderBy(p => p.Rank).ToList();
+      double x = 0;
+      double y = PreferredSize.Height + yIncrement + 2 * diameter;
+
+      foreach (var rank in ranks) {
+        var nodes = rank.Nodes.ToList();
+        nodes.Sort((a, b) => b.CompareTo(a)); // sort descending by quality
+        var nl = Environment.NewLine;
+
+        foreach (var node in nodes) {
           var pen = new Pen(Color.LightGray);
-          var nl = Environment.NewLine;
-          var visualNode = new VisualGenealogyGraphNode(Chart, x, y, x + Diameter, y + Diameter, pen, null) {
+
+          var visualNode = new VisualGenealogyGraphNode(Chart, x, y, x + diameter, y + diameter, pen, null) {
             Data = node,
             ToolTipText = "Rank: " + node.Rank + nl +
@@ -131,66 +99,34 @@
           };
           Chart.Group.Add(visualNode);
-          visualNodeMap.Add(node.Id, visualNode);
-
-          x += Cx; // increment horizontal coordinate
-        }
-
-        y -= Cy; // decrement vertical coordinate (because the origin is upside down)
-
-        // connect elites from successive layers with visual arcs
-        if (i == 0) continue;
-        var currLayer = layers[i].Nodes;
-        var prevLayer = layers[i - 1].Nodes;
-        foreach (var n in currLayer) {
-          foreach (var m in prevLayer) {
-            if (n.SymbolicExpressionTree != m.SymbolicExpressionTree) continue;
-            var v1 = GetVisualGenealogyGraphNode(n);
-            var v2 = GetVisualGenealogyGraphNode(m);
-
-            var pen = new Pen(Color.LightGray);
-            visualArcMap[Tuple.Create(v2, v1)] = AddArc(Chart, v2, v1, pen);
-          }
-        }
-      }
-      // add arcs separately (to avoid some ordering problems)
-      foreach (SymbolicExpressionTreeGenealogyGraphNode node in Graph.Nodes) {
-        VisualGenealogyGraphNode visualNode = GetVisualGenealogyGraphNode(node);
-        if (node.InEdges == null) continue;
-
-        foreach (Arc arc in node.InEdges) {
-          var visualParent = GetVisualGenealogyGraphNode(arc.Source);
+          nodeMap.Add(node, visualNode);
+
+          x += xIncrement;
+        }
+        y -= yIncrement;
+      }
+      // add arcs
+      foreach (var node in GenealogyGraph.Nodes) {
+        if (node.InArcs == null) continue;
+        var visualNode = nodeMap[node];
+        if (visualNode == null) continue;
+        foreach (var arc in node.InArcs) {
+          var parent = arc.Source;
+          var visualParent = GetMappedNode(parent);
+          if (visualParent == null) continue;
           var pen = new Pen(Color.Transparent);
-          visualArcMap[Tuple.Create(visualParent, visualNode)] = AddArc(Chart, visualParent, visualNode, pen);
-        }
-      }
-
-      // highlight the most recent common ancestor ("eve" individual)
-      //      var eve = graph.MostRecentCommonAncestor();
-      //      if (eve != null) {
-      //        var visualGraphNode = GetVisualGenealogyGraphNode(eve);
-
-      //        var brush = new SolidBrush(Color.BlueViolet);
-      //        visualGraphNode.FontBrush = brush;
-      //      }
-
-      Chart.UpdateEnabled = true;
-      Chart.EnforceUpdate();
-
-      drawing = false;
-    }
-
-    // add an arc between the source and the target nodes, using the specified pen color
-    // adds the arc to the arc lists of both nodes and to the primitive group of the chart
-    private static VisualGenealogyGraphArc AddArc(IChart chart, VisualGenealogyGraphNode source, VisualGenealogyGraphNode target, Pen pen, Brush brush = null) {
-      var arc = new VisualGenealogyGraphArc(chart, source, target, pen) { Brush = brush };
-      arc.UpdatePosition();
-      source.OutgoingArcs.Add(arc);
-      target.IncomingArcs.Add(arc);
-      chart.Group.Add(arc);
-      return arc;
-    }
-
-    protected override void pictureBox_MouseMove(object sender, MouseEventArgs e) {
-      if (!drawing) {
+          var visualArc = AddArc(Chart, visualParent, visualNode, pen);
+          arcMap.Add(Tuple.Create(visualParent, visualNode), visualArc);
+        }
+      }
+      // TODO: connect elites
+
+      Chart.UpdateEnabled = true;
+      Chart.EnforceUpdate();
+
+      DrawInProgress = false;
+    }
+
+    protected override void pictureBox_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) {
+      if (!DrawInProgress) {
         switch (e.Button) {
           case MouseButtons.Left:
@@ -203,6 +139,6 @@
             break;
         }
-        base.pictureBox_MouseMove(sender, e);
-      }
+      }
+      base.pictureBox_MouseMove(sender, e);
     }
 
@@ -213,18 +149,16 @@
         return;
       }
-
       if (Chart.Mode != ChartMode.Select) {
         base.pictureBox_MouseUp(sender, e);
         return;
       }
-
       var visualNodes = Chart.GetAllPrimitives(e.Location).Where(p => p is VisualGenealogyGraphNode).ToList();
       if (visualNodes.Count <= 0) {
-        selectedGenealogyGraphNode = null;
+        SelectedVisualNode = null;
         return;
       }
-      if (selectedGenealogyGraphNode == visualNodes[0]) return;
-      selectedGenealogyGraphNode = visualNodes[0] as VisualGenealogyGraphNode;
-      if (selectedGenealogyGraphNode == null) return;
+      if (SelectedVisualNode == visualNodes[0]) return;
+      SelectedVisualNode = visualNodes[0] as VisualGenealogyGraphNode;
+      if (SelectedVisualNode == null) return;
 
       if (!LockGenealogy) {
@@ -233,8 +167,8 @@
         if (ModifierKeys != Keys.Shift)
           // clear colors
-          ClearAllNodes();
+          ClearPrimitives();
         // use a rectangle to highlight the currently selected genealogy graph node
-        var gNode = selectedGenealogyGraphNode.Data;
-        var visualNode = GetVisualGenealogyGraphNode(gNode);
+        var gNode = SelectedVisualNode.Data;
+        var visualNode = GetMappedNode(gNode);
 
         DrawLineage(visualNode, n => SimpleLineages ? n.IncomingArcs.Take(1) : n.IncomingArcs, a => a.Source);
@@ -249,7 +183,9 @@
       Chart.EnforceUpdate();
 
-      if (selectedGenealogyGraphNode != null)
+      if (SelectedVisualNode != null)
         /* emit clicked event */
-        OnGenealogyGraphNodeClicked(selectedGenealogyGraphNode, e);
+        OnGenealogyGraphNodeClicked(SelectedVisualNode, e);
+
+      base.pictureBox_MouseUp(sender, e);
     }
 
@@ -273,25 +209,32 @@
 
     void MarkSelectedNode() {
-      var center = selectedGenealogyGraphNode.Center;
-      var size = selectedGenealogyGraphNode.Size;
+      var center = SelectedVisualNode.Center;
+      var size = SelectedVisualNode.Size;
       double x1 = center.X - size.Width / 2;
       double x2 = x1 + size.Width;
       double y1 = center.Y - size.Height / 2;
       double y2 = y1 + size.Height;
-      if (targetRectangle == null) {
-        targetRectangle = new Visualization.Rectangle(Chart, x1, y1, x2, y2, new Pen(Color.Black), null);
-        Chart.Group.Add(targetRectangle);
+      if (TargetRectangle == null) {
+        TargetRectangle = new Visualization.Rectangle(Chart, x1, y1, x2, y2, new Pen(Color.Black), null);
+        Chart.Group.Add(TargetRectangle);
       } else {
-        targetRectangle.SetPosition(x1, y1, x2, y2);
-      }
-    }
-
-    public void ClearAllNodes() {
+        TargetRectangle.SetPosition(x1, y1, x2, y2);
+      }
+    }
+
+
+    private static VisualGenealogyGraphArc AddArc(IChart chart, VisualGenealogyGraphNode source, VisualGenealogyGraphNode target, Pen pen, Brush brush = null) {
+      var arc = new VisualGenealogyGraphArc(chart, source, target, pen) { Brush = brush };
+      arc.UpdatePosition();
+      source.OutgoingArcs.Add(arc);
+      target.IncomingArcs.Add(arc);
+      chart.Group.Add(arc);
+      return arc;
+    }
+
+    public virtual void ClearPrimitives() {
       foreach (var primitive in Chart.Group.Primitives) {
         if (primitive is VisualGenealogyGraphArc) {
-          var arc = primitive as VisualGenealogyGraphArc;
-          var sourceData = arc.Source.Data.SymbolicExpressionTree;
-          var targetData = arc.Target.Data.SymbolicExpressionTree;
-          primitive.Pen.Brush = sourceData != targetData ? new SolidBrush(Color.Transparent) : new SolidBrush(Color.LightGray);
+          primitive.Pen.Brush = new SolidBrush(Color.Transparent);
         } else {
           primitive.Brush = null;
@@ -299,48 +242,19 @@
       }
     }
-
-    public void HighlightNodes(IEnumerable<SymbolicExpressionTreeGenealogyGraphNode> nodes) {
+    public void HighlightNodes(IEnumerable<IGenealogyGraphNode> nodes) {
       Chart.UpdateEnabled = false;
-      ClearAllNodes();
+      ClearPrimitives();
       foreach (var node in nodes) {
-        GetVisualGenealogyGraphNode(node).Brush = new SolidBrush(node.GetColor());
-      }
-      Chart.UpdateEnabled = true;
-      Chart.EnforceUpdate();
-    }
-
-    // TODO: optimize and reduce complexity of this method
-    public void HighlightNodes(IEnumerable<ISymbolicExpressionTree> trees) {
-      foreach (var tree in trees) {
-        var graphNodes = graph.GetGraphNodes(tree);
-        foreach (var graphNode in graphNodes) {
-          GetVisualGenealogyGraphNode(graphNode).Brush = new SolidBrush(graphNode.GetColor());
-        }
-      }
-    }
-
-    public void HighlightArcs(IEnumerable<IEdge> arcs, Color color) {
-      foreach (var a in arcs) {
-        var arc = GetVisualGenealogyGraphArc(a.Source, a.Target);
-        if (arc != null) {
-          var source = arc.Source.Data;
-          var target = arc.Target.Data;
-          var start = new Point((int)arc.Start.X, (int)arc.Start.Y);
-          var end = new Point((int)arc.End.X, (int)arc.End.Y);
-          arc.Pen.Brush = new LinearGradientBrush(start, end, source.GetColor(), target.GetColor());
-        }
-      }
-    }
-
-    public void HighlightNode(SymbolicExpressionTreeGenealogyGraphNode graphNode, Color color) {
-      GetVisualGenealogyGraphNode(graphNode).Brush = new SolidBrush(color);
-    }
-
+        GetMappedNode(node).Brush = new SolidBrush(node.GetColor());
+      }
+      Chart.UpdateEnabled = true;
+      Chart.EnforceUpdate();
+    }
     public void HighlightAll() {
       Chart.UpdateEnabled = false;
-      foreach (var visualNode in visualNodeMap.Values) {
+      foreach (var visualNode in nodeMap.Values) {
         visualNode.Brush = new SolidBrush(visualNode.Data.GetColor());
       }
-      foreach (var arc in visualArcMap.Values) {
+      foreach (var arc in arcMap.Values) {
         var source = arc.Source.Data;
         var target = arc.Target.Data;
@@ -352,41 +266,8 @@
       Chart.EnforceUpdate();
     }
-
-    public void HighlightInDegree() {
-      Chart.UpdateEnabled = false;
-      ClearAllNodes();
-      double max = Graph.Nodes.Max(x => x.InEdges == null ? 0 : x.InEdges.Count);
-      foreach (var graphNode in Graph.Nodes) {
-        var visualNode = GetVisualGenealogyGraphNode(graphNode);
-        double deg = graphNode.InEdges == null ? 0 : graphNode.InEdges.Count;
-        int index = (int)(deg / max * ColorGradient.Colors.Count);
-        if (index == ColorGradient.Colors.Count) --index;
-        var color = ColorGradient.Colors[index];
-        visualNode.Brush = new SolidBrush(color);
-      }
-      Chart.UpdateEnabled = true;
-      Chart.EnforceUpdate();
-    }
-
-    public void HighlightOutDegree() {
-      Chart.UpdateEnabled = false;
-      ClearAllNodes();
-      var graphNodes = Graph.Nodes;
-      double max = graphNodes.Max(x => x.OutEdges == null ? 0 : x.OutEdges.Count);
-      foreach (var graphNode in graphNodes) {
-        var visualNode = GetVisualGenealogyGraphNode(graphNode);
-        double deg = graphNode.OutEdges == null ? 0 : graphNode.OutEdges.Count;
-        int index = (int)(deg / max * ColorGradient.Colors.Count);
-        if (index == ColorGradient.Colors.Count) --index;
-        var color = ColorGradient.Colors[index];
-        visualNode.Brush = new SolidBrush(color);
-      }
-      Chart.UpdateEnabled = true;
-      Chart.EnforceUpdate();
-    }
   }
 
   internal static class Util {
-    public static Color GetColor(this SymbolicExpressionTreeGenealogyGraphNode node) {
+    public static Color GetColor(this IGenealogyGraphNode node) {
       var colorIndex = (int)(node.Quality * ColorGradient.Colors.Count);
       if (colorIndex >= ColorGradient.Colors.Count) --colorIndex;
Index: anches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphDialog.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphDialog.Designer.cs	(revision 10268)
+++ 	(revision )
@@ -1,56 +1,0 @@
-﻿namespace HeuristicLab.EvolutionaryTracking.Views {
-  partial class GenealogyGraphDialog {
-    /// <summary>
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary>
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Windows Form Designer generated code
-
-    /// <summary>
-    /// Required method for Designer support - do not modify
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.genealogyGraphChart1 = new HeuristicLab.EvolutionaryTracking.Views.GenealogyGraphChart();
-      this.SuspendLayout();
-      // 
-      // genealogyGraphChart1
-      // 
-      this.genealogyGraphChart1.BackColor = System.Drawing.SystemColors.Control;
-      this.genealogyGraphChart1.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.genealogyGraphChart1.Location = new System.Drawing.Point(0, 0);
-      this.genealogyGraphChart1.Name = "genealogyGraphChart1";
-      this.genealogyGraphChart1.ScaleOnResize = true;
-      this.genealogyGraphChart1.Size = new System.Drawing.Size(284, 262);
-      this.genealogyGraphChart1.TabIndex = 0;
-      // 
-      // GenealogyGraphDialog
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.ClientSize = new System.Drawing.Size(284, 262);
-      this.Controls.Add(this.genealogyGraphChart1);
-      this.Cursor = System.Windows.Forms.Cursors.Default;
-      this.Name = "GenealogyGraphDialog";
-      this.Text = "Genealogy";
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-    private GenealogyGraphChart genealogyGraphChart1;
-  }
-}
Index: anches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphDialog.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphDialog.cs	(revision 10268)
+++ 	(revision )
@@ -1,13 +1,0 @@
-﻿using System.Windows.Forms;
-
-namespace HeuristicLab.EvolutionaryTracking.Views {
-  public partial class GenealogyGraphDialog : Form {
-    public SymbolicExpressionTreeGenealogyGraph Graph {
-      set { genealogyGraphChart1.Graph = value; }
-    }
-
-    public GenealogyGraphDialog() {
-      InitializeComponent();
-    }
-  }
-}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphView.Designer.cs	(revision 10268)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphView.Designer.cs	(revision 10269)
@@ -28,6 +28,4 @@
     private void InitializeComponent() {
       this.components = new System.ComponentModel.Container();
-      this.splitContainer = new System.Windows.Forms.SplitContainer();
-      this.symbolicExpressionTreeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart();
       this.topControlBox = new System.Windows.Forms.Panel();
       this.graphControlsGroupBox = new System.Windows.Forms.GroupBox();
@@ -35,54 +33,9 @@
       this.highlightAllButton = new System.Windows.Forms.Button();
       this.simpleLineagesCheckBox = new System.Windows.Forms.CheckBox();
-      this.groupBox1 = new System.Windows.Forms.GroupBox();
-      this.matchConstantsCheckBox = new System.Windows.Forms.CheckBox();
-      this.matchVariableWeightsCheckBox = new System.Windows.Forms.CheckBox();
-      this.matchVariableNamesCheckBox = new System.Windows.Forms.CheckBox();
       this.toolTip = new System.Windows.Forms.ToolTip(this.components);
       this.genealogyGraphChart = new HeuristicLab.EvolutionaryTracking.Views.GenealogyGraphChart();
-      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
-      this.splitContainer.Panel1.SuspendLayout();
-      this.splitContainer.Panel2.SuspendLayout();
-      this.splitContainer.SuspendLayout();
       this.topControlBox.SuspendLayout();
       this.graphControlsGroupBox.SuspendLayout();
-      this.groupBox1.SuspendLayout();
       this.SuspendLayout();
-      // 
-      // splitContainer
-      // 
-      this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-      this.splitContainer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-      this.splitContainer.Location = new System.Drawing.Point(3, 53);
-      this.splitContainer.Name = "splitContainer";
-      // 
-      // splitContainer.Panel1
-      // 
-      this.splitContainer.Panel1.Controls.Add(this.genealogyGraphChart);
-      this.splitContainer.Panel1MinSize = 50;
-      // 
-      // splitContainer.Panel2
-      // 
-      this.splitContainer.Panel2.Controls.Add(this.symbolicExpressionTreeChart);
-      this.splitContainer.Panel2MinSize = 50;
-      this.splitContainer.Size = new System.Drawing.Size(1066, 722);
-      this.splitContainer.SplitterDistance = 488;
-      this.splitContainer.TabIndex = 7;
-      // 
-      // symbolicExpressionTreeChart
-      // 
-      this.symbolicExpressionTreeChart.BackgroundColor = System.Drawing.Color.White;
-      this.symbolicExpressionTreeChart.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.symbolicExpressionTreeChart.LineColor = System.Drawing.Color.Black;
-      this.symbolicExpressionTreeChart.Location = new System.Drawing.Point(0, 0);
-      this.symbolicExpressionTreeChart.Name = "symbolicExpressionTreeChart";
-      this.symbolicExpressionTreeChart.Size = new System.Drawing.Size(572, 720);
-      this.symbolicExpressionTreeChart.Spacing = 5;
-      this.symbolicExpressionTreeChart.SuspendRepaint = false;
-      this.symbolicExpressionTreeChart.TabIndex = 2;
-      this.symbolicExpressionTreeChart.TextFont = new System.Drawing.Font("Times New Roman", 8F);
-      this.symbolicExpressionTreeChart.Tree = null;
       // 
       // topControlBox
@@ -141,66 +94,18 @@
       this.simpleLineagesCheckBox.CheckedChanged += new System.EventHandler(this.simpleLineagesCheckBox_CheckedChanged);
       // 
-      // groupBox1
-      // 
-      this.groupBox1.Controls.Add(this.matchConstantsCheckBox);
-      this.groupBox1.Controls.Add(this.matchVariableWeightsCheckBox);
-      this.groupBox1.Controls.Add(this.matchVariableNamesCheckBox);
-      this.groupBox1.Location = new System.Drawing.Point(104, 1);
-      this.groupBox1.Name = "groupBox1";
-      this.groupBox1.Size = new System.Drawing.Size(325, 44);
-      this.groupBox1.TabIndex = 12;
-      this.groupBox1.TabStop = false;
-      this.groupBox1.Text = "Matching constraints";
-      // 
-      // matchConstantsCheckBox
-      // 
-      this.matchConstantsCheckBox.AutoSize = true;
-      this.matchConstantsCheckBox.Checked = true;
-      this.matchConstantsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
-      this.matchConstantsCheckBox.Location = new System.Drawing.Point(6, 19);
-      this.matchConstantsCheckBox.Name = "matchConstantsCheckBox";
-      this.matchConstantsCheckBox.Size = new System.Drawing.Size(102, 17);
-      this.matchConstantsCheckBox.TabIndex = 5;
-      this.matchConstantsCheckBox.Text = "Constant values";
-      this.matchConstantsCheckBox.UseVisualStyleBackColor = true;
-      this.matchConstantsCheckBox.CheckedChanged += new System.EventHandler(this.matchConstantsCheckBox_CheckedChanged);
-      // 
-      // matchVariableWeightsCheckBox
-      // 
-      this.matchVariableWeightsCheckBox.AutoSize = true;
-      this.matchVariableWeightsCheckBox.Checked = true;
-      this.matchVariableWeightsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
-      this.matchVariableWeightsCheckBox.Location = new System.Drawing.Point(114, 19);
-      this.matchVariableWeightsCheckBox.Name = "matchVariableWeightsCheckBox";
-      this.matchVariableWeightsCheckBox.Size = new System.Drawing.Size(103, 17);
-      this.matchVariableWeightsCheckBox.TabIndex = 6;
-      this.matchVariableWeightsCheckBox.Text = "Variable weights";
-      this.matchVariableWeightsCheckBox.UseVisualStyleBackColor = true;
-      this.matchVariableWeightsCheckBox.CheckedChanged += new System.EventHandler(this.matchVariableWeightsCheckBox_CheckedChanged);
-      // 
-      // matchVariableNamesCheckBox
-      // 
-      this.matchVariableNamesCheckBox.AutoSize = true;
-      this.matchVariableNamesCheckBox.Checked = true;
-      this.matchVariableNamesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
-      this.matchVariableNamesCheckBox.Location = new System.Drawing.Point(223, 19);
-      this.matchVariableNamesCheckBox.Name = "matchVariableNamesCheckBox";
-      this.matchVariableNamesCheckBox.Size = new System.Drawing.Size(98, 17);
-      this.matchVariableNamesCheckBox.TabIndex = 7;
-      this.matchVariableNamesCheckBox.Text = "Variable names";
-      this.matchVariableNamesCheckBox.UseVisualStyleBackColor = true;
-      this.matchVariableNamesCheckBox.CheckedChanged += new System.EventHandler(this.matchVariableNamesCheckBox_CheckedChanged);
-      // 
       // genealogyGraphChart
       // 
+      this.genealogyGraphChart.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
       this.genealogyGraphChart.BackColor = System.Drawing.SystemColors.Control;
-      this.genealogyGraphChart.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.genealogyGraphChart.Location = new System.Drawing.Point(0, 0);
+      this.genealogyGraphChart.Chart = null;
+      this.genealogyGraphChart.GenealogyGraph = null;
+      this.genealogyGraphChart.Location = new System.Drawing.Point(3, 51);
       this.genealogyGraphChart.LockGenealogy = false;
       this.genealogyGraphChart.Name = "genealogyGraphChart";
       this.genealogyGraphChart.ScaleOnResize = true;
       this.genealogyGraphChart.SimpleLineages = false;
-      this.genealogyGraphChart.Size = new System.Drawing.Size(486, 720);
-      this.genealogyGraphChart.TabIndex = 2;
+      this.genealogyGraphChart.Size = new System.Drawing.Size(1066, 724);
+      this.genealogyGraphChart.TabIndex = 7;
       // 
       // GenealogyGraphView
@@ -208,17 +113,10 @@
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.groupBox1);
-      this.Controls.Add(this.splitContainer);
+      this.Controls.Add(this.genealogyGraphChart);
       this.Controls.Add(this.topControlBox);
       this.Name = "GenealogyGraphView";
       this.Size = new System.Drawing.Size(1072, 778);
-      this.splitContainer.Panel1.ResumeLayout(false);
-      this.splitContainer.Panel2.ResumeLayout(false);
-      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
-      this.splitContainer.ResumeLayout(false);
       this.topControlBox.ResumeLayout(false);
       this.graphControlsGroupBox.ResumeLayout(false);
-      this.groupBox1.ResumeLayout(false);
-      this.groupBox1.PerformLayout();
       this.ResumeLayout(false);
 
@@ -227,18 +125,11 @@
     #endregion
 
-    private System.Windows.Forms.SplitContainer splitContainer;
-    private SymbolicExpressionTreeChart symbolicExpressionTreeChart;
-
-    private GenealogyGraphChart genealogyGraphChart;
     private System.Windows.Forms.ToolTip toolTip;
     private System.Windows.Forms.Panel topControlBox;
-    private System.Windows.Forms.GroupBox groupBox1;
-    private System.Windows.Forms.CheckBox matchConstantsCheckBox;
-    private System.Windows.Forms.CheckBox matchVariableWeightsCheckBox;
-    private System.Windows.Forms.CheckBox matchVariableNamesCheckBox;
     private System.Windows.Forms.GroupBox graphControlsGroupBox;
     private System.Windows.Forms.Button highlightAllButton;
     private System.Windows.Forms.CheckBox simpleLineagesCheckBox;
     private System.Windows.Forms.CheckBox lockGenealogyCheckBox;
+    private GenealogyGraphChart genealogyGraphChart;
 
   }
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphView.cs	(revision 10268)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphView.cs	(revision 10269)
@@ -21,24 +21,15 @@
 
 using System;
-using System.Collections.Generic;
-using System.Drawing;
 using System.Linq;
 using System.Windows.Forms;
 using HeuristicLab.Core.Views;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
 using HeuristicLab.MainForm;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
 
 namespace HeuristicLab.EvolutionaryTracking.Views {
-  [View("SymbolicExpressionTreeGenealogyGraph")]
-  [Content(typeof(SymbolicExpressionTreeGenealogyGraph), IsDefaultView = true)]
+  [View("GenealogyGraph")]
+  [Content(typeof(GenealogyGraph), IsDefaultView = true)]
   public sealed partial class GenealogyGraphView : ItemView {
-    private VisualSymbolicExpressionTreeNode selectedVisualSymbExprTreeNode;
-    private SymbolicExpressionTreeNodeSimilarityComparer comparer;
-    private Dictionary<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode> clonedNodes;
-
-    public new SymbolicExpressionTreeGenealogyGraph Content {
-      get { return (SymbolicExpressionTreeGenealogyGraph)base.Content; }
+    public new GenealogyGraph Content {
+      get { return (GenealogyGraph)base.Content; }
       set { base.Content = value; }
     }
@@ -51,18 +42,9 @@
       this.simpleLineagesCheckBox.Image = Common.Resources.VSImageLibrary.ArrowDown;
       this.lockGenealogyCheckBox.Image = Common.Resources.VSImageLibrary.ProtectForm;
-
-      comparer = new SymbolicExpressionTreeNodeSimilarityComparer {
-        MatchConstantValues = true,
-        MatchVariableWeights = true,
-        MatchVariableNames = true
-      };
     }
 
     protected override void DeregisterContentEvents() {
       // TODO: Deregister your event handlers here
-      genealogyGraphChart.GenealogyGraphNodeClicked -= graphChart_GenealogyGraphNodeClicked;
-      symbolicExpressionTreeChart.SymbolicExpressionTreeNodeClicked -= treeChart_SymbolicExpressionTreeNodeClicked;
-      symbolicExpressionTreeChart.SymbolicExpressionTreeNodeDoubleClicked -= treeChart_SymbolicExpressionTreeNodeDoubleClicked;
-      Content.GraphUpdated -= genealogyGraphUpdated;
+      Content.GraphUpdated -= GenealogyGraphUpdated;
       base.DeregisterContentEvents();
     }
@@ -71,8 +53,5 @@
       base.RegisterContentEvents();
       // TODO: Register your event handlers here
-      genealogyGraphChart.GenealogyGraphNodeClicked += graphChart_GenealogyGraphNodeClicked;
-      symbolicExpressionTreeChart.SymbolicExpressionTreeNodeClicked += treeChart_SymbolicExpressionTreeNodeClicked;
-      symbolicExpressionTreeChart.SymbolicExpressionTreeNodeDoubleClicked += treeChart_SymbolicExpressionTreeNodeDoubleClicked;
-      Content.GraphUpdated += genealogyGraphUpdated;
+      Content.GraphUpdated += GenealogyGraphUpdated;
     }
 
@@ -81,16 +60,8 @@
     protected override void OnContentChanged() {
       base.OnContentChanged();
-      if (Content == null)
-        genealogyGraphChart.Graph = null;
-      else {
-        genealogyGraphChart.Graph = Content;
-        //        var best = Content.Nodes.OrderByDescending(x => x.Quality).First();
-        //        symbolicExpressionTreeChart.Tree = best.SymbolicExpressionTree;
-      }
+      genealogyGraphChart.GenealogyGraph = Content ?? null;
     }
-
     private void Content_GraphChanged(object sender, EventArgs e) {
     }
-
     protected override void SetEnabledStateOfControls() {
       base.SetEnabledStateOfControls();
@@ -100,94 +71,10 @@
 
     #region Event Handlers (child controls)
-
-    // TODO: Put event handlers of child controls here.
-    private void graphChart_GenealogyGraphNodeClicked(object sender, MouseEventArgs e) {
-      // the type hierarchy goes like this: VisualGenealogyGraphNode --> GenealogyGraphNode --> SymbolicExpressionTree
-      var visualGenealogyGraphNode = (VisualGenealogyGraphNode)sender;
-      var genealogyGraphNode = visualGenealogyGraphNode.Data;
-      symbolicExpressionTreeChart.Tree = genealogyGraphNode.SymbolicExpressionTree;
-
-      if (genealogyGraphNode.InEdges == null) return;
-      var arc = genealogyGraphNode.InEdges.Last(x => x.Source != x.Target);
-      if (arc == null || arc.Data == null) return;
-      var fragment = (IFragment)arc.Data;
-      if (fragment.Root == null) return;
-      foreach (var node in fragment.Root.IterateNodesBreadth()) {
-        var visualSymbExprTreeNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node);
-        visualSymbExprTreeNode.LineColor = Color.OrangeRed;
-      }
-      symbolicExpressionTreeChart.Repaint();
+    private void GenealogyGraphUpdated(object sender, EventArgs args) {
+      genealogyGraphChart.GenealogyGraph = Content;
     }
-
-    private void genealogyGraphUpdated(object sender, EventArgs args) {
-      genealogyGraphChart.Graph = Content;
-    }
-
-    private void treeChart_SymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) {
-      genealogyGraphChart.Chart.UpdateEnabled = false;
-      switch (e.Button) {
-        case MouseButtons.Left: {
-            selectedVisualSymbExprTreeNode = (VisualSymbolicExpressionTreeNode)sender;
-            if (selectedVisualSymbExprTreeNode == null) return;
-            ISymbolicExpressionTreeNode selectedSubtree = selectedVisualSymbExprTreeNode.SymbolicExpressionTreeNode;
-            var clonedSubtree = (ISymbolicExpressionTreeNode)selectedSubtree.Clone();
-            // map original nodes to cloned nodes
-            clonedNodes = selectedSubtree.IterateNodesPrefix()
-                                         .Zip(clonedSubtree.IterateNodesPrefix(), (original, clone) => new { original, clone })
-                                         .ToDictionary(p => p.original, p => p.clone);
-
-            foreach (var node in symbolicExpressionTreeChart.Tree.IterateNodesPrefix()) {
-              symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node).FillColor = Color.Transparent;
-            }
-            foreach (var node in selectedSubtree.IterateNodesPrefix()) {
-              symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node).FillColor = Color.LightBlue;
-            }
-            break;
-          }
-        case MouseButtons.Middle: {
-            var visualNode = (VisualSymbolicExpressionTreeNode)sender;
-            if (selectedVisualSymbExprTreeNode == null || selectedVisualSymbExprTreeNode == visualNode) return;
-            var selectedNode = visualNode.SymbolicExpressionTreeNode;
-            if (clonedNodes.ContainsKey(selectedNode)) {
-              var selectedClone = clonedNodes[selectedNode];
-              var parent = selectedClone.Parent;
-              if (parent == null) break;
-              int index = parent.IndexOfSubtree(selectedClone);
-              if (index == -1) break;
-              parent.RemoveSubtree(parent.IndexOfSubtree(selectedClone));
-              foreach (var node in selectedNode.IterateNodesPrefix()) {
-                symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node).FillColor = Color.Transparent;
-              }
-            }
-            break;
-          }
-      }
-      if (selectedVisualSymbExprTreeNode == null || clonedNodes == null) return;
-      // update visual graph nodes that contain matching trees
-      MatchNodesAndRepaint();
-      // refresh the tree chart
-      symbolicExpressionTreeChart.Repaint();
-    }
-
     void MatchNodesAndRepaint() {
       genealogyGraphChart.Chart.UpdateEnabled = false;
-      genealogyGraphChart.ClearAllNodes(); // clear node colors
-      var fragment = new Fragment { Root = clonedNodes[selectedVisualSymbExprTreeNode.SymbolicExpressionTreeNode] };
-      var fragmentLength = fragment.Length;
-      // highlight nodes
-      genealogyGraphChart.HighlightNodes(from node in genealogyGraphChart.Graph.Nodes
-                                         let tree = node.SymbolicExpressionTree
-                                         where tree.Length >= fragmentLength
-                                         where tree.Root.ContainsFragment(fragment, comparer)
-                                         select tree);
-      // highlight edges that contain a matching fragment
-      var fragmentSimilarityComparer = new SymbolicExpressionTreeFragmentSimilarityComparer {
-        SimilarityComparer = comparer
-      };
-      var matchingEdges = genealogyGraphChart.Graph.Nodes.Where(n => n.InEdges != null)
-                           .SelectMany(n => n.InEdges).Where(edge => edge.Data != null && ((IFragment)edge.Data).Root != null)
-                           .Where(edge => fragmentSimilarityComparer.Equals(fragment, (IFragment)edge.Data));
-      genealogyGraphChart.HighlightArcs(matchingEdges, Color.DodgerBlue);
-
+      genealogyGraphChart.ClearPrimitives(); // clear node colors
 
       genealogyGraphChart.Chart.UpdateEnabled = true;
@@ -198,23 +85,4 @@
     }
     #endregion
-
-    private void matchConstantsCheckBox_CheckedChanged(object sender, EventArgs e) {
-      comparer.MatchConstantValues = matchConstantsCheckBox.Checked;
-      if (selectedVisualSymbExprTreeNode != null)
-        MatchNodesAndRepaint();
-    }
-
-    private void matchVariableWeightsCheckBox_CheckedChanged(object sender, EventArgs e) {
-      comparer.MatchVariableWeights = matchVariableWeightsCheckBox.Checked;
-      if (selectedVisualSymbExprTreeNode != null)
-        MatchNodesAndRepaint();
-    }
-
-    private void matchVariableNamesCheckBox_CheckedChanged(object sender, EventArgs e) {
-      comparer.MatchVariableNames = matchVariableNamesCheckBox.Checked;
-      if (selectedVisualSymbExprTreeNode != null)
-        MatchNodesAndRepaint();
-    }
-
     private void simpleLineagesCheckBox_CheckedChanged(object sender, EventArgs e) {
       genealogyGraphChart.SimpleLineages = simpleLineagesCheckBox.Checked;
@@ -222,6 +90,4 @@
 
     private void highlightAllButton_Click(object sender, EventArgs e) {
-      symbolicExpressionTreeChart.Repaint();
-      genealogyGraphChart.HighlightAll();
     }
 
@@ -231,10 +97,10 @@
 
     private void highlightRootParentsButton_Click(object sender, EventArgs e) {
-      var nodes = genealogyGraphChart.Graph.Nodes.Where(n => n.InEdges != null && n.InEdges.Count == 2).Select(n => (SymbolicExpressionTreeGenealogyGraphNode)n.InEdges[0].Source).ToList();
+      var nodes = genealogyGraphChart.GenealogyGraph.Nodes.Where(n => n.InArcs != null && n.InArcs.Count == 2).Select(n => (GenealogyGraphNode)n.InArcs[0].Source).ToList();
       genealogyGraphChart.HighlightNodes(nodes);
     }
 
     private void highlightSecondaryParentsButton_Click(object sender, EventArgs e) {
-      var nodes = genealogyGraphChart.Graph.Nodes.Where(n => n.InEdges != null && n.InEdges.Count == 2).Select(n => (SymbolicExpressionTreeGenealogyGraphNode)n.InEdges[1].Source).ToList();
+      var nodes = genealogyGraphChart.GenealogyGraph.Nodes.Where(n => n.InArcs != null && n.InArcs.Count == 2).Select(n => (GenealogyGraphNode)n.InArcs[1].Source).ToList();
       genealogyGraphChart.HighlightNodes(nodes);
     }
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/HeuristicLab.EvolutionTracking.Views-3.4.csproj
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/HeuristicLab.EvolutionTracking.Views-3.4.csproj	(revision 10268)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/HeuristicLab.EvolutionTracking.Views-3.4.csproj	(revision 10269)
@@ -9,6 +9,6 @@
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>HeuristicLab.EvolutionaryTracking.Views</RootNamespace>
-    <AssemblyName>HeuristicLab.EvolutionaryTracking.Views-3.4</AssemblyName>
+    <RootNamespace>HeuristicLab.EvolutionTracking.Views</RootNamespace>
+    <AssemblyName>HeuristicLab.EvolutionTracking.Views-3.4</AssemblyName>
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
@@ -110,7 +110,4 @@
   <ItemGroup>
     <Compile Include="AncestryLayoutAdapter.cs" />
-    <Compile Include="ExtendedSymbolicExpressionTreeCanvas.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
     <Compile Include="FrequentFragmentsDialog.cs">
       <SubType>Form</SubType>
@@ -125,10 +122,4 @@
       <DependentUpon>GenealogyGraphChart.cs</DependentUpon>
     </Compile>
-    <Compile Include="GenealogyGraphDialog.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="GenealogyGraphDialog.designer.cs">
-      <DependentUpon>GenealogyGraphDialog.cs</DependentUpon>
-    </Compile>
     <Compile Include="GenealogyGraphView.cs">
       <SubType>UserControl</SubType>
@@ -136,10 +127,4 @@
     <Compile Include="GenealogyGraphView.Designer.cs">
       <DependentUpon>GenealogyGraphView.cs</DependentUpon>
-    </Compile>
-    <Compile Include="LineageExplorerView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="LineageExplorerView.Designer.cs">
-      <DependentUpon>LineageExplorerView.cs</DependentUpon>
     </Compile>
     <Compile Include="Plugin.cs" />
@@ -158,5 +143,13 @@
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.EvolutionaryTracking\3.4\HeuristicLab.EvolutionTracking-3.4.csproj">
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.csproj">
+      <Project>{423bd94f-963a-438e-ba45-3bb3d61cd03b}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
+      <Project>{06d4a186-9319-48a0-bade-a2058d462eea}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.EvolutionTracking\3.4\HeuristicLab.EvolutionTracking-3.4.csproj">
       <Project>{1f75cea3-464f-4a6f-b2f0-04b9841ebc16}</Project>
       <Name>HeuristicLab.EvolutionTracking-3.4</Name>
Index: anches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/LineageExplorerView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/LineageExplorerView.Designer.cs	(revision 10268)
+++ 	(revision )
@@ -1,301 +1,0 @@
-﻿namespace HeuristicLab.EvolutionaryTracking.Views {
-  partial class LineageExplorerView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();
-      this.karyographTab = new System.Windows.Forms.TabControl();
-      this.tabPage1 = new System.Windows.Forms.TabPage();
-      this.panel1 = new System.Windows.Forms.Panel();
-      this.qualityImprovementTreeView = new System.Windows.Forms.TreeView();
-      this.symbolicExpressionTreeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart();
-      this.scopeListTreeView = new System.Windows.Forms.TreeView();
-      this.panel2 = new System.Windows.Forms.Panel();
-      this.button1 = new System.Windows.Forms.Button();
-      this.showGenealogyButton = new System.Windows.Forms.Button();
-      this.calculateFragmentFrequencyButton = new System.Windows.Forms.Button();
-      this.tabPage2 = new System.Windows.Forms.TabPage();
-      this.panel4 = new System.Windows.Forms.Panel();
-      this.panel3 = new System.Windows.Forms.Panel();
-      this.showFrequentFragmentsButton = new System.Windows.Forms.Button();
-      this.textBox2 = new System.Windows.Forms.TextBox();
-      this.thresholdLabel = new System.Windows.Forms.Label();
-      this.bestNTextBox = new System.Windows.Forms.TextBox();
-      this.consideredTrees = new System.Windows.Forms.Label();
-      this.tabPage3 = new System.Windows.Forms.TabPage();
-      this.karyographTab.SuspendLayout();
-      this.tabPage1.SuspendLayout();
-      this.panel1.SuspendLayout();
-      this.panel2.SuspendLayout();
-      this.tabPage2.SuspendLayout();
-      this.panel3.SuspendLayout();
-      this.tabPage3.SuspendLayout();
-      this.SuspendLayout();
-      // 
-      // karyographTab
-      // 
-      this.karyographTab.Controls.Add(this.tabPage1);
-      this.karyographTab.Controls.Add(this.tabPage2);
-      this.karyographTab.Controls.Add(this.tabPage3);
-      this.karyographTab.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.karyographTab.Location = new System.Drawing.Point(0, 0);
-      this.karyographTab.Name = "karyographTab";
-      this.karyographTab.SelectedIndex = 0;
-      this.karyographTab.Size = new System.Drawing.Size(1016, 669);
-      this.karyographTab.TabIndex = 2;
-      // 
-      // tabPage1
-      // 
-      this.tabPage1.Controls.Add(this.panel1);
-      this.tabPage1.Controls.Add(this.panel2);
-      this.tabPage1.Location = new System.Drawing.Point(4, 22);
-      this.tabPage1.Name = "tabPage1";
-      this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
-      this.tabPage1.Size = new System.Drawing.Size(1008, 643);
-      this.tabPage1.TabIndex = 0;
-      this.tabPage1.Text = "Lineages";
-      this.tabPage1.UseVisualStyleBackColor = true;
-      // 
-      // panel1
-      // 
-      this.panel1.Controls.Add(this.qualityImprovementTreeView);
-      this.panel1.Controls.Add(this.symbolicExpressionTreeChart);
-      this.panel1.Controls.Add(this.scopeListTreeView);
-      this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.panel1.Location = new System.Drawing.Point(3, 36);
-      this.panel1.Name = "panel1";
-      this.panel1.Size = new System.Drawing.Size(1002, 604);
-      this.panel1.TabIndex = 1;
-      // 
-      // qualityImprovementTreeView
-      // 
-      this.qualityImprovementTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-            | System.Windows.Forms.AnchorStyles.Right)));
-      this.qualityImprovementTreeView.HideSelection = false;
-      this.qualityImprovementTreeView.Location = new System.Drawing.Point(887, 0);
-      this.qualityImprovementTreeView.Name = "qualityImprovementTreeView";
-      this.qualityImprovementTreeView.Size = new System.Drawing.Size(115, 604);
-      this.qualityImprovementTreeView.TabIndex = 10;
-      this.qualityImprovementTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.qualityImprovementTreeView_AfterSelect);
-      // 
-      // symbolicExpressionTreeChart
-      // 
-      this.symbolicExpressionTreeChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-            | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-      this.symbolicExpressionTreeChart.BackgroundColor = System.Drawing.Color.White;
-      this.symbolicExpressionTreeChart.LineColor = System.Drawing.Color.Black;
-      this.symbolicExpressionTreeChart.Location = new System.Drawing.Point(155, 0);
-      this.symbolicExpressionTreeChart.Name = "symbolicExpressionTreeChart";
-      this.symbolicExpressionTreeChart.Size = new System.Drawing.Size(726, 604);
-      this.symbolicExpressionTreeChart.Spacing = 5;
-      this.symbolicExpressionTreeChart.SuspendRepaint = false;
-      this.symbolicExpressionTreeChart.TabIndex = 12;
-      this.symbolicExpressionTreeChart.TextFont = new System.Drawing.Font("Times New Roman", 8F);
-      this.symbolicExpressionTreeChart.Tree = null;
-      // 
-      // scopeListTreeView
-      // 
-      this.scopeListTreeView.Dock = System.Windows.Forms.DockStyle.Left;
-      this.scopeListTreeView.HideSelection = false;
-      this.scopeListTreeView.Location = new System.Drawing.Point(0, 0);
-      this.scopeListTreeView.Name = "scopeListTreeView";
-      this.scopeListTreeView.Size = new System.Drawing.Size(155, 604);
-      this.scopeListTreeView.TabIndex = 11;
-      this.scopeListTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.scopeListTreeView_AfterSelect);
-      // 
-      // panel2
-      // 
-      this.panel2.Controls.Add(this.button1);
-      this.panel2.Controls.Add(this.showGenealogyButton);
-      this.panel2.Controls.Add(this.calculateFragmentFrequencyButton);
-      this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
-      this.panel2.Location = new System.Drawing.Point(3, 3);
-      this.panel2.Name = "panel2";
-      this.panel2.Size = new System.Drawing.Size(1002, 33);
-      this.panel2.TabIndex = 1;
-      // 
-      // button1
-      // 
-      this.button1.AutoSize = true;
-      this.button1.Location = new System.Drawing.Point(239, 4);
-      this.button1.Name = "button1";
-      this.button1.Size = new System.Drawing.Size(135, 23);
-      this.button1.TabIndex = 2;
-      this.button1.Text = "Show frequent fragments";
-      this.button1.UseVisualStyleBackColor = true;
-      this.button1.Click += new System.EventHandler(this.button1_Click);
-      // 
-      // showGenealogyButton
-      // 
-      this.showGenealogyButton.AutoSize = true;
-      this.showGenealogyButton.Location = new System.Drawing.Point(129, 4);
-      this.showGenealogyButton.Name = "showGenealogyButton";
-      this.showGenealogyButton.Size = new System.Drawing.Size(104, 23);
-      this.showGenealogyButton.TabIndex = 1;
-      this.showGenealogyButton.Text = "Show genealogy";
-      this.showGenealogyButton.UseVisualStyleBackColor = true;
-      this.showGenealogyButton.Click += new System.EventHandler(this.showGenealogyButton_Click);
-      // 
-      // calculateFragmentFrequencyButton
-      // 
-      this.calculateFragmentFrequencyButton.AutoSize = true;
-      this.calculateFragmentFrequencyButton.Location = new System.Drawing.Point(4, 4);
-      this.calculateFragmentFrequencyButton.Name = "calculateFragmentFrequencyButton";
-      this.calculateFragmentFrequencyButton.Size = new System.Drawing.Size(119, 23);
-      this.calculateFragmentFrequencyButton.TabIndex = 0;
-      this.calculateFragmentFrequencyButton.Text = "Fragment frequencies";
-      this.calculateFragmentFrequencyButton.UseVisualStyleBackColor = true;
-      this.calculateFragmentFrequencyButton.Click += new System.EventHandler(this.calculateFragmentFrequencyButton_Click);
-      // 
-      // tabPage2
-      // 
-      this.tabPage2.Controls.Add(this.panel4);
-      this.tabPage2.Controls.Add(this.panel3);
-      this.tabPage2.Location = new System.Drawing.Point(4, 22);
-      this.tabPage2.Name = "tabPage2";
-      this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
-      this.tabPage2.Size = new System.Drawing.Size(1008, 643);
-      this.tabPage2.TabIndex = 1;
-      this.tabPage2.Text = "Fragments";
-      this.tabPage2.UseVisualStyleBackColor = true;
-      // 
-      // panel4
-      // 
-      this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.panel4.Location = new System.Drawing.Point(3, 33);
-      this.panel4.Name = "panel4";
-      this.panel4.Size = new System.Drawing.Size(1002, 607);
-      this.panel4.TabIndex = 1;
-      // 
-      // panel3
-      // 
-      this.panel3.Controls.Add(this.showFrequentFragmentsButton);
-      this.panel3.Controls.Add(this.textBox2);
-      this.panel3.Controls.Add(this.thresholdLabel);
-      this.panel3.Controls.Add(this.bestNTextBox);
-      this.panel3.Controls.Add(this.consideredTrees);
-      this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
-      this.panel3.Location = new System.Drawing.Point(3, 3);
-      this.panel3.Name = "panel3";
-      this.panel3.Size = new System.Drawing.Size(1002, 30);
-      this.panel3.TabIndex = 0;
-      // 
-      // showFrequentFragmentsButton
-      // 
-      this.showFrequentFragmentsButton.AutoSize = true;
-      this.showFrequentFragmentsButton.Location = new System.Drawing.Point(218, 3);
-      this.showFrequentFragmentsButton.Name = "showFrequentFragmentsButton";
-      this.showFrequentFragmentsButton.Size = new System.Drawing.Size(135, 23);
-      this.showFrequentFragmentsButton.TabIndex = 19;
-      this.showFrequentFragmentsButton.Text = "Show frequent fragments";
-      this.showFrequentFragmentsButton.UseVisualStyleBackColor = true;
-      this.showFrequentFragmentsButton.Click += new System.EventHandler(this.showFrequentFragmentsButton_Click);
-      // 
-      // textBox2
-      // 
-      this.textBox2.Location = new System.Drawing.Point(173, 5);
-      this.textBox2.Name = "textBox2";
-      this.textBox2.Size = new System.Drawing.Size(39, 20);
-      this.textBox2.TabIndex = 18;
-      this.textBox2.Text = "0.2";
-      // 
-      // thresholdLabel
-      // 
-      this.thresholdLabel.AutoSize = true;
-      this.thresholdLabel.Location = new System.Drawing.Point(113, 9);
-      this.thresholdLabel.Name = "thresholdLabel";
-      this.thresholdLabel.Size = new System.Drawing.Size(54, 13);
-      this.thresholdLabel.TabIndex = 17;
-      this.thresholdLabel.Text = "Threshold";
-      // 
-      // bestNTextBox
-      // 
-      this.bestNTextBox.Location = new System.Drawing.Point(68, 6);
-      this.bestNTextBox.Name = "bestNTextBox";
-      this.bestNTextBox.Size = new System.Drawing.Size(39, 20);
-      this.bestNTextBox.TabIndex = 16;
-      this.bestNTextBox.Text = "10";
-      // 
-      // consideredTrees
-      // 
-      this.consideredTrees.AutoSize = true;
-      this.consideredTrees.Location = new System.Drawing.Point(3, 9);
-      this.consideredTrees.Name = "consideredTrees";
-      this.consideredTrees.Size = new System.Drawing.Size(63, 13);
-      this.consideredTrees.TabIndex = 15;
-      this.consideredTrees.Text = "Best n trees";
-      // 
-      // tabPage3
-      // 
-      this.tabPage3.Location = new System.Drawing.Point(4, 22);
-      this.tabPage3.Name = "tabPage3";
-      this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
-      this.tabPage3.Size = new System.Drawing.Size(1008, 643);
-      this.tabPage3.TabIndex = 2;
-      this.tabPage3.Text = "Karyograph";
-      this.tabPage3.UseVisualStyleBackColor = true;
-      // 
-      // LineageExplorerView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.karyographTab);
-      this.Name = "LineageExplorerView";
-      this.Size = new System.Drawing.Size(1016, 669);
-      this.karyographTab.ResumeLayout(false);
-      this.tabPage1.ResumeLayout(false);
-      this.panel1.ResumeLayout(false);
-      this.panel2.ResumeLayout(false);
-      this.panel2.PerformLayout();
-      this.tabPage2.ResumeLayout(false);
-      this.panel3.ResumeLayout(false);
-      this.panel3.PerformLayout();
-      this.tabPage3.ResumeLayout(false);
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.TabControl karyographTab;
-    private System.Windows.Forms.TabPage tabPage1;
-    private System.Windows.Forms.Panel panel1;
-    private System.Windows.Forms.TreeView qualityImprovementTreeView;
-    private Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart symbolicExpressionTreeChart;
-    private System.Windows.Forms.TreeView scopeListTreeView;
-    private System.Windows.Forms.TabPage tabPage2;
-    private System.Windows.Forms.Panel panel2;
-    private System.Windows.Forms.Button button1;
-    private System.Windows.Forms.Button showGenealogyButton;
-    private System.Windows.Forms.Button calculateFragmentFrequencyButton;
-    private System.Windows.Forms.Panel panel3;
-    private System.Windows.Forms.Button showFrequentFragmentsButton;
-    private System.Windows.Forms.TextBox textBox2;
-    private System.Windows.Forms.Label thresholdLabel;
-    private System.Windows.Forms.TextBox bestNTextBox;
-    private System.Windows.Forms.Label consideredTrees;
-    private System.Windows.Forms.Panel panel4;
-    private System.Windows.Forms.TabPage tabPage3;
-  }
-}
Index: anches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/LineageExplorerView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/LineageExplorerView.cs	(revision 10268)
+++ 	(revision )
@@ -1,278 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using System.Windows.Forms;
-using HeuristicLab.Common;
-using HeuristicLab.Core.Views;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
-using HeuristicLab.MainForm;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
-
-namespace HeuristicLab.EvolutionaryTracking.Views {
-  [View("LineageExplorerView")]
-  [Content(typeof(LineageExplorer), IsDefaultView = false)]
-  public sealed partial class LineageExplorerView : ItemView {
-    private Dictionary<TreeNode, ISymbolicExpressionTree> treeMap;
-    private List<SymbolicExpressionTreeGenealogyGraphNode> lineage;
-
-    private Dictionary<ISymbolicExpressionTree, Dictionary<ISymbolicExpressionTreeNode, double>> fragmentFrequencies;
-
-    public new LineageExplorer Content {
-      get { return (LineageExplorer)base.Content; }
-      set { base.Content = value; }
-    }
-
-    public LineageExplorerView() {
-      InitializeComponent();
-      treeMap = new Dictionary<TreeNode, ISymbolicExpressionTree>();
-    }
-
-    protected override void DeregisterContentEvents() {
-      // TODO: Deregister your event handlers here
-      base.DeregisterContentEvents();
-    }
-
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      // TODO: Register your event handlers here
-    }
-
-    #region Event Handlers (Content)
-    // TODO: Put event handlers of the content here
-    #endregion
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      if (Content == null) {
-      } else {
-        var tuples = Content.Trees.OrderByDescending(x => x.Item2).ToList();
-        scopeListTreeView.Nodes.AddRange(tuples.Select(x => new TreeNode(x.Item2.ToString())).ToArray());
-
-        for (int i = 0; i != tuples.Count; ++i) {
-          treeMap.Add(scopeListTreeView.Nodes[i], tuples[i].Item1);
-          double quality = tuples[i].Item2;
-          int colorIndex = (int)Math.Floor(quality * ColorGradient.Colors.Count);
-          var color = ColorGradient.Colors[colorIndex];
-          scopeListTreeView.Nodes[i].ForeColor = color;
-        }
-      }
-    }
-
-    protected override void SetEnabledStateOfControls() {
-      base.SetEnabledStateOfControls();
-      // TODO: Enable or disable controls based on whether the content is null or the view is set readonly
-    }
-
-    private void scopeListTreeView_AfterSelect(object sender, TreeViewEventArgs e) {
-      var treeNode = scopeListTreeView.SelectedNode;
-      var symbExprTree = treeMap[treeNode];
-
-      fragmentFrequencies = fragmentFrequencies ?? new Dictionary<ISymbolicExpressionTree, Dictionary<ISymbolicExpressionTreeNode, double>>();
-
-      if (fragmentFrequencies.ContainsKey(symbExprTree) && false) {
-        // colorize tree nodes according to fragment frequencies
-        symbolicExpressionTreeChart.SuspendRepaint = true;
-        var frequencies = fragmentFrequencies[symbExprTree];
-
-        foreach (var node in symbExprTree.IterateNodesBreadth()) {
-          double freq = frequencies[node];
-          int index = (int)Math.Floor(freq * ColorGradient.Colors.Count / scopeListTreeView.GetNodeCount(false));
-          if (index == ColorGradient.Colors.Count) index--;
-          var color = ColorGradient.Colors[index];
-          var visualNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node);
-          visualNode.FillColor = Color.FromArgb(200, color);
-        }
-        symbolicExpressionTreeChart.SuspendRepaint = false;
-        symbolicExpressionTreeChart.Repaint();
-      }
-      // highlight crossover fragment
-      HighlightFragment(symbExprTree);
-
-      var graphNode = Content.GenealogyGraph.GetGraphNodes(symbExprTree).Last();
-      lineage = lineage ?? new List<SymbolicExpressionTreeGenealogyGraphNode>();
-      lineage.Clear();
-      lineage.Add(graphNode);
-
-      var gn = graphNode;
-      while (gn.InEdges != null && gn.InEdges.Count != 0) {
-        gn = (SymbolicExpressionTreeGenealogyGraphNode)gn.InEdges[0].Source;
-        lineage.Add(gn);
-      }
-      lineage.Reverse(); // increasing order by generation
-
-      // update the righthand side tree view 
-      qualityImprovementTreeView.Nodes.Clear();
-      for (int i = 0; i != lineage.Count; ++i) {
-        var node = new TreeNode(string.Format("Generation {0}", lineage[i].Rank));
-        qualityImprovementTreeView.Nodes.Add(node);
-        var quality = lineage[i].Quality;
-        int colorIndex = (int)Math.Floor(quality * ColorGradient.Colors.Count);
-        var color = ColorGradient.Colors[colorIndex];
-        node.ForeColor = color;
-      }
-    }
-
-    /// <summary>
-    /// Given a symbolic expression tree, find the corresponding vertex in the genealogy graph, and highlight the fragment
-    /// that is saved as a data member in the incoming arc from the parent in the previous generation
-    /// </summary>
-    /// <param name="symbExprTree"></param>
-    private void HighlightFragment(ISymbolicExpressionTree symbExprTree) {
-      // update the symbolic expression tree chart with the new selected tree:
-      symbolicExpressionTreeChart.SuspendRepaint = true;
-      symbolicExpressionTreeChart.Tree = symbExprTree;
-      var matchingNodes = Content.GenealogyGraph.GetGraphNodes(symbExprTree);
-      SymbolicExpressionTreeGenealogyGraphNode graphNode = matchingNodes.First();
-      if (graphNode.InEdges == null) {
-        symbolicExpressionTreeChart.SuspendRepaint = false;
-        symbolicExpressionTreeChart.Repaint();
-        return;
-      }
-      var fragment = graphNode.InEdges.Count == 1 ? (IFragment)graphNode.InEdges[0].Data : (IFragment)graphNode.InEdges[1].Data;
-      if (fragment.Root == null) {
-        symbolicExpressionTreeChart.SuspendRepaint = false;
-        symbolicExpressionTreeChart.Repaint();
-        return;
-      }
-      foreach (var node in fragment.Root.IterateNodesBreadth()) {
-        var visualNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node);
-        visualNode.LineColor = Color.DodgerBlue;
-      }
-      symbolicExpressionTreeChart.SuspendRepaint = false;
-      symbolicExpressionTreeChart.Repaint();
-    }
-
-    private void qualityImprovementTreeView_AfterSelect(object sender, TreeViewEventArgs e) {
-      var tree = lineage[qualityImprovementTreeView.SelectedNode.Index].SymbolicExpressionTree;
-      HighlightFragment(tree);
-    }
-
-    private void calculateFragmentFrequencyButton_Click(object sender, EventArgs e) {
-      // the individual can occur multiple times in the graph if it is(was) elite. we take the first occurence.
-      var graphNode = Content.GenealogyGraph.GetGraphNodes(symbolicExpressionTreeChart.Tree).First();
-      var trees = Content.GenealogyGraph.Nodes.Where(x => x.Rank.IsAlmost(graphNode.Rank)).Select(x => x.SymbolicExpressionTree).ToList();
-
-      var fragments = graphNode.SymbolicExpressionTree.IterateNodesBreadth().Select(n => new Fragment { Root = n });
-
-      var similarityComparer = new SymbolicExpressionTreeNodeSimilarityComparer {
-        MatchConstantValues = false,
-        MatchVariableNames = true,
-        MatchVariableWeights = false
-      };
-
-      var canonicalSorter = new SymbolicExpressionTreeCanonicalSorter();
-
-      fragmentFrequencies = fragmentFrequencies ?? new Dictionary<ISymbolicExpressionTree, Dictionary<ISymbolicExpressionTreeNode, double>>();
-
-      if (!fragmentFrequencies.ContainsKey(graphNode.SymbolicExpressionTree)) {
-        fragmentFrequencies[graphNode.SymbolicExpressionTree] = new Dictionary<ISymbolicExpressionTreeNode, double>();
-      }
-
-      fragmentFrequencies[graphNode.SymbolicExpressionTree].Clear();
-
-      symbolicExpressionTreeChart.SuspendRepaint = true;
-      foreach (var f in fragments) {
-        double freq = 0;
-
-        foreach (var t in trees) {
-          if (t.Root.ContainsFragment(f, similarityComparer)) ++freq;
-        }
-
-        fragmentFrequencies[graphNode.SymbolicExpressionTree].Add(f.Root, freq);
-
-        // colorize tree nodes according to fragment frequencies
-        int index = (int)Math.Floor(freq * ColorGradient.Colors.Count / trees.Count);
-        if (index == ColorGradient.Colors.Count) index--;
-        var color = ColorGradient.Colors[index];
-        foreach (var node in f.Root.IterateNodesBreadth()) {
-          var visualNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node);
-          visualNode.FillColor = Color.FromArgb(200, color);
-        }
-      }
-
-      symbolicExpressionTreeChart.SuspendRepaint = false;
-      symbolicExpressionTreeChart.Repaint();
-    }
-
-    private void symbolicExpressionTreeChart_SymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) {
-    }
-
-    private void showGenealogyButton_Click(object sender, EventArgs e) {
-      var tree = symbolicExpressionTreeChart.Tree;
-      if (tree == null) return;
-      var graphNode = Content.GenealogyGraph.GetGraphNodes(tree).First();
-
-      var graph = new SymbolicExpressionTreeGenealogyGraph();
-      var ancestors = graphNode.Ancestors();
-      foreach (var ancestorNode in ancestors) {
-        graph.AddNode(ancestorNode);
-      }
-      using (var dialog = new GenealogyGraphDialog { Graph = graph }) {
-        dialog.ShowDialog(this);
-      }
-    }
-
-    private void button1_Click(object sender, EventArgs e) {
-      using (var dialog = new FrequentFragmentsDialog()) {
-        var panel = new Panel { Dock = DockStyle.Left, Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom };
-
-        panel.Controls.Add(new SymbolicExpressionTreeChart() { Tree = treeMap.Values.First() });
-        panel.Controls.Add(new Label { Text = "Fragment frequency." });
-
-        dialog.fragmentsPanel.Controls.Add(panel);
-
-        dialog.ShowDialog(this);
-      }
-    }
-
-    private void showFrequentFragmentsButton_Click(object sender, EventArgs e) {
-      int bestN;
-      bool success = int.TryParse(bestNTextBox.Text, out bestN);
-      if (!success) bestN = 10;
-      var tuples = Content.Trees.Select(t => new { Tree = t.Item1, Quality = t.Item2 }).OrderByDescending(x => x.Quality).ToList();
-      var bestTrees = tuples.Take(bestN).Select(x => x.Tree).ToList();
-
-      var similarityComparer = new SymbolicExpressionTreeNodeSimilarityComparer {
-        MatchConstantValues = false,
-        MatchVariableNames = true,
-        MatchVariableWeights = false
-      };
-
-      var fragments = bestTrees.SelectMany(t => t.IterateNodesBreadth()).Where(n => n.GetLength() >= 3).Distinct(similarityComparer).Select(n => new Fragment { Root = n });
-
-      double bestNQuality = tuples.Take(bestN).Sum(x => x.Quality); // average quality of best N individuals in the population
-
-      using (var dialog = new FrequentFragmentsDialog()) {
-        foreach (var fragment in fragments.Take(20)) {
-          double avgQuality = bestNQuality;
-          double frequency = bestN;
-          foreach (var t in tuples.Skip(bestN)) {
-            var tree = t.Tree;
-            if (tree.Root.ContainsFragment(fragment, similarityComparer)) {
-              avgQuality += t.Quality;
-              frequency++;
-            }
-          }
-          if (frequency > 0.2) {
-            var panel = new Panel {
-              Dock = DockStyle.Left,
-              Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom
-            };
-
-            panel.Controls.Add(new SymbolicExpressionTreeChart() { Tree = treeMap.Values.First() });
-            panel.Controls.Add(new Label { Text = "Fragment frequency." });
-
-            dialog.fragmentsPanel.Controls.Add(panel);
-          }
-        }
-        dialog.ShowDialog(this);
-      }
-    }
-
-    #region Event Handlers (child controls)
-    // TODO: Put event handlers of child controls here.
-    #endregion
-  }
-}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/Primitives/LabeledEllipse.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/Primitives/LabeledEllipse.cs	(revision 10268)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/Primitives/LabeledEllipse.cs	(revision 10269)
@@ -23,4 +23,5 @@
 using System.Drawing;
 using System.Linq;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Visualization;
 
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/Primitives/LabeledRectangle.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/Primitives/LabeledRectangle.cs	(revision 10268)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/Primitives/LabeledRectangle.cs	(revision 10269)
@@ -23,4 +23,5 @@
 using System.Drawing;
 using System.Linq;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Visualization;
 using Rectangle = HeuristicLab.Visualization.Rectangle;
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/VisualGenealogyGraphNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/VisualGenealogyGraphNode.cs	(revision 10268)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/VisualGenealogyGraphNode.cs	(revision 10269)
@@ -27,5 +27,5 @@
 namespace HeuristicLab.EvolutionaryTracking.Views {
   public class VisualGenealogyGraphNode : Ellipse {
-    public SymbolicExpressionTreeGenealogyGraphNode Data { get; internal set; }
+    public IGenealogyGraphNode Data { get; internal set; }
     private List<VisualGenealogyGraphArc> incomingArcs = new List<VisualGenealogyGraphArc>();
     private List<VisualGenealogyGraphArc> outgoingArcs = new List<VisualGenealogyGraphArc>();
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/HeuristicLab.EvolutionTracking-3.4.csproj
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/HeuristicLab.EvolutionTracking-3.4.csproj	(revision 10268)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/HeuristicLab.EvolutionTracking-3.4.csproj	(revision 10269)
@@ -131,39 +131,35 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Analyzers\BuildingBlocks\RelevantBuildingBlocksAnalyzer.cs" />
-    <Compile Include="Analyzers\BuildingBlocks\Poly10BuildingBlocksAnalyzer.cs" />
-    <Compile Include="Analyzers\SymbolicExpressionTreePruningAnalyzer.cs" />
-    <Compile Include="Analyzers\SymbolicExpressionTreeShapeAnalyzer.cs" />
-    <Compile Include="Analyzers\SymbolicExpressionTreeEvolvabilityAnalyzer.cs" />
-    <Compile Include="Analyzers\Fragments\SymbolicExpressionTreeRelativeFragmentDepthAnalyzer.cs" />
-    <Compile Include="Analyzers\Fragments\SymbolicExpressionTreeFragmentLengthsAnalyzer.cs" />
-    <Compile Include="Analyzers\SymbolicExpressionTreeFrequentPatternsAnalyzer.cs" />
-    <Compile Include="Analyzers\Fragments\SymbolicExpressionTreeFragmentsAnalyzer.cs" />
-    <Compile Include="FPGraph.cs" />
-    <Compile Include="Interfaces\IEdge.cs" />
-    <Compile Include="LineageExplorer.cs" />
-    <Compile Include="Operators\LineageAggregator.cs" />
-    <Compile Include="Operators\SymbolicExpressionTreeFPBuilder.cs" />
-    <Compile Include="Operators\SymbolicExpressionTreeGenealogyGraphBuilder.cs" />
-    <Compile Include="Analyzers\SymbolicExpressionTreePopulationDiversityAnalyzer.cs" />
-    <Compile Include="Analyzers\SymbolicExpressionTreeRelativeLengthAnalyzer.cs" />
-    <Compile Include="GenericGraph\GenericGraph.cs" />
-    <Compile Include="GenericGraph\Arc.cs" />
-    <Compile Include="GenericGraph\Vertex.cs" />
-    <Compile Include="Interfaces\IGenericGraph.cs" />
-    <Compile Include="Interfaces\IVertex.cs" />
-    <Compile Include="Interfaces\ISymbolicExpressionTreeGenealogyGraph.cs" />
-    <Compile Include="Operators\CleanupOperator.cs" />
-    <Compile Include="Operators\SymbolicExpressionTreeSymbolGraphBuilder.cs" />
-    <Compile Include="Operators\Util.cs" />
-    <Compile Include="Plugin.cs" />
+    <Compile Include="DirectedGraph\Arc.cs" />
+    <Compile Include="DirectedGraph\DirectedGraph.cs" />
+    <Compile Include="DirectedGraph\Interfaces\IArc.cs" />
+    <Compile Include="DirectedGraph\Interfaces\IDirectedGraph.cs" />
+    <Compile Include="DirectedGraph\Interfaces\IVertex.cs" />
+    <Compile Include="DirectedGraph\Vertex.cs" />
+    <Compile Include="EvolutionTrackingOperators\EvolutionTrackingAfterCreationOperator.cs" />
+    <Compile Include="EvolutionTrackingOperators\EvolutionTrackingAfterCrossoverOperator.cs" />
+    <Compile Include="EvolutionTrackingOperators\EvolutionTrackingOperator.cs" />
+    <Compile Include="FPGraph.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="GenealogyGraph\GenealogyGraph.cs" />
+    <Compile Include="GenealogyGraph\GenealogyGraphArc.cs" />
+    <Compile Include="GenealogyGraph\GenealogyGraphNode.cs" />
+    <Compile Include="GenealogyGraph\Interfaces\IGenealogyGraph.cs" />
+    <Compile Include="GenealogyGraph\Interfaces\IGenealogyGraphArc.cs" />
+    <Compile Include="GenealogyGraph\Interfaces\IGenealogyGraphNode.cs" />
+    <Compile Include="Plugin.cs">
+      <SubType>Code</SubType>
+    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="SymbolGraph.cs" />
-    <Compile Include="SymbolicExpressionTreeGenealogyGraph\SymbolicExpressionTreeGenealogyGraph.cs" />
-    <Compile Include="SymbolicExpressionTreeGenealogyGraph\SymbolicExpressionTreeGenealogyGraphNode.cs" />
+    <Compile Include="SymbolGraph.cs">
+      <SubType>Code</SubType>
+    </Compile>
   </ItemGroup>
-  <ItemGroup />
   <ItemGroup>
-    <WCFMetadata Include="Service References\" />
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
+      <Project>{06d4a186-9319-48a0-bade-a2058d462eea}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
+    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/HeuristicLab.EvolutionTracking-3.4.csproj.user
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/HeuristicLab.EvolutionTracking-3.4.csproj.user	(revision 10268)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/HeuristicLab.EvolutionTracking-3.4.csproj.user	(revision 10269)
@@ -2,5 +2,5 @@
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <ProjectView>ProjectFiles</ProjectView>
+    <ProjectView>ShowAllFiles</ProjectView>
   </PropertyGroup>
 </Project>
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/GraphicalSymbolicDataAnalysisModelView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/GraphicalSymbolicDataAnalysisModelView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/GraphicalSymbolicDataAnalysisModelView.cs	(revision 10269)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Windows.Forms;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  [View("Graphical Representation")]
+  [Content(typeof(ISymbolicDataAnalysisModel), true)]
+  public partial class GraphicalSymbolicDataAnalysisModelView : AsynchronousContentView {
+    public GraphicalSymbolicDataAnalysisModelView()
+      : base() {
+      InitializeComponent();
+    }
+
+    public new ISymbolicDataAnalysisModel Content {
+      get { return (ISymbolicDataAnalysisModel)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      symbolicExpressionTreeView.Content = null;
+      if (Content != null)
+        symbolicExpressionTreeView.Content = Content.SymbolicExpressionTree;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/GraphicalSymbolicDataAnalysisModelView.designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/GraphicalSymbolicDataAnalysisModelView.designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/GraphicalSymbolicDataAnalysisModelView.designer.cs	(revision 10269)
@@ -0,0 +1,78 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class GraphicalSymbolicDataAnalysisModelView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.symbolicExpressionTreeView = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.GraphicalSymbolicExpressionTreeView();
+      this.SuspendLayout();
+      // 
+      // expressionTreeView
+      // 
+      this.symbolicExpressionTreeView.AllowDrop = true;
+      this.symbolicExpressionTreeView.Caption = "Graphical SymbolicExpressionTree View";
+      this.symbolicExpressionTreeView.Content = null;
+      this.symbolicExpressionTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.symbolicExpressionTreeView.Location = new System.Drawing.Point(0, 0);
+      this.symbolicExpressionTreeView.Name = "expressionTreeView";
+      this.symbolicExpressionTreeView.ReadOnly = false;
+      this.symbolicExpressionTreeView.Size = new System.Drawing.Size(352, 413);
+      this.symbolicExpressionTreeView.TabIndex = 0;
+      // 
+      // SymbolicExpressionModelView
+      // 
+      this.AllowDrop = true;
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.symbolicExpressionTreeView);
+      this.Name = "SymbolicExpressionModelView";
+      this.Size = new System.Drawing.Size(352, 413);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+    private HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.GraphicalSymbolicExpressionTreeView symbolicExpressionTreeView;
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj	(revision 10269)
@@ -0,0 +1,349 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{7A2531CE-3F7C-4F13-BCCA-ED6DC27A7086}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.DataAnalysis.Symbolic.Views</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ALGLIB-3.7.0">
+      <HintPath>..\..\..\..\trunk\sources\bin\ALGLIB-3.7.0.dll</HintPath>
+    </Reference>
+    <Reference Include="EPPlus-3.1.3, Version=3.1.3.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\EPPlus-3.1.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core.Views-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core.Views-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Data.Views-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data.Views-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization.Views-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Views-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimizer-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimizer-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Parameters.Views-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters.Views-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Visualization.ChartControlsExtensions-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Windows.Forms.DataVisualization" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="InteractiveSymbolicExpressionTreeChart.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="InteractiveSymbolicExpressionTreeChart.Designer.cs">
+      <DependentUpon>InteractiveSymbolicExpressionTreeChart.cs</DependentUpon>
+    </Compile>
+    <Compile Include="MathSymbolicDataAnalysisModelView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="MathSymbolicDataAnalysisModelView.designer.cs">
+      <DependentUpon>MathSymbolicDataAnalysisModelView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="MenuItems\ExportSymbolicSolutionToExcelMenuItem.cs" />
+    <Compile Include="MenuItems\OptimizeDataAnalysisRunsMenuItem.cs" />
+    <Compile Include="Plugin.cs" />
+    <Compile Include="SlidingWindowDataView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SlidingWindowDataView.Designer.cs">
+      <DependentUpon>SlidingWindowDataView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="TextualSymbolicDataAnalysisModelView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="TextualSymbolicDataAnalysisModelView.designer.cs">
+      <DependentUpon>TextualSymbolicDataAnalysisModelView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs">
+      <DependentUpon>InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="GraphicalSymbolicDataAnalysisModelView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="GraphicalSymbolicDataAnalysisModelView.designer.cs">
+      <DependentUpon>GraphicalSymbolicDataAnalysisModelView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Symbols\ConstantView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Symbols\ConstantView.Designer.cs">
+      <DependentUpon>ConstantView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Symbols\LaggedVariableView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Symbols\LaggedVariableView.Designer.cs">
+      <DependentUpon>LaggedVariableView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Symbols\TimeLagView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Symbols\TimeLagView.Designer.cs">
+      <DependentUpon>TimeLagView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Symbols\VariableConditionView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Symbols\VariableConditionView.Designer.cs">
+      <DependentUpon>VariableConditionView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Symbols\VariableView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Symbols\VariableView.Designer.cs">
+      <DependentUpon>VariableView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="TreeEditDialogs\SymbolicExpressionTreeConstantNodeEditDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="TreeEditDialogs\SymbolicExpressionTreeConstantNodeEditDialog.Designer.cs">
+      <DependentUpon>SymbolicExpressionTreeConstantNodeEditDialog.cs</DependentUpon>
+    </Compile>
+    <Compile Include="TreeEditDialogs\SymbolicExpressionTreeVariableNodeEditDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="TreeEditDialogs\SymbolicExpressionTreeVariableNodeEditDialog.Designer.cs">
+      <DependentUpon>SymbolicExpressionTreeVariableNodeEditDialog.cs</DependentUpon>
+    </Compile>
+    <Compile Include="TreeEditDialogs\SymbolicExpressionTreeNodeInsertDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="TreeEditDialogs\SymbolicExpressionTreeNodeInsertDialog.Designer.cs">
+      <DependentUpon>SymbolicExpressionTreeNodeInsertDialog.cs</DependentUpon>
+    </Compile>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+    <Compile Include="RunCollectionVariableImpactView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="RunCollectionVariableImpactView.Designer.cs">
+      <DependentUpon>RunCollectionVariableImpactView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\HeuristicLab.EvolutionaryTracking\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.csproj">
+      <Project>{423bd94f-963a-438e-ba45-3bb3d61cd03b}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj">
+      <Project>{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="displayModelFrame.html">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+</PreBuildEvent>
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+export ProjectDir=$(ProjectDir)
+export SolutionDir=$(SolutionDir)
+
+$SolutionDir/PreBuildEvent.sh
+</PreBuildEvent>
+  </PropertyGroup>
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj.user
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj.user	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj.user	(revision 10269)
@@ -0,0 +1,6 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectView>ShowAllFiles</ProjectView>
+  </PropertyGroup>
+</Project>
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs	(revision 10269)
@@ -0,0 +1,232 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class InteractiveSymbolicDataAnalysisSolutionSimplifierView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      this.splitContainer = new System.Windows.Forms.SplitContainer();
+      this.grpSimplify = new System.Windows.Forms.GroupBox();
+      this.treeStatusValue = new System.Windows.Forms.Label();
+      this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
+      this.btnOptimizeConstants = new System.Windows.Forms.Button();
+      this.btnSimplify = new System.Windows.Forms.Button();
+      this.treeStatusLabel = new System.Windows.Forms.Label();
+      this.treeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart();
+      this.grpViewHost = new System.Windows.Forms.GroupBox();
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
+      this.splitContainer.Panel1.SuspendLayout();
+      this.splitContainer.Panel2.SuspendLayout();
+      this.splitContainer.SuspendLayout();
+      this.grpSimplify.SuspendLayout();
+      this.flowLayoutPanel.SuspendLayout();
+      this.grpViewHost.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // viewHost
+      // 
+      this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.viewHost.Caption = "View";
+      this.viewHost.Content = null;
+      this.viewHost.Enabled = false;
+      this.viewHost.Location = new System.Drawing.Point(6, 16);
+      this.viewHost.Name = "viewHost";
+      this.viewHost.ReadOnly = false;
+      this.viewHost.Size = new System.Drawing.Size(336, 383);
+      this.viewHost.TabIndex = 0;
+      this.viewHost.ViewsLabelVisible = true;
+      this.viewHost.ViewType = null;
+      // 
+      // splitContainer
+      // 
+      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer.Location = new System.Drawing.Point(0, 0);
+      this.splitContainer.Name = "splitContainer";
+      // 
+      // splitContainer.Panel1
+      // 
+      this.splitContainer.Panel1.Controls.Add(this.grpSimplify);
+      // 
+      // splitContainer.Panel2
+      // 
+      this.splitContainer.Panel2.Controls.Add(this.grpViewHost);
+      this.splitContainer.Size = new System.Drawing.Size(565, 405);
+      this.splitContainer.SplitterDistance = 213;
+      this.splitContainer.TabIndex = 1;
+      // 
+      // grpSimplify
+      // 
+      this.grpSimplify.AutoSize = true;
+      this.grpSimplify.Controls.Add(this.treeStatusValue);
+      this.grpSimplify.Controls.Add(this.flowLayoutPanel);
+      this.grpSimplify.Controls.Add(this.treeStatusLabel);
+      this.grpSimplify.Controls.Add(this.treeChart);
+      this.grpSimplify.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.grpSimplify.Location = new System.Drawing.Point(0, 0);
+      this.grpSimplify.Name = "grpSimplify";
+      this.grpSimplify.Size = new System.Drawing.Size(213, 405);
+      this.grpSimplify.TabIndex = 1;
+      this.grpSimplify.TabStop = false;
+      this.grpSimplify.Text = "Simplify";
+      // 
+      // treeStatusValue
+      // 
+      this.treeStatusValue.AutoSize = true;
+      this.treeStatusValue.BackColor = System.Drawing.Color.Transparent;
+      this.treeStatusValue.ForeColor = System.Drawing.Color.Green;
+      this.treeStatusValue.Location = new System.Drawing.Point(72, 16);
+      this.treeStatusValue.Name = "treeStatusValue";
+      this.treeStatusValue.Size = new System.Drawing.Size(30, 13);
+      this.treeStatusValue.TabIndex = 3;
+      this.treeStatusValue.Text = "Valid";
+      // 
+      // flowLayoutPanel
+      // 
+      this.flowLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.flowLayoutPanel.Controls.Add(this.btnSimplify);
+      this.flowLayoutPanel.Controls.Add(this.btnOptimizeConstants);
+      this.flowLayoutPanel.Location = new System.Drawing.Point(6, 370);
+      this.flowLayoutPanel.Name = "flowLayoutPanel";
+      this.flowLayoutPanel.Size = new System.Drawing.Size(204, 29);
+      this.flowLayoutPanel.TabIndex = 2;
+      this.flowLayoutPanel.WrapContents = false;
+      // 
+      // btnOptimizeConstants
+      // 
+      this.btnOptimizeConstants.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.btnOptimizeConstants.Enabled = false;
+      this.btnOptimizeConstants.Location = new System.Drawing.Point(104, 3);
+      this.btnOptimizeConstants.Name = "btnOptimizeConstants";
+      this.btnOptimizeConstants.Size = new System.Drawing.Size(97, 23);
+      this.btnOptimizeConstants.TabIndex = 2;
+      this.btnOptimizeConstants.Text = "Optimize";
+      this.btnOptimizeConstants.UseVisualStyleBackColor = true;
+      this.btnOptimizeConstants.Click += new System.EventHandler(this.btnOptimizeConstants_Click);
+      // 
+      // btnSimplify
+      // 
+      this.btnSimplify.Location = new System.Drawing.Point(3, 3);
+      this.btnSimplify.Name = "btnSimplify";
+      this.btnSimplify.Size = new System.Drawing.Size(95, 23);
+      this.btnSimplify.TabIndex = 1;
+      this.btnSimplify.Text = "Simplify";
+      this.btnSimplify.UseVisualStyleBackColor = true;
+      this.btnSimplify.Click += new System.EventHandler(this.btnSimplify_Click);
+      // 
+      // treeStatusLabel
+      // 
+      this.treeStatusLabel.AutoSize = true;
+      this.treeStatusLabel.BackColor = System.Drawing.Color.Transparent;
+      this.treeStatusLabel.Location = new System.Drawing.Point(6, 16);
+      this.treeStatusLabel.Name = "treeStatusLabel";
+      this.treeStatusLabel.Size = new System.Drawing.Size(68, 13);
+      this.treeStatusLabel.TabIndex = 2;
+      this.treeStatusLabel.Text = "Tree Status: ";
+      // 
+      // treeChart
+      // 
+      this.treeChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.treeChart.BackgroundColor = System.Drawing.Color.White;
+      this.treeChart.LineColor = System.Drawing.Color.Black;
+      this.treeChart.Location = new System.Drawing.Point(6, 32);
+      this.treeChart.Name = "treeChart";
+      this.treeChart.Size = new System.Drawing.Size(201, 332);
+      this.treeChart.Spacing = 5;
+      this.treeChart.SuspendRepaint = false;
+      this.treeChart.TabIndex = 0;
+      this.treeChart.TextFont = new System.Drawing.Font("Times New Roman", 8F);
+      this.treeChart.Tree = null;
+      this.treeChart.SymbolicExpressionTreeNodeDoubleClicked += new System.Windows.Forms.MouseEventHandler(this.treeChart_SymbolicExpressionTreeNodeDoubleClicked);
+      // 
+      // grpViewHost
+      // 
+      this.grpViewHost.Controls.Add(this.viewHost);
+      this.grpViewHost.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.grpViewHost.Location = new System.Drawing.Point(0, 0);
+      this.grpViewHost.Name = "grpViewHost";
+      this.grpViewHost.Size = new System.Drawing.Size(348, 405);
+      this.grpViewHost.TabIndex = 1;
+      this.grpViewHost.TabStop = false;
+      this.grpViewHost.Text = "Details";
+      // 
+      // InteractiveSymbolicDataAnalysisSolutionSimplifierView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.splitContainer);
+      this.DoubleBuffered = true;
+      this.Name = "InteractiveSymbolicDataAnalysisSolutionSimplifierView";
+      this.Size = new System.Drawing.Size(565, 405);
+      this.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel1.PerformLayout();
+      this.splitContainer.Panel2.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
+      this.splitContainer.ResumeLayout(false);
+      this.grpSimplify.ResumeLayout(false);
+      this.grpSimplify.PerformLayout();
+      this.flowLayoutPanel.ResumeLayout(false);
+      this.grpViewHost.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart treeChart;
+    private System.Windows.Forms.SplitContainer splitContainer;
+    private HeuristicLab.MainForm.WindowsForms.ViewHost viewHost;
+    private System.Windows.Forms.GroupBox grpSimplify;
+    private System.Windows.Forms.GroupBox grpViewHost;
+    private System.Windows.Forms.Button btnSimplify;
+    private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel;
+    protected System.Windows.Forms.Button btnOptimizeConstants;
+    private System.Windows.Forms.Label treeStatusValue;
+    private System.Windows.Forms.Label treeStatusLabel;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs	(revision 10269)
@@ -0,0 +1,167 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  public abstract partial class InteractiveSymbolicDataAnalysisSolutionSimplifierView : AsynchronousContentView {
+    private Dictionary<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode> foldedNodes;
+    private Dictionary<ISymbolicExpressionTreeNode, double> nodeImpacts;
+    private enum TreeState { Valid, Invalid }
+
+    public InteractiveSymbolicDataAnalysisSolutionSimplifierView() {
+      InitializeComponent();
+      foldedNodes = new Dictionary<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode>();
+      nodeImpacts = new Dictionary<ISymbolicExpressionTreeNode, double>();
+      this.Caption = "Interactive Solution Simplifier";
+    }
+
+    public new ISymbolicDataAnalysisSolution Content {
+      get { return (ISymbolicDataAnalysisSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ModelChanged += Content_Changed;
+      Content.ProblemDataChanged += Content_Changed;
+    }
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ModelChanged -= Content_Changed;
+      Content.ProblemDataChanged -= Content_Changed;
+    }
+
+    private void Content_Changed(object sender, EventArgs e) {
+      UpdateView();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      foldedNodes = new Dictionary<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode>();
+      UpdateView();
+      viewHost.Content = this.Content;
+    }
+
+    private void UpdateView() {
+      if (Content == null || Content.Model == null || Content.ProblemData == null) return;
+      var tree = Content.Model.SymbolicExpressionTree;
+      treeChart.Tree = tree.Root.SubtreeCount > 1 ? new SymbolicExpressionTree(tree.Root) : new SymbolicExpressionTree(tree.Root.GetSubtree(0).GetSubtree(0));
+
+      var replacementValues = CalculateReplacementValues(tree);
+      foreach (var pair in replacementValues.Where(pair => !(pair.Key is ConstantTreeNode))) {
+        foldedNodes[pair.Key] = MakeConstantTreeNode(pair.Value);
+      }
+
+      nodeImpacts = CalculateImpactValues(tree);
+      PaintNodeImpacts();
+    }
+
+    protected abstract Dictionary<ISymbolicExpressionTreeNode, double> CalculateReplacementValues(ISymbolicExpressionTree tree);
+    protected abstract Dictionary<ISymbolicExpressionTreeNode, double> CalculateImpactValues(ISymbolicExpressionTree tree);
+    protected abstract void UpdateModel(ISymbolicExpressionTree tree);
+
+    private static ConstantTreeNode MakeConstantTreeNode(double value) {
+      var constant = new Constant { MinValue = value - 1, MaxValue = value + 1 };
+      var constantTreeNode = (ConstantTreeNode)constant.CreateTreeNode();
+      constantTreeNode.Value = value;
+      return constantTreeNode;
+    }
+
+    private void treeChart_SymbolicExpressionTreeNodeDoubleClicked(object sender, MouseEventArgs e) {
+      var visualNode = (VisualSymbolicExpressionTreeNode)sender;
+      var symbExprTreeNode = (SymbolicExpressionTreeNode)visualNode.SymbolicExpressionTreeNode;
+      if (symbExprTreeNode == null) return;
+      var tree = Content.Model.SymbolicExpressionTree;
+      var parent = symbExprTreeNode.Parent;
+      int indexOfSubtree = parent.IndexOfSubtree(symbExprTreeNode);
+      if (foldedNodes.ContainsKey(symbExprTreeNode)) {
+        // undo node folding
+        SwitchNodeWithReplacementNode(parent, indexOfSubtree);
+      }
+      UpdateModel(tree);
+    }
+
+    private void SwitchNodeWithReplacementNode(ISymbolicExpressionTreeNode parent, int subTreeIndex) {
+      ISymbolicExpressionTreeNode subTree = parent.GetSubtree(subTreeIndex);
+      parent.RemoveSubtree(subTreeIndex);
+      if (foldedNodes.ContainsKey(subTree)) {
+        var replacementNode = foldedNodes[subTree];
+        parent.InsertSubtree(subTreeIndex, replacementNode);
+        // exchange key and value 
+        foldedNodes.Remove(subTree);
+        foldedNodes.Add(replacementNode, subTree);
+      }
+    }
+
+    private void PaintNodeImpacts() {
+      var impacts = nodeImpacts.Values;
+      double max = impacts.Max();
+      double min = impacts.Min();
+      foreach (ISymbolicExpressionTreeNode treeNode in Content.Model.SymbolicExpressionTree.IterateNodesPostfix()) {
+        VisualSymbolicExpressionTreeNode visualTree = treeChart.GetVisualSymbolicExpressionTreeNode(treeNode);
+
+        if (!(treeNode is ConstantTreeNode) && nodeImpacts.ContainsKey(treeNode)) {
+          double impact = nodeImpacts[treeNode];
+
+          // impact = 0 if no change
+          // impact < 0 if new solution is better
+          // impact > 0 if new solution is worse
+          if (impact < 0.0) {
+            // min is guaranteed to be < 0
+            visualTree.FillColor = Color.FromArgb((int)(impact / min * 255), Color.Red);
+          } else if (impact.IsAlmost(0.0)) {
+            visualTree.FillColor = Color.White;
+          } else {
+            // max is guaranteed to be > 0
+            visualTree.FillColor = Color.FromArgb((int)(impact / max * 255), Color.Green);
+          }
+          visualTree.ToolTip += Environment.NewLine + "Node impact: " + impact;
+          var constantReplacementNode = foldedNodes[treeNode] as ConstantTreeNode;
+          if (constantReplacementNode != null) {
+            visualTree.ToolTip += Environment.NewLine + "Replacement value: " + constantReplacementNode.Value;
+          }
+        }
+        if (visualTree != null)
+          if (treeNode is ConstantTreeNode && foldedNodes.ContainsKey(treeNode)) {
+            visualTree.LineColor = Color.DarkOrange;
+          }
+      }
+      treeChart.RepaintNodes();
+    }
+
+    private void btnSimplify_Click(object sender, EventArgs e) {
+      var simplifier = new SymbolicDataAnalysisExpressionTreeSimplifier();
+      var simplifiedExpressionTree = simplifier.Simplify(Content.Model.SymbolicExpressionTree);
+      UpdateModel(simplifiedExpressionTree);
+    }
+
+    protected abstract void btnOptimizeConstants_Click(object sender, EventArgs e);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.Designer.cs	(revision 10269)
@@ -0,0 +1,157 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Windows.Forms;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class InteractiveSymbolicExpressionTreeChart {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.insertNodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.changeNodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.cutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.removeNodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.removeSubtreeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.pasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
+      this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.SuspendLayout();
+      // 
+      // insertNodeToolStripMenuItem
+      // 
+      this.insertNodeToolStripMenuItem.Name = "insertNodeToolStripMenuItem";
+      this.insertNodeToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
+      this.insertNodeToolStripMenuItem.Text = "Insert Node";
+      this.insertNodeToolStripMenuItem.Click += new System.EventHandler(this.insertNodeToolStripMenuItem_Click);
+      // 
+      // changeNodeToolStripMenuItem
+      // 
+      this.changeNodeToolStripMenuItem.Name = "changeNodeToolStripMenuItem";
+      this.changeNodeToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
+      this.changeNodeToolStripMenuItem.Text = "Change Node";
+      this.changeNodeToolStripMenuItem.Click += new System.EventHandler(this.changeNodeToolStripMenuItem_Click);
+      // 
+      // cutToolStripMenuItem
+      // 
+      this.cutToolStripMenuItem.Name = "cutToolStripMenuItem";
+      this.cutToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
+      this.cutToolStripMenuItem.Text = "Cut";
+      this.cutToolStripMenuItem.Click += new System.EventHandler(this.cutToolStripMenuItem_Click);
+      // 
+      // removeToolStripMenuItem
+      // 
+      this.removeToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.removeNodeToolStripMenuItem,
+            this.removeSubtreeToolStripMenuItem});
+      this.removeToolStripMenuItem.Name = "removeToolStripMenuItem";
+      this.removeToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
+      this.removeToolStripMenuItem.Text = "Remove";
+      this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeSubtreeToolStripMenuItem_Click);
+      // 
+      // removeNodeToolStripMenuItem
+      // 
+      this.removeNodeToolStripMenuItem.Name = "removeNodeToolStripMenuItem";
+      this.removeNodeToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
+      this.removeNodeToolStripMenuItem.Text = "Node";
+      this.removeNodeToolStripMenuItem.Click += new System.EventHandler(this.removeNodeToolStripMenuItem_Click);
+      // 
+      // removeSubtreeToolStripMenuItem
+      // 
+      this.removeSubtreeToolStripMenuItem.Name = "removeSubtreeToolStripMenuItem";
+      this.removeSubtreeToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
+      this.removeSubtreeToolStripMenuItem.Text = "Subtree";
+      this.removeSubtreeToolStripMenuItem.Click += new System.EventHandler(this.removeSubtreeToolStripMenuItem_Click);
+      // 
+      // pasteToolStripMenuItem
+      // 
+      this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem";
+      this.pasteToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
+      this.pasteToolStripMenuItem.Text = "Paste";
+      this.pasteToolStripMenuItem.Click += new System.EventHandler(this.pasteToolStripMenuItem_Clicked);
+      // 
+      // toolStripSeparator
+      // 
+      this.toolStripSeparator.Name = "toolStripSeparator";
+      this.toolStripSeparator.Size = new System.Drawing.Size(149, 6);
+      // 
+      // copyToolStripMenuItem
+      // 
+      this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
+      this.copyToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
+      this.copyToolStripMenuItem.Text = "Copy";
+      this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
+      //
+      // contextMenuStrip
+      //
+      this.contextMenuStrip.Opened += this.contextMenuStrip_Opened;
+      this.contextMenuStrip.Items.AddRange(new ToolStripItem[] { insertNodeToolStripMenuItem, 
+                                                                 changeNodeToolStripMenuItem, 
+                                                                 copyToolStripMenuItem, 
+                                                                 cutToolStripMenuItem, 
+                                                                 removeToolStripMenuItem, 
+                                                                 pasteToolStripMenuItem });
+      // 
+      // InteractiveSymbolicExpressionTreeChart
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.DoubleBuffered = true;
+      this.Name = "InteractiveSymbolicExpressionTreeChart";
+      this.ResumeLayout(false);
+
+    }
+
+    private ToolStripMenuItem insertNodeToolStripMenuItem;
+    private ToolStripMenuItem changeNodeToolStripMenuItem;
+    private ToolStripMenuItem cutToolStripMenuItem;
+    private ToolStripMenuItem pasteToolStripMenuItem;
+    private ToolStripMenuItem removeToolStripMenuItem;
+    private ToolStripMenuItem removeNodeToolStripMenuItem;
+    private ToolStripMenuItem removeSubtreeToolStripMenuItem;
+
+    #endregion
+
+    private ToolStripSeparator toolStripSeparator;
+    private ToolStripMenuItem copyToolStripMenuItem;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs	(revision 10269)
@@ -0,0 +1,234 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  internal delegate void
+  ModifyTree(ISymbolicExpressionTree tree, ISymbolicExpressionTreeNode node, ISymbolicExpressionTreeNode oldChild, ISymbolicExpressionTreeNode newChild, bool removeSubtree = true);
+
+  internal sealed partial class InteractiveSymbolicExpressionTreeChart : SymbolicExpressionTreeChart {
+    private ISymbolicExpressionTreeNode tempNode; // node in clipboard (to be cut/copy/pasted etc)
+    private VisualSymbolicExpressionTreeNode currSelected; // currently selected node
+    private enum EditOp { NoOp, CopySubtree, CutSubtree }
+    private EditOp lastOp = EditOp.NoOp;
+
+    // delegate to notify the parent container (the view) about the tree edit operations that it needs to perform
+    public ModifyTree ModifyTree { get; set; }
+
+    public InteractiveSymbolicExpressionTreeChart() {
+      InitializeComponent();
+      currSelected = null;
+      tempNode = null;
+    }
+
+    private void contextMenuStrip_Opened(object sender, EventArgs e) {
+      var menuStrip = (ContextMenuStrip)sender;
+      var point = menuStrip.SourceControl.PointToClient(Cursor.Position);
+      var ea = new MouseEventArgs(MouseButtons.Left, 1, point.X, point.Y, 0);
+      var visualNode = FindVisualSymbolicExpressionTreeNodeAt(ea.X, ea.Y);
+      if (visualNode != null) {
+        OnSymbolicExpressionTreeNodeClicked(visualNode, ea);
+      } else {
+        currSelected = null;
+      }
+
+      if (currSelected == null) {
+        insertNodeToolStripMenuItem.Visible = false;
+        changeNodeToolStripMenuItem.Visible = false;
+        copyToolStripMenuItem.Visible = false;
+        cutToolStripMenuItem.Visible = false;
+        removeToolStripMenuItem.Visible = false;
+        pasteToolStripMenuItem.Visible = false;
+      } else {
+        var node = currSelected.SymbolicExpressionTreeNode;
+        insertNodeToolStripMenuItem.Visible = true;
+        changeNodeToolStripMenuItem.Visible = true;
+        changeNodeToolStripMenuItem.Enabled = (node is SymbolicExpressionTreeTerminalNode);
+        insertNodeToolStripMenuItem.Enabled = !changeNodeToolStripMenuItem.Enabled;
+        copyToolStripMenuItem.Visible = true;
+        cutToolStripMenuItem.Visible = true;
+        removeToolStripMenuItem.Visible = true;
+
+        pasteToolStripMenuItem.Visible = true;
+        pasteToolStripMenuItem.Enabled = tempNode != null && insertNodeToolStripMenuItem.Enabled
+                                                          && !(lastOp == EditOp.CutSubtree
+                                                               && tempNode.IterateNodesBreadth().Contains(currSelected.SymbolicExpressionTreeNode));
+      }
+    }
+
+    protected override void OnSymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) {
+      currSelected = (VisualSymbolicExpressionTreeNode)sender; ;
+      if (currSelected != null) {
+        currSelected.LineColor = Color.FromArgb(130, currSelected.LineColor);
+        RepaintNode(currSelected);
+      }
+      base.OnSymbolicExpressionTreeNodeClicked(sender, e);
+    }
+
+    protected override void SymbolicExpressionTreeChart_MouseClick(object sender, MouseEventArgs e) {
+      if (currSelected != null) {
+        currSelected.LineColor = Color.FromArgb(255, currSelected.LineColor);
+        RepaintNode(currSelected);
+      }
+      base.SymbolicExpressionTreeChart_MouseClick(sender, e);
+    }
+
+    protected override void OnSymbolicExpressionTreeNodeDoubleClicked(object sender, MouseEventArgs e) {
+      currSelected = null;
+      base.OnSymbolicExpressionTreeNodeDoubleClicked(sender, e);
+    }
+
+    private void insertNodeToolStripMenuItem_Click(object sender, EventArgs e) {
+      if (currSelected == null || currSelected.SymbolicExpressionTreeNode is SymbolicExpressionTreeTerminalNode) return;
+      var parent = currSelected.SymbolicExpressionTreeNode;
+
+      using (var dialog = new InsertNodeDialog()) {
+        dialog.SetAllowedSymbols(parent.Grammar.AllowedSymbols.Where(s => s.Enabled && s.InitialFrequency > 0.0 && !(s is ProgramRootSymbol || s is StartSymbol || s is Defun)));
+        dialog.ShowDialog(this);
+        if (dialog.DialogResult != DialogResult.OK) return;
+
+        var symbol = dialog.SelectedSymbol();
+        var node = symbol.CreateTreeNode();
+        if (node is ConstantTreeNode) {
+          var constant = node as ConstantTreeNode;
+          constant.Value = double.Parse(dialog.constantValueTextBox.Text);
+        } else if (node is VariableTreeNode) {
+          var variable = node as VariableTreeNode;
+          variable.Weight = double.Parse(dialog.variableWeightTextBox.Text);
+          variable.VariableName = dialog.variableNamesCombo.Text;
+        } else if (node.Symbol.MinimumArity <= parent.SubtreeCount && node.Symbol.MaximumArity >= parent.SubtreeCount) {
+          for (int i = parent.SubtreeCount - 1; i >= 0; --i) {
+            var child = parent.GetSubtree(i);
+            parent.RemoveSubtree(i);
+            node.AddSubtree(child);
+          }
+        }
+        // the if condition will always be true for the final else clause above
+        if (parent.Symbol.MaximumArity > parent.SubtreeCount) {
+          ModifyTree(Tree, parent, null, node);
+        }
+      }
+      currSelected = null;
+    }
+    private void changeNodeToolStripMenuItem_Click(object sender, EventArgs e) {
+      if (currSelected == null) return;
+
+      var node = (ISymbolicExpressionTreeNode)currSelected.SymbolicExpressionTreeNode.Clone();
+      var originalNode = currSelected.SymbolicExpressionTreeNode;
+
+      ISymbolicExpressionTreeNode newNode = null;
+      var result = DialogResult.Cancel;
+      if (node is ConstantTreeNode) {
+        using (var dialog = new ConstantNodeEditDialog(node)) {
+          dialog.ShowDialog(this);
+          newNode = dialog.NewNode;
+          result = dialog.DialogResult;
+        }
+      } else if (node is VariableTreeNode) {
+        using (var dialog = new VariableNodeEditDialog(node)) {
+          dialog.ShowDialog(this);
+          newNode = dialog.NewNode;
+          result = dialog.DialogResult;
+        }
+      }
+      if (result != DialogResult.OK) return;
+      ModifyTree(Tree, originalNode.Parent, originalNode, newNode); // this will replace the original node with the new node
+      currSelected = null;
+    }
+    private void cutToolStripMenuItem_Click(object sender, EventArgs e) {
+      lastOp = EditOp.CutSubtree;
+      copySubtree();
+    }
+    private void copyToolStripMenuItem_Click(object sender, EventArgs e) {
+      lastOp = EditOp.CopySubtree;
+      copySubtree();
+    }
+    private void copySubtree() {
+      if (tempNode != null) {
+        foreach (var subtree in tempNode.IterateNodesPostfix()) {
+          var visualNode = GetVisualSymbolicExpressionTreeNode(subtree);
+          visualNode.LineColor = Color.FromArgb(255, visualNode.LineColor); // reset the alpha value to 255
+          visualNode.TextColor = Color.FromArgb(255, visualNode.TextColor);
+          if (subtree.Parent != null) {
+            var visualLine = GetVisualSymbolicExpressionTreeNodeConnection(subtree.Parent, subtree);
+            visualLine.LineColor = Color.FromArgb(255, visualLine.LineColor);
+          }
+        }
+      }
+      tempNode = currSelected.SymbolicExpressionTreeNode;
+      foreach (var node in tempNode.IterateNodesPostfix()) {
+        var visualNode = GetVisualSymbolicExpressionTreeNode(node);
+        visualNode.LineColor = Color.FromArgb(100, visualNode.LineColor);
+        visualNode.TextColor = Color.FromArgb(100, visualNode.TextColor);
+        foreach (var subtree in node.Subtrees) {
+          var visualLine = GetVisualSymbolicExpressionTreeNodeConnection(node, subtree);
+          visualLine.LineColor = Color.FromArgb(100, visualLine.LineColor);
+        }
+      }
+      currSelected = null;
+      Repaint();
+    }
+    private void removeNodeToolStripMenuItem_Click(object sender, EventArgs e) {
+      var node = currSelected.SymbolicExpressionTreeNode;
+      if (node == tempNode) tempNode = null;
+      ModifyTree(Tree, node.Parent, node, null, removeSubtree: false);
+      currSelected = null; // because the currently selected node was just deleted
+    }
+    private void removeSubtreeToolStripMenuItem_Click(object sender, EventArgs e) {
+      var node = currSelected.SymbolicExpressionTreeNode;
+      if (node.IterateNodesPostfix().Contains(tempNode)) tempNode = null;
+      ModifyTree(Tree, node.Parent, node, null, removeSubtree: true);
+      currSelected = null; // because the currently selected node was just deleted
+      contextMenuStrip.Close(); // avoid display of submenus since the action has already been performed
+    }
+    private void pasteToolStripMenuItem_Clicked(object sender, EventArgs e) {
+      if (!(lastOp == EditOp.CopySubtree || lastOp == EditOp.CutSubtree)) return;
+      // check if the copied/cut node (stored in the tempNode) can be inserted as a child of the current selected node
+      var node = currSelected.SymbolicExpressionTreeNode;
+      if (node is ConstantTreeNode || node is VariableTreeNode) return;
+      // check if the currently selected node can accept the copied node as a child 
+      // no need to check the grammar, an arity check will do just fine here
+      if (node.Symbol.MaximumArity <= node.SubtreeCount) return;
+      switch (lastOp) {
+        case EditOp.CutSubtree: {
+            if (tempNode.IterateNodesBreadth().Contains(node))
+              throw new ArgumentException();// cannot cut/paste a node into itself
+            ModifyTree(Tree, tempNode.Parent, tempNode, null); //remove node from its original parent 	 	 
+            ModifyTree(Tree, node, null, tempNode); //insert it as a child to the new parent 
+            break;
+          }
+        case EditOp.CopySubtree: {
+            var clone = (SymbolicExpressionTreeNode)tempNode.Clone();
+            ModifyTree(Tree, node, null, clone);
+            break;
+          }
+      }
+      currSelected = null; // because the tree will have changed
+      tempNode = null; // clear the clipboard after one paste
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MathSymbolicDataAnalysisModelView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MathSymbolicDataAnalysisModelView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MathSymbolicDataAnalysisModelView.cs	(revision 10269)
@@ -0,0 +1,70 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.IO;
+using System.Windows.Forms;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  [View("Mathematical Representation")]
+  [Content(typeof(ISymbolicDataAnalysisModel))]
+  public partial class MathSymbolicDataAnalysisModelView : AsynchronousContentView {
+    private SymbolicDataAnalysisExpressionLatexFormatter formatter = new SymbolicDataAnalysisExpressionLatexFormatter();
+    public MathSymbolicDataAnalysisModelView()
+      : base() {
+      InitializeComponent();
+      webBrowser.ScrollBarsEnabled = true;
+      webBrowser.ScriptErrorsSuppressed = false;
+
+      // update for the first time after page has loaded
+      webBrowser.DocumentCompleted += (sender, args) => RefreshHtmlPage();
+
+      string hlDir = Path.GetFullPath(AppDomain.CurrentDomain.BaseDirectory);
+      webBrowser.Navigate("file://" + Path.Combine(hlDir, "displayModelFrame.html"));
+    }
+
+    public new ISymbolicDataAnalysisModel Content {
+      get { return (ISymbolicDataAnalysisModel)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      RefreshHtmlPage();
+    }
+
+    private void RefreshHtmlPage() {
+      // only update if the page has loaded already
+      if (webBrowser.Document == null || webBrowser.Document.Body == null) return;
+
+      if (Content != null) {
+        HtmlElement newElement = webBrowser.Document.GetElementById("model");
+        newElement.InnerText = formatter.Format(Content.SymbolicExpressionTree);
+      } else {
+        HtmlElement newElement = webBrowser.Document.GetElementById("model");
+        newElement.InnerText = string.Empty;
+      }
+      webBrowser.Document.InvokeScript("refreshModel");
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MathSymbolicDataAnalysisModelView.designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MathSymbolicDataAnalysisModelView.designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MathSymbolicDataAnalysisModelView.designer.cs	(revision 10269)
@@ -0,0 +1,81 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class MathSymbolicDataAnalysisModelView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        webBrowser.Dispose();
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.webBrowser = new System.Windows.Forms.WebBrowser();
+      this.SuspendLayout();
+      // 
+      // webBrowser
+      // 
+      this.webBrowser.AllowNavigation = false;
+      this.webBrowser.AllowWebBrowserDrop = false;
+      this.webBrowser.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.webBrowser.IsWebBrowserContextMenuEnabled = false;
+      this.webBrowser.Location = new System.Drawing.Point(0, 0);
+      this.webBrowser.MinimumSize = new System.Drawing.Size(20, 20);
+      this.webBrowser.Name = "webBrowser";
+      this.webBrowser.Size = new System.Drawing.Size(352, 413);
+      this.webBrowser.TabIndex = 0;
+      this.webBrowser.WebBrowserShortcutsEnabled = false;
+      // 
+      // MathSymbolicDataAnalysisModelView
+      // 
+      this.AllowDrop = true;
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.webBrowser);
+      this.Name = "MathSymbolicDataAnalysisModelView";
+      this.Size = new System.Drawing.Size(352, 413);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.WebBrowser webBrowser;
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MenuItems/ExportSymbolicSolutionToExcelMenuItem.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MenuItems/ExportSymbolicSolutionToExcelMenuItem.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MenuItems/ExportSymbolicSolutionToExcelMenuItem.cs	(revision 10269)
@@ -0,0 +1,398 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.IO;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.Optimizer;
+using OfficeOpenXml;
+using OfficeOpenXml.Drawing.Chart;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  public class ExportSymbolicSolutionToExcelMenuItem : MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
+    private const string TRAININGSTART = "TrainingStart";
+    private const string TRAININGEND = "TrainingEnd";
+    private const string TESTSTART = "TestStart";
+    private const string TESTEND = "TestEnd";
+
+    public override string Name {
+      get { return "Export Symbolic Solution To Excel"; }
+    }
+    public override IEnumerable<string> Structure {
+      get { return new string[] { "&Data Analysis" }; }
+    }
+    public override int Position {
+      get { return 5200; }
+    }
+    public override string ToolTipText {
+      get { return "Create excel file of symbolic data analysis solutions."; }
+    }
+
+    protected override void OnToolStripItemSet(EventArgs e) {
+      base.OnToolStripItemSet(e);
+      ToolStripItem.Enabled = false;
+      var menuItem = ToolStripItem.OwnerItem as ToolStripMenuItem;
+      if (menuItem != null)
+        menuItem.DropDownOpening += menuItem_DropDownOpening;
+    }
+
+    private void menuItem_DropDownOpening(object sender, EventArgs e) {
+      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
+      Control control = activeView as Control;
+      activeView = control.GetNestedControls((c) => c.Visible)
+        .OfType<IContentView>().FirstOrDefault(v => v.Content is ISymbolicDataAnalysisSolution && v.Content is IRegressionSolution);
+      ToolStripItem.Enabled = activeView != null;
+    }
+
+    public override void Execute() {
+      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
+      Control control = activeView as Control;
+      activeView = control.GetNestedControls((c) => c.Visible)
+        .OfType<IContentView>().First(v => v.Content is ISymbolicDataAnalysisSolution && v.Content is IRegressionSolution);
+      var solution = (ISymbolicDataAnalysisSolution)activeView.Content;
+      var formatter = new SymbolicDataAnalysisExpressionExcelFormatter();
+      var formula = formatter.Format(solution.Model.SymbolicExpressionTree, solution.ProblemData.Dataset);
+
+
+      SaveFileDialog saveFileDialog = new SaveFileDialog();
+      saveFileDialog.Filter = "Excel Workbook|*.xlsx";
+      saveFileDialog.Title = "Save an Excel File";
+      if (saveFileDialog.ShowDialog() == DialogResult.OK) {
+        string fileName = saveFileDialog.FileName;
+        using (BackgroundWorker bg = new BackgroundWorker()) {
+          bg.DoWork += (b, e) => ExportChart(fileName, solution, formula);
+          bg.RunWorkerAsync();
+        }
+      }
+    }
+
+    private void ExportChart(string fileName, ISymbolicDataAnalysisSolution solution, string formula) {
+      FileInfo newFile = new FileInfo(fileName);
+      if (newFile.Exists) {
+        newFile.Delete();
+        newFile = new FileInfo(fileName);
+      }
+      var formulaParts = formula.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
+
+      using (ExcelPackage package = new ExcelPackage(newFile)) {
+        ExcelWorksheet modelWorksheet = package.Workbook.Worksheets.Add("Model");
+        FormatModelSheet(modelWorksheet, solution, formulaParts);
+
+        ExcelWorksheet datasetWorksheet = package.Workbook.Worksheets.Add("Dataset");
+        WriteDatasetToExcel(datasetWorksheet, solution.ProblemData);
+
+        ExcelWorksheet inputsWorksheet = package.Workbook.Worksheets.Add("Inputs");
+        WriteInputSheet(inputsWorksheet, datasetWorksheet, formulaParts.Skip(2), solution.ProblemData.Dataset);
+
+        if (solution is IRegressionSolution) {
+          ExcelWorksheet estimatedWorksheet = package.Workbook.Worksheets.Add("Estimated Values");
+          WriteEstimatedWorksheet(estimatedWorksheet, datasetWorksheet, formulaParts, solution as IRegressionSolution);
+
+          ExcelWorksheet chartsWorksheet = package.Workbook.Worksheets.Add("Charts");
+          AddCharts(chartsWorksheet);
+        }
+        package.Workbook.Properties.Title = "Excel Export";
+        package.Workbook.Properties.Author = "HEAL";
+        package.Workbook.Properties.Comments = "Excel export of a symbolic data analysis solution from HeuristicLab";
+
+        package.Save();
+      }
+    }
+
+    private void FormatModelSheet(ExcelWorksheet modelWorksheet, ISymbolicDataAnalysisSolution solution, IEnumerable<string> formulaParts) {
+      int row = 1;
+      modelWorksheet.Cells[row, 1].Value = "Model";
+      modelWorksheet.Cells[row, 2].Value = solution.Name;
+
+      foreach (var part in formulaParts) {
+        modelWorksheet.Cells[row, 4].Value = part;
+        row++;
+      }
+
+      row = 2;
+      modelWorksheet.Cells[row, 1].Value = "Model Depth";
+      modelWorksheet.Cells[row, 2].Value = solution.Model.SymbolicExpressionTree.Depth;
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Model Length";
+      modelWorksheet.Cells[row, 2].Value = solution.Model.SymbolicExpressionTree.Length;
+      row += 2;
+
+      modelWorksheet.Cells[row, 1].Value = "Estimation Limits Lower";
+      modelWorksheet.Cells[row, 2].Value = solution.Model.LowerEstimationLimit;
+      modelWorksheet.Names.Add("EstimationLimitLower", modelWorksheet.Cells[row, 2]);
+      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Estimation Limits Upper";
+      modelWorksheet.Cells[row, 2].Value = solution.Model.UpperEstimationLimit;
+      modelWorksheet.Names.Add("EstimationLimitUpper", modelWorksheet.Cells[row, 2]);
+      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
+      row += 2;
+
+      modelWorksheet.Cells[row, 1].Value = "Trainings Partition Start";
+      modelWorksheet.Cells[row, 2].Value = solution.ProblemData.TrainingPartition.Start;
+      modelWorksheet.Names.Add(TRAININGSTART, modelWorksheet.Cells[row, 2]);
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Trainings Partition End";
+      modelWorksheet.Cells[row, 2].Value = solution.ProblemData.TrainingPartition.End;
+      modelWorksheet.Names.Add(TRAININGEND, modelWorksheet.Cells[row, 2]);
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Test Partition Start";
+      modelWorksheet.Cells[row, 2].Value = solution.ProblemData.TestPartition.Start;
+      modelWorksheet.Names.Add(TESTSTART, modelWorksheet.Cells[row, 2]);
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Test Partition End";
+      modelWorksheet.Cells[row, 2].Value = solution.ProblemData.TestPartition.End;
+      modelWorksheet.Names.Add(TESTEND, modelWorksheet.Cells[row, 2]);
+      row += 2;
+
+      string excelTrainingTarget = Indirect("B", true);
+      string excelTrainingEstimated = Indirect("C", true);
+      string excelTrainingAbsoluteError = Indirect("D", true);
+      string excelTrainingRelativeError = Indirect("E", true);
+      string excelTrainingMeanError = Indirect("F", true);
+      string excelTrainingMSE = Indirect("G", true);
+
+      string excelTestTarget = Indirect("B", false);
+      string excelTestEstimated = Indirect("C", false);
+      string excelTestAbsoluteError = Indirect("D", false);
+      string excelTestRelativeError = Indirect("E", false);
+      string excelTestMeanError = Indirect("F", false);
+      string excelTestMSE = Indirect("G", false);
+
+      modelWorksheet.Cells[row, 1].Value = "Pearson's R² (training)";
+      modelWorksheet.Cells[row, 2].Formula = string.Format("POWER(PEARSON({0},{1}),2)", excelTrainingTarget, excelTrainingEstimated);
+      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Pearson's R² (test)";
+      modelWorksheet.Cells[row, 2].Formula = string.Format("POWER(PEARSON({0},{1}),2)", excelTestTarget, excelTestEstimated);
+      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Mean Squared Error (training)";
+      modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTrainingMSE);
+      modelWorksheet.Names.Add("TrainingMSE", modelWorksheet.Cells[row, 2]);
+      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Mean Squared Error (test)";
+      modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTestMSE);
+      modelWorksheet.Names.Add("TestMSE", modelWorksheet.Cells[row, 2]);
+      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Mean absolute error (training)";
+      modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTrainingAbsoluteError);
+      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Mean absolute error (test)";
+      modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTestAbsoluteError);
+      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Mean error (training)";
+      modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTrainingMeanError);
+      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Mean error (test)";
+      modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTestMeanError);
+      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Average relative error (training)";
+      modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTrainingRelativeError);
+      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.00%";
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Average relative error (test)";
+      modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTestRelativeError);
+      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.00%";
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Normalized Mean Squared error (training)";
+      modelWorksheet.Cells[row, 2].Formula = string.Format("TrainingMSE / VAR({0})", excelTrainingTarget);
+      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
+      row++;
+
+      modelWorksheet.Cells[row, 1].Value = "Normalized Mean Squared error  (test)";
+      modelWorksheet.Cells[row, 2].Formula = string.Format("TestMSE / VAR({0})", excelTestTarget);
+      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
+
+      modelWorksheet.Cells["A1:B" + row].AutoFitColumns();
+
+      AddModelTreePicture(modelWorksheet, solution.Model);
+    }
+
+    private string Indirect(string column, bool training) {
+      if (training) {
+        return string.Format("INDIRECT(\"'Estimated Values'!{0}\"&{1}+2&\":{0}\"&{2}+1)", column, TRAININGSTART, TRAININGEND);
+      } else {
+        return string.Format("INDIRECT(\"'Estimated Values'!{0}\"&{1}+2&\":{0}\"&{2}+1)", column, TESTSTART, TESTEND);
+      }
+    }
+
+    private void AddCharts(ExcelWorksheet chartsWorksheet) {
+      chartsWorksheet.Names.AddFormula("AllId", "OFFSET('Estimated Values'!$A$1,1,0, COUNTA('Estimated Values'!$A:$A)-1)");
+      chartsWorksheet.Names.AddFormula("AllTarget", "OFFSET('Estimated Values'!$B$1,1,0, COUNTA('Estimated Values'!$B:$B)-1)");
+      chartsWorksheet.Names.AddFormula("AllEstimated", "OFFSET('Estimated Values'!$C$1,1,0, COUNTA('Estimated Values'!$C:$C)-1)");
+      chartsWorksheet.Names.AddFormula("TrainingId", "OFFSET('Estimated Values'!$A$1,Model!TrainingStart + 1,0, Model!TrainingEnd - Model!TrainingStart)");
+      chartsWorksheet.Names.AddFormula("TrainingTarget", "OFFSET('Estimated Values'!$B$1,Model!TrainingStart + 1,0, Model!TrainingEnd - Model!TrainingStart)");
+      chartsWorksheet.Names.AddFormula("TrainingEstimated", "OFFSET('Estimated Values'!$C$1,Model!TrainingStart + 1,0, Model!TrainingEnd - Model!TrainingStart)");
+      chartsWorksheet.Names.AddFormula("TestId", "OFFSET('Estimated Values'!$A$1,Model!TestStart + 1,0, Model!TestEnd - Model!TestStart)");
+      chartsWorksheet.Names.AddFormula("TestTarget", "OFFSET('Estimated Values'!$B$1,Model!TestStart + 1,0, Model!TestEnd - Model!TestStart)");
+      chartsWorksheet.Names.AddFormula("TestEstimated", "OFFSET('Estimated Values'!$C$1,Model!TestStart + 1,0, Model!TestEnd - Model!TestStart)");
+
+      var scatterPlot = chartsWorksheet.Drawings.AddChart("scatterPlot", eChartType.XYScatter);
+      scatterPlot.SetSize(800, 400);
+      scatterPlot.SetPosition(0, 0);
+      scatterPlot.Title.Text = "Scatter Plot";
+      var seriesAll = scatterPlot.Series.Add("AllTarget", "AllEstimated");
+      seriesAll.Header = "All";
+      var seriesTraining = scatterPlot.Series.Add("TrainingTarget", "TrainingEstimated");
+      seriesTraining.Header = "Training";
+      var seriesTest = scatterPlot.Series.Add("TestTarget", "TestEstimated");
+      seriesTest.Header = "Test";
+
+      var lineChart = chartsWorksheet.Drawings.AddChart("lineChart", eChartType.XYScatterLinesNoMarkers);
+      lineChart.SetSize(800, 400);
+      lineChart.SetPosition(400, 0);
+      lineChart.Title.Text = "LineChart";
+      var lineTarget = lineChart.Series.Add("AllTarget", "AllId");
+      lineTarget.Header = "Target";
+      var lineAll = lineChart.Series.Add("AllEstimated", "AllId");
+      lineAll.Header = "All";
+      var lineTraining = lineChart.Series.Add("TrainingEstimated", "TrainingId");
+      lineTraining.Header = "Training";
+      var lineTest = lineChart.Series.Add("TestEstimated", "TestId");
+      lineTest.Header = "Test";
+    }
+
+    private void AddModelTreePicture(ExcelWorksheet modelWorksheet, ISymbolicDataAnalysisModel model) {
+      SymbolicExpressionTreeChart modelTreePicture = new SymbolicExpressionTreeChart();
+      modelTreePicture.Tree = model.SymbolicExpressionTree;
+      string tmpFilename = Path.GetTempFileName();
+      modelTreePicture.Width = 1000;
+      modelTreePicture.Height = 500;
+      modelTreePicture.SaveImageAsEmf(tmpFilename);
+
+      FileInfo fi = new FileInfo(tmpFilename);
+      var excelModelTreePic = modelWorksheet.Drawings.AddPicture("ModelTree", fi);
+      excelModelTreePic.SetSize(50);
+      excelModelTreePic.SetPosition(2, 0, 6, 0);
+    }
+
+    private void WriteEstimatedWorksheet(ExcelWorksheet estimatedWorksheet, ExcelWorksheet datasetWorksheet, string[] formulaParts, IRegressionSolution solution) {
+      string preparedFormula = PrepareFormula(formulaParts);
+      int rows = solution.ProblemData.Dataset.Rows;
+      estimatedWorksheet.Cells[1, 1].Value = "Id";
+      estimatedWorksheet.Cells[1, 2].Value = "Target Variable";
+      estimatedWorksheet.Cells[1, 3].Value = "Estimated Values";
+      estimatedWorksheet.Cells[1, 4].Value = "Absolute Error";
+      estimatedWorksheet.Cells[1, 5].Value = "Relative Error";
+      estimatedWorksheet.Cells[1, 6].Value = "Error";
+      estimatedWorksheet.Cells[1, 7].Value = "Squared Error";
+      estimatedWorksheet.Cells[1, 9].Value = "Unbounded Estimated Values";
+      estimatedWorksheet.Cells[1, 10].Value = "Bounded Estimated Values";
+
+      estimatedWorksheet.Cells[1, 1, 1, 10].AutoFitColumns();
+
+      int targetIndex = solution.ProblemData.Dataset.VariableNames.ToList().FindIndex(x => x.Equals(solution.ProblemData.TargetVariable)) + 1;
+      for (int i = 0; i < rows; i++) {
+        estimatedWorksheet.Cells[i + 2, 1].Value = i;
+        estimatedWorksheet.Cells[i + 2, 2].Formula = datasetWorksheet.Cells[i + 2, targetIndex].FullAddress;
+        estimatedWorksheet.Cells[i + 2, 9].Formula = string.Format(preparedFormula, i + 2);
+      }
+      estimatedWorksheet.Cells["B2:B" + (rows + 1)].Style.Numberformat.Format = "0.000";
+
+      estimatedWorksheet.Cells["C2:C" + (rows + 1)].Formula = "J2";
+      estimatedWorksheet.Cells["C2:C" + (rows + 1)].Style.Numberformat.Format = "0.000";
+      estimatedWorksheet.Cells["D2:D" + (rows + 1)].Formula = "ABS(B2 - C2)";
+      estimatedWorksheet.Cells["D2:D" + (rows + 1)].Style.Numberformat.Format = "0.000";
+      estimatedWorksheet.Cells["E2:E" + (rows + 1)].Formula = "ABS(D2 / B2)";
+      estimatedWorksheet.Cells["E2:E" + (rows + 1)].Style.Numberformat.Format = "0.000";
+      estimatedWorksheet.Cells["F2:F" + (rows + 1)].Formula = "C2 - B2";
+      estimatedWorksheet.Cells["F2:F" + (rows + 1)].Style.Numberformat.Format = "0.000";
+      estimatedWorksheet.Cells["G2:G" + (rows + 1)].Formula = "POWER(F2, 2)";
+      estimatedWorksheet.Cells["G2:G" + (rows + 1)].Style.Numberformat.Format = "0.000";
+
+      estimatedWorksheet.Cells["I2:I" + (rows + 1)].Style.Numberformat.Format = "0.000";
+      estimatedWorksheet.Cells["J2:J" + (rows + 1)].Formula = "IFERROR(IF(I2 > Model!EstimationLimitUpper, Model!EstimationLimitUpper, IF(I2 < Model!EstimationLimitLower, Model!EstimationLimitLower, I2)), AVERAGE(Model!EstimationLimitLower, Model!EstimationLimitUpper))";
+      estimatedWorksheet.Cells["J2:J" + (rows + 1)].Style.Numberformat.Format = "0.000";
+    }
+
+    private string PrepareFormula(string[] formulaParts) {
+      string preparedFormula = formulaParts[0];
+      foreach (var part in formulaParts.Skip(2)) {
+        var varMap = part.Split(new string[] { " = " }, StringSplitOptions.None);
+        var columnName = "$" + varMap[1] + "1";
+        preparedFormula = preparedFormula.Replace(columnName, "Inputs!$" + varMap[1] + "{0}");   //{0} will be replaced later with the row number 
+      }
+      return preparedFormula;
+    }
+
+    private void WriteInputSheet(ExcelWorksheet inputsWorksheet, ExcelWorksheet datasetWorksheet, IEnumerable<string> list, Dataset dataset) {
+      //remark the performance of EPPlus drops dramatically 
+      //if the data is not written row wise (from left to right) due the internal indices used.
+      var variableNames = dataset.VariableNames.Select((v, i) => new { variable = v, index = i + 1 }).ToDictionary(v => v.variable, v => v.index);
+      var nameMapping = list.Select(x => x.Split('=')[0].Trim()).ToArray();
+
+      for (int row = 1; row <= dataset.Rows + 1; row++) {
+        for (int column = 1; column < nameMapping.Length + 1; column++) {
+          int variableIndex = variableNames[nameMapping[column - 1]];
+          inputsWorksheet.Cells[row, column].Formula = datasetWorksheet.Cells[row, variableIndex].FullAddress;
+        }
+      }
+    }
+
+    private void WriteDatasetToExcel(ExcelWorksheet datasetWorksheet, IDataAnalysisProblemData problemData) {
+      //remark the performance of EPPlus drops dramatically 
+      //if the data is not written row wise (from left to right) due the internal indices used.
+      Dataset dataset = problemData.Dataset;
+      var variableNames = dataset.VariableNames.ToList();
+      var doubleVariables = new HashSet<string>(dataset.DoubleVariables);
+
+      for (int col = 1; col <= variableNames.Count; col++)
+        datasetWorksheet.Cells[1, col].Value = variableNames[col - 1];
+
+      for (int row = 0; row < dataset.Rows; row++) {
+        for (int col = 0; col < variableNames.Count; col++) {
+          if (doubleVariables.Contains(variableNames[col]))
+            datasetWorksheet.Cells[row + 2, col + 1].Value = dataset.GetDoubleValue(variableNames[col], row);
+          else
+            datasetWorksheet.Cells[row + 2, col + 1].Value = dataset.GetValue(col, row);
+        }
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MenuItems/OptimizeDataAnalysisRunsMenuItem.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MenuItems/OptimizeDataAnalysisRunsMenuItem.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MenuItems/OptimizeDataAnalysisRunsMenuItem.cs	(revision 10269)
@@ -0,0 +1,74 @@
+﻿#region License Information
+
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.MainForm;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimizer;
+
+using MenuItem = HeuristicLab.MainForm.WindowsForms.MenuItem;
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  public abstract class OptimizeDataAnalysisRunsMenuItem : MenuItem, IOptimizerUserInterfaceItemProvider {
+    public override string Name {
+      get { return "Optimize Runs"; }
+    }
+    public override IEnumerable<string> Structure {
+      get { return new string[] { "&Data Analysis" }; }
+    }
+    public override int Position {
+      get { return 5400; }
+    }
+    public override string ToolTipText {
+      get {
+        return "This command tries to optimize each run by performing a pruning and a constant optimization step on the solution models.";
+      }
+    }
+    protected override void OnToolStripItemSet(EventArgs e) {
+      ToolStripItem.Enabled = false;
+    }
+    protected RunCollection runCollection;
+
+    protected override void OnActiveViewChanged(object sender, EventArgs e) {
+      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
+      if (activeView == null) {
+        ToolStripItem.Enabled = false;
+        return;
+      }
+
+      var content = activeView.Content;
+      runCollection = content as RunCollection;
+      if (runCollection == null && content is IOptimizer)
+        runCollection = ((IOptimizer)content).Runs;
+
+      if (runCollection == null) {
+        ToolStripItem.Enabled = false;
+        return;
+      }
+
+      ToolStripItem.Enabled = runCollection.Any(run => run.Results.ContainsKey("Best training solution"));
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs	(revision 10269)
@@ -0,0 +1,50 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  [Plugin("HeuristicLab.Problems.DataAnalysis.Symbolic.Views","Provides views for symbolic data analysis problem classes.", "3.4.4.9870")]
+  [PluginFile("HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.dll", PluginFileType.Assembly)]
+  [PluginFile("displayModelFrame.html", PluginFileType.Data)]
+  [PluginDependency("HeuristicLab.ALGLIB", "3.7.0")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Data.Views", "3.3")]
+  [PluginDependency("HeuristicLab.EPPlus", "3.1")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views", "3.4")]
+  [PluginDependency("HeuristicLab.MainForm", "3.3")]
+  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
+  [PluginDependency("HeuristicLab.MathJax", "1.1")]
+  [PluginDependency("HeuristicLab.Optimization","3.3")]
+  [PluginDependency("HeuristicLab.Optimizer","3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")]
+  public class HeuristicLabProblemsDataAnalysisSymbolicViewsPlugin : PluginBase {
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs.frame
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs.frame	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs.frame	(revision 10269)
@@ -0,0 +1,50 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  [Plugin("HeuristicLab.Problems.DataAnalysis.Symbolic.Views","Provides views for symbolic data analysis problem classes.", "3.4.4.$WCREV$")]
+  [PluginFile("HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.dll", PluginFileType.Assembly)]
+  [PluginFile("displayModelFrame.html", PluginFileType.Data)]
+  [PluginDependency("HeuristicLab.ALGLIB", "3.7.0")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Data.Views", "3.3")]
+  [PluginDependency("HeuristicLab.EPPlus", "3.1")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views", "3.4")]
+  [PluginDependency("HeuristicLab.MainForm", "3.3")]
+  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
+  [PluginDependency("HeuristicLab.MathJax", "1.1")]
+  [PluginDependency("HeuristicLab.Optimization","3.3")]
+  [PluginDependency("HeuristicLab.Optimizer","3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")]
+  public class HeuristicLabProblemsDataAnalysisSymbolicViewsPlugin : PluginBase {
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Properties/AssemblyInfo.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Properties/AssemblyInfo.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Properties/AssemblyInfo.cs	(revision 10269)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Problems.DataAnalysis.Symbolic.Views")]
+[assembly: AssemblyDescription("Provides views for symbolic data analysis problem classes.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("B2F2EF94-C278-4DCB-B8AB-E0C22A95F747")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.4.0.0")]
+[assembly: AssemblyFileVersion("3.4.4.9870")]
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Properties/AssemblyInfo.cs.frame
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Properties/AssemblyInfo.cs.frame	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Properties/AssemblyInfo.cs.frame	(revision 10269)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Problems.DataAnalysis.Symbolic.Views")]
+[assembly: AssemblyDescription("Provides views for symbolic data analysis problem classes.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("B2F2EF94-C278-4DCB-B8AB-E0C22A95F747")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.4.0.0")]
+[assembly: AssemblyFileVersion("3.4.4.$WCREV$")]
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/RunCollectionVariableImpactView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/RunCollectionVariableImpactView.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/RunCollectionVariableImpactView.Designer.cs	(revision 10269)
@@ -0,0 +1,122 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class RunCollectionVariableImpactView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.matrixView = new HeuristicLab.Data.Views.StringConvertibleMatrixView();
+      this.comboBox = new System.Windows.Forms.ComboBox();
+      this.foldsLabel = new System.Windows.Forms.Label();
+      this.variableImpactsGroupBox = new System.Windows.Forms.GroupBox();
+      this.variableImpactsGroupBox.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // matrixView
+      // 
+      this.matrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.matrixView.Caption = "StringConvertibleMatrix View";
+      this.matrixView.Content = null;
+      this.matrixView.Location = new System.Drawing.Point(6, 19);
+      this.matrixView.Name = "matrixView";
+      this.matrixView.ReadOnly = true;
+      this.matrixView.ShowRowsAndColumnsTextBox = true;
+      this.matrixView.ShowStatisticalInformation = true;
+      this.matrixView.Size = new System.Drawing.Size(294, 174);
+      this.matrixView.TabIndex = 0;
+      // 
+      // comboBox
+      // 
+      this.comboBox.FormattingEnabled = true;
+      this.comboBox.Location = new System.Drawing.Point(39, 6);
+      this.comboBox.Name = "comboBox";
+      this.comboBox.Size = new System.Drawing.Size(68, 21);
+      this.comboBox.TabIndex = 1;
+      this.comboBox.SelectedValueChanged += new System.EventHandler(this.comboBox_SelectedValueChanged);
+      // 
+      // label1
+      // 
+      this.foldsLabel.AutoSize = true;
+      this.foldsLabel.Location = new System.Drawing.Point(3, 9);
+      this.foldsLabel.Name = "foldsLabel";
+      this.foldsLabel.Size = new System.Drawing.Size(30, 13);
+      this.foldsLabel.TabIndex = 2;
+      this.foldsLabel.Text = "Fold:";
+      // 
+      // variableImpactsGroupBox
+      // 
+      this.variableImpactsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.variableImpactsGroupBox.Controls.Add(this.matrixView);
+      this.variableImpactsGroupBox.Location = new System.Drawing.Point(0, 33);
+      this.variableImpactsGroupBox.Name = "variableImpactsGroupBox";
+      this.variableImpactsGroupBox.Size = new System.Drawing.Size(306, 199);
+      this.variableImpactsGroupBox.TabIndex = 3;
+      this.variableImpactsGroupBox.TabStop = false;
+      this.variableImpactsGroupBox.Text = "Variable impacts:";
+      // 
+      // RunCollectionVariableImpactView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.variableImpactsGroupBox);
+      this.Controls.Add(this.foldsLabel);
+      this.Controls.Add(this.comboBox);
+      this.Name = "RunCollectionVariableImpactView";
+      this.Size = new System.Drawing.Size(309, 235);
+      this.variableImpactsGroupBox.ResumeLayout(false);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private HeuristicLab.Data.Views.StringConvertibleMatrixView matrixView;
+    private System.Windows.Forms.ComboBox comboBox;
+    private System.Windows.Forms.Label foldsLabel;
+    private System.Windows.Forms.GroupBox variableImpactsGroupBox;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/RunCollectionVariableImpactView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/RunCollectionVariableImpactView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/RunCollectionVariableImpactView.cs	(revision 10269)
@@ -0,0 +1,356 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Common;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  [Content(typeof(RunCollection), false)]
+  [View("Variable Impacts")]
+  public sealed partial class RunCollectionVariableImpactView : AsynchronousContentView {
+    private const string variableImpactResultName = "Variable impacts";
+    private const string crossValidationFoldsResultName = "CrossValidation Folds";
+    private const string numberOfFoldsParameterName = "Folds";
+    public RunCollectionVariableImpactView() {
+      InitializeComponent();
+    }
+
+    public new RunCollection Content {
+      get { return (RunCollection)base.Content; }
+      set { base.Content = value; }
+    }
+
+    #region events
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.UpdateOfRunsInProgressChanged += Content_UpdateOfRunsInProgressChanged;
+      Content.ItemsAdded += Content_ItemsAdded;
+      Content.ItemsRemoved += Content_ItemsRemoved;
+      Content.CollectionReset += Content_CollectionReset;
+      RegisterRunEvents(Content);
+    }
+    protected override void DeregisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.UpdateOfRunsInProgressChanged -= Content_UpdateOfRunsInProgressChanged;
+      Content.ItemsAdded -= Content_ItemsAdded;
+      Content.ItemsRemoved -= Content_ItemsRemoved;
+      Content.CollectionReset -= Content_CollectionReset;
+      DeregisterRunEvents(Content);
+    }
+    private void RegisterRunEvents(IEnumerable<IRun> runs) {
+      foreach (IRun run in runs)
+        run.Changed += Run_Changed;
+    }
+    private void DeregisterRunEvents(IEnumerable<IRun> runs) {
+      foreach (IRun run in runs)
+        run.Changed -= Run_Changed;
+    }
+    private void Content_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      RegisterRunEvents(e.Items);
+      UpdateData();
+    }
+    private void Content_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      DeregisterRunEvents(e.Items);
+      UpdateData();
+    }
+    private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      DeregisterRunEvents(e.OldItems);
+      RegisterRunEvents(e.Items);
+      UpdateData();
+    }
+    private void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) {
+      if (!Content.UpdateOfRunsInProgress) UpdateData();
+    }
+    private void Run_Changed(object sender, EventArgs e) {
+      if (!Content.UpdateOfRunsInProgress) UpdateData();
+    }
+    #endregion
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      this.UpdateData();
+    }
+
+    private void comboBox_SelectedValueChanged(object sender, EventArgs e) {
+      if (comboBox.SelectedItem != null) {
+        var visibleRuns = from run in Content where run.Visible select run;
+        if (comboBox.SelectedIndex == 0) {
+          var selectedFolds = from r in visibleRuns
+                              let foldCollection = (RunCollection)r.Results[crossValidationFoldsResultName]
+                              from run in foldCollection
+                              let name = (r.Name + " " + run.Name)
+                              select new { run, name };
+          matrixView.Content = CalculateVariableImpactMatrix(selectedFolds.Select(x => x.run).ToArray(), selectedFolds.Select(x => x.name).ToArray());
+        } else {
+          var selectedFolds = from r in visibleRuns
+                              let foldCollection = (RunCollection)r.Results[crossValidationFoldsResultName]
+                              let run = foldCollection.ElementAt(comboBox.SelectedIndex - 1)
+                              let name = (r.Name + " " + run.Name)
+                              select new { run, name };
+          matrixView.Content = CalculateVariableImpactMatrix(selectedFolds.Select(x => x.run).ToArray(), selectedFolds.Select(x => x.name).ToArray());
+        }
+      }
+    }
+
+
+    private void UpdateData() {
+      if (InvokeRequired) {
+        Invoke((Action)UpdateData);
+      } else {
+        if (Content != null) {
+          comboBox.Items.Clear();
+          comboBox.Enabled = false;
+          comboBox.Visible = false;
+          foldsLabel.Visible = false;
+          variableImpactsGroupBox.Dock = DockStyle.Fill;
+          var visibleRuns = Content.Where(r => r.Visible).ToArray();
+          if (visibleRuns.Length == 0) {
+            DisplayMessage("Run collection is empty.");
+          } else if (visibleRuns.All(r => r.Parameters.ContainsKey(numberOfFoldsParameterName))) {
+            // check if all runs are comparable (CV or normal runs)
+            CheckAndUpdateCvRuns();
+          } else if (visibleRuns.All(r => !r.Parameters.ContainsKey(numberOfFoldsParameterName))) {
+            CheckAndUpdateNormalRuns();
+          } else {
+            // there is a mix of CV and normal runs => show an error message
+            DisplayMessage("The run collection contains a mixture of normal runs and cross-validation runs. Variable impact calculation does not work in this case.");
+          }
+        }
+      }
+    }
+
+    private void CheckAndUpdateCvRuns() {
+      var visibleRuns = from run in Content where run.Visible select run;
+      var representativeRun = visibleRuns.First();
+      // make sure all runs have the same number of folds
+      int nFolds = ((IntValue)representativeRun.Parameters[numberOfFoldsParameterName]).Value;
+      if (visibleRuns.All(r => ((IntValue)r.Parameters[numberOfFoldsParameterName]).Value == nFolds)) {
+        var allFoldResults = visibleRuns.SelectMany(run => (RunCollection)run.Results[crossValidationFoldsResultName]);
+
+        // make sure each fold contains variable impacts 
+        if (!allFoldResults.All(r => r.Results.ContainsKey(variableImpactResultName))) {
+          DisplayMessage("At least one of the runs does not contain a variable impact result.");
+        } else {
+          // make sure each of the runs has the same input variables
+          var allVariableNames = from run in allFoldResults
+                                 let varImpacts = (DoubleMatrix)run.Results[variableImpactResultName]
+                                 select varImpacts.RowNames;
+          var groupedVariableNames = allVariableNames
+            .SelectMany(x => x)
+            .GroupBy(x => x);
+
+          if (groupedVariableNames.Any(g => g.Count() != allFoldResults.Count())) {
+            DisplayMessage("At least one of the runs has a different input variable set than the rest.");
+          } else {
+            // populate combobox
+            comboBox.Items.Add("Overall");
+            for (int foldIndex = 0; foldIndex < nFolds; foldIndex++) {
+              comboBox.Items.Add("Fold " + foldIndex);
+            }
+            comboBox.SelectedIndex = 0;
+            comboBox.Enabled = true;
+            comboBox.Visible = true;
+            foldsLabel.Visible = true;
+            variableImpactsGroupBox.Controls.Clear();
+            variableImpactsGroupBox.Dock = DockStyle.None;
+            variableImpactsGroupBox.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right |
+                                             AnchorStyles.Bottom;
+            variableImpactsGroupBox.Height = this.Height - comboBox.Height - 12;
+            variableImpactsGroupBox.Width = this.Width;
+            matrixView.Dock = DockStyle.Fill;
+            variableImpactsGroupBox.Controls.Add(matrixView);
+          }
+        }
+      } else {
+        DisplayMessage("At least on of the cross-validation runs has a different number of folds than the rest.");
+      }
+    }
+
+    private void CheckAndUpdateNormalRuns() {
+      // make sure all runs contain variable impact results
+      var visibleRuns = from run in Content where run.Visible select run;
+
+      if (!visibleRuns.All(r => r.Results.ContainsKey(variableImpactResultName))) {
+        DisplayMessage("At least one of the runs does not contain a variable impact result.");
+      } else {
+        // make sure each of the runs has the same input variables
+        var allVariableNames = from run in visibleRuns
+                               let varImpacts = (DoubleMatrix)run.Results[variableImpactResultName]
+                               select varImpacts.RowNames;
+        var groupedVariableNames = allVariableNames
+          .SelectMany(x => x)
+          .GroupBy(x => x);
+
+        if (groupedVariableNames.Any(g => g.Count() != visibleRuns.Count())) {
+          DisplayMessage("At least one of the runs has a different input variable set than the rest.");
+        } else {
+          if (!variableImpactsGroupBox.Controls.Contains(matrixView)) {
+            variableImpactsGroupBox.Controls.Clear();
+            matrixView.Dock = DockStyle.Fill;
+            variableImpactsGroupBox.Controls.Add(matrixView);
+          }
+          matrixView.Content = CalculateVariableImpactMatrix(visibleRuns.ToArray(), visibleRuns.Select(r => r.Name).ToArray());
+        }
+      }
+    }
+
+    private DoubleMatrix CalculateVariableImpactMatrix(IRun[] runs, string[] runNames) {
+      DoubleMatrix matrix = null;
+      IEnumerable<DoubleMatrix> allVariableImpacts = (from run in runs
+                                                      select run.Results[variableImpactResultName]).Cast<DoubleMatrix>();
+      IEnumerable<string> variableNames = (from variableImpact in allVariableImpacts
+                                           from variableName in variableImpact.RowNames
+                                           select variableName)
+                                          .Distinct();
+      // filter variableNames: only include names that have at least one non-zero value in a run
+      List<string> variableNamesList = (from variableName in variableNames
+                                        where GetVariableImpacts(variableName, allVariableImpacts).Any(x => !x.IsAlmost(0.0))
+                                        select variableName)
+                                       .ToList();
+
+      List<string> statictics = new List<string> { "Median Rank", "Mean", "StdDev", "pValue" };
+      List<string> columnNames = new List<string>(runNames);
+      columnNames.AddRange(statictics);
+      int numberOfRuns = runs.Length;
+
+      matrix = new DoubleMatrix(variableNamesList.Count, numberOfRuns + statictics.Count);
+      matrix.SortableView = true;
+      matrix.ColumnNames = columnNames;
+
+      // calculate statistics
+      List<List<double>> variableImpactsOverRuns = (from variableName in variableNamesList
+                                                    select GetVariableImpacts(variableName, allVariableImpacts).ToList())
+                                             .ToList();
+      List<List<double>> variableRanks = (from variableName in variableNamesList
+                                          select GetVariableImpactRanks(variableName, allVariableImpacts).ToList())
+                                      .ToList();
+      if (variableImpactsOverRuns.Count() > 0) {
+        // the variable with the worst median impact value is chosen as the reference variable
+        // this is problematic if all variables are relevant, however works often in practice
+        List<double> referenceImpacts = (from impacts in variableImpactsOverRuns
+                                         let avg = impacts.Median()
+                                         orderby avg
+                                         select impacts)
+                                         .First();
+        // for all variables
+        for (int row = 0; row < variableImpactsOverRuns.Count; row++) {
+          // median rank
+          matrix[row, numberOfRuns] = variableRanks[row].Median();
+          // also show mean and std.dev. of relative variable impacts to indicate the relative difference in impacts of variables
+          matrix[row, numberOfRuns + 1] = Math.Round(variableImpactsOverRuns[row].Average(), 3);
+          matrix[row, numberOfRuns + 2] = Math.Round(variableImpactsOverRuns[row].StandardDeviation(), 3);
+
+          double leftTail = 0; double rightTail = 0; double bothTails = 0;
+          // calc differences of impacts for current variable and reference variable
+          double[] z = new double[referenceImpacts.Count];
+          for (int i = 0; i < z.Length; i++) {
+            z[i] = variableImpactsOverRuns[row][i] - referenceImpacts[i];
+          }
+          // wilcoxon signed rank test is used because the impact values of two variables in a single run are not independent
+          alglib.wsr.wilcoxonsignedranktest(z, z.Length, 0, ref bothTails, ref leftTail, ref rightTail);
+          matrix[row, numberOfRuns + 3] = Math.Round(bothTails, 4);
+        }
+      }
+
+      // fill matrix with impacts from runs
+      for (int i = 0; i < runs.Length; i++) {
+        IRun run = runs[i];
+        DoubleMatrix runVariableImpacts = (DoubleMatrix)run.Results[variableImpactResultName];
+        for (int j = 0; j < runVariableImpacts.Rows; j++) {
+          int rowIndex = variableNamesList.FindIndex(s => s == runVariableImpacts.RowNames.ElementAt(j));
+          if (rowIndex > -1) {
+            matrix[rowIndex, i] = Math.Round(runVariableImpacts[j, 0], 3);
+          }
+        }
+      }
+      // sort by median
+      var sortedMatrix = (DoubleMatrix)matrix.Clone();
+      var sortedIndexes = from i in Enumerable.Range(0, sortedMatrix.Rows)
+                          orderby matrix[i, numberOfRuns]
+                          select i;
+
+      int targetIndex = 0;
+      foreach (var sourceIndex in sortedIndexes) {
+        for (int c = 0; c < matrix.Columns; c++)
+          sortedMatrix[targetIndex, c] = matrix[sourceIndex, c];
+        targetIndex++;
+      }
+      sortedMatrix.RowNames = sortedIndexes.Select(i => variableNamesList[i]);
+
+      return sortedMatrix;
+    }
+
+    private IEnumerable<double> GetVariableImpactRanks(string variableName, IEnumerable<DoubleMatrix> allVariableImpacts) {
+      foreach (DoubleMatrix runVariableImpacts in allVariableImpacts) {
+        // certainly not yet very efficient because ranks are computed multiple times for the same run
+        string[] variableNames = runVariableImpacts.RowNames.ToArray();
+        double[] values = (from row in Enumerable.Range(0, runVariableImpacts.Rows)
+                           select runVariableImpacts[row, 0] * -1)
+                          .ToArray();
+        Array.Sort(values, variableNames);
+        // calculate ranks
+        double[] ranks = new double[values.Length];
+        // check for tied ranks
+        int i = 0;
+        while (i < values.Length) {
+          ranks[i] = i + 1;
+          int j = i + 1;
+          while (j < values.Length && values[i].IsAlmost(values[j])) {
+            ranks[j] = ranks[i];
+            j++;
+          }
+          i = j;
+        }
+        int rankIndex = 0;
+        foreach (string rowVariableName in variableNames) {
+          if (rowVariableName == variableName)
+            yield return ranks[rankIndex];
+          rankIndex++;
+        }
+      }
+    }
+
+    private IEnumerable<double> GetVariableImpacts(string variableName, IEnumerable<DoubleMatrix> allVariableImpacts) {
+      foreach (DoubleMatrix runVariableImpacts in allVariableImpacts) {
+        int row = 0;
+        foreach (string rowName in runVariableImpacts.RowNames) {
+          if (rowName == variableName)
+            yield return runVariableImpacts[row, 0];
+          row++;
+        }
+      }
+    }
+
+    private void DisplayMessage(string message) {
+      variableImpactsGroupBox.Controls.Remove(matrixView);
+      var label = new Label { TextAlign = ContentAlignment.MiddleCenter, Text = message, Dock = DockStyle.Fill };
+      variableImpactsGroupBox.Controls.Add(label);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowDataView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowDataView.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowDataView.Designer.cs	(revision 10269)
@@ -0,0 +1,60 @@
+﻿using HeuristicLab.Visualization.ChartControlsExtensions;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class SlidingWindowDataView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+      this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart();
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // chart
+      // 
+      chartArea1.Name = "ChartArea1";
+      this.chart.ChartAreas.Add(chartArea1);
+      this.chart.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.chart.Location = new System.Drawing.Point(0, 0);
+      this.chart.Name = "chart";
+      this.chart.Size = new System.Drawing.Size(770, 410);
+      this.chart.TabIndex = 0;
+      // 
+      // SlidingWindowDataView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.chart);
+      this.Name = "SlidingWindowDataView";
+      this.Size = new System.Drawing.Size(770, 410);
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
+      this.ResumeLayout(false);
+
+    }
+
+
+    private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart;
+
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowDataView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowDataView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowDataView.cs	(revision 10269)
@@ -0,0 +1,119 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Drawing;
+using System.Linq;
+using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  [View("Sliding Window View")]
+  [Content(typeof(SlidingWindowData), IsDefaultView = true)]
+  public partial class SlidingWindowDataView : ItemView {
+    private const string TARGETVARIABLE_SERIES_NAME = "Target Variable";
+    private const string ESTIMATEDVAlUES_SERIES_NAME = "Estimated Values";
+
+    public new SlidingWindowData Content {
+      get { return (SlidingWindowData)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public SlidingWindowDataView() {
+      InitializeComponent();
+      chart.CustomizeAllChartAreas();
+      chart.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
+      chart.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
+      chart.ChartAreas[0].AxisX.IsStartedFromZero = true;
+      chart.ChartAreas[0].CursorX.Interval = 1;
+
+      chart.ChartAreas[0].CursorY.IsUserSelectionEnabled = true;
+      chart.ChartAreas[0].AxisY.ScaleView.Zoomable = true;
+      chart.ChartAreas[0].CursorY.Interval = 0;
+
+      StripLine stripLine = new StripLine();
+      stripLine.BackColor = Color.Gold;
+      stripLine.Font = new Font("Times New Roman", 12, FontStyle.Bold);
+      stripLine.Text = "Sliding Window";
+      chart.ChartAreas[0].AxisX.StripLines.Add(stripLine);
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.SlidingWindowPosition.ValueChanged += new EventHandler(SlidingWindowPosition_ValueChanged);
+      Content.EstimatedValuesChanged += new EventHandler(EstimatedValuesChanged);
+    }
+    protected override void DeregisterContentEvents() {
+      Content.SlidingWindowPosition.ValueChanged -= new EventHandler(SlidingWindowPosition_ValueChanged);
+      Content.EstimatedValuesChanged -= new EventHandler(EstimatedValuesChanged);
+      base.DeregisterContentEvents();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      RedrawChart();
+    }
+
+    private void SlidingWindowPosition_ValueChanged(object sender, EventArgs e) {
+      if (InvokeRequired) Invoke((Action<object, EventArgs>)SlidingWindowPosition_ValueChanged, sender, e);
+      else UpdateStripLine();
+    }
+    private void EstimatedValuesChanged(object sender, EventArgs e) {
+      if (InvokeRequired) Invoke((Action<object, EventArgs>)EstimatedValuesChanged, sender, e);
+      else RedrawChart();
+    }
+
+    private void RedrawChart() {
+      chart.Series.Clear();
+      if (Content == null) return;
+
+      chart.Series.Add(TARGETVARIABLE_SERIES_NAME);
+      chart.Series[TARGETVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine;
+      var xValues = Enumerable.Range(Content.TrainingPartitionStart + 1, Content.TrainingPartitionEnd - Content.TrainingPartitionStart).ToArray();
+      chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindXY(xValues, Content.TargetValues.ToArray());
+
+      if (Content.EstimatedValues.Any()) {
+        chart.Series.Add(ESTIMATEDVAlUES_SERIES_NAME);
+        chart.Series[ESTIMATEDVAlUES_SERIES_NAME].ChartType = SeriesChartType.FastLine;
+        var yValues = Content.EstimatedValues.ToArray();
+        chart.Series[ESTIMATEDVAlUES_SERIES_NAME].Points.DataBindXY(xValues, yValues);
+      }
+
+      UpdateStripLine();
+      UpdateCursorInterval();
+    }
+
+    private void UpdateStripLine() {
+      chart.ChartAreas[0].AxisX.StripLines[0].StripWidth = Content.SlidingWindowPosition.End - Content.SlidingWindowPosition.Start;
+      chart.ChartAreas[0].AxisX.StripLines[0].IntervalOffset = Content.SlidingWindowPosition.Start - 0.5;
+    }
+
+    private void UpdateCursorInterval() {
+      var targetValues = this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.Select(x => x.YValues[0]).DefaultIfEmpty(1.0);
+      double targetValuesRange = targetValues.Max() - targetValues.Min();
+      double interestingValuesRange = Math.Max(targetValuesRange, 1.0);
+      double digits = (int)Math.Log10(interestingValuesRange) - 3;
+      double yZoomInterval = Math.Max(Math.Pow(10, digits), 10E-5);
+      this.chart.ChartAreas[0].CursorY.Interval = yZoomInterval;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/ConstantView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/ConstantView.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/ConstantView.Designer.cs	(revision 10269)
@@ -0,0 +1,256 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class ConstantView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.weightNuLabel = new System.Windows.Forms.Label();
+      this.minValueTextBox = new System.Windows.Forms.TextBox();
+      this.initializationGroupBox = new System.Windows.Forms.GroupBox();
+      this.weightSigmaLabel = new System.Windows.Forms.Label();
+      this.maxValueTextBox = new System.Windows.Forms.TextBox();
+      this.mutationGroupBox = new System.Windows.Forms.GroupBox();
+      this.multiplicativeChangeLabel = new System.Windows.Forms.Label();
+      this.multiplicativeChangeSigmaTextBox = new System.Windows.Forms.TextBox();
+      this.additiveChangeLabel = new System.Windows.Forms.Label();
+      this.additiveChangeSigmaTextBox = new System.Windows.Forms.TextBox();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.initializationGroupBox.SuspendLayout();
+      this.mutationGroupBox.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // initialFrequencyLabel
+      // 
+      this.toolTip.SetToolTip(this.initialFrequencyLabel, "Relative frequency of the symbol in randomly created trees");
+      // 
+      // initialFrequencyTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.initialFrequencyTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.initialFrequencyTextBox.Size = new System.Drawing.Size(280, 20);
+      // 
+      // minimumArityTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.minimumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.minimumArityTextBox.Size = new System.Drawing.Size(280, 20);
+      // 
+      // maximumArityTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.maximumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.maximumArityTextBox.Size = new System.Drawing.Size(280, 20);
+      // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      this.nameTextBox.Size = new System.Drawing.Size(280, 20);
+      // 
+      // infoLabel
+      // 
+      this.infoLabel.Location = new System.Drawing.Point(379, 3);
+      // 
+      // weightNuLabel
+      // 
+      this.weightNuLabel.AutoSize = true;
+      this.weightNuLabel.Location = new System.Drawing.Point(6, 22);
+      this.weightNuLabel.Name = "weightNuLabel";
+      this.weightNuLabel.Size = new System.Drawing.Size(56, 13);
+      this.weightNuLabel.TabIndex = 0;
+      this.weightNuLabel.Text = "Min value:";
+      this.toolTip.SetToolTip(this.weightNuLabel, "The minimal value to use for random initialization of constants.");
+      // 
+      // minValueTextBox
+      // 
+      this.minValueTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.errorProvider.SetIconAlignment(this.minValueTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.minValueTextBox.Location = new System.Drawing.Point(92, 19);
+      this.minValueTextBox.Name = "minValueTextBox";
+      this.minValueTextBox.Size = new System.Drawing.Size(300, 20);
+      this.minValueTextBox.TabIndex = 1;
+      this.toolTip.SetToolTip(this.minValueTextBox, "The minimal value to use for random initialization of constants.");
+      this.minValueTextBox.TextChanged += new System.EventHandler(this.minValueTextBox_TextChanged);
+      // 
+      // initializationGroupBox
+      // 
+      this.initializationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.initializationGroupBox.Controls.Add(this.weightSigmaLabel);
+      this.initializationGroupBox.Controls.Add(this.maxValueTextBox);
+      this.initializationGroupBox.Controls.Add(this.weightNuLabel);
+      this.initializationGroupBox.Controls.Add(this.minValueTextBox);
+      this.initializationGroupBox.Location = new System.Drawing.Point(0, 127);
+      this.initializationGroupBox.Name = "initializationGroupBox";
+      this.initializationGroupBox.Size = new System.Drawing.Size(398, 73);
+      this.initializationGroupBox.TabIndex = 5;
+      this.initializationGroupBox.TabStop = false;
+      this.initializationGroupBox.Text = "Initialization";
+      // 
+      // weightSigmaLabel
+      // 
+      this.weightSigmaLabel.AutoSize = true;
+      this.weightSigmaLabel.Location = new System.Drawing.Point(6, 48);
+      this.weightSigmaLabel.Name = "weightSigmaLabel";
+      this.weightSigmaLabel.Size = new System.Drawing.Size(59, 13);
+      this.weightSigmaLabel.TabIndex = 2;
+      this.weightSigmaLabel.Text = "Max value:";
+      this.toolTip.SetToolTip(this.weightSigmaLabel, "The maximal value to use for random initialization of constants.");
+      // 
+      // maxValueTextBox
+      // 
+      this.maxValueTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.errorProvider.SetIconAlignment(this.maxValueTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.maxValueTextBox.Location = new System.Drawing.Point(92, 45);
+      this.maxValueTextBox.Name = "maxValueTextBox";
+      this.maxValueTextBox.Size = new System.Drawing.Size(300, 20);
+      this.maxValueTextBox.TabIndex = 3;
+      this.toolTip.SetToolTip(this.maxValueTextBox, "The maximal value to use for random initialization of constants.");
+      this.maxValueTextBox.TextChanged += new System.EventHandler(this.maxValueTextBox_TextChanged);
+      // 
+      // mutationGroupBox
+      // 
+      this.mutationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.mutationGroupBox.Controls.Add(this.multiplicativeChangeLabel);
+      this.mutationGroupBox.Controls.Add(this.multiplicativeChangeSigmaTextBox);
+      this.mutationGroupBox.Controls.Add(this.additiveChangeLabel);
+      this.mutationGroupBox.Controls.Add(this.additiveChangeSigmaTextBox);
+      this.mutationGroupBox.Location = new System.Drawing.Point(0, 206);
+      this.mutationGroupBox.Name = "mutationGroupBox";
+      this.mutationGroupBox.Size = new System.Drawing.Size(398, 73);
+      this.mutationGroupBox.TabIndex = 6;
+      this.mutationGroupBox.TabStop = false;
+      this.mutationGroupBox.Text = "Mutation";
+      // 
+      // multiplicativeChangeLabel
+      // 
+      this.multiplicativeChangeLabel.AutoSize = true;
+      this.multiplicativeChangeLabel.Location = new System.Drawing.Point(6, 48);
+      this.multiplicativeChangeLabel.Name = "multiplicativeChangeLabel";
+      this.multiplicativeChangeLabel.Size = new System.Drawing.Size(146, 13);
+      this.multiplicativeChangeLabel.TabIndex = 2;
+      this.multiplicativeChangeLabel.Text = "Multiplicative change (sigma):";
+      this.toolTip.SetToolTip(this.multiplicativeChangeLabel, "The sigma (std. dev.) parameter for the normal distribution to use to sample the " +
+        "multiplicative change.");
+      // 
+      // multiplicativeChangeSigmaTextBox
+      // 
+      this.multiplicativeChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.errorProvider.SetIconAlignment(this.multiplicativeChangeSigmaTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.multiplicativeChangeSigmaTextBox.Location = new System.Drawing.Point(168, 45);
+      this.multiplicativeChangeSigmaTextBox.Name = "multiplicativeChangeSigmaTextBox";
+      this.multiplicativeChangeSigmaTextBox.Size = new System.Drawing.Size(224, 20);
+      this.multiplicativeChangeSigmaTextBox.TabIndex = 3;
+      this.toolTip.SetToolTip(this.multiplicativeChangeSigmaTextBox, "The sigma (std. dev.) parameter for the normal distribution to use to sample a mu" +
+        "ltiplicative change.");
+      this.multiplicativeChangeSigmaTextBox.TextChanged += new System.EventHandler(this.multiplicativeChangeSigmaTextBox_TextChanged);
+      // 
+      // additiveChangeLabel
+      // 
+      this.additiveChangeLabel.AutoSize = true;
+      this.additiveChangeLabel.Location = new System.Drawing.Point(6, 22);
+      this.additiveChangeLabel.Name = "additiveChangeLabel";
+      this.additiveChangeLabel.Size = new System.Drawing.Size(123, 13);
+      this.additiveChangeLabel.TabIndex = 0;
+      this.additiveChangeLabel.Text = "Additive change (sigma):";
+      this.toolTip.SetToolTip(this.additiveChangeLabel, "The sigma (std. dev.) parameter for the normal distribution to sample the additiv" +
+        "e change.");
+      // 
+      // additiveChangeSigmaTextBox
+      // 
+      this.additiveChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.errorProvider.SetIconAlignment(this.additiveChangeSigmaTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.additiveChangeSigmaTextBox.Location = new System.Drawing.Point(168, 19);
+      this.additiveChangeSigmaTextBox.Name = "additiveChangeSigmaTextBox";
+      this.additiveChangeSigmaTextBox.Size = new System.Drawing.Size(224, 20);
+      this.additiveChangeSigmaTextBox.TabIndex = 1;
+      this.toolTip.SetToolTip(this.additiveChangeSigmaTextBox, "The sigma (std. dev.) parameter for the normal distribution to use to sample an a" +
+        "dditive change.");
+      this.additiveChangeSigmaTextBox.TextChanged += new System.EventHandler(this.additiveChangeSigmaTextBox_TextChanged);
+      // 
+      // ConstantView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.mutationGroupBox);
+      this.Controls.Add(this.initializationGroupBox);
+      this.Name = "ConstantView";
+      this.Size = new System.Drawing.Size(398, 284);
+      this.Controls.SetChildIndex(this.maximumArityLabel, 0);
+      this.Controls.SetChildIndex(this.maximumArityTextBox, 0);
+      this.Controls.SetChildIndex(this.minimumArityLabel, 0);
+      this.Controls.SetChildIndex(this.minimumArityTextBox, 0);
+      this.Controls.SetChildIndex(this.infoLabel, 0);
+      this.Controls.SetChildIndex(this.initializationGroupBox, 0);
+      this.Controls.SetChildIndex(this.initialFrequencyTextBox, 0);
+      this.Controls.SetChildIndex(this.initialFrequencyLabel, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.Controls.SetChildIndex(this.mutationGroupBox, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.initializationGroupBox.ResumeLayout(false);
+      this.initializationGroupBox.PerformLayout();
+      this.mutationGroupBox.ResumeLayout(false);
+      this.mutationGroupBox.PerformLayout();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label weightNuLabel;
+    private System.Windows.Forms.TextBox minValueTextBox;
+    protected System.Windows.Forms.GroupBox initializationGroupBox;
+    private System.Windows.Forms.Label weightSigmaLabel;
+    private System.Windows.Forms.TextBox maxValueTextBox;
+    protected System.Windows.Forms.GroupBox mutationGroupBox;
+    private System.Windows.Forms.Label multiplicativeChangeLabel;
+    private System.Windows.Forms.TextBox multiplicativeChangeSigmaTextBox;
+    private System.Windows.Forms.Label additiveChangeLabel;
+    private System.Windows.Forms.TextBox additiveChangeSigmaTextBox;
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/ConstantView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/ConstantView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/ConstantView.cs	(revision 10269)
@@ -0,0 +1,133 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Windows.Forms;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  [View("Constant View")]
+  [Content(typeof(Constant), true)]
+  public partial class ConstantView : SymbolView {
+    public new Constant Content {
+      get { return (Constant)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public ConstantView() {
+      InitializeComponent();
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.Changed += new EventHandler(Content_Changed);
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.Changed -= new EventHandler(Content_Changed);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      UpdateControl();
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      minValueTextBox.Enabled = Content != null;
+      minValueTextBox.ReadOnly = ReadOnly;
+      maxValueTextBox.Enabled = Content != null;
+      maxValueTextBox.ReadOnly = ReadOnly;
+      additiveChangeSigmaTextBox.Enabled = Content != null;
+      additiveChangeSigmaTextBox.ReadOnly = ReadOnly;
+      multiplicativeChangeSigmaTextBox.Enabled = Content != null;
+      multiplicativeChangeSigmaTextBox.ReadOnly = ReadOnly;
+    }
+
+    #region content event handlers
+    private void Content_Changed(object sender, EventArgs e) {
+      UpdateControl();
+    }
+    #endregion
+
+    #region control event handlers
+    private void minValueTextBox_TextChanged(object sender, EventArgs e) {
+      double min;
+      if (double.TryParse(minValueTextBox.Text, out min)) {
+        Content.MinValue = min;
+        errorProvider.SetError(minValueTextBox, string.Empty);
+      } else {
+        errorProvider.SetError(minValueTextBox, "Invalid value");
+      }
+    }
+    private void maxValueTextBox_TextChanged(object sender, EventArgs e) {
+      double max;
+      if (double.TryParse(maxValueTextBox.Text, out max)) {
+        Content.MaxValue = max;
+        errorProvider.SetError(maxValueTextBox, string.Empty);
+      } else {
+        errorProvider.SetError(maxValueTextBox, "Invalid value");
+      }
+    }
+
+    private void additiveChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
+      double sigma;
+      if (double.TryParse(additiveChangeSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
+        Content.ManipulatorSigma = sigma;
+        errorProvider.SetError(additiveChangeSigmaTextBox, string.Empty);
+      } else {
+        errorProvider.SetError(additiveChangeSigmaTextBox, "Invalid value");
+      }
+    }
+
+    private void multiplicativeChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
+      double sigma;
+      if (double.TryParse(multiplicativeChangeSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
+        Content.MultiplicativeManipulatorSigma = sigma;
+        errorProvider.SetError(multiplicativeChangeSigmaTextBox, string.Empty);
+      } else {
+        errorProvider.SetError(multiplicativeChangeSigmaTextBox, "Invalid value");
+      }
+    }
+    #endregion
+
+    #region helpers
+    private void UpdateControl() {
+      if (Content == null) {
+        minValueTextBox.Text = string.Empty;
+        maxValueTextBox.Text = string.Empty;
+        minValueTextBox.Text = string.Empty;
+        multiplicativeChangeSigmaTextBox.Text = string.Empty;
+        additiveChangeSigmaTextBox.Text = string.Empty;
+      } else {
+        minValueTextBox.Text = Content.MinValue.ToString();
+        maxValueTextBox.Text = Content.MaxValue.ToString();
+        additiveChangeSigmaTextBox.Text = Content.ManipulatorSigma.ToString();
+        multiplicativeChangeSigmaTextBox.Text = Content.MultiplicativeManipulatorSigma.ToString();
+      }
+      SetEnabledStateOfControls();
+    }
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/LaggedVariableView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/LaggedVariableView.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/LaggedVariableView.Designer.cs	(revision 10269)
@@ -0,0 +1,226 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class LaggedVariableView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.minTimeOffsetLabel = new System.Windows.Forms.Label();
+      this.maxTimeOffsetLabel = new System.Windows.Forms.Label();
+      this.minTimeOffsetTextBox = new System.Windows.Forms.TextBox();
+      this.maxTimeOffsetTextBox = new System.Windows.Forms.TextBox();
+      this.initializationGroupBox.SuspendLayout();
+      this.mutationGroupBox.SuspendLayout();
+      this.parametersTabPage.SuspendLayout();
+      this.tabControl.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // weightMuLabel
+      // 
+      this.toolTip.SetToolTip(this.weightMuLabel, "The mu (mean) parameter of the normal distribution to use for initial weights.");
+      // 
+      // weightInitializationMuTextBox
+      // 
+      this.toolTip.SetToolTip(this.weightInitializationMuTextBox, "The mu (mean) parameter of the normal distribution from which to sample the initi" +
+        "al weights.");
+      // 
+      // initializationGroupBox
+      // 
+      this.initializationGroupBox.Location = new System.Drawing.Point(6, 7);
+      this.initializationGroupBox.Size = new System.Drawing.Size(379, 73);
+      // 
+      // weightSigmaLabel
+      // 
+      this.toolTip.SetToolTip(this.weightSigmaLabel, "The sigma parameter for the normal distribution to use for the initial weights.");
+      // 
+      // weightInitializationSigmaTextBox
+      // 
+      this.toolTip.SetToolTip(this.weightInitializationSigmaTextBox, "The sigma parameter for the normal distribution from which to sample the initial " +
+        "weights.");
+      // 
+      // mutationGroupBox
+      // 
+      this.mutationGroupBox.Location = new System.Drawing.Point(6, 86);
+      this.mutationGroupBox.Size = new System.Drawing.Size(379, 73);
+      // 
+      // multiplicativeWeightChangeLabel
+      // 
+      this.toolTip.SetToolTip(this.multiplicativeWeightChangeLabel, "The sigma parameter for the normal distribution to use to sample a multiplicative" +
+        " change in weight.");
+      // 
+      // multiplicativeWeightChangeSigmaTextBox
+      // 
+      this.toolTip.SetToolTip(this.multiplicativeWeightChangeSigmaTextBox, "The sigma (std.dev.) parameter for the normal distribution to sample a multiplica" +
+        "tive change in weight.");
+      // 
+      // additiveWeightChangeLabel
+      // 
+      this.toolTip.SetToolTip(this.additiveWeightChangeLabel, "The sigma (std.dev.) parameter for the normal distribution to sample an additive " +
+        "change in weight.");
+      // 
+      // additiveWeightChangeSigmaTextBox
+      // 
+      this.toolTip.SetToolTip(this.additiveWeightChangeSigmaTextBox, "The sigma (std.dev.) parameter for the normal distribution to sample an additive " +
+        "change in weight.");
+      // 
+      // variableNamesTabPage
+      // 
+      this.variableNamesTabPage.Size = new System.Drawing.Size(400, 149);
+      // 
+      // parametersTabPage
+      // 
+      this.parametersTabPage.Size = new System.Drawing.Size(400, 149);
+      // 
+      // tabControl
+      // 
+      this.tabControl.Location = new System.Drawing.Point(0, 179);
+      this.tabControl.Size = new System.Drawing.Size(408, 175);
+      this.tabControl.TabIndex = 9;
+      // 
+      // initialFrequencyLabel
+      // 
+      this.toolTip.SetToolTip(this.initialFrequencyLabel, "Relative frequency of the symbol in randomly created trees");
+      // 
+      // initialFrequencyTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.initialFrequencyTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      // 
+      // minimumArityTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.minimumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.minimumArityTextBox.Size = new System.Drawing.Size(315, 20);
+      // 
+      // maximumArityTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.maximumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.maximumArityTextBox.Size = new System.Drawing.Size(315, 20);
+      // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      // 
+      // minTimeOffsetLabel
+      // 
+      this.minTimeOffsetLabel.AutoSize = true;
+      this.minTimeOffsetLabel.Location = new System.Drawing.Point(3, 130);
+      this.minTimeOffsetLabel.Name = "minTimeOffsetLabel";
+      this.minTimeOffsetLabel.Size = new System.Drawing.Size(81, 13);
+      this.minTimeOffsetLabel.TabIndex = 5;
+      this.minTimeOffsetLabel.Text = "Min. time offset:";
+      // 
+      // maxTimeOffsetLabel
+      // 
+      this.maxTimeOffsetLabel.AutoSize = true;
+      this.maxTimeOffsetLabel.Location = new System.Drawing.Point(3, 156);
+      this.maxTimeOffsetLabel.Name = "maxTimeOffsetLabel";
+      this.maxTimeOffsetLabel.Size = new System.Drawing.Size(84, 13);
+      this.maxTimeOffsetLabel.TabIndex = 7;
+      this.maxTimeOffsetLabel.Text = "Max. time offset:";
+      // 
+      // minTimeOffsetTextBox
+      // 
+      this.minTimeOffsetTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.minTimeOffsetTextBox.Location = new System.Drawing.Point(93, 127);
+      this.minTimeOffsetTextBox.Name = "minTimeOffsetTextBox";
+      this.minTimeOffsetTextBox.Size = new System.Drawing.Size(315, 20);
+      this.minTimeOffsetTextBox.TabIndex = 6;
+      this.minTimeOffsetTextBox.TextChanged += new System.EventHandler(this.minTimeOffsetTextBox_TextChanged);
+      // 
+      // maxTimeOffsetTextBox
+      // 
+      this.maxTimeOffsetTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.maxTimeOffsetTextBox.Location = new System.Drawing.Point(93, 153);
+      this.maxTimeOffsetTextBox.Name = "maxTimeOffsetTextBox";
+      this.maxTimeOffsetTextBox.Size = new System.Drawing.Size(315, 20);
+      this.maxTimeOffsetTextBox.TabIndex = 8;
+      this.maxTimeOffsetTextBox.TextChanged += new System.EventHandler(this.maxTimeOffsetTextBox_TextChanged);
+      // 
+      // LaggedVariableView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.minTimeOffsetTextBox);
+      this.Controls.Add(this.maxTimeOffsetLabel);
+      this.Controls.Add(this.minTimeOffsetLabel);
+      this.Controls.Add(this.maxTimeOffsetTextBox);
+      this.Name = "LaggedVariableView";
+      this.Size = new System.Drawing.Size(408, 352);
+      this.Controls.SetChildIndex(this.maxTimeOffsetTextBox, 0);
+      this.Controls.SetChildIndex(this.minTimeOffsetLabel, 0);
+      this.Controls.SetChildIndex(this.maxTimeOffsetLabel, 0);
+      this.Controls.SetChildIndex(this.minTimeOffsetTextBox, 0);
+      this.Controls.SetChildIndex(this.maximumArityLabel, 0);
+      this.Controls.SetChildIndex(this.maximumArityTextBox, 0);
+      this.Controls.SetChildIndex(this.minimumArityLabel, 0);
+      this.Controls.SetChildIndex(this.minimumArityTextBox, 0);
+      this.Controls.SetChildIndex(this.infoLabel, 0);
+      this.Controls.SetChildIndex(this.tabControl, 0);
+      this.Controls.SetChildIndex(this.initialFrequencyTextBox, 0);
+      this.Controls.SetChildIndex(this.initialFrequencyLabel, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.initializationGroupBox.ResumeLayout(false);
+      this.initializationGroupBox.PerformLayout();
+      this.mutationGroupBox.ResumeLayout(false);
+      this.mutationGroupBox.PerformLayout();
+      this.parametersTabPage.ResumeLayout(false);
+      this.tabControl.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label minTimeOffsetLabel;
+    private System.Windows.Forms.Label maxTimeOffsetLabel;
+    private System.Windows.Forms.TextBox minTimeOffsetTextBox;
+    private System.Windows.Forms.TextBox maxTimeOffsetTextBox;
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/LaggedVariableView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/LaggedVariableView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/LaggedVariableView.cs	(revision 10269)
@@ -0,0 +1,107 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Windows.Forms;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  [View("LaggedVariable View")]
+  [Content(typeof(LaggedVariable), true)]
+  public partial class LaggedVariableView : VariableView {
+    public new LaggedVariable Content {
+      get { return (LaggedVariable)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public LaggedVariableView() {
+      InitializeComponent();
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.Changed += new EventHandler(Content_Changed);
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.Changed -= new EventHandler(Content_Changed);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      UpdateControl();
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      minTimeOffsetTextBox.Enabled = Content != null;
+      minTimeOffsetTextBox.ReadOnly = ReadOnly;
+      maxTimeOffsetTextBox.Enabled = Content != null;
+      maxTimeOffsetTextBox.ReadOnly = ReadOnly;
+    }
+
+    #region content event handlers
+    private void Content_Changed(object sender, EventArgs e) {
+      UpdateControl();
+    }
+    #endregion
+
+    #region control event handlers
+
+    private void minTimeOffsetTextBox_TextChanged(object sender, EventArgs e) {
+      int timeOffset;
+      if (int.TryParse(minTimeOffsetTextBox.Text, out timeOffset) && timeOffset <= 0) {
+        Content.MinLag = timeOffset;
+        errorProvider.SetError(minTimeOffsetTextBox, string.Empty);
+      } else {
+        errorProvider.SetError(minTimeOffsetTextBox, "Time offset must be negative or zero.");
+      }
+    }
+
+    private void maxTimeOffsetTextBox_TextChanged(object sender, EventArgs e) {
+      int timeOffset;
+      if (int.TryParse(maxTimeOffsetTextBox.Text, out timeOffset) && timeOffset <= 0) {
+        Content.MaxLag = timeOffset;
+        errorProvider.SetError(maxTimeOffsetTextBox, string.Empty);
+      } else {
+        errorProvider.SetError(maxTimeOffsetTextBox, "Time offset must be negative or zero.");
+      }
+    }
+
+    #endregion
+
+    #region helpers
+    private void UpdateControl() {
+      if (Content == null) {
+        minTimeOffsetTextBox.Text = string.Empty;
+        maxTimeOffsetTextBox.Text = string.Empty;
+      } else {
+        minTimeOffsetTextBox.Text = Content.MinLag.ToString();
+        maxTimeOffsetTextBox.Text = Content.MaxLag.ToString();
+      }
+      SetEnabledStateOfControls();
+    }
+    #endregion
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/TimeLagView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/TimeLagView.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/TimeLagView.Designer.cs	(revision 10269)
@@ -0,0 +1,159 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class LaggedSymbolView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.minTimeOffsetLabel = new System.Windows.Forms.Label();
+      this.maxTimeOffsetLabel = new System.Windows.Forms.Label();
+      this.minTimeOffsetTextBox = new System.Windows.Forms.TextBox();
+      this.maxTimeOffsetTextBox = new System.Windows.Forms.TextBox();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // initialFrequencyLabel
+      // 
+      this.toolTip.SetToolTip(this.initialFrequencyLabel, "Relative frequency of the symbol in randomly created trees");
+      // 
+      // initialFrequencyTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.initialFrequencyTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.initialFrequencyTextBox.Size = new System.Drawing.Size(315, 20);
+      // 
+      // minimumArityTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.minimumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.minimumArityTextBox.Size = new System.Drawing.Size(315, 20);
+      // 
+      // maximumArityTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.maximumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.maximumArityTextBox.Size = new System.Drawing.Size(315, 20);
+      // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      this.nameTextBox.Size = new System.Drawing.Size(290, 20);
+      // 
+      // infoLabel
+      // 
+      this.infoLabel.Location = new System.Drawing.Point(389, 3);
+      // 
+      // minTimeOffsetLabel
+      // 
+      this.minTimeOffsetLabel.AutoSize = true;
+      this.minTimeOffsetLabel.Location = new System.Drawing.Point(3, 130);
+      this.minTimeOffsetLabel.Name = "minTimeOffsetLabel";
+      this.minTimeOffsetLabel.Size = new System.Drawing.Size(81, 13);
+      this.minTimeOffsetLabel.TabIndex = 5;
+      this.minTimeOffsetLabel.Text = "Min. time offset:";
+      // 
+      // maxTimeOffsetLabel
+      // 
+      this.maxTimeOffsetLabel.AutoSize = true;
+      this.maxTimeOffsetLabel.Location = new System.Drawing.Point(3, 156);
+      this.maxTimeOffsetLabel.Name = "maxTimeOffsetLabel";
+      this.maxTimeOffsetLabel.Size = new System.Drawing.Size(84, 13);
+      this.maxTimeOffsetLabel.TabIndex = 7;
+      this.maxTimeOffsetLabel.Text = "Max. time offset:";
+      // 
+      // minTimeOffsetTextBox
+      // 
+      this.minTimeOffsetTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.minTimeOffsetTextBox.Location = new System.Drawing.Point(93, 127);
+      this.minTimeOffsetTextBox.Name = "minTimeOffsetTextBox";
+      this.minTimeOffsetTextBox.Size = new System.Drawing.Size(315, 20);
+      this.minTimeOffsetTextBox.TabIndex = 6;
+      this.minTimeOffsetTextBox.TextChanged += new System.EventHandler(this.minTimeOffsetTextBox_TextChanged);
+      // 
+      // maxTimeOffsetTextBox
+      // 
+      this.maxTimeOffsetTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.maxTimeOffsetTextBox.Location = new System.Drawing.Point(93, 153);
+      this.maxTimeOffsetTextBox.Name = "maxTimeOffsetTextBox";
+      this.maxTimeOffsetTextBox.Size = new System.Drawing.Size(315, 20);
+      this.maxTimeOffsetTextBox.TabIndex = 8;
+      this.maxTimeOffsetTextBox.TextChanged += new System.EventHandler(this.maxTimeOffsetTextBox_TextChanged);
+      // 
+      // LaggedSymbolView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.maxTimeOffsetTextBox);
+      this.Controls.Add(this.minTimeOffsetTextBox);
+      this.Controls.Add(this.maxTimeOffsetLabel);
+      this.Controls.Add(this.minTimeOffsetLabel);
+      this.Name = "LaggedSymbolView";
+      this.Size = new System.Drawing.Size(408, 179);
+      this.Controls.SetChildIndex(this.maximumArityLabel, 0);
+      this.Controls.SetChildIndex(this.maximumArityTextBox, 0);
+      this.Controls.SetChildIndex(this.minimumArityLabel, 0);
+      this.Controls.SetChildIndex(this.minimumArityTextBox, 0);
+      this.Controls.SetChildIndex(this.infoLabel, 0);
+      this.Controls.SetChildIndex(this.initialFrequencyTextBox, 0);
+      this.Controls.SetChildIndex(this.initialFrequencyLabel, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.Controls.SetChildIndex(this.minTimeOffsetLabel, 0);
+      this.Controls.SetChildIndex(this.maxTimeOffsetLabel, 0);
+      this.Controls.SetChildIndex(this.minTimeOffsetTextBox, 0);
+      this.Controls.SetChildIndex(this.maxTimeOffsetTextBox, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label minTimeOffsetLabel;
+    private System.Windows.Forms.Label maxTimeOffsetLabel;
+    private System.Windows.Forms.TextBox minTimeOffsetTextBox;
+    private System.Windows.Forms.TextBox maxTimeOffsetTextBox;
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/TimeLagView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/TimeLagView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/TimeLagView.cs	(revision 10269)
@@ -0,0 +1,108 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Windows.Forms;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  [View("LaggedSymbol View")]
+  [Content(typeof(LaggedSymbol), true)]
+  public partial class LaggedSymbolView : SymbolView {
+    public new LaggedSymbol Content {
+      get { return (LaggedSymbol)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public LaggedSymbolView() {
+      InitializeComponent();
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.Changed += new EventHandler(Content_Changed);
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.Changed -= new EventHandler(Content_Changed);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      UpdateControl();
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      minTimeOffsetTextBox.Enabled = Content != null;
+      minTimeOffsetTextBox.ReadOnly = ReadOnly;
+      maxTimeOffsetTextBox.Enabled = Content != null;
+      maxTimeOffsetTextBox.ReadOnly = ReadOnly;
+    }
+
+    #region content event handlers
+    private void Content_Changed(object sender, EventArgs e) {
+      UpdateControl();
+    }
+    #endregion
+
+    #region control event handlers
+
+    private void minTimeOffsetTextBox_TextChanged(object sender, EventArgs e) {
+      int timeOffset;
+      if (int.TryParse(minTimeOffsetTextBox.Text, out timeOffset) && timeOffset <= 0) {
+        Content.MinLag = timeOffset;
+        errorProvider.SetError(minTimeOffsetTextBox, string.Empty);
+      } else {
+        errorProvider.SetError(minTimeOffsetTextBox, "Time offset must be negative or zero.");
+      }
+    }
+
+    private void maxTimeOffsetTextBox_TextChanged(object sender, EventArgs e) {
+      int timeOffset;
+      if (int.TryParse(maxTimeOffsetTextBox.Text, out timeOffset) && timeOffset <= 0) {
+        Content.MaxLag = timeOffset;
+        errorProvider.SetError(maxTimeOffsetTextBox, string.Empty);
+      } else {
+        errorProvider.SetError(maxTimeOffsetTextBox, "Time offset must be negative or zero.");
+      }
+    }
+
+    #endregion
+
+    #region helpers
+    private void UpdateControl() {
+      if (Content == null) {
+        minTimeOffsetTextBox.Text = string.Empty;
+        maxTimeOffsetTextBox.Text = string.Empty;
+      } else {
+        minTimeOffsetTextBox.Text = Content.MinLag.ToString();
+        maxTimeOffsetTextBox.Text = Content.MaxLag.ToString();
+      }
+      SetEnabledStateOfControls();
+    }
+    #endregion
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableConditionView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableConditionView.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableConditionView.Designer.cs	(revision 10269)
@@ -0,0 +1,419 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class VariableConditionView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.mutationGroupBox = new System.Windows.Forms.GroupBox();
+      this.slopeChangeSigmaLabel = new System.Windows.Forms.Label();
+      this.slopeChangeSigmaTextBox = new System.Windows.Forms.TextBox();
+      this.slopeChangeMuLabel = new System.Windows.Forms.Label();
+      this.slopeChangeMuTextBox = new System.Windows.Forms.TextBox();
+      this.thresholdChangeSigmaLabel = new System.Windows.Forms.Label();
+      this.thresholdChangeSigmaTextBox = new System.Windows.Forms.TextBox();
+      this.ThresholdChangeMuLabel = new System.Windows.Forms.Label();
+      this.thresholdChangeMuTextBox = new System.Windows.Forms.TextBox();
+      this.tabControl = new System.Windows.Forms.TabControl();
+      this.variableNamesTabPage = new System.Windows.Forms.TabPage();
+      this.parametersTabPage = new System.Windows.Forms.TabPage();
+      this.initializationGroupBox = new System.Windows.Forms.GroupBox();
+      this.slopeInitializationSigmaLabel = new System.Windows.Forms.Label();
+      this.slopeInitializationSigmaTextBox = new System.Windows.Forms.TextBox();
+      this.slopeInitializationMuLabel = new System.Windows.Forms.Label();
+      this.slopeInitializationMuTextBox = new System.Windows.Forms.TextBox();
+      this.thresholdInitializationSigmaLabel = new System.Windows.Forms.Label();
+      this.thresholdInitializationSigmaTextBox = new System.Windows.Forms.TextBox();
+      this.thresholdInitializationMuLabel = new System.Windows.Forms.Label();
+      this.thresholdInitializationMuTextBox = new System.Windows.Forms.TextBox();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.mutationGroupBox.SuspendLayout();
+      this.tabControl.SuspendLayout();
+      this.parametersTabPage.SuspendLayout();
+      this.initializationGroupBox.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // initialFrequencyLabel
+      // 
+      this.toolTip.SetToolTip(this.initialFrequencyLabel, "Relative frequency of the symbol in randomly created trees");
+      // 
+      // initialFrequencyTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.initialFrequencyTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.initialFrequencyTextBox.Size = new System.Drawing.Size(427, 20);
+      // 
+      // minimumArityLabel
+      // 
+      this.toolTip.SetToolTip(this.minimumArityLabel, "The minimum arity of the symbol");
+      // 
+      // maximumArityLabel
+      // 
+      this.toolTip.SetToolTip(this.maximumArityLabel, "The maximum arity of the symbol");
+      // 
+      // minimumArityTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.minimumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.minimumArityTextBox.Size = new System.Drawing.Size(421, 20);
+      // 
+      // maximumArityTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.maximumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.maximumArityTextBox.Size = new System.Drawing.Size(421, 20);
+      // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      this.nameTextBox.Size = new System.Drawing.Size(397, 20);
+      // 
+      // infoLabel
+      // 
+      this.infoLabel.Location = new System.Drawing.Point(495, 3);
+      // 
+      // mutationGroupBox
+      // 
+      this.mutationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.mutationGroupBox.Controls.Add(this.slopeChangeSigmaLabel);
+      this.mutationGroupBox.Controls.Add(this.slopeChangeSigmaTextBox);
+      this.mutationGroupBox.Controls.Add(this.slopeChangeMuLabel);
+      this.mutationGroupBox.Controls.Add(this.slopeChangeMuTextBox);
+      this.mutationGroupBox.Controls.Add(this.thresholdChangeSigmaLabel);
+      this.mutationGroupBox.Controls.Add(this.thresholdChangeSigmaTextBox);
+      this.mutationGroupBox.Controls.Add(this.ThresholdChangeMuLabel);
+      this.mutationGroupBox.Controls.Add(this.thresholdChangeMuTextBox);
+      this.mutationGroupBox.Location = new System.Drawing.Point(6, 142);
+      this.mutationGroupBox.Name = "mutationGroupBox";
+      this.mutationGroupBox.Size = new System.Drawing.Size(503, 126);
+      this.mutationGroupBox.TabIndex = 6;
+      this.mutationGroupBox.TabStop = false;
+      this.mutationGroupBox.Text = "Mutation";
+      // 
+      // slopeChangeSigmaLabel
+      // 
+      this.slopeChangeSigmaLabel.AutoSize = true;
+      this.slopeChangeSigmaLabel.Location = new System.Drawing.Point(6, 102);
+      this.slopeChangeSigmaLabel.Name = "slopeChangeSigmaLabel";
+      this.slopeChangeSigmaLabel.Size = new System.Drawing.Size(112, 13);
+      this.slopeChangeSigmaLabel.TabIndex = 6;
+      this.slopeChangeSigmaLabel.Text = "Slope change (sigma):";
+      this.toolTip.SetToolTip(this.slopeChangeSigmaLabel, "The sigma parameter for the normal distribution to use to sample the change in sl" +
+              "ope.");
+      // 
+      // slopeChangeSigmaTextBox
+      // 
+      this.slopeChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.slopeChangeSigmaTextBox.Location = new System.Drawing.Point(149, 99);
+      this.slopeChangeSigmaTextBox.Name = "slopeChangeSigmaTextBox";
+      this.slopeChangeSigmaTextBox.Size = new System.Drawing.Size(345, 20);
+      this.slopeChangeSigmaTextBox.TabIndex = 7;
+      this.toolTip.SetToolTip(this.slopeChangeSigmaTextBox, "The sigma parameter for the normal distribution to use to sample the change in sl" +
+              "ope.");
+      this.slopeChangeSigmaTextBox.TextChanged += new System.EventHandler(this.SlopeChangeSigmaTextBox_TextChanged);
+      // 
+      // slopeChangeMuLabel
+      // 
+      this.slopeChangeMuLabel.AutoSize = true;
+      this.slopeChangeMuLabel.Location = new System.Drawing.Point(6, 76);
+      this.slopeChangeMuLabel.Name = "slopeChangeMuLabel";
+      this.slopeChangeMuLabel.Size = new System.Drawing.Size(99, 13);
+      this.slopeChangeMuLabel.TabIndex = 4;
+      this.slopeChangeMuLabel.Text = "Slope change (mu):";
+      this.toolTip.SetToolTip(this.slopeChangeMuLabel, "The nu (mean) parameter for the normal distribution to sample the change in slope" +
+              ".");
+      // 
+      // slopeChangeMuTextBox
+      // 
+      this.slopeChangeMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.slopeChangeMuTextBox.Location = new System.Drawing.Point(149, 73);
+      this.slopeChangeMuTextBox.Name = "slopeChangeMuTextBox";
+      this.slopeChangeMuTextBox.Size = new System.Drawing.Size(345, 20);
+      this.slopeChangeMuTextBox.TabIndex = 5;
+      this.toolTip.SetToolTip(this.slopeChangeMuTextBox, "The mu (mean) parameter for the normal distribution to sample the change in slope" +
+              ".");
+      this.slopeChangeMuTextBox.TextChanged += new System.EventHandler(this.SlopeChangeMuTextBox_TextChanged);
+      // 
+      // thresholdChangeSigmaLabel
+      // 
+      this.thresholdChangeSigmaLabel.AutoSize = true;
+      this.thresholdChangeSigmaLabel.Location = new System.Drawing.Point(6, 44);
+      this.thresholdChangeSigmaLabel.Name = "thresholdChangeSigmaLabel";
+      this.thresholdChangeSigmaLabel.Size = new System.Drawing.Size(132, 13);
+      this.thresholdChangeSigmaLabel.TabIndex = 2;
+      this.thresholdChangeSigmaLabel.Text = "Threshold change (sigma):";
+      this.toolTip.SetToolTip(this.thresholdChangeSigmaLabel, "The sigma parameter for the normal distribution to use to sample the change in th" +
+              "reshold.");
+      // 
+      // thresholdChangeSigmaTextBox
+      // 
+      this.thresholdChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.thresholdChangeSigmaTextBox.Location = new System.Drawing.Point(149, 41);
+      this.thresholdChangeSigmaTextBox.Name = "thresholdChangeSigmaTextBox";
+      this.thresholdChangeSigmaTextBox.Size = new System.Drawing.Size(345, 20);
+      this.thresholdChangeSigmaTextBox.TabIndex = 3;
+      this.toolTip.SetToolTip(this.thresholdChangeSigmaTextBox, "The sigma parameter for the normal distribution to use to sample the change in th" +
+              "reshold.");
+      this.thresholdChangeSigmaTextBox.TextChanged += new System.EventHandler(this.ThresholdChangeSigmaTextBox_TextChanged);
+      // 
+      // ThresholdChangeMuLabel
+      // 
+      this.ThresholdChangeMuLabel.AutoSize = true;
+      this.ThresholdChangeMuLabel.Location = new System.Drawing.Point(6, 18);
+      this.ThresholdChangeMuLabel.Name = "ThresholdChangeMuLabel";
+      this.ThresholdChangeMuLabel.Size = new System.Drawing.Size(119, 13);
+      this.ThresholdChangeMuLabel.TabIndex = 0;
+      this.ThresholdChangeMuLabel.Text = "Threshold change (mu):";
+      this.toolTip.SetToolTip(this.ThresholdChangeMuLabel, "The nu (mean) parameter for the normal distribution to sample the change in thres" +
+              "hold.");
+      // 
+      // thresholdChangeMuTextBox
+      // 
+      this.thresholdChangeMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.thresholdChangeMuTextBox.Location = new System.Drawing.Point(149, 15);
+      this.thresholdChangeMuTextBox.Name = "thresholdChangeMuTextBox";
+      this.thresholdChangeMuTextBox.Size = new System.Drawing.Size(345, 20);
+      this.thresholdChangeMuTextBox.TabIndex = 1;
+      this.toolTip.SetToolTip(this.thresholdChangeMuTextBox, "The mu (mean) parameter for the normal distribution to sample the change in thres" +
+              "hold.");
+      this.thresholdChangeMuTextBox.TextChanged += new System.EventHandler(this.ThresholdChangeMuTextBox_TextChanged);
+      // 
+      // tabControl
+      // 
+      this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.tabControl.Controls.Add(this.variableNamesTabPage);
+      this.tabControl.Controls.Add(this.parametersTabPage);
+      this.tabControl.Location = new System.Drawing.Point(0, 127);
+      this.tabControl.Name = "tabControl";
+      this.tabControl.SelectedIndex = 0;
+      this.tabControl.Size = new System.Drawing.Size(520, 299);
+      this.tabControl.TabIndex = 10;
+      // 
+      // variableNamesTabPage
+      // 
+      this.variableNamesTabPage.Location = new System.Drawing.Point(4, 22);
+      this.variableNamesTabPage.Name = "variableNamesTabPage";
+      this.variableNamesTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.variableNamesTabPage.Size = new System.Drawing.Size(512, 273);
+      this.variableNamesTabPage.TabIndex = 0;
+      this.variableNamesTabPage.Text = "Variable Names";
+      this.variableNamesTabPage.UseVisualStyleBackColor = true;
+      // 
+      // parametersTabPage
+      // 
+      this.parametersTabPage.Controls.Add(this.initializationGroupBox);
+      this.parametersTabPage.Controls.Add(this.mutationGroupBox);
+      this.parametersTabPage.Location = new System.Drawing.Point(4, 22);
+      this.parametersTabPage.Name = "parametersTabPage";
+      this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.parametersTabPage.Size = new System.Drawing.Size(512, 273);
+      this.parametersTabPage.TabIndex = 1;
+      this.parametersTabPage.Text = "Parameters";
+      this.parametersTabPage.UseVisualStyleBackColor = true;
+      // 
+      // initializationGroupBox
+      // 
+      this.initializationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.initializationGroupBox.Controls.Add(this.slopeInitializationSigmaLabel);
+      this.initializationGroupBox.Controls.Add(this.slopeInitializationSigmaTextBox);
+      this.initializationGroupBox.Controls.Add(this.slopeInitializationMuLabel);
+      this.initializationGroupBox.Controls.Add(this.slopeInitializationMuTextBox);
+      this.initializationGroupBox.Controls.Add(this.thresholdInitializationSigmaLabel);
+      this.initializationGroupBox.Controls.Add(this.thresholdInitializationSigmaTextBox);
+      this.initializationGroupBox.Controls.Add(this.thresholdInitializationMuLabel);
+      this.initializationGroupBox.Controls.Add(this.thresholdInitializationMuTextBox);
+      this.initializationGroupBox.Location = new System.Drawing.Point(6, 6);
+      this.initializationGroupBox.Name = "initializationGroupBox";
+      this.initializationGroupBox.Size = new System.Drawing.Size(503, 130);
+      this.initializationGroupBox.TabIndex = 6;
+      this.initializationGroupBox.TabStop = false;
+      this.initializationGroupBox.Text = "Initialization";
+      // 
+      // slopeInitializationSigmaLabel
+      // 
+      this.slopeInitializationSigmaLabel.AutoSize = true;
+      this.slopeInitializationSigmaLabel.Location = new System.Drawing.Point(6, 105);
+      this.slopeInitializationSigmaLabel.Name = "slopeInitializationSigmaLabel";
+      this.slopeInitializationSigmaLabel.Size = new System.Drawing.Size(73, 13);
+      this.slopeInitializationSigmaLabel.TabIndex = 6;
+      this.slopeInitializationSigmaLabel.Text = "Slope (sigma):";
+      this.toolTip.SetToolTip(this.slopeInitializationSigmaLabel, "The sigma parameter for the normal distribution to use for the initial slopes.");
+      // 
+      // slopeInitializationSigmaTextBox
+      // 
+      this.slopeInitializationSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.slopeInitializationSigmaTextBox.Location = new System.Drawing.Point(114, 102);
+      this.slopeInitializationSigmaTextBox.Name = "slopeInitializationSigmaTextBox";
+      this.slopeInitializationSigmaTextBox.Size = new System.Drawing.Size(380, 20);
+      this.slopeInitializationSigmaTextBox.TabIndex = 7;
+      this.toolTip.SetToolTip(this.slopeInitializationSigmaTextBox, "The sigma parameter for the normal distribution from which to sample the initial " +
+              "slopes.");
+      this.slopeInitializationSigmaTextBox.TextChanged += new System.EventHandler(this.SlopeInitializationSigmaTextBox_TextChanged);
+      // 
+      // slopeInitializationMuLabel
+      // 
+      this.slopeInitializationMuLabel.AutoSize = true;
+      this.slopeInitializationMuLabel.Location = new System.Drawing.Point(6, 79);
+      this.slopeInitializationMuLabel.Name = "slopeInitializationMuLabel";
+      this.slopeInitializationMuLabel.Size = new System.Drawing.Size(60, 13);
+      this.slopeInitializationMuLabel.TabIndex = 4;
+      this.slopeInitializationMuLabel.Text = "Slope (mu):";
+      this.toolTip.SetToolTip(this.slopeInitializationMuLabel, "The mu (mean) parameter of the normal distribution to use for initial slopes.");
+      // 
+      // slopeInitializationMuTextBox
+      // 
+      this.slopeInitializationMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.slopeInitializationMuTextBox.Location = new System.Drawing.Point(114, 76);
+      this.slopeInitializationMuTextBox.Name = "slopeInitializationMuTextBox";
+      this.slopeInitializationMuTextBox.Size = new System.Drawing.Size(380, 20);
+      this.slopeInitializationMuTextBox.TabIndex = 5;
+      this.toolTip.SetToolTip(this.slopeInitializationMuTextBox, "The mu (mean) parameter of the normal distribution from which to sample the initi" +
+              "al slopes.");
+      this.slopeInitializationMuTextBox.TextChanged += new System.EventHandler(this.SlopeInitializationMuTextBox_TextChanged);
+      // 
+      // thresholdInitializationSigmaLabel
+      // 
+      this.thresholdInitializationSigmaLabel.AutoSize = true;
+      this.thresholdInitializationSigmaLabel.Location = new System.Drawing.Point(6, 44);
+      this.thresholdInitializationSigmaLabel.Name = "thresholdInitializationSigmaLabel";
+      this.thresholdInitializationSigmaLabel.Size = new System.Drawing.Size(93, 13);
+      this.thresholdInitializationSigmaLabel.TabIndex = 2;
+      this.thresholdInitializationSigmaLabel.Text = "Threshold (sigma):";
+      this.toolTip.SetToolTip(this.thresholdInitializationSigmaLabel, "The sigma parameter for the normal distribution to use for the initial weights.");
+      // 
+      // thresholdInitializationSigmaTextBox
+      // 
+      this.thresholdInitializationSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.thresholdInitializationSigmaTextBox.Location = new System.Drawing.Point(114, 41);
+      this.thresholdInitializationSigmaTextBox.Name = "thresholdInitializationSigmaTextBox";
+      this.thresholdInitializationSigmaTextBox.Size = new System.Drawing.Size(380, 20);
+      this.thresholdInitializationSigmaTextBox.TabIndex = 3;
+      this.toolTip.SetToolTip(this.thresholdInitializationSigmaTextBox, "The sigma parameter for the normal distribution from which to sample the initial " +
+              "thresholds.");
+      this.thresholdInitializationSigmaTextBox.TextChanged += new System.EventHandler(this.ThresholdInitializationSigmaTextBox_TextChanged);
+      // 
+      // thresholdInitializationMuLabel
+      // 
+      this.thresholdInitializationMuLabel.AutoSize = true;
+      this.thresholdInitializationMuLabel.Location = new System.Drawing.Point(6, 18);
+      this.thresholdInitializationMuLabel.Name = "thresholdInitializationMuLabel";
+      this.thresholdInitializationMuLabel.Size = new System.Drawing.Size(80, 13);
+      this.thresholdInitializationMuLabel.TabIndex = 0;
+      this.thresholdInitializationMuLabel.Text = "Threshold (mu):";
+      this.toolTip.SetToolTip(this.thresholdInitializationMuLabel, "The mu (mean) parameter of the normal distribution to use for initial weights.");
+      // 
+      // thresholdInitializationMuTextBox
+      // 
+      this.thresholdInitializationMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.thresholdInitializationMuTextBox.Location = new System.Drawing.Point(114, 15);
+      this.thresholdInitializationMuTextBox.Name = "thresholdInitializationMuTextBox";
+      this.thresholdInitializationMuTextBox.Size = new System.Drawing.Size(380, 20);
+      this.thresholdInitializationMuTextBox.TabIndex = 1;
+      this.toolTip.SetToolTip(this.thresholdInitializationMuTextBox, "The mu (mean) parameter of the normal distribution from which to sample the initi" +
+              "al thresholds.");
+      this.thresholdInitializationMuTextBox.TextChanged += new System.EventHandler(this.ThresholdInitializationMuTextBox_TextChanged);
+      // 
+      // VariableConditionView
+      // 
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.tabControl);
+      this.Name = "VariableConditionView";
+      this.Size = new System.Drawing.Size(520, 426);
+      this.Controls.SetChildIndex(this.maximumArityLabel, 0);
+      this.Controls.SetChildIndex(this.maximumArityTextBox, 0);
+      this.Controls.SetChildIndex(this.minimumArityLabel, 0);
+      this.Controls.SetChildIndex(this.minimumArityTextBox, 0);
+      this.Controls.SetChildIndex(this.infoLabel, 0);
+      this.Controls.SetChildIndex(this.initialFrequencyTextBox, 0);
+      this.Controls.SetChildIndex(this.initialFrequencyLabel, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.Controls.SetChildIndex(this.tabControl, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.mutationGroupBox.ResumeLayout(false);
+      this.mutationGroupBox.PerformLayout();
+      this.tabControl.ResumeLayout(false);
+      this.parametersTabPage.ResumeLayout(false);
+      this.initializationGroupBox.ResumeLayout(false);
+      this.initializationGroupBox.PerformLayout();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    protected System.Windows.Forms.GroupBox mutationGroupBox;
+    private System.Windows.Forms.Label thresholdChangeSigmaLabel;
+    private System.Windows.Forms.TextBox thresholdChangeSigmaTextBox;
+    private System.Windows.Forms.Label ThresholdChangeMuLabel;
+    private System.Windows.Forms.TextBox thresholdChangeMuTextBox;
+    private System.Windows.Forms.Label slopeChangeSigmaLabel;
+    private System.Windows.Forms.TextBox slopeChangeSigmaTextBox;
+    private System.Windows.Forms.Label slopeChangeMuLabel;
+    private System.Windows.Forms.TextBox slopeChangeMuTextBox;
+    protected System.Windows.Forms.TabControl tabControl;
+    protected System.Windows.Forms.TabPage variableNamesTabPage;
+    protected System.Windows.Forms.TabPage parametersTabPage;
+    protected System.Windows.Forms.GroupBox initializationGroupBox;
+    private System.Windows.Forms.Label slopeInitializationSigmaLabel;
+    private System.Windows.Forms.TextBox slopeInitializationSigmaTextBox;
+    private System.Windows.Forms.Label slopeInitializationMuLabel;
+    private System.Windows.Forms.TextBox slopeInitializationMuTextBox;
+    private System.Windows.Forms.Label thresholdInitializationSigmaLabel;
+    private System.Windows.Forms.TextBox thresholdInitializationSigmaTextBox;
+    private System.Windows.Forms.Label thresholdInitializationMuLabel;
+    private System.Windows.Forms.TextBox thresholdInitializationMuTextBox;
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableConditionView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableConditionView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableConditionView.cs	(revision 10269)
@@ -0,0 +1,228 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Collections;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  [View("Variable View")]
+  [Content(typeof(VariableCondition), true)]
+  public partial class VariableConditionView : SymbolView {
+    private readonly CheckedItemCollectionView<StringValue> variableNamesView;
+
+    public new VariableCondition Content {
+      get { return (VariableCondition)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public VariableConditionView() {
+      InitializeComponent();
+      variableNamesView = new CheckedItemCollectionView<StringValue>();
+      variableNamesView.Dock = DockStyle.Fill;
+      variableNamesTabPage.Controls.Add(variableNamesView);
+      variableNamesView.Content = new CheckedItemCollection<StringValue>();
+
+      RegisterVariableNamesViewContentEvents();
+    }
+
+    private void RegisterVariableNamesViewContentEvents() {
+      variableNamesView.Content.ItemsAdded += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      variableNamesView.Content.ItemsRemoved += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      variableNamesView.Content.CheckedItemsChanged += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      variableNamesView.Content.CollectionReset += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      foreach (var variable in variableNamesView.Content) {
+        variable.ValueChanged += new EventHandler(Variable_ValueChanged);
+      }
+    }
+
+    private void DeregisterVariableNamesViewContentEvents() {
+      variableNamesView.Content.ItemsAdded -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      variableNamesView.Content.ItemsRemoved -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      variableNamesView.Content.CheckedItemsChanged -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      variableNamesView.Content.CollectionReset -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      foreach (var variable in variableNamesView.Content) {
+        variable.ValueChanged -= new EventHandler(Variable_ValueChanged);
+      }
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.Changed += new EventHandler(Content_Changed);
+    }
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.Changed -= new EventHandler(Content_Changed);
+    }
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      UpdateControl();
+    }
+    private void Content_Changed(object sender, EventArgs e) {
+      UpdateControl();
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      thresholdInitializationMuTextBox.Enabled = Content != null;
+      thresholdInitializationMuTextBox.ReadOnly = ReadOnly;
+      thresholdInitializationSigmaTextBox.Enabled = Content != null;
+      thresholdInitializationSigmaTextBox.ReadOnly = ReadOnly;
+      slopeInitializationMuTextBox.Enabled = Content != null;
+      slopeInitializationMuTextBox.ReadOnly = ReadOnly;
+      slopeInitializationSigmaTextBox.Enabled = Content != null;
+      slopeInitializationSigmaTextBox.ReadOnly = ReadOnly;
+
+      thresholdChangeMuTextBox.Enabled = Content != null;
+      thresholdChangeMuTextBox.ReadOnly = ReadOnly;
+      thresholdChangeSigmaTextBox.Enabled = Content != null;
+      thresholdChangeSigmaTextBox.ReadOnly = ReadOnly;
+      slopeChangeMuTextBox.Enabled = Content != null;
+      slopeChangeMuTextBox.ReadOnly = ReadOnly;
+      slopeChangeSigmaTextBox.Enabled = Content != null;
+      slopeChangeSigmaTextBox.ReadOnly = ReadOnly;
+    }
+
+    private void UpdateControl() {
+      if (Content == null) {
+        thresholdInitializationMuTextBox.Text = string.Empty;
+        thresholdInitializationSigmaTextBox.Text = string.Empty;
+        slopeInitializationMuTextBox.Text = string.Empty;
+        slopeInitializationSigmaTextBox.Text = string.Empty;
+        thresholdChangeMuTextBox.Text = string.Empty;
+        thresholdChangeSigmaTextBox.Text = string.Empty;
+        slopeChangeMuTextBox.Text = string.Empty;
+        slopeChangeSigmaTextBox.Text = string.Empty;
+        // temporarily deregister to prevent circular calling of events
+        DeregisterVariableNamesViewContentEvents();
+        variableNamesView.Content.Clear();
+        RegisterVariableNamesViewContentEvents();
+      } else {
+        // temporarily deregister to prevent circular calling of events
+        DeregisterVariableNamesViewContentEvents();
+        variableNamesView.Content.Clear();
+        foreach (var variableName in Content.AllVariableNames) {
+          variableNamesView.Content.Add(new StringValue(variableName), Content.VariableNames.Contains(variableName));
+        }
+        RegisterVariableNamesViewContentEvents();
+
+        thresholdInitializationMuTextBox.Text = Content.ThresholdInitializerMu.ToString();
+        thresholdInitializationSigmaTextBox.Text = Content.ThresholdInitializerSigma.ToString();
+        slopeInitializationMuTextBox.Text = Content.SlopeInitializerMu.ToString();
+        slopeInitializationSigmaTextBox.Text = Content.SlopeInitializerSigma.ToString();
+        thresholdChangeMuTextBox.Text = Content.ThresholdManipulatorMu.ToString();
+        thresholdChangeSigmaTextBox.Text = Content.ThresholdManipulatorSigma.ToString();
+        slopeChangeMuTextBox.Text = Content.SlopeManipulatorMu.ToString();
+        slopeChangeSigmaTextBox.Text = Content.SlopeManipulatorSigma.ToString();
+      }
+      SetEnabledStateOfControls();
+    }
+
+    #region control events
+    private void VariableNames_Changed(object sender, CollectionItemsChangedEventArgs<StringValue> e) {
+      foreach (var newVar in e.Items)
+        newVar.ValueChanged += new EventHandler(Variable_ValueChanged);
+      foreach (var oldVar in e.OldItems)
+        oldVar.ValueChanged -= new EventHandler(Variable_ValueChanged);
+      UpdateContent();
+    }
+
+    private void Variable_ValueChanged(object sender, EventArgs e) {
+      UpdateContent();
+    }
+
+    private void UpdateContent() {
+      if (Content != null) {
+        DeregisterContentEvents();
+        Content.VariableNames = variableNamesView.Content.CheckedItems.Select(x => x.Value).ToList();
+        RegisterContentEvents();
+      }
+    }
+
+    private void ThresholdInitializationMuTextBox_TextChanged(object sender, EventArgs e) {
+      double value;
+      if (double.TryParse(thresholdInitializationMuTextBox.Text, out value)) {
+        Content.ThresholdInitializerMu = value;
+        errorProvider.SetError(thresholdInitializationMuTextBox, string.Empty);
+      } else errorProvider.SetError(thresholdInitializationMuTextBox, "Invalid value");
+    }
+    private void ThresholdInitializationSigmaTextBox_TextChanged(object sender, EventArgs e) {
+      double value;
+      if (double.TryParse(thresholdInitializationSigmaTextBox.Text, out value)) {
+        Content.ThresholdInitializerSigma = value;
+        errorProvider.SetError(thresholdInitializationSigmaTextBox, string.Empty);
+      } else errorProvider.SetError(thresholdInitializationSigmaTextBox, "Invalid value");
+    }
+    private void SlopeInitializationMuTextBox_TextChanged(object sender, EventArgs e) {
+      double value;
+      if (double.TryParse(slopeInitializationMuTextBox.Text, out value)) {
+        Content.SlopeInitializerMu = value;
+        errorProvider.SetError(slopeInitializationMuTextBox, string.Empty);
+      } else errorProvider.SetError(slopeInitializationMuTextBox, "Invalid value");
+    }
+    private void SlopeInitializationSigmaTextBox_TextChanged(object sender, EventArgs e) {
+      double value;
+      if (double.TryParse(slopeInitializationSigmaTextBox.Text, out value)) {
+        Content.SlopeInitializerSigma = value;
+        errorProvider.SetError(slopeInitializationSigmaTextBox, string.Empty);
+      } else errorProvider.SetError(slopeInitializationSigmaTextBox, "Invalid value");
+    }
+
+    private void ThresholdChangeMuTextBox_TextChanged(object sender, EventArgs e) {
+      double value;
+      if (double.TryParse(thresholdChangeMuTextBox.Text, out value)) {
+        Content.ThresholdManipulatorMu = value;
+        errorProvider.SetError(thresholdChangeMuTextBox, string.Empty);
+      } else errorProvider.SetError(thresholdChangeMuTextBox, "Invalid value");
+    }
+
+    private void ThresholdChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
+      double value;
+      if (double.TryParse(thresholdChangeSigmaTextBox.Text, out value)) {
+        Content.ThresholdManipulatorSigma = value;
+        errorProvider.SetError(thresholdChangeSigmaTextBox, string.Empty);
+      } else errorProvider.SetError(thresholdChangeSigmaTextBox, "Invalid value");
+    }
+    private void SlopeChangeMuTextBox_TextChanged(object sender, EventArgs e) {
+      double value;
+      if (double.TryParse(slopeChangeMuTextBox.Text, out value)) {
+        Content.SlopeManipulatorMu = value;
+        errorProvider.SetError(slopeChangeMuTextBox, string.Empty);
+      } else errorProvider.SetError(slopeChangeMuTextBox, "Invalid value");
+    }
+
+    private void SlopeChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
+      double value;
+      if (double.TryParse(slopeChangeSigmaTextBox.Text, out value)) {
+        Content.SlopeManipulatorSigma = value;
+        errorProvider.SetError(slopeChangeSigmaTextBox, string.Empty);
+      } else errorProvider.SetError(slopeChangeSigmaTextBox, "Invalid value");
+    }
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.Designer.cs	(revision 10269)
@@ -0,0 +1,304 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class VariableView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.weightMuLabel = new System.Windows.Forms.Label();
+      this.weightInitializationMuTextBox = new System.Windows.Forms.TextBox();
+      this.initializationGroupBox = new System.Windows.Forms.GroupBox();
+      this.weightSigmaLabel = new System.Windows.Forms.Label();
+      this.weightInitializationSigmaTextBox = new System.Windows.Forms.TextBox();
+      this.mutationGroupBox = new System.Windows.Forms.GroupBox();
+      this.multiplicativeWeightChangeLabel = new System.Windows.Forms.Label();
+      this.multiplicativeWeightChangeSigmaTextBox = new System.Windows.Forms.TextBox();
+      this.additiveWeightChangeLabel = new System.Windows.Forms.Label();
+      this.additiveWeightChangeSigmaTextBox = new System.Windows.Forms.TextBox();
+      this.tabControl = new System.Windows.Forms.TabControl();
+      this.variableNamesTabPage = new System.Windows.Forms.TabPage();
+      this.parametersTabPage = new System.Windows.Forms.TabPage();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.initializationGroupBox.SuspendLayout();
+      this.mutationGroupBox.SuspendLayout();
+      this.tabControl.SuspendLayout();
+      this.parametersTabPage.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // initialFrequencyLabel
+      // 
+      this.toolTip.SetToolTip(this.initialFrequencyLabel, "Relative frequency of the symbol in randomly created trees");
+      // 
+      // initialFrequencyTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.initialFrequencyTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.initialFrequencyTextBox.Size = new System.Drawing.Size(311, 20);
+      // 
+      // minimumArityLabel
+      // 
+      this.toolTip.SetToolTip(this.minimumArityLabel, "The minimum arity of the symbol");
+      // 
+      // maximumArityLabel
+      // 
+      this.toolTip.SetToolTip(this.maximumArityLabel, "The maximum arity of the symbol");
+      // 
+      // minimumArityTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.minimumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.minimumArityTextBox.Size = new System.Drawing.Size(311, 20);
+      // 
+      // maximumArityTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.maximumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.maximumArityTextBox.Size = new System.Drawing.Size(311, 20);
+      // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      this.nameTextBox.Size = new System.Drawing.Size(290, 20);
+      // 
+      // infoLabel
+      // 
+      this.infoLabel.Location = new System.Drawing.Point(389, 3);
+      // 
+      // weightMuLabel
+      // 
+      this.weightMuLabel.AutoSize = true;
+      this.weightMuLabel.Location = new System.Drawing.Point(6, 22);
+      this.weightMuLabel.Name = "weightMuLabel";
+      this.weightMuLabel.Size = new System.Drawing.Size(67, 13);
+      this.weightMuLabel.TabIndex = 0;
+      this.weightMuLabel.Text = "Weight (mu):";
+      this.toolTip.SetToolTip(this.weightMuLabel, "The mu (mean) parameter of the normal distribution to use for initial weights.");
+      // 
+      // weightInitializationMuTextBox
+      // 
+      this.weightInitializationMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.weightInitializationMuTextBox.Location = new System.Drawing.Point(92, 19);
+      this.weightInitializationMuTextBox.Name = "weightInitializationMuTextBox";
+      this.weightInitializationMuTextBox.Size = new System.Drawing.Size(290, 20);
+      this.weightInitializationMuTextBox.TabIndex = 1;
+      this.toolTip.SetToolTip(this.weightInitializationMuTextBox, "The mu (mean) parameter of the normal distribution from which to sample the initi" +
+        "al weights.");
+      this.weightInitializationMuTextBox.TextChanged += new System.EventHandler(this.WeightMuTextBox_TextChanged);
+      // 
+      // initializationGroupBox
+      // 
+      this.initializationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.initializationGroupBox.Controls.Add(this.weightSigmaLabel);
+      this.initializationGroupBox.Controls.Add(this.weightInitializationSigmaTextBox);
+      this.initializationGroupBox.Controls.Add(this.weightMuLabel);
+      this.initializationGroupBox.Controls.Add(this.weightInitializationMuTextBox);
+      this.initializationGroupBox.Location = new System.Drawing.Point(6, 6);
+      this.initializationGroupBox.Name = "initializationGroupBox";
+      this.initializationGroupBox.Size = new System.Drawing.Size(388, 73);
+      this.initializationGroupBox.TabIndex = 0;
+      this.initializationGroupBox.TabStop = false;
+      this.initializationGroupBox.Text = "Initialization";
+      // 
+      // weightSigmaLabel
+      // 
+      this.weightSigmaLabel.AutoSize = true;
+      this.weightSigmaLabel.Location = new System.Drawing.Point(6, 48);
+      this.weightSigmaLabel.Name = "weightSigmaLabel";
+      this.weightSigmaLabel.Size = new System.Drawing.Size(80, 13);
+      this.weightSigmaLabel.TabIndex = 2;
+      this.weightSigmaLabel.Text = "Weight (sigma):";
+      this.toolTip.SetToolTip(this.weightSigmaLabel, "The sigma parameter for the normal distribution to use for the initial weights.");
+      // 
+      // weightInitializationSigmaTextBox
+      // 
+      this.weightInitializationSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.weightInitializationSigmaTextBox.Location = new System.Drawing.Point(92, 45);
+      this.weightInitializationSigmaTextBox.Name = "weightInitializationSigmaTextBox";
+      this.weightInitializationSigmaTextBox.Size = new System.Drawing.Size(290, 20);
+      this.weightInitializationSigmaTextBox.TabIndex = 3;
+      this.toolTip.SetToolTip(this.weightInitializationSigmaTextBox, "The sigma parameter for the normal distribution from which to sample the initial " +
+        "weights.");
+      this.weightInitializationSigmaTextBox.TextChanged += new System.EventHandler(this.WeightSigmaTextBox_TextChanged);
+      // 
+      // mutationGroupBox
+      // 
+      this.mutationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.mutationGroupBox.Controls.Add(this.multiplicativeWeightChangeLabel);
+      this.mutationGroupBox.Controls.Add(this.multiplicativeWeightChangeSigmaTextBox);
+      this.mutationGroupBox.Controls.Add(this.additiveWeightChangeLabel);
+      this.mutationGroupBox.Controls.Add(this.additiveWeightChangeSigmaTextBox);
+      this.mutationGroupBox.Location = new System.Drawing.Point(6, 85);
+      this.mutationGroupBox.Name = "mutationGroupBox";
+      this.mutationGroupBox.Size = new System.Drawing.Size(391, 73);
+      this.mutationGroupBox.TabIndex = 1;
+      this.mutationGroupBox.TabStop = false;
+      this.mutationGroupBox.Text = "Mutation";
+      // 
+      // multiplicativeWeightChangeLabel
+      // 
+      this.multiplicativeWeightChangeLabel.AutoSize = true;
+      this.multiplicativeWeightChangeLabel.Location = new System.Drawing.Point(6, 48);
+      this.multiplicativeWeightChangeLabel.Name = "multiplicativeWeightChangeLabel";
+      this.multiplicativeWeightChangeLabel.Size = new System.Drawing.Size(180, 13);
+      this.multiplicativeWeightChangeLabel.TabIndex = 2;
+      this.multiplicativeWeightChangeLabel.Text = "Multiplicative weight change (sigma):";
+      this.toolTip.SetToolTip(this.multiplicativeWeightChangeLabel, "The sigma parameter for the normal distribution to use to sample a multiplicative" +
+        " change in weight.");
+      // 
+      // multiplicativeWeightChangeSigmaTextBox
+      // 
+      this.multiplicativeWeightChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.multiplicativeWeightChangeSigmaTextBox.Location = new System.Drawing.Point(201, 45);
+      this.multiplicativeWeightChangeSigmaTextBox.Name = "multiplicativeWeightChangeSigmaTextBox";
+      this.multiplicativeWeightChangeSigmaTextBox.Size = new System.Drawing.Size(184, 20);
+      this.multiplicativeWeightChangeSigmaTextBox.TabIndex = 3;
+      this.toolTip.SetToolTip(this.multiplicativeWeightChangeSigmaTextBox, "The sigma (std.dev.) parameter for the normal distribution to sample a multiplica" +
+        "tive change in weight.");
+      this.multiplicativeWeightChangeSigmaTextBox.TextChanged += new System.EventHandler(this.MultiplicativeWeightChangeSigmaTextBox_TextChanged);
+      // 
+      // additiveWeightChangeLabel
+      // 
+      this.additiveWeightChangeLabel.AutoSize = true;
+      this.additiveWeightChangeLabel.Location = new System.Drawing.Point(6, 22);
+      this.additiveWeightChangeLabel.Name = "additiveWeightChangeLabel";
+      this.additiveWeightChangeLabel.Size = new System.Drawing.Size(157, 13);
+      this.additiveWeightChangeLabel.TabIndex = 0;
+      this.additiveWeightChangeLabel.Text = "Additive weight change (sigma):";
+      this.toolTip.SetToolTip(this.additiveWeightChangeLabel, "The sigma (std.dev.) parameter for the normal distribution to sample an additive " +
+        "change in weight.");
+      // 
+      // additiveWeightChangeSigmaTextBox
+      // 
+      this.additiveWeightChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.additiveWeightChangeSigmaTextBox.Location = new System.Drawing.Point(201, 19);
+      this.additiveWeightChangeSigmaTextBox.Name = "additiveWeightChangeSigmaTextBox";
+      this.additiveWeightChangeSigmaTextBox.Size = new System.Drawing.Size(184, 20);
+      this.additiveWeightChangeSigmaTextBox.TabIndex = 1;
+      this.toolTip.SetToolTip(this.additiveWeightChangeSigmaTextBox, "The sigma (std.dev.) parameter for the normal distribution to sample an additive " +
+        "change in weight.");
+      this.additiveWeightChangeSigmaTextBox.TextChanged += new System.EventHandler(this.AdditiveWeightChangeSigmaTextBox_TextChanged);
+      // 
+      // tabControl
+      // 
+      this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.tabControl.Controls.Add(this.variableNamesTabPage);
+      this.tabControl.Controls.Add(this.parametersTabPage);
+      this.tabControl.Location = new System.Drawing.Point(0, 127);
+      this.tabControl.Name = "tabControl";
+      this.tabControl.SelectedIndex = 0;
+      this.tabControl.Size = new System.Drawing.Size(408, 190);
+      this.tabControl.TabIndex = 5;
+      // 
+      // variableNamesTabPage
+      // 
+      this.variableNamesTabPage.Location = new System.Drawing.Point(4, 22);
+      this.variableNamesTabPage.Name = "variableNamesTabPage";
+      this.variableNamesTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.variableNamesTabPage.Size = new System.Drawing.Size(400, 164);
+      this.variableNamesTabPage.TabIndex = 0;
+      this.variableNamesTabPage.Text = "Variable Names";
+      this.variableNamesTabPage.UseVisualStyleBackColor = true;
+      // 
+      // parametersTabPage
+      // 
+      this.parametersTabPage.Controls.Add(this.mutationGroupBox);
+      this.parametersTabPage.Controls.Add(this.initializationGroupBox);
+      this.parametersTabPage.Location = new System.Drawing.Point(4, 22);
+      this.parametersTabPage.Name = "parametersTabPage";
+      this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.parametersTabPage.Size = new System.Drawing.Size(400, 164);
+      this.parametersTabPage.TabIndex = 1;
+      this.parametersTabPage.Text = "Parameters";
+      this.parametersTabPage.UseVisualStyleBackColor = true;
+      // 
+      // VariableView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.tabControl);
+      this.Name = "VariableView";
+      this.Size = new System.Drawing.Size(408, 317);
+      this.Controls.SetChildIndex(this.maximumArityLabel, 0);
+      this.Controls.SetChildIndex(this.maximumArityTextBox, 0);
+      this.Controls.SetChildIndex(this.minimumArityLabel, 0);
+      this.Controls.SetChildIndex(this.minimumArityTextBox, 0);
+      this.Controls.SetChildIndex(this.infoLabel, 0);
+      this.Controls.SetChildIndex(this.initialFrequencyTextBox, 0);
+      this.Controls.SetChildIndex(this.initialFrequencyLabel, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.Controls.SetChildIndex(this.tabControl, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.initializationGroupBox.ResumeLayout(false);
+      this.initializationGroupBox.PerformLayout();
+      this.mutationGroupBox.ResumeLayout(false);
+      this.mutationGroupBox.PerformLayout();
+      this.tabControl.ResumeLayout(false);
+      this.parametersTabPage.ResumeLayout(false);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    protected System.Windows.Forms.Label weightMuLabel;
+    protected System.Windows.Forms.TextBox weightInitializationMuTextBox;
+    protected System.Windows.Forms.GroupBox initializationGroupBox;
+    protected System.Windows.Forms.Label weightSigmaLabel;
+    protected System.Windows.Forms.TextBox weightInitializationSigmaTextBox;
+    protected System.Windows.Forms.GroupBox mutationGroupBox;
+    protected System.Windows.Forms.Label multiplicativeWeightChangeLabel;
+    protected System.Windows.Forms.TextBox multiplicativeWeightChangeSigmaTextBox;
+    protected System.Windows.Forms.Label additiveWeightChangeLabel;
+    protected System.Windows.Forms.TextBox additiveWeightChangeSigmaTextBox;
+    protected System.Windows.Forms.TabPage variableNamesTabPage;
+    protected System.Windows.Forms.TabPage parametersTabPage;
+    protected System.Windows.Forms.TabControl tabControl;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs	(revision 10269)
@@ -0,0 +1,201 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Collections;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  [View("Variable View")]
+  [Content(typeof(Variable), true)]
+  public partial class VariableView : SymbolView {
+    private CheckedItemCollectionView<StringValue> variableNamesView;
+
+    public new Variable Content {
+      get { return (Variable)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public VariableView() {
+      InitializeComponent();
+      variableNamesView = new CheckedItemCollectionView<StringValue>();
+      variableNamesView.Dock = DockStyle.Fill;
+      variableNamesTabPage.Controls.Add(variableNamesView);
+      variableNamesView.Content = new CheckedItemCollection<StringValue>();
+
+      RegisterVariableNamesViewContentEvents();
+    }
+
+    private void RegisterVariableNamesViewContentEvents() {
+      variableNamesView.Content.ItemsAdded += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      variableNamesView.Content.ItemsRemoved += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      variableNamesView.Content.CheckedItemsChanged += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      variableNamesView.Content.CollectionReset += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      foreach (var variable in variableNamesView.Content) {
+        variable.ValueChanged += new EventHandler(Variable_ValueChanged);
+      }
+    }
+
+
+    private void DeregisterVariableNamesViewContentEvents() {
+      variableNamesView.Content.ItemsAdded -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      variableNamesView.Content.ItemsRemoved -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      variableNamesView.Content.CheckedItemsChanged -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      variableNamesView.Content.CollectionReset -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
+      foreach (var variable in variableNamesView.Content) {
+        variable.ValueChanged -= new EventHandler(Variable_ValueChanged);
+      }
+    }
+
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.Changed += new EventHandler(Content_Changed);
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.Changed -= new EventHandler(Content_Changed);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      UpdateControl();
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      enabledCheckBox.Enabled = Content != null && Content.VariableNames.Any() && !Locked && !ReadOnly;
+      weightInitializationMuTextBox.Enabled = Content != null;
+      weightInitializationMuTextBox.ReadOnly = ReadOnly;
+      weightInitializationSigmaTextBox.Enabled = Content != null;
+      weightInitializationSigmaTextBox.ReadOnly = ReadOnly;
+      additiveWeightChangeSigmaTextBox.Enabled = Content != null;
+      additiveWeightChangeSigmaTextBox.ReadOnly = ReadOnly;
+      multiplicativeWeightChangeSigmaTextBox.Enabled = Content != null;
+      multiplicativeWeightChangeSigmaTextBox.ReadOnly = ReadOnly;
+    }
+
+    #region content event handlers
+    private void Content_Changed(object sender, EventArgs e) {
+      UpdateControl();
+    }
+    #endregion
+
+    #region control event handlers
+    private void VariableNames_Changed(object sender, CollectionItemsChangedEventArgs<StringValue> e) {
+      foreach (var newVar in e.Items)
+        newVar.ValueChanged += new EventHandler(Variable_ValueChanged);
+      foreach (var oldVar in e.OldItems)
+        oldVar.ValueChanged -= new EventHandler(Variable_ValueChanged);
+      UpdateContent();
+    }
+
+    private void Variable_ValueChanged(object sender, EventArgs e) {
+      UpdateContent();
+    }
+
+    private void UpdateContent() {
+      if (Content != null) {
+        Content.Fixed = true;
+        DeregisterContentEvents();
+        Content.VariableNames = variableNamesView.Content.CheckedItems.Select(x => x.Value).ToList();
+        RegisterContentEvents();
+      }
+    }
+
+    private void WeightMuTextBox_TextChanged(object sender, EventArgs e) {
+      double nu;
+      if (double.TryParse(weightInitializationMuTextBox.Text, out nu)) {
+        Content.WeightMu = nu;
+        errorProvider.SetError(weightInitializationMuTextBox, string.Empty);
+      } else {
+        errorProvider.SetError(weightInitializationMuTextBox, "Invalid value");
+      }
+    }
+    private void WeightSigmaTextBox_TextChanged(object sender, EventArgs e) {
+      double sigma;
+      if (double.TryParse(weightInitializationSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
+        Content.WeightSigma = sigma;
+        errorProvider.SetError(weightInitializationSigmaTextBox, string.Empty);
+      } else {
+        errorProvider.SetError(weightInitializationSigmaTextBox, "Invalid value");
+      }
+    }
+
+    private void AdditiveWeightChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
+      double sigma;
+      if (double.TryParse(additiveWeightChangeSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
+        Content.WeightManipulatorSigma = sigma;
+        errorProvider.SetError(additiveWeightChangeSigmaTextBox, string.Empty);
+      } else {
+        errorProvider.SetError(additiveWeightChangeSigmaTextBox, "Invalid value");
+      }
+    }
+    private void MultiplicativeWeightChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
+      double sigma;
+      if (double.TryParse(multiplicativeWeightChangeSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
+        Content.MultiplicativeWeightManipulatorSigma = sigma;
+        errorProvider.SetError(multiplicativeWeightChangeSigmaTextBox, string.Empty);
+      } else {
+        errorProvider.SetError(multiplicativeWeightChangeSigmaTextBox, "Invalid value");
+      }
+    }
+    #endregion
+
+    #region helpers
+    private void UpdateControl() {
+      if (Content == null) {
+        weightInitializationMuTextBox.Text = string.Empty;
+        weightInitializationSigmaTextBox.Text = string.Empty;
+        additiveWeightChangeSigmaTextBox.Text = string.Empty;
+        multiplicativeWeightChangeSigmaTextBox.Text = string.Empty;
+        // temporarily deregister to prevent circular calling of events
+        DeregisterVariableNamesViewContentEvents();
+        variableNamesView.Content.Clear();
+        RegisterVariableNamesViewContentEvents();
+      } else {
+        // temporarily deregister to prevent circular calling of events
+        DeregisterVariableNamesViewContentEvents();
+        variableNamesView.Content.Clear();
+        foreach (var variableName in Content.AllVariableNames) {
+          variableNamesView.Content.Add(new StringValue(variableName), Content.VariableNames.Contains(variableName));
+        }
+        RegisterVariableNamesViewContentEvents();
+
+        weightInitializationMuTextBox.Text = Content.WeightMu.ToString();
+        weightInitializationSigmaTextBox.Text = Content.WeightSigma.ToString();
+        additiveWeightChangeSigmaTextBox.Text = Content.WeightManipulatorSigma.ToString();
+        multiplicativeWeightChangeSigmaTextBox.Text = Content.MultiplicativeWeightManipulatorSigma.ToString();
+      }
+      SetEnabledStateOfControls();
+    }
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TextualSymbolicDataAnalysisModelView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TextualSymbolicDataAnalysisModelView.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TextualSymbolicDataAnalysisModelView.cs	(revision 10269)
@@ -0,0 +1,48 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Windows.Forms;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  [View("Textual Representation")]
+  [Content(typeof(ISymbolicDataAnalysisModel), false)]
+  public partial class TextualSymbolicDataAnalysisModelView : AsynchronousContentView {
+    public TextualSymbolicDataAnalysisModelView()
+      : base() {
+      InitializeComponent();
+    }
+
+    public new ISymbolicDataAnalysisModel Content {
+      get { return (ISymbolicDataAnalysisModel)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content != null)
+        symbolicExpressionTreeView.Content = Content.SymbolicExpressionTree;
+      else
+        symbolicExpressionTreeView.Content = null;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TextualSymbolicDataAnalysisModelView.designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TextualSymbolicDataAnalysisModelView.designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TextualSymbolicDataAnalysisModelView.designer.cs	(revision 10269)
@@ -0,0 +1,78 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class TextualSymbolicDataAnalysisModelView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.symbolicExpressionTreeView = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionView();
+      this.SuspendLayout();
+      // 
+      // expressionTreeView
+      // 
+      this.symbolicExpressionTreeView.AllowDrop = true;
+      this.symbolicExpressionTreeView.Caption = "Graphical SymbolicExpressionTree View";
+      this.symbolicExpressionTreeView.Content = null;
+      this.symbolicExpressionTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.symbolicExpressionTreeView.Location = new System.Drawing.Point(0, 0);
+      this.symbolicExpressionTreeView.Name = "expressionTreeView";
+      this.symbolicExpressionTreeView.ReadOnly = false;
+      this.symbolicExpressionTreeView.Size = new System.Drawing.Size(352, 413);
+      this.symbolicExpressionTreeView.TabIndex = 0;
+      // 
+      // SymbolicExpressionModelView
+      // 
+      this.AllowDrop = true;
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.symbolicExpressionTreeView);
+      this.Name = "SymbolicExpressionModelView";
+      this.Size = new System.Drawing.Size(352, 413);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+    private HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionView symbolicExpressionTreeView;
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeConstantNodeEditDialog.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeConstantNodeEditDialog.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeConstantNodeEditDialog.Designer.cs	(revision 10269)
@@ -0,0 +1,162 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class ConstantNodeEditDialog {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing) {
+        if (components != null) components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      this.originalValueLabel = new System.Windows.Forms.Label();
+      this.oldValueTextBox = new System.Windows.Forms.TextBox();
+      this.newValueTextBox = new System.Windows.Forms.TextBox();
+      this.newValueLabel = new System.Windows.Forms.Label();
+      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
+      this.okButton = new System.Windows.Forms.Button();
+      this.cancelButton = new System.Windows.Forms.Button();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // originalValueLabel
+      // 
+      this.originalValueLabel.AutoSize = true;
+      this.originalValueLabel.Location = new System.Drawing.Point(12, 9);
+      this.originalValueLabel.Name = "originalValueLabel";
+      this.originalValueLabel.Size = new System.Drawing.Size(72, 13);
+      this.originalValueLabel.TabIndex = 2;
+      this.originalValueLabel.Text = "Original Value";
+      // 
+      // oldValueTextBox
+      // 
+      this.oldValueTextBox.Location = new System.Drawing.Point(123, 6);
+      this.oldValueTextBox.Name = "oldValueTextBox";
+      this.oldValueTextBox.ReadOnly = true;
+      this.oldValueTextBox.Size = new System.Drawing.Size(131, 20);
+      this.oldValueTextBox.TabIndex = 3;
+      // 
+      // newValueTextBox
+      // 
+      this.newValueTextBox.Location = new System.Drawing.Point(123, 42);
+      this.newValueTextBox.Name = "newValueTextBox";
+      this.newValueTextBox.Size = new System.Drawing.Size(131, 20);
+      this.newValueTextBox.TabIndex = 0;
+      this.newValueTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.childControl_KeyDown);
+      this.newValueTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.newValueTextBox_Validating);
+      this.newValueTextBox.Validated += new System.EventHandler(this.newValueTextBox_Validated);
+      // 
+      // newValueLabel
+      // 
+      this.newValueLabel.AutoSize = true;
+      this.newValueLabel.Location = new System.Drawing.Point(12, 45);
+      this.newValueLabel.Name = "newValueLabel";
+      this.newValueLabel.Size = new System.Drawing.Size(59, 13);
+      this.newValueLabel.TabIndex = 5;
+      this.newValueLabel.Text = "New Value";
+      // 
+      // errorProvider
+      // 
+      this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
+      this.errorProvider.ContainerControl = this;
+      this.errorProvider.RightToLeft = true;
+      // 
+      // okButton
+      // 
+      this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
+      this.okButton.Location = new System.Drawing.Point(15, 79);
+      this.okButton.Name = "okButton";
+      this.okButton.Size = new System.Drawing.Size(75, 23);
+      this.okButton.TabIndex = 8;
+      this.okButton.Text = "OK";
+      this.okButton.UseVisualStyleBackColor = true;
+      this.okButton.Click += new System.EventHandler(this.okButton_Click);
+      // 
+      // cancelButton
+      // 
+      this.cancelButton.CausesValidation = false;
+      this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+      this.cancelButton.Location = new System.Drawing.Point(179, 79);
+      this.cancelButton.Name = "cancelButton";
+      this.cancelButton.Size = new System.Drawing.Size(75, 23);
+      this.cancelButton.TabIndex = 9;
+      this.cancelButton.Text = "Cancel";
+      this.cancelButton.UseVisualStyleBackColor = true;
+      this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
+      // 
+      // ConstantNodeEditDialog
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.AutoSize = true;
+      this.CancelButton = this.cancelButton;
+      this.ClientSize = new System.Drawing.Size(269, 116);
+      this.ControlBox = false;
+      this.Controls.Add(this.cancelButton);
+      this.Controls.Add(this.okButton);
+      this.Controls.Add(this.newValueLabel);
+      this.Controls.Add(this.newValueTextBox);
+      this.Controls.Add(this.oldValueTextBox);
+      this.Controls.Add(this.originalValueLabel);
+      this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+      this.MaximizeBox = false;
+      this.MinimizeBox = false;
+      this.Name = "ConstantNodeEditDialog";
+      this.ShowIcon = false;
+      this.ShowInTaskbar = false;
+      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+      this.Text = "Edit constant value";
+      this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ConstantNodeEditDialog_KeyDown);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label originalValueLabel;
+    private System.Windows.Forms.TextBox oldValueTextBox;
+    private System.Windows.Forms.Label newValueLabel;
+    private System.Windows.Forms.ErrorProvider errorProvider;
+    private System.Windows.Forms.Button cancelButton;
+    private System.Windows.Forms.Button okButton;
+    public System.Windows.Forms.TextBox newValueTextBox;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeConstantNodeEditDialog.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeConstantNodeEditDialog.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeConstantNodeEditDialog.cs	(revision 10269)
@@ -0,0 +1,125 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.ComponentModel;
+using System.Text;
+using System.Windows.Forms;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  public partial class ConstantNodeEditDialog : Form {
+    private ConstantTreeNode constantTreeNode;
+    public ConstantTreeNode NewNode {
+      get { return constantTreeNode; }
+      set {
+        if (InvokeRequired)
+          Invoke(new Action<SymbolicExpressionTreeNode>(x => constantTreeNode = (ConstantTreeNode)x), value);
+        else
+          constantTreeNode = value;
+      }
+    }
+
+    public ConstantNodeEditDialog(ISymbolicExpressionTreeNode node) {
+      InitializeComponent();
+      oldValueTextBox.TabStop = false; // cannot receive focus using tab key
+      NewNode = (ConstantTreeNode)node;
+      InitializeFields();
+    }
+
+    private void InitializeFields() {
+      if (NewNode == null)
+        throw new ArgumentException("Node is not a constant.");
+      else {
+        this.Text = "Edit constant";
+        newValueTextBox.Text = oldValueTextBox.Text = Math.Round(constantTreeNode.Value, 4).ToString();
+      }
+    }
+
+    #region text box validation and events
+    private void newValueTextBox_Validating(object sender, CancelEventArgs e) {
+      string errorMessage;
+      if (!ValidateNewValue(newValueTextBox.Text, out errorMessage)) {
+        e.Cancel = true;
+        errorProvider.SetError(newValueTextBox, errorMessage);
+        newValueTextBox.SelectAll();
+      }
+    }
+
+    private void newValueTextBox_Validated(object sender, EventArgs e) {
+      errorProvider.SetError(newValueTextBox, string.Empty);
+    }
+
+    private static bool ValidateNewValue(string value, out string errorMessage) {
+      double val;
+      bool valid = double.TryParse(value, out val);
+      errorMessage = string.Empty;
+      if (!valid) {
+        var sb = new StringBuilder();
+        sb.Append("Invalid Value (Valid Value Format: \"");
+        sb.Append(FormatPatterns.GetDoubleFormatPattern());
+        sb.Append("\")");
+        errorMessage = sb.ToString();
+      }
+      return valid;
+    }
+    #endregion
+
+    // proxy handler passing key strokes to the parent control
+    private void childControl_KeyDown(object sender, KeyEventArgs e) {
+      ConstantNodeEditDialog_KeyDown(sender, e);
+    }
+
+    private void ConstantNodeEditDialog_KeyDown(object sender, KeyEventArgs e) {
+      if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return)) {
+        if (!ValidateChildren()) return;
+        OnDialogValidated(this, e); // emit validated effect
+        Close();
+      }
+    }
+
+    public event EventHandler DialogValidated;
+    private void OnDialogValidated(object sender, EventArgs e) {
+      if (constantTreeNode == null) return;
+      var value = double.Parse(newValueTextBox.Text);
+      // we impose an extra validation condition: that the new value is different from the original value
+      if (constantTreeNode.Value.Equals(value)) return;
+
+      constantTreeNode.Value = value;
+      DialogResult = DialogResult.OK;
+      var dialogValidated = DialogValidated;
+      if (dialogValidated != null)
+        dialogValidated(sender, e);
+    }
+
+    private void cancelButton_Click(object sender, EventArgs e) {
+      Close();
+    }
+
+    private void okButton_Click(object sender, EventArgs e) {
+      if (ValidateChildren()) {
+        OnDialogValidated(this, e);
+        Close();
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeNodeInsertDialog.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeNodeInsertDialog.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeNodeInsertDialog.Designer.cs	(revision 10269)
@@ -0,0 +1,211 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class InsertNodeDialog {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      this.nodeSymbolLabel = new System.Windows.Forms.Label();
+      this.allowedSymbolsCombo = new System.Windows.Forms.ComboBox();
+      this.variableWeightLabel = new System.Windows.Forms.Label();
+      this.variableNameLabel = new System.Windows.Forms.Label();
+      this.variableNamesCombo = new System.Windows.Forms.ComboBox();
+      this.variableWeightTextBox = new System.Windows.Forms.TextBox();
+      this.constantValueTextBox = new System.Windows.Forms.TextBox();
+      this.constantValueLabel = new System.Windows.Forms.Label();
+      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
+      this.okButton = new System.Windows.Forms.Button();
+      this.cancelButton = new System.Windows.Forms.Button();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // nodeSymbolLabel
+      // 
+      this.nodeSymbolLabel.AutoSize = true;
+      this.nodeSymbolLabel.Location = new System.Drawing.Point(13, 13);
+      this.nodeSymbolLabel.Name = "nodeSymbolLabel";
+      this.nodeSymbolLabel.Size = new System.Drawing.Size(41, 13);
+      this.nodeSymbolLabel.TabIndex = 0;
+      this.nodeSymbolLabel.Text = "Symbol";
+      // 
+      // allowedSymbolsCombo
+      // 
+      this.allowedSymbolsCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.allowedSymbolsCombo.FormattingEnabled = true;
+      this.allowedSymbolsCombo.Location = new System.Drawing.Point(120, 10);
+      this.allowedSymbolsCombo.Name = "allowedSymbolsCombo";
+      this.allowedSymbolsCombo.Size = new System.Drawing.Size(108, 21);
+      this.allowedSymbolsCombo.TabIndex = 1;
+      this.allowedSymbolsCombo.SelectedIndexChanged += new System.EventHandler(this.allowedSymbolsCombo_SelectedIndexChanged);
+      this.allowedSymbolsCombo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.childControl_KeyDown);
+      // 
+      // variableWeightLabel
+      // 
+      this.variableWeightLabel.AutoSize = true;
+      this.variableWeightLabel.Location = new System.Drawing.Point(13, 44);
+      this.variableWeightLabel.Name = "variableWeightLabel";
+      this.variableWeightLabel.Size = new System.Drawing.Size(41, 13);
+      this.variableWeightLabel.TabIndex = 2;
+      this.variableWeightLabel.Text = "Weight";
+      this.variableWeightLabel.Visible = false;
+      // 
+      // variableNameLabel
+      // 
+      this.variableNameLabel.AutoSize = true;
+      this.variableNameLabel.Location = new System.Drawing.Point(13, 74);
+      this.variableNameLabel.Name = "variableNameLabel";
+      this.variableNameLabel.Size = new System.Drawing.Size(35, 13);
+      this.variableNameLabel.TabIndex = 3;
+      this.variableNameLabel.Text = "Name";
+      this.variableNameLabel.Visible = false;
+      // 
+      // variableNamesCombo
+      // 
+      this.variableNamesCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.variableNamesCombo.FormattingEnabled = true;
+      this.variableNamesCombo.Location = new System.Drawing.Point(120, 71);
+      this.variableNamesCombo.Name = "variableNamesCombo";
+      this.variableNamesCombo.Size = new System.Drawing.Size(108, 21);
+      this.variableNamesCombo.TabIndex = 5;
+      this.variableNamesCombo.Visible = false;
+      // 
+      // variableWeightTextBox
+      // 
+      this.variableWeightTextBox.Location = new System.Drawing.Point(120, 41);
+      this.variableWeightTextBox.Name = "variableWeightTextBox";
+      this.variableWeightTextBox.Size = new System.Drawing.Size(108, 20);
+      this.variableWeightTextBox.TabIndex = 6;
+      this.variableWeightTextBox.Text = "0.0";
+      this.variableWeightTextBox.Visible = false;
+      this.variableWeightTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.variableWeightTextBox_Validating);
+      // 
+      // constantValueTextBox
+      // 
+      this.constantValueTextBox.Location = new System.Drawing.Point(120, 41);
+      this.constantValueTextBox.Name = "constantValueTextBox";
+      this.constantValueTextBox.Size = new System.Drawing.Size(108, 20);
+      this.constantValueTextBox.TabIndex = 7;
+      this.constantValueTextBox.Text = "0.0";
+      this.constantValueTextBox.Visible = false;
+      this.constantValueTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.constantValueTextBox_Validating);
+      // 
+      // constantValueLabel
+      // 
+      this.constantValueLabel.AutoSize = true;
+      this.constantValueLabel.Location = new System.Drawing.Point(13, 44);
+      this.constantValueLabel.Name = "constantValueLabel";
+      this.constantValueLabel.Size = new System.Drawing.Size(34, 13);
+      this.constantValueLabel.TabIndex = 8;
+      this.constantValueLabel.Text = "Value";
+      this.constantValueLabel.Visible = false;
+      // 
+      // errorProvider
+      // 
+      this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
+      this.errorProvider.ContainerControl = this;
+      this.errorProvider.RightToLeft = true;
+      // 
+      // okButton
+      // 
+      this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
+      this.okButton.Location = new System.Drawing.Point(12, 112);
+      this.okButton.Name = "okButton";
+      this.okButton.Size = new System.Drawing.Size(75, 23);
+      this.okButton.TabIndex = 9;
+      this.okButton.Text = "OK";
+      this.okButton.UseVisualStyleBackColor = true;
+      this.okButton.Click += new System.EventHandler(this.okButton_Click);
+      // 
+      // cancelButton
+      // 
+      this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+      this.cancelButton.Location = new System.Drawing.Point(153, 112);
+      this.cancelButton.Name = "cancelButton";
+      this.cancelButton.Size = new System.Drawing.Size(75, 23);
+      this.cancelButton.TabIndex = 10;
+      this.cancelButton.Text = "Cancel";
+      this.cancelButton.UseVisualStyleBackColor = true;
+      this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
+      // 
+      // InsertNodeDialog
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.CancelButton = this.cancelButton;
+      this.ClientSize = new System.Drawing.Size(240, 147);
+      this.ControlBox = false;
+      this.Controls.Add(this.cancelButton);
+      this.Controls.Add(this.okButton);
+      this.Controls.Add(this.constantValueLabel);
+      this.Controls.Add(this.constantValueTextBox);
+      this.Controls.Add(this.variableWeightTextBox);
+      this.Controls.Add(this.variableNamesCombo);
+      this.Controls.Add(this.variableNameLabel);
+      this.Controls.Add(this.variableWeightLabel);
+      this.Controls.Add(this.allowedSymbolsCombo);
+      this.Controls.Add(this.nodeSymbolLabel);
+      this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+      this.Name = "InsertNodeDialog";
+      this.Text = "SymbolicExpressionTreeNodeInsertDialog";
+      this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.insertNodeDialog_KeyDown);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label nodeSymbolLabel;
+    private System.Windows.Forms.ComboBox allowedSymbolsCombo;
+    private System.Windows.Forms.Label variableWeightLabel;
+    private System.Windows.Forms.Label variableNameLabel;
+    private System.Windows.Forms.Label constantValueLabel;
+    private System.Windows.Forms.ErrorProvider errorProvider;
+    internal System.Windows.Forms.TextBox constantValueTextBox;
+    internal System.Windows.Forms.TextBox variableWeightTextBox;
+    internal System.Windows.Forms.ComboBox variableNamesCombo;
+    private System.Windows.Forms.Button cancelButton;
+    private System.Windows.Forms.Button okButton;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeNodeInsertDialog.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeNodeInsertDialog.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeNodeInsertDialog.cs	(revision 10269)
@@ -0,0 +1,141 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Text;
+using System.Windows.Forms;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  public partial class InsertNodeDialog : Form {
+    public InsertNodeDialog() {
+      InitializeComponent();
+    }
+
+    public void SetAllowedSymbols(IEnumerable<ISymbol> symbols) {
+      allowedSymbolsCombo.Items.Clear();
+      foreach (var s in symbols) allowedSymbolsCombo.Items.Add(s);
+      allowedSymbolsCombo.SelectedIndex = 0;
+    }
+
+    public ISymbol SelectedSymbol() {
+      return (ISymbol)allowedSymbolsCombo.SelectedItem;
+    }
+
+    private void allowedSymbolsCombo_SelectedIndexChanged(object sender, EventArgs e) {
+      var combo = (ComboBox)sender;
+      var symbol = combo.Items[combo.SelectedIndex];
+      if (symbol is Constant) {
+        // add controls to the dialog for changing the constant value
+        variableNameLabel.Visible = false;
+        variableNamesCombo.Visible = false;
+        variableWeightLabel.Visible = false;
+        variableWeightTextBox.Visible = false;
+        constantValueLabel.Visible = true;
+        constantValueTextBox.Visible = true;
+      } else if (symbol is Variable) {
+        var variable = (Variable)symbol;
+        foreach (var name in variable.VariableNames) variableNamesCombo.Items.Add(name);
+        variableNamesCombo.SelectedIndex = 0;
+        variableNameLabel.Visible = true;
+        variableNamesCombo.Visible = true;
+        variableWeightLabel.Visible = true;
+        variableWeightTextBox.Visible = true;
+        constantValueLabel.Visible = false;
+        constantValueTextBox.Visible = false;
+        // add controls to the dialog for changing the variable name or weight
+      } else {
+        variableNameLabel.Visible = false;
+        variableNamesCombo.Visible = false;
+        variableWeightLabel.Visible = false;
+        variableWeightTextBox.Visible = false;
+        constantValueLabel.Visible = false;
+        constantValueTextBox.Visible = false;
+      }
+    }
+
+    // validation
+    private void variableWeightTextBox_Validating(object sender, CancelEventArgs e) {
+      string errorMessage;
+      if (ValidateDoubleValue(variableWeightTextBox.Text, out errorMessage)) return;
+      e.Cancel = true;
+      errorProvider.SetError(variableWeightTextBox, errorMessage);
+      variableWeightTextBox.SelectAll();
+    }
+
+    private void constantValueTextBox_Validating(object sender, CancelEventArgs e) {
+      string errorMessage;
+      if (ValidateDoubleValue(constantValueTextBox.Text, out errorMessage)) return;
+      e.Cancel = true;
+      errorProvider.SetError(constantValueTextBox, errorMessage);
+      constantValueTextBox.SelectAll();
+    }
+
+    private static bool ValidateDoubleValue(string value, out string errorMessage) {
+      double val;
+      bool valid = double.TryParse(value, out val);
+      errorMessage = string.Empty;
+      if (!valid) {
+        var sb = new StringBuilder();
+        sb.Append("Invalid Value (Valid Value Format: \"");
+        sb.Append(FormatPatterns.GetDoubleFormatPattern());
+        sb.Append("\")");
+        errorMessage = sb.ToString();
+      }
+      return valid;
+    }
+
+    public event EventHandler DialogValidated;
+    private void OnDialogValidated(object sender, EventArgs e) {
+      DialogResult = DialogResult.OK;
+      var dialogValidated = DialogValidated;
+      if (dialogValidated != null)
+        dialogValidated(sender, e);
+    }
+
+    private void childControl_KeyDown(object sender, KeyEventArgs e) {
+      insertNodeDialog_KeyDown(sender, e);
+    }
+
+    private void insertNodeDialog_KeyDown(object sender, KeyEventArgs e) {
+      if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return) {
+        if (ValidateChildren()) {
+          OnDialogValidated(this, e);
+          Close();
+        }
+      }
+    }
+
+    private void okButton_Click(object sender, EventArgs e) {
+      if (ValidateChildren()) {
+        OnDialogValidated(this, e);
+        Close();
+      }
+    }
+
+    private void cancelButton_Click(object sender, EventArgs e) {
+      Close();
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeVariableNodeEditDialog.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeVariableNodeEditDialog.Designer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeVariableNodeEditDialog.Designer.cs	(revision 10269)
@@ -0,0 +1,191 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  partial class VariableNodeEditDialog {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing) {
+        if (components != null) components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      this.originalValueLabel = new System.Windows.Forms.Label();
+      this.oldValueTextBox = new System.Windows.Forms.TextBox();
+      this.newValueTextBox = new System.Windows.Forms.TextBox();
+      this.newValueLabel = new System.Windows.Forms.Label();
+      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
+      this.variableNameLabel = new System.Windows.Forms.Label();
+      this.variableNamesCombo = new System.Windows.Forms.ComboBox();
+      this.okButton = new System.Windows.Forms.Button();
+      this.cancelButton = new System.Windows.Forms.Button();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // originalValueLabel
+      // 
+      this.originalValueLabel.AutoSize = true;
+      this.originalValueLabel.Location = new System.Drawing.Point(12, 48);
+      this.originalValueLabel.Name = "originalValueLabel";
+      this.originalValueLabel.Size = new System.Drawing.Size(72, 13);
+      this.originalValueLabel.TabIndex = 2;
+      this.originalValueLabel.Text = "Original Value";
+      // 
+      // oldValueTextBox
+      // 
+      this.oldValueTextBox.Location = new System.Drawing.Point(123, 45);
+      this.oldValueTextBox.Name = "oldValueTextBox";
+      this.oldValueTextBox.ReadOnly = true;
+      this.oldValueTextBox.Size = new System.Drawing.Size(131, 20);
+      this.oldValueTextBox.TabIndex = 3;
+      // 
+      // newValueTextBox
+      // 
+      this.newValueTextBox.Location = new System.Drawing.Point(123, 82);
+      this.newValueTextBox.Name = "newValueTextBox";
+      this.newValueTextBox.Size = new System.Drawing.Size(131, 20);
+      this.newValueTextBox.TabIndex = 0;
+      this.newValueTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.childControl_KeyDown);
+      this.newValueTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.newValueTextBox_Validating);
+      this.newValueTextBox.Validated += new System.EventHandler(this.newValueTextBox_Validated);
+      // 
+      // newValueLabel
+      // 
+      this.newValueLabel.AutoSize = true;
+      this.newValueLabel.Location = new System.Drawing.Point(12, 85);
+      this.newValueLabel.Name = "newValueLabel";
+      this.newValueLabel.Size = new System.Drawing.Size(59, 13);
+      this.newValueLabel.TabIndex = 5;
+      this.newValueLabel.Text = "New Value";
+      // 
+      // errorProvider
+      // 
+      this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
+      this.errorProvider.ContainerControl = this;
+      this.errorProvider.RightToLeft = true;
+      // 
+      // variableNameLabel
+      // 
+      this.variableNameLabel.AutoSize = true;
+      this.variableNameLabel.Location = new System.Drawing.Point(12, 12);
+      this.variableNameLabel.Name = "variableNameLabel";
+      this.variableNameLabel.Size = new System.Drawing.Size(76, 13);
+      this.variableNameLabel.TabIndex = 6;
+      this.variableNameLabel.Text = "Variable Name";
+      this.variableNameLabel.Visible = false;
+      // 
+      // variableNamesCombo
+      // 
+      this.variableNamesCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.variableNamesCombo.FormattingEnabled = true;
+      this.variableNamesCombo.Location = new System.Drawing.Point(123, 9);
+      this.variableNamesCombo.Name = "variableNamesCombo";
+      this.variableNamesCombo.Size = new System.Drawing.Size(131, 21);
+      this.variableNamesCombo.TabIndex = 7;
+      this.variableNamesCombo.Visible = false;
+      this.variableNamesCombo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.childControl_KeyDown);
+      this.variableNamesCombo.Validating += new System.ComponentModel.CancelEventHandler(this.variableNamesCombo_Validating);
+      this.variableNamesCombo.Validated += new System.EventHandler(this.variableNamesCombo_Validated);
+      // 
+      // okButton
+      // 
+      this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
+      this.okButton.Location = new System.Drawing.Point(15, 119);
+      this.okButton.Name = "okButton";
+      this.okButton.Size = new System.Drawing.Size(75, 23);
+      this.okButton.TabIndex = 8;
+      this.okButton.Text = "OK";
+      this.okButton.UseVisualStyleBackColor = true;
+      this.okButton.Click += new System.EventHandler(this.okButton_Click);
+      // 
+      // cancelButton
+      // 
+      this.cancelButton.CausesValidation = false;
+      this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+      this.cancelButton.Location = new System.Drawing.Point(179, 119);
+      this.cancelButton.Name = "cancelButton";
+      this.cancelButton.Size = new System.Drawing.Size(75, 23);
+      this.cancelButton.TabIndex = 9;
+      this.cancelButton.Text = "Cancel";
+      this.cancelButton.UseVisualStyleBackColor = true;
+      this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
+      // 
+      // VariableNodeEditDialog
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.AutoSize = true;
+      this.CancelButton = this.cancelButton;
+      this.ClientSize = new System.Drawing.Size(269, 154);
+      this.ControlBox = false;
+      this.Controls.Add(this.cancelButton);
+      this.Controls.Add(this.okButton);
+      this.Controls.Add(this.variableNamesCombo);
+      this.Controls.Add(this.variableNameLabel);
+      this.Controls.Add(this.newValueLabel);
+      this.Controls.Add(this.newValueTextBox);
+      this.Controls.Add(this.oldValueTextBox);
+      this.Controls.Add(this.originalValueLabel);
+      this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+      this.MaximizeBox = false;
+      this.MinimizeBox = false;
+      this.Name = "VariableNodeEditDialog";
+      this.ShowIcon = false;
+      this.ShowInTaskbar = false;
+      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+      this.Text = "Change Value or Weight";
+      this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ValueChangeDialog_KeyDown);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label originalValueLabel;
+    private System.Windows.Forms.TextBox oldValueTextBox;
+    private System.Windows.Forms.Label newValueLabel;
+    private System.Windows.Forms.ErrorProvider errorProvider;
+    private System.Windows.Forms.Label variableNameLabel;
+    private System.Windows.Forms.Button cancelButton;
+    private System.Windows.Forms.Button okButton;
+    public System.Windows.Forms.TextBox newValueTextBox;
+    public System.Windows.Forms.ComboBox variableNamesCombo;
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeVariableNodeEditDialog.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeVariableNodeEditDialog.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeVariableNodeEditDialog.cs	(revision 10269)
@@ -0,0 +1,143 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.ComponentModel;
+using System.Text;
+using System.Windows.Forms;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  public partial class VariableNodeEditDialog : Form {
+    private VariableTreeNode variableTreeNode;
+    public VariableTreeNode NewNode {
+      get { return variableTreeNode; }
+      set {
+        if (InvokeRequired)
+          Invoke(new Action<SymbolicExpressionTreeNode>(x => variableTreeNode = (VariableTreeNode)x), value);
+        else
+          variableTreeNode = value;
+      }
+    }
+
+    public VariableNodeEditDialog(ISymbolicExpressionTreeNode node) {
+      InitializeComponent();
+      oldValueTextBox.TabStop = false; // cannot receive focus using tab key
+
+      NewNode = (VariableTreeNode)node; // will throw an invalid cast exception if node is not of the correct type
+      InitializeFields();
+    }
+
+    private void InitializeFields() {
+      if (NewNode == null)
+        throw new ArgumentException("Node is not a constant.");
+      else {
+        this.Text = "Edit variable";
+        newValueTextBox.Text = oldValueTextBox.Text = Math.Round(variableTreeNode.Weight, 4).ToString();
+        // add a dropbox containing all the available variable names
+        variableNameLabel.Visible = true;
+        variableNamesCombo.Visible = true;
+        foreach (var name in variableTreeNode.Symbol.VariableNames) variableNamesCombo.Items.Add(name);
+        variableNamesCombo.SelectedIndex = variableNamesCombo.Items.IndexOf(variableTreeNode.VariableName);
+      }
+    }
+
+    #region text box validation and events
+    private void newValueTextBox_Validating(object sender, CancelEventArgs e) {
+      string errorMessage;
+      if (!ValidateNewValue(newValueTextBox.Text, out errorMessage)) {
+        e.Cancel = true;
+        errorProvider.SetError(newValueTextBox, errorMessage);
+        newValueTextBox.SelectAll();
+      }
+    }
+
+    private void newValueTextBox_Validated(object sender, EventArgs e) {
+      errorProvider.SetError(newValueTextBox, string.Empty);
+    }
+
+    private static bool ValidateNewValue(string value, out string errorMessage) {
+      double val;
+      bool valid = double.TryParse(value, out val);
+      errorMessage = string.Empty;
+      if (!valid) {
+        var sb = new StringBuilder();
+        sb.Append("Invalid Value (Valid Value Format: \"");
+        sb.Append(FormatPatterns.GetDoubleFormatPattern());
+        sb.Append("\")");
+        errorMessage = sb.ToString();
+      }
+      return valid;
+    }
+    #endregion
+
+    #region combo box validation and events
+    private void variableNamesCombo_Validating(object sender, CancelEventArgs e) {
+      if (variableNamesCombo.Items.Contains(variableNamesCombo.SelectedItem)) return;
+      e.Cancel = true;
+      errorProvider.SetError(variableNamesCombo, "Invalid variable name");
+      variableNamesCombo.SelectAll();
+    }
+
+    private void variableNamesCombo_Validated(object sender, EventArgs e) {
+      errorProvider.SetError(variableNamesCombo, String.Empty);
+    }
+    #endregion
+    // proxy handler passing key strokes to the parent control
+    private void childControl_KeyDown(object sender, KeyEventArgs e) {
+      ValueChangeDialog_KeyDown(sender, e);
+    }
+
+    private void ValueChangeDialog_KeyDown(object sender, KeyEventArgs e) {
+      if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return)) {
+        if (!ValidateChildren()) return;
+        OnDialogValidated(this, e); // emit validated effect
+        Close();
+      }
+    }
+
+    public event EventHandler DialogValidated;
+    private void OnDialogValidated(object sender, EventArgs e) {
+      double weight = double.Parse(newValueTextBox.Text);
+      var variableName = (string)variableNamesCombo.SelectedItem;
+      // we impose an extra validation condition: that the weight/value be different than the original ones
+      if (variableTreeNode.Weight.Equals(weight) && variableTreeNode.VariableName.Equals(variableName)) return;
+      variableTreeNode.Weight = weight;
+      variableTreeNode.VariableName = variableName;
+      DialogResult = DialogResult.OK;
+      var dialogValidated = DialogValidated;
+      if (dialogValidated != null)
+        dialogValidated(sender, e);
+    }
+
+    private void cancelButton_Click(object sender, EventArgs e) {
+      Close();
+    }
+
+    private void okButton_Click(object sender, EventArgs e) {
+      if (ValidateChildren()) {
+        OnDialogValidated(this, e);
+        Close();
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/displayModelFrame.html
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/displayModelFrame.html	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/displayModelFrame.html	(revision 10269)
@@ -0,0 +1,53 @@
+﻿<!-- this file is derived from sample.html from the MathJax distribution -->
+<!-- Copyright (c) 2009-2011 Design Science, Inc. -->
+<!-- adapted by HEAL for HeuristicLab-->
+<!DOCTYPE html>
+<html>
+<head>
+  <!-- title change by HEAL -->
+  <title>Symbolic Expression Tree</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
+  <script type="text/x-mathjax-config">
+  MathJax.Hub.Config({
+    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
+    jax: ["input/TeX","output/HTML-CSS"],
+    tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
+    imageFont: null
+  });
+  
+</script>
+  <script type="text/javascript" src="./MathJax.js"></script>
+  <!-- begin changes by HEAL -->
+  <script type="text/javascript">
+  function refreshModel() {
+    var model = document.getElementById("model");
+    MathJax.Hub.Queue(["Typeset",MathJax.Hub,model]);
+  }
+</script>
+  <!-- end changes by HEAL -->
+  <style>
+h1 {text-align:center}
+h2 {
+  font-weight: bold;
+  background-color: #DDDDDD;
+  padding: .2em .5em;
+  margin-top: 1.5em;
+  border-top: 3px solid #666666;
+  border-bottom: 2px solid #999999;
+}
+</style>
+</head>
+<body id="body">
+  <noscript>
+    <div style="color: #CC0000; text-align: center">
+      <b>Warning: <a href="http://www.mathjax.org/">MathJax</a> requires JavaScript to process
+        the mathematics on this page.<br />
+        If your browser supports JavaScript, be sure it is enabled.</b>
+    </div>
+    <hr>
+  </noscript>
+  <p id="model">
+  </p>
+</body>
+</html>
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs	(revision 10269)
@@ -0,0 +1,112 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("SymbolicDataAnalysisAlleleFrequencyAnalyzer", "")]
+  [StorableClass]
+  public sealed class SymbolicDataAnalysisAlleleFrequencyAnalyzer : AlleleFrequencyAnalyzer<ISymbolicExpressionTree>, ISymbolicDataAnalysisAnalyzer {
+    private const string AlleleTreeDepthParameterName = "AlleleTreeDepth";
+
+    #region parameter properties
+    public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return SolutionParameter; }
+    }
+
+    public ILookupParameter<Optimization.ResultCollection> ResultCollectionParameter {
+      get { return ResultsParameter; }
+    }
+
+    public IFixedValueParameter<IntValue> AlleleTreeDepthParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[AlleleTreeDepthParameterName]; }
+    }
+    #endregion
+    #region properties
+    public int AlleleTreeDepth {
+      get { return AlleleTreeDepthParameter.Value.Value; }
+      set { AlleleTreeDepthParameter.Value.Value = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private SymbolicDataAnalysisAlleleFrequencyAnalyzer(bool deserializing) : base(deserializing) { }
+    private SymbolicDataAnalysisAlleleFrequencyAnalyzer(SymbolicDataAnalysisAlleleFrequencyAnalyzer original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicDataAnalysisAlleleFrequencyAnalyzer()
+      : base() {
+      Parameters.Add(new FixedValueParameter<IntValue>(AlleleTreeDepthParameterName, "The depth of subtrees that should be considered as allele", new IntValue(2)));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisAlleleFrequencyAnalyzer(this, cloner);
+    }
+
+    protected override Allele[] CalculateAlleles(ISymbolicExpressionTree solution) {
+      return CalculateAlleles(solution, AlleleTreeDepth);
+    }
+
+    public static Allele[] CalculateAlleles(ISymbolicExpressionTree solution, int alleleTreedepth) {
+      return GetAllSubtreesOfDepth(solution, alleleTreedepth)
+        .AsParallel()
+        .Select(t => GetAlleleFromSubtreeOfDepth(t, alleleTreedepth))
+        .ToArray();
+    }
+
+    private static Allele GetAlleleFromSubtreeOfDepth(ISymbolicExpressionTreeNode tree, int d) {
+      string textualRepresentation = GetTextualRepresentationFromSubtreeOfDepth(tree, d);
+      return new Allele(textualRepresentation);
+    }
+
+    private static string GetTextualRepresentationFromSubtreeOfDepth(ISymbolicExpressionTreeNode tree, int d) {
+      if (d == 0) return "";
+      StringBuilder builder = new StringBuilder();
+      var varTreeNode = tree as VariableTreeNode;
+      var constTreeNode = tree as ConstantTreeNode;
+      if (varTreeNode != null) {
+        builder.Append("(var " + varTreeNode.VariableName);
+      } else if (constTreeNode != null) {
+        builder.Append("(const");
+      } else {
+        builder.Append("(" + tree.ToString());
+      }
+      for (int i = 0; i < tree.SubtreeCount; i++) {
+        builder.Append(" " + GetTextualRepresentationFromSubtreeOfDepth(tree.GetSubtree(i), d - 1));
+      }
+      builder.Append(")");
+      return builder.ToString();
+    }
+
+    private static IEnumerable<ISymbolicExpressionTreeNode> GetAllSubtreesOfDepth(ISymbolicExpressionTree solution, int d) {
+      return from node in solution.IterateNodesPostfix()
+             where node.GetDepth() >= d
+             select node;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAnalyzer.cs	(revision 10269)
@@ -0,0 +1,69 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  /// <summary>
+  /// Abstract base class for symbolic data analysis analyzers.
+  /// </summary>
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisAnalyzer : SingleSuccessorOperator, ISymbolicDataAnalysisAnalyzer {
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string ResultCollectionParameterName = "Results";
+
+    #region parameter properties
+    public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    public ILookupParameter<ResultCollection> ResultCollectionParameter {
+      get { return (ILookupParameter<ResultCollection>)Parameters[ResultCollectionParameterName]; }
+    }
+    #endregion
+    #region properties
+    public virtual bool EnabledByDefault {
+      get { return true; }
+    }
+    public ItemArray<ISymbolicExpressionTree> SymbolicExpressionTree {
+      get { return SymbolicExpressionTreeParameter.ActualValue; }
+    }
+    public ResultCollection ResultCollection {
+      get { return ResultCollectionParameter.ActualValue; }
+    }
+    #endregion
+    [StorableConstructor]
+    protected SymbolicDataAnalysisAnalyzer(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisAnalyzer(SymbolicDataAnalysisAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public SymbolicDataAnalysisAnalyzer()
+      : base() {
+      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees that should be analyzed."));
+      Parameters.Add(new LookupParameter<ResultCollection>(ResultCollectionParameterName, "The result collection to store the analysis results."));
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveAnalyzer.cs	(revision 10269)
@@ -0,0 +1,76 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  /// <summary>
+  /// Abstract base class for multi objective symbolic data analysis analyzers.
+  /// </summary>
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisMultiObjectiveAnalyzer : SymbolicDataAnalysisAnalyzer, ISymbolicDataAnalysisMultiObjectiveAnalyzer {
+    private const string QualitiesParameterName = "Qualities";
+    private const string MaximizationParameterName = "Maximization";
+    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
+    #region parameter properties
+    public IScopeTreeLookupParameter<DoubleArray> QualitiesParameter {
+      get { return (IScopeTreeLookupParameter<DoubleArray>)Parameters[QualitiesParameterName]; }
+    }
+    public ILookupParameter<BoolArray> MaximizationParameter {
+      get { return (ILookupParameter<BoolArray>)Parameters[MaximizationParameterName]; }
+    }
+    public ILookupParameter<BoolValue> ApplyLinearScalingParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
+    }
+    #endregion
+    #region properties
+    public ItemArray<DoubleArray> Qualities {
+      get { return QualitiesParameter.ActualValue; }
+    }
+    public BoolArray Maximization {
+      get { return MaximizationParameter.ActualValue; }
+    }
+    #endregion
+    [StorableConstructor]
+    protected SymbolicDataAnalysisMultiObjectiveAnalyzer(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisMultiObjectiveAnalyzer(SymbolicDataAnalysisMultiObjectiveAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public SymbolicDataAnalysisMultiObjectiveAnalyzer()
+      : base() {
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleArray>(QualitiesParameterName, "The qualities of the trees that should be analyzed."));
+      Parameters.Add(new LookupParameter<BoolArray>(MaximizationParameterName, "The directions of optimization for each dimension."));
+      Parameters.Add(new LookupParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the individual should be linearly scaled before evaluating."));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (Parameters.ContainsKey(ApplyLinearScalingParameterName) && Parameters[ApplyLinearScalingParameterName] is LookupParameter<BoolValue>)
+        Parameters.Remove(ApplyLinearScalingParameterName);
+      if (!Parameters.ContainsKey(ApplyLinearScalingParameterName))
+        Parameters.Add(new LookupParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the individual should be linearly scaled before evaluating."));
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer.cs	(revision 10269)
@@ -0,0 +1,184 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  /// <summary>
+  /// An operator that analyzes the training best symbolic data analysis solution for multi objective symbolic data analysis problems.
+  /// </summary>
+  [Item("SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer", "An operator that analyzes the training best symbolic data analysis solution for multi objective symbolic data analysis problems.")]
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer<T> : SymbolicDataAnalysisMultiObjectiveAnalyzer
+    where T : class, ISymbolicDataAnalysisSolution {
+    private const string TrainingBestSolutionsParameterName = "Best training solutions";
+    private const string TrainingBestSolutionQualitiesParameterName = "Best training solution qualities";
+    private const string UpdateAlwaysParameterName = "Always update best solutions";
+
+    #region parameter properties
+    public ILookupParameter<ItemList<T>> TrainingBestSolutionsParameter {
+      get { return (ILookupParameter<ItemList<T>>)Parameters[TrainingBestSolutionsParameterName]; }
+    }
+    public ILookupParameter<ItemList<DoubleArray>> TrainingBestSolutionQualitiesParameter {
+      get { return (ILookupParameter<ItemList<DoubleArray>>)Parameters[TrainingBestSolutionQualitiesParameterName]; }
+    }
+    public IFixedValueParameter<BoolValue> UpdateAlwaysParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters[UpdateAlwaysParameterName]; }
+    }
+    #endregion
+    #region properties
+    public ItemList<T> TrainingBestSolutions {
+      get { return TrainingBestSolutionsParameter.ActualValue; }
+      set { TrainingBestSolutionsParameter.ActualValue = value; }
+    }
+    public ItemList<DoubleArray> TrainingBestSolutionQualities {
+      get { return TrainingBestSolutionQualitiesParameter.ActualValue; }
+      set { TrainingBestSolutionQualitiesParameter.ActualValue = value; }
+    }
+    public BoolValue UpdateAlways {
+      get { return UpdateAlwaysParameter.Value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer(SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer<T> original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<ItemList<T>>(TrainingBestSolutionsParameterName, "The training best (Pareto-optimal) symbolic data analysis solutions."));
+      Parameters.Add(new LookupParameter<ItemList<DoubleArray>>(TrainingBestSolutionQualitiesParameterName, "The qualities of the training best (Pareto-optimal) solutions."));
+      Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best training solutions should always be updated regardless of its quality.", new BoolValue(false)));
+      UpdateAlwaysParameter.Hidden = true;
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (!Parameters.ContainsKey(UpdateAlwaysParameterName)) {
+        Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best training solutions should always be updated regardless of its quality.", new BoolValue(false)));
+        UpdateAlwaysParameter.Hidden = true;
+      }
+    }
+
+    public override IOperation Apply() {
+      var results = ResultCollection;
+      // create empty parameter and result values
+      if (TrainingBestSolutions == null) {
+        TrainingBestSolutions = new ItemList<T>();
+        TrainingBestSolutionQualities = new ItemList<DoubleArray>();
+        results.Add(new Result(TrainingBestSolutionQualitiesParameter.Name, TrainingBestSolutionQualitiesParameter.Description, TrainingBestSolutionQualities));
+        results.Add(new Result(TrainingBestSolutionsParameter.Name, TrainingBestSolutionsParameter.Description, TrainingBestSolutions));
+      }
+
+      //if the pareto front of best solutions shall be updated regardless of the quality, the list initialized empty to discard old solutions
+      IList<double[]> trainingBestQualities;
+      if (UpdateAlways.Value) {
+        trainingBestQualities = new List<double[]>();
+      } else {
+        trainingBestQualities = TrainingBestSolutionQualities.Select(x => x.ToArray()).ToList();
+      }
+
+      #region find best trees
+      IList<int> nonDominatedIndexes = new List<int>();
+      ISymbolicExpressionTree[] tree = SymbolicExpressionTree.ToArray();
+      List<double[]> qualities = Qualities.Select(x => x.ToArray()).ToList();
+      bool[] maximization = Maximization.ToArray();
+      List<double[]> newNonDominatedQualities = new List<double[]>();
+      for (int i = 0; i < tree.Length; i++) {
+        if (IsNonDominated(qualities[i], trainingBestQualities, maximization) &&
+          IsNonDominated(qualities[i], qualities, maximization)) {
+          if (!newNonDominatedQualities.Contains(qualities[i], new DoubleArrayComparer())) {
+            newNonDominatedQualities.Add(qualities[i]);
+            nonDominatedIndexes.Add(i);
+          }
+        }
+      }
+      #endregion
+      #region update Pareto-optimal solution archive
+      if (nonDominatedIndexes.Count > 0) {
+        ItemList<DoubleArray> nonDominatedQualities = new ItemList<DoubleArray>();
+        ItemList<T> nonDominatedSolutions = new ItemList<T>();
+        // add all new non-dominated solutions to the archive
+        foreach (var index in nonDominatedIndexes) {
+          T solution = CreateSolution(tree[index], qualities[index]);
+          nonDominatedSolutions.Add(solution);
+          nonDominatedQualities.Add(new DoubleArray(qualities[index]));
+        }
+        // add old non-dominated solutions only if they are not dominated by one of the new solutions
+        for (int i = 0; i < trainingBestQualities.Count; i++) {
+          if (IsNonDominated(trainingBestQualities[i], newNonDominatedQualities, maximization)) {
+            if (!newNonDominatedQualities.Contains(trainingBestQualities[i], new DoubleArrayComparer())) {
+              nonDominatedSolutions.Add(TrainingBestSolutions[i]);
+              nonDominatedQualities.Add(TrainingBestSolutionQualities[i]);
+            }
+          }
+        }
+
+        results[TrainingBestSolutionsParameter.Name].Value = nonDominatedSolutions;
+        results[TrainingBestSolutionQualitiesParameter.Name].Value = nonDominatedQualities;
+      }
+      #endregion
+      return base.Apply();
+    }
+
+    private class DoubleArrayComparer : IEqualityComparer<double[]> {
+      public bool Equals(double[] x, double[] y) {
+        if (y.Length != x.Length) throw new ArgumentException();
+        for (int i = 0; i < x.Length; i++) {
+          if (!x[i].IsAlmost(y[i])) return false;
+        }
+        return true;
+      }
+
+      public int GetHashCode(double[] obj) {
+        int c = obj.Length;
+        for (int i = 0; i < obj.Length; i++)
+          c ^= obj[i].GetHashCode();
+        return c;
+      }
+    }
+
+    protected abstract T CreateSolution(ISymbolicExpressionTree bestTree, double[] bestQuality);
+
+    private bool IsNonDominated(double[] point, IList<double[]> points, bool[] maximization) {
+      foreach (var refPoint in points) {
+        bool refPointDominatesPoint = true;
+        for (int i = 0; i < point.Length; i++) {
+          refPointDominatesPoint &= IsBetterOrEqual(refPoint[i], point[i], maximization[i]);
+        }
+        if (refPointDominatesPoint) return false;
+      }
+      return true;
+    }
+    private bool IsBetterOrEqual(double lhs, double rhs, bool maximization) {
+      if (maximization) return lhs > rhs;
+      else return lhs < rhs;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationAnalyzer.cs	(revision 10269)
@@ -0,0 +1,98 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  /// <summary>
+  /// Abstract base class for symbolic data analysis analyzers that validate a solution on a separate data partition using the evaluator.
+  /// </summary>
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisMultiObjectiveValidationAnalyzer<T, U> : SymbolicDataAnalysisMultiObjectiveAnalyzer,
+    ISymbolicDataAnalysisValidationAnalyzer<T, U>
+    where T : class, ISymbolicDataAnalysisMultiObjectiveEvaluator<U>
+    where U : class, IDataAnalysisProblemData {
+    private const string RandomParameterName = "Random";
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string EvaluatorParameterName = "Evaluator";
+    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
+    private const string ValidationPartitionParameterName = "ValidationPartition";
+    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
+
+    #region parameter properties
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters[RandomParameterName]; }
+    }
+    public ILookupParameter<U> ProblemDataParameter {
+      get { return (ILookupParameter<U>)Parameters[ProblemDataParameterName]; }
+    }
+    public ILookupParameter<T> EvaluatorParameter {
+      get { return (ILookupParameter<T>)Parameters[EvaluatorParameterName]; }
+    }
+    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
+    }
+    public IValueLookupParameter<IntRange> ValidationPartitionParameter {
+      get { return (IValueLookupParameter<IntRange>)Parameters[ValidationPartitionParameterName]; }
+    }
+    public IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
+      get { return (IValueLookupParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisMultiObjectiveValidationAnalyzer(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisMultiObjectiveValidationAnalyzer(SymbolicDataAnalysisMultiObjectiveValidationAnalyzer<T, U> original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public SymbolicDataAnalysisMultiObjectiveValidationAnalyzer()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IRandom>(RandomParameterName, "The random generator to use."));
+      Parameters.Add(new LookupParameter<U>(ProblemDataParameterName, "The problem data of the symbolic data analysis problem."));
+      Parameters.Add(new LookupParameter<T>(EvaluatorParameterName, "The operator to use for fitness evaluation on the validation partition."));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter for symbolic data analysis expression trees."));
+      Parameters.Add(new ValueLookupParameter<IntRange>(ValidationPartitionParameterName, "The validation partition."));
+      Parameters.Add(new ValueLookupParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index."));
+    }
+
+    protected IEnumerable<int> GenerateRowsToEvaluate() {
+      int seed = RandomParameter.ActualValue.Next();
+      int samplesStart = ValidationPartitionParameter.ActualValue.Start;
+      int samplesEnd = ValidationPartitionParameter.ActualValue.End;
+      int testPartitionStart = ProblemDataParameter.ActualValue.TestPartition.Start;
+      int testPartitionEnd = ProblemDataParameter.ActualValue.TestPartition.End;
+
+      if (samplesEnd < samplesStart) throw new ArgumentException("Start value is larger than end value.");
+      int count = (int)((samplesEnd - samplesStart) * RelativeNumberOfEvaluatedSamplesParameter.ActualValue.Value);
+      if (count == 0) count = 1;
+      return RandomEnumerable.SampleRandomNumbers(seed, samplesStart, samplesEnd, count)
+        .Where(i => i < testPartitionStart || testPartitionEnd <= i);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs	(revision 10269)
@@ -0,0 +1,198 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  /// <summary>
+  /// An operator that analyzes the validation best symbolic data analysis solution for multi objective symbolic data analysis problems.
+  /// </summary>
+  [Item("SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer", "An operator that analyzes the validation best symbolic data analysis solution for multi objective symbolic data analysis problems.")]
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer<S, T, U> : SymbolicDataAnalysisMultiObjectiveValidationAnalyzer<T, U>,
+    ISymbolicDataAnalysisMultiObjectiveAnalyzer
+    where S : class, ISymbolicDataAnalysisSolution
+    where T : class, ISymbolicDataAnalysisMultiObjectiveEvaluator<U>
+    where U : class, IDataAnalysisProblemData {
+    private const string ValidationBestSolutionsParameterName = "Best validation solutions";
+    private const string ValidationBestSolutionQualitiesParameterName = "Best validation solution qualities";
+    private const string UpdateAlwaysParameterName = "Always update best solutions";
+
+    #region parameter properties
+    public ILookupParameter<ItemList<S>> ValidationBestSolutionsParameter {
+      get { return (ILookupParameter<ItemList<S>>)Parameters[ValidationBestSolutionsParameterName]; }
+    }
+    public ILookupParameter<ItemList<DoubleArray>> ValidationBestSolutionQualitiesParameter {
+      get { return (ILookupParameter<ItemList<DoubleArray>>)Parameters[ValidationBestSolutionQualitiesParameterName]; }
+    }
+    public IFixedValueParameter<BoolValue> UpdateAlwaysParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters[UpdateAlwaysParameterName]; }
+    }
+    #endregion
+    #region properties
+    public ItemList<S> ValidationBestSolutions {
+      get { return ValidationBestSolutionsParameter.ActualValue; }
+      set { ValidationBestSolutionsParameter.ActualValue = value; }
+    }
+    public ItemList<DoubleArray> ValidationBestSolutionQualities {
+      get { return ValidationBestSolutionQualitiesParameter.ActualValue; }
+      set { ValidationBestSolutionQualitiesParameter.ActualValue = value; }
+    }
+    public BoolValue UpdateAlways {
+      get { return UpdateAlwaysParameter.Value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer(SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer<S, T, U> original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<ItemList<S>>(ValidationBestSolutionsParameterName, "The validation best (Pareto-optimal) symbolic data analysis solutions."));
+      Parameters.Add(new LookupParameter<ItemList<DoubleArray>>(ValidationBestSolutionQualitiesParameterName, "The qualities of the validation best (Pareto-optimal) solutions."));
+      Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best validation solutions should always be updated regardless of its quality.", new BoolValue(false)));
+      UpdateAlwaysParameter.Hidden = true;
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (!Parameters.ContainsKey(UpdateAlwaysParameterName)) {
+        Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best training solutions should always be updated regardless of its quality.", new BoolValue(false)));
+        UpdateAlwaysParameter.Hidden = true;
+      }
+    }
+
+    public override IOperation Apply() {
+      IEnumerable<int> rows = GenerateRowsToEvaluate();
+      if (!rows.Any()) return base.Apply();
+
+      var results = ResultCollection;
+      // create empty parameter and result values
+      if (ValidationBestSolutions == null) {
+        ValidationBestSolutions = new ItemList<S>();
+        ValidationBestSolutionQualities = new ItemList<DoubleArray>();
+        results.Add(new Result(ValidationBestSolutionQualitiesParameter.Name, ValidationBestSolutionQualitiesParameter.Description, ValidationBestSolutionQualities));
+        results.Add(new Result(ValidationBestSolutionsParameter.Name, ValidationBestSolutionsParameter.Description, ValidationBestSolutions));
+      }
+
+      //if the pareto front of best solutions shall be updated regardless of the quality, the list initialized empty to discard old solutions
+      IList<double[]> trainingBestQualities;
+      if (UpdateAlways.Value) {
+        trainingBestQualities = new List<double[]>();
+      } else {
+        trainingBestQualities = ValidationBestSolutionQualities.Select(x => x.ToArray()).ToList();
+      }
+
+      #region find best trees
+      IList<int> nonDominatedIndexes = new List<int>();
+      ISymbolicExpressionTree[] tree = SymbolicExpressionTree.ToArray();
+      bool[] maximization = Maximization.ToArray();
+      List<double[]> newNonDominatedQualities = new List<double[]>();
+      var evaluator = EvaluatorParameter.ActualValue;
+      var problemData = ProblemDataParameter.ActualValue;
+      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator);
+
+      var qualities = tree
+        .AsParallel()
+        .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
+        .ToArray();
+      for (int i = 0; i < tree.Length; i++) {
+        if (IsNonDominated(qualities[i], trainingBestQualities, maximization) &&
+          IsNonDominated(qualities[i], qualities, maximization)) {
+          if (!newNonDominatedQualities.Contains(qualities[i], new DoubleArrayComparer())) {
+            newNonDominatedQualities.Add(qualities[i]);
+            nonDominatedIndexes.Add(i);
+          }
+        }
+      }
+      #endregion
+      #region update Pareto-optimal solution archive
+      if (nonDominatedIndexes.Count > 0) {
+        ItemList<DoubleArray> nonDominatedQualities = new ItemList<DoubleArray>();
+        ItemList<S> nonDominatedSolutions = new ItemList<S>();
+        // add all new non-dominated solutions to the archive
+        foreach (var index in nonDominatedIndexes) {
+          S solution = CreateSolution(tree[index], qualities[index]);
+          nonDominatedSolutions.Add(solution);
+          nonDominatedQualities.Add(new DoubleArray(qualities[index]));
+        }
+        // add old non-dominated solutions only if they are not dominated by one of the new solutions
+        for (int i = 0; i < trainingBestQualities.Count; i++) {
+          if (IsNonDominated(trainingBestQualities[i], newNonDominatedQualities, maximization)) {
+            if (!newNonDominatedQualities.Contains(trainingBestQualities[i], new DoubleArrayComparer())) {
+              nonDominatedSolutions.Add(ValidationBestSolutions[i]);
+              nonDominatedQualities.Add(ValidationBestSolutionQualities[i]);
+            }
+          }
+        }
+
+        results[ValidationBestSolutionsParameter.Name].Value = nonDominatedSolutions;
+        results[ValidationBestSolutionQualitiesParameter.Name].Value = nonDominatedQualities;
+      }
+      #endregion
+      return base.Apply();
+    }
+
+    protected abstract S CreateSolution(ISymbolicExpressionTree bestTree, double[] bestQuality);
+
+    private bool IsNonDominated(double[] point, IList<double[]> points, bool[] maximization) {
+      foreach (var refPoint in points) {
+        bool refPointDominatesPoint = true;
+        for (int i = 0; i < point.Length; i++) {
+          refPointDominatesPoint &= IsBetter(refPoint[i], point[i], maximization[i]);
+        }
+        if (refPointDominatesPoint) return false;
+      }
+      return true;
+    }
+    private bool IsBetter(double lhs, double rhs, bool maximization) {
+      if (maximization) return lhs > rhs;
+      else return lhs < rhs;
+    }
+
+    private class DoubleArrayComparer : IEqualityComparer<double[]> {
+      public bool Equals(double[] x, double[] y) {
+        if (y.Length != x.Length) throw new ArgumentException();
+        for (int i = 0; i < x.Length; i++) {
+          if (!x[i].IsAlmost(y[i])) return false;
+        }
+        return true;
+      }
+
+      public int GetHashCode(double[] obj) {
+        int c = obj.Length;
+        for (int i = 0; i < obj.Length; i++)
+          c ^= obj[i].GetHashCode();
+        return c;
+      }
+    }
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveAnalyzer.cs	(revision 10269)
@@ -0,0 +1,77 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  /// <summary>
+  /// Abstract base class for single objective symbolic data analysis analyzers.
+  /// </summary>
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisSingleObjectiveAnalyzer : SymbolicDataAnalysisAnalyzer, ISymbolicDataAnalysisSingleObjectiveAnalyzer {
+    private const string QualityParameterName = "Quality";
+    private const string MaximizationParameterName = "Maximization";
+    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
+
+    #region parameter properties
+    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+    public ILookupParameter<BoolValue> MaximizationParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters[MaximizationParameterName]; }
+    }
+    public ILookupParameter<BoolValue> ApplyLinearScalingParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
+    }
+    #endregion
+    #region properties
+    public ItemArray<DoubleValue> Quality {
+      get { return QualityParameter.ActualValue; }
+    }
+    public BoolValue Maximization {
+      get { return MaximizationParameter.ActualValue; }
+    }
+    #endregion
+    [StorableConstructor]
+    protected SymbolicDataAnalysisSingleObjectiveAnalyzer(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisSingleObjectiveAnalyzer(SymbolicDataAnalysisSingleObjectiveAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public SymbolicDataAnalysisSingleObjectiveAnalyzer()
+      : base() {
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The qualities of the trees that should be analyzed."));
+      Parameters.Add(new LookupParameter<BoolValue>(MaximizationParameterName, "The direction of optimization."));
+      Parameters.Add(new LookupParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the individual should be linearly scaled before evaluating."));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (Parameters.ContainsKey(ApplyLinearScalingParameterName) && !(Parameters[ApplyLinearScalingParameterName] is LookupParameter<BoolValue>))
+        Parameters.Remove(ApplyLinearScalingParameterName);
+      if (!Parameters.ContainsKey(ApplyLinearScalingParameterName))
+        Parameters.Add(new LookupParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the individual should be linearly scaled before evaluating."));
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer.cs	(revision 10269)
@@ -0,0 +1,125 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  /// <summary>
+  /// An operator that analyzes the training best symbolic data analysis solution for single objective symbolic data analysis problems.
+  /// </summary>
+  [Item("SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer", "An operator that analyzes the training best symbolic data analysis solution for single objective symbolic data analysis problems.")]
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer<T> : SymbolicDataAnalysisSingleObjectiveAnalyzer
+    where T : class, ISymbolicDataAnalysisSolution {
+    private const string TrainingBestSolutionParameterName = "Best training solution";
+    private const string TrainingBestSolutionQualityParameterName = "Best training solution quality";
+    private const string UpdateAlwaysParameterName = "Always update best solution";
+
+    #region parameter properties
+    public ILookupParameter<T> TrainingBestSolutionParameter {
+      get { return (ILookupParameter<T>)Parameters[TrainingBestSolutionParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> TrainingBestSolutionQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[TrainingBestSolutionQualityParameterName]; }
+    }
+    public IFixedValueParameter<BoolValue> UpdateAlwaysParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters[UpdateAlwaysParameterName]; }
+    }
+    #endregion
+    #region properties
+    public T TrainingBestSolution {
+      get { return TrainingBestSolutionParameter.ActualValue; }
+      set { TrainingBestSolutionParameter.ActualValue = value; }
+    }
+    public DoubleValue TrainingBestSolutionQuality {
+      get { return TrainingBestSolutionQualityParameter.ActualValue; }
+      set { TrainingBestSolutionQualityParameter.ActualValue = value; }
+    }
+    public BoolValue UpdateAlways {
+      get { return UpdateAlwaysParameter.Value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer(SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer<T> original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<T>(TrainingBestSolutionParameterName, "The training best symbolic data analyis solution."));
+      Parameters.Add(new LookupParameter<DoubleValue>(TrainingBestSolutionQualityParameterName, "The quality of the training best symbolic data analysis solution."));
+      Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best training solution should always be updated regardless of its quality.", new BoolValue(false)));
+      UpdateAlwaysParameter.Hidden = true;
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (!Parameters.ContainsKey(UpdateAlwaysParameterName)) {
+        Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best training solution should always be updated regardless of its quality.", new BoolValue(false)));
+        UpdateAlwaysParameter.Hidden = true;
+      }
+    }
+
+    public override IOperation Apply() {
+      #region find best tree
+      double bestQuality = Maximization.Value ? double.NegativeInfinity : double.PositiveInfinity;
+      ISymbolicExpressionTree bestTree = null;
+      ISymbolicExpressionTree[] tree = SymbolicExpressionTree.ToArray();
+      double[] quality = Quality.Select(x => x.Value).ToArray();
+      for (int i = 0; i < tree.Length; i++) {
+        if (IsBetter(quality[i], bestQuality, Maximization.Value)) {
+          bestQuality = quality[i];
+          bestTree = tree[i];
+        }
+      }
+      #endregion
+
+      var results = ResultCollection;
+      if (bestTree != null && (UpdateAlways.Value || TrainingBestSolutionQuality == null ||
+        IsBetter(bestQuality, TrainingBestSolutionQuality.Value, Maximization.Value))) {
+        TrainingBestSolution = CreateSolution(bestTree, bestQuality);
+        TrainingBestSolutionQuality = new DoubleValue(bestQuality);
+
+        if (!results.ContainsKey(TrainingBestSolutionParameter.Name)) {
+          results.Add(new Result(TrainingBestSolutionParameter.Name, TrainingBestSolutionParameter.Description, TrainingBestSolution));
+          results.Add(new Result(TrainingBestSolutionQualityParameter.Name, TrainingBestSolutionQualityParameter.Description, TrainingBestSolutionQuality));
+        } else {
+          results[TrainingBestSolutionParameter.Name].Value = TrainingBestSolution;
+          results[TrainingBestSolutionQualityParameter.Name].Value = TrainingBestSolutionQuality;
+        }
+      }
+      return base.Apply();
+    }
+
+    protected abstract T CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality);
+
+    private bool IsBetter(double lhs, double rhs, bool maximization) {
+      if (maximization) return lhs > rhs;
+      else return lhs < rhs;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer.cs	(revision 10269)
@@ -0,0 +1,191 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  /// <summary>
+  /// An operator that collects the Pareto-best symbolic data analysis solutions for single objective symbolic data analysis problems.
+  /// </summary>
+  [Item("SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer", "An operator that analyzes the Pareto-best symbolic data analysis solution for single objective symbolic data analysis problems.")]
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer<S, T> : SymbolicDataAnalysisSingleObjectiveAnalyzer, ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator
+    where T : class, ISymbolicDataAnalysisSolution
+    where S : class, IDataAnalysisProblemData {
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string TrainingBestSolutionsParameterName = "Best training solutions";
+    private const string TrainingBestSolutionQualitiesParameterName = "Best training solution qualities";
+    private const string ComplexityParameterName = "Complexity";
+    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
+    private const string EstimationLimitsParameterName = "EstimationLimits";
+
+    public override bool EnabledByDefault {
+      get { return false; }
+    }
+
+    #region parameter properties
+    public ILookupParameter<ItemList<T>> TrainingBestSolutionsParameter {
+      get { return (ILookupParameter<ItemList<T>>)Parameters[TrainingBestSolutionsParameterName]; }
+    }
+    public ILookupParameter<ItemList<DoubleArray>> TrainingBestSolutionQualitiesParameter {
+      get { return (ILookupParameter<ItemList<DoubleArray>>)Parameters[TrainingBestSolutionQualitiesParameterName]; }
+    }
+    public IScopeTreeLookupParameter<DoubleValue> ComplexityParameter {
+      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[ComplexityParameterName]; }
+    }
+    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
+    }
+    public ILookupParameter<S> ProblemDataParameter {
+      get { return (ILookupParameter<S>)Parameters[ProblemDataParameterName]; }
+    }
+    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
+      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
+    }
+    #endregion
+    #region properties
+    public ItemList<T> TrainingBestSolutions {
+      get { return TrainingBestSolutionsParameter.ActualValue; }
+      set { TrainingBestSolutionsParameter.ActualValue = value; }
+    }
+    public ItemList<DoubleArray> TrainingBestSolutionQualities {
+      get { return TrainingBestSolutionQualitiesParameter.ActualValue; }
+      set { TrainingBestSolutionQualitiesParameter.ActualValue = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer(SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer<S, T> original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<S>(ProblemDataParameterName, "The problem data for the symbolic data analysis solution."));
+      Parameters.Add(new LookupParameter<ItemList<T>>(TrainingBestSolutionsParameterName, "The training best (Pareto-optimal) symbolic data analysis solutions."));
+      Parameters.Add(new LookupParameter<ItemList<DoubleArray>>(TrainingBestSolutionQualitiesParameterName, "The qualities of the training best (Pareto-optimal) solutions."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(ComplexityParameterName, "The complexity of each tree."));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The symbolic data analysis tree interpreter for the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic classification model."));
+    }
+
+    public override IOperation Apply() {
+      var results = ResultCollection;
+      // create empty parameter and result values
+      if (TrainingBestSolutions == null) {
+        TrainingBestSolutions = new ItemList<T>();
+        TrainingBestSolutionQualities = new ItemList<DoubleArray>();
+        results.Add(new Result(TrainingBestSolutionQualitiesParameter.Name, TrainingBestSolutionQualitiesParameter.Description, TrainingBestSolutionQualities));
+        results.Add(new Result(TrainingBestSolutionsParameter.Name, TrainingBestSolutionsParameter.Description, TrainingBestSolutions));
+      }
+
+      IList<Tuple<double, double>> trainingBestQualities = TrainingBestSolutionQualities
+        .Select(x => Tuple.Create(x[0], x[1]))
+        .ToList();
+
+      #region find best trees
+      IList<int> nonDominatedIndexes = new List<int>();
+      ISymbolicExpressionTree[] tree = SymbolicExpressionTree.ToArray();
+      List<double> qualities = Quality.Select(x => x.Value).ToList();
+
+      List<double> complexities;
+      if (ComplexityParameter.ActualValue != null && ComplexityParameter.ActualValue.Length == qualities.Count) {
+        complexities = ComplexityParameter.ActualValue.Select(x => x.Value).ToList();
+      } else {
+        complexities = tree.Select(t => (double)t.Length).ToList();
+      }
+      List<Tuple<double, double>> fitness = new List<Tuple<double, double>>();
+      for (int i = 0; i < qualities.Count; i++)
+        fitness.Add(Tuple.Create(qualities[i], complexities[i]));
+      var maximization = Tuple.Create(Maximization.Value, false);// complexity must be minimized
+      List<Tuple<double, double>> newNonDominatedQualities = new List<Tuple<double, double>>();
+      for (int i = 0; i < tree.Length; i++) {
+        if (IsNonDominated(fitness[i], trainingBestQualities, maximization) &&
+          IsNonDominated(fitness[i], newNonDominatedQualities, maximization) &&
+          IsNonDominated(fitness[i], fitness.Skip(i + 1), maximization)) {
+          if (!newNonDominatedQualities.Contains(fitness[i])) {
+            newNonDominatedQualities.Add(fitness[i]);
+            nonDominatedIndexes.Add(i);
+          }
+        }
+      }
+      #endregion
+
+      #region update Pareto-optimal solution archive
+      if (nonDominatedIndexes.Count > 0) {
+        ItemList<DoubleArray> nonDominatedQualities = new ItemList<DoubleArray>();
+        ItemList<T> nonDominatedSolutions = new ItemList<T>();
+        // add all new non-dominated solutions to the archive
+        foreach (var index in nonDominatedIndexes) {
+          T solution = CreateSolution(tree[index]);
+          nonDominatedSolutions.Add(solution);
+          nonDominatedQualities.Add(new DoubleArray(new double[] { fitness[index].Item1, fitness[index].Item2 }));
+        }
+        // add old non-dominated solutions only if they are not dominated by one of the new solutions
+        for (int i = 0; i < trainingBestQualities.Count; i++) {
+          if (IsNonDominated(trainingBestQualities[i], newNonDominatedQualities, maximization)) {
+            if (!newNonDominatedQualities.Contains(trainingBestQualities[i])) {
+              nonDominatedSolutions.Add(TrainingBestSolutions[i]);
+              nonDominatedQualities.Add(TrainingBestSolutionQualities[i]);
+            }
+          }
+        }
+
+        // make sure solutions and qualities are ordered in the results
+        var orderedIndexes =
+          nonDominatedSolutions.Select((s, i) => i).OrderBy(i => nonDominatedQualities[i][0]).ToArray();
+
+        var orderedNonDominatedSolutions = new ItemList<T>();
+        var orderedNonDominatedQualities = new ItemList<DoubleArray>();
+        foreach (var i in orderedIndexes) {
+          orderedNonDominatedQualities.Add(nonDominatedQualities[i]);
+          orderedNonDominatedSolutions.Add(nonDominatedSolutions[i]);
+        }
+
+        TrainingBestSolutions = orderedNonDominatedSolutions;
+        TrainingBestSolutionQualities = orderedNonDominatedQualities;
+
+        results[TrainingBestSolutionsParameter.Name].Value = orderedNonDominatedSolutions;
+        results[TrainingBestSolutionQualitiesParameter.Name].Value = orderedNonDominatedQualities;
+      }
+      #endregion
+      return base.Apply();
+    }
+
+    protected abstract T CreateSolution(ISymbolicExpressionTree bestTree);
+
+    private bool IsNonDominated(Tuple<double, double> point, IEnumerable<Tuple<double, double>> points, Tuple<bool, bool> maximization) {
+      return !points.Any(p => IsBetterOrEqual(p.Item1, point.Item1, maximization.Item1) &&
+                             IsBetterOrEqual(p.Item2, point.Item2, maximization.Item2));
+    }
+    private bool IsBetterOrEqual(double lhs, double rhs, bool maximization) {
+      if (maximization) return lhs >= rhs;
+      else return lhs <= rhs;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationAnalyzer.cs	(revision 10269)
@@ -0,0 +1,111 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  /// <summary>
+  /// Abstract base class for symbolic data analysis analyzers that validate a solution on a separate data partition using the evaluator.
+  /// </summary>
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U> : SymbolicDataAnalysisSingleObjectiveAnalyzer,
+    ISymbolicDataAnalysisValidationAnalyzer<T, U>
+    where T : class, ISymbolicDataAnalysisSingleObjectiveEvaluator<U>
+    where U : class, IDataAnalysisProblemData {
+    private const string RandomParameterName = "Random";
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string EvaluatorParameterName = "Evaluator";
+    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
+    private const string ValidationPartitionParameterName = "ValidationPartition";
+    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
+    private const string PercentageOfBestSolutionsParameterName = "PercentageOfBestSolutions";
+
+    #region parameter properties
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters[RandomParameterName]; }
+    }
+    public ILookupParameter<U> ProblemDataParameter {
+      get { return (ILookupParameter<U>)Parameters[ProblemDataParameterName]; }
+    }
+    public ILookupParameter<T> EvaluatorParameter {
+      get { return (ILookupParameter<T>)Parameters[EvaluatorParameterName]; }
+    }
+    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
+    }
+    public IValueLookupParameter<IntRange> ValidationPartitionParameter {
+      get { return (IValueLookupParameter<IntRange>)Parameters[ValidationPartitionParameterName]; }
+    }
+    public IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
+      get { return (IValueLookupParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
+    }
+    public IValueLookupParameter<PercentValue> PercentageOfBestSolutionsParameter {
+      get { return (IValueLookupParameter<PercentValue>)Parameters[PercentageOfBestSolutionsParameterName]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisSingleObjectiveValidationAnalyzer(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisSingleObjectiveValidationAnalyzer(SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U> original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    protected SymbolicDataAnalysisSingleObjectiveValidationAnalyzer(): base() {
+      Parameters.Add(new LookupParameter<IRandom>(RandomParameterName, "The random generator."));
+      Parameters.Add(new LookupParameter<U>(ProblemDataParameterName, "The problem data of the symbolic data analysis problem."));
+      Parameters.Add(new LookupParameter<T>(EvaluatorParameterName, "The operator to use for fitness evaluation on the validation partition."));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter for symbolic data analysis expression trees."));
+      Parameters.Add(new ValueLookupParameter<IntRange>(ValidationPartitionParameterName, "The validation partition."));
+      Parameters.Add(new ValueLookupParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index."));
+      Parameters.Add(new ValueLookupParameter<PercentValue>(PercentageOfBestSolutionsParameterName,
+                                                            "The percentage of the top solutions which should be analyzed.", new PercentValue(0.1)));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (!Parameters.ContainsKey(PercentageOfBestSolutionsParameterName))
+        Parameters.Add(new ValueLookupParameter<PercentValue>(PercentageOfBestSolutionsParameterName,
+                                                               "The percentage of the top solutions which should be analyzed.", new PercentValue(1)));
+    }
+
+    protected IEnumerable<int> GenerateRowsToEvaluate() {
+      int seed = RandomParameter.ActualValue.Next();
+      int samplesStart = ValidationPartitionParameter.ActualValue.Start;
+      int samplesEnd = ValidationPartitionParameter.ActualValue.End;
+      int testPartitionStart = ProblemDataParameter.ActualValue.TestPartition.Start;
+      int testPartitionEnd = ProblemDataParameter.ActualValue.TestPartition.End;
+
+      if (samplesEnd < samplesStart) throw new ArgumentException("Start value is larger than end value.");
+      int count = (int)((samplesEnd - samplesStart) * RelativeNumberOfEvaluatedSamplesParameter.ActualValue.Value);
+      if (count == 0) count = 1;
+      return RandomEnumerable.SampleRandomNumbers(seed, samplesStart, samplesEnd, count)
+        .Where(i => i < testPartitionStart || testPartitionEnd <= i);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs	(revision 10269)
@@ -0,0 +1,159 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  /// <summary>
+  /// An operator that analyzes the validation best symbolic data analysis solution for single objective symbolic data analysis problems.
+  /// </summary>
+  [Item("SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer", "An operator that analyzes the validation best symbolic data analysis solution for single objective symbolic data analysis problems.")]
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer<S, T, U> : SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U>
+    where S : class, ISymbolicDataAnalysisSolution
+    where T : class, ISymbolicDataAnalysisSingleObjectiveEvaluator<U>
+    where U : class, IDataAnalysisProblemData {
+    private const string ValidationBestSolutionParameterName = "Best validation solution";
+    private const string ValidationBestSolutionQualityParameterName = "Best validation solution quality";
+    private const string UpdateAlwaysParameterName = "Always update best solution";
+
+    #region parameter properties
+    public ILookupParameter<S> ValidationBestSolutionParameter {
+      get { return (ILookupParameter<S>)Parameters[ValidationBestSolutionParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> ValidationBestSolutionQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[ValidationBestSolutionQualityParameterName]; }
+    }
+    public IFixedValueParameter<BoolValue> UpdateAlwaysParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters[UpdateAlwaysParameterName]; }
+    }
+    #endregion
+    #region properties
+    public S ValidationBestSolution {
+      get { return ValidationBestSolutionParameter.ActualValue; }
+      set { ValidationBestSolutionParameter.ActualValue = value; }
+    }
+    public DoubleValue ValidationBestSolutionQuality {
+      get { return ValidationBestSolutionQualityParameter.ActualValue; }
+      set { ValidationBestSolutionQualityParameter.ActualValue = value; }
+    }
+    public BoolValue UpdateAlways {
+      get { return UpdateAlwaysParameter.Value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer(SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer<S, T, U> original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<S>(ValidationBestSolutionParameterName, "The validation best symbolic data analyis solution."));
+      Parameters.Add(new LookupParameter<DoubleValue>(ValidationBestSolutionQualityParameterName, "The quality of the validation best symbolic data analysis solution."));
+      Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best validation solution should always be updated regardless of its quality.", new BoolValue(false)));
+      UpdateAlwaysParameter.Hidden = true;
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (!Parameters.ContainsKey(UpdateAlwaysParameterName)) {
+        Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best training solution should always be updated regardless of its quality.", new BoolValue(false)));
+        UpdateAlwaysParameter.Hidden = true;
+      }
+    }
+
+    public override IOperation Apply() {
+      IEnumerable<int> rows = GenerateRowsToEvaluate();
+      if (!rows.Any()) return base.Apply();
+
+      #region find best tree
+      var evaluator = EvaluatorParameter.ActualValue;
+      var problemData = ProblemDataParameter.ActualValue;
+      double bestValidationQuality = Maximization.Value ? double.NegativeInfinity : double.PositiveInfinity;
+      ISymbolicExpressionTree bestTree = null;
+      ISymbolicExpressionTree[] tree = SymbolicExpressionTree.ToArray();
+
+      // sort is ascending and we take the first n% => order so that best solutions are smallest
+      // sort order is determined by maximization parameter
+      double[] trainingQuality;
+      if (Maximization.Value) {
+        // largest values must be sorted first
+        trainingQuality = Quality.Select(x => -x.Value).ToArray();
+      } else {
+        // smallest values must be sorted first
+        trainingQuality = Quality.Select(x => x.Value).ToArray();
+      }
+
+      // sort trees by training qualities
+      Array.Sort(trainingQuality, tree);
+
+      // number of best training solutions to validate (at least 1)
+      int topN = (int)Math.Max(tree.Length * PercentageOfBestSolutionsParameter.ActualValue.Value, 1);
+
+      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator);
+      // evaluate best n training trees on validiation set
+      var quality = tree
+        .Take(topN)
+        .AsParallel()
+        .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
+        .ToArray();
+
+      for (int i = 0; i < quality.Length; i++) {
+        if (IsBetter(quality[i], bestValidationQuality, Maximization.Value)) {
+          bestValidationQuality = quality[i];
+          bestTree = tree[i];
+        }
+      }
+      #endregion
+
+      var results = ResultCollection;
+      if (UpdateAlways.Value || ValidationBestSolutionQuality == null ||
+        IsBetter(bestValidationQuality, ValidationBestSolutionQuality.Value, Maximization.Value)) {
+        ValidationBestSolution = CreateSolution(bestTree, bestValidationQuality);
+        ValidationBestSolutionQuality = new DoubleValue(bestValidationQuality);
+
+        if (!results.ContainsKey(ValidationBestSolutionParameter.Name)) {
+          results.Add(new Result(ValidationBestSolutionParameter.Name, ValidationBestSolutionParameter.Description, ValidationBestSolution));
+          results.Add(new Result(ValidationBestSolutionQualityParameter.Name, ValidationBestSolutionQualityParameter.Description, ValidationBestSolutionQuality));
+        } else {
+          results[ValidationBestSolutionParameter.Name].Value = ValidationBestSolution;
+          results[ValidationBestSolutionQualityParameter.Name].Value = ValidationBestSolutionQuality;
+        }
+      }
+      return base.Apply();
+    }
+
+    protected abstract S CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality);
+
+    private bool IsBetter(double lhs, double rhs, bool maximization) {
+      if (maximization) return lhs > rhs;
+      else return lhs < rhs;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs	(revision 10269)
@@ -0,0 +1,219 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  /// <summary>
+  /// An operator that collects the Pareto-best symbolic data analysis solutions for single objective symbolic data analysis problems.
+  /// </summary>
+  [Item("SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer", "An operator that analyzes the Pareto-best symbolic data analysis solution for single objective symbolic data analysis problems.")]
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer<S, T, U> : SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U>, ISymbolicDataAnalysisBoundedOperator
+    where S : class, ISymbolicDataAnalysisSolution
+    where T : class, ISymbolicDataAnalysisSingleObjectiveEvaluator<U>
+    where U : class, IDataAnalysisProblemData {
+    private const string ValidationBestSolutionsParameterName = "Best validation solutions";
+    private const string ValidationBestSolutionQualitiesParameterName = "Best validation solution qualities";
+    private const string ComplexityParameterName = "Complexity";
+    private const string EstimationLimitsParameterName = "EstimationLimits";
+
+    public override bool EnabledByDefault {
+      get { return false; }
+    }
+
+    #region parameter properties
+    public ILookupParameter<ItemList<S>> ValidationBestSolutionsParameter {
+      get { return (ILookupParameter<ItemList<S>>)Parameters[ValidationBestSolutionsParameterName]; }
+    }
+    public ILookupParameter<ItemList<DoubleArray>> ValidationBestSolutionQualitiesParameter {
+      get { return (ILookupParameter<ItemList<DoubleArray>>)Parameters[ValidationBestSolutionQualitiesParameterName]; }
+    }
+    public IScopeTreeLookupParameter<DoubleValue> ComplexityParameter {
+      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[ComplexityParameterName]; }
+    }
+    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
+      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
+    }
+
+    #endregion
+    #region properties
+    public ItemList<S> ValidationBestSolutions {
+      get { return ValidationBestSolutionsParameter.ActualValue; }
+      set { ValidationBestSolutionsParameter.ActualValue = value; }
+    }
+    public ItemList<DoubleArray> ValidationBestSolutionQualities {
+      get { return ValidationBestSolutionQualitiesParameter.ActualValue; }
+      set { ValidationBestSolutionQualitiesParameter.ActualValue = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer(SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer<S, T, U> original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<ItemList<S>>(ValidationBestSolutionsParameterName, "The validation best (Pareto-optimal) symbolic data analysis solutions."));
+      Parameters.Add(new LookupParameter<ItemList<DoubleArray>>(ValidationBestSolutionQualitiesParameterName, "The qualities of the validation best (Pareto-optimal) solutions."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(ComplexityParameterName, "The complexity of each tree."));
+      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic classification model."));
+    }
+
+    public override IOperation Apply() {
+      IEnumerable<int> rows = GenerateRowsToEvaluate();
+      if (!rows.Any()) return base.Apply();
+
+      #region find best tree
+      var evaluator = EvaluatorParameter.ActualValue;
+      var problemData = ProblemDataParameter.ActualValue;
+      ISymbolicExpressionTree[] tree = SymbolicExpressionTree.ToArray();
+
+      // sort is ascending and we take the first n% => order so that best solutions are smallest
+      // sort order is determined by maximization parameter
+      double[] trainingQuality;
+      if (Maximization.Value) {
+        // largest values must be sorted first
+        trainingQuality = Quality.Select(x => -x.Value).ToArray();
+      } else {
+        // smallest values must be sorted first
+        trainingQuality = Quality.Select(x => x.Value).ToArray();
+      }
+
+      int[] treeIndexes = Enumerable.Range(0, tree.Length).ToArray();
+
+      // sort trees by training qualities
+      Array.Sort(trainingQuality, treeIndexes);
+
+      // number of best training solutions to validate (at least 1)
+      int topN = (int)Math.Max(tree.Length * PercentageOfBestSolutionsParameter.ActualValue.Value, 1);
+
+      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator);
+      // evaluate best n training trees on validiation set
+      var qualities = treeIndexes
+        .Select(i => tree[i])
+        .Take(topN)
+        .AsParallel()
+        .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
+        .ToArray();
+      #endregion
+
+      var results = ResultCollection;
+      // create empty parameter and result values
+      if (ValidationBestSolutions == null) {
+        ValidationBestSolutions = new ItemList<S>();
+        ValidationBestSolutionQualities = new ItemList<DoubleArray>();
+        results.Add(new Result(ValidationBestSolutionQualitiesParameter.Name, ValidationBestSolutionQualitiesParameter.Description, ValidationBestSolutionQualities));
+        results.Add(new Result(ValidationBestSolutionsParameter.Name, ValidationBestSolutionsParameter.Description, ValidationBestSolutions));
+      }
+
+      IList<Tuple<double, double>> validationBestQualities = ValidationBestSolutionQualities
+        .Select(x => Tuple.Create(x[0], x[1]))
+        .ToList();
+
+      #region find best trees
+      IList<int> nonDominatedIndexes = new List<int>();
+
+      List<double> complexities;
+      if (ComplexityParameter.ActualValue != null && ComplexityParameter.ActualValue.Length == trainingQuality.Length) {
+        complexities = ComplexityParameter.ActualValue.Select(x => x.Value).ToList();
+      } else {
+        complexities = tree.Select(t => (double)t.Length).ToList();
+      }
+      List<Tuple<double, double>> fitness = new List<Tuple<double, double>>();
+      for (int i = 0; i < qualities.Length; i++)
+        fitness.Add(Tuple.Create(qualities[i], complexities[treeIndexes[i]]));
+
+      var maximization = Tuple.Create(Maximization.Value, false); // complexity must be minimized
+      List<Tuple<double, double>> newNonDominatedQualities = new List<Tuple<double, double>>();
+      for (int i = 0; i < fitness.Count; i++) {
+        if (IsNonDominated(fitness[i], validationBestQualities, maximization) &&
+          IsNonDominated(fitness[i], newNonDominatedQualities, maximization) &&
+          IsNonDominated(fitness[i], fitness.Skip(i + 1), maximization)) {
+          if (!newNonDominatedQualities.Contains(fitness[i])) {
+            newNonDominatedQualities.Add(fitness[i]);
+            nonDominatedIndexes.Add(i);
+          }
+        }
+      }
+      #endregion
+
+      #region update Pareto-optimal solution archive
+      if (nonDominatedIndexes.Count > 0) {
+        ItemList<DoubleArray> nonDominatedQualities = new ItemList<DoubleArray>();
+        ItemList<S> nonDominatedSolutions = new ItemList<S>();
+        // add all new non-dominated solutions to the archive
+        foreach (var index in nonDominatedIndexes) {
+          S solution = CreateSolution(tree[treeIndexes[index]]);
+          nonDominatedSolutions.Add(solution);
+          nonDominatedQualities.Add(new DoubleArray(new double[] { fitness[index].Item1, fitness[index].Item2 }));
+        }
+        // add old non-dominated solutions only if they are not dominated by one of the new solutions
+        for (int i = 0; i < validationBestQualities.Count; i++) {
+          if (IsNonDominated(validationBestQualities[i], newNonDominatedQualities, maximization)) {
+            if (!newNonDominatedQualities.Contains(validationBestQualities[i])) {
+              nonDominatedSolutions.Add(ValidationBestSolutions[i]);
+              nonDominatedQualities.Add(ValidationBestSolutionQualities[i]);
+            }
+          }
+        }
+
+        // make sure solutions and qualities are ordered in the results
+        var orderedIndexes =
+          nonDominatedSolutions.Select((s, i) => i).OrderBy(i => nonDominatedQualities[i][0]).ToArray();
+
+        var orderedNonDominatedSolutions = new ItemList<S>();
+        var orderedNonDominatedQualities = new ItemList<DoubleArray>();
+        foreach (var i in orderedIndexes) {
+          orderedNonDominatedQualities.Add(nonDominatedQualities[i]);
+          orderedNonDominatedSolutions.Add(nonDominatedSolutions[i]);
+        }
+
+        ValidationBestSolutions = orderedNonDominatedSolutions;
+        ValidationBestSolutionQualities = orderedNonDominatedQualities;
+
+        results[ValidationBestSolutionsParameter.Name].Value = orderedNonDominatedSolutions;
+        results[ValidationBestSolutionQualitiesParameter.Name].Value = orderedNonDominatedQualities;
+      }
+      #endregion
+      return base.Apply();
+    }
+
+    protected abstract S CreateSolution(ISymbolicExpressionTree bestTree);
+
+    private bool IsNonDominated(Tuple<double, double> point, IEnumerable<Tuple<double, double>> points, Tuple<bool, bool> maximization) {
+      return !points.Any(p => IsBetterOrEqual(p.Item1, point.Item1, maximization.Item1) &&
+                             IsBetterOrEqual(p.Item2, point.Item2, maximization.Item2));
+    }
+    private bool IsBetterOrEqual(double lhs, double rhs, bool maximization) {
+      if (maximization) return lhs >= rhs;
+      else return lhs <= rhs;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs	(revision 10269)
@@ -0,0 +1,203 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  /// <summary>
+  /// Calculates the accumulated frequencies of variable-symbols over all trees in the population.
+  /// </summary>
+  [Item("SymbolicDataAnalysisVariableFrequencyAnalyzer", "Calculates the accumulated frequencies of variable-symbols over all trees in the population.")]
+  [StorableClass]
+  public sealed class SymbolicDataAnalysisVariableFrequencyAnalyzer : SymbolicDataAnalysisAnalyzer {
+    private const string VariableFrequenciesParameterName = "VariableFrequencies";
+    private const string AggregateLaggedVariablesParameterName = "AggregateLaggedVariables";
+    private const string VariableImpactsParameterName = "VariableImpacts";
+
+    #region parameter properties
+    public ILookupParameter<DataTable> VariableFrequenciesParameter {
+      get { return (ILookupParameter<DataTable>)Parameters[VariableFrequenciesParameterName]; }
+    }
+    public ILookupParameter<DoubleMatrix> VariableImpactsParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters[VariableImpactsParameterName]; }
+    }
+    public IValueLookupParameter<BoolValue> AggregateLaggedVariablesParameter {
+      get { return (IValueLookupParameter<BoolValue>)Parameters[AggregateLaggedVariablesParameterName]; }
+    }
+    #endregion
+    #region properties
+    public BoolValue AggregateLaggedVariables {
+      get { return AggregateLaggedVariablesParameter.ActualValue; }
+      set { AggregateLaggedVariablesParameter.Value = value; }
+    }
+    #endregion
+    [StorableConstructor]
+    private SymbolicDataAnalysisVariableFrequencyAnalyzer(bool deserializing) : base(deserializing) { }
+    private SymbolicDataAnalysisVariableFrequencyAnalyzer(SymbolicDataAnalysisVariableFrequencyAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public SymbolicDataAnalysisVariableFrequencyAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<DataTable>(VariableFrequenciesParameterName, "The relative variable reference frequencies aggregated over all trees in the population."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>(VariableImpactsParameterName, "The relative variable relevance calculated as the average relative variable frequency over the whole run."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>(AggregateLaggedVariablesParameterName, "Switch that determines whether all references to a variable should be aggregated regardless of time-offsets. Turn off to analyze all variable references with different time offsets separately.", new BoolValue(true)));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisVariableFrequencyAnalyzer(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      ItemArray<ISymbolicExpressionTree> expressions = SymbolicExpressionTreeParameter.ActualValue;
+      ResultCollection results = ResultCollection;
+      DataTable datatable;
+      if (VariableFrequenciesParameter.ActualValue == null) {
+        datatable = new DataTable("Variable frequencies", "Relative frequency of variable references aggregated over the whole population.");
+        datatable.VisualProperties.XAxisTitle = "Generation";
+        datatable.VisualProperties.YAxisTitle = "Relative Variable Frequency";
+        VariableFrequenciesParameter.ActualValue = datatable;
+        results.Add(new Result("Variable frequencies", "Relative frequency of variable references aggregated over the whole population.", datatable));
+        results.Add(new Result("Variable impacts", "The relative variable relevance calculated as the average relative variable frequency over the whole run.", new DoubleMatrix()));
+      }
+
+      datatable = VariableFrequenciesParameter.ActualValue;
+      // all rows must have the same number of values so we can just take the first
+      int numberOfValues = datatable.Rows.Select(r => r.Values.Count).DefaultIfEmpty().First();
+
+      foreach (var pair in SymbolicDataAnalysisVariableFrequencyAnalyzer.CalculateVariableFrequencies(expressions, AggregateLaggedVariables.Value)) {
+        if (!datatable.Rows.ContainsKey(pair.Key)) {
+          // initialize a new row for the variable and pad with zeros
+          DataRow row = new DataRow(pair.Key, "", Enumerable.Repeat(0.0, numberOfValues));
+          row.VisualProperties.StartIndexZero = true;
+          datatable.Rows.Add(row);
+        }
+        datatable.Rows[pair.Key].Values.Add(Math.Round(pair.Value, 3));
+      }
+
+      // add a zero for each data row that was not modified in the previous loop 
+      foreach (var row in datatable.Rows.Where(r => r.Values.Count != numberOfValues + 1))
+        row.Values.Add(0.0);
+
+      // update variable impacts matrix
+      var orderedImpacts = (from row in datatable.Rows
+                            select new { Name = row.Name, Impact = Math.Round(datatable.Rows[row.Name].Values.Average(), 3) })
+                           .OrderByDescending(p => p.Impact)
+                           .ToList();
+      var impacts = new DoubleMatrix();
+      var matrix = impacts as IStringConvertibleMatrix;
+      matrix.Rows = orderedImpacts.Count;
+      matrix.RowNames = orderedImpacts.Select(x => x.Name);
+      matrix.Columns = 1;
+      matrix.ColumnNames = new string[] { "Relative variable relevance" };
+      int i = 0;
+      foreach (var p in orderedImpacts) {
+        matrix.SetValue(p.Impact.ToString(), i++, 0);
+      }
+
+      VariableImpactsParameter.ActualValue = impacts;
+      results["Variable impacts"].Value = impacts;
+      return base.Apply();
+    }
+
+    public static IEnumerable<KeyValuePair<string, double>> CalculateVariableFrequencies(IEnumerable<ISymbolicExpressionTree> trees, bool aggregateLaggedVariables = true) {
+
+      var variableFrequencies = trees
+        .AsParallel()
+        .SelectMany(t => GetVariableReferences(t, aggregateLaggedVariables))
+        .GroupBy(pair => pair.Key, pair => pair.Value)
+        .ToDictionary(g => g.Key, g => (double)g.Sum());
+
+      double totalNumberOfSymbols = variableFrequencies.Values.Sum();
+
+      foreach (var pair in variableFrequencies.OrderBy(p => p.Key, new NaturalStringComparer()))
+        yield return new KeyValuePair<string, double>(pair.Key, pair.Value / totalNumberOfSymbols);
+    }
+
+    private static IEnumerable<KeyValuePair<string, int>> GetVariableReferences(ISymbolicExpressionTree tree, bool aggregateLaggedVariables = true) {
+      Dictionary<string, int> references = new Dictionary<string, int>();
+      if (aggregateLaggedVariables) {
+        tree.Root.ForEachNodePrefix(node => {
+          if (node.Symbol is Variable) {
+            var varNode = node as VariableTreeNode;
+            IncReferenceCount(references, varNode.VariableName);
+          } else if (node.Symbol is VariableCondition) {
+            var varCondNode = node as VariableConditionTreeNode;
+            IncReferenceCount(references, varCondNode.VariableName);
+          }
+        });
+      } else {
+        GetVariableReferences(references, tree.Root, 0);
+      }
+      return references;
+    }
+
+    private static void GetVariableReferences(Dictionary<string, int> references, ISymbolicExpressionTreeNode node, int currentLag) {
+      if (node.Symbol is LaggedVariable) {
+        var laggedVarNode = node as LaggedVariableTreeNode;
+        IncReferenceCount(references, laggedVarNode.VariableName, currentLag + laggedVarNode.Lag);
+      } else if (node.Symbol is Variable) {
+        var varNode = node as VariableTreeNode;
+        IncReferenceCount(references, varNode.VariableName, currentLag);
+      } else if (node.Symbol is VariableCondition) {
+        var varCondNode = node as VariableConditionTreeNode;
+        IncReferenceCount(references, varCondNode.VariableName, currentLag);
+        GetVariableReferences(references, node.GetSubtree(0), currentLag);
+        GetVariableReferences(references, node.GetSubtree(1), currentLag);
+      } else if (node.Symbol is Integral) {
+        var laggedNode = node as LaggedTreeNode;
+        for (int l = laggedNode.Lag; l <= 0; l++) {
+          GetVariableReferences(references, node.GetSubtree(0), currentLag + l);
+        }
+      } else if (node.Symbol is Derivative) {
+        for (int l = -4; l <= 0; l++) {
+          GetVariableReferences(references, node.GetSubtree(0), currentLag + l);
+        }
+      } else if (node.Symbol is TimeLag) {
+        var laggedNode = node as LaggedTreeNode;
+        GetVariableReferences(references, node.GetSubtree(0), currentLag + laggedNode.Lag);
+      } else {
+        foreach (var subtree in node.Subtrees) {
+          GetVariableReferences(references, subtree, currentLag);
+        }
+      }
+    }
+
+    private static void IncReferenceCount(Dictionary<string, int> references, string variableName, int timeLag = 0) {
+      string referenceId = variableName +
+        (timeLag == 0 ? "" : timeLag < 0 ? "(t" + timeLag + ")" : "(t+" + timeLag + ")");
+      if (references.ContainsKey(referenceId)) {
+        references[referenceId]++;
+      } else {
+        references[referenceId] = 1;
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/MultiSymbolicDataAnalysisExpressionCreator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/MultiSymbolicDataAnalysisExpressionCreator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/MultiSymbolicDataAnalysisExpressionCreator.cs	(revision 10269)
@@ -0,0 +1,152 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Creators {
+  public class MultiSymbolicDataAnalysisExpressionCreator : StochasticMultiBranch<ISymbolicDataAnalysisSolutionCreator>,
+    ISymbolicDataAnalysisSolutionCreator,
+    ISymbolicExpressionTreeSizeConstraintOperator,
+  ISymbolicExpressionTreeGrammarBasedOperator {
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
+    private const string ClonedSymbolicExpressionTreeGrammarParameterName = "ClonedSymbolicExpressionTreeGrammar";
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    protected override bool CreateChildOperation {
+      get { return true; }
+    }
+
+    #region parameter properties
+    public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    public IValueLookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionTreeGrammarParameter {
+      get { return (IValueLookupParameter<ISymbolicExpressionGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
+    }
+    public ILookupParameter<ISymbolicExpressionGrammar> ClonedSymbolicExpressionTreeGrammarParameter {
+      get { return (ILookupParameter<ISymbolicExpressionGrammar>)Parameters[ClonedSymbolicExpressionTreeGrammarParameterName]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected MultiSymbolicDataAnalysisExpressionCreator(bool deserializing) : base(deserializing) { }
+    protected MultiSymbolicDataAnalysisExpressionCreator(MultiSymbolicDataAnalysisExpressionCreator original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new MultiSymbolicDataAnalysisExpressionCreator(this, cloner); }
+    public MultiSymbolicDataAnalysisExpressionCreator()
+      : base() {
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree on which the operator should be applied."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
+      Parameters.Add(new ValueLookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName, "The tree grammar that defines the correct syntax of symbolic expression trees that should be created."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(ClonedSymbolicExpressionTreeGrammarParameterName, "An immutable clone of the concrete grammar that is actually used to create and manipulate trees."));
+
+      List<ISymbolicDataAnalysisSolutionCreator> list = new List<ISymbolicDataAnalysisSolutionCreator>();
+      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(ISymbolicDataAnalysisSolutionCreator))) {
+        if (this.GetType().Assembly != type.Assembly) continue;
+        if (typeof(IMultiOperator<ISymbolicDataAnalysisSolutionCreator>).IsAssignableFrom(type)) continue;
+        list.Add((ISymbolicDataAnalysisSolutionCreator)Activator.CreateInstance(type));
+      }
+      CheckedItemList<ISymbolicDataAnalysisSolutionCreator> checkedItemList = new CheckedItemList<ISymbolicDataAnalysisSolutionCreator>();
+      checkedItemList.AddRange(list.OrderBy(op => op.Name));
+      Operators = checkedItemList.AsReadOnly();
+      Operators_ItemsAdded(this, new CollectionItemsChangedEventArgs<IndexedItem<ISymbolicDataAnalysisSolutionCreator>>(Operators.CheckedItems));
+
+    }
+
+    public override IOperation Apply() {
+      if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) {
+        SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true;
+        IScope globalScope = ExecutionContext.Scope;
+        while (globalScope.Parent != null)
+          globalScope = globalScope.Parent;
+
+        globalScope.Variables.Add(new Core.Variable(ClonedSymbolicExpressionTreeGrammarParameterName, (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone()));
+      }
+      return base.Apply();
+    }
+
+    public ISymbolicExpressionTree CreateTree(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth) {
+      double sum = Operators.CheckedItems.Sum(o => Probabilities[o.Index]);
+      if (sum.IsAlmost(0)) throw new InvalidOperationException(Name + ": All selected operators have zero probability.");
+      double r = random.NextDouble() * sum;
+      sum = 0;
+      int index = -1;
+      foreach (var indexedItem in Operators.CheckedItems) {
+        sum += Probabilities[indexedItem.Index];
+        if (sum > r) {
+          index = indexedItem.Index;
+          break;
+        }
+      }
+      return Operators[index].CreateTree(random, grammar, maxTreeLength, maxTreeDepth);
+    }
+
+    protected override void Operators_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<ISymbolicDataAnalysisSolutionCreator>> e) {
+      base.Operators_ItemsReplaced(sender, e);
+      ParameterizeTreeCreators();
+    }
+
+    protected override void Operators_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<ISymbolicDataAnalysisSolutionCreator>> e) {
+      base.Operators_ItemsAdded(sender, e);
+      ParameterizeTreeCreators();
+    }
+    private void ParameterizeTreeCreators() {
+      foreach (IStochasticOperator creator in Operators.OfType<IStochasticOperator>()) {
+        creator.RandomParameter.ActualName = RandomParameter.Name;
+      }
+      foreach (ISymbolicExpressionTreeCreator creator in Operators.OfType<ISymbolicExpressionTreeCreator>()) {
+        creator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name;
+      }
+      foreach (ISymbolicExpressionTreeSizeConstraintOperator creator in Operators.OfType<ISymbolicExpressionTreeSizeConstraintOperator>()) {
+        creator.MaximumSymbolicExpressionTreeDepthParameter.ActualName = MaximumSymbolicExpressionTreeDepthParameter.Name;
+        creator.MaximumSymbolicExpressionTreeLengthParameter.ActualName = MaximumSymbolicExpressionTreeLengthParameter.Name;
+      }
+
+      foreach (ISymbolicExpressionTreeGrammarBasedOperator creator in Operators.OfType<ISymbolicExpressionTreeGrammarBasedOperator>()) {
+        creator.SymbolicExpressionTreeGrammarParameter.ActualName = SymbolicExpressionTreeGrammarParameter.Name;
+      }
+    }
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/SymbolicDataAnalysisExpressionFullTreeCreator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/SymbolicDataAnalysisExpressionFullTreeCreator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/SymbolicDataAnalysisExpressionFullTreeCreator.cs	(revision 10269)
@@ -0,0 +1,40 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("FullTreeCreator", "An operator that creates new symbolic expression trees using the 'Full' method")]
+  public class SymbolicDataAnalysisExpressionFullTreeCreator : FullTreeCreator, ISymbolicDataAnalysisSolutionCreator {
+    [StorableConstructor]
+    protected SymbolicDataAnalysisExpressionFullTreeCreator(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisExpressionFullTreeCreator(SymbolicDataAnalysisExpressionFullTreeCreator original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new SymbolicDataAnalysisExpressionFullTreeCreator(this, cloner); }
+
+    public SymbolicDataAnalysisExpressionFullTreeCreator() : base() { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/SymbolicDataAnalysisExpressionGrowTreeCreator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/SymbolicDataAnalysisExpressionGrowTreeCreator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/SymbolicDataAnalysisExpressionGrowTreeCreator.cs	(revision 10269)
@@ -0,0 +1,40 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using System;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("GrowTreeCreator", "An operator that creates new symbolic expression trees using the 'Grow' method")]
+  public class SymbolicDataAnalysisExpressionGrowTreeCreator : GrowTreeCreator, ISymbolicDataAnalysisSolutionCreator {
+    [StorableConstructor]
+    protected SymbolicDataAnalysisExpressionGrowTreeCreator(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisExpressionGrowTreeCreator(SymbolicDataAnalysisExpressionGrowTreeCreator original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new SymbolicDataAnalysisExpressionGrowTreeCreator(this, cloner); }
+
+    public SymbolicDataAnalysisExpressionGrowTreeCreator() : base() { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/SymbolicDataAnalysisExpressionRampedHalfAndHalfTreeCreator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/SymbolicDataAnalysisExpressionRampedHalfAndHalfTreeCreator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/SymbolicDataAnalysisExpressionRampedHalfAndHalfTreeCreator.cs	(revision 10269)
@@ -0,0 +1,40 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using System;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("RampedHalfAndHalfTreeCreator", "An operator that creates new symbolic expression trees in an alternate way: half the trees are created usign the 'Grow' method while the other half are created using the 'Full' method")]
+  public class SymbolicDataAnalysisExpressionRampedHalfAndHalfTreeCreator : RampedHalfAndHalfTreeCreator, ISymbolicDataAnalysisSolutionCreator {
+    [StorableConstructor]
+    protected SymbolicDataAnalysisExpressionRampedHalfAndHalfTreeCreator(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisExpressionRampedHalfAndHalfTreeCreator(SymbolicDataAnalysisExpressionRampedHalfAndHalfTreeCreator original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new SymbolicDataAnalysisExpressionRampedHalfAndHalfTreeCreator(this, cloner); }
+
+    public SymbolicDataAnalysisExpressionRampedHalfAndHalfTreeCreator() : base() { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/SymbolicDataAnalysisExpressionTreeCreator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/SymbolicDataAnalysisExpressionTreeCreator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/SymbolicDataAnalysisExpressionTreeCreator.cs	(revision 10269)
@@ -0,0 +1,38 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("ProbabilisticTreeCreator", "An operator that creates new symbolic expression trees with uniformly distributed length")]
+  public class SymbolicDataAnalysisExpressionTreeCreator : ProbabilisticTreeCreator, ISymbolicDataAnalysisSolutionCreator {
+    [StorableConstructor]
+    protected SymbolicDataAnalysisExpressionTreeCreator(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisExpressionTreeCreator(SymbolicDataAnalysisExpressionTreeCreator original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new SymbolicDataAnalysisExpressionTreeCreator(this, cloner); }
+
+    public SymbolicDataAnalysisExpressionTreeCreator() : base() { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/MultiSymbolicDataAnalysisExpressionCrossover.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/MultiSymbolicDataAnalysisExpressionCrossover.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/MultiSymbolicDataAnalysisExpressionCrossover.cs	(revision 10269)
@@ -0,0 +1,177 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("MultiSymbolicDataAnalysisExpressionCrossover", "Randomly selects and applies one of its crossovers every time it is called.")]
+  public class MultiSymbolicDataAnalysisExpressionCrossover<T> : StochasticMultiBranch<ISymbolicExpressionTreeCrossover>,
+    ISymbolicDataAnalysisExpressionCrossover<T> where T : class, IDataAnalysisProblemData {
+    private const string ParentsParameterName = "Parents";
+    private const string ChildParameterName = "Child";
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+    private const string EvaluatorParameterName = "Evaluator";
+    private const string SymbolicDataAnalysisEvaluationPartitionParameterName = "EvaluationPartition";
+    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
+    private const string ProblemDataParameterName = "ProblemData";
+
+    protected override bool CreateChildOperation {
+      get { return true; }
+    }
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+
+    #region parameter properties
+    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
+    }
+    public ILookupParameter<ItemArray<ISymbolicExpressionTree>> ParentsParameter {
+      get { return (ScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[ParentsParameterName]; }
+    }
+    public ILookupParameter<ISymbolicExpressionTree> ChildParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[ChildParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    public ILookupParameter<ISymbolicDataAnalysisSingleObjectiveEvaluator<T>> EvaluatorParameter {
+      get { return (ILookupParameter<ISymbolicDataAnalysisSingleObjectiveEvaluator<T>>)Parameters[EvaluatorParameterName]; }
+    }
+    public IValueLookupParameter<IntRange> EvaluationPartitionParameter {
+      get { return (IValueLookupParameter<IntRange>)Parameters[SymbolicDataAnalysisEvaluationPartitionParameterName]; }
+    }
+    public IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
+      get { return (IValueLookupParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
+    }
+    public IValueLookupParameter<T> ProblemDataParameter {
+      get { return (IValueLookupParameter<T>)Parameters[ProblemDataParameterName]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected MultiSymbolicDataAnalysisExpressionCrossover(bool deserializing) : base(deserializing) { }
+    protected MultiSymbolicDataAnalysisExpressionCrossover(MultiSymbolicDataAnalysisExpressionCrossover<T> original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new MultiSymbolicDataAnalysisExpressionCrossover<T>(this, cloner); }
+    public MultiSymbolicDataAnalysisExpressionCrossover()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index."));
+      Parameters.Add(new ValueLookupParameter<T>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic data analysis tree."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisSingleObjectiveEvaluator<T>>(EvaluatorParameterName, "The single objective solution evaluator"));
+      Parameters.Add(new ValueLookupParameter<IntRange>(SymbolicDataAnalysisEvaluationPartitionParameterName, "The start index of the dataset partition on which the symbolic data analysis solution should be evaluated."));
+      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(ParentsParameterName, "The parent symbolic expression trees which should be crossed."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(ChildParameterName, "The child symbolic expression tree resulting from the crossover."));
+
+      EvaluatorParameter.Hidden = true;
+      EvaluationPartitionParameter.Hidden = true;
+      SymbolicDataAnalysisTreeInterpreterParameter.Hidden = true;
+      ProblemDataParameter.Hidden = true;
+      RelativeNumberOfEvaluatedSamplesParameter.Hidden = true;
+
+      InitializeOperators();
+      name = "MultiSymbolicDataAnalysisExpressionCrossover";
+    }
+
+    private void InitializeOperators() {
+      var list = ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeCrossover>().ToList();
+      var dataAnalysisCrossovers = from type in ApplicationManager.Manager.GetTypes(typeof(ISymbolicDataAnalysisExpressionCrossover<T>))
+                                   where this.GetType().Assembly == type.Assembly
+                                   where !typeof(IMultiOperator<ISymbolicExpressionTreeCrossover>).IsAssignableFrom(type)
+                                   select (ISymbolicDataAnalysisExpressionCrossover<T>)Activator.CreateInstance(type);
+      list.AddRange(dataAnalysisCrossovers);
+
+      var checkedItemList = new CheckedItemList<ISymbolicExpressionTreeCrossover>();
+      checkedItemList.AddRange(list.OrderBy(op => op.Name));
+      Operators = checkedItemList;
+      Operators_ItemsAdded(this, new CollectionItemsChangedEventArgs<IndexedItem<ISymbolicExpressionTreeCrossover>>(Operators.CheckedItems));
+    }
+
+    public ISymbolicExpressionTree Crossover(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1) {
+      double sum = Operators.CheckedItems.Sum(o => Probabilities[o.Index]);
+      if (sum.IsAlmost(0)) throw new InvalidOperationException(Name + ": All selected operators have zero probability.");
+      double r = random.NextDouble() * sum;
+      sum = 0;
+      int index = -1;
+      foreach (var indexedItem in Operators.CheckedItems) {
+        sum += Probabilities[indexedItem.Index];
+        if (sum > r) {
+          index = indexedItem.Index;
+          break;
+        }
+      }
+      return Operators[index].Crossover(random, parent0, parent1);
+    }
+
+    protected override void Operators_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<ISymbolicExpressionTreeCrossover>> e) {
+      base.Operators_ItemsReplaced(sender, e);
+      ParameterizeCrossovers();
+    }
+
+    protected override void Operators_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<ISymbolicExpressionTreeCrossover>> e) {
+      base.Operators_ItemsAdded(sender, e);
+      ParameterizeCrossovers();
+    }
+
+    private void ParameterizeCrossovers() {
+      foreach (ISymbolicExpressionTreeCrossover op in Operators) {
+        op.ChildParameter.ActualName = ChildParameter.Name;
+        op.ParentsParameter.ActualName = ParentsParameter.Name;
+      }
+      foreach (IStochasticOperator op in Operators.OfType<IStochasticOperator>()) {
+        op.RandomParameter.ActualName = RandomParameter.Name;
+      }
+      foreach (ISymbolicExpressionTreeSizeConstraintOperator op in Operators.OfType<ISymbolicExpressionTreeSizeConstraintOperator>()) {
+        op.MaximumSymbolicExpressionTreeDepthParameter.ActualName = MaximumSymbolicExpressionTreeDepthParameter.Name;
+        op.MaximumSymbolicExpressionTreeLengthParameter.ActualName = MaximumSymbolicExpressionTreeLengthParameter.Name;
+      }
+
+      foreach (ISymbolicDataAnalysisInterpreterOperator op in Operators.OfType<ISymbolicDataAnalysisInterpreterOperator>()) {
+        op.SymbolicDataAnalysisTreeInterpreterParameter.ActualName = SymbolicDataAnalysisTreeInterpreterParameter.Name;
+      }
+      foreach (var op in Operators.OfType<ISymbolicDataAnalysisExpressionCrossover<T>>()) {
+        op.ProblemDataParameter.ActualName = ProblemDataParameter.Name;
+        op.EvaluationPartitionParameter.ActualName = EvaluationPartitionParameter.Name;
+        op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;
+        op.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionContextAwareCrossover.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionContextAwareCrossover.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionContextAwareCrossover.cs	(revision 10269)
@@ -0,0 +1,112 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("ContextAwareCrossover", "An operator which deterministically choses the best insertion point for a randomly selected node:\n" +
+                                 "- Take two parent individuals P0 and P1\n" +
+                                 "- Randomly choose a node N from P1\n" +
+                                 "- Test all crossover points from P0 to determine the best location for N to be inserted")]
+  public sealed class SymbolicDataAnalysisExpressionContextAwareCrossover<T> : SymbolicDataAnalysisExpressionCrossover<T> where T : class, IDataAnalysisProblemData {
+    [StorableConstructor]
+    private SymbolicDataAnalysisExpressionContextAwareCrossover(bool deserializing) : base(deserializing) { }
+    private SymbolicDataAnalysisExpressionContextAwareCrossover(SymbolicDataAnalysisExpressionCrossover<T> original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public SymbolicDataAnalysisExpressionContextAwareCrossover()
+      : base() {
+      name = "ContextAwareCrossover";
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisExpressionContextAwareCrossover<T>(this, cloner);
+    }
+    public override ISymbolicExpressionTree Crossover(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1) {
+      if (this.ExecutionContext == null)
+        throw new InvalidOperationException("ExecutionContext not set.");
+      List<int> rows = GenerateRowsToEvaluate().ToList();
+      T problemData = ProblemDataParameter.ActualValue;
+      ISymbolicDataAnalysisSingleObjectiveEvaluator<T> evaluator = EvaluatorParameter.ActualValue;
+
+      return Cross(random, parent0, parent1, this.ExecutionContext, evaluator, problemData, rows, MaximumSymbolicExpressionTreeDepth.Value, MaximumSymbolicExpressionTreeLength.Value);
+    }
+
+    /// <summary>
+    /// Takes two parent individuals P0 and P1. 
+    /// Randomly choose a node i from the second parent, then test all possible crossover points from the first parent to determine the best location for i to be inserted.
+    /// </summary>
+    public static ISymbolicExpressionTree Cross(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1, IExecutionContext context,
+                                                ISymbolicDataAnalysisSingleObjectiveEvaluator<T> evaluator, T problemData, List<int> rows, int maxDepth, int maxLength) {
+      // randomly choose a node from the second parent
+      var possibleChildren = new List<ISymbolicExpressionTreeNode>();
+      parent1.Root.ForEachNodePostfix((n) => {
+        if (n.Parent != null && n.Parent != parent1.Root)
+          possibleChildren.Add(n);
+      });
+      var selectedChild = possibleChildren.SelectRandom(random);
+      var crossoverPoints = new List<CutPoint>();
+      var qualities = new List<Tuple<CutPoint, double>>();
+
+      parent0.Root.ForEachNodePostfix((n) => {
+        if (n.Parent != null && n.Parent != parent0.Root) {
+          var totalDepth = parent0.Root.GetBranchLevel(n) + selectedChild.GetDepth();
+          var totalLength = parent0.Root.GetLength() - n.GetLength() + selectedChild.GetLength();
+          if (totalDepth <= maxDepth && totalLength <= maxLength) {
+            var crossoverPoint = new CutPoint(n.Parent, n);
+            if (crossoverPoint.IsMatchingPointType(selectedChild))
+              crossoverPoints.Add(crossoverPoint);
+          }
+        }
+      });
+
+      if (crossoverPoints.Any()) {
+        // this loop will perform two swap operations per each crossover point
+        foreach (var crossoverPoint in crossoverPoints) {
+          // save the old parent so we can restore it later
+          var parent = selectedChild.Parent;
+          // perform a swap and check the quality of the solution
+          Swap(crossoverPoint, selectedChild);
+          IExecutionContext childContext = new ExecutionContext(context, evaluator, context.Scope);
+          double quality = evaluator.Evaluate(childContext, parent0, problemData, rows);
+          qualities.Add(new Tuple<CutPoint, double>(crossoverPoint, quality));
+          // restore the correct parent
+          selectedChild.Parent = parent;
+          // swap the replaced subtree back into the tree so that the structure is preserved
+          Swap(crossoverPoint, crossoverPoint.Child);
+        }
+
+        qualities.Sort((a, b) => a.Item2.CompareTo(b.Item2)); // assuming this sorts the list in ascending order
+        var crossoverPoint0 = evaluator.Maximization ? qualities.Last().Item1 : qualities.First().Item1;
+        // swap the node that would create the best offspring
+        // this last swap makes a total of (2 * crossoverPoints.Count() + 1) swap operations.
+        Swap(crossoverPoint0, selectedChild);
+      }
+
+      return parent0;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionCrossover.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionCrossover.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionCrossover.cs	(revision 10269)
@@ -0,0 +1,160 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public abstract class SymbolicDataAnalysisExpressionCrossover<T> : SymbolicExpressionTreeCrossover, ISymbolicDataAnalysisExpressionCrossover<T> where T : class, IDataAnalysisProblemData {
+    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string EvaluatorParameterName = "Evaluator";
+    private const string EvaluationPartitionParameterName = "EvaluationPartition";
+    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+
+    #region Parameter properties
+    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
+    }
+    public IValueLookupParameter<T> ProblemDataParameter {
+      get { return (IValueLookupParameter<T>)Parameters[ProblemDataParameterName]; }
+    }
+    public ILookupParameter<ISymbolicDataAnalysisSingleObjectiveEvaluator<T>> EvaluatorParameter {
+      get { return (ILookupParameter<ISymbolicDataAnalysisSingleObjectiveEvaluator<T>>)Parameters[EvaluatorParameterName]; }
+    }
+    public IValueLookupParameter<IntRange> EvaluationPartitionParameter {
+      get { return (IValueLookupParameter<IntRange>)Parameters[EvaluationPartitionParameterName]; }
+    }
+    public IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
+      get { return (IValueLookupParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    #endregion
+
+    #region Properties
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
+    }
+    public IntValue MaximumSymbolicExpressionTreeDepth {
+      get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisExpressionCrossover(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisExpressionCrossover(SymbolicDataAnalysisExpressionCrossover<T> original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public SymbolicDataAnalysisExpressionCrossover()
+      : base() {
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic data analysis tree."));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisSingleObjectiveEvaluator<T>>(EvaluatorParameterName, "The single objective solution evaluator"));
+      Parameters.Add(new ValueLookupParameter<T>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
+      Parameters.Add(new ValueLookupParameter<IntRange>(EvaluationPartitionParameterName, "The start index of the dataset partition on which the symbolic data analysis solution should be evaluated."));
+      Parameters.Add(new ValueLookupParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximum tree depth."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximum tree length."));
+
+      EvaluatorParameter.Hidden = true;
+      EvaluationPartitionParameter.Hidden = true;
+      SymbolicDataAnalysisTreeInterpreterParameter.Hidden = true;
+      ProblemDataParameter.Hidden = true;
+      RelativeNumberOfEvaluatedSamplesParameter.Hidden = true;
+    }
+
+    /// <summary>
+    /// Creates a SymbolicExpressionTreeNode reusing the root and start symbols (since they are expensive to create).
+    /// </summary>
+    /// <param name="random"></param>
+    /// <param name="node"></param>
+    /// <param name="rootSymbol"></param>
+    /// <param name="startSymbol"></param>
+    /// <returns></returns>
+    protected static ISymbolicExpressionTree CreateTreeFromNode(IRandom random, ISymbolicExpressionTreeNode node, ISymbol rootSymbol, ISymbol startSymbol) {
+      var rootNode = new SymbolicExpressionTreeTopLevelNode(rootSymbol);
+      if (rootNode.HasLocalParameters) rootNode.ResetLocalParameters(random);
+
+      var startNode = new SymbolicExpressionTreeTopLevelNode(startSymbol);
+      if (startNode.HasLocalParameters) startNode.ResetLocalParameters(random);
+
+      startNode.AddSubtree(node);
+      rootNode.AddSubtree(startNode);
+
+      return new SymbolicExpressionTree(rootNode);
+    }
+
+    protected IEnumerable<int> GenerateRowsToEvaluate() {
+      return GenerateRowsToEvaluate(RelativeNumberOfEvaluatedSamplesParameter.ActualValue.Value);
+    }
+
+    protected IEnumerable<int> GenerateRowsToEvaluate(double percentageOfRows) {
+      IEnumerable<int> rows;
+      int samplesStart = EvaluationPartitionParameter.ActualValue.Start;
+      int samplesEnd = EvaluationPartitionParameter.ActualValue.End;
+      int testPartitionStart = ProblemDataParameter.ActualValue.TestPartition.Start;
+      int testPartitionEnd = ProblemDataParameter.ActualValue.TestPartition.End;
+
+      if (samplesEnd < samplesStart) throw new ArgumentException("Start value is larger than end value.");
+
+      if (percentageOfRows.IsAlmost(1.0))
+        rows = Enumerable.Range(samplesStart, samplesEnd - samplesStart);
+      else {
+        int seed = RandomParameter.ActualValue.Next();
+        int count = (int)((samplesEnd - samplesStart) * percentageOfRows);
+        if (count == 0) count = 1;
+        rows = RandomEnumerable.SampleRandomNumbers(seed, samplesStart, samplesEnd, count);
+      }
+
+      return rows.Where(i => i < testPartitionStart || testPartitionEnd <= i);
+    }
+
+    protected static void Swap(CutPoint crossoverPoint, ISymbolicExpressionTreeNode selectedBranch) {
+      if (crossoverPoint.Child != null) {
+        // manipulate the tree of parent0 in place
+        // replace the branch in tree0 with the selected branch from tree1
+        crossoverPoint.Parent.RemoveSubtree(crossoverPoint.ChildIndex);
+        if (selectedBranch != null) {
+          crossoverPoint.Parent.InsertSubtree(crossoverPoint.ChildIndex, selectedBranch);
+        }
+      } else {
+        // child is null (additional child should be added under the parent)
+        if (selectedBranch != null) {
+          crossoverPoint.Parent.AddSubtree(selectedBranch);
+        }
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionDepthConstrainedCrossover.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionDepthConstrainedCrossover.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionDepthConstrainedCrossover.cs	(revision 10269)
@@ -0,0 +1,142 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("DepthConstrainedCrossover", "An operator which performs subtree swapping within a specific depth range. The range parameter controls the crossover behavior:\n" +
+                                     "- HighLevel (upper 25% of the tree)\n" +
+                                     "- Standard (mid 50% of the tree)\n" +
+                                     "- LowLevel (lower 25% of the tree)")]
+  public sealed class SymbolicDataAnalysisExpressionDepthConstrainedCrossover<T> :
+    SymbolicDataAnalysisExpressionCrossover<T> where T : class, IDataAnalysisProblemData {
+    private enum Ranges { HighLevel, Standard, LowLevel };
+    private const string DepthRangeParameterName = "DepthRange";
+
+    #region Parameter properties
+    public IConstrainedValueParameter<StringValue> DepthRangeParameter {
+      get { return (IConstrainedValueParameter<StringValue>)Parameters[DepthRangeParameterName]; }
+    }
+    #endregion
+
+    #region Properties
+    public StringValue DepthRange {
+      get { return (StringValue)DepthRangeParameter.ActualValue; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private SymbolicDataAnalysisExpressionDepthConstrainedCrossover(bool deserializing) : base(deserializing) { }
+    private SymbolicDataAnalysisExpressionDepthConstrainedCrossover(SymbolicDataAnalysisExpressionCrossover<T> original, Cloner cloner)
+      : base(original, cloner) { }
+    public SymbolicDataAnalysisExpressionDepthConstrainedCrossover()
+      : base() {
+      Parameters.Add(new ConstrainedValueParameter<StringValue>(DepthRangeParameterName, "Depth range specifier"));
+      DepthRangeParameter.ValidValues.Add(new StringValue(Enum.GetName(typeof(Ranges), Ranges.HighLevel)).AsReadOnly());
+      DepthRangeParameter.ValidValues.Add(new StringValue(Enum.GetName(typeof(Ranges), Ranges.Standard)).AsReadOnly());
+      DepthRangeParameter.ValidValues.Add(new StringValue(Enum.GetName(typeof(Ranges), Ranges.LowLevel)).AsReadOnly());
+      name = "DepthConstrainedCrossover";
+    }
+    public override IDeepCloneable Clone(Cloner cloner) { return new SymbolicDataAnalysisExpressionDepthConstrainedCrossover<T>(this, cloner); }
+
+    public override ISymbolicExpressionTree Crossover(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1) {
+      return Cross(random, parent0, parent1, MaximumSymbolicExpressionTreeDepth.Value, MaximumSymbolicExpressionTreeLength.Value, DepthRange.Value);
+    }
+
+
+    /// <summary>
+    /// Takes two parent individuals P0 and P1. 
+    /// Randomly choose nodes that fall within the specified depth range in both parents.
+    /// </summary>
+    /// <param name="random">Pseudo-random number generator.</param>
+    /// <param name="parent0">First parent.</param>
+    /// <param name="parent1">Second parent.</param>
+    /// <param name="maxDepth">Maximum allowed length depth.</param>
+    /// <param name="maxLength">Maximum allowed tree length.</param>
+    /// <param name="mode">Controls the crossover behavior: 
+    /// - HighLevel (upper 25% of the tree),
+    /// - Standard (mid 50%)
+    /// - LowLevel (low 25%)</param>
+    /// <returns></returns>
+    public static ISymbolicExpressionTree Cross(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1, int maxDepth, int maxLength, string mode) {
+      int depth = parent0.Root.GetDepth() - 1; // substract 1 because the tree levels are counted from 0 
+      var depthRange = new IntRange();
+      const int depthOffset = 2; // skip the first 2 levels (root + startNode)
+      switch ((Ranges)Enum.Parse(typeof(Ranges), mode)) {
+        case Ranges.HighLevel:
+          depthRange.Start = depthOffset; // skip the first 2 levels (root + startNode)
+          depthRange.End = depthRange.Start + (int)Math.Round(depth * 0.25);
+          break;
+        case Ranges.Standard:
+          depthRange.Start = depthOffset + (int)Math.Round(depth * 0.25);
+          depthRange.End = depthRange.Start + (int)Math.Round(depth * 0.5);
+          break;
+        case Ranges.LowLevel:
+          depthRange.Start = depthOffset + (int)Math.Round(depth * 0.75);
+          depthRange.End = Math.Max(depthRange.Start, depth);
+          break;
+      }
+
+      // make sure that the depth range does not exceeded the actual depth of parent0
+      if (depthRange.Start > depth)
+        depthRange.Start = depth;
+      if (depthRange.End < depthRange.Start)
+        depthRange.End = depthRange.Start;
+
+      var crossoverPoints0 = (from node in GetNodesAtDepth(parent0, depthRange) select new CutPoint(node.Parent, node)).ToList();
+
+      if (crossoverPoints0.Count == 0)
+        throw new Exception("No crossover points available in the first parent");
+
+      var crossoverPoint0 = crossoverPoints0.SelectRandom(random);
+
+      int level = parent0.Root.GetBranchLevel(crossoverPoint0.Child);
+      int length = parent0.Root.GetLength() - crossoverPoint0.Child.GetLength();
+
+      var allowedBranches = (from s in GetNodesAtDepth(parent1, depthRange)
+                             where s.GetDepth() + level <= maxDepth
+                             where s.GetLength() + length <= maxLength
+                             where crossoverPoint0.IsMatchingPointType(s)
+                             select s).ToList();
+      if (allowedBranches.Count == 0) return parent0;
+      var selectedBranch = allowedBranches.SelectRandom(random);
+      Swap(crossoverPoint0, selectedBranch);
+      return parent0;
+    }
+
+    private static IEnumerable<ISymbolicExpressionTreeNode> GetNodesAtDepth(ISymbolicExpressionTree tree, IntRange depthRange) {
+      var treeDepth = tree.Root.GetDepth();
+      return from node in tree.Root.IterateNodesPostfix()
+             let depth = treeDepth - node.GetDepth()
+             where depthRange.Start <= depth
+             where depth <= depthRange.End
+             select node;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionDeterministicBestCrossover.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionDeterministicBestCrossover.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionDeterministicBestCrossover.cs	(revision 10269)
@@ -0,0 +1,107 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("DeterministicBestCrossover", "An operator which performs subtree swapping by choosing the best subtree to be swapped in a certain position:\n" +
+                                      "- Take two parent individuals P0 and P1\n" +
+                                      "- Randomly choose a crossover point C from P0\n" +
+                                      "- Test all nodes from P1 to determine the one that produces the best child when inserted at place C in P0")]
+  public sealed class SymbolicDataAnalysisExpressionDeterministicBestCrossover<T> : SymbolicDataAnalysisExpressionCrossover<T> where T : class, IDataAnalysisProblemData {
+    [StorableConstructor]
+    private SymbolicDataAnalysisExpressionDeterministicBestCrossover(bool deserializing) : base(deserializing) { }
+    private SymbolicDataAnalysisExpressionDeterministicBestCrossover(SymbolicDataAnalysisExpressionCrossover<T> original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public SymbolicDataAnalysisExpressionDeterministicBestCrossover()
+      : base() {
+      name = "DeterministicBestCrossover";
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisExpressionDeterministicBestCrossover<T>(this, cloner);
+    }
+    public override ISymbolicExpressionTree Crossover(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1) {
+      if (this.ExecutionContext == null)
+        throw new InvalidOperationException("ExecutionContext not set.");
+      List<int> rows = GenerateRowsToEvaluate().ToList();
+      T problemData = ProblemDataParameter.ActualValue;
+      ISymbolicDataAnalysisSingleObjectiveEvaluator<T> evaluator = EvaluatorParameter.ActualValue;
+
+      return Cross(random, parent0, parent1, this.ExecutionContext, evaluator, problemData, rows, MaximumSymbolicExpressionTreeDepth.Value, MaximumSymbolicExpressionTreeLength.Value);
+    }
+
+    /// <summary>
+    /// Takes two parent individuals P0 and P1. 
+    /// Randomly choose a node i from the first parent, then test all nodes j from the second parent to determine the best child that would be obtained by swapping i for j.
+    /// </summary>
+    public static ISymbolicExpressionTree Cross(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1, IExecutionContext context,
+                                                ISymbolicDataAnalysisSingleObjectiveEvaluator<T> evaluator, T problemData, List<int> rows, int maxDepth, int maxLength) {
+      var crossoverPoints0 = new List<CutPoint>();
+      parent0.Root.ForEachNodePostfix((n) => {
+        if (n.Parent != null && n.Parent != parent0.Root)
+          crossoverPoints0.Add(new CutPoint(n.Parent, n));
+      });
+      CutPoint crossoverPoint0 = crossoverPoints0.SelectRandom(random);
+      int level = parent0.Root.GetBranchLevel(crossoverPoint0.Child);
+      int length = parent0.Root.GetLength() - crossoverPoint0.Child.GetLength();
+
+      var allowedBranches = new List<ISymbolicExpressionTreeNode>();
+      parent1.Root.ForEachNodePostfix((n) => {
+        if (n.Parent != null && n.Parent != parent1.Root) {
+          if (n.GetDepth() + level <= maxDepth && n.GetLength() + length <= maxLength && crossoverPoint0.IsMatchingPointType(n))
+            allowedBranches.Add(n);
+        }
+      });
+
+      if (allowedBranches.Count == 0)
+        return parent0;
+
+      // create symbols in order to improvize an ad-hoc tree so that the child can be evaluated
+      ISymbolicExpressionTreeNode selectedBranch = null;
+      var nodeQualities = new List<Tuple<ISymbolicExpressionTreeNode, double>>();
+      var originalChild = crossoverPoint0.Child;
+
+      foreach (var node in allowedBranches) {
+        var parent = node.Parent;
+        Swap(crossoverPoint0, node); // the swap will set the nodes parent to crossoverPoint0.Parent
+        IExecutionContext childContext = new ExecutionContext(context, evaluator, context.Scope);
+        double quality = evaluator.Evaluate(childContext, parent0, problemData, rows);
+        Swap(crossoverPoint0, originalChild); // swap the child back (so that the next swap will not affect the currently swapped node from parent1)
+        nodeQualities.Add(new Tuple<ISymbolicExpressionTreeNode, double>(node, quality));
+        node.Parent = parent; // restore correct parent
+      }
+
+      nodeQualities.Sort((a, b) => a.Item2.CompareTo(b.Item2));
+      selectedBranch = evaluator.Maximization ? nodeQualities.Last().Item1 : nodeQualities.First().Item1;
+
+      // swap the node that would create the best offspring
+      Swap(crossoverPoint0, selectedBranch);
+      return parent0;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossover.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossover.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossover.cs	(revision 10269)
@@ -0,0 +1,145 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("ProbabilisticFunctionalCrossover", "An operator which performs subtree swapping based on the behavioral similarity between subtrees:\n" +
+                                            "- Take two parent individuals P0 and P1\n" +
+                                            "- Randomly choose a node N from P0\n" +
+                                            "- For each matching node M from P1, calculate the behavioral distance:\n" +
+                                            "\t\tD(N,M) = 0.5 * ( abs(max(N) - max(M)) + abs(min(N) - min(M)) )\n" +
+                                            "- Make a probabilistic weighted choice of node M from P1, based on the inversed and normalized behavioral distance")]
+  public sealed class SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossover<T> : SymbolicDataAnalysisExpressionCrossover<T> where T : class, IDataAnalysisProblemData {
+    [StorableConstructor]
+    private SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossover(bool deserializing) : base(deserializing) { }
+    private SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossover(SymbolicDataAnalysisExpressionCrossover<T> original, Cloner cloner)
+      : base(original, cloner) { }
+    public SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossover()
+      : base() {
+      name = "ProbabilisticFunctionalCrossover";
+    }
+    public override IDeepCloneable Clone(Cloner cloner) { return new SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossover<T>(this, cloner); }
+
+    public override ISymbolicExpressionTree Crossover(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1) {
+      ISymbolicDataAnalysisExpressionTreeInterpreter interpreter = SymbolicDataAnalysisTreeInterpreterParameter.ActualValue;
+      List<int> rows = GenerateRowsToEvaluate().ToList();
+      T problemData = ProblemDataParameter.ActualValue;
+      return Cross(random, parent0, parent1, interpreter, problemData,
+                   rows, MaximumSymbolicExpressionTreeDepth.Value, MaximumSymbolicExpressionTreeLength.Value);
+    }
+
+    /// <summary>
+    /// Takes two parent individuals P0 and P1. 
+    /// Randomly choose a node i from the first parent, then for each matching node j from the second parent, calculate the behavioral distance based on the range:
+    /// d(i,j) = 0.5 * ( abs(max(i) - max(j)) + abs(min(i) - min(j)) ).
+    /// Next, assign probabilities for the selection of a node j based on the inversed and normalized behavioral distance, then make a random weighted choice.
+    /// </summary>
+    public static ISymbolicExpressionTree Cross(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1,
+                                                ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, T problemData, IList<int> rows, int maxDepth, int maxLength) {
+      var crossoverPoints0 = new List<CutPoint>();
+      parent0.Root.ForEachNodePostfix((n) => {
+        // the if clauses prevent the root or the startnode from being selected, although the startnode can be the parent of the node being swapped.
+        if (n.Parent != null && n.Parent != parent0.Root) {
+          crossoverPoints0.Add(new CutPoint(n.Parent, n));
+        }
+      });
+      var crossoverPoint0 = crossoverPoints0.SelectRandom(random);
+      int level = parent0.Root.GetBranchLevel(crossoverPoint0.Child);
+      int length = parent0.Root.GetLength() - crossoverPoint0.Child.GetLength();
+
+      var allowedBranches = new List<ISymbolicExpressionTreeNode>();
+      parent1.Root.ForEachNodePostfix((n) => {
+        if (n.Parent != null && n.Parent != parent1.Root) {
+          if (n.GetDepth() + level <= maxDepth && n.GetLength() + length <= maxLength && crossoverPoint0.IsMatchingPointType(n))
+            allowedBranches.Add(n);
+        }
+      });
+
+      if (allowedBranches.Count == 0)
+        return parent0;
+
+      var dataset = problemData.Dataset;
+
+      // create symbols in order to improvize an ad-hoc tree so that the child can be evaluated
+      var rootSymbol = new ProgramRootSymbol();
+      var startSymbol = new StartSymbol();
+      var tree0 = CreateTreeFromNode(random, crossoverPoint0.Child, rootSymbol, startSymbol); // this will change crossoverPoint0.Child.Parent
+      double min0 = 0.0, max0 = 0.0;
+      foreach (double v in interpreter.GetSymbolicExpressionTreeValues(tree0, dataset, rows)) {
+        if (min0 > v) min0 = v;
+        if (max0 < v) max0 = v;
+      }
+      crossoverPoint0.Child.Parent = crossoverPoint0.Parent; // restore correct parent 
+
+      var weights = new List<double>();
+      foreach (var node in allowedBranches) {
+        var parent = node.Parent;
+        var tree1 = CreateTreeFromNode(random, node, rootSymbol, startSymbol);
+        double min1 = 0.0, max1 = 0.0;
+        foreach (double v in interpreter.GetSymbolicExpressionTreeValues(tree1, dataset, rows)) {
+          if (min1 > v) min1 = v;
+          if (max1 < v) max1 = v;
+        }
+        double behavioralDistance = (Math.Abs(min0 - min1) + Math.Abs(max0 - max1)) / 2; // this can be NaN of Infinity because some trees are crazy like exp(exp(exp(...))), we correct that below
+        weights.Add(behavioralDistance);
+        node.Parent = parent; // restore correct node parent
+      }
+
+      // remove branches with an infinite or NaN behavioral distance
+      for (int i = weights.Count - 1; i >= 0; --i) {
+        if (Double.IsNaN(weights[i]) || Double.IsInfinity(weights[i])) {
+          weights.RemoveAt(i);
+          allowedBranches.RemoveAt(i);
+        }
+      }
+      // check if there are any allowed branches left
+      if (allowedBranches.Count == 0)
+        return parent0;
+
+      ISymbolicExpressionTreeNode selectedBranch;
+      double sum = weights.Sum();
+
+      if (sum.IsAlmost(0.0) || weights.Count == 1) // if there is only one allowed branch, or if all weights are zero
+        selectedBranch = allowedBranches[0];
+      else {
+        for (int i = 0; i != weights.Count; ++i) // normalize and invert values
+          weights[i] = 1 - weights[i] / sum;
+
+        sum = weights.Sum(); // take new sum
+
+        // compute the probabilities (selection weights)
+        for (int i = 0; i != weights.Count; ++i)
+          weights[i] /= sum;
+
+        selectedBranch = allowedBranches.SelectRandom(weights, random);
+      }
+      Swap(crossoverPoint0, selectedBranch);
+      return parent0;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionSemanticSimilarityCrossover.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionSemanticSimilarityCrossover.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionSemanticSimilarityCrossover.cs	(revision 10269)
@@ -0,0 +1,130 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("SemanticSimilarityCrossover", "An operator which performs subtree swapping based on the notion semantic similarity between subtrees\n" +
+                                       "(criteria: mean of the absolute differences between the estimated output values of the two subtrees, falling into a user-defined range)\n" +
+                                       "- Take two parent individuals P0 and P1\n" +
+                                       "- Randomly choose a node N from the P0\n" +
+                                       "- Find the first node M that satisfies the semantic similarity criteria\n" +
+                                       "- Swap N for M and return P0")]
+  public sealed class SymbolicDataAnalysisExpressionSemanticSimilarityCrossover<T> : SymbolicDataAnalysisExpressionCrossover<T> where T : class, IDataAnalysisProblemData {
+    private const string SemanticSimilarityRangeParameterName = "SemanticSimilarityRange";
+
+    #region Parameter properties
+    public IValueParameter<DoubleRange> SemanticSimilarityRangeParameter {
+      get { return (IValueParameter<DoubleRange>)Parameters[SemanticSimilarityRangeParameterName]; }
+    }
+    #endregion
+
+    #region Properties
+    public DoubleRange SemanticSimilarityRange {
+      get { return SemanticSimilarityRangeParameter.Value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private SymbolicDataAnalysisExpressionSemanticSimilarityCrossover(bool deserializing) : base(deserializing) { }
+    private SymbolicDataAnalysisExpressionSemanticSimilarityCrossover(SymbolicDataAnalysisExpressionCrossover<T> original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicDataAnalysisExpressionSemanticSimilarityCrossover()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<DoubleRange>(SemanticSimilarityRangeParameterName, "Semantic similarity interval.", new DoubleRange(0.0001, 10)));
+      name = "SemanticSimilarityCrossover";
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisExpressionSemanticSimilarityCrossover<T>(this, cloner);
+    }
+
+    public override ISymbolicExpressionTree Crossover(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1) {
+      ISymbolicDataAnalysisExpressionTreeInterpreter interpreter = SymbolicDataAnalysisTreeInterpreterParameter.ActualValue;
+      List<int> rows = GenerateRowsToEvaluate().ToList();
+      T problemData = ProblemDataParameter.ActualValue;
+      return Cross(random, parent0, parent1, interpreter, problemData, rows, MaximumSymbolicExpressionTreeDepth.Value, MaximumSymbolicExpressionTreeLength.Value, SemanticSimilarityRange);
+    }
+
+    /// <summary>
+    /// Takes two parent individuals P0 and P1. 
+    /// Randomly choose a node i from the first parent, then get a node j from the second parent that matches the semantic similarity criteria.
+    /// </summary>
+    public static ISymbolicExpressionTree Cross(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter,
+                                                T problemData, List<int> rows, int maxDepth, int maxLength, DoubleRange range) {
+      var crossoverPoints0 = new List<CutPoint>();
+      parent0.Root.ForEachNodePostfix((n) => {
+        if (n.Parent != null && n.Parent != parent0.Root)
+          crossoverPoints0.Add(new CutPoint(n.Parent, n));
+      });
+      var crossoverPoint0 = crossoverPoints0.SelectRandom(random);
+      int level = parent0.Root.GetBranchLevel(crossoverPoint0.Child);
+      int length = parent0.Root.GetLength() - crossoverPoint0.Child.GetLength();
+
+      var allowedBranches = new List<ISymbolicExpressionTreeNode>();
+      parent1.Root.ForEachNodePostfix((n) => {
+        if (n.Parent != null && n.Parent != parent1.Root) {
+          if (n.GetDepth() + level <= maxDepth && n.GetLength() + length <= maxLength && crossoverPoint0.IsMatchingPointType(n))
+            allowedBranches.Add(n);
+        }
+      });
+
+      if (allowedBranches.Count == 0)
+        return parent0;
+
+      var dataset = problemData.Dataset;
+
+      // create symbols in order to improvize an ad-hoc tree so that the child can be evaluated
+      var rootSymbol = new ProgramRootSymbol();
+      var startSymbol = new StartSymbol();
+      var tree0 = CreateTreeFromNode(random, crossoverPoint0.Child, rootSymbol, startSymbol);
+      List<double> estimatedValues0 = interpreter.GetSymbolicExpressionTreeValues(tree0, dataset, rows).ToList();
+      crossoverPoint0.Child.Parent = crossoverPoint0.Parent; // restore parent
+      ISymbolicExpressionTreeNode selectedBranch = null;
+
+      // pick the first node that fulfills the semantic similarity conditions
+      foreach (var node in allowedBranches) {
+        var parent = node.Parent;
+        var tree1 = CreateTreeFromNode(random, node, startSymbol, rootSymbol); // this will affect node.Parent 
+        List<double> estimatedValues1 = interpreter.GetSymbolicExpressionTreeValues(tree1, dataset, rows).ToList();
+        node.Parent = parent; // restore parent
+
+        OnlineCalculatorError errorState;
+        double ssd = OnlineMeanAbsoluteErrorCalculator.Calculate(estimatedValues0, estimatedValues1, out errorState);
+
+        if (range.Start <= ssd && ssd <= range.End) {
+          selectedBranch = node;
+          break;
+        }
+      }
+
+      // perform the actual swap
+      if (selectedBranch != null)
+        Swap(crossoverPoint0, selectedBranch);
+      return parent0;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionSizefairCrossover.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionSizefairCrossover.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionSizefairCrossover.cs	(revision 10269)
@@ -0,0 +1,46 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Crossovers {
+  [Item("SizeFairCrossover", "An operator which performs subtree swapping crossover.")]
+  class SymbolicDataAnalysisExpressionSizefairCrossover<T> : SubtreeCrossover, ISymbolicDataAnalysisExpressionCrossover<T> {
+    [StorableConstructor]
+    protected SymbolicDataAnalysisExpressionSizefairCrossover(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisExpressionSizefairCrossover(SubtreeCrossover original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new SymbolicDataAnalysisExpressionSizefairCrossover<T>(this, cloner); }
+
+    public override bool CanChangeName {
+      get { return true; }
+    }
+
+    public SymbolicDataAnalysisExpressionSizefairCrossover()
+      : base() {
+      SymbolicDataAnalysisEvaluationPartitionParameter.Hidden = true;
+      Name = "SizeFairCrossover";
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisEvaluator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisEvaluator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisEvaluator.cs	(revision 10269)
@@ -0,0 +1,189 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisEvaluator<T> : SingleSuccessorOperator,
+    ISymbolicDataAnalysisEvaluator<T>, ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator, IStochasticOperator
+  where T : class, IDataAnalysisProblemData {
+    private const string RandomParameterName = "Random";
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string EstimationLimitsParameterName = "EstimationLimits";
+    private const string EvaluationPartitionParameterName = "EvaluationPartition";
+    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
+    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
+    private const string ValidRowIndicatorParameterName = "ValidRowIndicator";
+
+    public override bool CanChangeName { get { return false; } }
+
+    #region parameter properties
+    ILookupParameter<IRandom> IStochasticOperator.RandomParameter {
+      get { return RandomParameter; }
+    }
+
+    public IValueLookupParameter<IRandom> RandomParameter {
+      get { return (IValueLookupParameter<IRandom>)Parameters[RandomParameterName]; }
+    }
+    public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
+    }
+    public IValueLookupParameter<T> ProblemDataParameter {
+      get { return (IValueLookupParameter<T>)Parameters[ProblemDataParameterName]; }
+    }
+
+    public IValueLookupParameter<IntRange> EvaluationPartitionParameter {
+      get { return (IValueLookupParameter<IntRange>)Parameters[EvaluationPartitionParameterName]; }
+    }
+    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
+      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
+    }
+    public IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
+      get { return (IValueLookupParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
+    }
+    public ILookupParameter<BoolValue> ApplyLinearScalingParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
+    }
+    public IValueLookupParameter<StringValue> ValidRowIndicatorParameter {
+      get { return (IValueLookupParameter<StringValue>)Parameters[ValidRowIndicatorParameterName]; }
+    }
+    #endregion
+
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisEvaluator(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisEvaluator(SymbolicDataAnalysisEvaluator<T> original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public SymbolicDataAnalysisEvaluator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IRandom>(RandomParameterName, "The random generator to use."));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic data analysis tree."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic data analysis solution encoded as a symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<T>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
+      Parameters.Add(new ValueLookupParameter<IntRange>(EvaluationPartitionParameterName, "The start index of the dataset partition on which the symbolic data analysis solution should be evaluated."));
+      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The upper and lower limit that should be used as cut off value for the output values of symbolic data analysis trees."));
+      Parameters.Add(new ValueLookupParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index."));
+      Parameters.Add(new LookupParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the individual should be linearly scaled before evaluating."));
+      Parameters.Add(new ValueLookupParameter<StringValue>(ValidRowIndicatorParameterName, "An indicator variable in the data set that specifies which rows should be evaluated (those for which the indicator <> 0) (optional)."));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (Parameters.ContainsKey(ApplyLinearScalingParameterName) && !(Parameters[ApplyLinearScalingParameterName] is LookupParameter<BoolValue>))
+        Parameters.Remove(ApplyLinearScalingParameterName);
+      if (!Parameters.ContainsKey(ApplyLinearScalingParameterName))
+        Parameters.Add(new LookupParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the individual should be linearly scaled before evaluating."));
+      if (!Parameters.ContainsKey(ValidRowIndicatorParameterName))
+        Parameters.Add(new ValueLookupParameter<StringValue>(ValidRowIndicatorParameterName, "An indicator variable in the data set that specifies which rows should be evaluated (those for which the indicator <> 0) (optional)."));
+    }
+
+    protected IEnumerable<int> GenerateRowsToEvaluate() {
+      return GenerateRowsToEvaluate(RelativeNumberOfEvaluatedSamplesParameter.ActualValue.Value);
+    }
+
+    protected IEnumerable<int> GenerateRowsToEvaluate(double percentageOfRows) {
+      IEnumerable<int> rows;
+      int samplesStart = EvaluationPartitionParameter.ActualValue.Start;
+      int samplesEnd = EvaluationPartitionParameter.ActualValue.End;
+      int testPartitionStart = ProblemDataParameter.ActualValue.TestPartition.Start;
+      int testPartitionEnd = ProblemDataParameter.ActualValue.TestPartition.End;
+      if (samplesEnd < samplesStart) throw new ArgumentException("Start value is larger than end value.");
+
+      if (percentageOfRows.IsAlmost(1.0))
+        rows = Enumerable.Range(samplesStart, samplesEnd - samplesStart);
+      else {
+        int seed = RandomParameter.ActualValue.Next();
+        int count = (int)((samplesEnd - samplesStart) * percentageOfRows);
+        if (count == 0) count = 1;
+        rows = RandomEnumerable.SampleRandomNumbers(seed, samplesStart, samplesEnd, count);
+      }
+
+      rows = rows.Where(i => i < testPartitionStart || testPartitionEnd <= i);
+      if (ValidRowIndicatorParameter.ActualValue != null) {
+        string indicatorVar = ValidRowIndicatorParameter.ActualValue.Value;
+        var problemData = ProblemDataParameter.ActualValue;
+        var indicatorRow = problemData.Dataset.GetReadOnlyDoubleValues(indicatorVar);
+        rows = rows.Where(r => !indicatorRow[r].IsAlmost(0.0));
+      }
+      return rows;
+    }
+
+    [ThreadStatic]
+    private static double[] cache;
+    protected static void CalculateWithScaling(IEnumerable<double> targetValues, IEnumerable<double> estimatedValues,
+      double lowerEstimationLimit, double upperEstimationLimit,
+      IOnlineCalculator calculator, int maxRows) {
+      if (cache == null || cache.Length < maxRows) {
+        cache = new double[maxRows];
+      }
+
+      // calculate linear scaling
+      int i = 0;
+      var linearScalingCalculator = new OnlineLinearScalingParameterCalculator();
+      var targetValuesEnumerator = targetValues.GetEnumerator();
+      var estimatedValuesEnumerator = estimatedValues.GetEnumerator();
+      while (targetValuesEnumerator.MoveNext() & estimatedValuesEnumerator.MoveNext()) {
+        double target = targetValuesEnumerator.Current;
+        double estimated = estimatedValuesEnumerator.Current;
+        cache[i] = estimated;
+        if (!double.IsNaN(estimated) && !double.IsInfinity(estimated))
+          linearScalingCalculator.Add(estimated, target);
+        i++;
+      }
+      if (linearScalingCalculator.ErrorState == OnlineCalculatorError.None && (targetValuesEnumerator.MoveNext() || estimatedValuesEnumerator.MoveNext()))
+        throw new ArgumentException("Number of elements in target and estimated values enumeration do not match.");
+
+      double alpha = linearScalingCalculator.Alpha;
+      double beta = linearScalingCalculator.Beta;
+      if (linearScalingCalculator.ErrorState != OnlineCalculatorError.None) {
+        alpha = 0.0;
+        beta = 1.0;
+      }
+
+      //calculate the quality by using the passed online calculator
+      targetValuesEnumerator = targetValues.GetEnumerator();
+      var scaledBoundedEstimatedValuesEnumerator = Enumerable.Range(0, i).Select(x => cache[x] * beta + alpha)
+        .LimitToRange(lowerEstimationLimit, upperEstimationLimit).GetEnumerator();
+
+      while (targetValuesEnumerator.MoveNext() & scaledBoundedEstimatedValuesEnumerator.MoveNext()) {
+        calculator.Add(targetValuesEnumerator.Current, scaledBoundedEstimatedValuesEnumerator.Current);
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisMultiObjectiveEvaluator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisMultiObjectiveEvaluator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisMultiObjectiveEvaluator.cs	(revision 10269)
@@ -0,0 +1,53 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public abstract class SymbolicDataAnalysisMultiObjectiveEvaluator<T> : SymbolicDataAnalysisEvaluator<T>, ISymbolicDataAnalysisMultiObjectiveEvaluator<T>
+   where T : class, IDataAnalysisProblemData {
+    private const string QualitiesParameterName = "Qualities";
+    public ILookupParameter<DoubleArray> QualitiesParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters[QualitiesParameterName]; }
+    }
+
+    public abstract IEnumerable<bool> Maximization { get; }
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisMultiObjectiveEvaluator(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisMultiObjectiveEvaluator(SymbolicDataAnalysisMultiObjectiveEvaluator<T> original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    protected SymbolicDataAnalysisMultiObjectiveEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleArray>(QualitiesParameterName, "The qualities of the evaluated symbolic data analysis solution."));
+    }
+
+    public abstract double[] Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, T problemData, IEnumerable<int> rows);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisSingleObjectiveEvaluator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisSingleObjectiveEvaluator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisSingleObjectiveEvaluator.cs	(revision 10269)
@@ -0,0 +1,57 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Collections.Generic;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisSingleObjectiveEvaluator<T> : SymbolicDataAnalysisEvaluator<T>, ISymbolicDataAnalysisSingleObjectiveEvaluator<T>
+   where T : class, IDataAnalysisProblemData {
+    private const string QualityParameterName = "Quality";
+    #region parameter properties
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+    #endregion
+    #region properties
+    public abstract bool Maximization { get; }
+    #endregion
+    [StorableConstructor]
+    protected SymbolicDataAnalysisSingleObjectiveEvaluator(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisSingleObjectiveEvaluator(SymbolicDataAnalysisSingleObjectiveEvaluator<T> original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    protected SymbolicDataAnalysisSingleObjectiveEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>(QualityParameterName, "The quality of the evaluated symbolic data analysis solution."));
+    }
+
+    public abstract double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, T problemData, IEnumerable<int> rows);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionExcelFormatter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionExcelFormatter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionExcelFormatter.cs	(revision 10269)
@@ -0,0 +1,211 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("Excel String Formatter", "String formatter for string representations of symbolic data analysis expressions in Excel syntax.")]
+  [StorableClass]
+  public sealed class SymbolicDataAnalysisExpressionExcelFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter {
+    [StorableConstructor]
+    private SymbolicDataAnalysisExpressionExcelFormatter(bool deserializing) : base(deserializing) { }
+    private SymbolicDataAnalysisExpressionExcelFormatter(SymbolicDataAnalysisExpressionExcelFormatter original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicDataAnalysisExpressionExcelFormatter()
+      : base() {
+      Name = ItemName;
+      Description = ItemDescription;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisExpressionExcelFormatter(this, cloner);
+    }
+    private string GetExcelColumnName(int columnNumber) {
+      int dividend = columnNumber;
+      string columnName = String.Empty;
+
+      while (dividend > 0) {
+        int modulo = (dividend - 1) % 26;
+        columnName = Convert.ToChar(65 + modulo).ToString() + columnName;
+        dividend = (int)((dividend - modulo) / 26);
+      }
+
+      return columnName;
+    }
+
+    private readonly Dictionary<string, string> variableNameMapping = new Dictionary<string, string>();
+    private int currentVariableIndex = 0;
+    private string GetColumnToVariableName(string variabelName) {
+      if (!variableNameMapping.ContainsKey(variabelName)) {
+        currentVariableIndex++;
+        variableNameMapping.Add(variabelName, GetExcelColumnName(currentVariableIndex));
+      }
+      return string.Format("${0}1", variableNameMapping[variabelName]);
+    }
+    public string Format(ISymbolicExpressionTree symbolicExpressionTree) {
+      return Format(symbolicExpressionTree, null);
+    }
+
+    public string Format(ISymbolicExpressionTree symbolicExpressionTree, Dataset dataset) {
+      var stringBuilder = new StringBuilder();
+      if (dataset != null) CalculateVariableMapping(symbolicExpressionTree, dataset);
+
+      stringBuilder.Append("=");
+      stringBuilder.Append(FormatRecursively(symbolicExpressionTree.Root));
+
+      foreach (var variable in variableNameMapping) {
+        stringBuilder.AppendLine();
+        stringBuilder.Append(variable.Key + " = " + variable.Value);
+      }
+      return stringBuilder.ToString();
+    }
+
+    private void CalculateVariableMapping(ISymbolicExpressionTree tree, Dataset dataset) {
+      int columnIndex = 0;
+      int inputIndex = 0;
+      var usedVariables = tree.IterateNodesPrefix().OfType<VariableTreeNode>().Select(v => v.VariableName).Distinct();
+      foreach (var variable in dataset.VariableNames) {
+        columnIndex++;
+        if (!usedVariables.Contains(variable)) continue;
+        inputIndex++;
+        variableNameMapping[variable] = GetExcelColumnName(inputIndex);
+      }
+    }
+
+    private string FormatRecursively(ISymbolicExpressionTreeNode node) {
+      ISymbol symbol = node.Symbol;
+      StringBuilder stringBuilder = new StringBuilder();
+
+      if (symbol is ProgramRootSymbol) {
+        stringBuilder.AppendLine(FormatRecursively(node.GetSubtree(0)));
+      } else if (symbol is StartSymbol)
+        return FormatRecursively(node.GetSubtree(0));
+      else if (symbol is Addition) {
+        stringBuilder.Append("(");
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          if (i > 0) stringBuilder.Append("+");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+        }
+        stringBuilder.Append(")");
+      } else if (symbol is Average) {
+        stringBuilder.Append("(1/");
+        stringBuilder.Append(node.SubtreeCount);
+        stringBuilder.Append(")*(");
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          if (i > 0) stringBuilder.Append("+");
+          stringBuilder.Append("(");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+          stringBuilder.Append(")");
+        }
+        stringBuilder.Append(")");
+      } else if (symbol is Constant) {
+        ConstantTreeNode constantTreeNode = node as ConstantTreeNode;
+        stringBuilder.Append(constantTreeNode.Value.ToString(CultureInfo.InvariantCulture));
+      } else if (symbol is Cosine) {
+        stringBuilder.Append("COS(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (symbol is Division) {
+        if (node.SubtreeCount == 1) {
+          stringBuilder.Append("1/");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        } else {
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+          stringBuilder.Append("/(");
+          for (int i = 1; i < node.SubtreeCount; i++) {
+            if (i > 1) stringBuilder.Append("*");
+            stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+          }
+          stringBuilder.Append(")");
+        }
+      } else if (symbol is Exponential) {
+        stringBuilder.Append("EXP(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (symbol is Square) {
+        stringBuilder.Append("POWER(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(",2)");
+      } else if (symbol is SquareRoot) {
+        stringBuilder.Append("SQRT(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (symbol is Logarithm) {
+        stringBuilder.Append("LN(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (symbol is Multiplication) {
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          if (i > 0) stringBuilder.Append("*");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+        }
+      } else if (symbol is Sine) {
+        stringBuilder.Append("SIN(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (symbol is Subtraction) {
+        stringBuilder.Append("(");
+        if (node.SubtreeCount == 1) {
+          stringBuilder.Append("-");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        } else {
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+          for (int i = 1; i < node.SubtreeCount; i++) {
+            stringBuilder.Append("-");
+            stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+          }
+        }
+        stringBuilder.Append(")");
+      } else if (symbol is Tangent) {
+        stringBuilder.Append("TAN(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+
+      } else if (symbol is Variable) {
+        VariableTreeNode variableTreeNode = node as VariableTreeNode;
+        stringBuilder.Append(variableTreeNode.Weight.ToString(CultureInfo.InvariantCulture));
+        stringBuilder.Append("*");
+        stringBuilder.Append(GetColumnToVariableName(variableTreeNode.VariableName));// + LagToString(currentLag));
+      } else if (symbol is Power) {
+        stringBuilder.Append("POWER(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(",ROUND(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(1)));
+        stringBuilder.Append(",0))");
+      } else if (symbol is Root) {
+        stringBuilder.Append("(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")^(1 / ROUND(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(1)));
+        stringBuilder.Append(",0))");
+      } else {
+        throw new NotImplementedException("Excel export of " + node.Symbol + " is not implemented.");
+      }
+      return stringBuilder.ToString();
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs	(revision 10269)
@@ -0,0 +1,452 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("LaTeX String Formatter", "Formatter for symbolic expression trees for import into LaTeX documents.")]
+  [StorableClass]
+  public sealed class SymbolicDataAnalysisExpressionLatexFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter {
+    private readonly List<double> constants;
+    private int targetCount;
+    private int currentLag;
+
+    [StorableConstructor]
+    private SymbolicDataAnalysisExpressionLatexFormatter(bool deserializing) : base(deserializing) { }
+    private SymbolicDataAnalysisExpressionLatexFormatter(SymbolicDataAnalysisExpressionLatexFormatter original, Cloner cloner)
+      : base(original, cloner) {
+      constants = new List<double>(original.constants);
+    }
+    public SymbolicDataAnalysisExpressionLatexFormatter()
+      : base() {
+      Name = ItemName;
+      Description = ItemDescription;
+      constants = new List<double>();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisExpressionLatexFormatter(this, cloner);
+    }
+
+    public string Format(ISymbolicExpressionTree symbolicExpressionTree) {
+      try {
+        StringBuilder strBuilder = new StringBuilder();
+        constants.Clear();
+        strBuilder.AppendLine(FormatRecursively(symbolicExpressionTree.Root));
+        return strBuilder.ToString();
+      }
+      catch (NotImplementedException ex) {
+        return ex.Message + Environment.NewLine + ex.StackTrace;
+      }
+    }
+
+    private string FormatRecursively(ISymbolicExpressionTreeNode node) {
+      StringBuilder strBuilder = new StringBuilder();
+      currentLag = 0;
+      FormatBegin(node, strBuilder);
+
+      if (node.SubtreeCount > 0) {
+        strBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+      }
+      int i = 1;
+      foreach (SymbolicExpressionTreeNode subTree in node.Subtrees.Skip(1)) {
+        FormatSep(node, strBuilder, i);
+        // format the whole subtree
+        strBuilder.Append(FormatRecursively(subTree));
+        i++;
+      }
+
+      FormatEnd(node, strBuilder);
+
+      return strBuilder.ToString();
+    }
+
+    private void FormatBegin(ISymbolicExpressionTreeNode node, StringBuilder strBuilder) {
+      if (node.Symbol is Addition) {
+        strBuilder.Append(@" \left( ");
+      } else if (node.Symbol is Subtraction) {
+        if (node.SubtreeCount == 1) {
+          strBuilder.Append(@"- \left( ");
+        } else {
+          strBuilder.Append(@" \left( ");
+        }
+      } else if (node.Symbol is Multiplication) {
+      } else if (node.Symbol is Division) {
+        if (node.SubtreeCount == 1) {
+          strBuilder.Append(@" \cfrac{1");
+        } else {
+          strBuilder.Append(@" \cfrac{ ");
+        }
+      } else if (node.Symbol is Average) {
+        // skip output of (1/1) if only one subtree
+        if (node.SubtreeCount > 1) {
+          strBuilder.Append(@" \cfrac{1}{" + node.SubtreeCount + @"}");
+        }
+        strBuilder.Append(@" \left( ");
+      } else if (node.Symbol is Logarithm) {
+        strBuilder.Append(@"\log \left( ");
+      } else if (node.Symbol is Exponential) {
+        strBuilder.Append(@"\exp \left( ");
+      } else if (node.Symbol is Square) {
+        strBuilder.Append(@"\left(");
+      } else if (node.Symbol is SquareRoot) {
+        strBuilder.Append(@"\sqrt{");
+      } else if (node.Symbol is Sine) {
+        strBuilder.Append(@"\sin \left( ");
+      } else if (node.Symbol is Cosine) {
+        strBuilder.Append(@"\cos \left( ");
+      } else if (node.Symbol is Tangent) {
+        strBuilder.Append(@"\tan \left( ");
+      } else if (node.Symbol is AiryA) {
+        strBuilder.Append(@"\operatorname{airy}_a \left( ");
+      } else if (node.Symbol is AiryB) {
+        strBuilder.Append(@"\operatorname{airy}_b \left( ");
+      } else if (node.Symbol is Bessel) {
+        strBuilder.Append(@"\operatorname{bessel}_1 \left( ");
+      } else if (node.Symbol is CosineIntegral) {
+        strBuilder.Append(@"\operatorname{cosInt} \left( ");
+      } else if (node.Symbol is Dawson) {
+        strBuilder.Append(@"\operatorname{dawson} \left( ");
+      } else if (node.Symbol is Erf) {
+        strBuilder.Append(@"\operatorname{erf} \left( ");
+      } else if (node.Symbol is ExponentialIntegralEi) {
+        strBuilder.Append(@"\operatorname{expInt}_i \left( ");
+      } else if (node.Symbol is FresnelCosineIntegral) {
+        strBuilder.Append(@"\operatorname{fresnel}_\operatorname{cosInt} \left( ");
+      } else if (node.Symbol is FresnelSineIntegral) {
+        strBuilder.Append(@"\operatorname{fresnel}_\operatorname{sinInt} \left( ");
+      } else if (node.Symbol is Gamma) {
+        strBuilder.Append(@"\Gamma \left( ");
+      } else if (node.Symbol is HyperbolicCosineIntegral) {
+        strBuilder.Append(@"\operatorname{hypCosInt} \left( ");
+      } else if (node.Symbol is HyperbolicSineIntegral) {
+        strBuilder.Append(@"\operatorname{hypSinInt} \left( ");
+      } else if (node.Symbol is Norm) {
+        strBuilder.Append(@"\operatorname{norm} \left( ");
+      } else if (node.Symbol is Psi) {
+        strBuilder.Append(@"\operatorname{digamma} \left( ");
+      } else if (node.Symbol is SineIntegral) {
+        strBuilder.Append(@"\operatorname{sinInt} \left( ");
+      } else if (node.Symbol is GreaterThan) {
+        strBuilder.Append(@"  \left( ");
+      } else if (node.Symbol is LessThan) {
+        strBuilder.Append(@"  \left( ");
+      } else if (node.Symbol is And) {
+        strBuilder.Append(@"  \left( \left( ");
+      } else if (node.Symbol is Or) {
+        strBuilder.Append(@"   \left( \left( ");
+      } else if (node.Symbol is Not) {
+        strBuilder.Append(@" \neg \left( ");
+      } else if (node.Symbol is IfThenElse) {
+        strBuilder.Append(@" \operatorname{if}  \left( ");
+      } else if (node.Symbol is Constant) {
+        strBuilder.Append("c_{" + constants.Count + "} ");
+        var constNode = node as ConstantTreeNode;
+        constants.Add(constNode.Value);
+      } else if (node.Symbol is LaggedVariable) {
+        var laggedVarNode = node as LaggedVariableTreeNode;
+        if (!laggedVarNode.Weight.IsAlmost(1.0)) {
+          strBuilder.Append("c_{" + constants.Count + "} \\cdot ");
+          constants.Add(laggedVarNode.Weight);
+        }
+        strBuilder.Append(EscapeLatexString(laggedVarNode.VariableName));
+        strBuilder.Append(LagToString(currentLag + laggedVarNode.Lag));
+
+      } else if (node.Symbol is Variable) {
+        var varNode = node as VariableTreeNode;
+        if (!varNode.Weight.IsAlmost((1.0))) {
+          strBuilder.Append("c_{" + constants.Count + "} \\cdot ");
+          constants.Add(varNode.Weight);
+        }
+        strBuilder.Append(EscapeLatexString(varNode.VariableName));
+        strBuilder.Append(LagToString(currentLag));
+      } else if (node.Symbol is ProgramRootSymbol) {
+        strBuilder
+          .AppendLine("\\begin{align*}")
+          .AppendLine("\\nonumber");
+      } else if (node.Symbol is Defun) {
+        var defunNode = node as DefunTreeNode;
+        strBuilder.Append(defunNode.FunctionName + " & = ");
+      } else if (node.Symbol is InvokeFunction) {
+        var invokeNode = node as InvokeFunctionTreeNode;
+        strBuilder.Append(invokeNode.Symbol.FunctionName + @" \left( ");
+      } else if (node.Symbol is StartSymbol) {
+        strBuilder.Append("target_" + (targetCount++) + "(t) & = ");
+      } else if (node.Symbol is Argument) {
+        var argSym = node.Symbol as Argument;
+        strBuilder.Append(" ARG+" + argSym.ArgumentIndex + " ");
+      } else if (node.Symbol is Derivative) {
+        strBuilder.Append(@" \cfrac{d \left( ");
+      } else if (node.Symbol is TimeLag) {
+        var laggedNode = node as ILaggedTreeNode;
+        currentLag += laggedNode.Lag;
+      } else if (node.Symbol is Power) {
+        strBuilder.Append(@" \left( ");
+      } else if (node.Symbol is Root) {
+        strBuilder.Append(@" \left( ");
+      } else if (node.Symbol is Integral) {
+        // actually a new variable for t is needed in all subtrees (TODO)
+        var laggedTreeNode = node as ILaggedTreeNode;
+        strBuilder.Append(@"\sum_{t=" + (laggedTreeNode.Lag + currentLag) + @"}^0 \left( ");
+      } else if (node.Symbol is VariableCondition) {
+        var conditionTreeNode = node as VariableConditionTreeNode;
+        string p = @"1 /  1 + \exp  - c_{" + constants.Count + "} ";
+        constants.Add(conditionTreeNode.Slope);
+        p += @" \cdot " + EscapeLatexString(conditionTreeNode.VariableName) + LagToString(currentLag) + " - c_{" + constants.Count + @"}   ";
+        constants.Add(conditionTreeNode.Threshold);
+        strBuilder.Append(@" \left( " + p + @"\cdot ");
+      } else {
+        throw new NotImplementedException("Export of " + node.Symbol + " is not implemented.");
+      }
+    }
+
+    private void FormatSep(ISymbolicExpressionTreeNode node, StringBuilder strBuilder, int step) {
+      if (node.Symbol is Addition) {
+        strBuilder.Append(" + ");
+      } else if (node.Symbol is Subtraction) {
+        strBuilder.Append(" - ");
+      } else if (node.Symbol is Multiplication) {
+        strBuilder.Append(@" \cdot ");
+      } else if (node.Symbol is Division) {
+        if (step + 1 == node.SubtreeCount)
+          strBuilder.Append(@"}{");
+        else
+          strBuilder.Append(@" }{ \cfrac{ ");
+      } else if (node.Symbol is Average) {
+        strBuilder.Append(@" + ");
+      } else if (node.Symbol is Logarithm) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is Exponential) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is Square) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is SquareRoot) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is Sine) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is Cosine) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is Tangent) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is AiryA) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is AiryB) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is Bessel) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is CosineIntegral) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is Dawson) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is Erf) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is ExponentialIntegralEi) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is FresnelCosineIntegral) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is FresnelSineIntegral) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is Gamma) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is HyperbolicCosineIntegral) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is HyperbolicSineIntegral) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is Norm) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is Psi) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is SineIntegral) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is GreaterThan) {
+        strBuilder.Append(@" > ");
+      } else if (node.Symbol is LessThan) {
+        strBuilder.Append(@" < ");
+      } else if (node.Symbol is And) {
+        strBuilder.Append(@" > 0  \right) \land \left(");
+      } else if (node.Symbol is Or) {
+        strBuilder.Append(@" > 0  \right) \lor \left(");
+      } else if (node.Symbol is Not) {
+        throw new InvalidOperationException();
+      } else if (node.Symbol is IfThenElse) {
+        strBuilder.Append(@" , ");
+      } else if (node.Symbol is ProgramRootSymbol) {
+        strBuilder.Append(@"\\" + Environment.NewLine);
+      } else if (node.Symbol is Defun) {
+      } else if (node.Symbol is InvokeFunction) {
+        strBuilder.Append(" , ");
+      } else if (node.Symbol is StartSymbol) {
+        strBuilder.Append(@"\\" + Environment.NewLine);
+        strBuilder.Append("target_" + (targetCount++) + "(t) & = ");
+      } else if (node.Symbol is Power) {
+        strBuilder.Append(@"\right) ^ { \operatorname{round} \left(");
+      } else if (node.Symbol is Root) {
+        strBuilder.Append(@"\right) ^ {  \cfrac{1}{ \operatorname{round} \left(");
+      } else if (node.Symbol is VariableCondition) {
+        var conditionTreeNode = node as VariableConditionTreeNode;
+        string p = @"1 / \left( 1 + \exp \left( - c_{" + constants.Count + "} ";
+        constants.Add(conditionTreeNode.Slope);
+        p += @" \cdot " + EscapeLatexString(conditionTreeNode.VariableName) + LagToString(currentLag) + " - c_{" + constants.Count + @"} \right) \right) \right)   ";
+        constants.Add(conditionTreeNode.Threshold);
+        strBuilder.Append(@" +  \left( 1 - " + p + @" \right) \cdot ");
+      } else {
+        throw new NotImplementedException("Export of " + node.Symbol + " is not implemented.");
+      }
+    }
+
+    private void FormatEnd(ISymbolicExpressionTreeNode node, StringBuilder strBuilder) {
+      if (node.Symbol is Addition) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is Subtraction) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is Multiplication) {
+      } else if (node.Symbol is Division) {
+        strBuilder.Append(" } ");
+        for (int i = 2; i < node.SubtreeCount; i++)
+          strBuilder.Append(" } ");
+      } else if (node.Symbol is Average) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is Logarithm) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is Exponential) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is Square) {
+        strBuilder.Append(@"\right)^2");
+      } else if (node.Symbol is SquareRoot) {
+        strBuilder.Append(@"}");
+      } else if (node.Symbol is Sine) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is Cosine) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is Tangent) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is AiryA) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is AiryB) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is Bessel) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is CosineIntegral) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is Dawson) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is Erf) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is ExponentialIntegralEi) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is FresnelCosineIntegral) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is FresnelSineIntegral) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is Gamma) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is HyperbolicCosineIntegral) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is HyperbolicSineIntegral) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is Norm) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is Psi) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is SineIntegral) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is GreaterThan) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is LessThan) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is And) {
+        strBuilder.Append(@" > 0 \right) \right) ");
+      } else if (node.Symbol is Or) {
+        strBuilder.Append(@" > 0 \right) \right) ");
+      } else if (node.Symbol is Not) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is IfThenElse) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is Constant) {
+      } else if (node.Symbol is LaggedVariable) {
+      } else if (node.Symbol is Variable) {
+      } else if (node.Symbol is ProgramRootSymbol) {
+        strBuilder
+          .AppendLine("\\end{align*}")
+          .AppendLine("\\begin{align*}")
+          .AppendLine("\\nonumber");
+        // output all constant values
+        if (constants.Count > 0) {
+          int i = 0;
+          foreach (var constant in constants) {
+            // replace "." with ".&" to align decimal points
+            var constStr = string.Format(System.Globalization.NumberFormatInfo.InvariantInfo, "{0:G5}", constant);
+            if (!constStr.Contains(".")) constStr = constStr + ".0";
+            constStr = constStr.Replace(".", "\\negthickspace&.");  // fix problem in rendering of aligned expressions
+            strBuilder.Append("c_{" + i + "}& = & " + constStr);
+            strBuilder.Append(@"\\");
+            i++;
+          }
+        }
+        strBuilder.AppendLine("\\end{align*}");
+      } else if (node.Symbol is Defun) {
+      } else if (node.Symbol is InvokeFunction) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is StartSymbol) {
+      } else if (node.Symbol is Argument) {
+      } else if (node.Symbol is Derivative) {
+        strBuilder.Append(@" \right) }{dt} ");
+      } else if (node.Symbol is TimeLag) {
+        var laggedNode = node as ILaggedTreeNode;
+        currentLag -= laggedNode.Lag;
+      } else if (node.Symbol is Power) {
+        strBuilder.Append(@" \right) } ");
+      } else if (node.Symbol is Root) {
+        strBuilder.Append(@" \right) } } ");
+      } else if (node.Symbol is Integral) {
+        strBuilder.Append(@" \right) ");
+      } else if (node.Symbol is VariableCondition) {
+        strBuilder.Append(@"\right) ");
+      } else {
+        throw new NotImplementedException("Export of " + node.Symbol + " is not implemented.");
+      }
+    }
+
+    private string LagToString(int lag) {
+      if (lag < 0) {
+        return "(t" + lag + ")";
+      } else if (lag > 0) {
+        return "(t+" + lag + ")";
+      } else return "";
+    }
+
+    private string EscapeLatexString(string s) {
+      return "\\text{" +
+        s
+         .Replace("\\", "\\\\")
+         .Replace("{", "\\{")
+         .Replace("}", "\\}")
+        + "}";
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMATLABFormatter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMATLABFormatter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMATLABFormatter.cs	(revision 10269)
@@ -0,0 +1,357 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Globalization;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+
+  [Item("MATLAB String Formatter", "String formatter for string representations of symbolic data analysis expressions in MATLAB syntax.")]
+  [StorableClass]
+  public sealed class SymbolicDataAnalysisExpressionMATLABFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter {
+    private int currentLag;
+
+    [StorableConstructor]
+    private SymbolicDataAnalysisExpressionMATLABFormatter(bool deserializing) : base(deserializing) { }
+    private SymbolicDataAnalysisExpressionMATLABFormatter(SymbolicDataAnalysisExpressionMATLABFormatter original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicDataAnalysisExpressionMATLABFormatter()
+      : base() {
+      Name = ItemName;
+      Description = ItemDescription;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisExpressionMATLABFormatter(this, cloner);
+    }
+    private int currentIndexNumber;
+    public string CurrentIndexVariable {
+      get {
+        return "i" + currentIndexNumber;
+      }
+    }
+    private void ReleaseIndexVariable() {
+      currentIndexNumber--;
+    }
+
+    private string AllocateIndexVariable() {
+      currentIndexNumber++;
+      return CurrentIndexVariable;
+    }
+
+    public string Format(ISymbolicExpressionTree symbolicExpressionTree) {
+      currentLag = 0;
+      currentIndexNumber = 0;
+
+      var stringBuilder = new StringBuilder();
+      stringBuilder.AppendLine("rows = ???");
+      stringBuilder.AppendLine(FormatOnlyExpression(symbolicExpressionTree.Root) + ";");
+      stringBuilder.AppendLine();
+      stringBuilder.AppendLine("function y = log_(x)");
+      stringBuilder.AppendLine("  if(x<=0) y = NaN;");
+      stringBuilder.AppendLine("  else     y = log(x);");
+      stringBuilder.AppendLine("  end");
+      stringBuilder.AppendLine("end");
+      stringBuilder.AppendLine();
+      stringBuilder.AppendLine("function y = fivePoint(f0, f1, f3, f4)");
+      stringBuilder.AppendLine("  y = (f0 + 2*f1 - 2*f3 - f4) / 8;");
+      stringBuilder.AppendLine("end");
+      return stringBuilder.ToString();
+    }
+
+    public string FormatOnlyExpression(ISymbolicExpressionTreeNode expressionNode) {
+      var stringBuilder = new StringBuilder();
+      stringBuilder.AppendLine("  for " + CurrentIndexVariable + " = 1:1:rows");
+      stringBuilder.AppendLine("    estimated(" + CurrentIndexVariable + ") = " + FormatRecursively(expressionNode.GetSubtree(0)) + ";");
+      stringBuilder.AppendLine("  end;");
+      return stringBuilder.ToString();
+    }
+
+    private string FormatRecursively(ISymbolicExpressionTreeNode node) {
+      ISymbol symbol = node.Symbol;
+      StringBuilder stringBuilder = new StringBuilder();
+
+      if (symbol is ProgramRootSymbol) {
+        stringBuilder.AppendLine(FormatRecursively(node.GetSubtree(0)));
+      } else if (symbol is StartSymbol)
+        return FormatRecursively(node.GetSubtree(0));
+      else if (symbol is Addition) {
+        stringBuilder.Append("(");
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          if (i > 0) stringBuilder.Append("+");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+        }
+        stringBuilder.Append(")");
+      } else if (symbol is And) {
+        stringBuilder.Append("((");
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          if (i > 0) stringBuilder.Append("&");
+          stringBuilder.Append("((");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+          stringBuilder.Append(")>0)");
+        }
+        stringBuilder.Append(")-0.5)*2");
+        // MATLAB maps false and true to 0 and 1, resp., we map this result to -1.0 and +1.0, resp.
+      } else if (symbol is Average) {
+        stringBuilder.Append("(1/");
+        stringBuilder.Append(node.SubtreeCount);
+        stringBuilder.Append(")*(");
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          if (i > 0) stringBuilder.Append("+");
+          stringBuilder.Append("(");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+          stringBuilder.Append(")");
+        }
+        stringBuilder.Append(")");
+      } else if (symbol is Constant) {
+        ConstantTreeNode constantTreeNode = node as ConstantTreeNode;
+        stringBuilder.Append(constantTreeNode.Value.ToString(CultureInfo.InvariantCulture));
+      } else if (symbol is Cosine) {
+        stringBuilder.Append("cos(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (symbol is Division) {
+        if (node.SubtreeCount == 1) {
+          stringBuilder.Append("1/");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        } else {
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+          stringBuilder.Append("/(");
+          for (int i = 1; i < node.SubtreeCount; i++) {
+            if (i > 1) stringBuilder.Append("*");
+            stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+          }
+          stringBuilder.Append(")");
+        }
+      } else if (symbol is Exponential) {
+        stringBuilder.Append("exp(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (symbol is Square) {
+        stringBuilder.Append("(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(").^2");
+      } else if (symbol is SquareRoot) {
+        stringBuilder.Append("sqrt(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (symbol is GreaterThan) {
+        stringBuilder.Append("((");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(">");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(1)));
+        stringBuilder.Append(")-0.5)*2");
+        // MATLAB maps false and true to 0 and 1, resp., we map this result to -1.0 and +1.0, resp.
+      } else if (symbol is IfThenElse) {
+        stringBuilder.Append("(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(">0)*");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(1)));
+        stringBuilder.Append("+");
+        stringBuilder.Append("(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append("<=0)*");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(2)));
+      } else if (symbol is LaggedVariable) {
+        // this if must be checked before if(symbol is LaggedVariable)
+        LaggedVariableTreeNode laggedVariableTreeNode = node as LaggedVariableTreeNode;
+        stringBuilder.Append(laggedVariableTreeNode.Weight.ToString(CultureInfo.InvariantCulture));
+        stringBuilder.Append("*");
+        stringBuilder.Append(laggedVariableTreeNode.VariableName +
+                             LagToString(currentLag + laggedVariableTreeNode.Lag));
+      } else if (symbol is LessThan) {
+        stringBuilder.Append("((");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append("<");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(1)));
+        stringBuilder.Append(")-0.5)*2");
+        // MATLAB maps false and true to 0 and 1, resp., we map this result to -1.0 and +1.0, resp.
+      } else if (symbol is Logarithm) {
+        stringBuilder.Append("log_(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (symbol is Multiplication) {
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          if (i > 0) stringBuilder.Append("*");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+        }
+      } else if (symbol is Not) {
+        stringBuilder.Append("~(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(" > 0 )");
+      } else if (symbol is Or) {
+        stringBuilder.Append("((");
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          if (i > 0) stringBuilder.Append("|");
+          stringBuilder.Append("((");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+          stringBuilder.Append(")>0)");
+        }
+        stringBuilder.Append(")-0.5)*2");
+        // MATLAB maps false and true to 0 and 1, resp., we map this result to -1.0 and +1.0, resp.
+      } else if (symbol is Sine) {
+        stringBuilder.Append("sin(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (symbol is Subtraction) {
+        stringBuilder.Append("(");
+        if (node.SubtreeCount == 1) {
+          stringBuilder.Append("-");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        } else {
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+          for (int i = 1; i < node.SubtreeCount; i++) {
+            stringBuilder.Append("-");
+            stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+          }
+        }
+        stringBuilder.Append(")");
+      } else if (symbol is Tangent) {
+        stringBuilder.Append("tan(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is AiryA) {
+        stringBuilder.Append("airy(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is AiryB) {
+        stringBuilder.Append("airy(2, ");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is Bessel) {
+        stringBuilder.Append("besseli(0.0,");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is CosineIntegral) {
+        stringBuilder.Append("cosint(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is Dawson) {
+        stringBuilder.Append("dawson(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is Erf) {
+        stringBuilder.Append("erf(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is ExponentialIntegralEi) {
+        stringBuilder.Append("expint(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is FresnelCosineIntegral) {
+        stringBuilder.Append("FresnelC(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is FresnelSineIntegral) {
+        stringBuilder.Append("FresnelS(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is Gamma) {
+        stringBuilder.Append("gamma(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is HyperbolicCosineIntegral) {
+        stringBuilder.Append("Chi(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is HyperbolicSineIntegral) {
+        stringBuilder.Append("Shi(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is Norm) {
+        stringBuilder.Append("normpdf(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is Psi) {
+        stringBuilder.Append("psi(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (node.Symbol is SineIntegral) {
+        stringBuilder.Append("sinint(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+      } else if (symbol is HeuristicLab.Problems.DataAnalysis.Symbolic.Variable) {
+        VariableTreeNode variableTreeNode = node as VariableTreeNode;
+        stringBuilder.Append(variableTreeNode.Weight.ToString(CultureInfo.InvariantCulture));
+        stringBuilder.Append("*");
+        stringBuilder.Append(variableTreeNode.VariableName + LagToString(currentLag));
+      } else if (symbol is Power) {
+        stringBuilder.Append("(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")^round(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(1)));
+        stringBuilder.Append(")");
+      } else if (symbol is Root) {
+        stringBuilder.Append("(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")^(1 / round(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(1)));
+        stringBuilder.Append("))");
+      } else if (symbol is Derivative) {
+        stringBuilder.Append("fivePoint(");
+        // f0
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(", ");
+        // f1
+        currentLag--;
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(", ");
+        // f3
+        currentLag -= 2;
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(", ");
+        currentLag--;
+        // f4
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(")");
+        currentLag += 4;
+      } else if (symbol is Integral) {
+        var laggedNode = node as LaggedTreeNode;
+        string prevCounterVariable = CurrentIndexVariable;
+        string counterVariable = AllocateIndexVariable();
+        stringBuilder.AppendLine(" sum (map(@(" + counterVariable + ") " + FormatRecursively(node.GetSubtree(0)) +
+                                 ", (" + prevCounterVariable + "+" + laggedNode.Lag + "):" + prevCounterVariable +
+                                 "))");
+        ReleaseIndexVariable();
+      } else if (symbol is TimeLag) {
+        var laggedNode = node as LaggedTreeNode;
+        currentLag += laggedNode.Lag;
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        currentLag -= laggedNode.Lag;
+      } else {
+        stringBuilder.Append("ERROR");
+      }
+      return stringBuilder.ToString();
+    }
+
+
+    private string LagToString(int lag) {
+      if (lag < 0) {
+        return "(" + CurrentIndexVariable + "" + lag + ")";
+      } else if (lag > 0) {
+        return "(" + CurrentIndexVariable + "+" + lag + ")";
+      } else return "(" + CurrentIndexVariable + ")";
+    }
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionSmalltalkFormatter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionSmalltalkFormatter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionSmalltalkFormatter.cs	(revision 10269)
@@ -0,0 +1,185 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Globalization;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+
+  [Item("Smalltalk String Formatter", "String formatter for string representations of symbolic expression trees in Smalltalk syntax.")]
+  public class SymbolicDataAnalysisExpressionSmalltalkFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter {
+
+    protected SymbolicDataAnalysisExpressionSmalltalkFormatter(SymbolicDataAnalysisExpressionSmalltalkFormatter original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicDataAnalysisExpressionSmalltalkFormatter()
+      : base() {
+      Name = ItemName;
+      Description = ItemDescription;
+    }
+
+    public string Format(ISymbolicExpressionTree symbolicExpressionTree) {
+      return FormatRecursively(symbolicExpressionTree.Root);
+    }
+
+    // returns the smalltalk expression corresponding to the node 
+    // smalltalk expressions are always surrounded by parantheses "(<expr>)"
+    private string FormatRecursively(ISymbolicExpressionTreeNode node) {
+
+      ISymbol symbol = node.Symbol;
+
+      if (symbol is ProgramRootSymbol || symbol is StartSymbol)
+        return FormatRecursively(node.GetSubtree(0));
+
+      StringBuilder stringBuilder = new StringBuilder(20);
+
+      stringBuilder.Append("(");
+
+      if (symbol is Addition) {
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          if (i > 0) stringBuilder.Append("+");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+        }
+      } else if (symbol is And) {
+        stringBuilder.Append("(");
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          if (i > 0) stringBuilder.Append("&");
+          stringBuilder.Append("(");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+          stringBuilder.Append(" > 0)");
+        }
+        stringBuilder.Append(") ifTrue:[1] ifFalse:[-1]");
+      } else if (symbol is Average) {
+        stringBuilder.Append("(1/");
+        stringBuilder.Append(node.SubtreeCount);
+        stringBuilder.Append(")*(");
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          if (i > 0) stringBuilder.Append("+");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+        }
+        stringBuilder.Append(")");
+      } else if (symbol is Constant) {
+        ConstantTreeNode constantTreeNode = node as ConstantTreeNode;
+        stringBuilder.Append(constantTreeNode.Value.ToString(CultureInfo.InvariantCulture));
+      } else if (symbol is Cosine) {
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(" cos");
+      } else if (symbol is Division) {
+        if (node.SubtreeCount == 1) {
+          stringBuilder.Append("1/");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        } else {
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+          stringBuilder.Append("/(");
+          for (int i = 1; i < node.SubtreeCount; i++) {
+            if (i > 1) stringBuilder.Append("*");
+            stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+          }
+          stringBuilder.Append(")");
+        }
+      } else if (symbol is Exponential) {
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(" exp");
+      } else if (symbol is GreaterThan) {
+        stringBuilder.Append("(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(" > ");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(1)));
+        stringBuilder.Append(") ifTrue: [1] ifFalse: [-1]");
+      } else if (symbol is IfThenElse) {
+        stringBuilder.Append("(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(" > 0) ifTrue: [");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(1)));
+        stringBuilder.Append("] ifFalse: [");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(2)));
+        stringBuilder.Append("]");
+      } else if (symbol is LaggedVariable) {
+        stringBuilder.Append("lagged variable not implemented");
+      } else if (symbol is LessThan) {
+        stringBuilder.Append("(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(" < ");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(1)));
+        stringBuilder.Append(") ifTrue: [1] ifFalse: [-1]");
+      } else if (symbol is Logarithm) {
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append("ln");
+      } else if (symbol is Multiplication) {
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          if (i > 0) stringBuilder.Append("*");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+        }
+      } else if (symbol is Not) {
+        stringBuilder.Append("(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(">0) ifTrue: [-1] ifFalse: [1.0]");
+      } else if (symbol is Or) {
+        stringBuilder.Append("(");
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          if (i > 0) stringBuilder.Append("|");
+          stringBuilder.Append("(");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+          stringBuilder.Append(">0)");
+        }
+        stringBuilder.Append(") ifTrue:[1] ifFalse:[-1]");
+      } else if (symbol is Sine) {
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(" sin");
+      } else if (symbol is Subtraction) {
+        if (node.SubtreeCount == 1) {
+          stringBuilder.Append("-1*");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        } else {
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+          for (int i = 1; i < node.SubtreeCount; i++) {
+            stringBuilder.Append(" - ");
+            stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+          }
+        }
+      } else if (symbol is Tangent) {
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(" tan");
+      } else if (symbol is Variable) {
+        VariableTreeNode variableTreeNode = node as VariableTreeNode;
+        stringBuilder.Append(variableTreeNode.Weight.ToString(CultureInfo.InvariantCulture));
+        stringBuilder.Append("*");
+        stringBuilder.Append(variableTreeNode.VariableName);
+      } else {
+        stringBuilder.Append("(");
+        for (int i = 0; i < node.SubtreeCount; i++) {
+          if (i > 0) stringBuilder.Append(", ");
+          stringBuilder.Append(FormatRecursively(node.GetSubtree(i)));
+        }
+        stringBuilder.AppendFormat(" {0} [Not Supported] )", node.Symbol.Name);
+      }
+
+      stringBuilder.Append(")");
+
+      return stringBuilder.ToString();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisExpressionSmalltalkFormatter(this, cloner);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs	(revision 10269)
@@ -0,0 +1,81 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [NonDiscoverableType]
+  [StorableClass]
+  [Item("ArithmeticExpressionGrammar", "Represents a grammar for functional expressions using only arithmetic operations.")]
+  public class ArithmeticExpressionGrammar : SymbolicExpressionGrammar, ISymbolicDataAnalysisGrammar {
+
+    [StorableConstructor]
+    protected ArithmeticExpressionGrammar(bool deserializing) : base(deserializing) { }
+    protected ArithmeticExpressionGrammar(ArithmeticExpressionGrammar original, Cloner cloner) : base(original, cloner) { }
+    public ArithmeticExpressionGrammar()
+      : base(ItemAttribute.GetName(typeof(ArithmeticExpressionGrammar)), ItemAttribute.GetDescription(typeof(ArithmeticExpressionGrammar))) {
+      Initialize();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ArithmeticExpressionGrammar(this, cloner);
+    }
+
+    private void Initialize() {
+      var add = new Addition();
+      var sub = new Subtraction();
+      var mul = new Multiplication();
+      var div = new Division();
+      var constant = new Constant();
+      constant.MinValue = -20;
+      constant.MaxValue = 20;
+      var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable();
+
+      var allSymbols = new List<Symbol>() { add, sub, mul, div, constant, variableSymbol };
+      var functionSymbols = new List<Symbol>() { add, sub, mul, div };
+
+      foreach (var symb in allSymbols)
+        AddSymbol(symb);
+
+      foreach (var funSymb in functionSymbols) {
+        SetSubtreeCount(funSymb, 1, 3);
+      }
+      SetSubtreeCount(constant, 0, 0);
+      SetSubtreeCount(variableSymbol, 0, 0);
+
+      // allow each symbol as child of the start symbol
+      foreach (var symb in allSymbols) {
+        AddAllowedChildSymbol(StartSymbol, symb);
+        AddAllowedChildSymbol(DefunSymbol, symb);
+      }
+
+      // allow each symbol as child of every other symbol (except for terminals that have maxSubtreeCount == 0)
+      foreach (var parent in functionSymbols) {
+        foreach (var child in allSymbols)
+          AddAllowedChildSymbol(parent, child);
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs	(revision 10269)
@@ -0,0 +1,165 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("FullFunctionalExpressionGrammar", "Represents a grammar for functional expressions using all available functions.")]
+  public class FullFunctionalExpressionGrammar : SymbolicExpressionGrammar, ISymbolicDataAnalysisGrammar {
+    [StorableConstructor]
+    protected FullFunctionalExpressionGrammar(bool deserializing) : base(deserializing) { }
+    protected FullFunctionalExpressionGrammar(FullFunctionalExpressionGrammar original, Cloner cloner) : base(original, cloner) { }
+    public FullFunctionalExpressionGrammar()
+      : base(ItemAttribute.GetName(typeof(FullFunctionalExpressionGrammar)), ItemAttribute.GetDescription(typeof(FullFunctionalExpressionGrammar))) {
+      Initialize();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new FullFunctionalExpressionGrammar(this, cloner);
+    }
+
+    private void Initialize() {
+      var add = new Addition();
+      var sub = new Subtraction();
+      var mul = new Multiplication();
+      var div = new Division();
+      var mean = new Average();
+      var sin = new Sine();
+      var cos = new Cosine();
+      var tan = new Tangent();
+      var log = new Logarithm();
+      var pow = new Power();
+      pow.InitialFrequency = 0.0;
+      var square = new Square();
+      square.InitialFrequency = 0.0;
+      var root = new Root();
+      root.InitialFrequency = 0.0;
+      var sqrt = new SquareRoot();
+      sqrt.InitialFrequency = 0.0;
+      var airyA = new AiryA();
+      airyA.InitialFrequency = 0.0;
+      var airyB = new AiryB();
+      airyB.InitialFrequency = 0.0;
+      var bessel = new Bessel();
+      bessel.InitialFrequency = 0.0;
+      var cosineIntegral = new CosineIntegral();
+      cosineIntegral.InitialFrequency = 0.0;
+      var dawson = new Dawson();
+      dawson.InitialFrequency = 0.0;
+      var erf = new Erf();
+      erf.InitialFrequency = 0.0;
+      var expIntegralEi = new ExponentialIntegralEi();
+      expIntegralEi.InitialFrequency = 0.0;
+      var fresnelCosineIntegral = new FresnelCosineIntegral();
+      fresnelCosineIntegral.InitialFrequency = 0.0;
+      var fresnelSineIntegral = new FresnelSineIntegral();
+      fresnelSineIntegral.InitialFrequency = 0.0;
+      var gamma = new Gamma();
+      gamma.InitialFrequency = 0.0;
+      var hypCosineIntegral = new HyperbolicCosineIntegral();
+      hypCosineIntegral.InitialFrequency = 0.0;
+      var hypSineIntegral = new HyperbolicSineIntegral();
+      hypSineIntegral.InitialFrequency = 0.0;
+      var norm = new Norm();
+      norm.InitialFrequency = 0.0;
+      var psi = new Psi();
+      psi.InitialFrequency = 0.0;
+      var sineIntegral = new SineIntegral();
+      sineIntegral.InitialFrequency = 0.0;
+
+      var exp = new Exponential();
+      var @if = new IfThenElse();
+      var gt = new GreaterThan();
+      var lt = new LessThan();
+      var and = new And();
+      var or = new Or();
+      var not = new Not();
+
+      var timeLag = new TimeLag();
+      timeLag.InitialFrequency = 0.0;
+      var integral = new Integral();
+      integral.InitialFrequency = 0.0;
+      var derivative = new Derivative();
+      derivative.InitialFrequency = 0.0;
+
+      var variableCondition = new VariableCondition();
+      variableCondition.InitialFrequency = 0.0;
+
+      var constant = new Constant();
+      constant.MinValue = -20;
+      constant.MaxValue = 20;
+      var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable();
+      var laggedVariable = new LaggedVariable();
+      laggedVariable.InitialFrequency = 0.0;
+      var autoregressiveVariable = new AutoregressiveTargetVariable();
+      autoregressiveVariable.InitialFrequency = 0.0;
+      autoregressiveVariable.Enabled = false;
+
+      var allSymbols = new List<Symbol>() { add, sub, mul, div, mean, sin, cos, tan, log, square, pow, sqrt, root, exp,
+        airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral,
+        @if, gt, lt, and, or, not, timeLag, integral, derivative, constant, variableSymbol, laggedVariable,autoregressiveVariable, variableCondition };
+      var unaryFunctionSymbols = new List<Symbol>() { square, sqrt, sin, cos, tan, log, exp, not, timeLag, integral, derivative,
+        airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral
+      };
+
+      var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, variableCondition };
+      var ternarySymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or };
+      var terminalSymbols = new List<Symbol>() { variableSymbol, constant, laggedVariable, autoregressiveVariable };
+
+      foreach (var symb in allSymbols)
+        AddSymbol(symb);
+
+      foreach (var funSymb in ternarySymbols) {
+        SetSubtreeCount(funSymb, 1, 3);
+      }
+      foreach (var funSymb in unaryFunctionSymbols) {
+        SetSubtreeCount(funSymb, 1, 1);
+      }
+      foreach (var funSymb in binaryFunctionSymbols) {
+        SetSubtreeCount(funSymb, 2, 2);
+      }
+      foreach (var terminalSymbol in terminalSymbols) {
+        SetSubtreeCount(terminalSymbol, 0, 0);
+      }
+
+      SetSubtreeCount(@if, 3, 3);
+
+
+      // allow each symbol as child of the start symbol
+      foreach (var symb in allSymbols) {
+        AddAllowedChildSymbol(StartSymbol, symb);
+        AddAllowedChildSymbol(DefunSymbol, symb);
+      }
+
+      // allow each symbol as child of every other symbol (except for terminals that have maxSubtreeCount == 0)
+      foreach (var parent in allSymbols.Except(terminalSymbols)) {
+        foreach (var child in allSymbols)
+          AddAllowedChildSymbol(parent, child);
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs	(revision 10269)
@@ -0,0 +1,260 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("TypeCoherentExpressionGrammar", "Represents a grammar for functional expressions in which special syntactic constraints are enforced so that boolean and real-valued expressions are not mixed.")]
+  public class TypeCoherentExpressionGrammar : SymbolicExpressionGrammar, ISymbolicDataAnalysisGrammar {
+    private const string ArithmeticFunctionsName = "Arithmetic Functions";
+    private const string TrigonometricFunctionsName = "Trigonometric Functions";
+    private const string ExponentialFunctionsName = "Exponential and Logarithmic Functions";
+    private const string RealValuedSymbolsName = "Real Valued Symbols";
+    private const string TerminalsName = "Terminals";
+    private const string PowerFunctionsName = "Power Functions";
+    private const string ConditionsName = "Conditions";
+    private const string ComparisonsName = "Comparisons";
+    private const string BooleanOperatorsName = "Boolean Operators";
+    private const string ConditionalSymbolsName = "ConditionalSymbols";
+    private const string SpecialFunctionsName = "Special Functions";
+    private const string TimeSeriesSymbolsName = "Time Series Symbols";
+
+    [StorableConstructor]
+    protected TypeCoherentExpressionGrammar(bool deserializing) : base(deserializing) { }
+    protected TypeCoherentExpressionGrammar(TypeCoherentExpressionGrammar original, Cloner cloner) : base(original, cloner) { }
+    public TypeCoherentExpressionGrammar()
+      : base(ItemAttribute.GetName(typeof(TypeCoherentExpressionGrammar)), ItemAttribute.GetDescription(typeof(TypeCoherentExpressionGrammar))) {
+      Initialize();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new TypeCoherentExpressionGrammar(this, cloner);
+    }
+
+    private void Initialize() {
+      #region symbol declaration
+      var add = new Addition();
+      var sub = new Subtraction();
+      var mul = new Multiplication();
+      var div = new Division();
+      var mean = new Average();
+      var sin = new Sine();
+      var cos = new Cosine();
+      var tan = new Tangent();
+      var log = new Logarithm();
+      var pow = new Power();
+      var square = new Square();
+      var root = new Root();
+      var sqrt = new SquareRoot();
+      var exp = new Exponential();
+
+      var airyA = new AiryA();
+      var airyB = new AiryB();
+      var bessel = new Bessel();
+      var cosineIntegral = new CosineIntegral();
+      var dawson = new Dawson();
+      var erf = new Erf();
+      var expIntegralEi = new ExponentialIntegralEi();
+      var fresnelCosineIntegral = new FresnelCosineIntegral();
+      var fresnelSineIntegral = new FresnelSineIntegral();
+      var gamma = new Gamma();
+      var hypCosineIntegral = new HyperbolicCosineIntegral();
+      var hypSineIntegral = new HyperbolicSineIntegral();
+      var norm = new Norm();
+      var psi = new Psi();
+      var sineIntegral = new SineIntegral();
+
+      var @if = new IfThenElse();
+      var gt = new GreaterThan();
+      var lt = new LessThan();
+      var and = new And();
+      var or = new Or();
+      var not = new Not();
+      var variableCondition = new VariableCondition();
+
+      var timeLag = new TimeLag();
+      var integral = new Integral();
+      var derivative = new Derivative();
+
+      var constant = new Constant();
+      constant.MinValue = -20;
+      constant.MaxValue = 20;
+      var variableSymbol = new Variable();
+      var laggedVariable = new LaggedVariable();
+      var autoregressiveVariable = new AutoregressiveTargetVariable();
+      #endregion
+
+      #region group symbol declaration
+      var arithmeticSymbols = new GroupSymbol(ArithmeticFunctionsName, new List<ISymbol>() { add, sub, mul, div, mean });
+      var trigonometricSymbols = new GroupSymbol(TrigonometricFunctionsName, new List<ISymbol>() { sin, cos, tan });
+      var exponentialAndLogarithmicSymbols = new GroupSymbol(ExponentialFunctionsName, new List<ISymbol> { exp, log });
+      var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, 
+        fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral});
+      var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol });
+      var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, specialFunctions, terminalSymbols });
+
+      var powerSymbols = new GroupSymbol(PowerFunctionsName, new List<ISymbol> { square, pow, sqrt, root });
+
+      var conditionSymbols = new GroupSymbol(ConditionsName, new List<ISymbol> { @if, variableCondition });
+      var comparisonSymbols = new GroupSymbol(ComparisonsName, new List<ISymbol> { gt, lt });
+      var booleanOperationSymbols = new GroupSymbol(BooleanOperatorsName, new List<ISymbol> { and, or, not });
+      var conditionalSymbols = new GroupSymbol(ConditionalSymbolsName, new List<ISymbol> { conditionSymbols, comparisonSymbols, booleanOperationSymbols });
+
+      var timeSeriesSymbols = new GroupSymbol(TimeSeriesSymbolsName, new List<ISymbol> { timeLag, integral, derivative, laggedVariable, autoregressiveVariable });
+      #endregion
+
+      AddSymbol(realValuedSymbols);
+      AddSymbol(powerSymbols);
+      AddSymbol(conditionalSymbols);
+      AddSymbol(timeSeriesSymbols);
+
+      #region subtree count configuration
+      SetSubtreeCount(arithmeticSymbols, 2, 2);
+      SetSubtreeCount(trigonometricSymbols, 1, 1);
+      SetSubtreeCount(pow, 2, 2);
+      SetSubtreeCount(root, 2, 2);
+      SetSubtreeCount(square, 1, 1);
+      SetSubtreeCount(sqrt, 1, 1);
+      SetSubtreeCount(exponentialAndLogarithmicSymbols, 1, 1);
+      SetSubtreeCount(specialFunctions, 1, 1);
+      SetSubtreeCount(terminalSymbols, 0, 0);
+
+      SetSubtreeCount(@if, 3, 3);
+      SetSubtreeCount(variableCondition, 2, 2);
+      SetSubtreeCount(comparisonSymbols, 2, 2);
+      SetSubtreeCount(and, 2, 2);
+      SetSubtreeCount(or, 2, 2);
+      SetSubtreeCount(not, 1, 1);
+
+      SetSubtreeCount(timeLag, 1, 1);
+      SetSubtreeCount(integral, 1, 1);
+      SetSubtreeCount(derivative, 1, 1);
+      SetSubtreeCount(laggedVariable, 0, 0);
+      SetSubtreeCount(autoregressiveVariable, 0, 0);
+      #endregion
+
+      #region allowed child symbols configuration
+      AddAllowedChildSymbol(StartSymbol, realValuedSymbols);
+      AddAllowedChildSymbol(StartSymbol, powerSymbols);
+      AddAllowedChildSymbol(StartSymbol, conditionSymbols);
+      AddAllowedChildSymbol(StartSymbol, timeSeriesSymbols);
+      AddAllowedChildSymbol(StartSymbol, specialFunctions);
+
+      AddAllowedChildSymbol(DefunSymbol, realValuedSymbols);
+      AddAllowedChildSymbol(DefunSymbol, powerSymbols);
+      AddAllowedChildSymbol(DefunSymbol, conditionSymbols);
+      AddAllowedChildSymbol(DefunSymbol, timeSeriesSymbols);
+      AddAllowedChildSymbol(DefunSymbol, specialFunctions);
+
+      AddAllowedChildSymbol(realValuedSymbols, realValuedSymbols);
+      AddAllowedChildSymbol(realValuedSymbols, powerSymbols);
+      AddAllowedChildSymbol(realValuedSymbols, conditionSymbols);
+      AddAllowedChildSymbol(realValuedSymbols, timeSeriesSymbols);
+      AddAllowedChildSymbol(realValuedSymbols, specialFunctions);
+
+      AddAllowedChildSymbol(powerSymbols, variableSymbol, 0);
+      AddAllowedChildSymbol(powerSymbols, laggedVariable, 0);
+      AddAllowedChildSymbol(powerSymbols, autoregressiveVariable, 0);
+      AddAllowedChildSymbol(powerSymbols, constant, 1);
+
+      AddAllowedChildSymbol(square, realValuedSymbols, 0);
+      AddAllowedChildSymbol(square, conditionSymbols, 0);
+      AddAllowedChildSymbol(square, timeSeriesSymbols, 0);
+
+      AddAllowedChildSymbol(sqrt, realValuedSymbols, 0);
+      AddAllowedChildSymbol(sqrt, conditionSymbols, 0);
+      AddAllowedChildSymbol(sqrt, timeSeriesSymbols, 0);
+
+      AddAllowedChildSymbol(@if, comparisonSymbols, 0);
+      AddAllowedChildSymbol(@if, booleanOperationSymbols, 0);
+      AddAllowedChildSymbol(@if, conditionSymbols, 1);
+      AddAllowedChildSymbol(@if, realValuedSymbols, 1);
+      AddAllowedChildSymbol(@if, powerSymbols, 1);
+      AddAllowedChildSymbol(@if, timeSeriesSymbols, 1);
+      AddAllowedChildSymbol(@if, conditionSymbols, 2);
+      AddAllowedChildSymbol(@if, realValuedSymbols, 2);
+      AddAllowedChildSymbol(@if, powerSymbols, 2);
+      AddAllowedChildSymbol(@if, timeSeriesSymbols, 2);
+
+      AddAllowedChildSymbol(booleanOperationSymbols, comparisonSymbols);
+      AddAllowedChildSymbol(comparisonSymbols, realValuedSymbols);
+      AddAllowedChildSymbol(comparisonSymbols, powerSymbols);
+      AddAllowedChildSymbol(comparisonSymbols, conditionSymbols);
+      AddAllowedChildSymbol(comparisonSymbols, timeSeriesSymbols);
+
+      AddAllowedChildSymbol(variableCondition, realValuedSymbols);
+      AddAllowedChildSymbol(variableCondition, powerSymbols);
+      AddAllowedChildSymbol(variableCondition, conditionSymbols);
+      AddAllowedChildSymbol(variableCondition, timeSeriesSymbols);
+
+
+      AddAllowedChildSymbol(timeLag, realValuedSymbols);
+      AddAllowedChildSymbol(timeLag, powerSymbols);
+      AddAllowedChildSymbol(timeLag, conditionSymbols);
+
+      AddAllowedChildSymbol(integral, realValuedSymbols);
+      AddAllowedChildSymbol(integral, powerSymbols);
+      AddAllowedChildSymbol(integral, conditionSymbols);
+
+      AddAllowedChildSymbol(derivative, realValuedSymbols);
+      AddAllowedChildSymbol(derivative, powerSymbols);
+      AddAllowedChildSymbol(derivative, conditionSymbols);
+      #endregion
+    }
+
+    public void ConfigureAsDefaultRegressionGrammar() {
+      Symbols.First(s => s is Average).Enabled = false;
+      Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false;
+      Symbols.First(s => s.Name == PowerFunctionsName).Enabled = false;
+      Symbols.First(s => s.Name == SpecialFunctionsName).Enabled = false;
+      Symbols.First(s => s.Name == ConditionalSymbolsName).Enabled = false;
+      Symbols.First(s => s.Name == TimeSeriesSymbolsName).Enabled = false;
+    }
+
+    public void ConfigureAsDefaultClassificationGrammar() {
+      Symbols.First(s => s is Average).Enabled = false;
+      Symbols.First(s => s is VariableCondition).Enabled = false;
+      Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false;
+      Symbols.First(s => s.Name == ExponentialFunctionsName).Enabled = false;
+      Symbols.First(s => s.Name == SpecialFunctionsName).Enabled = false;
+      Symbols.First(s => s.Name == PowerFunctionsName).Enabled = false;
+      Symbols.First(s => s.Name == TimeSeriesSymbolsName).Enabled = false;
+    }
+
+    public void ConfigureAsDefaultTimeSeriesPrognosisGrammar() {
+      Symbols.First(s => s is Average).Enabled = false;
+      Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false;
+      Symbols.First(s => s.Name == PowerFunctionsName).Enabled = false;
+      Symbols.First(s => s.Name == ConditionalSymbolsName).Enabled = false;
+      Symbols.First(s => s.Name == SpecialFunctionsName).Enabled = false;
+
+      Symbols.Single(s => s.Name == "Variable").Enabled = false;
+      Symbols.First(s => s.Name == TimeSeriesSymbolsName).Enabled = true;
+      Symbols.First(s => s is Derivative).Enabled = false;
+      Symbols.First(s => s is Integral).Enabled = false;
+      Symbols.First(s => s is TimeLag).Enabled = false;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj	(revision 10269)
@@ -0,0 +1,357 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.DataAnalysis.Symbolic</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ALGLIB-3.7.0">
+      <HintPath>..\..\..\..\trunk\sources\bin\ALGLIB-3.7.0.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Analysis-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Collections-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common.Resources-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization.Operators-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Parameters-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Persistence-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Random-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs" />
+    <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer.cs" />
+    <Compile Include="Analyzers\SymbolicDataAnalysisMultiObjectiveValidationAnalyzer.cs" />
+    <Compile Include="Analyzers\SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs" />
+    <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveValidationAnalyzer.cs" />
+    <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs" />
+    <Compile Include="Analyzers\SymbolicDataAnalysisMultiObjectiveAnalyzer.cs" />
+    <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveAnalyzer.cs" />
+    <Compile Include="Analyzers\SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer.cs" />
+    <Compile Include="Analyzers\SymbolicDataAnalysisAnalyzer.cs" />
+    <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="SlidingWindow\GenerationalSlidingWindowAnalyzer.cs" />
+    <Compile Include="SlidingWindow\OffspringSelectionSlidingWindowAnalyzer.cs" />
+    <Compile Include="SlidingWindow\SlidingWindowAnalyzer.cs" />
+    <Compile Include="SlidingWindow\SlidingWindowData.cs" />
+    <Compile Include="SlidingWindow\SlidingWindowQualitiesAnalyzer.cs" />
+    <Compile Include="SlidingWindow\SlidingWindowVisualizer.cs" />
+    <Compile Include="SymbolicDataAnalysisSolutionPruningOptimizer.cs" />
+    <Compile Include="Analyzers\SymbolicDataAnalysisVariableFrequencyAnalyzer.cs" />
+    <Compile Include="Analyzers\SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs" />
+    <Compile Include="Creators\MultiSymbolicDataAnalysisExpressionCreator.cs" />
+    <Compile Include="Creators\SymbolicDataAnalysisExpressionFullTreeCreator.cs" />
+    <Compile Include="Creators\SymbolicDataAnalysisExpressionGrowTreeCreator.cs" />
+    <Compile Include="Creators\SymbolicDataAnalysisExpressionRampedHalfAndHalfTreeCreator.cs" />
+    <Compile Include="Creators\SymbolicDataAnalysisExpressionTreeCreator.cs" />
+    <Compile Include="Crossovers\MultiSymbolicDataAnalysisExpressionCrossover.cs" />
+    <Compile Include="Crossovers\SymbolicDataAnalysisExpressionContextAwareCrossover.cs" />
+    <Compile Include="Crossovers\SymbolicDataAnalysisExpressionCrossover.cs" />
+    <Compile Include="Crossovers\SymbolicDataAnalysisExpressionDepthConstrainedCrossover.cs" />
+    <Compile Include="Crossovers\SymbolicDataAnalysisExpressionDeterministicBestCrossover.cs" />
+    <Compile Include="Crossovers\SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossover.cs" />
+    <Compile Include="Crossovers\SymbolicDataAnalysisExpressionSemanticSimilarityCrossover.cs" />
+    <Compile Include="Formatters\SymbolicDataAnalysisExpressionExcelFormatter.cs" />
+    <Compile Include="Formatters\SymbolicDataAnalysisExpressionSmalltalkFormatter.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisExpressionCrossover.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisImpactValuesCalculator.cs" />
+    <Compile Include="Interpreter\InterpreterState.cs" />
+    <Compile Include="Interpreter\OpCodes.cs" />
+    <Compile Include="Interpreter\SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs" />
+    <Compile Include="Interpreter\SymbolicDataAnalysisExpressionTreeInterpreter.cs" />
+    <Compile Include="Interpreter\SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs" />
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Formatters\SymbolicDataAnalysisExpressionLatexFormatter.cs" />
+    <Compile Include="Formatters\SymbolicDataAnalysisExpressionMATLABFormatter.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisBoundedOperator.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisExpressionTreeInterpreter.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisProblem.cs" />
+    <Compile Include="SymbolicDataAnalysisModel.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="SymbolicDataAnalysisMultiObjectiveProblem.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisValidationAnalyzer.cs" />
+    <Compile Include="Grammars\ArithmeticExpressionGrammar.cs" />
+    <Compile Include="Grammars\FullFunctionalExpressionGrammar.cs" />
+    <Compile Include="Grammars\TypeCoherentExpressionGrammar.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisMultiObjectiveAnalyzer.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisSingleObjectiveAnalyzer.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisAnalyzer.cs" />
+    <Compile Include="SymbolicDataAnalysisSingleObjectiveProblem.cs" />
+    <Compile Include="SymbolicDataAnalysisExpressionTreeSimplifier.cs" />
+    <Compile Include="SymbolicDataAnalysisProblem.cs" />
+    <Compile Include="SymbolicDataAnalysisSolutionImpactValuesCalculator.cs" />
+    <Compile Include="Symbols\Addition.cs" />
+    <Compile Include="Symbols\And.cs" />
+    <Compile Include="Symbols\AutoregressiveVariable.cs" />
+    <Compile Include="Symbols\Average.cs" />
+    <Compile Include="Symbols\Constant.cs" />
+    <Compile Include="Symbols\ConstantTreeNode.cs" />
+    <Compile Include="Symbols\AiryA.cs" />
+    <Compile Include="Symbols\AiryB.cs" />
+    <Compile Include="Symbols\Bessel.cs" />
+    <Compile Include="Symbols\Erf.cs" />
+    <Compile Include="Symbols\Norm.cs" />
+    <Compile Include="Symbols\FresnelCosineIntegral.cs" />
+    <Compile Include="Symbols\FresnelSineIntegral.cs" />
+    <Compile Include="Symbols\HyperbolicSineIntegral.cs" />
+    <Compile Include="Symbols\HyperbolicCosineIntegral.cs" />
+    <Compile Include="Symbols\SineIntegral.cs" />
+    <Compile Include="Symbols\CosineIntegral.cs" />
+    <Compile Include="Symbols\ExponentialIntegralEi.cs" />
+    <Compile Include="Symbols\Dawson.cs" />
+    <Compile Include="Symbols\Psi.cs" />
+    <Compile Include="Symbols\Gamma.cs" />
+    <Compile Include="Symbols\SquareRoot.cs" />
+    <Compile Include="Symbols\Square.cs" />
+    <Compile Include="Symbols\Cosine.cs" />
+    <Compile Include="Symbols\Derivative.cs" />
+    <Compile Include="Symbols\Division.cs" />
+    <Compile Include="Symbols\Exponential.cs" />
+    <Compile Include="Symbols\GreaterThan.cs" />
+    <Compile Include="Symbols\IfThenElse.cs" />
+    <Compile Include="Symbols\ILaggedTreeNode.cs" />
+    <Compile Include="Symbols\Integral.cs" />
+    <Compile Include="Symbols\LaggedSymbol.cs" />
+    <Compile Include="Symbols\LaggedTreeNode.cs" />
+    <Compile Include="Symbols\LaggedVariable.cs" />
+    <Compile Include="Symbols\LaggedVariableTreeNode.cs" />
+    <Compile Include="Symbols\LessThan.cs" />
+    <Compile Include="Symbols\Logarithm.cs" />
+    <Compile Include="Symbols\Multiplication.cs" />
+    <Compile Include="Symbols\Not.cs" />
+    <Compile Include="Symbols\Or.cs" />
+    <Compile Include="Symbols\Power.cs" />
+    <Compile Include="Symbols\Root.cs" />
+    <Compile Include="Symbols\Sine.cs" />
+    <Compile Include="Symbols\Subtraction.cs" />
+    <Compile Include="Symbols\Tangent.cs" />
+    <Compile Include="Symbols\TimeLag.cs" />
+    <Compile Include="Symbols\Variable.cs" />
+    <Compile Include="Symbols\VariableCondition.cs" />
+    <Compile Include="Symbols\VariableConditionTreeNode.cs" />
+    <Compile Include="Symbols\VariableTreeNode.cs" />
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+    <Compile Include="Evaluators\SymbolicDataAnalysisMultiObjectiveEvaluator.cs" />
+    <Compile Include="Evaluators\SymbolicDataAnalysisSingleObjectiveEvaluator.cs" />
+    <Compile Include="Evaluators\SymbolicDataAnalysisEvaluator.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisInterpreterOperator.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisMultiObjectiveEvaluator.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisEvaluator.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisGrammar.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisModel.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisSingleObjectiveEvaluator.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisSolution.cs" />
+    <Compile Include="Interfaces\ISymbolicDataAnalysisSolutionCreator.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
+      <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.EvolutionTracking\3.4\HeuristicLab.EvolutionTracking-3.4.csproj">
+      <Project>{1f75cea3-464f-4a6f-b2f0-04b9841ebc16}</Project>
+      <Name>HeuristicLab.EvolutionTracking-3.4</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+</PreBuildEvent>
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+export ProjectDir=$(ProjectDir)
+export SolutionDir=$(SolutionDir)
+
+$SolutionDir/PreBuildEvent.sh
+</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisAnalyzer.cs	(revision 10269)
@@ -0,0 +1,31 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisAnalyzer : IAnalyzer {
+    IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter { get; }
+    ILookupParameter<ResultCollection> ResultCollectionParameter { get; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisBoundedOperator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisBoundedOperator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisBoundedOperator.cs	(revision 10269)
@@ -0,0 +1,27 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisBoundedOperator : IOperator {
+    IValueLookupParameter<DoubleLimit> EstimationLimitsParameter { get; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisEvaluator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisEvaluator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisEvaluator.cs	(revision 10269)
@@ -0,0 +1,35 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisEvaluator<T> : IEvaluator
+  where T : class,IDataAnalysisProblemData {
+    ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter { get; }
+    IValueLookupParameter<IntRange> EvaluationPartitionParameter { get; }
+    IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter { get; }
+    ILookupParameter<BoolValue> ApplyLinearScalingParameter { get; }
+
+    IValueLookupParameter<T> ProblemDataParameter { get; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisExpressionCrossover.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisExpressionCrossover.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisExpressionCrossover.cs	(revision 10269)
@@ -0,0 +1,35 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisExpressionCrossover<T> : ISymbolicExpressionTreeCrossover,
+    ISymbolicExpressionTreeSizeConstraintOperator, ISymbolicDataAnalysisInterpreterOperator
+    where T : class, IDataAnalysisProblemData {
+    IValueLookupParameter<T> ProblemDataParameter { get; }
+    ILookupParameter<ISymbolicDataAnalysisSingleObjectiveEvaluator<T>> EvaluatorParameter { get; }
+    IValueLookupParameter<IntRange> EvaluationPartitionParameter { get; }
+    IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter { get; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisExpressionTreeInterpreter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 10269)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisExpressionTreeInterpreter : INamedItem, IStatefulItem {
+    IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows);
+    IntValue EvaluatedSolutions { get; set; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisGrammar.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisGrammar.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisGrammar.cs	(revision 10269)
@@ -0,0 +1,27 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisGrammar : ISymbolicExpressionGrammar {
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisImpactValuesCalculator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisImpactValuesCalculator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisImpactValuesCalculator.cs	(revision 10269)
@@ -0,0 +1,9 @@
+﻿using System.Collections.Generic;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisSolutionImpactValuesCalculator {
+    double CalculateReplacementValue(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, IEnumerable<int> rows);
+    double CalculateImpactValue(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, IEnumerable<int> rows, double originalQuality = double.NaN);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisInterpreterOperator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisInterpreterOperator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisInterpreterOperator.cs	(revision 10269)
@@ -0,0 +1,28 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisInterpreterOperator : IOperator {
+    ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter { get; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisModel.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisModel.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisModel.cs	(revision 10269)
@@ -0,0 +1,31 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisModel : IDataAnalysisModel {
+    ISymbolicExpressionTree SymbolicExpressionTree { get; }
+    ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter { get; }
+
+    double LowerEstimationLimit { get; }
+    double UpperEstimationLimit { get; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisMultiObjectiveAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisMultiObjectiveAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisMultiObjectiveAnalyzer.cs	(revision 10269)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisMultiObjectiveAnalyzer : ISymbolicDataAnalysisAnalyzer {
+    IScopeTreeLookupParameter<DoubleArray> QualitiesParameter { get; }
+    ILookupParameter<BoolArray> MaximizationParameter { get; }
+    ILookupParameter<BoolValue> ApplyLinearScalingParameter { get; }
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisMultiObjectiveEvaluator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisMultiObjectiveEvaluator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisMultiObjectiveEvaluator.cs	(revision 10269)
@@ -0,0 +1,34 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+using System.Collections.Generic;
+using HeuristicLab.Optimization;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisMultiObjectiveEvaluator<T> : ISymbolicDataAnalysisEvaluator<T>, IMultiObjectiveEvaluator
+  where T : class,IDataAnalysisProblemData {
+    IEnumerable<bool> Maximization { get; }
+    double[] Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, T problemData, IEnumerable<int> rows);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisProblem.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisProblem.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisProblem.cs	(revision 10269)
@@ -0,0 +1,51 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisProblem : IDataAnalysisProblem, IHeuristicOptimizationProblem {
+    IValueParameter<ISymbolicDataAnalysisGrammar> SymbolicExpressionTreeGrammarParameter { get; }
+    IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter { get; }
+    IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter { get; }
+    IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter { get; }
+    IFixedValueParameter<IntValue> MaximumFunctionDefinitionsParameter { get; }
+    IFixedValueParameter<IntValue> MaximumFunctionArgumentsParameter { get; }
+    IFixedValueParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter { get; }
+    IFixedValueParameter<IntRange> FitnessCalculationPartitionParameter { get; }
+    IFixedValueParameter<IntRange> ValidationPartitionParameter { get; }
+
+    ISymbolicDataAnalysisGrammar SymbolicExpressionTreeGrammar { get; set; }
+    ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicExpressionTreeInterpreter { get; set; }
+    IntValue MaximumSymbolicExpressionTreeDepth { get; }
+    IntValue MaximumSymbolicExpressionTreeLength { get; }
+    IntValue MaximumFunctionDefinitions { get; }
+    IntValue MaximumFunctionArguments { get; }
+    PercentValue RelativeNumberOfEvaluatedSamples { get; }
+    IntRange FitnessCalculationPartition { get; }
+    IntRange ValidationPartition { get; }
+  }
+
+  public interface ISymbolicDataAnalysisSingleObjectiveProblem : ISymbolicDataAnalysisProblem, ISingleObjectiveHeuristicOptimizationProblem { }
+  public interface ISymbolicDataAnalysisMultiObjectiveProblem : ISymbolicDataAnalysisProblem, IMultiObjectiveHeuristicOptimizationProblem { }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSingleObjectiveAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSingleObjectiveAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSingleObjectiveAnalyzer.cs	(revision 10269)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisSingleObjectiveAnalyzer : ISymbolicDataAnalysisAnalyzer {
+    IScopeTreeLookupParameter<DoubleValue> QualityParameter { get; }
+    ILookupParameter<BoolValue> MaximizationParameter { get; }
+    ILookupParameter<BoolValue> ApplyLinearScalingParameter { get; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSingleObjectiveEvaluator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSingleObjectiveEvaluator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSingleObjectiveEvaluator.cs	(revision 10269)
@@ -0,0 +1,33 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Optimization;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using System.Collections.Generic;
+using HeuristicLab.Core;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisSingleObjectiveEvaluator<T> : ISymbolicDataAnalysisEvaluator<T>, ISingleObjectiveEvaluator
+    where T : class,IDataAnalysisProblemData {
+    bool Maximization { get; }
+
+    double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, T problemData, IEnumerable<int> rows);
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSolution.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSolution.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSolution.cs	(revision 10269)
@@ -0,0 +1,27 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisSolution : IDataAnalysisSolution {
+    new ISymbolicDataAnalysisModel Model { get; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSolutionCreator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSolutionCreator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSolutionCreator.cs	(revision 10269)
@@ -0,0 +1,27 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisSolutionCreator : ISymbolicExpressionTreeCreator, ISolutionCreator {
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisValidationAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisValidationAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisValidationAnalyzer.cs	(revision 10269)
@@ -0,0 +1,33 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ISymbolicDataAnalysisValidationAnalyzer<T, U> : ISymbolicDataAnalysisAnalyzer, ISymbolicDataAnalysisInterpreterOperator
+    where T : class,ISymbolicDataAnalysisEvaluator<U>
+    where U : class, IDataAnalysisProblemData {
+    ILookupParameter<IRandom> RandomParameter { get; }
+    ILookupParameter<U> ProblemDataParameter { get; }
+    ILookupParameter<T> EvaluatorParameter { get; }
+    IValueLookupParameter<IntRange> ValidationPartitionParameter { get; }
+    IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter { get; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/InterpreterState.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/InterpreterState.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/InterpreterState.cs	(revision 10269)
@@ -0,0 +1,93 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public class InterpreterState {
+    private readonly double[] argumentStack;
+    private int argumentStackPointer;
+    private readonly Instruction[] code;
+
+    public int ProgramCounter { get; set; }
+    public bool InLaggedContext { get; set; }
+
+    public InterpreterState(Instruction[] code, int argumentStackSize) {
+      this.code = code;
+      this.ProgramCounter = 0;
+      this.InLaggedContext = false;
+      if (argumentStackSize > 0) {
+        this.argumentStack = new double[argumentStackSize];
+      }
+      this.argumentStackPointer = 0;
+    }
+
+    public void Reset() {
+      this.ProgramCounter = 0;
+      this.argumentStackPointer = 0;
+      this.InLaggedContext = false;
+    }
+
+    public Instruction NextInstruction() {
+      return code[ProgramCounter++];
+    }
+    // skips a whole branch
+    public void SkipInstructions() {
+      int i = 1;
+      while (i > 0) {
+        i += NextInstruction().nArguments;
+        i--;
+      }
+    }
+
+    private void Push(double val) {
+      argumentStack[argumentStackPointer++] = val;
+    }
+    private double Pop() {
+      return argumentStack[--argumentStackPointer];
+    }
+
+    public void CreateStackFrame(double[] argValues) {
+      // push in reverse order to make indexing easier
+      for (int i = argValues.Length - 1; i >= 0; i--) {
+        argumentStack[argumentStackPointer++] = argValues[i];
+      }
+      Push(argValues.Length);
+    }
+
+    public void RemoveStackFrame() {
+      int size = (int)Pop();
+      argumentStackPointer -= size;
+    }
+
+    public double GetStackFrameValue(ushort index) {
+      // layout of stack:
+      // [0]   <- argumentStackPointer
+      // [StackFrameSize = N + 1]
+      // [Arg0] <- argumentStackPointer - 2 - 0
+      // [Arg1] <- argumentStackPointer - 2 - 1
+      // [...]
+      // [ArgN] <- argumentStackPointer - 2 - N
+      // <Begin of stack frame>
+      return argumentStack[argumentStackPointer - index - 2];
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs	(revision 10269)
@@ -0,0 +1,139 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public static 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 Sin = 5;
+    public const byte Cos = 6;
+    public const byte Tan = 7;
+
+    public const byte Log = 8;
+    public const byte Exp = 9;
+
+    public const byte IfThenElse = 10;
+
+    public const byte GT = 11;
+    public const byte LT = 12;
+
+    public const byte AND = 13;
+    public const byte OR = 14;
+    public const byte NOT = 15;
+
+
+    public const byte Average = 16;
+
+    public const byte Call = 17;
+
+    public const byte Variable = 18;
+    public const byte LagVariable = 19;
+    public const byte Constant = 20;
+    public const byte Arg = 21;
+
+    public const byte Power = 22;
+    public const byte Root = 23;
+    public const byte TimeLag = 24;
+    public const byte Integral = 25;
+    public const byte Derivative = 26;
+
+    public const byte VariableCondition = 27;
+
+    public const byte Square = 28;
+    public const byte SquareRoot = 29;
+    public const byte Gamma = 30;
+    public const byte Psi = 31;
+    public const byte Dawson = 32;
+    public const byte ExponentialIntegralEi = 33;
+    public const byte CosineIntegral = 34;
+    public const byte SineIntegral = 35;
+    public const byte HyperbolicCosineIntegral = 36;
+    public const byte HyperbolicSineIntegral = 37;
+    public const byte FresnelCosineIntegral = 38;
+    public const byte FresnelSineIntegral = 39;
+    public const byte AiryA = 40;
+    public const byte AiryB = 41;
+    public const byte Norm = 42;
+    public const byte Erf = 43;
+    public const byte Bessel = 44;
+
+    private static Dictionary<Type, byte> symbolToOpcode = new Dictionary<Type, byte>() {
+       { typeof(Addition), OpCodes.Add },
+      { typeof(Subtraction), OpCodes.Sub },
+      { typeof(Multiplication), OpCodes.Mul },
+      { typeof(Division), OpCodes.Div },
+      { typeof(Sine), OpCodes.Sin },
+      { typeof(Cosine), OpCodes.Cos },
+      { typeof(Tangent), OpCodes.Tan },
+      { typeof(Logarithm), OpCodes.Log },
+      { typeof(Exponential), OpCodes.Exp },
+      { typeof(IfThenElse), OpCodes.IfThenElse },
+      { typeof(GreaterThan), OpCodes.GT },
+      { typeof(LessThan), OpCodes.LT },
+      { typeof(And), OpCodes.AND },
+      { typeof(Or), OpCodes.OR },
+      { typeof(Not), OpCodes.NOT},
+      { typeof(Average), OpCodes.Average},
+      { typeof(InvokeFunction), OpCodes.Call },
+      { typeof(Variable), OpCodes.Variable },
+      { typeof(LaggedVariable), OpCodes.LagVariable },
+      { typeof(AutoregressiveTargetVariable),OpCodes.LagVariable},
+      { typeof(Constant), OpCodes.Constant },
+      { typeof(Argument), OpCodes.Arg },
+      { typeof(Power),OpCodes.Power},
+      { typeof(Root),OpCodes.Root},
+      { typeof(TimeLag), OpCodes.TimeLag}, 
+      { typeof(Integral), OpCodes.Integral},
+      { typeof(Derivative), OpCodes.Derivative},
+      { typeof(VariableCondition),OpCodes.VariableCondition},
+      { typeof(Square),OpCodes.Square},
+      { typeof(SquareRoot),OpCodes.SquareRoot},
+      { typeof(Gamma), OpCodes.Gamma },
+      { typeof(Psi), OpCodes.Psi },
+      { typeof(Dawson), OpCodes.Dawson},
+      { typeof(ExponentialIntegralEi), OpCodes.ExponentialIntegralEi },
+      { typeof(CosineIntegral), OpCodes.CosineIntegral },
+      { typeof(SineIntegral), OpCodes.SineIntegral },
+      { typeof(HyperbolicCosineIntegral), OpCodes.HyperbolicCosineIntegral },
+      { typeof(HyperbolicSineIntegral), OpCodes.HyperbolicSineIntegral },
+      { typeof(FresnelCosineIntegral), OpCodes.FresnelCosineIntegral },
+      { typeof(FresnelSineIntegral), OpCodes.FresnelSineIntegral },
+      { typeof(AiryA), OpCodes.AiryA },
+      { typeof(AiryB), OpCodes.AiryB },
+      { typeof(Norm), OpCodes.Norm},
+      { typeof(Erf), OpCodes.Erf},
+      { typeof(Bessel), OpCodes.Bessel}   
+    };
+
+    public static byte MapSymbolToOpCode(ISymbolicExpressionTreeNode treeNode) {
+      byte opCode;
+      if (symbolToOpcode.TryGetValue(treeNode.Symbol.GetType(), out opCode)) return opCode;
+      else throw new NotSupportedException("Symbol: " + treeNode.Symbol);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs	(revision 10269)
@@ -0,0 +1,734 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Reflection.Emit;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("SymbolicDataAnalysisExpressionTreeILEmittingInterpreter", "Interpreter for symbolic expression trees.")]
+  public sealed class SymbolicDataAnalysisExpressionTreeILEmittingInterpreter : ParameterizedNamedItem, ISymbolicDataAnalysisExpressionTreeInterpreter {
+    private static readonly Type thisType = typeof(SymbolicDataAnalysisExpressionTreeILEmittingInterpreter);
+    internal delegate double CompiledFunction(int sampleIndex, IList<double>[] columns);
+
+    #region method infos
+    private static MethodInfo listGetValue = typeof(IList<double>).GetProperty("Item", new Type[] { typeof(int) }).GetGetMethod();
+
+    private static MethodInfo cos = typeof(Math).GetMethod("Cos", new Type[] { typeof(double) });
+    private static MethodInfo sin = typeof(Math).GetMethod("Sin", new Type[] { typeof(double) });
+    private static MethodInfo tan = typeof(Math).GetMethod("Tan", new Type[] { typeof(double) });
+    private static MethodInfo exp = typeof(Math).GetMethod("Exp", new Type[] { typeof(double) });
+    private static MethodInfo log = typeof(Math).GetMethod("Log", new Type[] { typeof(double) });
+    private static MethodInfo power = typeof(Math).GetMethod("Pow", new Type[] { typeof(double), typeof(double) });
+    private static MethodInfo round = typeof(Math).GetMethod("Round", new Type[] { typeof(double) });
+    private static MethodInfo sqrt = typeof(Math).GetMethod("Sqrt", new Type[] { typeof(double) });
+
+    private static MethodInfo airyA = thisType.GetMethod("AiryA", new Type[] { typeof(double) });
+    private static MethodInfo airyB = thisType.GetMethod("AiryB", new Type[] { typeof(double) });
+    private static MethodInfo gamma = thisType.GetMethod("Gamma", new Type[] { typeof(double) });
+    private static MethodInfo psi = thisType.GetMethod("Psi", new Type[] { typeof(double) });
+    private static MethodInfo dawson = thisType.GetMethod("Dawson", new Type[] { typeof(double) });
+    private static MethodInfo expIntegralEi = thisType.GetMethod("ExpIntegralEi", new Type[] { typeof(double) });
+    private static MethodInfo sinIntegral = thisType.GetMethod("SinIntegral", new Type[] { typeof(double) });
+    private static MethodInfo cosIntegral = thisType.GetMethod("CosIntegral", new Type[] { typeof(double) });
+    private static MethodInfo hypSinIntegral = thisType.GetMethod("HypSinIntegral", new Type[] { typeof(double) });
+    private static MethodInfo hypCosIntegral = thisType.GetMethod("HypCosIntegral", new Type[] { typeof(double) });
+    private static MethodInfo fresnelCosIntegral = thisType.GetMethod("FresnelCosIntegral", new Type[] { typeof(double) });
+    private static MethodInfo fresnelSinIntegral = thisType.GetMethod("FresnelSinIntegral", new Type[] { typeof(double) });
+    private static MethodInfo norm = thisType.GetMethod("Norm", new Type[] { typeof(double) });
+    private static MethodInfo erf = thisType.GetMethod("Erf", new Type[] { typeof(double) });
+    private static MethodInfo bessel = thisType.GetMethod("Bessel", new Type[] { typeof(double) });
+    #endregion
+
+    private const string CheckExpressionsWithIntervalArithmeticParameterName = "CheckExpressionsWithIntervalArithmetic";
+    private const string EvaluatedSolutionsParameterName = "EvaluatedSolutions";
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    #region parameter properties
+
+    public IValueParameter<BoolValue> CheckExpressionsWithIntervalArithmeticParameter {
+      get { return (IValueParameter<BoolValue>)Parameters[CheckExpressionsWithIntervalArithmeticParameterName]; }
+    }
+
+    public IValueParameter<IntValue> EvaluatedSolutionsParameter {
+      get { return (IValueParameter<IntValue>)Parameters[EvaluatedSolutionsParameterName]; }
+    }
+
+    #endregion
+
+    #region properties
+
+    public BoolValue CheckExpressionsWithIntervalArithmetic {
+      get { return CheckExpressionsWithIntervalArithmeticParameter.Value; }
+      set { CheckExpressionsWithIntervalArithmeticParameter.Value = value; }
+    }
+
+    public IntValue EvaluatedSolutions {
+      get { return EvaluatedSolutionsParameter.Value; }
+      set { EvaluatedSolutionsParameter.Value = value; }
+    }
+
+    #endregion
+
+
+    [StorableConstructor]
+    private SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(bool deserializing) : base(deserializing) { }
+
+    private SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(SymbolicDataAnalysisExpressionTreeILEmittingInterpreter original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(this, cloner);
+    }
+
+    public SymbolicDataAnalysisExpressionTreeILEmittingInterpreter()
+      : base("SymbolicDataAnalysisExpressionTreeILEmittingInterpreter", "Interpreter for symbolic expression trees.") {
+      Parameters.Add(new ValueParameter<BoolValue>(CheckExpressionsWithIntervalArithmeticParameterName, "Switch that determines if the interpreter checks the validity of expressions with interval arithmetic before evaluating the expression.", new BoolValue(false)));
+      Parameters.Add(new ValueParameter<IntValue>(EvaluatedSolutionsParameterName, "A counter for the total number of solutions the interpreter has evaluated", new IntValue(0)));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (!Parameters.ContainsKey(EvaluatedSolutionsParameterName))
+        Parameters.Add(new ValueParameter<IntValue>(EvaluatedSolutionsParameterName, "A counter for the total number of solutions the interpreter has evaluated", new IntValue(0)));
+    }
+
+    #region IStatefulItem
+
+    public void InitializeState() {
+      EvaluatedSolutions.Value = 0;
+    }
+
+    public void ClearState() {
+      EvaluatedSolutions.Value = 0;
+    }
+
+    #endregion
+
+    public IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) {
+      if (CheckExpressionsWithIntervalArithmetic.Value)
+        throw new NotSupportedException("Interval arithmetic is not yet supported in the symbolic data analysis interpreter.");
+
+      EvaluatedSolutions.Value++; // increment the evaluated solutions counter
+      var state = PrepareInterpreterState(tree, dataset);
+
+      Type[] methodArgs = { typeof(int), typeof(IList<double>[]) };
+      DynamicMethod testFun = new DynamicMethod("TestFun", typeof(double), methodArgs, typeof(SymbolicDataAnalysisExpressionTreeILEmittingInterpreter).Module);
+
+      ILGenerator il = testFun.GetILGenerator();
+      CompileInstructions(il, state, dataset);
+      il.Emit(System.Reflection.Emit.OpCodes.Conv_R8);
+      il.Emit(System.Reflection.Emit.OpCodes.Ret);
+      var function = (CompiledFunction)testFun.CreateDelegate(typeof(CompiledFunction));
+
+      IList<double>[] columns = dataset.DoubleVariables.Select(v => dataset.GetReadOnlyDoubleValues(v)).ToArray();
+
+      foreach (var row in rows) {
+        yield return function(row, columns);
+      }
+    }
+
+    private InterpreterState PrepareInterpreterState(ISymbolicExpressionTree tree, Dataset dataset) {
+      Instruction[] code = SymbolicExpressionTreeCompiler.Compile(tree, OpCodes.MapSymbolToOpCode);
+      Dictionary<string, int> doubleVariableNames = dataset.DoubleVariables.Select((x, i) => new { x, i }).ToDictionary(e => e.x, e => e.i);
+      int necessaryArgStackSize = 0;
+      foreach (Instruction instr in code) {
+        if (instr.opCode == OpCodes.Variable) {
+          var variableTreeNode = (VariableTreeNode)instr.dynamicNode;
+          instr.data = doubleVariableNames[variableTreeNode.VariableName];
+        } else if (instr.opCode == OpCodes.LagVariable) {
+          var laggedVariableTreeNode = (LaggedVariableTreeNode)instr.dynamicNode;
+          instr.data = doubleVariableNames[laggedVariableTreeNode.VariableName];
+        } else if (instr.opCode == OpCodes.VariableCondition) {
+          var variableConditionTreeNode = (VariableConditionTreeNode)instr.dynamicNode;
+          instr.data = doubleVariableNames[variableConditionTreeNode.VariableName];
+        } else if (instr.opCode == OpCodes.Call) {
+          necessaryArgStackSize += instr.nArguments + 1;
+        }
+      }
+      return new InterpreterState(code, necessaryArgStackSize);
+    }
+
+    private void CompileInstructions(ILGenerator il, InterpreterState state, Dataset ds) {
+      Instruction currentInstr = state.NextInstruction();
+      int nArgs = currentInstr.nArguments;
+
+      switch (currentInstr.opCode) {
+        case OpCodes.Add: {
+            if (nArgs > 0) {
+              CompileInstructions(il, state, ds);
+            }
+            for (int i = 1; i < nArgs; i++) {
+              CompileInstructions(il, state, ds);
+              il.Emit(System.Reflection.Emit.OpCodes.Add);
+            }
+            return;
+          }
+        case OpCodes.Sub: {
+            if (nArgs == 1) {
+              CompileInstructions(il, state, ds);
+              il.Emit(System.Reflection.Emit.OpCodes.Neg);
+              return;
+            }
+            if (nArgs > 0) {
+              CompileInstructions(il, state, ds);
+            }
+            for (int i = 1; i < nArgs; i++) {
+              CompileInstructions(il, state, ds);
+              il.Emit(System.Reflection.Emit.OpCodes.Sub);
+            }
+            return;
+          }
+        case OpCodes.Mul: {
+            if (nArgs > 0) {
+              CompileInstructions(il, state, ds);
+            }
+            for (int i = 1; i < nArgs; i++) {
+              CompileInstructions(il, state, ds);
+              il.Emit(System.Reflection.Emit.OpCodes.Mul);
+            }
+            return;
+          }
+        case OpCodes.Div: {
+            if (nArgs == 1) {
+              il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0);
+              CompileInstructions(il, state, ds);
+              il.Emit(System.Reflection.Emit.OpCodes.Div);
+              return;
+            }
+            if (nArgs > 0) {
+              CompileInstructions(il, state, ds);
+            }
+            for (int i = 1; i < nArgs; i++) {
+              CompileInstructions(il, state, ds);
+              il.Emit(System.Reflection.Emit.OpCodes.Div);
+            }
+            return;
+          }
+        case OpCodes.Average: {
+            CompileInstructions(il, state, ds);
+            for (int i = 1; i < nArgs; i++) {
+              CompileInstructions(il, state, ds);
+              il.Emit(System.Reflection.Emit.OpCodes.Add);
+            }
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, nArgs);
+            il.Emit(System.Reflection.Emit.OpCodes.Div);
+            return;
+          }
+        case OpCodes.Cos: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, cos);
+            return;
+          }
+        case OpCodes.Sin: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, sin);
+            return;
+          }
+        case OpCodes.Tan: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, tan);
+            return;
+          }
+        case OpCodes.Power: {
+            CompileInstructions(il, state, ds);
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, round);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, power);
+            return;
+          }
+        case OpCodes.Root: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // 1 / round(...)
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, round);
+            il.Emit(System.Reflection.Emit.OpCodes.Div);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, power);
+            return;
+          }
+        case OpCodes.Exp: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, exp);
+            return;
+          }
+        case OpCodes.Log: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, log);
+            return;
+          }
+        case OpCodes.Square: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 2.0);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, power);
+            return;
+          }
+        case OpCodes.SquareRoot: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, sqrt);
+            return;
+          }
+        case OpCodes.AiryA: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, airyA);
+            return;
+          }
+        case OpCodes.AiryB: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, airyB);
+            return;
+          }
+        case OpCodes.Bessel: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, bessel);
+            return;
+          }
+        case OpCodes.CosineIntegral: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, cosIntegral);
+            return;
+          }
+        case OpCodes.Dawson: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, dawson);
+            return;
+          }
+        case OpCodes.Erf: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, erf);
+            return;
+          }
+        case OpCodes.ExponentialIntegralEi: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, expIntegralEi);
+            return;
+          }
+        case OpCodes.FresnelCosineIntegral: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, fresnelCosIntegral);
+            return;
+          }
+        case OpCodes.FresnelSineIntegral: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, fresnelSinIntegral);
+            return;
+          }
+        case OpCodes.Gamma: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, gamma);
+            return;
+          }
+        case OpCodes.HyperbolicCosineIntegral: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, hypCosIntegral);
+            return;
+          }
+        case OpCodes.HyperbolicSineIntegral: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, hypSinIntegral);
+            return;
+          }
+        case OpCodes.Norm: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, norm);
+            return;
+          }
+        case OpCodes.Psi: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, psi);
+            return;
+          }
+        case OpCodes.SineIntegral: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, sinIntegral);
+            return;
+          }
+        case OpCodes.IfThenElse: {
+            Label end = il.DefineLabel();
+            Label c1 = il.DefineLabel();
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0); // > 0
+            il.Emit(System.Reflection.Emit.OpCodes.Cgt);
+            il.Emit(System.Reflection.Emit.OpCodes.Brfalse, c1);
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Br, end);
+            il.MarkLabel(c1);
+            CompileInstructions(il, state, ds);
+            il.MarkLabel(end);
+            return;
+          }
+        case OpCodes.AND: {
+            Label falseBranch = il.DefineLabel();
+            Label end = il.DefineLabel();
+            CompileInstructions(il, state, ds);
+            for (int i = 1; i < nArgs; i++) {
+              il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0); // > 0
+              il.Emit(System.Reflection.Emit.OpCodes.Cgt);
+              il.Emit(System.Reflection.Emit.OpCodes.Brfalse, falseBranch);
+              CompileInstructions(il, state, ds);
+            }
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0); // > 0
+            il.Emit(System.Reflection.Emit.OpCodes.Cgt);
+            il.Emit(System.Reflection.Emit.OpCodes.Brfalse, falseBranch);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // 1
+            il.Emit(System.Reflection.Emit.OpCodes.Br, end);
+            il.MarkLabel(falseBranch);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // -1
+            il.Emit(System.Reflection.Emit.OpCodes.Neg);
+            il.MarkLabel(end);
+            return;
+          }
+        case OpCodes.OR: {
+            Label trueBranch = il.DefineLabel();
+            Label end = il.DefineLabel();
+            Label resultBranch = il.DefineLabel();
+            CompileInstructions(il, state, ds);
+            for (int i = 1; i < nArgs; i++) {
+              Label nextArgBranch = il.DefineLabel();
+              // complex definition because of special properties of NaN  
+              il.Emit(System.Reflection.Emit.OpCodes.Dup);
+              il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0); // <= 0        
+              il.Emit(System.Reflection.Emit.OpCodes.Ble, nextArgBranch);
+              il.Emit(System.Reflection.Emit.OpCodes.Br, resultBranch);
+              il.MarkLabel(nextArgBranch);
+              il.Emit(System.Reflection.Emit.OpCodes.Pop);
+              CompileInstructions(il, state, ds);
+            }
+            il.MarkLabel(resultBranch);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0); // > 0
+            il.Emit(System.Reflection.Emit.OpCodes.Cgt);
+            il.Emit(System.Reflection.Emit.OpCodes.Brtrue, trueBranch);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // -1
+            il.Emit(System.Reflection.Emit.OpCodes.Neg);
+            il.Emit(System.Reflection.Emit.OpCodes.Br, end);
+            il.MarkLabel(trueBranch);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // 1
+            il.MarkLabel(end);
+            return;
+          }
+        case OpCodes.NOT: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0); // > 0
+            il.Emit(System.Reflection.Emit.OpCodes.Cgt);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 2.0); // * 2
+            il.Emit(System.Reflection.Emit.OpCodes.Mul);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // - 1
+            il.Emit(System.Reflection.Emit.OpCodes.Sub);
+            il.Emit(System.Reflection.Emit.OpCodes.Neg); // * -1
+            return;
+          }
+        case OpCodes.GT: {
+            CompileInstructions(il, state, ds);
+            CompileInstructions(il, state, ds);
+
+            il.Emit(System.Reflection.Emit.OpCodes.Cgt); // 1 (>) / 0 (otherwise)
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 2.0); // * 2
+            il.Emit(System.Reflection.Emit.OpCodes.Mul);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // - 1
+            il.Emit(System.Reflection.Emit.OpCodes.Sub);
+            return;
+          }
+        case OpCodes.LT: {
+            CompileInstructions(il, state, ds);
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Clt);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 2.0); // * 2
+            il.Emit(System.Reflection.Emit.OpCodes.Mul);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // - 1
+            il.Emit(System.Reflection.Emit.OpCodes.Sub);
+            return;
+          }
+        case OpCodes.TimeLag: {
+            LaggedTreeNode laggedTreeNode = (LaggedTreeNode)currentInstr.dynamicNode;
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // row -= lag
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, laggedTreeNode.Lag);
+            il.Emit(System.Reflection.Emit.OpCodes.Add);
+            il.Emit(System.Reflection.Emit.OpCodes.Starg, 0);
+            var prevLaggedContext = state.InLaggedContext;
+            state.InLaggedContext = true;
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // row += lag
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, laggedTreeNode.Lag);
+            il.Emit(System.Reflection.Emit.OpCodes.Sub);
+            il.Emit(System.Reflection.Emit.OpCodes.Starg, 0);
+            state.InLaggedContext = prevLaggedContext;
+            return;
+          }
+        case OpCodes.Integral: {
+            int savedPc = state.ProgramCounter;
+            LaggedTreeNode laggedTreeNode = (LaggedTreeNode)currentInstr.dynamicNode;
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // row -= lag
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, laggedTreeNode.Lag);
+            il.Emit(System.Reflection.Emit.OpCodes.Add);
+            il.Emit(System.Reflection.Emit.OpCodes.Starg, 0);
+            var prevLaggedContext = state.InLaggedContext;
+            state.InLaggedContext = true;
+            CompileInstructions(il, state, ds);
+            for (int l = laggedTreeNode.Lag; l < 0; l++) {
+              il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // row += lag
+              il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_1);
+              il.Emit(System.Reflection.Emit.OpCodes.Add);
+              il.Emit(System.Reflection.Emit.OpCodes.Starg, 0);
+              state.ProgramCounter = savedPc;
+              CompileInstructions(il, state, ds);
+              il.Emit(System.Reflection.Emit.OpCodes.Add);
+            }
+            state.InLaggedContext = prevLaggedContext;
+            return;
+          }
+
+        //mkommend: derivate calculation taken from: 
+        //http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/smooth-low-noise-differentiators/
+        //one sided smooth differentiatior, N = 4
+        // y' = 1/8h (f_i + 2f_i-1, -2 f_i-3 - f_i-4)
+        case OpCodes.Derivative: {
+            int savedPc = state.ProgramCounter;
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // row --
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_M1);
+            il.Emit(System.Reflection.Emit.OpCodes.Add);
+            il.Emit(System.Reflection.Emit.OpCodes.Starg, 0);
+            state.ProgramCounter = savedPc;
+            var prevLaggedContext = state.InLaggedContext;
+            state.InLaggedContext = true;
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 2.0); // f_0 + 2 * f_1
+            il.Emit(System.Reflection.Emit.OpCodes.Mul);
+            il.Emit(System.Reflection.Emit.OpCodes.Add);
+
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // row -=2
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_2);
+            il.Emit(System.Reflection.Emit.OpCodes.Sub);
+            il.Emit(System.Reflection.Emit.OpCodes.Starg, 0);
+            state.ProgramCounter = savedPc;
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 2.0); // f_0 + 2 * f_1 - 2 * f_3
+            il.Emit(System.Reflection.Emit.OpCodes.Mul);
+            il.Emit(System.Reflection.Emit.OpCodes.Sub);
+
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // row --
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_M1);
+            il.Emit(System.Reflection.Emit.OpCodes.Add);
+            il.Emit(System.Reflection.Emit.OpCodes.Starg, 0);
+            state.ProgramCounter = savedPc;
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Sub); // f_0 + 2 * f_1 - 2 * f_3 - f_4
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 8.0); // / 8
+            il.Emit(System.Reflection.Emit.OpCodes.Div);
+
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // row +=4
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_4);
+            il.Emit(System.Reflection.Emit.OpCodes.Add);
+            il.Emit(System.Reflection.Emit.OpCodes.Starg, 0);
+            state.InLaggedContext = prevLaggedContext;
+            return;
+          }
+        case OpCodes.Call: {
+            throw new NotSupportedException(
+              "Automatically defined functions are not supported by the SymbolicDataAnalysisTreeILEmittingInterpreter. Either turn of ADFs or change the interpeter.");
+          }
+        case OpCodes.Arg: {
+            throw new NotSupportedException(
+              "Automatically defined functions are not supported by the SymbolicDataAnalysisTreeILEmittingInterpreter. Either turn of ADFs or change the interpeter.");
+          }
+        case OpCodes.Variable: {
+            VariableTreeNode varNode = (VariableTreeNode)currentInstr.dynamicNode;
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // load columns array
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.data);
+            // load correct column of the current variable
+            il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // rowIndex
+            if (!state.InLaggedContext) {
+              il.Emit(System.Reflection.Emit.OpCodes.Call, listGetValue);
+              il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.Weight); // load weight
+              il.Emit(System.Reflection.Emit.OpCodes.Mul);
+            } else {
+              var nanResult = il.DefineLabel();
+              var normalResult = il.DefineLabel();
+              il.Emit(System.Reflection.Emit.OpCodes.Dup);
+              il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0);
+              il.Emit(System.Reflection.Emit.OpCodes.Blt, nanResult);
+              il.Emit(System.Reflection.Emit.OpCodes.Dup);
+              il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, ds.Rows);
+              il.Emit(System.Reflection.Emit.OpCodes.Bge, nanResult);
+              il.Emit(System.Reflection.Emit.OpCodes.Call, listGetValue);
+              il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.Weight); // load weight
+              il.Emit(System.Reflection.Emit.OpCodes.Mul);
+              il.Emit(System.Reflection.Emit.OpCodes.Br, normalResult);
+              il.MarkLabel(nanResult);
+              il.Emit(System.Reflection.Emit.OpCodes.Pop); // rowIndex
+              il.Emit(System.Reflection.Emit.OpCodes.Pop); // column reference
+              il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, double.NaN);
+              il.MarkLabel(normalResult);
+            }
+            return;
+          }
+        case OpCodes.LagVariable: {
+            var nanResult = il.DefineLabel();
+            var normalResult = il.DefineLabel();
+            LaggedVariableTreeNode varNode = (LaggedVariableTreeNode)currentInstr.dynamicNode;
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // load columns array
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.data);
+            // load correct column of the current variable
+            il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, varNode.Lag); // lag
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // rowIndex
+            il.Emit(System.Reflection.Emit.OpCodes.Add); // actualRowIndex = rowIndex + sampleOffset
+            il.Emit(System.Reflection.Emit.OpCodes.Dup);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0);
+            il.Emit(System.Reflection.Emit.OpCodes.Blt, nanResult);
+            il.Emit(System.Reflection.Emit.OpCodes.Dup);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, ds.Rows);
+            il.Emit(System.Reflection.Emit.OpCodes.Bge, nanResult);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, listGetValue);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.Weight); // load weight
+            il.Emit(System.Reflection.Emit.OpCodes.Mul);
+            il.Emit(System.Reflection.Emit.OpCodes.Br, normalResult);
+            il.MarkLabel(nanResult);
+            il.Emit(System.Reflection.Emit.OpCodes.Pop); // sample index
+            il.Emit(System.Reflection.Emit.OpCodes.Pop); // column reference
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, double.NaN);
+            il.MarkLabel(normalResult);
+            return;
+          }
+        case OpCodes.Constant: {
+            ConstantTreeNode constNode = (ConstantTreeNode)currentInstr.dynamicNode;
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, constNode.Value);
+            return;
+          }
+
+        //mkommend: this symbol uses the logistic function f(x) = 1 / (1 + e^(-alpha * x) ) 
+        //to determine the relative amounts of the true and false branch see http://en.wikipedia.org/wiki/Logistic_function
+        case OpCodes.VariableCondition: {
+            throw new NotSupportedException("Interpretation of symbol " + currentInstr.dynamicNode.Symbol.Name +
+                                            " is not supported by the SymbolicDataAnalysisTreeILEmittingInterpreter");
+          }
+        default:
+          throw new NotSupportedException("Interpretation of symbol " + currentInstr.dynamicNode.Symbol.Name +
+                                          " is not supported by the SymbolicDataAnalysisTreeILEmittingInterpreter");
+      }
+    }
+
+    public static double AiryA(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      double ai, aip, bi, bip;
+      alglib.airy(x, out ai, out aip, out bi, out bip);
+      return ai;
+    }
+
+    public static double AiryB(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      double ai, aip, bi, bip;
+      alglib.airy(x, out ai, out aip, out bi, out bip);
+      return bi;
+    }
+    public static double Dawson(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      return alglib.dawsonintegral(x);
+    }
+
+    public static double Gamma(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      return alglib.gammafunction(x);
+    }
+
+    public static double Psi(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      else if (x <= 0 && (Math.Floor(x) - x).IsAlmost(0)) return double.NaN;
+      return alglib.psi(x);
+    }
+
+    public static double ExpIntegralEi(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      return alglib.exponentialintegralei(x);
+    }
+
+    public static double SinIntegral(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      double si, ci;
+      alglib.sinecosineintegrals(x, out si, out ci);
+      return si;
+    }
+
+    public static double CosIntegral(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      double si, ci;
+      alglib.sinecosineintegrals(x, out si, out ci);
+      return ci;
+    }
+
+    public static double HypSinIntegral(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      double shi, chi;
+      alglib.hyperbolicsinecosineintegrals(x, out shi, out chi);
+      return shi;
+    }
+
+    public static double HypCosIntegral(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      double shi, chi;
+      alglib.hyperbolicsinecosineintegrals(x, out shi, out chi);
+      return chi;
+    }
+
+    public static double FresnelCosIntegral(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      double c = 0, s = 0;
+      alglib.fresnelintegral(x, ref c, ref s);
+      return c;
+    }
+
+    public static double FresnelSinIntegral(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      double c = 0, s = 0;
+      alglib.fresnelintegral(x, ref c, ref s);
+      return s;
+    }
+
+    public static double Norm(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      return alglib.normaldistribution(x);
+    }
+
+    public static double Erf(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      return alglib.errorfunction(x);
+    }
+
+    public static double Bessel(double x) {
+      if (double.IsNaN(x)) return double.NaN;
+      return alglib.besseli0(x);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 10269)
@@ -0,0 +1,456 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("SymbolicDataAnalysisExpressionTreeInterpreter", "Interpreter for symbolic expression trees including automatically defined functions.")]
+  public class SymbolicDataAnalysisExpressionTreeInterpreter : ParameterizedNamedItem, ISymbolicDataAnalysisExpressionTreeInterpreter {
+    private const string CheckExpressionsWithIntervalArithmeticParameterName = "CheckExpressionsWithIntervalArithmetic";
+    private const string EvaluatedSolutionsParameterName = "EvaluatedSolutions";
+
+    public override bool CanChangeName { get { return false; } }
+    public override bool CanChangeDescription { get { return false; } }
+
+    #region parameter properties
+    public IValueParameter<BoolValue> CheckExpressionsWithIntervalArithmeticParameter {
+      get { return (IValueParameter<BoolValue>)Parameters[CheckExpressionsWithIntervalArithmeticParameterName]; }
+    }
+
+    public IValueParameter<IntValue> EvaluatedSolutionsParameter {
+      get { return (IValueParameter<IntValue>)Parameters[EvaluatedSolutionsParameterName]; }
+    }
+    #endregion
+
+    #region properties
+    public BoolValue CheckExpressionsWithIntervalArithmetic {
+      get { return CheckExpressionsWithIntervalArithmeticParameter.Value; }
+      set { CheckExpressionsWithIntervalArithmeticParameter.Value = value; }
+    }
+
+    public IntValue EvaluatedSolutions {
+      get { return EvaluatedSolutionsParameter.Value; }
+      set { EvaluatedSolutionsParameter.Value = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisExpressionTreeInterpreter(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisExpressionTreeInterpreter(SymbolicDataAnalysisExpressionTreeInterpreter original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisExpressionTreeInterpreter(this, cloner);
+    }
+
+    public SymbolicDataAnalysisExpressionTreeInterpreter()
+      : base("SymbolicDataAnalysisExpressionTreeInterpreter", "Interpreter for symbolic expression trees including automatically defined functions.") {
+      Parameters.Add(new ValueParameter<BoolValue>(CheckExpressionsWithIntervalArithmeticParameterName, "Switch that determines if the interpreter checks the validity of expressions with interval arithmetic before evaluating the expression.", new BoolValue(false)));
+      Parameters.Add(new ValueParameter<IntValue>(EvaluatedSolutionsParameterName, "A counter for the total number of solutions the interpreter has evaluated", new IntValue(0)));
+    }
+
+    protected SymbolicDataAnalysisExpressionTreeInterpreter(string name, string description)
+      : base(name, description) {
+      Parameters.Add(new ValueParameter<BoolValue>(CheckExpressionsWithIntervalArithmeticParameterName, "Switch that determines if the interpreter checks the validity of expressions with interval arithmetic before evaluating the expression.", new BoolValue(false)));
+      Parameters.Add(new ValueParameter<IntValue>(EvaluatedSolutionsParameterName, "A counter for the total number of solutions the interpreter has evaluated", new IntValue(0)));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (!Parameters.ContainsKey(EvaluatedSolutionsParameterName))
+        Parameters.Add(new ValueParameter<IntValue>(EvaluatedSolutionsParameterName, "A counter for the total number of solutions the interpreter has evaluated", new IntValue(0)));
+    }
+
+    #region IStatefulItem
+    public void InitializeState() {
+      EvaluatedSolutions.Value = 0;
+    }
+
+    public void ClearState() {
+    }
+    #endregion
+
+    public IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) {
+      if (CheckExpressionsWithIntervalArithmetic.Value)
+        throw new NotSupportedException("Interval arithmetic is not yet supported in the symbolic data analysis interpreter.");
+
+      lock (EvaluatedSolutions) {
+        EvaluatedSolutions.Value++; // increment the evaluated solutions counter
+      }
+      var state = PrepareInterpreterState(tree, dataset);
+
+      foreach (var rowEnum in rows) {
+        int row = rowEnum;
+        yield return Evaluate(dataset, ref row, state);
+        state.Reset();
+      }
+    }
+
+    private static InterpreterState PrepareInterpreterState(ISymbolicExpressionTree tree, Dataset dataset) {
+      Instruction[] code = SymbolicExpressionTreeCompiler.Compile(tree, OpCodes.MapSymbolToOpCode);
+      int necessaryArgStackSize = 0;
+      foreach (Instruction instr in code) {
+        if (instr.opCode == OpCodes.Variable) {
+          var variableTreeNode = (VariableTreeNode)instr.dynamicNode;
+          instr.data = dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName);
+        } else if (instr.opCode == OpCodes.LagVariable) {
+          var laggedVariableTreeNode = (LaggedVariableTreeNode)instr.dynamicNode;
+          instr.data = dataset.GetReadOnlyDoubleValues(laggedVariableTreeNode.VariableName);
+        } else if (instr.opCode == OpCodes.VariableCondition) {
+          var variableConditionTreeNode = (VariableConditionTreeNode)instr.dynamicNode;
+          instr.data = dataset.GetReadOnlyDoubleValues(variableConditionTreeNode.VariableName);
+        } else if (instr.opCode == OpCodes.Call) {
+          necessaryArgStackSize += instr.nArguments + 1;
+        }
+      }
+      return new InterpreterState(code, necessaryArgStackSize);
+    }
+
+
+    public virtual double Evaluate(Dataset dataset, ref int row, InterpreterState state) {
+      Instruction currentInstr = state.NextInstruction();
+      switch (currentInstr.opCode) {
+        case OpCodes.Add: {
+            double s = Evaluate(dataset, ref row, state);
+            for (int i = 1; i < currentInstr.nArguments; i++) {
+              s += Evaluate(dataset, ref row, state);
+            }
+            return s;
+          }
+        case OpCodes.Sub: {
+            double s = Evaluate(dataset, ref row, state);
+            for (int i = 1; i < currentInstr.nArguments; i++) {
+              s -= Evaluate(dataset, ref row, state);
+            }
+            if (currentInstr.nArguments == 1) s = -s;
+            return s;
+          }
+        case OpCodes.Mul: {
+            double p = Evaluate(dataset, ref row, state);
+            for (int i = 1; i < currentInstr.nArguments; i++) {
+              p *= Evaluate(dataset, ref row, state);
+            }
+            return p;
+          }
+        case OpCodes.Div: {
+            double p = Evaluate(dataset, ref row, state);
+            for (int i = 1; i < currentInstr.nArguments; i++) {
+              p /= Evaluate(dataset, ref row, state);
+            }
+            if (currentInstr.nArguments == 1) p = 1.0 / p;
+            return p;
+          }
+        case OpCodes.Average: {
+            double sum = Evaluate(dataset, ref row, state);
+            for (int i = 1; i < currentInstr.nArguments; i++) {
+              sum += Evaluate(dataset, ref row, state);
+            }
+            return sum / currentInstr.nArguments;
+          }
+        case OpCodes.Cos: {
+            return Math.Cos(Evaluate(dataset, ref row, state));
+          }
+        case OpCodes.Sin: {
+            return Math.Sin(Evaluate(dataset, ref row, state));
+          }
+        case OpCodes.Tan: {
+            return Math.Tan(Evaluate(dataset, ref row, state));
+          }
+        case OpCodes.Square: {
+            return Math.Pow(Evaluate(dataset, ref row, state), 2);
+          }
+        case OpCodes.Power: {
+            double x = Evaluate(dataset, ref row, state);
+            double y = Math.Round(Evaluate(dataset, ref row, state));
+            return Math.Pow(x, y);
+          }
+        case OpCodes.SquareRoot: {
+            return Math.Sqrt(Evaluate(dataset, ref row, state));
+          }
+        case OpCodes.Root: {
+            double x = Evaluate(dataset, ref row, state);
+            double y = Math.Round(Evaluate(dataset, ref row, state));
+            return Math.Pow(x, 1 / y);
+          }
+        case OpCodes.Exp: {
+            return Math.Exp(Evaluate(dataset, ref row, state));
+          }
+        case OpCodes.Log: {
+            return Math.Log(Evaluate(dataset, ref row, state));
+          }
+        case OpCodes.Gamma: {
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            else return alglib.gammafunction(x);
+          }
+        case OpCodes.Psi: {
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            else if (x <= 0 && (Math.Floor(x) - x).IsAlmost(0)) return double.NaN;
+            return alglib.psi(x);
+          }
+        case OpCodes.Dawson: {
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            return alglib.dawsonintegral(x);
+          }
+        case OpCodes.ExponentialIntegralEi: {
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            return alglib.exponentialintegralei(x);
+          }
+        case OpCodes.SineIntegral: {
+            double si, ci;
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            else {
+              alglib.sinecosineintegrals(x, out si, out ci);
+              return si;
+            }
+          }
+        case OpCodes.CosineIntegral: {
+            double si, ci;
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            else {
+              alglib.sinecosineintegrals(x, out si, out ci);
+              return ci;
+            }
+          }
+        case OpCodes.HyperbolicSineIntegral: {
+            double shi, chi;
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            else {
+              alglib.hyperbolicsinecosineintegrals(x, out shi, out chi);
+              return shi;
+            }
+          }
+        case OpCodes.HyperbolicCosineIntegral: {
+            double shi, chi;
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            else {
+              alglib.hyperbolicsinecosineintegrals(x, out shi, out chi);
+              return chi;
+            }
+          }
+        case OpCodes.FresnelCosineIntegral: {
+            double c = 0, s = 0;
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            else {
+              alglib.fresnelintegral(x, ref c, ref s);
+              return c;
+            }
+          }
+        case OpCodes.FresnelSineIntegral: {
+            double c = 0, s = 0;
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            else {
+              alglib.fresnelintegral(x, ref c, ref s);
+              return s;
+            }
+          }
+        case OpCodes.AiryA: {
+            double ai, aip, bi, bip;
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            else {
+              alglib.airy(x, out ai, out aip, out bi, out bip);
+              return ai;
+            }
+          }
+        case OpCodes.AiryB: {
+            double ai, aip, bi, bip;
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            else {
+              alglib.airy(x, out ai, out aip, out bi, out bip);
+              return bi;
+            }
+          }
+        case OpCodes.Norm: {
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            else return alglib.normaldistribution(x);
+          }
+        case OpCodes.Erf: {
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            else return alglib.errorfunction(x);
+          }
+        case OpCodes.Bessel: {
+            var x = Evaluate(dataset, ref row, state);
+            if (double.IsNaN(x)) return double.NaN;
+            else return alglib.besseli0(x);
+          }
+        case OpCodes.IfThenElse: {
+            double condition = Evaluate(dataset, ref row, state);
+            double result;
+            if (condition > 0.0) {
+              result = Evaluate(dataset, ref row, state); state.SkipInstructions();
+            } else {
+              state.SkipInstructions(); result = Evaluate(dataset, ref row, state);
+            }
+            return result;
+          }
+        case OpCodes.AND: {
+            double result = Evaluate(dataset, ref row, state);
+            for (int i = 1; i < currentInstr.nArguments; i++) {
+              if (result > 0.0) result = Evaluate(dataset, ref row, state);
+              else {
+                state.SkipInstructions();
+              }
+            }
+            return result > 0.0 ? 1.0 : -1.0;
+          }
+        case OpCodes.OR: {
+            double result = Evaluate(dataset, ref row, state);
+            for (int i = 1; i < currentInstr.nArguments; i++) {
+              if (result <= 0.0) result = Evaluate(dataset, ref row, state);
+              else {
+                state.SkipInstructions();
+              }
+            }
+            return result > 0.0 ? 1.0 : -1.0;
+          }
+        case OpCodes.NOT: {
+            return Evaluate(dataset, ref row, state) > 0.0 ? -1.0 : 1.0;
+          }
+        case OpCodes.GT: {
+            double x = Evaluate(dataset, ref row, state);
+            double y = Evaluate(dataset, ref row, state);
+            if (x > y) return 1.0;
+            else return -1.0;
+          }
+        case OpCodes.LT: {
+            double x = Evaluate(dataset, ref row, state);
+            double y = Evaluate(dataset, ref row, state);
+            if (x < y) return 1.0;
+            else return -1.0;
+          }
+        case OpCodes.TimeLag: {
+            var timeLagTreeNode = (LaggedTreeNode)currentInstr.dynamicNode;
+            row += timeLagTreeNode.Lag;
+            double result = Evaluate(dataset, ref row, state);
+            row -= timeLagTreeNode.Lag;
+            return result;
+          }
+        case OpCodes.Integral: {
+            int savedPc = state.ProgramCounter;
+            var timeLagTreeNode = (LaggedTreeNode)currentInstr.dynamicNode;
+            double sum = 0.0;
+            for (int i = 0; i < Math.Abs(timeLagTreeNode.Lag); i++) {
+              row += Math.Sign(timeLagTreeNode.Lag);
+              sum += Evaluate(dataset, ref row, state);
+              state.ProgramCounter = savedPc;
+            }
+            row -= timeLagTreeNode.Lag;
+            sum += Evaluate(dataset, ref row, state);
+            return sum;
+          }
+
+        //mkommend: derivate calculation taken from: 
+        //http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/smooth-low-noise-differentiators/
+        //one sided smooth differentiatior, N = 4
+        // y' = 1/8h (f_i + 2f_i-1, -2 f_i-3 - f_i-4)
+        case OpCodes.Derivative: {
+            int savedPc = state.ProgramCounter;
+            double f_0 = Evaluate(dataset, ref row, state); row--;
+            state.ProgramCounter = savedPc;
+            double f_1 = Evaluate(dataset, ref row, state); row -= 2;
+            state.ProgramCounter = savedPc;
+            double f_3 = Evaluate(dataset, ref row, state); row--;
+            state.ProgramCounter = savedPc;
+            double f_4 = Evaluate(dataset, ref row, state);
+            row += 4;
+
+            return (f_0 + 2 * f_1 - 2 * f_3 - f_4) / 8; // h = 1
+          }
+        case OpCodes.Call: {
+            // evaluate sub-trees
+            double[] argValues = new double[currentInstr.nArguments];
+            for (int i = 0; i < currentInstr.nArguments; i++) {
+              argValues[i] = Evaluate(dataset, ref row, state);
+            }
+            // push on argument values on stack 
+            state.CreateStackFrame(argValues);
+
+            // save the pc
+            int savedPc = state.ProgramCounter;
+            // set pc to start of function  
+            state.ProgramCounter = (ushort)currentInstr.data;
+            // evaluate the function
+            double v = Evaluate(dataset, ref row, state);
+
+            // delete the stack frame
+            state.RemoveStackFrame();
+
+            // restore the pc => evaluation will continue at point after my subtrees  
+            state.ProgramCounter = savedPc;
+            return v;
+          }
+        case OpCodes.Arg: {
+            return state.GetStackFrameValue((ushort)currentInstr.data);
+          }
+        case OpCodes.Variable: {
+            if (row < 0 || row >= dataset.Rows) return double.NaN;
+            var variableTreeNode = (VariableTreeNode)currentInstr.dynamicNode;
+            return ((IList<double>)currentInstr.data)[row] * variableTreeNode.Weight;
+          }
+        case OpCodes.LagVariable: {
+            var laggedVariableTreeNode = (LaggedVariableTreeNode)currentInstr.dynamicNode;
+            int actualRow = row + laggedVariableTreeNode.Lag;
+            if (actualRow < 0 || actualRow >= dataset.Rows) return double.NaN;
+            return ((IList<double>)currentInstr.data)[actualRow] * laggedVariableTreeNode.Weight;
+          }
+        case OpCodes.Constant: {
+            var constTreeNode = (ConstantTreeNode)currentInstr.dynamicNode;
+            return constTreeNode.Value;
+          }
+
+        //mkommend: this symbol uses the logistic function f(x) = 1 / (1 + e^(-alpha * x) ) 
+        //to determine the relative amounts of the true and false branch see http://en.wikipedia.org/wiki/Logistic_function
+        case OpCodes.VariableCondition: {
+            if (row < 0 || row >= dataset.Rows) return double.NaN;
+            var variableConditionTreeNode = (VariableConditionTreeNode)currentInstr.dynamicNode;
+            double variableValue = ((IList<double>)currentInstr.data)[row];
+            double x = variableValue - variableConditionTreeNode.Threshold;
+            double p = 1 / (1 + Math.Exp(-variableConditionTreeNode.Slope * x));
+
+            double trueBranch = Evaluate(dataset, ref row, state);
+            double falseBranch = Evaluate(dataset, ref row, state);
+
+            return trueBranch * p + falseBranch * (1 - p);
+          }
+        default: throw new NotSupportedException();
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs	(revision 10269)
@@ -0,0 +1,389 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("SymbolicDataAnalysisExpressionTreeLinearInterpreter", "Fast linear (non-recursive) interpreter for symbolic expression trees. Does not support ADFs.")]
+  public sealed class SymbolicDataAnalysisExpressionTreeLinearInterpreter : ParameterizedNamedItem, ISymbolicDataAnalysisExpressionTreeInterpreter {
+    private const string CheckExpressionsWithIntervalArithmeticParameterName = "CheckExpressionsWithIntervalArithmetic";
+    private const string EvaluatedSolutionsParameterName = "EvaluatedSolutions";
+
+    private SymbolicDataAnalysisExpressionTreeInterpreter interpreter;
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    #region parameter properties
+    public IValueParameter<BoolValue> CheckExpressionsWithIntervalArithmeticParameter {
+      get { return (IValueParameter<BoolValue>)Parameters[CheckExpressionsWithIntervalArithmeticParameterName]; }
+    }
+
+    public IValueParameter<IntValue> EvaluatedSolutionsParameter {
+      get { return (IValueParameter<IntValue>)Parameters[EvaluatedSolutionsParameterName]; }
+    }
+    #endregion
+
+    #region properties
+    public BoolValue CheckExpressionsWithIntervalArithmetic {
+      get { return CheckExpressionsWithIntervalArithmeticParameter.Value; }
+      set { CheckExpressionsWithIntervalArithmeticParameter.Value = value; }
+    }
+    public IntValue EvaluatedSolutions {
+      get { return EvaluatedSolutionsParameter.Value; }
+      set { EvaluatedSolutionsParameter.Value = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private SymbolicDataAnalysisExpressionTreeLinearInterpreter(bool deserializing)
+      : base(deserializing) {
+    }
+
+    private SymbolicDataAnalysisExpressionTreeLinearInterpreter(SymbolicDataAnalysisExpressionTreeLinearInterpreter original, Cloner cloner)
+      : base(original, cloner) {
+      interpreter = cloner.Clone(original.interpreter);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisExpressionTreeLinearInterpreter(this, cloner);
+    }
+
+    public SymbolicDataAnalysisExpressionTreeLinearInterpreter()
+      : base("SymbolicDataAnalysisExpressionTreeLinearInterpreter", "Linear (non-recursive) interpreter for symbolic expression trees (does not support ADFs).") {
+      Parameters.Add(new ValueParameter<BoolValue>(CheckExpressionsWithIntervalArithmeticParameterName, "Switch that determines if the interpreter checks the validity of expressions with interval arithmetic before evaluating the expression.", new BoolValue(false)));
+      Parameters.Add(new ValueParameter<IntValue>(EvaluatedSolutionsParameterName, "A counter for the total number of solutions the interpreter has evaluated", new IntValue(0)));
+      interpreter = new SymbolicDataAnalysisExpressionTreeInterpreter();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (interpreter == null) interpreter = new SymbolicDataAnalysisExpressionTreeInterpreter();
+    }
+
+    #region IStatefulItem
+    public void InitializeState() {
+      EvaluatedSolutions.Value = 0;
+    }
+
+    public void ClearState() { }
+    #endregion
+
+    public IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) {
+      if (CheckExpressionsWithIntervalArithmetic.Value)
+        throw new NotSupportedException("Interval arithmetic is not yet supported in the symbolic data analysis interpreter.");
+
+      lock (EvaluatedSolutions) {
+        EvaluatedSolutions.Value++; // increment the evaluated solutions counter
+      }
+
+      var code = SymbolicExpressionTreeLinearCompiler.Compile(tree, OpCodes.MapSymbolToOpCode);
+      PrepareInstructions(code, dataset);
+      return rows.Select(row => Evaluate(dataset, row, code));
+    }
+
+    private double Evaluate(Dataset dataset, int row, LinearInstruction[] code) {
+      for (int i = code.Length - 1; i >= 0; --i) {
+        if (code[i].skip) continue;
+        #region opcode if
+        var instr = code[i];
+        if (instr.opCode == OpCodes.Variable) {
+          if (row < 0 || row >= dataset.Rows) instr.value = double.NaN;
+          var variableTreeNode = (VariableTreeNode)instr.dynamicNode;
+          instr.value = ((IList<double>)instr.data)[row] * variableTreeNode.Weight;
+        } else if (instr.opCode == OpCodes.LagVariable) {
+          var laggedVariableTreeNode = (LaggedVariableTreeNode)instr.dynamicNode;
+          int actualRow = row + laggedVariableTreeNode.Lag;
+          if (actualRow < 0 || actualRow >= dataset.Rows)
+            instr.value = double.NaN;
+          else
+            instr.value = ((IList<double>)instr.data)[actualRow] * laggedVariableTreeNode.Weight;
+        } else if (instr.opCode == OpCodes.VariableCondition) {
+          if (row < 0 || row >= dataset.Rows) instr.value = double.NaN;
+          var variableConditionTreeNode = (VariableConditionTreeNode)instr.dynamicNode;
+          double variableValue = ((IList<double>)instr.data)[row];
+          double x = variableValue - variableConditionTreeNode.Threshold;
+          double p = 1 / (1 + Math.Exp(-variableConditionTreeNode.Slope * x));
+
+          double trueBranch = code[instr.childIndex].value;
+          double falseBranch = code[instr.childIndex + 1].value;
+
+          instr.value = trueBranch * p + falseBranch * (1 - p);
+        } else if (instr.opCode == OpCodes.Add) {
+          double s = code[instr.childIndex].value;
+          for (int j = 1; j != instr.nArguments; ++j) {
+            s += code[instr.childIndex + j].value;
+          }
+          instr.value = s;
+        } else if (instr.opCode == OpCodes.Sub) {
+          double s = code[instr.childIndex].value;
+          for (int j = 1; j != instr.nArguments; ++j) {
+            s -= code[instr.childIndex + j].value;
+          }
+          if (instr.nArguments == 1) s = -s;
+          instr.value = s;
+        } else if (instr.opCode == OpCodes.Mul) {
+          double p = code[instr.childIndex].value;
+          for (int j = 1; j != instr.nArguments; ++j) {
+            p *= code[instr.childIndex + j].value;
+          }
+          instr.value = p;
+        } else if (instr.opCode == OpCodes.Div) {
+          double p = code[instr.childIndex].value;
+          for (int j = 1; j != instr.nArguments; ++j) {
+            p /= code[instr.childIndex + j].value;
+          }
+          if (instr.nArguments == 1) p = 1.0 / p;
+          instr.value = p;
+        } else if (instr.opCode == OpCodes.Average) {
+          double s = code[instr.childIndex].value;
+          for (int j = 1; j != instr.nArguments; ++j) {
+            s += code[instr.childIndex + j].value;
+          }
+          instr.value = s / instr.nArguments;
+        } else if (instr.opCode == OpCodes.Cos) {
+          instr.value = Math.Cos(code[instr.childIndex].value);
+        } else if (instr.opCode == OpCodes.Sin) {
+          instr.value = Math.Sin(code[instr.childIndex].value);
+        } else if (instr.opCode == OpCodes.Tan) {
+          instr.value = Math.Tan(code[instr.childIndex].value);
+        } else if (instr.opCode == OpCodes.Square) {
+          instr.value = Math.Pow(code[instr.childIndex].value, 2);
+        } else if (instr.opCode == OpCodes.Power) {
+          double x = code[instr.childIndex].value;
+          double y = Math.Round(code[instr.childIndex + 1].value);
+          instr.value = Math.Pow(x, y);
+        } else if (instr.opCode == OpCodes.SquareRoot) {
+          instr.value = Math.Sqrt(code[instr.childIndex].value);
+        } else if (instr.opCode == OpCodes.Root) {
+          double x = code[instr.childIndex].value;
+          double y = code[instr.childIndex + 1].value;
+          instr.value = Math.Pow(x, 1 / y);
+        } else if (instr.opCode == OpCodes.Exp) {
+          instr.value = Math.Exp(code[instr.childIndex].value);
+        } else if (instr.opCode == OpCodes.Log) {
+          instr.value = Math.Log(code[instr.childIndex].value);
+        } else if (instr.opCode == OpCodes.Gamma) {
+          var x = code[instr.childIndex].value;
+          instr.value = double.IsNaN(x) ? double.NaN : alglib.gammafunction(x);
+        } else if (instr.opCode == OpCodes.Psi) {
+          var x = code[instr.childIndex].value;
+          if (double.IsNaN(x)) instr.value = double.NaN;
+          else if (x <= 0 && (Math.Floor(x) - x).IsAlmost(0)) instr.value = double.NaN;
+          else instr.value = alglib.psi(x);
+        } else if (instr.opCode == OpCodes.Dawson) {
+          var x = code[instr.childIndex].value;
+          instr.value = double.IsNaN(x) ? double.NaN : alglib.dawsonintegral(x);
+        } else if (instr.opCode == OpCodes.ExponentialIntegralEi) {
+          var x = code[instr.childIndex].value;
+          instr.value = double.IsNaN(x) ? double.NaN : alglib.exponentialintegralei(x);
+        } else if (instr.opCode == OpCodes.SineIntegral) {
+          double si, ci;
+          var x = code[instr.childIndex].value;
+          if (double.IsNaN(x)) instr.value = double.NaN;
+          else {
+            alglib.sinecosineintegrals(x, out si, out ci);
+            instr.value = si;
+          }
+        } else if (instr.opCode == OpCodes.CosineIntegral) {
+          double si, ci;
+          var x = code[instr.childIndex].value;
+          if (double.IsNaN(x)) instr.value = double.NaN;
+          else {
+            alglib.sinecosineintegrals(x, out si, out ci);
+            instr.value = ci;
+          }
+        } else if (instr.opCode == OpCodes.HyperbolicSineIntegral) {
+          double shi, chi;
+          var x = code[instr.childIndex].value;
+          if (double.IsNaN(x)) instr.value = double.NaN;
+          else {
+            alglib.hyperbolicsinecosineintegrals(x, out shi, out chi);
+            instr.value = shi;
+          }
+        } else if (instr.opCode == OpCodes.HyperbolicCosineIntegral) {
+          double shi, chi;
+          var x = code[instr.childIndex].value;
+          if (double.IsNaN(x)) instr.value = double.NaN;
+          else {
+            alglib.hyperbolicsinecosineintegrals(x, out shi, out chi);
+            instr.value = chi;
+          }
+        } else if (instr.opCode == OpCodes.FresnelCosineIntegral) {
+          double c = 0, s = 0;
+          var x = code[instr.childIndex].value;
+          if (double.IsNaN(x)) instr.value = double.NaN;
+          else {
+            alglib.fresnelintegral(x, ref c, ref s);
+            instr.value = c;
+          }
+        } else if (instr.opCode == OpCodes.FresnelSineIntegral) {
+          double c = 0, s = 0;
+          var x = code[instr.childIndex].value;
+          if (double.IsNaN(x)) instr.value = double.NaN;
+          else {
+            alglib.fresnelintegral(x, ref c, ref s);
+            instr.value = s;
+          }
+        } else if (instr.opCode == OpCodes.AiryA) {
+          double ai, aip, bi, bip;
+          var x = code[instr.childIndex].value;
+          if (double.IsNaN(x)) instr.value = double.NaN;
+          else {
+            alglib.airy(x, out ai, out aip, out bi, out bip);
+            instr.value = ai;
+          }
+        } else if (instr.opCode == OpCodes.AiryB) {
+          double ai, aip, bi, bip;
+          var x = code[instr.childIndex].value;
+          if (double.IsNaN(x)) instr.value = double.NaN;
+          else {
+            alglib.airy(x, out ai, out aip, out bi, out bip);
+            instr.value = bi;
+          }
+        } else if (instr.opCode == OpCodes.Norm) {
+          var x = code[instr.childIndex].value;
+          if (double.IsNaN(x)) instr.value = double.NaN;
+          else instr.value = alglib.normaldistribution(x);
+        } else if (instr.opCode == OpCodes.Erf) {
+          var x = code[instr.childIndex].value;
+          if (double.IsNaN(x)) instr.value = double.NaN;
+          else instr.value = alglib.errorfunction(x);
+        } else if (instr.opCode == OpCodes.Bessel) {
+          var x = code[instr.childIndex].value;
+          if (double.IsNaN(x)) instr.value = double.NaN;
+          else instr.value = alglib.besseli0(x);
+        } else if (instr.opCode == OpCodes.IfThenElse) {
+          double condition = code[instr.childIndex].value;
+          double result;
+          if (condition > 0.0) {
+            result = code[instr.childIndex + 1].value;
+          } else {
+            result = code[instr.childIndex + 2].value;
+          }
+          instr.value = result;
+        } else if (instr.opCode == OpCodes.AND) {
+          double result = code[instr.childIndex].value;
+          for (int j = 1; j < instr.nArguments; j++) {
+            if (result > 0.0) result = code[instr.childIndex + j].value;
+            else break;
+          }
+          instr.value = result > 0.0 ? 1.0 : -1.0;
+        } else if (instr.opCode == OpCodes.OR) {
+          double result = code[instr.childIndex].value;
+          for (int j = 1; j < instr.nArguments; j++) {
+            if (result <= 0.0) result = code[instr.childIndex + j].value;
+            else break;
+          }
+          instr.value = result > 0.0 ? 1.0 : -1.0;
+        } else if (instr.opCode == OpCodes.NOT) {
+          instr.value = code[instr.childIndex].value > 0.0 ? -1.0 : 1.0;
+        } else if (instr.opCode == OpCodes.GT) {
+          double x = code[instr.childIndex].value;
+          double y = code[instr.childIndex + 1].value;
+          instr.value = x > y ? 1.0 : -1.0;
+        } else if (instr.opCode == OpCodes.LT) {
+          double x = code[instr.childIndex].value;
+          double y = code[instr.childIndex + 1].value;
+          instr.value = x < y ? 1.0 : -1.0;
+        } else if (instr.opCode == OpCodes.TimeLag || instr.opCode == OpCodes.Derivative || instr.opCode == OpCodes.Integral) {
+          var state = (InterpreterState)instr.data;
+          state.Reset();
+          instr.value = interpreter.Evaluate(dataset, ref row, state);
+        } else {
+          var errorText = string.Format("The {0} symbol is not supported by the linear interpreter. To support this symbol, please use the SymbolicDataAnalysisExpressionTreeInterpreter.", instr.dynamicNode.Symbol.Name);
+          throw new NotSupportedException(errorText);
+        }
+        #endregion
+      }
+      return code[0].value;
+    }
+
+    private static LinearInstruction[] GetPrefixSequence(LinearInstruction[] code, int startIndex) {
+      var s = new Stack<int>();
+      var list = new List<LinearInstruction>();
+      s.Push(startIndex);
+      while (s.Any()) {
+        int i = s.Pop();
+        var instr = code[i];
+        // push instructions in reverse execution order
+        for (int j = instr.nArguments - 1; j >= 0; j--) s.Push(instr.childIndex + j);
+        list.Add(instr);
+      }
+      return list.ToArray();
+    }
+
+    private static void PrepareInstructions(LinearInstruction[] code, Dataset dataset) {
+      for (int i = 0; i != code.Length; ++i) {
+        var instr = code[i];
+        #region opcode switch
+        switch (instr.opCode) {
+          case OpCodes.Constant: {
+              var constTreeNode = (ConstantTreeNode)instr.dynamicNode;
+              instr.value = constTreeNode.Value;
+              instr.skip = true; // the value is already set so this instruction should be skipped in the evaluation phase
+            }
+            break;
+          case OpCodes.Variable: {
+              var variableTreeNode = (VariableTreeNode)instr.dynamicNode;
+              instr.data = dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName);
+            }
+            break;
+          case OpCodes.LagVariable: {
+              var laggedVariableTreeNode = (LaggedVariableTreeNode)instr.dynamicNode;
+              instr.data = dataset.GetReadOnlyDoubleValues(laggedVariableTreeNode.VariableName);
+            }
+            break;
+          case OpCodes.VariableCondition: {
+              var variableConditionTreeNode = (VariableConditionTreeNode)instr.dynamicNode;
+              instr.data = dataset.GetReadOnlyDoubleValues(variableConditionTreeNode.VariableName);
+            }
+            break;
+          case OpCodes.TimeLag:
+          case OpCodes.Integral:
+          case OpCodes.Derivative: {
+              var seq = GetPrefixSequence(code, i);
+              var interpreterState = new InterpreterState(seq, 0);
+              instr.data = interpreterState;
+              for (int j = 1; j != seq.Length; ++j)
+                seq[j].skip = true;
+            }
+            break;
+        }
+        #endregion
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Plugin.cs.frame
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Plugin.cs.frame	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Plugin.cs.frame	(revision 10269)
@@ -0,0 +1,47 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Plugin("HeuristicLab.Problems.DataAnalysis.Symbolic","Provides base classes for symbolic data analysis tasks.", "3.4.5.$WCREV$")]
+  [PluginFile("HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.ALGLIB", "3.7.0")]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
+  [PluginDependency("HeuristicLab.Random", "3.3")]
+  public class HeuristicLabProblemsDataAnalysisSymbolicPlugin : PluginBase {
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Properties/AssemblyInfo.cs.frame
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Properties/AssemblyInfo.cs.frame	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Properties/AssemblyInfo.cs.frame	(revision 10269)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Problems.DataAnalysis.Symbolic")]
+[assembly: AssemblyDescription("Provides base classes for symbolic data analysis tasks.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("ABF1DB5E-5774-48AB-B65A-5CF405C0E2A8")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.4.0.0")]
+[assembly: AssemblyFileVersion("3.4.5.$WCREV$")]
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/GenerationalSlidingWindowAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/GenerationalSlidingWindowAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/GenerationalSlidingWindowAnalyzer.cs	(revision 10269)
@@ -0,0 +1,92 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("Generational Sliding Window GP Analyzer", "Analyzer which moves a sliding window every n-th generation over the training partition.")]
+  [StorableClass]
+  public class GenerationalSlidingWindowAnalyzer : SlidingWindowAnalyzer, IIterationBasedOperator {
+    private const string GenerationsIntervalParameterName = "Generation Interval";
+    private const string GenerationsIntervalStartParameterName = "Generation Interval Start";
+    private const string IterationsParameterName = "Iterations";
+    private const string MaximumIterationsParameterName = "Maximum Iterations";
+
+    #region parameter properties
+    public ILookupParameter<IntValue> IterationsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[IterationsParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumIterationsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumIterationsParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> GenerationsIntervalParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[GenerationsIntervalParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> GenerationsIntervalStartParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[GenerationsIntervalStartParameterName]; }
+    }
+    #endregion
+
+    #region properties
+    public IntValue GenerationsInterval {
+      get { return GenerationsIntervalParameter.Value; }
+    }
+    public IntValue GenerationsIntervalStart {
+      get { return GenerationsIntervalStartParameter.Value; }
+    }
+    #endregion
+
+
+    [StorableConstructor]
+    protected GenerationalSlidingWindowAnalyzer(bool deserializing) : base(deserializing) { }
+    protected GenerationalSlidingWindowAnalyzer(GenerationalSlidingWindowAnalyzer original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GenerationalSlidingWindowAnalyzer(this, cloner);
+    }
+
+    public GenerationalSlidingWindowAnalyzer() {
+      Parameters.Add(new LookupParameter<IntValue>(IterationsParameterName, ""));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumIterationsParameterName, ""));
+      Parameters.Add(new FixedValueParameter<IntValue>(GenerationsIntervalParameterName, "", new IntValue(5)));
+      Parameters.Add(new FixedValueParameter<IntValue>(GenerationsIntervalStartParameterName, "", new IntValue(0)));
+
+      IterationsParameter.ActualName = "Generations";
+      MaximumIterationsParameter.Hidden = true;
+    }
+
+    protected override bool CheckForUpdate() {
+      var iteration = IterationsParameter.ActualValue.Value;
+      var start = GenerationsIntervalStart.Value;
+      var step = GenerationsInterval.Value;
+      if (iteration == 0) return false;
+      if (iteration < start) return false;
+      if ((iteration - start) % step == 0) return true;
+
+      return false;
+    }
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/OffspringSelectionSlidingWindowAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/OffspringSelectionSlidingWindowAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/OffspringSelectionSlidingWindowAnalyzer.cs	(revision 10269)
@@ -0,0 +1,71 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("Offspring Selection Sliding Window GP Analyzer", "Analyzer which moves a sliding window whenever the selection pressure exceeds a certain threshold.")]
+  [StorableClass]
+  public class OffspringSelectionSlidingWindowAnalyzer : SlidingWindowAnalyzer {
+    private const string SelectionPressureParameterName = "SelectionPressure";
+    private const string SelectionPressureThresholdParameterName = "SelectionPressureThreshold";
+
+    #region parameter properties
+    public ILookupParameter<DoubleValue> SelectionPressureParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[SelectionPressureParameterName]; }
+    }
+    public IFixedValueParameter<DoubleValue> SelectionPressureThresholdParameter {
+      get { return (IFixedValueParameter<DoubleValue>)Parameters[SelectionPressureThresholdParameterName]; }
+    }
+    #endregion
+
+    #region properties
+    public DoubleValue SelectionPressureThreshold {
+      get { return SelectionPressureThresholdParameter.Value; }
+    }
+    #endregion
+
+
+    [StorableConstructor]
+    protected OffspringSelectionSlidingWindowAnalyzer(bool deserializing) : base(deserializing) { }
+    protected OffspringSelectionSlidingWindowAnalyzer(OffspringSelectionSlidingWindowAnalyzer original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new OffspringSelectionSlidingWindowAnalyzer(this, cloner);
+    }
+
+    public OffspringSelectionSlidingWindowAnalyzer() {
+      Parameters.Add(new LookupParameter<DoubleValue>(SelectionPressureParameterName, ""));
+      Parameters.Add(new FixedValueParameter<DoubleValue>(SelectionPressureThresholdParameterName, "", new DoubleValue(20)));
+    }
+
+    protected override bool CheckForUpdate() {
+      var currentSelectionPressure = SelectionPressureParameter.ActualValue.Value;
+      var selectionPressureThreshold = SelectionPressureThresholdParameter.Value.Value;
+
+      return selectionPressureThreshold <= currentSelectionPressure;
+    }
+
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowAnalyzer.cs	(revision 10269)
@@ -0,0 +1,151 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Sliding Window GP Analyzer", "Base class for concrete sliding window GP analyzers.")]
+  public abstract class SlidingWindowAnalyzer : SymbolicDataAnalysisAnalyzer {
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string EvaluatorParameterName = "Evaluator";
+    private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition";
+    private const string ValidationPartitionParameterName = "ValidationPartition";
+    private const string SlidingWindowSizeParameterName = "Sliding Window Size";
+    private const string ValidationSlidingWindowSizeParameterName = "Validation Sliding Window Size";
+    private const string SlidingWindowStepWidthParameterName = "Sliding Window Step Width";
+    private const string InitialSlidingWindowParameterName = "Initial Sliding Window";
+    private const string TerminateSlidingWindowParameterName = "TerminateSlidingWindow";
+
+    #region parameter properties
+    public IValueLookupParameter<IDataAnalysisProblemData> ProblemDataParameter {
+      get { return (IValueLookupParameter<IDataAnalysisProblemData>)Parameters[ProblemDataParameterName]; }
+    }
+    public ILookupParameter<IntRange> FitnessCalculationPartitionParameter {
+      get { return (ILookupParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; }
+    }
+    public ILookupParameter<IntRange> ValidationPartitionParameter {
+      get { return (ILookupParameter<IntRange>)Parameters[ValidationPartitionParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> SlidingWindowSizeParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[SlidingWindowSizeParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> ValidationSlidingWindowSizeParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[ValidationSlidingWindowSizeParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> SlidingWindowStepWidthParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[SlidingWindowStepWidthParameterName]; }
+    }
+    public IFixedValueParameter<IntRange> InitialSlidingWindowParameter {
+      get { return (IFixedValueParameter<IntRange>)Parameters[InitialSlidingWindowParameterName]; }
+    }
+    public ILookupParameter<BoolValue> TerminateSlidingWindowParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters[TerminateSlidingWindowParameterName]; }
+    }
+    public ILookupParameter<IEvaluator> EvaluatorParameter {
+      get { return (ILookupParameter<IEvaluator>)Parameters[EvaluatorParameterName]; }
+    }
+    #endregion
+
+    #region properties
+    public override bool EnabledByDefault { get { return false; } }
+    public IntValue SlidingWindowSize { get { return SlidingWindowSizeParameter.Value; } }
+    public IntValue ValidiationSlidingWindowSize { get { return ValidationSlidingWindowSizeParameter.Value; } }
+    public IntValue SlidingWindowStepWidth { get { return SlidingWindowStepWidthParameter.Value; } }
+    public IntRange InitialSlidingWindow { get { return InitialSlidingWindowParameter.Value; } }
+    #endregion
+
+
+    [StorableConstructor]
+    protected SlidingWindowAnalyzer(bool deserializing) : base(deserializing) { }
+    protected SlidingWindowAnalyzer(SlidingWindowAnalyzer original, Cloner cloner)
+      : base(original, cloner) { }
+
+    protected SlidingWindowAnalyzer()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IDataAnalysisProblemData>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
+      Parameters.Add(new LookupParameter<IEvaluator>(EvaluatorParameterName, ""));
+      Parameters.Add(new LookupParameter<IntRange>(FitnessCalculationPartitionParameterName, ""));
+      Parameters.Add(new LookupParameter<IntRange>(ValidationPartitionParameterName, ""));
+      Parameters.Add(new FixedValueParameter<IntValue>(SlidingWindowSizeParameterName, "", new IntValue(1)));
+      Parameters.Add(new FixedValueParameter<IntValue>(ValidationSlidingWindowSizeParameterName, "", new IntValue(0)));
+      Parameters.Add(new FixedValueParameter<IntValue>(SlidingWindowStepWidthParameterName, "", new IntValue(1)));
+      Parameters.Add(new FixedValueParameter<IntRange>(InitialSlidingWindowParameterName, "", new IntRange(0, 1)));
+      Parameters.Add(new LookupParameter<BoolValue>(TerminateSlidingWindowParameterName, ""));
+
+      ProblemDataParameter.Hidden = true;
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (!Parameters.ContainsKey(EvaluatorParameterName))
+        Parameters.Add(new LookupParameter<IEvaluator>(EvaluatorParameterName, ""));
+    }
+
+    public override IOperation Apply() {
+      //intialize sliding window
+      if (FitnessCalculationPartitionParameter.ActualValue == null) {
+        TerminateSlidingWindowParameter.ActualValue = new BoolValue(false);
+        FitnessCalculationPartitionParameter.ActualValue = (IntRange)InitialSlidingWindow.Clone();
+        ValidationPartitionParameter.ActualValue = new IntRange(InitialSlidingWindow.End, InitialSlidingWindow.End + ValidiationSlidingWindowSize.Value);
+        return base.Apply();
+      }
+
+      if (!CheckForUpdate()) return base.Apply();
+
+      //update necessary - move sliding window
+      var fitnessPartition = (IntRange)FitnessCalculationPartitionParameter.ActualValue.Clone();
+      if (fitnessPartition.End - fitnessPartition.Start == SlidingWindowSize.Value)
+        fitnessPartition.Start += SlidingWindowStepWidth.Value;
+
+      fitnessPartition.End += SlidingWindowStepWidth.Value;
+      if (fitnessPartition.End - fitnessPartition.Start > SlidingWindowSize.Value)
+        fitnessPartition.End = fitnessPartition.Start + SlidingWindowSize.Value;
+
+      //check if update should be performed or if the algorithm should stop
+      if (fitnessPartition.End > ProblemDataParameter.ActualValue.TrainingPartition.End) {
+        TerminateSlidingWindowParameter.ActualValue.Value = true;
+        return base.Apply();
+      }
+
+      FitnessCalculationPartitionParameter.ActualValue.Start = fitnessPartition.Start;
+      FitnessCalculationPartitionParameter.ActualValue.End = fitnessPartition.End;
+      ValidationPartitionParameter.ActualValue.Start = fitnessPartition.End;
+      ValidationPartitionParameter.ActualValue.End = ValidationPartitionParameter.ActualValue.Start + ValidiationSlidingWindowSize.Value;
+
+      //reevaluate all individuals with new sliding window
+      UniformSubScopesProcessor subScopesProcessor = new UniformSubScopesProcessor();
+      subScopesProcessor.Operator = EvaluatorParameter.ActualValue;
+      subScopesProcessor.Depth.Value = 1;
+      var operation = ExecutionContext.CreateChildOperation(subScopesProcessor);
+      var successor = base.Apply();
+      return new OperationCollection() { operation, successor };
+    }
+
+    protected abstract bool CheckForUpdate();
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowData.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowData.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowData.cs	(revision 10269)
@@ -0,0 +1,105 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Sliding Window Position", "")]
+  public sealed class SlidingWindowData : Item {
+    [Storable]
+    private IntRange slidingWindowPosition;
+    public IntRange SlidingWindowPosition {
+      get { return slidingWindowPosition; }
+    }
+
+    public IEnumerable<double> TargetValues {
+      get {
+        return problemData.Dataset.GetDoubleValues(GetTargetVariableName(problemData), problemData.TrainingIndices);
+      }
+    }
+
+    [Storable]
+    private IEnumerable<double> estimatedValues;
+    public IEnumerable<double> EstimatedValues {
+      get { return estimatedValues; }
+      set {
+        if (value == null) throw new ArgumentNullException();
+        estimatedValues = value.ToArray();
+        OnEstimatedValuesChanged();
+      }
+    }
+
+    [Storable]
+    private readonly IDataAnalysisProblemData problemData;
+
+    public IDataAnalysisProblemData ProblemData {
+      get { return problemData; }
+    }
+
+    public int TrainingPartitionStart {
+      get { return problemData.TrainingPartition.Start; }
+    }
+
+    public int TrainingPartitionEnd {
+      get { return problemData.TrainingPartition.End; }
+    }
+
+    [StorableConstructor]
+    private SlidingWindowData(bool deserializing) : base(deserializing) { }
+    private SlidingWindowData(SlidingWindowData original, Cloner cloner)
+      : base(original, cloner) {
+      slidingWindowPosition = cloner.Clone(original.slidingWindowPosition);
+      problemData = cloner.Clone(original.ProblemData);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SlidingWindowData(this, cloner);
+    }
+
+    public SlidingWindowData(IntRange slidingWindowPosition, IDataAnalysisProblemData problemData)
+      : base() {
+      this.slidingWindowPosition = slidingWindowPosition;
+      this.problemData = (IDataAnalysisProblemData)problemData.Clone();
+    }
+
+    public event EventHandler EstimatedValuesChanged;
+    private void OnEstimatedValuesChanged() {
+      var handler = EstimatedValuesChanged;
+      if (handler != null) EstimatedValuesChanged(this, EventArgs.Empty);
+    }
+
+    private string GetTargetVariableName(IDataAnalysisProblemData problemData) {
+      var classificationProblemData = problemData as IClassificationProblemData;
+      var regressionProblemData = problemData as IRegressionProblemData;
+      string targetVariable;
+      if (classificationProblemData != null) targetVariable = classificationProblemData.TargetVariable;
+      else if (regressionProblemData != null) targetVariable = regressionProblemData.TargetVariable;
+      else throw new NotSupportedException();
+      return targetVariable;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowQualitiesAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowQualitiesAnalyzer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowQualitiesAnalyzer.cs	(revision 10269)
@@ -0,0 +1,151 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.SlidingWindow {
+  [StorableClass]
+  [Item("Sliding Window Qualities Analyzer", "Analyzer that computes the qualities of the best solution on past, current, and future regions of the sliding window training data.")]
+  public sealed class SlidingWindowQualitiesAnalyzer : SymbolicDataAnalysisAnalyzer {
+    private const string SlidingWindowQualitiesResultName = "Sliding Window Qualities";
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string EvaluatorParameterName = "Evaluator";
+    private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition";
+    private const string ValidationPartitionParameterName = "ValidationPartition";
+    private const string SymbolicExpressionTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+
+    public IValueLookupParameter<IDataAnalysisProblemData> ProblemDataParameter {
+      get { return (IValueLookupParameter<IDataAnalysisProblemData>)Parameters[ProblemDataParameterName]; }
+    }
+    public ILookupParameter<IntRange> FitnessCalculationPartitionParameter {
+      get { return (ILookupParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; }
+    }
+    public ILookupParameter<IntRange> ValidationPartitionParameter {
+      get { return (ILookupParameter<IntRange>)Parameters[ValidationPartitionParameterName]; }
+    }
+    public ILookupParameter<IEvaluator> EvaluatorParameter {
+      get { return (ILookupParameter<IEvaluator>)Parameters[EvaluatorParameterName]; }
+    }
+
+    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicExpressionTreeInterpreter
+    {
+      get  {return(ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; }
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SlidingWindowQualitiesAnalyzer(this, cloner);
+    }
+    private SlidingWindowQualitiesAnalyzer(SlidingWindowQualitiesAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    
+
+    [StorableConstructor]
+    private SlidingWindowQualitiesAnalyzer(bool deserializing) : base(deserializing) { }
+
+    public SlidingWindowQualitiesAnalyzer() { 
+      Parameters.Add(new ValueLookupParameter<IDataAnalysisProblemData>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
+      Parameters.Add(new LookupParameter<IEvaluator>(EvaluatorParameterName, ""));
+      Parameters.Add(new LookupParameter<IntRange>(FitnessCalculationPartitionParameterName, ""));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, ""));
+
+      ProblemDataParameter.Hidden = true;}
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override IOperation Apply()
+    {
+      if (FitnessCalculationPartitionParameter.ActualValue == null)
+        // do nothing because the sliding window hasn't been initialized yet
+        return base.Apply();
+
+
+      var results = ResultCollectionParameter.ActualValue;
+      if (!results.ContainsKey("Best training solution")) return base.Apply();
+
+      var problemData = (IRegressionProblemData) ProblemDataParameter.ActualValue;
+      var evaluator =
+        (SymbolicDataAnalysisSingleObjectiveEvaluator<IRegressionProblemData>) EvaluatorParameter.ActualValue;
+      var context = new Core.ExecutionContext(ExecutionContext, evaluator, new Scope());
+      var fitnessCalculationPartition = FitnessCalculationPartitionParameter.ActualValue;
+
+      var bestSolution = (ISymbolicDataAnalysisSolution) results["Best training solution"].Value;
+      var bestModel = bestSolution.Model;
+      var bestTree = bestModel.SymbolicExpressionTree;
+      // add result
+      if (!results.ContainsKey(SlidingWindowQualitiesResultName)) {
+        results.Add(new Result(SlidingWindowQualitiesResultName, new DataTable(SlidingWindowQualitiesResultName)));
+      }
+      var swQualitiesTable = (DataTable) results[SlidingWindowQualitiesResultName].Value;
+
+      // compute before quality
+      var beforeQuality = 0.0;
+      if (!swQualitiesTable.Rows.ContainsKey("Before Quality"))
+        swQualitiesTable.Rows.Add(new DataRow("Before Quality") {VisualProperties = {StartIndexZero = true}});
+      if (fitnessCalculationPartition.Start > problemData.TrainingPartition.Start)
+      {
+        var beforeRange = new IntRange(problemData.TrainingPartition.Start, fitnessCalculationPartition.Start);
+        beforeQuality = evaluator.Evaluate(context, bestTree, problemData, Enumerable.Range(beforeRange.Start, beforeRange.Size));
+      }
+      swQualitiesTable.Rows["Before Quality"].Values.Add(beforeQuality);
+
+      // compute current quality
+      var currentQuality = ((DoubleValue) results["CurrentBestQuality"].Value).Value;
+      if (!swQualitiesTable.Rows.ContainsKey("Current Quality"))
+        swQualitiesTable.Rows.Add(new DataRow("Current Quality") {VisualProperties = {StartIndexZero = true}});
+      swQualitiesTable.Rows["Current Quality"].Values.Add(currentQuality);
+
+      // compute after quality
+      if (fitnessCalculationPartition.End < problemData.TrainingPartition.End)
+      {
+        var afterRange = new IntRange(fitnessCalculationPartition.End, problemData.TrainingPartition.End);
+        var afterQuality = evaluator.Evaluate(context, bestTree, problemData,
+          Enumerable.Range(afterRange.Start, afterRange.Size));
+        if (!swQualitiesTable.Rows.ContainsKey("After Quality"))
+          swQualitiesTable.Rows.Add(new DataRow("After Quality") {VisualProperties = {StartIndexZero = true}});
+        swQualitiesTable.Rows["After Quality"].Values.Add(afterQuality);
+      }
+      // compute test quality
+      if (!swQualitiesTable.Rows.ContainsKey("Test Quality"))
+        swQualitiesTable.Rows.Add(new DataRow("Test Quality") {VisualProperties = {StartIndexZero = true}});
+      var regressionSolution = (IRegressionSolution) bestSolution;
+      swQualitiesTable.Rows["Test Quality"].Values.Add(regressionSolution.TestRSquared);
+      return base.Apply();
+    }
+
+    public override bool EnabledByDefault { get { return false; } }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowVisualizer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowVisualizer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowVisualizer.cs	(revision 10269)
@@ -0,0 +1,99 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.SlidingWindow {
+  [StorableClass]
+  [Item("Sliding Window Visualizer", "Visualizes the actual sliding window position.")]
+  public sealed class SlidingWindowVisualizer : SymbolicDataAnalysisAnalyzer {
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition";
+
+    private const string SlidingWindowResultName = "Sliding Window";
+    private const string SlidingWindowDataResultName = "Sliding Window Data";
+    private const string BestTrainingSolutionResultName = "Best training solution";
+
+    #region parameter properties
+    public IValueLookupParameter<IDataAnalysisProblemData> ProblemDataParameter {
+      get { return (IValueLookupParameter<IDataAnalysisProblemData>)Parameters[ProblemDataParameterName]; }
+    }
+    public ILookupParameter<IntRange> FitnessCalculationPartitionParameter {
+      get { return (ILookupParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private SlidingWindowVisualizer(bool deserializing) : base(deserializing) { }
+    private SlidingWindowVisualizer(SlidingWindowVisualizer original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SlidingWindowVisualizer(this, cloner);
+    }
+
+    public SlidingWindowVisualizer()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IDataAnalysisProblemData>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
+      Parameters.Add(new LookupParameter<IntRange>(FitnessCalculationPartitionParameterName, ""));
+      ProblemDataParameter.Hidden = true;
+    }
+
+    public override IOperation Apply() {
+      //create and update result
+      var results = ResultCollectionParameter.ActualValue;
+
+      IntRange slidingWindow;
+      if (!results.ContainsKey(SlidingWindowResultName)) {
+        slidingWindow = new IntRange();
+        results.Add(new Result(SlidingWindowResultName, slidingWindow));
+      } else slidingWindow = (IntRange)results[SlidingWindowResultName].Value;
+      slidingWindow.Start = FitnessCalculationPartitionParameter.ActualValue.Start;
+      slidingWindow.End = FitnessCalculationPartitionParameter.ActualValue.End;
+
+      SlidingWindowData slidingWindowData;
+      if (!results.ContainsKey(SlidingWindowDataResultName)) {
+        slidingWindowData = new SlidingWindowData(FitnessCalculationPartitionParameter.ActualValue, ProblemDataParameter.ActualValue);
+        results.Add(new Result(SlidingWindowDataResultName, slidingWindowData));
+      } else slidingWindowData = (SlidingWindowData)results[SlidingWindowDataResultName].Value;
+
+      IEnumerable<double> estimatedValues = Enumerable.Empty<double>();
+      if (results.ContainsKey(BestTrainingSolutionResultName)) {
+        var trainingSolution = results[BestTrainingSolutionResultName].Value;
+        var regressionSolution = trainingSolution as IRegressionSolution;
+        var classificationSolution = trainingSolution as IClassificationSolution;
+
+        if (regressionSolution != null) estimatedValues = regressionSolution.EstimatedTrainingValues;
+        if (classificationSolution != null) estimatedValues = classificationSolution.EstimatedTrainingClassValues;
+      }
+
+      slidingWindowData.SlidingWindowPosition.Start = FitnessCalculationPartitionParameter.ActualValue.Start;
+      slidingWindowData.SlidingWindowPosition.End = FitnessCalculationPartitionParameter.ActualValue.End;
+      slidingWindowData.EstimatedValues = estimatedValues;
+      return base.Apply();
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplifier.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplifier.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplifier.cs	(revision 10269)
@@ -0,0 +1,1054 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  /// <summary>
+  /// Simplifier for symbolic expressions
+  /// </summary>
+  public class SymbolicDataAnalysisExpressionTreeSimplifier {
+    private Addition addSymbol = new Addition();
+    private Subtraction subSymbol = new Subtraction();
+    private Multiplication mulSymbol = new Multiplication();
+    private Division divSymbol = new Division();
+    private Constant constSymbol = new Constant();
+    private Variable varSymbol = new Variable();
+    private Logarithm logSymbol = new Logarithm();
+    private Exponential expSymbol = new Exponential();
+    private Root rootSymbol = new Root();
+    private Square sqrSymbol = new Square();
+    private SquareRoot sqrtSymbol = new SquareRoot();
+    private Power powSymbol = new Power();
+    private Sine sineSymbol = new Sine();
+    private Cosine cosineSymbol = new Cosine();
+    private Tangent tanSymbol = new Tangent();
+    private IfThenElse ifThenElseSymbol = new IfThenElse();
+    private And andSymbol = new And();
+    private Or orSymbol = new Or();
+    private Not notSymbol = new Not();
+    private GreaterThan gtSymbol = new GreaterThan();
+    private LessThan ltSymbol = new LessThan();
+    private Integral integralSymbol = new Integral();
+    private LaggedVariable laggedVariableSymbol = new LaggedVariable();
+    private TimeLag timeLagSymbol = new TimeLag();
+
+    public ISymbolicExpressionTree Simplify(ISymbolicExpressionTree originalTree) {
+      var clone = (ISymbolicExpressionTreeNode)originalTree.Root.Clone();
+      // macro expand (initially no argument trees)
+      var macroExpandedTree = MacroExpand(clone, clone.GetSubtree(0), new List<ISymbolicExpressionTreeNode>());
+      ISymbolicExpressionTreeNode rootNode = (new ProgramRootSymbol()).CreateTreeNode();
+      rootNode.AddSubtree(GetSimplifiedTree(macroExpandedTree));
+      return new SymbolicExpressionTree(rootNode);
+    }
+
+    // the argumentTrees list contains already expanded trees used as arguments for invocations
+    private ISymbolicExpressionTreeNode MacroExpand(ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode node, IList<ISymbolicExpressionTreeNode> argumentTrees) {
+      List<ISymbolicExpressionTreeNode> subtrees = new List<ISymbolicExpressionTreeNode>(node.Subtrees);
+      while (node.SubtreeCount > 0) node.RemoveSubtree(0);
+      if (node.Symbol is InvokeFunction) {
+        var invokeSym = node.Symbol as InvokeFunction;
+        var defunNode = FindFunctionDefinition(root, invokeSym.FunctionName);
+        var macroExpandedArguments = new List<ISymbolicExpressionTreeNode>();
+        foreach (var subtree in subtrees) {
+          macroExpandedArguments.Add(MacroExpand(root, subtree, argumentTrees));
+        }
+        return MacroExpand(root, defunNode, macroExpandedArguments);
+      } else if (node.Symbol is Argument) {
+        var argSym = node.Symbol as Argument;
+        // return the correct argument sub-tree (already macro-expanded)
+        return (SymbolicExpressionTreeNode)argumentTrees[argSym.ArgumentIndex].Clone();
+      } else {
+        // recursive application
+        foreach (var subtree in subtrees) {
+          node.AddSubtree(MacroExpand(root, subtree, argumentTrees));
+        }
+        return node;
+      }
+    }
+
+    private ISymbolicExpressionTreeNode FindFunctionDefinition(ISymbolicExpressionTreeNode root, string functionName) {
+      foreach (var subtree in root.Subtrees.OfType<DefunTreeNode>()) {
+        if (subtree.FunctionName == functionName) return subtree.GetSubtree(0);
+      }
+
+      throw new ArgumentException("Definition of function " + functionName + " not found.");
+    }
+
+
+    #region symbol predicates
+    // arithmetic
+    private bool IsDivision(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Division;
+    }
+
+    private bool IsMultiplication(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Multiplication;
+    }
+
+    private bool IsSubtraction(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Subtraction;
+    }
+
+    private bool IsAddition(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Addition;
+    }
+
+    private bool IsAverage(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Average;
+    }
+    // exponential
+    private bool IsLog(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Logarithm;
+    }
+    private bool IsExp(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Exponential;
+    }
+    private bool IsRoot(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Root;
+    }
+    private bool IsSquare(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Square;
+    }
+    private bool IsSquareRoot(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is SquareRoot;
+    }
+    private bool IsPower(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Power;
+    }
+    // trigonometric
+    private bool IsSine(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Sine;
+    }
+    private bool IsCosine(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Cosine;
+    }
+    private bool IsTangent(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Tangent;
+    }
+    // boolean
+    private bool IsIfThenElse(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is IfThenElse;
+    }
+    private bool IsAnd(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is And;
+    }
+    private bool IsOr(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Or;
+    }
+    private bool IsNot(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Not;
+    }
+    // comparison
+    private bool IsGreaterThan(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is GreaterThan;
+    }
+    private bool IsLessThan(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is LessThan;
+    }
+
+    private bool IsBoolean(ISymbolicExpressionTreeNode node) {
+      return
+        node.Symbol is GreaterThan ||
+        node.Symbol is LessThan ||
+        node.Symbol is And ||
+        node.Symbol is Or;
+    }
+
+    // terminals
+    private bool IsVariable(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Variable;
+    }
+
+    private bool IsConstant(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Constant;
+    }
+
+    // dynamic
+    private bool IsTimeLag(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is TimeLag;
+    }
+    private bool IsIntegral(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Integral;
+    }
+
+    #endregion
+
+    /// <summary>
+    /// Creates a new simplified tree
+    /// </summary>
+    /// <param name="original"></param>
+    /// <returns></returns>
+    public ISymbolicExpressionTreeNode GetSimplifiedTree(ISymbolicExpressionTreeNode original) {
+      if (IsConstant(original) || IsVariable(original)) {
+        return (ISymbolicExpressionTreeNode)original.Clone();
+      } else if (IsAddition(original)) {
+        return SimplifyAddition(original);
+      } else if (IsSubtraction(original)) {
+        return SimplifySubtraction(original);
+      } else if (IsMultiplication(original)) {
+        return SimplifyMultiplication(original);
+      } else if (IsDivision(original)) {
+        return SimplifyDivision(original);
+      } else if (IsAverage(original)) {
+        return SimplifyAverage(original);
+      } else if (IsLog(original)) {
+        return SimplifyLog(original);
+      } else if (IsExp(original)) {
+        return SimplifyExp(original);
+      } else if (IsSquare(original)) {
+        return SimplifySquare(original);
+      } else if (IsSquareRoot(original)) {
+        return SimplifySquareRoot(original);
+      } else if (IsPower(original)) {
+        return SimplifyPower(original);
+      } else if (IsRoot(original)) {
+        return SimplifyRoot(original);
+      } else if (IsSine(original)) {
+        return SimplifySine(original);
+      } else if (IsCosine(original)) {
+        return SimplifyCosine(original);
+      } else if (IsTangent(original)) {
+        return SimplifyTangent(original);
+      } else if (IsIfThenElse(original)) {
+        return SimplifyIfThenElse(original);
+      } else if (IsGreaterThan(original)) {
+        return SimplifyGreaterThan(original);
+      } else if (IsLessThan(original)) {
+        return SimplifyLessThan(original);
+      } else if (IsAnd(original)) {
+        return SimplifyAnd(original);
+      } else if (IsOr(original)) {
+        return SimplifyOr(original);
+      } else if (IsNot(original)) {
+        return SimplifyNot(original);
+      } else if (IsTimeLag(original)) {
+        return SimplifyTimeLag(original);
+      } else if (IsIntegral(original)) {
+        return SimplifyIntegral(original);
+      } else {
+        return SimplifyAny(original);
+      }
+    }
+
+
+    #region specific simplification routines
+    private ISymbolicExpressionTreeNode SimplifyAny(ISymbolicExpressionTreeNode original) {
+      // can't simplify this function but simplify all subtrees 
+      List<ISymbolicExpressionTreeNode> subtrees = new List<ISymbolicExpressionTreeNode>(original.Subtrees);
+      while (original.Subtrees.Count() > 0) original.RemoveSubtree(0);
+      var clone = (SymbolicExpressionTreeNode)original.Clone();
+      List<ISymbolicExpressionTreeNode> simplifiedSubtrees = new List<ISymbolicExpressionTreeNode>();
+      foreach (var subtree in subtrees) {
+        simplifiedSubtrees.Add(GetSimplifiedTree(subtree));
+        original.AddSubtree(subtree);
+      }
+      foreach (var simplifiedSubtree in simplifiedSubtrees) {
+        clone.AddSubtree(simplifiedSubtree);
+      }
+      if (simplifiedSubtrees.TrueForAll(t => IsConstant(t))) {
+        SimplifyConstantExpression(clone);
+      }
+      return clone;
+    }
+
+    private ISymbolicExpressionTreeNode SimplifyConstantExpression(ISymbolicExpressionTreeNode original) {
+      // not yet implemented
+      return original;
+    }
+
+    private ISymbolicExpressionTreeNode SimplifyAverage(ISymbolicExpressionTreeNode original) {
+      if (original.Subtrees.Count() == 1) {
+        return GetSimplifiedTree(original.GetSubtree(0));
+      } else {
+        // simplify expressions x0..xn
+        // make sum(x0..xn) / n
+        var sum = original.Subtrees
+          .Select(x => GetSimplifiedTree(x))
+          .Aggregate((a, b) => MakeSum(a, b));
+        return MakeFraction(sum, MakeConstant(original.Subtrees.Count()));
+      }
+    }
+
+    private ISymbolicExpressionTreeNode SimplifyDivision(ISymbolicExpressionTreeNode original) {
+      if (original.Subtrees.Count() == 1) {
+        return Invert(GetSimplifiedTree(original.GetSubtree(0)));
+      } else {
+        // simplify expressions x0..xn
+        // make multiplication (x0 * 1/(x1 * x1 * .. * xn))
+        var simplifiedTrees = original.Subtrees.Select(x => GetSimplifiedTree(x));
+        return
+          MakeProduct(simplifiedTrees.First(), Invert(simplifiedTrees.Skip(1).Aggregate((a, b) => MakeProduct(a, b))));
+      }
+    }
+
+    private ISymbolicExpressionTreeNode SimplifyMultiplication(ISymbolicExpressionTreeNode original) {
+      if (original.Subtrees.Count() == 1) {
+        return GetSimplifiedTree(original.GetSubtree(0));
+      } else {
+        return original.Subtrees
+          .Select(x => GetSimplifiedTree(x))
+          .Aggregate((a, b) => MakeProduct(a, b));
+      }
+    }
+
+    private ISymbolicExpressionTreeNode SimplifySubtraction(ISymbolicExpressionTreeNode original) {
+      if (original.Subtrees.Count() == 1) {
+        return Negate(GetSimplifiedTree(original.GetSubtree(0)));
+      } else {
+        // simplify expressions x0..xn
+        // make addition (x0,-x1..-xn)
+        var simplifiedTrees = original.Subtrees.Select(x => GetSimplifiedTree(x));
+        return simplifiedTrees.Take(1)
+          .Concat(simplifiedTrees.Skip(1).Select(x => Negate(x)))
+          .Aggregate((a, b) => MakeSum(a, b));
+      }
+    }
+
+    private ISymbolicExpressionTreeNode SimplifyAddition(ISymbolicExpressionTreeNode original) {
+      if (original.Subtrees.Count() == 1) {
+        return GetSimplifiedTree(original.GetSubtree(0));
+      } else {
+        // simplify expression x0..xn
+        // make addition (x0..xn)
+        return original.Subtrees
+          .Select(x => GetSimplifiedTree(x))
+          .Aggregate((a, b) => MakeSum(a, b));
+      }
+    }
+
+    private ISymbolicExpressionTreeNode SimplifyNot(ISymbolicExpressionTreeNode original) {
+      return MakeNot(GetSimplifiedTree(original.GetSubtree(0)));
+    }
+    private ISymbolicExpressionTreeNode SimplifyOr(ISymbolicExpressionTreeNode original) {
+      return original.Subtrees
+        .Select(x => GetSimplifiedTree(x))
+        .Aggregate((a, b) => MakeOr(a, b));
+    }
+    private ISymbolicExpressionTreeNode SimplifyAnd(ISymbolicExpressionTreeNode original) {
+      return original.Subtrees
+        .Select(x => GetSimplifiedTree(x))
+        .Aggregate((a, b) => MakeAnd(a, b));
+    }
+    private ISymbolicExpressionTreeNode SimplifyLessThan(ISymbolicExpressionTreeNode original) {
+      return MakeLessThan(GetSimplifiedTree(original.GetSubtree(0)), GetSimplifiedTree(original.GetSubtree(1)));
+    }
+    private ISymbolicExpressionTreeNode SimplifyGreaterThan(ISymbolicExpressionTreeNode original) {
+      return MakeGreaterThan(GetSimplifiedTree(original.GetSubtree(0)), GetSimplifiedTree(original.GetSubtree(1)));
+    }
+    private ISymbolicExpressionTreeNode SimplifyIfThenElse(ISymbolicExpressionTreeNode original) {
+      return MakeIfThenElse(GetSimplifiedTree(original.GetSubtree(0)), GetSimplifiedTree(original.GetSubtree(1)), GetSimplifiedTree(original.GetSubtree(2)));
+    }
+    private ISymbolicExpressionTreeNode SimplifyTangent(ISymbolicExpressionTreeNode original) {
+      return MakeTangent(GetSimplifiedTree(original.GetSubtree(0)));
+    }
+    private ISymbolicExpressionTreeNode SimplifyCosine(ISymbolicExpressionTreeNode original) {
+      return MakeCosine(GetSimplifiedTree(original.GetSubtree(0)));
+    }
+    private ISymbolicExpressionTreeNode SimplifySine(ISymbolicExpressionTreeNode original) {
+      return MakeSine(GetSimplifiedTree(original.GetSubtree(0)));
+    }
+    private ISymbolicExpressionTreeNode SimplifyExp(ISymbolicExpressionTreeNode original) {
+      return MakeExp(GetSimplifiedTree(original.GetSubtree(0)));
+    }
+    private ISymbolicExpressionTreeNode SimplifySquare(ISymbolicExpressionTreeNode original) {
+      return MakeSquare(GetSimplifiedTree(original.GetSubtree(0)));
+    }
+    private ISymbolicExpressionTreeNode SimplifySquareRoot(ISymbolicExpressionTreeNode original) {
+      return MakeSquareRoot(GetSimplifiedTree(original.GetSubtree(0)));
+    }
+
+    private ISymbolicExpressionTreeNode SimplifyLog(ISymbolicExpressionTreeNode original) {
+      return MakeLog(GetSimplifiedTree(original.GetSubtree(0)));
+    }
+    private ISymbolicExpressionTreeNode SimplifyRoot(ISymbolicExpressionTreeNode original) {
+      return MakeRoot(GetSimplifiedTree(original.GetSubtree(0)), GetSimplifiedTree(original.GetSubtree(1)));
+    }
+
+    private ISymbolicExpressionTreeNode SimplifyPower(ISymbolicExpressionTreeNode original) {
+      return MakePower(GetSimplifiedTree(original.GetSubtree(0)), GetSimplifiedTree(original.GetSubtree(1)));
+    }
+    private ISymbolicExpressionTreeNode SimplifyTimeLag(ISymbolicExpressionTreeNode original) {
+      var laggedTreeNode = original as ILaggedTreeNode;
+      var simplifiedSubtree = GetSimplifiedTree(original.GetSubtree(0));
+      if (!ContainsVariableCondition(simplifiedSubtree)) {
+        return AddLagToDynamicNodes(simplifiedSubtree, laggedTreeNode.Lag);
+      } else {
+        return MakeTimeLag(simplifiedSubtree, laggedTreeNode.Lag);
+      }
+    }
+    private ISymbolicExpressionTreeNode SimplifyIntegral(ISymbolicExpressionTreeNode original) {
+      var laggedTreeNode = original as ILaggedTreeNode;
+      var simplifiedSubtree = GetSimplifiedTree(original.GetSubtree(0));
+      if (IsConstant(simplifiedSubtree)) {
+        return GetSimplifiedTree(MakeProduct(simplifiedSubtree, MakeConstant(-laggedTreeNode.Lag)));
+      } else {
+        return MakeIntegral(simplifiedSubtree, laggedTreeNode.Lag);
+      }
+    }
+
+    #endregion
+
+    #region low level tree restructuring
+    private ISymbolicExpressionTreeNode MakeTimeLag(ISymbolicExpressionTreeNode subtree, int lag) {
+      if (lag == 0) return subtree;
+      if (IsConstant(subtree)) return subtree;
+      var lagNode = (LaggedTreeNode)timeLagSymbol.CreateTreeNode();
+      lagNode.Lag = lag;
+      lagNode.AddSubtree(subtree);
+      return lagNode;
+    }
+
+    private ISymbolicExpressionTreeNode MakeIntegral(ISymbolicExpressionTreeNode subtree, int lag) {
+      if (lag == 0) return subtree;
+      else if (lag == -1 || lag == 1) {
+        return MakeSum(subtree, AddLagToDynamicNodes((ISymbolicExpressionTreeNode)subtree.Clone(), lag));
+      } else {
+        var node = (LaggedTreeNode)integralSymbol.CreateTreeNode();
+        node.Lag = lag;
+        node.AddSubtree(subtree);
+        return node;
+      }
+    }
+
+    private ISymbolicExpressionTreeNode MakeNot(ISymbolicExpressionTreeNode t) {
+      if (IsConstant(t)) {
+        var constNode = t as ConstantTreeNode;
+        if (constNode.Value > 0) return MakeConstant(-1.0);
+        else return MakeConstant(1.0);
+      } else if (IsNot(t)) {
+        return t.GetSubtree(0);
+      } else if (!IsBoolean(t)) {
+        var gtNode = gtSymbol.CreateTreeNode();
+        gtNode.AddSubtree(t); gtNode.AddSubtree(MakeConstant(0.0));
+        var notNode = notSymbol.CreateTreeNode();
+        notNode.AddSubtree(gtNode);
+        return notNode;
+      } else {
+        var notNode = notSymbol.CreateTreeNode();
+        notNode.AddSubtree(t);
+        return notNode;
+      }
+    }
+
+    private ISymbolicExpressionTreeNode MakeOr(ISymbolicExpressionTreeNode a, ISymbolicExpressionTreeNode b) {
+      if (IsConstant(a) && IsConstant(b)) {
+        var constA = a as ConstantTreeNode;
+        var constB = b as ConstantTreeNode;
+        if (constA.Value > 0.0 || constB.Value > 0.0) {
+          return MakeConstant(1.0);
+        } else {
+          return MakeConstant(-1.0);
+        }
+      } else if (IsConstant(a)) {
+        return MakeOr(b, a);
+      } else if (IsConstant(b)) {
+        var constT = b as ConstantTreeNode;
+        if (constT.Value > 0.0) {
+          // boolean expression is necessarily true
+          return MakeConstant(1.0);
+        } else {
+          // the constant value has no effect on the result of the boolean condition so we can drop the constant term
+          var orNode = orSymbol.CreateTreeNode();
+          orNode.AddSubtree(a);
+          return orNode;
+        }
+      } else {
+        var orNode = orSymbol.CreateTreeNode();
+        orNode.AddSubtree(a);
+        orNode.AddSubtree(b);
+        return orNode;
+      }
+    }
+    private ISymbolicExpressionTreeNode MakeAnd(ISymbolicExpressionTreeNode a, ISymbolicExpressionTreeNode b) {
+      if (IsConstant(a) && IsConstant(b)) {
+        var constA = a as ConstantTreeNode;
+        var constB = b as ConstantTreeNode;
+        if (constA.Value > 0.0 && constB.Value > 0.0) {
+          return MakeConstant(1.0);
+        } else {
+          return MakeConstant(-1.0);
+        }
+      } else if (IsConstant(a)) {
+        return MakeAnd(b, a);
+      } else if (IsConstant(b)) {
+        var constB = b as ConstantTreeNode;
+        if (constB.Value > 0.0) {
+          // the constant value has no effect on the result of the boolean condition so we can drop the constant term
+          var andNode = andSymbol.CreateTreeNode();
+          andNode.AddSubtree(a);
+          return andNode;
+        } else {
+          // boolean expression is necessarily false
+          return MakeConstant(-1.0);
+        }
+      } else {
+        var andNode = andSymbol.CreateTreeNode();
+        andNode.AddSubtree(a);
+        andNode.AddSubtree(b);
+        return andNode;
+      }
+    }
+    private ISymbolicExpressionTreeNode MakeLessThan(ISymbolicExpressionTreeNode leftSide, ISymbolicExpressionTreeNode rightSide) {
+      if (IsConstant(leftSide) && IsConstant(rightSide)) {
+        var lsConst = leftSide as ConstantTreeNode;
+        var rsConst = rightSide as ConstantTreeNode;
+        if (lsConst.Value < rsConst.Value) return MakeConstant(1.0);
+        else return MakeConstant(-1.0);
+      } else {
+        var ltNode = ltSymbol.CreateTreeNode();
+        ltNode.AddSubtree(leftSide);
+        ltNode.AddSubtree(rightSide);
+        return ltNode;
+      }
+    }
+    private ISymbolicExpressionTreeNode MakeGreaterThan(ISymbolicExpressionTreeNode leftSide, ISymbolicExpressionTreeNode rightSide) {
+      if (IsConstant(leftSide) && IsConstant(rightSide)) {
+        var lsConst = leftSide as ConstantTreeNode;
+        var rsConst = rightSide as ConstantTreeNode;
+        if (lsConst.Value > rsConst.Value) return MakeConstant(1.0);
+        else return MakeConstant(-1.0);
+      } else {
+        var gtNode = gtSymbol.CreateTreeNode();
+        gtNode.AddSubtree(leftSide);
+        gtNode.AddSubtree(rightSide);
+        return gtNode;
+      }
+    }
+    private ISymbolicExpressionTreeNode MakeIfThenElse(ISymbolicExpressionTreeNode condition, ISymbolicExpressionTreeNode trueBranch, ISymbolicExpressionTreeNode falseBranch) {
+      if (IsConstant(condition)) {
+        var constT = condition as ConstantTreeNode;
+        if (constT.Value > 0.0) return trueBranch;
+        else return falseBranch;
+      } else {
+        var ifNode = ifThenElseSymbol.CreateTreeNode();
+        if (IsBoolean(condition)) {
+          ifNode.AddSubtree(condition);
+        } else {
+          var gtNode = gtSymbol.CreateTreeNode();
+          gtNode.AddSubtree(condition); gtNode.AddSubtree(MakeConstant(0.0));
+          ifNode.AddSubtree(gtNode);
+        }
+        ifNode.AddSubtree(trueBranch);
+        ifNode.AddSubtree(falseBranch);
+        return ifNode;
+      }
+    }
+
+    private ISymbolicExpressionTreeNode MakeSine(ISymbolicExpressionTreeNode node) {
+      if (IsConstant(node)) {
+        var constT = node as ConstantTreeNode;
+        return MakeConstant(Math.Sin(constT.Value));
+      } else {
+        var sineNode = sineSymbol.CreateTreeNode();
+        sineNode.AddSubtree(node);
+        return sineNode;
+      }
+    }
+    private ISymbolicExpressionTreeNode MakeTangent(ISymbolicExpressionTreeNode node) {
+      if (IsConstant(node)) {
+        var constT = node as ConstantTreeNode;
+        return MakeConstant(Math.Tan(constT.Value));
+      } else {
+        var tanNode = tanSymbol.CreateTreeNode();
+        tanNode.AddSubtree(node);
+        return tanNode;
+      }
+    }
+    private ISymbolicExpressionTreeNode MakeCosine(ISymbolicExpressionTreeNode node) {
+      if (IsConstant(node)) {
+        var constT = node as ConstantTreeNode;
+        return MakeConstant(Math.Cos(constT.Value));
+      } else {
+        var cosNode = cosineSymbol.CreateTreeNode();
+        cosNode.AddSubtree(node);
+        return cosNode;
+      }
+    }
+    private ISymbolicExpressionTreeNode MakeExp(ISymbolicExpressionTreeNode node) {
+      if (IsConstant(node)) {
+        var constT = node as ConstantTreeNode;
+        return MakeConstant(Math.Exp(constT.Value));
+      } else if (IsLog(node)) {
+        return node.GetSubtree(0);
+      } else if (IsAddition(node)) {
+        return node.Subtrees.Select(s => MakeExp(s)).Aggregate((s, t) => MakeProduct(s, t));
+      } else if (IsSubtraction(node)) {
+        return node.Subtrees.Select(s => MakeExp(s)).Aggregate((s, t) => MakeProduct(s, Negate(t)));
+      } else {
+        var expNode = expSymbol.CreateTreeNode();
+        expNode.AddSubtree(node);
+        return expNode;
+      }
+    }
+
+    private ISymbolicExpressionTreeNode MakeSquare(ISymbolicExpressionTreeNode node) {
+      if (IsConstant(node)) {
+        var constT = node as ConstantTreeNode;
+        return MakeConstant(constT.Value * constT.Value);
+      } else if (IsSquareRoot(node)) {
+        return node.GetSubtree(0);
+      } else {
+        var sqrNode = sqrSymbol.CreateTreeNode();
+        sqrNode.AddSubtree(node);
+        return sqrNode;
+      }
+    }
+    private ISymbolicExpressionTreeNode MakeSquareRoot(ISymbolicExpressionTreeNode node) {
+      if (IsConstant(node)) {
+        var constT = node as ConstantTreeNode;
+        return MakeConstant(Math.Sqrt(constT.Value));
+      } else if (IsSquare(node)) {
+        return node.GetSubtree(0);
+      } else {
+        var sqrtNode = sqrtSymbol.CreateTreeNode();
+        sqrtNode.AddSubtree(node);
+        return sqrtNode;
+      }
+    }
+
+    private ISymbolicExpressionTreeNode MakeLog(ISymbolicExpressionTreeNode node) {
+      if (IsConstant(node)) {
+        var constT = node as ConstantTreeNode;
+        return MakeConstant(Math.Log(constT.Value));
+      } else if (IsExp(node)) {
+        return node.GetSubtree(0);
+      } else if (IsSquareRoot(node)) {
+        return MakeFraction(MakeLog(node.GetSubtree(0)), MakeConstant(2.0));
+      } else {
+        var logNode = logSymbol.CreateTreeNode();
+        logNode.AddSubtree(node);
+        return logNode;
+      }
+    }
+    private ISymbolicExpressionTreeNode MakeRoot(ISymbolicExpressionTreeNode a, ISymbolicExpressionTreeNode b) {
+      if (IsConstant(a) && IsConstant(b)) {
+        var constA = a as ConstantTreeNode;
+        var constB = b as ConstantTreeNode;
+        return MakeConstant(Math.Pow(constA.Value, 1.0 / Math.Round(constB.Value)));
+      } else if (IsConstant(b)) {
+        var constB = b as ConstantTreeNode;
+        var constBValue = Math.Round(constB.Value);
+        if (constBValue.IsAlmost(1.0)) {
+          return a;
+        } else if (constBValue.IsAlmost(0.0)) {
+          return MakeConstant(1.0);
+        } else if (constBValue.IsAlmost(-1.0)) {
+          return MakeFraction(MakeConstant(1.0), a);
+        } else if (constBValue < 0) {
+          var rootNode = rootSymbol.CreateTreeNode();
+          rootNode.AddSubtree(a);
+          rootNode.AddSubtree(MakeConstant(-1.0 * constBValue));
+          return MakeFraction(MakeConstant(1.0), rootNode);
+        } else {
+          var rootNode = rootSymbol.CreateTreeNode();
+          rootNode.AddSubtree(a);
+          rootNode.AddSubtree(MakeConstant(constBValue));
+          return rootNode;
+        }
+      } else {
+        var rootNode = rootSymbol.CreateTreeNode();
+        rootNode.AddSubtree(a);
+        rootNode.AddSubtree(b);
+        return rootNode;
+      }
+    }
+    private ISymbolicExpressionTreeNode MakePower(ISymbolicExpressionTreeNode a, ISymbolicExpressionTreeNode b) {
+      if (IsConstant(a) && IsConstant(b)) {
+        var constA = a as ConstantTreeNode;
+        var constB = b as ConstantTreeNode;
+        return MakeConstant(Math.Pow(constA.Value, Math.Round(constB.Value)));
+      } else if (IsConstant(b)) {
+        var constB = b as ConstantTreeNode;
+        double exponent = Math.Round(constB.Value);
+        if (exponent.IsAlmost(0.0)) {
+          return MakeConstant(1.0);
+        } else if (exponent.IsAlmost(1.0)) {
+          return a;
+        } else if (exponent.IsAlmost(-1.0)) {
+          return MakeFraction(MakeConstant(1.0), a);
+        } else if (exponent < 0) {
+          var powNode = powSymbol.CreateTreeNode();
+          powNode.AddSubtree(a);
+          powNode.AddSubtree(MakeConstant(-1.0 * exponent));
+          return MakeFraction(MakeConstant(1.0), powNode);
+        } else {
+          var powNode = powSymbol.CreateTreeNode();
+          powNode.AddSubtree(a);
+          powNode.AddSubtree(MakeConstant(exponent));
+          return powNode;
+        }
+      } else {
+        var powNode = powSymbol.CreateTreeNode();
+        powNode.AddSubtree(a);
+        powNode.AddSubtree(b);
+        return powNode;
+      }
+    }
+
+
+    // MakeFraction, MakeProduct and MakeSum take two already simplified trees and create a new simplified tree
+    private ISymbolicExpressionTreeNode MakeFraction(ISymbolicExpressionTreeNode a, ISymbolicExpressionTreeNode b) {
+      if (IsConstant(a) && IsConstant(b)) {
+        // fold constants
+        return MakeConstant(((ConstantTreeNode)a).Value / ((ConstantTreeNode)b).Value);
+      } if (IsConstant(a) && !((ConstantTreeNode)a).Value.IsAlmost(1.0)) {
+        return MakeFraction(MakeConstant(1.0), MakeProduct(b, Invert(a)));
+      } else if (IsVariable(a) && IsConstant(b)) {
+        // merge constant values into variable weights
+        var constB = ((ConstantTreeNode)b).Value;
+        ((VariableTreeNode)a).Weight /= constB;
+        return a;
+      } else if (IsVariable(a) && IsVariable(b) && AreSameVariable(a, b)) {
+        // cancel variables
+        var aVar = a as VariableTreeNode;
+        var bVar = b as VariableTreeNode;
+        return MakeConstant(aVar.Weight / bVar.Weight);
+      } else if (IsAddition(a) && IsConstant(b)) {
+        return a.Subtrees
+          .Select(x => GetSimplifiedTree(x))
+         .Select(x => MakeFraction(x, b))
+         .Aggregate((c, d) => MakeSum(c, d));
+      } else if (IsMultiplication(a) && IsConstant(b)) {
+        return MakeProduct(a, Invert(b));
+      } else if (IsDivision(a) && IsConstant(b)) {
+        // (a1 / a2) / c => (a1 / (a2 * c))
+        return MakeFraction(a.GetSubtree(0), MakeProduct(a.GetSubtree(1), b));
+      } else if (IsDivision(a) && IsDivision(b)) {
+        // (a1 / a2) / (b1 / b2) => 
+        return MakeFraction(MakeProduct(a.GetSubtree(0), b.GetSubtree(1)), MakeProduct(a.GetSubtree(1), b.GetSubtree(0)));
+      } else if (IsDivision(a)) {
+        // (a1 / a2) / b => (a1 / (a2 * b))
+        return MakeFraction(a.GetSubtree(0), MakeProduct(a.GetSubtree(1), b));
+      } else if (IsDivision(b)) {
+        // a / (b1 / b2) => (a * b2) / b1
+        return MakeFraction(MakeProduct(a, b.GetSubtree(1)), b.GetSubtree(0));
+      } else {
+        var div = divSymbol.CreateTreeNode();
+        div.AddSubtree(a);
+        div.AddSubtree(b);
+        return div;
+      }
+    }
+
+    private ISymbolicExpressionTreeNode MakeSum(ISymbolicExpressionTreeNode a, ISymbolicExpressionTreeNode b) {
+      if (IsConstant(a) && IsConstant(b)) {
+        // fold constants
+        ((ConstantTreeNode)a).Value += ((ConstantTreeNode)b).Value;
+        return a;
+      } else if (IsConstant(a)) {
+        // c + x => x + c
+        // b is not constant => make sure constant is on the right
+        return MakeSum(b, a);
+      } else if (IsConstant(b) && ((ConstantTreeNode)b).Value.IsAlmost(0.0)) {
+        // x + 0 => x
+        return a;
+      } else if (IsAddition(a) && IsAddition(b)) {
+        // merge additions
+        var add = addSymbol.CreateTreeNode();
+        // add all sub trees except for the last
+        for (int i = 0; i < a.Subtrees.Count() - 1; i++) add.AddSubtree(a.GetSubtree(i));
+        for (int i = 0; i < b.Subtrees.Count() - 1; i++) add.AddSubtree(b.GetSubtree(i));
+        if (IsConstant(a.Subtrees.Last()) && IsConstant(b.Subtrees.Last())) {
+          add.AddSubtree(MakeSum(a.Subtrees.Last(), b.Subtrees.Last()));
+        } else if (IsConstant(a.Subtrees.Last())) {
+          add.AddSubtree(b.Subtrees.Last());
+          add.AddSubtree(a.Subtrees.Last());
+        } else {
+          add.AddSubtree(a.Subtrees.Last());
+          add.AddSubtree(b.Subtrees.Last());
+        }
+        MergeVariablesInSum(add);
+        if (add.Subtrees.Count() == 1) {
+          return add.GetSubtree(0);
+        } else {
+          return add;
+        }
+      } else if (IsAddition(b)) {
+        return MakeSum(b, a);
+      } else if (IsAddition(a) && IsConstant(b)) {
+        // a is an addition and b is a constant => append b to a and make sure the constants are merged
+        var add = addSymbol.CreateTreeNode();
+        // add all sub trees except for the last
+        for (int i = 0; i < a.Subtrees.Count() - 1; i++) add.AddSubtree(a.GetSubtree(i));
+        if (IsConstant(a.Subtrees.Last()))
+          add.AddSubtree(MakeSum(a.Subtrees.Last(), b));
+        else {
+          add.AddSubtree(a.Subtrees.Last());
+          add.AddSubtree(b);
+        }
+        return add;
+      } else if (IsAddition(a)) {
+        // a is already an addition => append b
+        var add = addSymbol.CreateTreeNode();
+        add.AddSubtree(b);
+        foreach (var subtree in a.Subtrees) {
+          add.AddSubtree(subtree);
+        }
+        MergeVariablesInSum(add);
+        if (add.Subtrees.Count() == 1) {
+          return add.GetSubtree(0);
+        } else {
+          return add;
+        }
+      } else {
+        var add = addSymbol.CreateTreeNode();
+        add.AddSubtree(a);
+        add.AddSubtree(b);
+        MergeVariablesInSum(add);
+        if (add.Subtrees.Count() == 1) {
+          return add.GetSubtree(0);
+        } else {
+          return add;
+        }
+      }
+    }
+
+    // makes sure variable symbols in sums are combined
+    // possible improvement: combine sums of products where the products only reference the same variable
+    private void MergeVariablesInSum(ISymbolicExpressionTreeNode sum) {
+      var subtrees = new List<ISymbolicExpressionTreeNode>(sum.Subtrees);
+      while (sum.Subtrees.Count() > 0) sum.RemoveSubtree(0);
+      var groupedVarNodes = from node in subtrees.OfType<VariableTreeNode>()
+                            let lag = (node is LaggedVariableTreeNode) ? ((LaggedVariableTreeNode)node).Lag : 0
+                            group node by node.VariableName + lag into g
+                            select g;
+      var unchangedSubtrees = subtrees.Where(t => !(t is VariableTreeNode));
+
+      foreach (var variableNodeGroup in groupedVarNodes) {
+        var weightSum = variableNodeGroup.Select(t => t.Weight).Sum();
+        var representative = variableNodeGroup.First();
+        representative.Weight = weightSum;
+        sum.AddSubtree(representative);
+      }
+      foreach (var unchangedSubtree in unchangedSubtrees)
+        sum.AddSubtree(unchangedSubtree);
+    }
+
+
+    private ISymbolicExpressionTreeNode MakeProduct(ISymbolicExpressionTreeNode a, ISymbolicExpressionTreeNode b) {
+      if (IsConstant(a) && IsConstant(b)) {
+        // fold constants
+        ((ConstantTreeNode)a).Value *= ((ConstantTreeNode)b).Value;
+        return a;
+      } else if (IsConstant(a)) {
+        // a * $ => $ * a
+        return MakeProduct(b, a);
+      } else if (IsConstant(b) && ((ConstantTreeNode)b).Value.IsAlmost(1.0)) {
+        // $ * 1.0 => $
+        return a;
+      } else if (IsConstant(b) && IsVariable(a)) {
+        // multiply constants into variables weights
+        ((VariableTreeNode)a).Weight *= ((ConstantTreeNode)b).Value;
+        return a;
+      } else if (IsConstant(b) && IsAddition(a)) {
+        // multiply constants into additions
+        return a.Subtrees.Select(x => MakeProduct(x, b)).Aggregate((c, d) => MakeSum(c, d));
+      } else if (IsDivision(a) && IsDivision(b)) {
+        // (a1 / a2) * (b1 / b2) => (a1 * b1) / (a2 * b2)
+        return MakeFraction(MakeProduct(a.GetSubtree(0), b.GetSubtree(0)), MakeProduct(a.GetSubtree(1), b.GetSubtree(1)));
+      } else if (IsDivision(a)) {
+        // (a1 / a2) * b => (a1 * b) / a2
+        return MakeFraction(MakeProduct(a.GetSubtree(0), b), a.GetSubtree(1));
+      } else if (IsDivision(b)) {
+        // a * (b1 / b2) => (b1 * a) / b2
+        return MakeFraction(MakeProduct(b.GetSubtree(0), a), b.GetSubtree(1));
+      } else if (IsMultiplication(a) && IsMultiplication(b)) {
+        // merge multiplications (make sure constants are merged)
+        var mul = mulSymbol.CreateTreeNode();
+        for (int i = 0; i < a.Subtrees.Count(); i++) mul.AddSubtree(a.GetSubtree(i));
+        for (int i = 0; i < b.Subtrees.Count(); i++) mul.AddSubtree(b.GetSubtree(i));
+        MergeVariablesAndConstantsInProduct(mul);
+        return mul;
+      } else if (IsMultiplication(b)) {
+        return MakeProduct(b, a);
+      } else if (IsMultiplication(a)) {
+        // a is already an multiplication => append b
+        a.AddSubtree(b);
+        MergeVariablesAndConstantsInProduct(a);
+        return a;
+      } else {
+        var mul = mulSymbol.CreateTreeNode();
+        mul.AddSubtree(a);
+        mul.AddSubtree(b);
+        MergeVariablesAndConstantsInProduct(mul);
+        return mul;
+      }
+    }
+    #endregion
+
+
+    #region helper functions
+    private bool ContainsVariableCondition(ISymbolicExpressionTreeNode node) {
+      if (node.Symbol is VariableCondition) return true;
+      foreach (var subtree in node.Subtrees)
+        if (ContainsVariableCondition(subtree)) return true;
+      return false;
+    }
+
+    private ISymbolicExpressionTreeNode AddLagToDynamicNodes(ISymbolicExpressionTreeNode node, int lag) {
+      var laggedTreeNode = node as ILaggedTreeNode;
+      var variableNode = node as VariableTreeNode;
+      var variableConditionNode = node as VariableConditionTreeNode;
+      if (laggedTreeNode != null)
+        laggedTreeNode.Lag += lag;
+      else if (variableNode != null) {
+        var laggedVariableNode = (LaggedVariableTreeNode)laggedVariableSymbol.CreateTreeNode();
+        laggedVariableNode.Lag = lag;
+        laggedVariableNode.VariableName = variableNode.VariableName;
+        return laggedVariableNode;
+      } else if (variableConditionNode != null) {
+        throw new NotSupportedException("Removal of time lags around variable condition symbols is not allowed.");
+      }
+      var subtrees = new List<ISymbolicExpressionTreeNode>(node.Subtrees);
+      while (node.SubtreeCount > 0) node.RemoveSubtree(0);
+      foreach (var subtree in subtrees) {
+        node.AddSubtree(AddLagToDynamicNodes(subtree, lag));
+      }
+      return node;
+    }
+
+    private bool AreSameVariable(ISymbolicExpressionTreeNode a, ISymbolicExpressionTreeNode b) {
+      var aLaggedVar = a as LaggedVariableTreeNode;
+      var bLaggedVar = b as LaggedVariableTreeNode;
+      if (aLaggedVar != null && bLaggedVar != null) {
+        return aLaggedVar.VariableName == bLaggedVar.VariableName &&
+          aLaggedVar.Lag == bLaggedVar.Lag;
+      }
+      var aVar = a as VariableTreeNode;
+      var bVar = b as VariableTreeNode;
+      if (aVar != null && bVar != null) {
+        return aVar.VariableName == bVar.VariableName;
+      }
+      return false;
+    }
+
+    // helper to combine the constant factors in products and to combine variables (powers of 2, 3...)
+    private void MergeVariablesAndConstantsInProduct(ISymbolicExpressionTreeNode prod) {
+      var subtrees = new List<ISymbolicExpressionTreeNode>(prod.Subtrees);
+      while (prod.Subtrees.Count() > 0) prod.RemoveSubtree(0);
+      var groupedVarNodes = from node in subtrees.OfType<VariableTreeNode>()
+                            let lag = (node is LaggedVariableTreeNode) ? ((LaggedVariableTreeNode)node).Lag : 0
+                            group node by node.VariableName + lag into g
+                            orderby g.Count()
+                            select g;
+      var constantProduct = (from node in subtrees.OfType<VariableTreeNode>()
+                             select node.Weight)
+                            .Concat(from node in subtrees.OfType<ConstantTreeNode>()
+                                    select node.Value)
+                            .DefaultIfEmpty(1.0)
+                            .Aggregate((c1, c2) => c1 * c2);
+
+      var unchangedSubtrees = from tree in subtrees
+                              where !(tree is VariableTreeNode)
+                              where !(tree is ConstantTreeNode)
+                              select tree;
+
+      foreach (var variableNodeGroup in groupedVarNodes) {
+        var representative = variableNodeGroup.First();
+        representative.Weight = 1.0;
+        if (variableNodeGroup.Count() > 1) {
+          var poly = mulSymbol.CreateTreeNode();
+          for (int p = 0; p < variableNodeGroup.Count(); p++) {
+            poly.AddSubtree((ISymbolicExpressionTreeNode)representative.Clone());
+          }
+          prod.AddSubtree(poly);
+        } else {
+          prod.AddSubtree(representative);
+        }
+      }
+
+      foreach (var unchangedSubtree in unchangedSubtrees)
+        prod.AddSubtree(unchangedSubtree);
+
+      if (!constantProduct.IsAlmost(1.0)) {
+        prod.AddSubtree(MakeConstant(constantProduct));
+      }
+    }
+
+
+    /// <summary>
+    /// x => x * -1
+    /// Doesn't create new trees and manipulates x
+    /// </summary>
+    /// <param name="x"></param>
+    /// <returns>-x</returns>
+    private ISymbolicExpressionTreeNode Negate(ISymbolicExpressionTreeNode x) {
+      if (IsConstant(x)) {
+        ((ConstantTreeNode)x).Value *= -1;
+      } else if (IsVariable(x)) {
+        var variableTree = (VariableTreeNode)x;
+        variableTree.Weight *= -1.0;
+      } else if (IsAddition(x)) {
+        // (x0 + x1 + .. + xn) * -1 => (-x0 + -x1 + .. + -xn)        
+        List<ISymbolicExpressionTreeNode> subtrees = new List<ISymbolicExpressionTreeNode>(x.Subtrees);
+        while (x.Subtrees.Count() > 0) x.RemoveSubtree(0);
+        foreach (var subtree in subtrees) {
+          x.AddSubtree(Negate(subtree));
+        }
+      } else if (IsMultiplication(x) || IsDivision(x)) {
+        // x0 * x1 * .. * xn * -1 => x0 * x1 * .. * -xn
+        var lastSubTree = x.Subtrees.Last();
+        x.RemoveSubtree(x.SubtreeCount - 1);
+        x.AddSubtree(Negate(lastSubTree)); // last is maybe a constant, prefer to negate the constant
+      } else {
+        // any other function
+        return MakeProduct(x, MakeConstant(-1));
+      }
+      return x;
+    }
+
+    /// <summary>
+    /// x => 1/x
+    /// Doesn't create new trees and manipulates x
+    /// </summary>
+    /// <param name="x"></param>
+    /// <returns></returns>
+    private ISymbolicExpressionTreeNode Invert(ISymbolicExpressionTreeNode x) {
+      if (IsConstant(x)) {
+        return MakeConstant(1.0 / ((ConstantTreeNode)x).Value);
+      } else if (IsDivision(x)) {
+        return MakeFraction(x.GetSubtree(1), x.GetSubtree(0));
+      } else {
+        // any other function
+        return MakeFraction(MakeConstant(1), x);
+      }
+    }
+
+    private ISymbolicExpressionTreeNode MakeConstant(double value) {
+      ConstantTreeNode constantTreeNode = (ConstantTreeNode)(constSymbol.CreateTreeNode());
+      constantTreeNode.Value = value;
+      return constantTreeNode;
+    }
+
+    private ISymbolicExpressionTreeNode MakeVariable(double weight, string name) {
+      var tree = (VariableTreeNode)varSymbol.CreateTreeNode();
+      tree.Weight = weight;
+      tree.VariableName = name;
+      return tree;
+    }
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModel.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModel.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModel.cs	(revision 10269)
@@ -0,0 +1,163 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  /// <summary>
+  /// Abstract base class for symbolic data analysis models
+  /// </summary>
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisModel : NamedItem, ISymbolicDataAnalysisModel {
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Function; }
+    }
+
+    #region properties
+    [Storable]
+    private double lowerEstimationLimit;
+    public double LowerEstimationLimit { get { return lowerEstimationLimit; } }
+    [Storable]
+    private double upperEstimationLimit;
+    public double UpperEstimationLimit { get { return upperEstimationLimit; } }
+
+    [Storable]
+    private ISymbolicExpressionTree symbolicExpressionTree;
+    public ISymbolicExpressionTree SymbolicExpressionTree {
+      get { return symbolicExpressionTree; }
+    }
+
+    [Storable]
+    private ISymbolicDataAnalysisExpressionTreeInterpreter interpreter;
+    public ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter {
+      get { return interpreter; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisModel(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisModel(SymbolicDataAnalysisModel original, Cloner cloner)
+      : base(original, cloner) {
+      this.symbolicExpressionTree = cloner.Clone(original.symbolicExpressionTree);
+      this.interpreter = cloner.Clone(original.interpreter);
+      this.lowerEstimationLimit = original.lowerEstimationLimit;
+      this.upperEstimationLimit = original.upperEstimationLimit;
+    }
+    protected SymbolicDataAnalysisModel(ISymbolicExpressionTree tree, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter,
+       double lowerEstimationLimit, double upperEstimationLimit)
+      : base() {
+      this.name = ItemName;
+      this.description = ItemDescription;
+      this.symbolicExpressionTree = tree;
+      this.interpreter = interpreter;
+      this.lowerEstimationLimit = lowerEstimationLimit;
+      this.upperEstimationLimit = upperEstimationLimit;
+    }
+
+    #region Scaling
+    protected void Scale(IDataAnalysisProblemData problemData, string targetVariable) {
+      var dataset = problemData.Dataset;
+      var rows = problemData.TrainingIndices;
+      var estimatedValues = Interpreter.GetSymbolicExpressionTreeValues(SymbolicExpressionTree, dataset, rows);
+      var targetValues = dataset.GetDoubleValues(targetVariable, rows);
+
+      var linearScalingCalculator = new OnlineLinearScalingParameterCalculator();
+      var targetValuesEnumerator = targetValues.GetEnumerator();
+      var estimatedValuesEnumerator = estimatedValues.GetEnumerator();
+      while (targetValuesEnumerator.MoveNext() & estimatedValuesEnumerator.MoveNext()) {
+        double target = targetValuesEnumerator.Current;
+        double estimated = estimatedValuesEnumerator.Current;
+        if (!double.IsNaN(estimated) && !double.IsInfinity(estimated))
+          linearScalingCalculator.Add(estimated, target);
+      }
+      if (linearScalingCalculator.ErrorState == OnlineCalculatorError.None && (targetValuesEnumerator.MoveNext() || estimatedValuesEnumerator.MoveNext()))
+        throw new ArgumentException("Number of elements in target and estimated values enumeration do not match.");
+
+      double alpha = linearScalingCalculator.Alpha;
+      double beta = linearScalingCalculator.Beta;
+      if (linearScalingCalculator.ErrorState != OnlineCalculatorError.None) return;
+
+      ConstantTreeNode alphaTreeNode = null;
+      ConstantTreeNode betaTreeNode = null;
+      // check if model has been scaled previously by analyzing the structure of the tree
+      var startNode = SymbolicExpressionTree.Root.GetSubtree(0);
+      if (startNode.GetSubtree(0).Symbol is Addition) {
+        var addNode = startNode.GetSubtree(0);
+        if (addNode.SubtreeCount == 2 && addNode.GetSubtree(0).Symbol is Multiplication && addNode.GetSubtree(1).Symbol is Constant) {
+          alphaTreeNode = addNode.GetSubtree(1) as ConstantTreeNode;
+          var mulNode = addNode.GetSubtree(0);
+          if (mulNode.SubtreeCount == 2 && mulNode.GetSubtree(1).Symbol is Constant) {
+            betaTreeNode = mulNode.GetSubtree(1) as ConstantTreeNode;
+          }
+        }
+      }
+      // if tree structure matches the structure necessary for linear scaling then reuse the existing tree nodes
+      if (alphaTreeNode != null && betaTreeNode != null) {
+        betaTreeNode.Value *= beta;
+        alphaTreeNode.Value *= beta;
+        alphaTreeNode.Value += alpha;
+      } else {
+        var mainBranch = startNode.GetSubtree(0);
+        startNode.RemoveSubtree(0);
+        var scaledMainBranch = MakeSum(MakeProduct(mainBranch, beta), alpha);
+        startNode.AddSubtree(scaledMainBranch);
+      }
+    }
+
+    private static ISymbolicExpressionTreeNode MakeSum(ISymbolicExpressionTreeNode treeNode, double alpha) {
+      if (alpha.IsAlmost(0.0)) {
+        return treeNode;
+      } else {
+        var addition = new Addition();
+        var node = addition.CreateTreeNode();
+        var alphaConst = MakeConstant(alpha);
+        node.AddSubtree(treeNode);
+        node.AddSubtree(alphaConst);
+        return node;
+      }
+    }
+
+    private static ISymbolicExpressionTreeNode MakeProduct(ISymbolicExpressionTreeNode treeNode, double beta) {
+      if (beta.IsAlmost(1.0)) {
+        return treeNode;
+      } else {
+        var multipliciation = new Multiplication();
+        var node = multipliciation.CreateTreeNode();
+        var betaConst = MakeConstant(beta);
+        node.AddSubtree(treeNode);
+        node.AddSubtree(betaConst);
+        return node;
+      }
+    }
+
+    private static ISymbolicExpressionTreeNode MakeConstant(double c) {
+      var node = (ConstantTreeNode)(new Constant()).CreateTreeNode();
+      node.Value = c;
+      return node;
+    }
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisMultiObjectiveProblem.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisMultiObjectiveProblem.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisMultiObjectiveProblem.cs	(revision 10269)
@@ -0,0 +1,101 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisMultiObjectiveProblem<T, U, V> : SymbolicDataAnalysisProblem<T, U, V>, ISymbolicDataAnalysisMultiObjectiveProblem
+    where T : class,IDataAnalysisProblemData
+    where U : class, ISymbolicDataAnalysisMultiObjectiveEvaluator<T>
+    where V : class, ISymbolicDataAnalysisSolutionCreator {
+    private const string MaximizationParameterName = "Maximization";
+    private const string BestKnownQualityParameterName = "BestKnownQuality";
+
+    #region parameter properties
+    public IValueParameter<BoolArray> MaximizationParameter {
+      get { return (IValueParameter<BoolArray>)Parameters[MaximizationParameterName]; }
+    }
+    IParameter IMultiObjectiveHeuristicOptimizationProblem.MaximizationParameter {
+      get { return MaximizationParameter; }
+    }
+    #endregion
+
+    #region properties
+    public BoolArray Maximization {
+      get { return MaximizationParameter.Value; }
+      set { MaximizationParameter.Value = value; }
+    }
+    IMultiObjectiveEvaluator IMultiObjectiveHeuristicOptimizationProblem.Evaluator {
+      get { return Evaluator; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisMultiObjectiveProblem(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisMultiObjectiveProblem(SymbolicDataAnalysisMultiObjectiveProblem<T, U, V> original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEventHandler();
+    }
+
+    public SymbolicDataAnalysisMultiObjectiveProblem(T problemData, U evaluator, V solutionCreator)
+      : base(problemData, evaluator, solutionCreator) {
+      Parameters.Add(new ValueParameter<BoolArray>(MaximizationParameterName, "Set to false if the problem should be minimized."));
+
+      ParameterizeOperators();
+      RegisterEventHandler();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEventHandler();
+    }
+
+    private void RegisterEventHandler() {
+      Evaluator.QualitiesParameter.ActualNameChanged += new System.EventHandler(QualitiesParameter_ActualNameChanged);
+    }
+
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      Evaluator.QualitiesParameter.ActualNameChanged += new System.EventHandler(QualitiesParameter_ActualNameChanged);
+      Maximization = new BoolArray(Evaluator.Maximization.ToArray());
+      ParameterizeOperators();
+    }
+
+    private void QualitiesParameter_ActualNameChanged(object sender, System.EventArgs e) {
+      ParameterizeOperators();
+    }
+
+    protected override void ParameterizeOperators() {
+      base.ParameterizeOperators();
+      foreach (var op in Operators.OfType<ISymbolicDataAnalysisMultiObjectiveAnalyzer>()) {
+        op.QualitiesParameter.ActualName = Evaluator.QualitiesParameter.ActualName;
+        op.MaximizationParameter.ActualName = MaximizationParameterName;
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs	(revision 10269)
@@ -0,0 +1,366 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Drawing;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Common.Resources;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.Instances;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisProblem<T, U, V> : HeuristicOptimizationProblem<U, V>, IDataAnalysisProblem<T>, ISymbolicDataAnalysisProblem, IStorableContent,
+    IProblemInstanceConsumer<T>, IProblemInstanceExporter<T>
+    where T : class, IDataAnalysisProblemData
+    where U : class, ISymbolicDataAnalysisEvaluator<T>
+    where V : class, ISymbolicDataAnalysisSolutionCreator {
+
+    #region parameter names & descriptions
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
+    private const string SymbolicExpressionTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumFunctionDefinitionsParameterName = "MaximumFunctionDefinitions";
+    private const string MaximumFunctionArgumentsParameterName = "MaximumFunctionArguments";
+    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
+    private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition";
+    private const string ValidationPartitionParameterName = "ValidationPartition";
+    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
+
+    private const string ProblemDataParameterDescription = "";
+    private const string SymbolicExpressionTreeGrammarParameterDescription = "The grammar that should be used for symbolic expression tree.";
+    private const string SymoblicExpressionTreeInterpreterParameterDescription = "The interpreter that should be used to evaluate the symbolic expression tree.";
+    private const string MaximumSymbolicExpressionTreeDepthParameterDescription = "Maximal depth of the symbolic expression. The minimum depth needed for the algorithm is 3 because two levels are reserved for the ProgramRoot and the Start symbol.";
+    private const string MaximumSymbolicExpressionTreeLengthParameterDescription = "Maximal length of the symbolic expression.";
+    private const string MaximumFunctionDefinitionsParameterDescription = "Maximal number of automatically defined functions";
+    private const string MaximumFunctionArgumentsParameterDescription = "Maximal number of arguments of automatically defined functions.";
+    private const string RelativeNumberOfEvaluatedSamplesParameterDescription = "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation.";
+    private const string FitnessCalculationPartitionParameterDescription = "The partition of the problem data training partition, that should be used to calculate the fitness of an individual.";
+    private const string ValidationPartitionParameterDescription = "The partition of the problem data training partition, that should be used to select the best model from (optional).";
+    private const string ApplyLinearScalingParameterDescription = "Flag that indicates if the individual should be linearly scaled before evaluating.";
+    #endregion
+
+    #region parameter properties
+    IParameter IDataAnalysisProblem.ProblemDataParameter {
+      get { return ProblemDataParameter; }
+    }
+    public IValueParameter<T> ProblemDataParameter {
+      get { return (IValueParameter<T>)Parameters[ProblemDataParameterName]; }
+    }
+    public IValueParameter<ISymbolicDataAnalysisGrammar> SymbolicExpressionTreeGrammarParameter {
+      get { return (IValueParameter<ISymbolicDataAnalysisGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
+    }
+    public IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
+      get { return (IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> MaximumFunctionDefinitionsParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumFunctionDefinitionsParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> MaximumFunctionArgumentsParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumFunctionArgumentsParameterName]; }
+    }
+    public IFixedValueParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
+      get { return (IFixedValueParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
+    }
+    public IFixedValueParameter<IntRange> FitnessCalculationPartitionParameter {
+      get { return (IFixedValueParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; }
+    }
+    public IFixedValueParameter<IntRange> ValidationPartitionParameter {
+      get { return (IFixedValueParameter<IntRange>)Parameters[ValidationPartitionParameterName]; }
+    }
+    public IFixedValueParameter<BoolValue> ApplyLinearScalingParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
+    }
+    #endregion
+
+    #region properties
+    public string Filename { get; set; }
+    public static new Image StaticItemImage { get { return VSImageLibrary.Type; } }
+
+    IDataAnalysisProblemData IDataAnalysisProblem.ProblemData {
+      get { return ProblemData; }
+    }
+    public T ProblemData {
+      get { return ProblemDataParameter.Value; }
+      set { ProblemDataParameter.Value = value; }
+    }
+
+    public ISymbolicDataAnalysisGrammar SymbolicExpressionTreeGrammar {
+      get { return SymbolicExpressionTreeGrammarParameter.Value; }
+      set { SymbolicExpressionTreeGrammarParameter.Value = value; }
+    }
+    public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicExpressionTreeInterpreter {
+      get { return SymbolicExpressionTreeInterpreterParameter.Value; }
+      set { SymbolicExpressionTreeInterpreterParameter.Value = value; }
+    }
+
+    public IntValue MaximumSymbolicExpressionTreeDepth {
+      get { return MaximumSymbolicExpressionTreeDepthParameter.Value; }
+    }
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.Value; }
+    }
+    public IntValue MaximumFunctionDefinitions {
+      get { return MaximumFunctionDefinitionsParameter.Value; }
+    }
+    public IntValue MaximumFunctionArguments {
+      get { return MaximumFunctionArgumentsParameter.Value; }
+    }
+    public PercentValue RelativeNumberOfEvaluatedSamples {
+      get { return RelativeNumberOfEvaluatedSamplesParameter.Value; }
+    }
+
+    public IntRange FitnessCalculationPartition {
+      get { return FitnessCalculationPartitionParameter.Value; }
+    }
+    public IntRange ValidationPartition {
+      get { return ValidationPartitionParameter.Value; }
+    }
+    public BoolValue ApplyLinearScaling {
+      get { return ApplyLinearScalingParameter.Value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisProblem(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (!Parameters.ContainsKey(ApplyLinearScalingParameterName)) {
+        Parameters.Add(new FixedValueParameter<BoolValue>(ApplyLinearScalingParameterName, ApplyLinearScalingParameterDescription, new BoolValue(false)));
+        ApplyLinearScalingParameter.Hidden = true;
+
+        //it is assumed that for all symbolic regression algorithms linear scaling was set to true
+        //there is no possibility to determine the previous value of the parameter as it was stored in the evaluator
+        if (GetType().Name.Contains("SymbolicRegression"))
+          ApplyLinearScaling.Value = true;
+      }
+
+      RegisterEventHandlers();
+    }
+    protected SymbolicDataAnalysisProblem(SymbolicDataAnalysisProblem<T, U, V> original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEventHandlers();
+    }
+
+    protected SymbolicDataAnalysisProblem(T problemData, U evaluator, V solutionCreator)
+      : base(evaluator, solutionCreator) {
+      Parameters.Add(new ValueParameter<T>(ProblemDataParameterName, ProblemDataParameterDescription, problemData));
+      Parameters.Add(new ValueParameter<ISymbolicDataAnalysisGrammar>(SymbolicExpressionTreeGrammarParameterName, SymbolicExpressionTreeGrammarParameterDescription));
+      Parameters.Add(new ValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, SymoblicExpressionTreeInterpreterParameterDescription));
+      Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, MaximumSymbolicExpressionTreeDepthParameterDescription));
+      Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, MaximumSymbolicExpressionTreeLengthParameterDescription));
+      Parameters.Add(new FixedValueParameter<IntValue>(MaximumFunctionDefinitionsParameterName, MaximumFunctionDefinitionsParameterDescription));
+      Parameters.Add(new FixedValueParameter<IntValue>(MaximumFunctionArgumentsParameterName, MaximumFunctionArgumentsParameterDescription));
+      Parameters.Add(new FixedValueParameter<IntRange>(FitnessCalculationPartitionParameterName, FitnessCalculationPartitionParameterDescription));
+      Parameters.Add(new FixedValueParameter<IntRange>(ValidationPartitionParameterName, ValidationPartitionParameterDescription));
+      Parameters.Add(new FixedValueParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, RelativeNumberOfEvaluatedSamplesParameterDescription, new PercentValue(1)));
+      Parameters.Add(new FixedValueParameter<BoolValue>(ApplyLinearScalingParameterName, ApplyLinearScalingParameterDescription, new BoolValue(false)));
+
+      SymbolicExpressionTreeInterpreterParameter.Hidden = true;
+      MaximumFunctionArgumentsParameter.Hidden = true;
+      MaximumFunctionDefinitionsParameter.Hidden = true;
+      ApplyLinearScalingParameter.Hidden = true;
+
+      SymbolicExpressionTreeGrammar = new TypeCoherentExpressionGrammar();
+      SymbolicExpressionTreeInterpreter = new SymbolicDataAnalysisExpressionTreeLinearInterpreter();
+
+      FitnessCalculationPartition.Start = ProblemData.TrainingPartition.Start;
+      FitnessCalculationPartition.End = ProblemData.TrainingPartition.End;
+
+      InitializeOperators();
+
+      UpdateGrammar();
+      RegisterEventHandlers();
+    }
+
+    protected virtual void UpdateGrammar() {
+      SymbolicExpressionTreeGrammar.MaximumFunctionArguments = MaximumFunctionArguments.Value;
+      SymbolicExpressionTreeGrammar.MaximumFunctionDefinitions = MaximumFunctionDefinitions.Value;
+      foreach (var varSymbol in SymbolicExpressionTreeGrammar.Symbols.OfType<HeuristicLab.Problems.DataAnalysis.Symbolic.Variable>()) {
+        if (!varSymbol.Fixed) {
+          varSymbol.AllVariableNames = ProblemData.InputVariables.Select(x => x.Value);
+          varSymbol.VariableNames = ProblemData.AllowedInputVariables;
+        }
+      }
+      foreach (var varSymbol in SymbolicExpressionTreeGrammar.Symbols.OfType<HeuristicLab.Problems.DataAnalysis.Symbolic.VariableCondition>()) {
+        if (!varSymbol.Fixed) {
+          varSymbol.AllVariableNames = ProblemData.InputVariables.Select(x => x.Value);
+          varSymbol.VariableNames = ProblemData.AllowedInputVariables;
+        }
+      }
+    }
+
+    private void InitializeOperators() {
+      Operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>());
+      Operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicDataAnalysisExpressionCrossover<T>>());
+      Operators.Add(new SymbolicExpressionSymbolFrequencyAnalyzer());
+      Operators.Add(new SymbolicDataAnalysisVariableFrequencyAnalyzer());
+      Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer());
+      Operators.Add(new SymbolicExpressionTreeLengthAnalyzer());
+      ParameterizeOperators();
+    }
+
+    #region events
+    private void RegisterEventHandlers() {
+      ProblemDataParameter.ValueChanged += new EventHandler(ProblemDataParameter_ValueChanged);
+      ProblemDataParameter.Value.Changed += (object sender, EventArgs e) => OnProblemDataChanged();
+
+      SymbolicExpressionTreeGrammarParameter.ValueChanged += new EventHandler(SymbolicExpressionTreeGrammarParameter_ValueChanged);
+
+      MaximumFunctionArguments.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);
+      MaximumFunctionDefinitions.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);
+      MaximumSymbolicExpressionTreeDepth.ValueChanged += new EventHandler(MaximumSymbolicExpressionTreeDepth_ValueChanged);
+    }
+
+    private void ProblemDataParameter_ValueChanged(object sender, EventArgs e) {
+      ValidationPartition.Start = 0;
+      ValidationPartition.End = 0;
+      ProblemDataParameter.Value.Changed += (object s, EventArgs args) => OnProblemDataChanged();
+      OnProblemDataChanged();
+    }
+
+    private void SymbolicExpressionTreeGrammarParameter_ValueChanged(object sender, EventArgs e) {
+      UpdateGrammar();
+    }
+
+    private void ArchitectureParameterValue_ValueChanged(object sender, EventArgs e) {
+      UpdateGrammar();
+    }
+
+    private void MaximumSymbolicExpressionTreeDepth_ValueChanged(object sender, EventArgs e) {
+      if (MaximumSymbolicExpressionTreeDepth != null && MaximumSymbolicExpressionTreeDepth.Value < 3)
+        MaximumSymbolicExpressionTreeDepth.Value = 3;
+    }
+
+    protected override void OnSolutionCreatorChanged() {
+      base.OnSolutionCreatorChanged();
+      SolutionCreator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged);
+      ParameterizeOperators();
+    }
+
+    private void SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeOperators();
+    }
+
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      ParameterizeOperators();
+    }
+
+    public event EventHandler ProblemDataChanged;
+    protected virtual void OnProblemDataChanged() {
+      FitnessCalculationPartition.Start = ProblemData.TrainingPartition.Start;
+      FitnessCalculationPartition.End = ProblemData.TrainingPartition.End;
+
+      UpdateGrammar();
+      ParameterizeOperators();
+
+      var handler = ProblemDataChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+
+      OnReset();
+    }
+    #endregion
+
+    protected virtual void ParameterizeOperators() {
+      var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators).ToList();
+
+      foreach (var op in operators.OfType<ISymbolicExpressionTreeGrammarBasedOperator>()) {
+        op.SymbolicExpressionTreeGrammarParameter.ActualName = SymbolicExpressionTreeGrammarParameter.Name;
+      }
+      foreach (var op in operators.OfType<ISymbolicExpressionTreeSizeConstraintOperator>()) {
+        op.MaximumSymbolicExpressionTreeDepthParameter.ActualName = MaximumSymbolicExpressionTreeDepthParameter.Name;
+        op.MaximumSymbolicExpressionTreeLengthParameter.ActualName = MaximumSymbolicExpressionTreeLengthParameter.Name;
+      }
+      foreach (var op in operators.OfType<ISymbolicExpressionTreeArchitectureAlteringOperator>()) {
+        op.MaximumFunctionArgumentsParameter.ActualName = MaximumFunctionArgumentsParameter.Name;
+        op.MaximumFunctionDefinitionsParameter.ActualName = MaximumFunctionDefinitionsParameter.Name;
+      }
+      foreach (var op in operators.OfType<ISymbolicDataAnalysisEvaluator<T>>()) {
+        op.ProblemDataParameter.ActualName = ProblemDataParameterName;
+        op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+        op.EvaluationPartitionParameter.ActualName = FitnessCalculationPartitionParameter.Name;
+        op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;
+        op.ApplyLinearScalingParameter.ActualName = ApplyLinearScalingParameter.Name;
+      }
+      foreach (var op in operators.OfType<ISymbolicExpressionTreeCrossover>()) {
+        op.ParentsParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+        op.ChildParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+      foreach (var op in operators.OfType<ISymbolicExpressionTreeManipulator>()) {
+        op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+      foreach (var op in operators.OfType<ISymbolicExpressionTreeAnalyzer>()) {
+        op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+      foreach (var op in operators.OfType<ISymbolicDataAnalysisSingleObjectiveAnalyzer>()) {
+        op.ApplyLinearScalingParameter.ActualName = ApplyLinearScalingParameter.Name;
+      }
+      foreach (var op in operators.OfType<ISymbolicDataAnalysisMultiObjectiveAnalyzer>()) {
+        op.ApplyLinearScalingParameter.ActualName = ApplyLinearScalingParameter.Name;
+      }
+      foreach (var op in operators.OfType<ISymbolicDataAnalysisAnalyzer>()) {
+        op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+      foreach (var op in operators.OfType<ISymbolicDataAnalysisValidationAnalyzer<U, T>>()) {
+        op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;
+        op.ValidationPartitionParameter.ActualName = ValidationPartitionParameter.Name;
+      }
+      foreach (var op in operators.OfType<ISymbolicDataAnalysisInterpreterOperator>()) {
+        op.SymbolicDataAnalysisTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
+      }
+      foreach (var op in operators.OfType<ISymbolicDataAnalysisExpressionCrossover<T>>()) {
+        op.EvaluationPartitionParameter.ActualName = FitnessCalculationPartitionParameter.Name;
+        op.ProblemDataParameter.ActualName = ProblemDataParameter.Name;
+        op.EvaluationPartitionParameter.ActualName = FitnessCalculationPartitionParameter.Name;
+        op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;
+        op.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
+      }
+    }
+
+    #region Import & Export
+    public virtual void Load(T data) {
+      Name = data.Name;
+      Description = data.Description;
+      ProblemData = data;
+    }
+
+    public virtual T Export() {
+      return ProblemData;
+    }
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSingleObjectiveProblem.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSingleObjectiveProblem.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSingleObjectiveProblem.cs	(revision 10269)
@@ -0,0 +1,119 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisSingleObjectiveProblem<T, U, V> : SymbolicDataAnalysisProblem<T, U, V>, ISymbolicDataAnalysisSingleObjectiveProblem
+    where T : class,IDataAnalysisProblemData
+    where U : class, ISymbolicDataAnalysisSingleObjectiveEvaluator<T>
+    where V : class, ISymbolicDataAnalysisSolutionCreator {
+    private const string MaximizationParameterName = "Maximization";
+    private const string BestKnownQualityParameterName = "BestKnownQuality";
+
+    #region parameter properties
+    public IFixedValueParameter<BoolValue> MaximizationParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters[MaximizationParameterName]; }
+    }
+    IParameter ISingleObjectiveHeuristicOptimizationProblem.MaximizationParameter {
+      get { return MaximizationParameter; }
+    }
+    public IFixedValueParameter<DoubleValue> BestKnownQualityParameter {
+      get { return (IFixedValueParameter<DoubleValue>)Parameters[BestKnownQualityParameterName]; }
+    }
+    IParameter ISingleObjectiveHeuristicOptimizationProblem.BestKnownQualityParameter {
+      get { return BestKnownQualityParameter; }
+    }
+    #endregion
+
+    #region properties
+    public BoolValue Maximization {
+      get { return MaximizationParameter.Value; }
+    }
+    public DoubleValue BestKnownQuality {
+      get { return BestKnownQualityParameter.Value; }
+    }
+    ISingleObjectiveEvaluator ISingleObjectiveHeuristicOptimizationProblem.Evaluator {
+      get { return Evaluator; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisSingleObjectiveProblem(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisSingleObjectiveProblem(SymbolicDataAnalysisSingleObjectiveProblem<T, U, V> original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEventHandler();
+      MaximizationParameter.Hidden = true;
+    }
+
+    public SymbolicDataAnalysisSingleObjectiveProblem(T problemData, U evaluator, V solutionCreator)
+      : base(problemData, evaluator, solutionCreator) {
+      Parameters.Add(new FixedValueParameter<BoolValue>(MaximizationParameterName, "Set to false if the problem should be minimized."));
+      Parameters.Add(new FixedValueParameter<DoubleValue>(BestKnownQualityParameterName, "The quality of the best known solution of this problem."));
+
+      MaximizationParameter.Hidden = true;
+      InitializeOperators();
+      RegisterEventHandler();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEventHandler();
+    }
+
+    private void InitializeOperators() {
+      Operators.Add(new SymbolicDataAnalysisAlleleFrequencyAnalyzer());
+      ParameterizeOperators();
+    }
+
+    private void RegisterEventHandler() {
+      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(QualityParameter_ActualNameChanged);
+    }
+
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(QualityParameter_ActualNameChanged);
+      Maximization.Value = base.Evaluator.Maximization;
+      ParameterizeOperators();
+    }
+
+    private void QualityParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeOperators();
+    }
+
+    protected override void ParameterizeOperators() {
+      base.ParameterizeOperators();
+
+      foreach (var op in Operators.OfType<ISymbolicDataAnalysisSingleObjectiveAnalyzer>()) {
+        op.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
+        op.MaximizationParameter.ActualName = MaximizationParameterName;
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs	(revision 10269)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public abstract class SymbolicDataAnalysisSolutionImpactValuesCalculator : ISymbolicDataAnalysisSolutionImpactValuesCalculator {
+    public abstract double CalculateReplacementValue(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, IEnumerable<int> rows);
+    public abstract double CalculateImpactValue(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, IEnumerable<int> rows, double originalQuality = double.NaN);
+
+    protected static double CalculateReplacementValue(ISymbolicExpressionTreeNode node, ISymbolicExpressionTree sourceTree, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter,
+      Dataset dataset, IEnumerable<int> rows) {
+      //optimization: constant nodes return always the same value
+      ConstantTreeNode constantNode = node as ConstantTreeNode;
+      if (constantNode != null) return constantNode.Value;
+
+      var rootSymbol = new ProgramRootSymbol().CreateTreeNode();
+      var startSymbol = new StartSymbol().CreateTreeNode();
+      rootSymbol.AddSubtree(startSymbol);
+      startSymbol.AddSubtree((ISymbolicExpressionTreeNode)node.Clone());
+
+      var tempTree = new SymbolicExpressionTree(rootSymbol);
+      // clone ADFs of source tree
+      for (int i = 1; i < sourceTree.Root.SubtreeCount; i++) {
+        tempTree.Root.AddSubtree((ISymbolicExpressionTreeNode)sourceTree.Root.GetSubtree(i).Clone());
+      }
+      return interpreter.GetSymbolicExpressionTreeValues(tempTree, dataset, rows).Median();
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionPruningOptimizer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionPruningOptimizer.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionPruningOptimizer.cs	(revision 10269)
@@ -0,0 +1,46 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("SymbolicDataAnalysisSolutionPruningOptimizer", "An operator which automatically removes nodes that have a negative impact from the tree model, optimizing the remaining constants.")]
+  [StorableClass]
+  public abstract class SymbolicDataAnalysisSolutionPruningOptimizer {
+    public abstract ISymbolicDataAnalysisSolution PruneAndOptimizeSolution(ISymbolicDataAnalysisSolution solution);
+
+    protected ConstantTreeNode MakeConstantTreeNode(double value) {
+      var constant = new Constant { MinValue = value - 1, MaxValue = value + 1 };
+      var constantTreeNode = (ConstantTreeNode)constant.CreateTreeNode();
+      constantTreeNode.Value = value;
+      return constantTreeNode;
+    }
+
+    protected void ReplaceWithConstantNode(ISymbolicExpressionTreeNode originalNode, ISymbolicExpressionTreeNode constantNode) {
+      var parent = originalNode.Parent;
+      var index = parent.IndexOfSubtree(originalNode);
+      parent.RemoveSubtree(index);
+      parent.InsertSubtree(index, constantNode);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Addition.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Addition.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Addition.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Addition", "Symbol that represents the + operator.")]
+  public sealed class Addition : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = byte.MaxValue;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Addition(bool deserializing) : base(deserializing) { }
+    private Addition(Addition original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Addition(this, cloner);
+    }
+    public Addition() : base("Addition", "Symbol that represents the + operator.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/AiryA.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/AiryA.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/AiryA.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("AiryA", "Symbol that represents the Airy A function.")]
+  public sealed class AiryA : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private AiryA(bool deserializing) : base(deserializing) { }
+    private AiryA(AiryA original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new AiryA(this, cloner);
+    }
+    public AiryA() : base("AiryA", "Symbol that represents the Airy A function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/AiryB.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/AiryB.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/AiryB.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("AiryB", "Symbol that represents the Airy B function.")]
+  public sealed class AiryB : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private AiryB(bool deserializing) : base(deserializing) { }
+    private AiryB(AiryB original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new AiryB(this, cloner);
+    }
+    public AiryB() : base("AiryB", "Symbol that represents the Airy B function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/And.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/And.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/And.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("And", "Symbol that represents the boolean AND operator.")]
+  public sealed class And : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = byte.MaxValue;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private And(bool deserializing) : base(deserializing) { }
+    private And(And original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new And(this, cloner);
+    }
+    public And() : base("And", "Symbol that represents the boolean AND operator.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/AutoregressiveVariable.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/AutoregressiveVariable.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/AutoregressiveVariable.cs	(revision 10269)
@@ -0,0 +1,39 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("AutoregressiveTargetVariable", "Represents a variable value with a time offset.")]
+  public sealed class AutoregressiveTargetVariable : LaggedVariable {
+    [StorableConstructor]
+    private AutoregressiveTargetVariable(bool deserializing) : base(deserializing) { }
+    private AutoregressiveTargetVariable(AutoregressiveTargetVariable original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public AutoregressiveTargetVariable() : base("Autoregressive Target Variable", "Represents the target variable with a time offset.") { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new AutoregressiveTargetVariable(this, cloner);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Average.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Average.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Average.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Average", "Symbol that represents the average (arithmetic mean) function.")]
+  public sealed class Average : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = byte.MaxValue;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Average(bool deserializing) : base(deserializing) { }
+    private Average(Average original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Average(this, cloner);
+    }
+    public Average() : base("Average", "Symbol that represents the average (arithmetic mean) function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Bessel.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Bessel.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Bessel.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Bessel", "Symbol that represents the Bessel function.")]
+  public sealed class Bessel : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Bessel(bool deserializing) : base(deserializing) { }
+    private Bessel(Bessel original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Bessel(this, cloner);
+    }
+    public Bessel() : base("Bessel", "Symbol that represents the Bessel function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Constant.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Constant.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Constant.cs	(revision 10269)
@@ -0,0 +1,128 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Constant", "Represents a constant value.")]
+  public sealed class Constant : Symbol {
+    #region Properties
+    [Storable]
+    private double minValue;
+    public double MinValue {
+      get { return minValue; }
+      set {
+        if (value != minValue) {
+          minValue = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double maxValue;
+    public double MaxValue {
+      get { return maxValue; }
+      set {
+        if (value != maxValue) {
+          maxValue = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double manipulatorMu;
+    public double ManipulatorMu {
+      get { return manipulatorMu; }
+      set {
+        if (value != manipulatorMu) {
+          manipulatorMu = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double manipulatorSigma;
+    public double ManipulatorSigma {
+      get { return manipulatorSigma; }
+      set {
+        if (value < 0) throw new ArgumentException();
+        if (value != manipulatorSigma) {
+          manipulatorSigma = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable(DefaultValue = 0.0)]
+    private double multiplicativeManipulatorSigma;
+    public double MultiplicativeManipulatorSigma {
+      get { return multiplicativeManipulatorSigma; }
+      set {
+        if (value < 0) throw new ArgumentException();
+        if (value != multiplicativeManipulatorSigma) {
+          multiplicativeManipulatorSigma = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+
+    private const int minimumArity = 0;
+    private const int maximumArity = 0;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private Constant(bool deserializing) : base(deserializing) { }
+    private Constant(Constant original, Cloner cloner)
+      : base(original, cloner) {
+      minValue = original.minValue;
+      maxValue = original.maxValue;
+      manipulatorMu = original.manipulatorMu;
+      manipulatorSigma = original.manipulatorSigma;
+      multiplicativeManipulatorSigma = original.multiplicativeManipulatorSigma;
+    }
+    public Constant()
+      : base("Constant", "Represents a constant value.") {
+      manipulatorMu = 0.0;
+      manipulatorSigma = 1.0;
+      multiplicativeManipulatorSigma = 0.03;
+      minValue = -20.0;
+      maxValue = 20.0;
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new ConstantTreeNode(this);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Constant(this, cloner);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/ConstantTreeNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/ConstantTreeNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/ConstantTreeNode.cs	(revision 10269)
@@ -0,0 +1,83 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  public sealed class ConstantTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new Constant Symbol {
+      get { return (Constant)base.Symbol; }
+    }
+
+    private double constantValue;
+    [Storable]
+    public double Value {
+      get { return constantValue; }
+      set { constantValue = value; }
+    }
+
+    [StorableConstructor]
+    private ConstantTreeNode(bool deserializing) : base(deserializing) { }
+
+    private ConstantTreeNode(ConstantTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      constantValue = original.constantValue;
+    }
+
+    private ConstantTreeNode() : base() { }
+    public ConstantTreeNode(Constant constantSymbol) : base(constantSymbol) { }
+
+    public override bool HasLocalParameters {
+      get {
+        return true;
+      }
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      base.ResetLocalParameters(random);
+      var range = Symbol.MaxValue - Symbol.MinValue;
+      Value = random.NextDouble() * range + Symbol.MinValue;
+    }
+
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      base.ShakeLocalParameters(random, shakingFactor);
+      // 50% additive & 50% multiplicative
+      if (random.NextDouble() < 0.5) {
+        double x = NormalDistributedRandom.NextDouble(random, Symbol.ManipulatorMu, Symbol.ManipulatorSigma);
+        Value = Value + x * shakingFactor;
+      } else {
+        double x = NormalDistributedRandom.NextDouble(random, 1.0, Symbol.MultiplicativeManipulatorSigma);
+        Value = Value * x;
+      }
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ConstantTreeNode(this, cloner);
+    }
+
+    public override string ToString() {
+      return constantValue.ToString("E4");
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Cosine.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Cosine.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Cosine.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Cosine", "Symbol that represents the cosine function.")]
+  public sealed class Cosine : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Cosine(bool deserializing) : base(deserializing) { }
+    private Cosine(Cosine original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Cosine(this, cloner);
+    }
+    public Cosine() : base("Cosine", "Symbol that represents the cosine function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/CosineIntegral.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/CosineIntegral.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/CosineIntegral.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("CosineIntegral", "Symbol that represents the cosine integral.")]
+  public sealed class CosineIntegral : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private CosineIntegral(bool deserializing) : base(deserializing) { }
+    private CosineIntegral(CosineIntegral original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CosineIntegral(this, cloner);
+    }
+    public CosineIntegral() : base("CosineIntegral", "Symbol that represents the cosine integral.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Dawson.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Dawson.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Dawson.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Dawson", "Symbol that represents dawsons integral.")]
+  public sealed class Dawson : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Dawson(bool deserializing) : base(deserializing) { }
+    private Dawson(Dawson original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Dawson(this, cloner);
+    }
+    public Dawson() : base("Dawson", "Symbol that represents dawsons integral.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Derivative.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Derivative.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Derivative.cs	(revision 10269)
@@ -0,0 +1,47 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Derivative", "Represents the derivative over the specified subtree.")]
+  public sealed class Derivative : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Derivative(bool deserializing) : base(deserializing) { }
+    private Derivative(Derivative original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new Derivative(this, cloner); }
+
+    public Derivative() : base("Derivative", "Represents the derivative over the specified subtree.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Division.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Division.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Division.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Division", "Symbol that represents the / operator.")]
+  public sealed class Division : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = byte.MaxValue;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Division(bool deserializing) : base(deserializing) { }
+    private Division(Division original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Division(this, cloner);
+    }
+    public Division() : base("Division", "Symbol that represents the / operator.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Erf.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Erf.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Erf.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Erf", "Symbol that represents the error function.")]
+  public sealed class Erf : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Erf(bool deserializing) : base(deserializing) { }
+    private Erf(Erf original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Erf(this, cloner);
+    }
+    public Erf() : base("Erf", "Symbol that represents the error function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Exponential.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Exponential.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Exponential.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Exponential", "Symbol that represents the exponential function.")]
+  public sealed class Exponential : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Exponential(bool deserializing) : base(deserializing) { }
+    private Exponential(Exponential original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Exponential(this, cloner);
+    }
+    public Exponential() : base("Exponential", "Symbol that represents the exponential function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/ExponentialIntegralEi.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/ExponentialIntegralEi.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/ExponentialIntegralEi.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("ExponentialIntegralEi", "Symbol that represents the exponential integral (e_i).")]
+  public sealed class ExponentialIntegralEi : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private ExponentialIntegralEi(bool deserializing) : base(deserializing) { }
+    private ExponentialIntegralEi(ExponentialIntegralEi original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ExponentialIntegralEi(this, cloner);
+    }
+    public ExponentialIntegralEi() : base("ExponentialIntegralEi", "Symbol that represents the exponential integral (e_i).") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/FresnelCosineIntegral.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/FresnelCosineIntegral.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/FresnelCosineIntegral.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("FresnelCosineIntegral", "Symbol that represents the Fresnel cosine integral.")]
+  public sealed class FresnelCosineIntegral : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private FresnelCosineIntegral(bool deserializing) : base(deserializing) { }
+    private FresnelCosineIntegral(FresnelCosineIntegral original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new FresnelCosineIntegral(this, cloner);
+    }
+    public FresnelCosineIntegral() : base("FresnelCosineIntegral", "Symbol that represents the Fresnel cosine integral.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/FresnelSineIntegral.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/FresnelSineIntegral.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/FresnelSineIntegral.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("FresnelSineIntegral", "Symbol that represents the Fresnel sine integral.")]
+  public sealed class FresnelSineIntegral : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private FresnelSineIntegral(bool deserializing) : base(deserializing) { }
+    private FresnelSineIntegral(FresnelSineIntegral original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new FresnelSineIntegral(this, cloner);
+    }
+    public FresnelSineIntegral() : base("FresnelSineIntegral", "Symbol that represents the Fresnel sine integral.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Gamma.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Gamma.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Gamma.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Gamma", "Symbol that represents the gamma function.")]
+  public sealed class Gamma : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Gamma(bool deserializing) : base(deserializing) { }
+    private Gamma(Gamma original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Gamma(this, cloner);
+    }
+    public Gamma() : base("Gamma", "Symbol that represents the gamma function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/GreaterThan.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/GreaterThan.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/GreaterThan.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("GreaterThan", "Symbol that represents a greater than relation.")]
+  public sealed class GreaterThan : Symbol {
+    private const int minimumArity = 2;
+    private const int maximumArity = 2;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private GreaterThan(bool deserializing) : base(deserializing) { }
+    private GreaterThan(GreaterThan original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GreaterThan(this, cloner);
+    }
+    public GreaterThan() : base("GreaterThan", "Symbol that represents a greater than relation.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/HyperbolicCosineIntegral.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/HyperbolicCosineIntegral.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/HyperbolicCosineIntegral.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("HyperbolicCosineIntegral", "Symbol that represents the hyperbolic cosine integral.")]
+  public sealed class HyperbolicCosineIntegral : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private HyperbolicCosineIntegral(bool deserializing) : base(deserializing) { }
+    private HyperbolicCosineIntegral(HyperbolicCosineIntegral original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new HyperbolicCosineIntegral(this, cloner);
+    }
+    public HyperbolicCosineIntegral() : base("HyperbolicCosineIntegral", "Symbol that represents the hyperbolic cosine integral.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/HyperbolicSineIntegral.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/HyperbolicSineIntegral.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/HyperbolicSineIntegral.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("HyperbolicSineIntegral", "Symbol that represents the hyperbolic sine integral.")]
+  public sealed class HyperbolicSineIntegral : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private HyperbolicSineIntegral(bool deserializing) : base(deserializing) { }
+    private HyperbolicSineIntegral(HyperbolicSineIntegral original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new HyperbolicSineIntegral(this, cloner);
+    }
+    public HyperbolicSineIntegral() : base("HyperbolicSineIntegral", "Symbol that represents the hyperbolic sine integral.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/ILaggedTreeNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/ILaggedTreeNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/ILaggedTreeNode.cs	(revision 10269)
@@ -0,0 +1,28 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public interface ILaggedTreeNode : ISymbolicExpressionTreeNode {
+    int Lag { get; set; }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/IfThenElse.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/IfThenElse.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/IfThenElse.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("IfThenElse", "Symbol that represents a conditional operator.")]
+  public sealed class IfThenElse : Symbol {
+    private const int minimumArity = 3;
+    private const int maximumArity = 3;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private IfThenElse(bool deserializing) : base(deserializing) { }
+    private IfThenElse(IfThenElse original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new IfThenElse(this, cloner);
+    }
+    public IfThenElse() : base("IfThenElse", "Symbol that represents a conditional operator.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Integral.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Integral.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Integral.cs	(revision 10269)
@@ -0,0 +1,46 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Integral", "Represents the integral over the specified subtree.")]
+  public sealed class Integral : LaggedSymbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Integral(bool deserializing) : base(deserializing) { }
+    private Integral(Integral original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new Integral(this, cloner); }
+
+    public Integral() : base("Integral", "Represents the integral over the specified subtree.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedSymbol.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedSymbol.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedSymbol.cs	(revision 10269)
@@ -0,0 +1,64 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("LaggedSymbol", "Represents a symblol whose evaluation is shifted.")]
+  public abstract class LaggedSymbol : Symbol {
+    [Storable]
+    private int minLag;
+    public virtual int MinLag {
+      get { return minLag; }
+      set { minLag = value; }
+    }
+    [Storable]
+    private int maxLag;
+    public virtual int MaxLag {
+      get { return maxLag; }
+      set { maxLag = value; }
+    }
+
+    [StorableConstructor]
+    protected LaggedSymbol(bool deserializing) : base(deserializing) { }
+    protected LaggedSymbol(LaggedSymbol original, Cloner cloner)
+      : base(original, cloner) {
+      minLag = original.minLag;
+      maxLag = original.maxLag;
+    }
+    protected LaggedSymbol()
+      : base("LaggedSymbol", "Represents a symbol whose evaluation is shifted.") {
+      minLag = -1; maxLag = -1;
+    }
+    protected LaggedSymbol(string name, string description)
+      : base(name, description) {
+      minLag = -1; maxLag = -1;
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new LaggedTreeNode(this);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedTreeNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedTreeNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedTreeNode.cs	(revision 10269)
@@ -0,0 +1,70 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  public class LaggedTreeNode : SymbolicExpressionTreeNode, ILaggedTreeNode {
+    public new LaggedSymbol Symbol {
+      get { return (LaggedSymbol)base.Symbol; }
+    }
+    [Storable]
+    private int lag;
+    public int Lag {
+      get { return lag; }
+      set { lag = value; }
+    }
+
+    [StorableConstructor]
+    protected LaggedTreeNode(bool deserializing) : base(deserializing) { }
+    protected LaggedTreeNode(LaggedTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      lag = original.lag;
+    }
+    public LaggedTreeNode(LaggedSymbol timeLagSymbol) : base(timeLagSymbol) { }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    public override void ResetLocalParameters(IRandom random) {
+      base.ResetLocalParameters(random);
+      lag = random.Next(Symbol.MinLag, Symbol.MaxLag + 1);
+    }
+
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      base.ShakeLocalParameters(random, shakingFactor);
+      lag = Math.Min(Symbol.MaxLag, Math.Max(Symbol.MinLag, lag + random.Next(-1, 2)));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new LaggedTreeNode(this, cloner);
+    }
+
+    public override string ToString() {
+      return base.ToString() + " " + lag.ToString();
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedVariable.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedVariable.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedVariable.cs	(revision 10269)
@@ -0,0 +1,64 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("LaggedVariable", "Represents a variable value with a time offset.")]
+  public class LaggedVariable : Variable {
+    [Storable]
+    private int minLag;
+    public int MinLag {
+      get { return minLag; }
+      set { minLag = value; }
+    }
+    [Storable]
+    private int maxLag;
+    public int MaxLag {
+      get { return maxLag; }
+      set { maxLag = value; }
+    }
+    [StorableConstructor]
+    protected LaggedVariable(bool deserializing) : base(deserializing) { }
+    protected LaggedVariable(LaggedVariable original, Cloner cloner)
+      : base(original, cloner) {
+      minLag = original.minLag;
+      maxLag = original.maxLag;
+    }
+    public LaggedVariable() : this("LaggedVariable", "Represents a variable value with a time offset.") { }
+    protected LaggedVariable(string name, string description)
+      : base(name, description) {
+      MinLag = -1;
+      MaxLag = -1;
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new LaggedVariableTreeNode(this);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new LaggedVariable(this, cloner);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedVariableTreeNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedVariableTreeNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedVariableTreeNode.cs	(revision 10269)
@@ -0,0 +1,72 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  public sealed class LaggedVariableTreeNode : VariableTreeNode, ILaggedTreeNode {
+    public new LaggedVariable Symbol {
+      get { return (LaggedVariable)base.Symbol; }
+    }
+    [Storable]
+    private int lag;
+    public int Lag {
+      get { return lag; }
+      set { lag = value; }
+    }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    [StorableConstructor]
+    private LaggedVariableTreeNode(bool deserializing) : base(deserializing) { }
+    private LaggedVariableTreeNode(LaggedVariableTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      lag = original.lag;
+    }
+
+    public LaggedVariableTreeNode(LaggedVariable variableSymbol) : base(variableSymbol) { }
+
+
+    public override void ResetLocalParameters(IRandom random) {
+      base.ResetLocalParameters(random);
+      lag = random.Next(Symbol.MinLag, Symbol.MaxLag + 1);
+    }
+
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      base.ShakeLocalParameters(random, shakingFactor);
+      lag = Math.Min(Symbol.MaxLag, Math.Max(Symbol.MinLag, lag + random.Next(-1, 2)));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new LaggedVariableTreeNode(this, cloner);
+    }
+
+    public override string ToString() {
+      return base.ToString() +
+        " (t" + (lag > 0 ? "+" : "") + lag + ")";
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LessThan.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LessThan.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LessThan.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("LessThan", "Symbol that represents a less than relation.")]
+  public sealed class LessThan : Symbol {
+    private const int minimumArity = 2;
+    private const int maximumArity = 2;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private LessThan(bool deserializing) : base(deserializing) { }
+    private LessThan(LessThan original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new LessThan(this, cloner);
+    }
+    public LessThan() : base("LessThan", "Symbol that represents a less than relation.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Logarithm.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Logarithm.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Logarithm.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Logarithm", "Symbol that represents the logarithm function.")]
+  public sealed class Logarithm : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Logarithm(bool deserializing) : base(deserializing) { }
+    private Logarithm(Logarithm original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Logarithm(this, cloner);
+    }
+    public Logarithm() : base("Logarithm", "Symbol that represents the logarithm function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Multiplication.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Multiplication.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Multiplication.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Multiplication", "Symbol that represents the * operator.")]
+  public sealed class Multiplication : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = byte.MaxValue;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Multiplication(bool deserializing) : base(deserializing) { }
+    private Multiplication(Multiplication original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Multiplication(this, cloner);
+    }
+    public Multiplication() : base("Multiplication", "Symbol that represents the * operator.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Norm.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Norm.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Norm.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Norm", "Symbol that represents the normal distribution function.")]
+  public sealed class Norm : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Norm(bool deserializing) : base(deserializing) { }
+    private Norm(Norm original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Norm(this, cloner);
+    }
+    public Norm() : base("Norm", "Symbol that represents the normal distribution function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Not.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Not.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Not.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Not", "Symbol that represents the boolean NOT operator.")]
+  public sealed class Not : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Not(bool deserializing) : base(deserializing) { }
+    private Not(Not original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Not(this, cloner);
+    }
+    public Not() : base("Not", "Symbol that represents the boolean NOT operator.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Or.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Or.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Or.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Or", "Symbol that represents the boolean OR operator.")]
+  public sealed class Or : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = byte.MaxValue;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Or(bool deserializing) : base(deserializing) { }
+    private Or(Or original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Or(this, cloner);
+    }
+    public Or() : base("Or", "Symbol that represents the boolean OR operator.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Power.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Power.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Power.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Power", "Symbol that represents the power function.")]
+  public sealed class Power : Symbol {
+    private const int minimumArity = 2;
+    private const int maximumArity = 2;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Power(bool deserializing) : base(deserializing) { }
+    private Power(Power original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Power(this, cloner);
+    }
+    public Power() : base("Power", "Symbol that represents the power function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Psi.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Psi.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Psi.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Psi", "Symbol that represents the psi function.")]
+  public sealed class Psi : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Psi(bool deserializing) : base(deserializing) { }
+    private Psi(Psi original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Psi(this, cloner);
+    }
+    public Psi() : base("Psi", "Symbol that represents the psi function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Root.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Root.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Root.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Root", "Symbol that represents the n-th root function.")]
+  public sealed class Root : Symbol {
+    private const int minimumArity = 2;
+    private const int maximumArity = 2;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Root(bool deserializing) : base(deserializing) { }
+    private Root(Root original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Root(this, cloner);
+    }
+    public Root() : base("Root", "Symbol that represents the n-th root function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Sine.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Sine.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Sine.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Sine", "Symbol that represents the sine function.")]
+  public sealed class Sine : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Sine(bool deserializing) : base(deserializing) { }
+    private Sine(Sine original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Sine(this, cloner);
+    }
+    public Sine() : base("Sine", "Symbol that represents the sine function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SineIntegral.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SineIntegral.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SineIntegral.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("SineIntegral", "Symbol that represents the sine integral.")]
+  public sealed class SineIntegral : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private SineIntegral(bool deserializing) : base(deserializing) { }
+    private SineIntegral(SineIntegral original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SineIntegral(this, cloner);
+    }
+    public SineIntegral() : base("SineIntegral", "Symbol that represents the sine integral.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Square.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Square.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Square.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Square", "Symbol that represents the square function.")]
+  public sealed class Square : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Square(bool deserializing) : base(deserializing) { }
+    private Square(Square original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Square(this, cloner);
+    }
+    public Square() : base("Square", "Symbol that represents the square function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SquareRoot.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SquareRoot.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SquareRoot.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("SquareRoot", "Symbol that represents the square root function.")]
+  public sealed class SquareRoot : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private SquareRoot(bool deserializing) : base(deserializing) { }
+    private SquareRoot(SquareRoot original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SquareRoot(this, cloner);
+    }
+    public SquareRoot() : base("SquareRoot", "Symbol that represents the square root function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Subtraction.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Subtraction.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Subtraction.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Subtraction", "Symbol that represents the - operator.")]
+  public sealed class Subtraction : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = byte.MaxValue;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Subtraction(bool deserializing) : base(deserializing) { }
+    private Subtraction(Subtraction original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Subtraction(this, cloner);
+    }
+    public Subtraction() : base("Subtraction", "Symbol that represents the - operator.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Tangent.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Tangent.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Tangent.cs	(revision 10269)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Tangent", "Symbol that represents the tangent trigonometric function.")]
+  public sealed class Tangent : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Tangent(bool deserializing) : base(deserializing) { }
+    private Tangent(Tangent original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Tangent(this, cloner);
+    }
+    public Tangent() : base("Tangent", "Symbol that represents the tangent trigonometric function.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/TimeLag.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/TimeLag.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/TimeLag.cs	(revision 10269)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("TimeLag", "Represents a symblol whose evaluation is shifted.")]
+  public sealed class TimeLag : LaggedSymbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = 1;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private TimeLag(bool deserializing) : base(deserializing) { }
+    private TimeLag(TimeLag original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new TimeLag(this, cloner); }
+
+    public TimeLag() : base("TimeLag", "Represents a symbol whose evaluation is shifted.") { }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Variable.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Variable.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Variable.cs	(revision 10269)
@@ -0,0 +1,179 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Variable", "Represents a variable value.")]
+  public class Variable : Symbol {
+    #region Properties
+    [Storable]
+    private double weightMu;
+    public double WeightMu {
+      get { return weightMu; }
+      set {
+        if (value != weightMu) {
+          weightMu = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double weightSigma;
+    public double WeightSigma {
+      get { return weightSigma; }
+      set {
+        if (weightSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
+        if (value != weightSigma) {
+          weightSigma = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double weightManipulatorMu;
+    public double WeightManipulatorMu {
+      get { return weightManipulatorMu; }
+      set {
+        if (value != weightManipulatorMu) {
+          weightManipulatorMu = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double weightManipulatorSigma;
+    public double WeightManipulatorSigma {
+      get { return weightManipulatorSigma; }
+      set {
+        if (weightManipulatorSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
+        if (value != weightManipulatorSigma) {
+          weightManipulatorSigma = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable(DefaultValue = 0.0)]
+    private double multiplicativeWeightManipulatorSigma;
+    public double MultiplicativeWeightManipulatorSigma {
+      get { return multiplicativeWeightManipulatorSigma; }
+      set {
+        if (multiplicativeWeightManipulatorSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
+        if (value != multiplicativeWeightManipulatorSigma) {
+          multiplicativeWeightManipulatorSigma = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    private List<string> variableNames;
+    [Storable]
+    public IEnumerable<string> VariableNames {
+      get { return variableNames; }
+      set {
+        if (value == null) throw new ArgumentNullException();
+        variableNames.Clear();
+        variableNames.AddRange(value);
+        OnChanged(EventArgs.Empty);
+      }
+    }
+
+    private List<string> allVariableNames;
+    [Storable]
+    public IEnumerable<string> AllVariableNames {
+      get { return allVariableNames; }
+      set {
+        if (value == null) throw new ArgumentNullException();
+        allVariableNames.Clear();
+        allVariableNames.AddRange(value);
+      }
+    }
+
+    public override bool Enabled {
+      get {
+        if (variableNames.Count == 0) return false;
+        return base.Enabled;
+      }
+      set {
+        if (variableNames.Count == 0) base.Enabled = false;
+        else base.Enabled = value;
+      }
+    }
+
+    private const int minimumArity = 0;
+    private const int maximumArity = 0;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+    #endregion
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (allVariableNames == null || (allVariableNames.Count == 0 && variableNames.Count > 0)) {
+        allVariableNames = variableNames;
+      }
+    }
+
+    [StorableConstructor]
+    protected Variable(bool deserializing)
+      : base(deserializing) {
+      variableNames = new List<string>();
+      allVariableNames = new List<string>();
+    }
+    protected Variable(Variable original, Cloner cloner)
+      : base(original, cloner) {
+      weightMu = original.weightMu;
+      weightSigma = original.weightSigma;
+      variableNames = new List<string>(original.variableNames);
+      allVariableNames = new List<string>(original.allVariableNames);
+      weightManipulatorMu = original.weightManipulatorMu;
+      weightManipulatorSigma = original.weightManipulatorSigma;
+      multiplicativeWeightManipulatorSigma = original.multiplicativeWeightManipulatorSigma;
+    }
+    public Variable() : this("Variable", "Represents a variable value.") { }
+    public Variable(string name, string description)
+      : base(name, description) {
+      weightMu = 1.0;
+      weightSigma = 1.0;
+      weightManipulatorMu = 0.0;
+      weightManipulatorSigma = 0.05;
+      multiplicativeWeightManipulatorSigma = 0.03;
+      variableNames = new List<string>();
+      allVariableNames = new List<string>();
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new VariableTreeNode(this);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Variable(this, cloner);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableCondition.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableCondition.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableCondition.cs	(revision 10269)
@@ -0,0 +1,220 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Variable Condition", "Represents a condition that tests a given variable against a specified threshold.")]
+  public sealed class VariableCondition : Symbol {
+    #region properties
+    [Storable]
+    private double thresholdInitializerMu;
+    public double ThresholdInitializerMu {
+      get { return thresholdInitializerMu; }
+      set {
+        if (value != thresholdInitializerMu) {
+          thresholdInitializerMu = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double thresholdInitializerSigma;
+    public double ThresholdInitializerSigma {
+      get { return thresholdInitializerSigma; }
+      set {
+        if (thresholdInitializerSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
+        if (value != thresholdInitializerSigma) {
+          thresholdInitializerSigma = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+
+    [Storable]
+    private double thresholdManipulatorMu;
+    public double ThresholdManipulatorMu {
+      get { return thresholdManipulatorMu; }
+      set {
+        if (value != thresholdManipulatorMu) {
+          thresholdManipulatorMu = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double thresholdManipulatorSigma;
+    public double ThresholdManipulatorSigma {
+      get { return thresholdManipulatorSigma; }
+      set {
+        if (thresholdManipulatorSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
+        if (value != thresholdManipulatorSigma) {
+          thresholdManipulatorSigma = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+
+    private List<string> variableNames;
+    [Storable]
+    public IEnumerable<string> VariableNames {
+      get { return variableNames; }
+      set {
+        if (value == null) throw new ArgumentNullException();
+        variableNames.Clear();
+        variableNames.AddRange(value);
+        OnChanged(EventArgs.Empty);
+      }
+    }
+
+    private List<string> allVariableNames;
+    [Storable]
+    public IEnumerable<string> AllVariableNames {
+      get { return allVariableNames; }
+      set {
+        if (value == null) throw new ArgumentNullException();
+        allVariableNames.Clear();
+        allVariableNames.AddRange(value);
+        VariableNames = value;
+      }
+    }
+
+    [Storable]
+    private double slopeInitializerMu;
+    public double SlopeInitializerMu {
+      get { return slopeInitializerMu; }
+      set {
+        if (value != slopeInitializerMu) {
+          slopeInitializerMu = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double slopeInitializerSigma;
+    public double SlopeInitializerSigma {
+      get { return slopeInitializerSigma; }
+      set {
+        if (slopeInitializerSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
+        if (value != slopeInitializerSigma) {
+          slopeInitializerSigma = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+
+    [Storable]
+    private double slopeManipulatorMu;
+    public double SlopeManipulatorMu {
+      get { return slopeManipulatorMu; }
+      set {
+        if (value != slopeManipulatorMu) {
+          slopeManipulatorMu = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double slopeManipulatorSigma;
+    public double SlopeManipulatorSigma {
+      get { return slopeManipulatorSigma; }
+      set {
+        if (slopeManipulatorSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
+        if (value != slopeManipulatorSigma) {
+          slopeManipulatorSigma = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+
+    private const int minimumArity = 2;
+    private const int maximumArity = 2;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+    #endregion
+
+    #region persistence and cloning
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (allVariableNames == null || (allVariableNames.Count == 0 && variableNames.Count > 0)) {
+        allVariableNames = variableNames;
+      }
+    }
+
+    [StorableConstructor]
+    private VariableCondition(bool deserializing)
+      : base(deserializing) {
+      variableNames = new List<string>();
+      allVariableNames = new List<string>();
+    }
+    private VariableCondition(VariableCondition original, Cloner cloner)
+      : base(original, cloner) {
+      thresholdInitializerMu = original.thresholdInitializerMu;
+      thresholdInitializerSigma = original.thresholdInitializerSigma;
+      thresholdManipulatorMu = original.thresholdManipulatorMu;
+      thresholdManipulatorSigma = original.thresholdManipulatorSigma;
+
+      variableNames = new List<string>(original.variableNames);
+      allVariableNames = new List<string>(original.allVariableNames);
+
+      slopeInitializerMu = original.slopeInitializerMu;
+      slopeInitializerSigma = original.slopeInitializerSigma;
+      slopeManipulatorMu = original.slopeManipulatorMu;
+      slopeManipulatorSigma = original.slopeManipulatorSigma;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new VariableCondition(this, cloner);
+    }
+    #endregion
+
+    public VariableCondition() : this("Variable Condition", "Represents a condition that tests a given variable.") { }
+    public VariableCondition(string name, string description)
+      : base(name, description) {
+      thresholdInitializerMu = 0.0;
+      thresholdInitializerSigma = 0.1;
+      thresholdManipulatorMu = 0.0;
+      thresholdManipulatorSigma = 0.1;
+
+      variableNames = new List<string>();
+      allVariableNames = new List<string>();
+
+      slopeInitializerMu = 0.0;
+      slopeInitializerSigma = 0.0;
+      slopeManipulatorMu = 0.0;
+      slopeManipulatorSigma = 0.0;
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new VariableConditionTreeNode(this);
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableConditionTreeNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableConditionTreeNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableConditionTreeNode.cs	(revision 10269)
@@ -0,0 +1,97 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  public sealed class VariableConditionTreeNode : SymbolicExpressionTreeNode {
+    #region properties
+    public new VariableCondition Symbol {
+      get { return (VariableCondition)base.Symbol; }
+    }
+    [Storable]
+    private double threshold;
+    public double Threshold {
+      get { return threshold; }
+      set { threshold = value; }
+    }
+    [Storable]
+    private string variableName;
+    public string VariableName {
+      get { return variableName; }
+      set { variableName = value; }
+    }
+    [Storable]
+    private double slope;
+    public double Slope {
+      get { return slope; }
+      set { slope = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private VariableConditionTreeNode(bool deserializing) : base(deserializing) { }
+    private VariableConditionTreeNode(VariableConditionTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      threshold = original.threshold;
+      variableName = original.variableName;
+      slope = original.slope;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new VariableConditionTreeNode(this, cloner);
+    }
+
+    public VariableConditionTreeNode(VariableCondition variableConditionSymbol) : base(variableConditionSymbol) { }
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    public override void ResetLocalParameters(IRandom random) {
+      base.ResetLocalParameters(random);
+      threshold = NormalDistributedRandom.NextDouble(random, Symbol.ThresholdInitializerMu, Symbol.ThresholdInitializerSigma);
+      variableName = Symbol.VariableNames.SelectRandom(random);
+      slope = NormalDistributedRandom.NextDouble(random, Symbol.SlopeInitializerMu, Symbol.SlopeInitializerSigma);
+    }
+
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      base.ShakeLocalParameters(random, shakingFactor);
+      double x = NormalDistributedRandom.NextDouble(random, Symbol.ThresholdManipulatorMu, Symbol.ThresholdManipulatorSigma);
+      threshold = threshold + x * shakingFactor;
+      variableName = Symbol.VariableNames.SelectRandom(random);
+      x = NormalDistributedRandom.NextDouble(random, Symbol.SlopeManipulatorMu, Symbol.SlopeManipulatorSigma);
+      slope = slope + x * shakingFactor;
+    }
+
+    public override string ToString() {
+      if (slope.IsAlmost(0.0))
+        return variableName + " > " + threshold.ToString("E4") + Environment.NewLine +
+          "slope: " + slope.ToString("E4");
+      else
+        return variableName + " > " + threshold.ToString("E4");
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableTreeNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableTreeNode.cs	(revision 10269)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableTreeNode.cs	(revision 10269)
@@ -0,0 +1,88 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  public class VariableTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new Variable Symbol {
+      get { return (Variable)base.Symbol; }
+    }
+    [Storable]
+    private double weight;
+    public double Weight {
+      get { return weight; }
+      set { weight = value; }
+    }
+    [Storable]
+    private string variableName;
+    public string VariableName {
+      get { return variableName; }
+      set { variableName = value; }
+    }
+
+    [StorableConstructor]
+    protected VariableTreeNode(bool deserializing) : base(deserializing) { }
+    protected VariableTreeNode(VariableTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      weight = original.weight;
+      variableName = original.variableName;
+    }
+    protected VariableTreeNode() { }
+    public VariableTreeNode(Variable variableSymbol) : base(variableSymbol) { }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    public override void ResetLocalParameters(IRandom random) {
+      base.ResetLocalParameters(random);
+      weight = NormalDistributedRandom.NextDouble(random, Symbol.WeightMu, Symbol.WeightSigma);
+      variableName = Symbol.VariableNames.SelectRandom(random);
+    }
+
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      base.ShakeLocalParameters(random, shakingFactor);
+      // 50% additive & 50% multiplicative
+      if (random.NextDouble() < 0) {
+        double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorMu, Symbol.WeightManipulatorSigma);
+        weight = weight + x * shakingFactor;
+      } else {        
+        double x = NormalDistributedRandom.NextDouble(random, 1.0, Symbol.MultiplicativeWeightManipulatorSigma);
+        weight = weight * x;
+      }
+      variableName = Symbol.VariableNames.SelectRandom(random);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new VariableTreeNode(this, cloner);
+    }
+
+    public override string ToString() {
+      if (weight.IsAlmost(1.0)) return variableName;
+      else return weight.ToString("E4") + " " + variableName;
+    }
+  }
+}
Index: /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Tracking.sln
===================================================================
--- /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Tracking.sln	(revision 10268)
+++ /branches/HeuristicLab.EvolutionTracking/HeuristicLab.Tracking.sln	(revision 10269)
@@ -13,7 +13,13 @@
 	EndProjectSection
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.EvolutionTracking-3.4", "HeuristicLab.EvolutionaryTracking\3.4\HeuristicLab.EvolutionTracking-3.4.csproj", "{1F75CEA3-464F-4A6F-B2F0-04B9841EBC16}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4", "HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj", "{06D4A186-9319-48A0-BADE-A2058D462EEA}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.EvolutionTracking.Views-3.4", "HeuristicLab.EvolutionaryTracking.Views\3.4\HeuristicLab.EvolutionTracking.Views-3.4.csproj", "{318DFE8C-CA23-4F1B-A4AC-62B425060241}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4", "HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.csproj", "{423BD94F-963A-438E-BA45-3BB3D61CD03B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.EvolutionTracking-3.4", "HeuristicLab.EvolutionTracking\3.4\HeuristicLab.EvolutionTracking-3.4.csproj", "{1F75CEA3-464F-4A6F-B2F0-04B9841EBC16}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.EvolutionTracking.Views-3.4", "HeuristicLab.EvolutionTracking.Views\3.4\HeuristicLab.EvolutionTracking.Views-3.4.csproj", "{318DFE8C-CA23-4F1B-A4AC-62B425060241}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.DataAnalysis.Symbolic-3.4", "HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj", "{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}"
 EndProject
 Global
@@ -29,9 +35,42 @@
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Debug|x64.ActiveCfg = Debug|x64
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Debug|x64.Build.0 = Debug|x64
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Debug|x86.ActiveCfg = Debug|x86
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Debug|x86.Build.0 = Debug|x86
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Release|Any CPU.Build.0 = Release|Any CPU
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Release|Mixed Platforms.Build.0 = Release|x86
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Release|x64.ActiveCfg = Release|x64
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Release|x64.Build.0 = Release|x64
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Release|x86.ActiveCfg = Release|x86
+		{06D4A186-9319-48A0-BADE-A2058D462EEA}.Release|x86.Build.0 = Release|x86
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Debug|x64.ActiveCfg = Debug|x64
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Debug|x64.Build.0 = Debug|x64
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Debug|x86.ActiveCfg = Debug|x86
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Debug|x86.Build.0 = Debug|x86
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Release|Mixed Platforms.Build.0 = Release|x86
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Release|x64.ActiveCfg = Release|x64
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Release|x64.Build.0 = Release|x64
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Release|x86.ActiveCfg = Release|x86
+		{423BD94F-963A-438E-BA45-3BB3D61CD03B}.Release|x86.Build.0 = Release|x86
 		{1F75CEA3-464F-4A6F-B2F0-04B9841EBC16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{1F75CEA3-464F-4A6F-B2F0-04B9841EBC16}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{1F75CEA3-464F-4A6F-B2F0-04B9841EBC16}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
 		{1F75CEA3-464F-4A6F-B2F0-04B9841EBC16}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
-		{1F75CEA3-464F-4A6F-B2F0-04B9841EBC16}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{1F75CEA3-464F-4A6F-B2F0-04B9841EBC16}.Debug|x64.ActiveCfg = Debug|x64
+		{1F75CEA3-464F-4A6F-B2F0-04B9841EBC16}.Debug|x64.Build.0 = Debug|x64
 		{1F75CEA3-464F-4A6F-B2F0-04B9841EBC16}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{1F75CEA3-464F-4A6F-B2F0-04B9841EBC16}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -46,5 +85,6 @@
 		{318DFE8C-CA23-4F1B-A4AC-62B425060241}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
 		{318DFE8C-CA23-4F1B-A4AC-62B425060241}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
-		{318DFE8C-CA23-4F1B-A4AC-62B425060241}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{318DFE8C-CA23-4F1B-A4AC-62B425060241}.Debug|x64.ActiveCfg = Debug|x64
+		{318DFE8C-CA23-4F1B-A4AC-62B425060241}.Debug|x64.Build.0 = Debug|x64
 		{318DFE8C-CA23-4F1B-A4AC-62B425060241}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{318DFE8C-CA23-4F1B-A4AC-62B425060241}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -55,4 +95,20 @@
 		{318DFE8C-CA23-4F1B-A4AC-62B425060241}.Release|x64.Build.0 = Release|x64
 		{318DFE8C-CA23-4F1B-A4AC-62B425060241}.Release|x86.ActiveCfg = Release|Any CPU
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|x64.ActiveCfg = Debug|x64
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|x64.Build.0 = Debug|x64
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|x86.ActiveCfg = Debug|x86
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|x86.Build.0 = Debug|x86
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|Any CPU.Build.0 = Release|Any CPU
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|Mixed Platforms.Build.0 = Release|x86
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|x64.ActiveCfg = Release|x64
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|x64.Build.0 = Release|x64
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|x86.ActiveCfg = Release|x86
+		{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
