Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj	(revision 10681)
@@ -93,6 +93,62 @@
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
-      <HintPath>..\..\bin\ALGLIB-3.7.0.dll</HintPath>
+    <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">
+      <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.Encodings.SymbolicExpressionTreeEncoding-3.4">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.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.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>
@@ -120,4 +176,7 @@
     <Compile Include="ModelCreators\NormalDistributedThresholdsModelCreator.cs" />
     <Compile Include="MultiObjective\SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer.cs" />
+    <Compile Include="Sliding Window\GenerationalClassificationSlidingWindowAnalyzer.cs" />
+    <Compile Include="Sliding Window\OffspringSelectionClassificationSlidingWindowAnalyzer.cs" />
+    <Compile Include="Sliding Window\SlidingWindowBestClassificationSolutionsCollection.cs" />
     <Compile Include="SymbolicClassificationPruningAnalyzer.cs" />
     <Compile Include="SymbolicClassificationSolutionImpactValuesCalculator.cs" />
@@ -177,76 +236,7 @@
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
-      <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
-      <Name>HeuristicLab.Analysis-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
-      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
-      <Name>HeuristicLab.Collections-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
-      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
-      <Name>HeuristicLab.Common.Resources-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
-      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
-      <Name>HeuristicLab.Common-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
-      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
-      <Name>HeuristicLab.Core-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
-      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
-      <Name>HeuristicLab.Data-3.3</Name>
-      <Private>False</Private>
-    </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>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
-      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
-      <Name>HeuristicLab.Operators-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
-      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
-      <Name>HeuristicLab.Optimization-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
-      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
-      <Name>HeuristicLab.Parameters-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
-      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
-      <Name>HeuristicLab.Persistence-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
-      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
-      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
-      <Private>False</Private>
-    </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>
-    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
-      <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project>
-      <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
-      <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>
-      <Name>HeuristicLab.Problems.Instances-3.3</Name>
       <Private>False</Private>
     </ProjectReference>
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Sliding Window/GenerationalClassificationSlidingWindowAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Sliding Window/GenerationalClassificationSlidingWindowAnalyzer.cs	(revision 10681)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Sliding Window/GenerationalClassificationSlidingWindowAnalyzer.cs	(revision 10681)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
+  [StorableClass]
+  [Item("Generational Classification Sliding Window Analyzer", "")]
+  public class GenerationalClassificationSlidingWindowAnalyzer : GenerationalSlidingWindowAnalyzer {
+    private const string ModelCreatorParameterName = "ModelCreator";
+    #region parameter properties
+    public ILookupParameter<ISymbolicClassificationModelCreator> ModelCreatorParameter {
+      get { return (ILookupParameter<ISymbolicClassificationModelCreator>)Parameters[ModelCreatorParameterName]; }
+    }
+    #endregion
+    #region properties
+    private ISymbolicClassificationModelCreator ModelCreator {
+      get { return ModelCreatorParameter.ActualValue; }
+      set { ModelCreatorParameter.ActualValue = value; }
+    }
+    #endregion
+    [StorableConstructor]
+    protected GenerationalClassificationSlidingWindowAnalyzer(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() { }
+    protected GenerationalClassificationSlidingWindowAnalyzer(GenerationalClassificationSlidingWindowAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GenerationalClassificationSlidingWindowAnalyzer(this, cloner);
+    }
+    public GenerationalClassificationSlidingWindowAnalyzer() {
+      Parameters.Add(new LookupParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName));
+    }
+    public override IOperation Apply() {
+      if (!ResultCollection.ContainsKey("Best Solutions")) {
+        ResultCollection.Add(new Result("Best Solutions", new SlidingWindowBestClassificationSolutionsCollection()));
+      }
+      var bestSolutions = (SlidingWindowBestClassificationSolutionsCollection)ResultCollection["Best Solutions"].Value;
+      bestSolutions.ModelCreator = ModelCreator;
+      return base.Apply();
+    }
+  }
+}
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Sliding Window/OffspringSelectionClassificationSlidingWindowAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Sliding Window/OffspringSelectionClassificationSlidingWindowAnalyzer.cs	(revision 10681)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Sliding Window/OffspringSelectionClassificationSlidingWindowAnalyzer.cs	(revision 10681)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
+  [StorableClass]
+  [Item("Offspring Selection Classification Sliding Window Analyzer", "")]
+  public class OffspringSelectionClassificationSlidingWindowAnalyzer : OffspringSelectionSlidingWindowAnalyzer {
+    private const string ModelCreatorParameterName = "ModelCreator";
+    #region parameter properties
+    public ILookupParameter<ISymbolicClassificationModelCreator> ModelCreatorParameter {
+      get { return (ILookupParameter<ISymbolicClassificationModelCreator>)Parameters[ModelCreatorParameterName]; }
+    }
+    #endregion
+    #region properties
+    private ISymbolicClassificationModelCreator ModelCreator {
+      get { return ModelCreatorParameter.ActualValue; }
+      set { ModelCreatorParameter.ActualValue = value; }
+    }
+    #endregion
+    [StorableConstructor]
+    protected OffspringSelectionClassificationSlidingWindowAnalyzer(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() { }
+    protected OffspringSelectionClassificationSlidingWindowAnalyzer(OffspringSelectionClassificationSlidingWindowAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new OffspringSelectionClassificationSlidingWindowAnalyzer(this, cloner);
+    }
+    public OffspringSelectionClassificationSlidingWindowAnalyzer() {
+      Parameters.Add(new LookupParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName));
+    }
+    public override IOperation Apply() {
+      if (!ResultCollection.ContainsKey("Best Solutions")) {
+        ResultCollection.Add(new Result("Best Solutions", new SlidingWindowBestClassificationSolutionsCollection()));
+      }
+      var bestSolutions = (SlidingWindowBestClassificationSolutionsCollection)ResultCollection["Best Solutions"].Value;
+      bestSolutions.ModelCreator = ModelCreator;
+      return base.Apply();
+    }
+  }
+}
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Sliding Window/SlidingWindowBestClassificationSolutionsCollection.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Sliding Window/SlidingWindowBestClassificationSolutionsCollection.cs	(revision 10681)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Sliding Window/SlidingWindowBestClassificationSolutionsCollection.cs	(revision 10681)
@@ -0,0 +1,57 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
+  [StorableClass]
+  [Item("Sliding Window Best Classification Solutions Collection", "A collection of best sliding window solutions for symbolic classification.")]
+  public class SlidingWindowBestClassificationSolutionsCollection : SlidingWindowBestSolutionsCollection {
+    public new IClassificationProblemData ProblemData {
+      get { return (IClassificationProblemData)base.ProblemData; }
+      set { base.ProblemData = value; }
+    }
+    public ISymbolicClassificationModelCreator ModelCreator { get; set; }
+    [StorableConstructor]
+    protected SlidingWindowBestClassificationSolutionsCollection(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() { }
+    public SlidingWindowBestClassificationSolutionsCollection(SlidingWindowBestClassificationSolutionsCollection original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SlidingWindowBestClassificationSolutionsCollection(this, cloner);
+    }
+    public SlidingWindowBestClassificationSolutionsCollection() { }
+    public override ISymbolicDataAnalysisModel CreateModel(ISymbolicExpressionTree tree, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter,
+      double lowerEstimationLimit = double.MinValue, double upperEstimationLimit = double.MaxValue) {
+      var model = ModelCreator.CreateSymbolicClassificationModel(tree, interpreter, lowerEstimationLimit, upperEstimationLimit);
+      model.RecalculateModelParameters(ProblemData, ProblemData.TrainingIndices);
+      return model;
+    }
+    public override ISymbolicDataAnalysisSolution CreateSolution(ISymbolicDataAnalysisModel model, IDataAnalysisProblemData problemData) {
+      return new SymbolicClassificationSolution((ISymbolicClassificationModel)model, (IClassificationProblemData)problemData);
+    }
+  }
+}
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationPruningOperator.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationPruningOperator.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationPruningOperator.cs	(revision 10681)
@@ -28,5 +28,6 @@
     #endregion
 
-    protected SymbolicClassificationPruningOperator(SymbolicClassificationPruningOperator original, Cloner cloner)
+    protected SymbolicClassificationPruningOperator(SymbolicClassificationPruningOperator 
+      original, Cloner cloner)
       : base(original, cloner) {
     }
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj	(revision 10681)
@@ -93,11 +93,67 @@
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+    <Reference Include="ALGLIB-3.7.0">
+      <HintPath>..\..\..\..\trunk\sources\bin\ALGLIB-3.7.0.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="AutoDiff-1.0">
+      <HintPath>..\..\..\..\trunk\sources\bin\AutoDiff-1.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>..\..\bin\ALGLIB-3.7.0.dll</HintPath>
-      <Private>False</Private>
-    </Reference>
-    <Reference Include="AutoDiff-1.0, Version=1.0.0.14388, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
-      <HintPath>..\..\bin\AutoDiff-1.0.dll</HintPath>
+      <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.Encodings.SymbolicExpressionTreeEncoding-3.4">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.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.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>
@@ -122,4 +178,7 @@
     <Compile Include="SingleObjective\Evaluators\SymbolicRegressionMeanRelativeErrorEvaluator.cs" />
     <Compile Include="SingleObjective\SymbolicRegressionSolutionsAnalyzer.cs" />
+    <Compile Include="SlidingWindow\GenerationalRegressionSlidingWindowAnalyzer.cs" />
+    <Compile Include="SlidingWindow\OffspringSelectionRegressionSlidingWindowAnalyzer.cs" />
+    <Compile Include="SlidingWindow\SlidingWindowBestRegressionSolutionsCollection.cs" />
     <Compile Include="SymbolicRegressionPruningAnalyzer.cs" />
     <Compile Include="SingleObjective\Evaluators\SymbolicRegressionLogResidualEvaluator.cs" />
@@ -173,72 +232,7 @@
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
-      <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
-      <Name>HeuristicLab.Analysis-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
-      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
-      <Name>HeuristicLab.Collections-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
-      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
-      <Name>HeuristicLab.Common-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
-      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
-      <Name>HeuristicLab.Core-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
-      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
-      <Name>HeuristicLab.Data-3.3</Name>
-      <Private>False</Private>
-    </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>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
-      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
-      <Name>HeuristicLab.Operators-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
-      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
-      <Name>HeuristicLab.Optimization-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
-      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
-      <Name>HeuristicLab.Parameters-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
-      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
-      <Name>HeuristicLab.Persistence-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
-      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
-      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
-      <Private>False</Private>
-    </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>
-    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
-      <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project>
-      <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
-      <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>
-      <Name>HeuristicLab.Problems.Instances-3.3</Name>
       <Private>False</Private>
     </ProjectReference>
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SlidingWindow/GenerationalRegressionSlidingWindowAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SlidingWindow/GenerationalRegressionSlidingWindowAnalyzer.cs	(revision 10681)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SlidingWindow/GenerationalRegressionSlidingWindowAnalyzer.cs	(revision 10681)
@@ -0,0 +1,49 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
+  [StorableClass]
+  [Item("Generational Regression Sliding Window Analyzer", "")]
+  public class GenerationalRegressionSlidingWindowAnalyzer : GenerationalSlidingWindowAnalyzer {
+    [StorableConstructor]
+    protected GenerationalRegressionSlidingWindowAnalyzer(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() { }
+    protected GenerationalRegressionSlidingWindowAnalyzer(GenerationalRegressionSlidingWindowAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GenerationalRegressionSlidingWindowAnalyzer(this, cloner);
+    }
+    public GenerationalRegressionSlidingWindowAnalyzer() { }
+    public override IOperation Apply() {
+      if (!ResultCollection.ContainsKey("Best Solutions")) {
+        ResultCollection.Add(new Result("Best Solutions", new SlidingWindowBestRegressionSolutionsCollection()));
+      }
+      return base.Apply();
+    }
+  }
+}
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SlidingWindow/OffspringSelectionRegressionSlidingWindowAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SlidingWindow/OffspringSelectionRegressionSlidingWindowAnalyzer.cs	(revision 10681)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SlidingWindow/OffspringSelectionRegressionSlidingWindowAnalyzer.cs	(revision 10681)
@@ -0,0 +1,49 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
+  [StorableClass]
+  [Item("OffspringSelectionRegressionSlidingWindowAnalyzer", "")]
+  public class OffspringSelectionRegressionSlidingWindowAnalyzer : OffspringSelectionSlidingWindowAnalyzer {
+    [StorableConstructor]
+    protected OffspringSelectionRegressionSlidingWindowAnalyzer(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() { }
+    protected OffspringSelectionRegressionSlidingWindowAnalyzer(OffspringSelectionRegressionSlidingWindowAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new OffspringSelectionRegressionSlidingWindowAnalyzer(this, cloner);
+    }
+    public OffspringSelectionRegressionSlidingWindowAnalyzer() { }
+    public override IOperation Apply() {
+      if (!ResultCollection.ContainsKey("Best Solutions")) {
+        ResultCollection.Add(new Result("Best Solutions", new SlidingWindowBestRegressionSolutionsCollection()));
+      }
+      return base.Apply();
+    }
+  }
+}
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SlidingWindow/SlidingWindowBestRegressionSolutionsCollection.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SlidingWindow/SlidingWindowBestRegressionSolutionsCollection.cs	(revision 10681)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SlidingWindow/SlidingWindowBestRegressionSolutionsCollection.cs	(revision 10681)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
+  [StorableClass]
+  [Item("SlidingWindowBestRegressionSolutionsCollection", "A collection of best sliding window solutions for symbolic regression.")]
+  public class SlidingWindowBestRegressionSolutionsCollection : SlidingWindowBestSolutionsCollection {
+    public new IRegressionProblemData ProblemData {
+      get { return (IRegressionProblemData)base.ProblemData; }
+      set { base.ProblemData = value; }
+    }
+    [StorableConstructor]
+    protected SlidingWindowBestRegressionSolutionsCollection(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() { }
+    public SlidingWindowBestRegressionSolutionsCollection(SlidingWindowBestRegressionSolutionsCollection original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SlidingWindowBestRegressionSolutionsCollection(this, cloner);
+    }
+    public SlidingWindowBestRegressionSolutionsCollection() { }
+    public override ISymbolicDataAnalysisModel CreateModel(ISymbolicExpressionTree tree, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter,
+      double lowerEstimationLimit = double.MinValue, double upperEstimationLimit = double.MaxValue) {
+      return new SymbolicRegressionModel(tree, interpreter, lowerEstimationLimit, upperEstimationLimit);
+    }
+    public override ISymbolicDataAnalysisSolution CreateSolution(ISymbolicDataAnalysisModel model, IDataAnalysisProblemData problemData) {
+      return new SymbolicRegressionSolution((ISymbolicRegressionModel)model, (IRegressionProblemData)problemData);
+    }
+  }
+}
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj	(revision 10681)
@@ -117,4 +117,9 @@
       <Private>False</Private>
     </Reference>
+    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <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">
       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs	(revision 10681)
@@ -19,4 +19,5 @@
  */
 #endregion
+
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
@@ -137,12 +138,16 @@
       // 
       // btnOptimizeConstants
-      // 
-      this.btnOptimizeConstants.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      //       
+      this.btnOptimizeConstants.AutoSize = true;
       this.btnOptimizeConstants.Enabled = false;
-      this.btnOptimizeConstants.Location = new System.Drawing.Point(104, 3);
+      this.btnOptimizeConstants.Image = HeuristicLab.Common.Resources.VSImageLibrary.Performance;
+      this.btnOptimizeConstants.ImageAlign = System.Drawing.ContentAlignment.MiddleCenter;
+      this.btnOptimizeConstants.Location = new System.Drawing.Point(105, 3);
       this.btnOptimizeConstants.Name = "btnOptimizeConstants";
-      this.btnOptimizeConstants.Size = new System.Drawing.Size(97, 23);
+      this.btnOptimizeConstants.Size = new System.Drawing.Size(80, 24);
       this.btnOptimizeConstants.TabIndex = 2;
       this.btnOptimizeConstants.Text = "Optimize";
+      this.btnOptimizeConstants.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+      this.btnOptimizeConstants.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
       this.btnOptimizeConstants.UseVisualStyleBackColor = true;
       this.btnOptimizeConstants.Click += new System.EventHandler(this.btnOptimizeConstants_Click);
@@ -150,9 +155,15 @@
       // btnSimplify
       // 
+      this.btnSimplify.AutoSize = true;
+      this.btnSimplify.Enabled = true;
+      this.btnSimplify.Image = HeuristicLab.Common.Resources.VSImageLibrary.FormulaEvaluator;
+      this.btnSimplify.ImageAlign = System.Drawing.ContentAlignment.MiddleCenter;
       this.btnSimplify.Location = new System.Drawing.Point(3, 3);
       this.btnSimplify.Name = "btnSimplify";
-      this.btnSimplify.Size = new System.Drawing.Size(95, 23);
+      this.btnSimplify.Size = new System.Drawing.Size(80, 24);
       this.btnSimplify.TabIndex = 1;
       this.btnSimplify.Text = "Simplify";
+      this.btnSimplify.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+      this.btnSimplify.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
       this.btnSimplify.UseVisualStyleBackColor = true;
       this.btnSimplify.Click += new System.EventHandler(this.btnSimplify_Click);
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs	(revision 10681)
@@ -52,4 +52,5 @@
       Content.ModelChanged += Content_Changed;
       Content.ProblemDataChanged += Content_Changed;
+      treeChart.Repainted += treeChart_Repainted;
     }
     protected override void DeregisterContentEvents() {
@@ -57,4 +58,5 @@
       Content.ModelChanged -= Content_Changed;
       Content.ProblemDataChanged -= Content_Changed;
+      treeChart.Repainted -= treeChart_Repainted;
     }
 
@@ -70,4 +72,9 @@
     }
 
+    private void treeChart_Repainted(object sender, EventArgs e) {
+      if (nodeImpacts != null && nodeImpacts.Count > 0)
+        PaintNodeImpacts();
+    }
+
     private void UpdateView() {
       if (Content == null || Content.Model == null || Content.ProblemData == null) return;
@@ -75,10 +82,10 @@
       treeChart.Tree = tree.Root.SubtreeCount > 1 ? new SymbolicExpressionTree(tree.Root) : new SymbolicExpressionTree(tree.Root.GetSubtree(0).GetSubtree(0));
 
-      var replacementValues = CalculateReplacementValues(tree);
+      var impactAndReplacementValues = CalculateImpactAndReplacementValues(tree);
+      nodeImpacts = impactAndReplacementValues.ToDictionary(x => x.Key, x => x.Value.Item1);
+      var replacementValues = impactAndReplacementValues.ToDictionary(x => x.Key, x => x.Value.Item2);
       foreach (var pair in replacementValues.Where(pair => !(pair.Key is ConstantTreeNode))) {
         foldedNodes[pair.Key] = MakeConstantTreeNode(pair.Value);
       }
-
-      nodeImpacts = CalculateImpactValues(tree);
       PaintNodeImpacts();
     }
@@ -86,4 +93,5 @@
     protected abstract Dictionary<ISymbolicExpressionTreeNode, double> CalculateReplacementValues(ISymbolicExpressionTree tree);
     protected abstract Dictionary<ISymbolicExpressionTreeNode, double> CalculateImpactValues(ISymbolicExpressionTree tree);
+    protected abstract Dictionary<ISymbolicExpressionTreeNode, Tuple<double, double>> CalculateImpactAndReplacementValues(ISymbolicExpressionTree tree);
     protected abstract void UpdateModel(ISymbolicExpressionTree tree);
 
@@ -96,6 +104,6 @@
 
     private void treeChart_SymbolicExpressionTreeNodeDoubleClicked(object sender, MouseEventArgs e) {
-      var visualNode = (VisualSymbolicExpressionTreeNode)sender;
-      var symbExprTreeNode = (SymbolicExpressionTreeNode)visualNode.SymbolicExpressionTreeNode;
+      var visualNode = (VisualTreeNode<ISymbolicExpressionTreeNode>)sender;
+      var symbExprTreeNode = (SymbolicExpressionTreeNode)visualNode.Content;
       if (symbExprTreeNode == null) return;
       var tree = Content.Model.SymbolicExpressionTree;
@@ -125,6 +133,6 @@
       double max = impacts.Max();
       double min = impacts.Min();
-      foreach (ISymbolicExpressionTreeNode treeNode in Content.Model.SymbolicExpressionTree.IterateNodesPostfix()) {
-        VisualSymbolicExpressionTreeNode visualTree = treeChart.GetVisualSymbolicExpressionTreeNode(treeNode);
+      foreach (var treeNode in Content.Model.SymbolicExpressionTree.IterateNodesPostfix()) {
+        VisualTreeNode<ISymbolicExpressionTreeNode> visualTree = treeChart.GetVisualSymbolicExpressionTreeNode(treeNode);
 
         if (!(treeNode is ConstantTreeNode) && nodeImpacts.ContainsKey(treeNode)) {
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs	(revision 10681)
@@ -33,5 +33,5 @@
   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 VisualTreeNode<ISymbolicExpressionTreeNode> currSelected; // currently selected node
     private enum EditOp { NoOp, CopySubtree, CutSubtree }
     private EditOp lastOp = EditOp.NoOp;
@@ -65,5 +65,5 @@
         pasteToolStripMenuItem.Visible = false;
       } else {
-        var node = currSelected.SymbolicExpressionTreeNode;
+        var node = currSelected.Content;
         insertNodeToolStripMenuItem.Visible = true;
         changeNodeToolStripMenuItem.Visible = true;
@@ -77,10 +77,10 @@
         pasteToolStripMenuItem.Enabled = tempNode != null && insertNodeToolStripMenuItem.Enabled
                                                           && !(lastOp == EditOp.CutSubtree
-                                                               && tempNode.IterateNodesBreadth().Contains(currSelected.SymbolicExpressionTreeNode));
+                                                               && tempNode.IterateNodesBreadth().Contains(currSelected.Content));
       }
     }
 
     protected override void OnSymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) {
-      currSelected = (VisualSymbolicExpressionTreeNode)sender; ;
+      currSelected = (VisualTreeNode<ISymbolicExpressionTreeNode>)sender; ;
       if (currSelected != null) {
         currSelected.LineColor = Color.FromArgb(130, currSelected.LineColor);
@@ -104,6 +104,6 @@
 
     private void insertNodeToolStripMenuItem_Click(object sender, EventArgs e) {
-      if (currSelected == null || currSelected.SymbolicExpressionTreeNode is SymbolicExpressionTreeTerminalNode) return;
-      var parent = currSelected.SymbolicExpressionTreeNode;
+      if (currSelected == null || currSelected.Content is SymbolicExpressionTreeTerminalNode) return;
+      var parent = currSelected.Content;
 
       using (var dialog = new InsertNodeDialog()) {
@@ -138,6 +138,6 @@
       if (currSelected == null) return;
 
-      var node = (ISymbolicExpressionTreeNode)currSelected.SymbolicExpressionTreeNode.Clone();
-      var originalNode = currSelected.SymbolicExpressionTreeNode;
+      var node = (ISymbolicExpressionTreeNode)currSelected.Content.Clone();
+      var originalNode = currSelected.Content;
 
       ISymbolicExpressionTreeNode newNode = null;
@@ -180,5 +180,5 @@
         }
       }
-      tempNode = currSelected.SymbolicExpressionTreeNode;
+      tempNode = currSelected.Content;
       foreach (var node in tempNode.IterateNodesPostfix()) {
         var visualNode = GetVisualSymbolicExpressionTreeNode(node);
@@ -194,5 +194,5 @@
     }
     private void removeNodeToolStripMenuItem_Click(object sender, EventArgs e) {
-      var node = currSelected.SymbolicExpressionTreeNode;
+      var node = currSelected.Content;
       if (node == tempNode) tempNode = null;
       ModifyTree(Tree, node.Parent, node, null, removeSubtree: false);
@@ -200,5 +200,5 @@
     }
     private void removeSubtreeToolStripMenuItem_Click(object sender, EventArgs e) {
-      var node = currSelected.SymbolicExpressionTreeNode;
+      var node = currSelected.Content;
       if (node.IterateNodesPostfix().Contains(tempNode)) tempNode = null;
       ModifyTree(Tree, node.Parent, node, null, removeSubtree: true);
@@ -209,5 +209,5 @@
       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;
+      var node = currSelected.Content;
       if (node is ConstantTreeNode || node is VariableTreeNode) return;
       // check if the currently selected node can accept the copied node as a child 
@@ -218,5 +218,5 @@
             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, 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;
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs.frame
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs.frame	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs.frame	(revision 10681)
@@ -32,4 +32,5 @@
   [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")]
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TextualSymbolicDataAnalysisModelView.designer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TextualSymbolicDataAnalysisModelView.designer.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TextualSymbolicDataAnalysisModelView.designer.cs	(revision 10681)
@@ -48,5 +48,5 @@
       this.SuspendLayout();
       // 
-      // expressionTreeView
+      // symbolicExpressionTreeView
       // 
       this.symbolicExpressionTreeView.AllowDrop = true;
@@ -54,17 +54,17 @@
       this.symbolicExpressionTreeView.Content = null;
       this.symbolicExpressionTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.symbolicExpressionTreeView.Font = new System.Drawing.Font("Consolas", 8.25F);
       this.symbolicExpressionTreeView.Location = new System.Drawing.Point(0, 0);
-      this.symbolicExpressionTreeView.Name = "expressionTreeView";
+      this.symbolicExpressionTreeView.Name = "symbolicExpressionTreeView";
       this.symbolicExpressionTreeView.ReadOnly = false;
       this.symbolicExpressionTreeView.Size = new System.Drawing.Size(352, 413);
       this.symbolicExpressionTreeView.TabIndex = 0;
       // 
-      // SymbolicExpressionModelView
+      // TextualSymbolicDataAnalysisModelView
       // 
       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.Name = "TextualSymbolicDataAnalysisModelView";
       this.Size = new System.Drawing.Size(352, 413);
       this.ResumeLayout(false);
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs	(revision 10681)
@@ -75,5 +75,4 @@
     public static Allele[] CalculateAlleles(ISymbolicExpressionTree solution, int alleleTreedepth) {
       return GetAllSubtreesOfDepth(solution, alleleTreedepth)
-        .AsParallel()
         .Select(t => GetAlleleFromSubtreeOfDepth(t, alleleTreedepth))
         .ToArray();
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs	(revision 10681)
@@ -121,5 +121,4 @@
 
       var qualities = tree
-        .AsParallel()
         .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
         .ToArray();
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectivePruningAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectivePruningAnalyzer.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectivePruningAnalyzer.cs	(revision 10681)
@@ -5,6 +5,6 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Optimization;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -14,29 +14,29 @@
   [Item("SymbolicDataAnalysisSingleObjectivePruningAnalyzer", "An analyzer that prunes introns from trees in single objective symbolic data analysis problems.")]
   public abstract class SymbolicDataAnalysisSingleObjectivePruningAnalyzer : SymbolicDataAnalysisSingleObjectiveAnalyzer {
+    #region parameter names
     private const string ProblemDataParameterName = "ProblemData";
-    private const string InterpreterParameterName = "SymbolicExpressionTreeInterpreter";
-
     private const string UpdateIntervalParameterName = "UpdateInverval";
     private const string UpdateCounterParameterName = "UpdateCounter";
-
     private const string PopulationSliceParameterName = "PopulationSlice";
     private const string PruningProbabilityParameterName = "PruningProbability";
-
-    private const string NumberOfPrunedSubtreesParameterName = "PrunedSubtrees";
-    private const string NumberOfPrunedTreesParameterName = "PrunedTrees";
-
+    private const string TotalNumberOfPrunedSubtreesParameterName = "Number of pruned subtrees";
+    private const string TotalNumberOfPrunedTreesParameterName = "Number of pruned trees";
     private const string RandomParameterName = "Random";
-    private const string EstimationLimitsParameterName = "EstimationLimits";
-
     private const string PruneOnlyZeroImpactNodesParameterName = "PruneOnlyZeroImpactNodes";
     private const string NodeImpactThresholdParameterName = "ImpactThreshold";
-
-    private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition";
-
-    private bool reentry;
-    [Storable]
-    protected ISymbolicDataAnalysisSolutionImpactValuesCalculator impactValuesCalculator;
-
+    private const string PruningOperatorParameterName = "PruningOperator";
+    private const string ResultsParameterName = "Results";
+    #endregion
+    #region private members
+    private DataReducer prunedSubtreesReducer;
+    private DataReducer prunedTreesReducer;
+    private DataTableValuesCollector valuesCollector;
+    private ResultsCollector resultsCollector;
+    private EmptyOperator emptyOp;
+    #endregion
     #region parameter properties
+    public IValueParameter<SymbolicDataAnalysisExpressionPruningOperator> PruningOperatorParameter {
+      get { return (IValueParameter<SymbolicDataAnalysisExpressionPruningOperator>)Parameters[PruningOperatorParameterName]; }
+    }
     public IFixedValueParameter<BoolValue> PruneOnlyZeroImpactNodesParameter {
       get { return (IFixedValueParameter<BoolValue>)Parameters[PruneOnlyZeroImpactNodesParameterName]; }
@@ -45,7 +45,4 @@
       get { return (IFixedValueParameter<DoubleValue>)Parameters[NodeImpactThresholdParameterName]; }
     }
-    public ILookupParameter<DoubleLimit> EstimationLimitsParameter {
-      get { return (ILookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
-    }
     public ILookupParameter<IRandom> RandomParameter {
       get { return (ILookupParameter<IRandom>)Parameters[RandomParameterName]; }
@@ -53,10 +50,4 @@
     private ILookupParameter<IDataAnalysisProblemData> ProblemDataParameter {
       get { return (ILookupParameter<IDataAnalysisProblemData>)Parameters[ProblemDataParameterName]; }
-    }
-    public ILookupParameter<IntRange> FitnessCalculationPartitionParameter {
-      get { return (ILookupParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; }
-    }
-    private ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> InterpreterParameter {
-      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[InterpreterParameterName]; }
     }
     public IValueParameter<IntValue> UpdateIntervalParameter {
@@ -72,39 +63,24 @@
       get { return (IValueParameter<DoubleValue>)Parameters[PruningProbabilityParameterName]; }
     }
-    public IFixedValueParameter<DoubleValue> NumberOfPrunedSubtreesParameter {
-      get { return (IFixedValueParameter<DoubleValue>)Parameters[NumberOfPrunedSubtreesParameterName]; }
-    }
-    public IFixedValueParameter<DoubleValue> NumberOfPrunedTreesParameter {
-      get { return (IFixedValueParameter<DoubleValue>)Parameters[NumberOfPrunedTreesParameterName]; }
-    }
     #endregion
     #region properties
+    protected SymbolicDataAnalysisExpressionPruningOperator PruningOperator { get { return PruningOperatorParameter.Value; } }
     protected IDataAnalysisProblemData ProblemData { get { return ProblemDataParameter.ActualValue; } }
-    protected IntRange FitnessCalculationPartition { get { return FitnessCalculationPartitionParameter.ActualValue; } }
-    protected ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter { get { return InterpreterParameter.ActualValue; } }
     protected IntValue UpdateInterval { get { return UpdateIntervalParameter.Value; } }
     protected IntValue UpdateCounter { get { return UpdateCounterParameter.Value; } }
     protected DoubleRange PopulationSlice { get { return PopulationSliceParameter.Value; } }
     protected DoubleValue PruningProbability { get { return PruningProbabilityParameter.Value; } }
-    protected DoubleValue PrunedSubtrees { get { return NumberOfPrunedSubtreesParameter.Value; } }
-    protected DoubleValue PrunedTrees { get { return NumberOfPrunedTreesParameter.Value; } }
-    protected DoubleLimit EstimationLimits { get { return EstimationLimitsParameter.ActualValue; } }
     protected IRandom Random { get { return RandomParameter.ActualValue; } }
     protected DoubleValue NodeImpactThreshold { get { return NodeImpactThresholdParameter.Value; } }
     protected BoolValue PruneOnlyZeroImpactNodes { get { return PruneOnlyZeroImpactNodesParameter.Value; } }
     #endregion
-
     #region IStatefulItem members
     public override void InitializeState() {
       base.InitializeState();
       UpdateCounter.Value = 0;
-      PrunedSubtrees.Value = 0;
-      PrunedTrees.Value = 0;
     }
     public override void ClearState() {
       base.ClearState();
       UpdateCounter.Value = 0;
-      PrunedSubtrees.Value = 0;
-      PrunedTrees.Value = 0;
     }
     #endregion
@@ -112,95 +88,105 @@
     [StorableConstructor]
     protected SymbolicDataAnalysisSingleObjectivePruningAnalyzer(bool deserializing) : base(deserializing) { }
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      if (!Parameters.ContainsKey(FitnessCalculationPartitionParameterName))
-        Parameters.Add(new LookupParameter<IntRange>(FitnessCalculationPartitionParameterName, ""));
-    }
     protected SymbolicDataAnalysisSingleObjectivePruningAnalyzer(SymbolicDataAnalysisSingleObjectivePruningAnalyzer original, Cloner cloner)
       : base(original, cloner) {
-      impactValuesCalculator = original.impactValuesCalculator;
+      if (original.prunedSubtreesReducer != null)
+        this.prunedSubtreesReducer = (DataReducer)original.prunedSubtreesReducer.Clone();
+      if (original.prunedTreesReducer != null)
+        this.prunedTreesReducer = (DataReducer)original.prunedTreesReducer.Clone();
+      if (original.valuesCollector != null)
+        this.valuesCollector = (DataTableValuesCollector)original.valuesCollector.Clone();
+      if (original.resultsCollector != null)
+        this.resultsCollector = (ResultsCollector)original.resultsCollector.Clone();
     }
     protected SymbolicDataAnalysisSingleObjectivePruningAnalyzer() {
+      #region add parameters
       Parameters.Add(new ValueParameter<DoubleRange>(PopulationSliceParameterName, new DoubleRange(0.75, 1)));
       Parameters.Add(new ValueParameter<DoubleValue>(PruningProbabilityParameterName, new DoubleValue(0.5)));
-      // analyzer parameters
       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", new IntValue(0)));
       Parameters.Add(new LookupParameter<IRandom>(RandomParameterName));
       Parameters.Add(new LookupParameter<IDataAnalysisProblemData>(ProblemDataParameterName));
-      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(InterpreterParameterName));
-
-      Parameters.Add(new FixedValueParameter<DoubleValue>(NumberOfPrunedSubtreesParameterName, new DoubleValue(0)));
-      Parameters.Add(new FixedValueParameter<DoubleValue>(NumberOfPrunedTreesParameterName, new DoubleValue(0)));
-      Parameters.Add(new LookupParameter<DoubleLimit>(EstimationLimitsParameterName));
       Parameters.Add(new FixedValueParameter<DoubleValue>(NodeImpactThresholdParameterName, new DoubleValue(0.0)));
       Parameters.Add(new FixedValueParameter<BoolValue>(PruneOnlyZeroImpactNodesParameterName, new BoolValue(false)));
-      Parameters.Add(new LookupParameter<IntRange>(FitnessCalculationPartitionParameterName, ""));
+      #endregion
+    }
+
+    private void InitializeOperators() {
+      prunedSubtreesReducer = new DataReducer();
+      prunedSubtreesReducer.ParameterToReduce.ActualName = PruningOperator.PrunedSubtreesParameter.ActualName;
+      prunedSubtreesReducer.ReductionOperation.Value = new ReductionOperation(ReductionOperations.Sum); // sum all the pruned subtrees parameter values
+      prunedSubtreesReducer.TargetOperation.Value = new ReductionOperation(ReductionOperations.Assign); // asign the sum to the target parameter
+      prunedSubtreesReducer.TargetParameter.ActualName = TotalNumberOfPrunedSubtreesParameterName;
+
+      prunedTreesReducer = new DataReducer();
+      prunedTreesReducer.ParameterToReduce.ActualName = PruningOperator.PrunedTreesParameter.ActualName;
+      prunedTreesReducer.ReductionOperation.Value = new ReductionOperation(ReductionOperations.Sum);
+      prunedTreesReducer.TargetOperation.Value = new ReductionOperation(ReductionOperations.Assign);
+      prunedTreesReducer.TargetParameter.ActualName = TotalNumberOfPrunedTreesParameterName;
+
+      valuesCollector = new DataTableValuesCollector();
+      valuesCollector.CollectedValues.Add(new LookupParameter<IntValue>(TotalNumberOfPrunedSubtreesParameterName));
+      valuesCollector.CollectedValues.Add(new LookupParameter<IntValue>(TotalNumberOfPrunedTreesParameterName));
+      valuesCollector.DataTableParameter.ActualName = "Population pruning";
+
+      resultsCollector = new ResultsCollector();
+      resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>("Population pruning"));
+      resultsCollector.ResultsParameter.ActualName = ResultsParameterName;
+
+      emptyOp = new EmptyOperator();
+    }
+
+    // 
+    /// <summary>
+    /// Computes the closed interval bounding the portion of the population that is to be pruned. 
+    /// </summary>
+    /// <returns>Returns an int range [start, end]</returns>
+    private IntRange GetSliceBounds() {
+      var count = ExecutionContext.Scope.SubScopes.Count;
+      var start = (int)Math.Round(PopulationSlice.Start * count);
+      var end = (int)Math.Round(PopulationSlice.End * count);
+      if (end > count) end = count;
+
+      if (start >= end) throw new ArgumentOutOfRangeException("Invalid PopulationSlice bounds.");
+      return new IntRange(start, end);
+    }
+
+    private IOperation CreatePruningOperation() {
+      var oc = new OperationCollection { Parallel = true };
+      var range = GetSliceBounds();
+      var qualities = Quality.Select(x => x.Value).ToArray();
+      var indices = Enumerable.Range(0, qualities.Length).ToArray();
+      Array.Sort(qualities, indices);
+      if (!Maximization.Value) Array.Reverse(indices);
+
+      var subscopes = ExecutionContext.Scope.SubScopes;
+
+      for (int i = 0; i < subscopes.Count; ++i) {
+        IOperator op;
+        if (range.Start <= i && i < range.End && Random.NextDouble() <= PruningProbability.Value)
+          op = PruningOperator;
+        else op = emptyOp;
+        var index = indices[i];
+        var subscope = subscopes[index];
+        oc.Add(ExecutionContext.CreateChildOperation(op, subscope));
+      }
+      return oc;
     }
 
     public override IOperation Apply() {
-      if (reentry) {
-        UpdateCounter.Value++;
+      UpdateCounter.Value++;
+      if (UpdateCounter.Value != UpdateInterval.Value) return base.Apply();
+      UpdateCounter.Value = 0;
 
-        if (UpdateCounter.Value != UpdateInterval.Value) return base.Apply();
-        UpdateCounter.Value = 0;
+      if (prunedSubtreesReducer == null || prunedTreesReducer == null || valuesCollector == null || resultsCollector == null) { InitializeOperators(); }
 
-        var trees = SymbolicExpressionTreeParameter.ActualValue.ToList();
-        var qualities = QualityParameter.ActualValue.ToList();
+      var prune = CreatePruningOperation();
+      var reducePrunedSubtrees = ExecutionContext.CreateChildOperation(prunedSubtreesReducer);
+      var reducePrunedTrees = ExecutionContext.CreateChildOperation(prunedTreesReducer);
+      var collectValues = ExecutionContext.CreateChildOperation(valuesCollector);
+      var collectResults = ExecutionContext.CreateChildOperation(resultsCollector);
 
-        var population = trees.Zip(qualities, (tree, quality) => new { Tree = tree, Quality = quality }).ToList();
-        Func<double, double, int> compare = (a, b) => Maximization.Value ? a.CompareTo(b) : b.CompareTo(a);
-        population.Sort((a, b) => compare(a.Quality.Value, b.Quality.Value));
-
-        var start = (int)Math.Round(PopulationSlice.Start * trees.Count);
-        var end = (int)Math.Round(PopulationSlice.End * trees.Count);
-
-        if (end == population.Count) end--;
-
-        if (start >= end || end >= population.Count) throw new Exception("Invalid PopulationSlice bounds.");
-
-        PrunedSubtrees.Value = 0;
-        PrunedTrees.Value = 0;
-
-        reentry = false;
-
-        var operations = new OperationCollection { Parallel = true };
-        foreach (var p in population.Skip(start).Take(end)) {
-          if (Random.NextDouble() > PruningProbability.Value) continue;
-          var op = new SymbolicDataAnalysisExpressionPruningOperator {
-            Model = CreateModel(p.Tree, Interpreter, EstimationLimits.Lower, EstimationLimits.Upper),
-            ImpactsCalculator = impactValuesCalculator,
-            ProblemData = ProblemData,
-            Random = Random,
-            PruneOnlyZeroImpactNodes = PruneOnlyZeroImpactNodes.Value,
-            NodeImpactThreshold = NodeImpactThreshold.Value,
-            FitnessCalculationPartition = FitnessCalculationPartition
-          };
-          operations.Add(ExecutionContext.CreateChildOperation(op, ExecutionContext.Scope));
-        }
-        return new OperationCollection { operations, ExecutionContext.CreateOperation(this) };
-      }
-
-      DataTable table;
-
-      if (ResultCollection.ContainsKey("Population Pruning")) {
-        table = (DataTable)ResultCollection["Population Pruning"].Value;
-      } else {
-        table = new DataTable("Population Pruning");
-        table.Rows.Add(new DataRow("Pruned Trees") { VisualProperties = { StartIndexZero = true } });
-        table.Rows.Add(new DataRow("Pruned Subtrees") { VisualProperties = { StartIndexZero = true } });
-        ResultCollection.Add(new Result("Population Pruning", table));
-      }
-
-      table.Rows["Pruned Trees"].Values.Add(PrunedTrees.Value);
-      table.Rows["Pruned Subtrees"].Values.Add(PrunedSubtrees.Value);
-
-      reentry = true;
-
-      return base.Apply();
+      return new OperationCollection { prune, reducePrunedSubtrees, reducePrunedTrees, collectValues, collectResults, base.Apply() };
     }
-
-    protected abstract ISymbolicDataAnalysisModel CreateModel(ISymbolicExpressionTree tree, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter,
-      double lowerEstimationLimit = double.MinValue, double upperEstimationLimit = double.MaxValue);
   }
 }
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer.cs	(revision 10681)
@@ -35,9 +35,13 @@
   [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
+  public abstract class SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer<T> : SymbolicDataAnalysisSingleObjectiveAnalyzer, IIterationBasedOperator
+
     where T : class, ISymbolicDataAnalysisSolution {
     private const string TrainingBestSolutionParameterName = "Best training solution";
     private const string TrainingBestSolutionQualityParameterName = "Best training solution quality";
+    private const string TrainingBestSolutionGenerationParameterName = "Best training solution generation";
     private const string UpdateAlwaysParameterName = "Always update best solution";
+    private const string IterationsParameterName = "Iterations";
+    private const string MaximumIterationsParameterName = "Maximum Iterations";
 
     #region parameter properties
@@ -48,6 +52,15 @@
       get { return (ILookupParameter<DoubleValue>)Parameters[TrainingBestSolutionQualityParameterName]; }
     }
+    public ILookupParameter<IntValue> TrainingBestSolutionGenerationParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[TrainingBestSolutionGenerationParameterName]; }
+    }
     public IFixedValueParameter<BoolValue> UpdateAlwaysParameter {
       get { return (IFixedValueParameter<BoolValue>)Parameters[UpdateAlwaysParameterName]; }
+    }
+    public ILookupParameter<IntValue> IterationsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[IterationsParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumIterationsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumIterationsParameterName]; }
     }
     #endregion
@@ -73,5 +86,8 @@
       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 LookupParameter<IntValue>(TrainingBestSolutionGenerationParameterName, "The generation in which the best training solution was found."));
       Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best training solution should always be updated regardless of its quality.", new BoolValue(false)));
+      Parameters.Add(new LookupParameter<IntValue>(IterationsParameterName, "The number of performed iterations."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumIterationsParameterName, "The maximum number of performed iterations.") { Hidden = true });
       UpdateAlwaysParameter.Hidden = true;
     }
@@ -83,4 +99,10 @@
         UpdateAlwaysParameter.Hidden = true;
       }
+      if (!Parameters.ContainsKey(TrainingBestSolutionGenerationParameterName))
+        Parameters.Add(new LookupParameter<IntValue>(TrainingBestSolutionGenerationParameterName, "The generation in which the best training solution was found."));
+      if (!Parameters.ContainsKey(IterationsParameterName))
+        Parameters.Add(new LookupParameter<IntValue>(IterationsParameterName, "The number of performed iterations."));
+      if (!Parameters.ContainsKey(MaximumIterationsParameterName))
+        Parameters.Add(new ValueLookupParameter<IntValue>(MaximumIterationsParameterName, "The maximum number of performed iterations.") { Hidden = true });
     }
 
@@ -104,11 +126,18 @@
         TrainingBestSolution = CreateSolution(bestTree, bestQuality);
         TrainingBestSolutionQuality = new DoubleValue(bestQuality);
+        if (IterationsParameter.ActualValue != null)
+          TrainingBestSolutionGenerationParameter.ActualValue = new IntValue(IterationsParameter.ActualValue.Value);
 
         if (!results.ContainsKey(TrainingBestSolutionParameter.Name)) {
           results.Add(new Result(TrainingBestSolutionParameter.Name, TrainingBestSolutionParameter.Description, TrainingBestSolution));
           results.Add(new Result(TrainingBestSolutionQualityParameter.Name, TrainingBestSolutionQualityParameter.Description, TrainingBestSolutionQuality));
+          if (TrainingBestSolutionGenerationParameter.ActualValue != null)
+            results.Add(new Result(TrainingBestSolutionGenerationParameter.Name, TrainingBestSolutionGenerationParameter.Description, TrainingBestSolutionGenerationParameter.ActualValue));
         } else {
           results[TrainingBestSolutionParameter.Name].Value = TrainingBestSolution;
           results[TrainingBestSolutionQualityParameter.Name].Value = TrainingBestSolutionQuality;
+          if (TrainingBestSolutionGenerationParameter.ActualValue != null)
+            results[TrainingBestSolutionGenerationParameter.Name].Value = TrainingBestSolutionGenerationParameter.ActualValue;
+
         }
       }
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs	(revision 10681)
@@ -37,5 +37,5 @@
   [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>
+  public abstract class SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer<S, T, U> : SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U>, IIterationBasedOperator
     where S : class, ISymbolicDataAnalysisSolution
     where T : class, ISymbolicDataAnalysisSingleObjectiveEvaluator<U>
@@ -43,5 +43,8 @@
     private const string ValidationBestSolutionParameterName = "Best validation solution";
     private const string ValidationBestSolutionQualityParameterName = "Best validation solution quality";
+    private const string ValidationBestSolutionGenerationParameterName = "Best validation solution generation";
     private const string UpdateAlwaysParameterName = "Always update best solution";
+    private const string IterationsParameterName = "Iterations";
+    private const string MaximumIterationsParameterName = "Maximum Iterations";
 
     #region parameter properties
@@ -52,6 +55,15 @@
       get { return (ILookupParameter<DoubleValue>)Parameters[ValidationBestSolutionQualityParameterName]; }
     }
+    public ILookupParameter<IntValue> ValidationBestSolutionGenerationParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[ValidationBestSolutionGenerationParameterName]; }
+    }
     public IFixedValueParameter<BoolValue> UpdateAlwaysParameter {
       get { return (IFixedValueParameter<BoolValue>)Parameters[UpdateAlwaysParameterName]; }
+    }
+    public ILookupParameter<IntValue> IterationsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[IterationsParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumIterationsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumIterationsParameterName]; }
     }
     #endregion
@@ -77,5 +89,8 @@
       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 LookupParameter<IntValue>(ValidationBestSolutionGenerationParameterName, "The generation in which the best validation solution was found."));
       Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best validation solution should always be updated regardless of its quality.", new BoolValue(false)));
+      Parameters.Add(new LookupParameter<IntValue>(IterationsParameterName, "The number of performed iterations."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumIterationsParameterName, "The maximum number of performed iterations.") { Hidden = true });
       UpdateAlwaysParameter.Hidden = true;
     }
@@ -84,7 +99,13 @@
     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)));
+        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;
       }
+      if (!Parameters.ContainsKey(ValidationBestSolutionGenerationParameterName))
+        Parameters.Add(new LookupParameter<IntValue>(ValidationBestSolutionGenerationParameterName, "The generation in which the best validation solution was found."));
+      if (!Parameters.ContainsKey(IterationsParameterName))
+        Parameters.Add(new LookupParameter<IntValue>(IterationsParameterName, "The number of performed iterations."));
+      if (!Parameters.ContainsKey(MaximumIterationsParameterName))
+        Parameters.Add(new ValueLookupParameter<IntValue>(MaximumIterationsParameterName, "The maximum number of performed iterations.") { Hidden = true });
     }
 
@@ -121,5 +142,4 @@
       var quality = tree
         .Take(topN)
-        .AsParallel()
         .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
         .ToArray();
@@ -138,11 +158,17 @@
         ValidationBestSolution = CreateSolution(bestTree, bestValidationQuality);
         ValidationBestSolutionQuality = new DoubleValue(bestValidationQuality);
+        if (IterationsParameter.ActualValue != null)
+          ValidationBestSolutionGenerationParameter.ActualValue = new IntValue(IterationsParameter.ActualValue.Value);
 
         if (!results.ContainsKey(ValidationBestSolutionParameter.Name)) {
           results.Add(new Result(ValidationBestSolutionParameter.Name, ValidationBestSolutionParameter.Description, ValidationBestSolution));
           results.Add(new Result(ValidationBestSolutionQualityParameter.Name, ValidationBestSolutionQualityParameter.Description, ValidationBestSolutionQuality));
+          if (ValidationBestSolutionGenerationParameter.ActualValue != null)
+            results.Add(new Result(ValidationBestSolutionGenerationParameter.Name, ValidationBestSolutionGenerationParameter.Description, ValidationBestSolutionGenerationParameter.ActualValue));
         } else {
           results[ValidationBestSolutionParameter.Name].Value = ValidationBestSolution;
           results[ValidationBestSolutionQualityParameter.Name].Value = ValidationBestSolutionQuality;
+          if (ValidationBestSolutionGenerationParameter.ActualValue != null)
+            results[ValidationBestSolutionGenerationParameter.Name].Value = ValidationBestSolutionGenerationParameter.ActualValue;
         }
       }
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs	(revision 10681)
@@ -120,5 +120,4 @@
         .Select(i => tree[i])
         .Take(topN)
-        .AsParallel()
         .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
         .ToArray();
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs	(revision 10681)
@@ -131,5 +131,4 @@
 
       var variableFrequencies = trees
-        .AsParallel()
         .SelectMany(t => GetVariableReferences(t, aggregateLaggedVariables))
         .GroupBy(pair => pair.Key, pair => pair.Value)
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj	(revision 10681)
@@ -125,4 +125,9 @@
       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
     </Reference>
+    <Reference Include="HeuristicLab.Optimization.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <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>
@@ -177,4 +182,10 @@
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="Matching\SymbolicExpressionTreeCanonicalSorter.cs" />
+    <Compile Include="Matching\SymbolicExpressionTreeEqualityComparer.cs" />
+    <Compile Include="Matching\SymbolicExpressionTreeMatching.cs" />
+    <Compile Include="Matching\SymbolicExpressionTreeMaxCommonSequenceCalculator.cs" />
+    <Compile Include="Matching\SymbolicExpressionTreeNodeComparer.cs" />
+    <Compile Include="Matching\SymbolicExpressionTreeNodeSimilarityComparer.cs" />
     <Compile Include="Analyzers\SymbolicDataAnalysisVariableFrequencyAnalyzer.cs" />
     <Compile Include="Analyzers\SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs" />
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisImpactValuesCalculator.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisImpactValuesCalculator.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisImpactValuesCalculator.cs	(revision 10681)
@@ -1,9 +1,12 @@
 ﻿using System.Collections.Generic;
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
-  public interface ISymbolicDataAnalysisSolutionImpactValuesCalculator {
+  public interface ISymbolicDataAnalysisSolutionImpactValuesCalculator : IItem {
     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);
+    void CalculateImpactAndReplacementValues(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData,
+      IEnumerable<int> rows, out double impactValue, out double replacementValue, double originalQuality = double.NaN);
   }
 }
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeCanonicalSorter.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeCanonicalSorter.cs	(revision 10681)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeCanonicalSorter.cs	(revision 10681)
@@ -0,0 +1,30 @@
+﻿
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public class SymbolicExpressionTreeCanonicalSorter {
+    private readonly HashSet<Type> nonSymmetricSymbols = new HashSet<Type> { typeof(Subtraction), typeof(Division) };
+
+    public void SortSubtrees(ISymbolicExpressionTree tree) {
+      SortSubtrees(tree.Root);
+    }
+
+    public void SortSubtrees(ISymbolicExpressionTreeNode node) {
+      if (node.SubtreeCount == 0) return;
+      var subtrees = node.Subtrees as List<ISymbolicExpressionTreeNode> ?? node.Subtrees.ToList();
+      if (IsSymmetric(node.Symbol)) {
+        var comparer = new SymbolicExpressionTreeNodeComparer();
+        subtrees.Sort(comparer);
+      }
+      foreach (var s in subtrees)
+        SortSubtrees(s);
+    }
+
+    private bool IsSymmetric(ISymbol s) {
+      return !nonSymmetricSymbols.Contains(s.GetType());
+    }
+  }
+}
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeEqualityComparer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeEqualityComparer.cs	(revision 10681)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeEqualityComparer.cs	(revision 10681)
@@ -0,0 +1,19 @@
+﻿using System;
+using System.Collections.Generic;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public class SymbolicExpressionTreeEqualityComparer : IEqualityComparer<ISymbolicExpressionTree> {
+    public SymbolicExpressionTreeNodeSimilarityComparer SimilarityComparer { get; set; }
+
+    public bool Equals(ISymbolicExpressionTree a, ISymbolicExpressionTree b) {
+      if (SimilarityComparer == null) throw new Exception("SimilarityComparer needs to be initialized first.");
+      return a.Length == b.Length &&
+             SymbolicExpressionTreeMatching.Match(a.Root, b.Root, SimilarityComparer) == Math.Min(a.Length, b.Length);
+    }
+
+    public int GetHashCode(ISymbolicExpressionTree tree) {
+      return (tree.Length << 8) % 12345;
+    }
+  }
+}
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeMatching.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeMatching.cs	(revision 10681)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeMatching.cs	(revision 10681)
@@ -0,0 +1,48 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+//using HeuristicLab.EvolutionTracking;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public static class SymbolicExpressionTreeMatching {
+    public static bool ContainsSubtree(this ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode subtree, SymbolicExpressionTreeNodeSimilarityComparer comparer) {
+      return FindMatches(root, subtree, comparer).Any();
+    }
+    public static IEnumerable<ISymbolicExpressionTreeNode> FindMatches(ISymbolicExpressionTree tree, ISymbolicExpressionTreeNode subtree, SymbolicExpressionTreeNodeSimilarityComparer comparer) {
+      return FindMatches(tree.Root, subtree, comparer);
+    }
+
+    public static IEnumerable<ISymbolicExpressionTreeNode> FindMatches(ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode subtree, SymbolicExpressionTreeNodeSimilarityComparer comp) {
+      var fragmentLength = subtree.GetLength();
+      // below, we use ">=" for Match(n, subtree, comp) >= fragmentLength because in case of relaxed conditions, 
+      // we can have multiple matches of the same node
+
+      return root.IterateNodesBreadth().Where(n => n.GetLength() >= fragmentLength && Match(n, subtree, comp) == fragmentLength);
+    }
+
+    ///<summary>
+    /// Finds the longest common subsequence in quadratic time and linear space
+    /// Variant of:
+    /// D. S. Hirschberg. A linear space algorithm for or computing maximal common subsequences. 1975.
+    /// http://dl.acm.org/citation.cfm?id=360861
+    /// </summary>
+    /// <returns>Number of pairs that were matched</returns>
+    public static int Match(ISymbolicExpressionTreeNode a, ISymbolicExpressionTreeNode b, SymbolicExpressionTreeNodeSimilarityComparer comp) {
+      if (!comp.Equals(a, b)) return 0;
+      int m = a.SubtreeCount;
+      int n = b.SubtreeCount;
+      if (m == 0 || n == 0) return 1;
+      var matrix = new int[m + 1, n + 1];
+      for (int i = 1; i <= m; ++i) {
+        var ai = a.GetSubtree(i - 1);
+        for (int j = 1; j <= n; ++j) {
+          var bj = b.GetSubtree(j - 1);
+          int match = Match(ai, bj, comp);
+          matrix[i, j] = Math.Max(Math.Max(matrix[i, j - 1], matrix[i - 1, j]), matrix[i - 1, j - 1] + match);
+        }
+      }
+      return matrix[m, n] + 1;
+    }
+  }
+}
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeMaxCommonSequenceCalculator.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeMaxCommonSequenceCalculator.cs	(revision 10681)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeMaxCommonSequenceCalculator.cs	(revision 10681)
@@ -0,0 +1,59 @@
+﻿using System;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Matching {
+  public class MaxCommonSequenceCalculator<T, U>
+    where T : class
+    where U : IEqualityComparer<T> {
+
+    public U Comparer { get; set; }
+    private int[,] matrix;
+    private List<T> sequence;
+
+    /// <summary>
+    /// Calculate the maximal common subsequence between arrays a and b and return it
+    /// </summary>
+    /// <param name="a"></param>
+    /// <param name="b"></param>
+    /// <returns></returns>
+    public IEnumerable<T> Calculate(T[] a, T[] b) {
+      int m = a.Length;
+      int n = b.Length;
+
+      if (m == 0 || n == 0) return null;
+      sequence = new List<T>();
+      matrix = new int[m + 1, n + 1];
+
+      for (int i = 0; i <= m; ++i) {
+        for (int j = 0; j <= n; ++j) {
+          if (i == 0 || j == 0) {
+            matrix[i, j] = 0;
+          } else if (Comparer.Equals(a[i - 1], b[j - 1])) {
+            matrix[i, j] = matrix[i - 1, j - 1] + 1;
+          } else {
+            matrix[i, j] = Math.Max(matrix[i - 1, j], matrix[i, j - 1]);
+          }
+        }
+      }
+      recon(a, b, n, m);
+      return sequence;
+    }
+
+    private void recon(T[] a, T[] b, int i, int j) {
+      while (true) {
+        if (i == 0 || j == 0) return;
+        if (Comparer.Equals(a[i - 1], b[j - 1])) {
+          recon(a, b, i - 1, j - 1);
+          sequence.Add(a[i - 1]);
+        } else if (matrix[i - 1, j] > matrix[i, j - 1]) {
+          i = i - 1;
+          continue;
+        } else {
+          j = j - 1;
+          continue;
+        }
+        break;
+      }
+    }
+  }
+}
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeNodeComparer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeNodeComparer.cs	(revision 10681)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeNodeComparer.cs	(revision 10681)
@@ -0,0 +1,33 @@
+﻿using System;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  // this comparer considers that a < b if the type of a is "greater" than the type of b, for example:
+  // - A function node is "greater" than a terminal node
+  // - A variable terminal is "greater" than a constant terminal
+  // - used for bringing subtrees to a "canonical" form when the operation allows reordering of arguments
+  public class SymbolicExpressionTreeNodeComparer : ISymbolicExpressionTreeNodeComparer {
+    public int Compare(ISymbolicExpressionTreeNode a, ISymbolicExpressionTreeNode b) {
+      if (!(a is SymbolicExpressionTreeTerminalNode)) {
+        return b is SymbolicExpressionTreeTerminalNode
+          ? -1
+          : string.Compare(a.Symbol.Name, b.Symbol.Name, StringComparison.Ordinal);
+      }
+      if (!(b is SymbolicExpressionTreeTerminalNode)) return 1;
+      // at this point we know a and b are terminal nodes
+      var va = a as VariableTreeNode;
+      if (va != null) {
+        if (b is ConstantTreeNode) return -1;
+        var vb = (VariableTreeNode)b;
+        return (va.VariableName.Equals(vb.VariableName)
+          ? va.Weight.CompareTo(vb.Weight)
+          : string.Compare(va.VariableName, vb.VariableName, StringComparison.Ordinal));
+      }
+      // at this point we know for sure that a is a constant tree node
+      if (b is VariableTreeNode) return 1;
+      var ca = (ConstantTreeNode)a;
+      var cb = (ConstantTreeNode)b;
+      return ca.Value.CompareTo(cb.Value);
+    }
+  }
+}
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeNodeSimilarityComparer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeNodeSimilarityComparer.cs	(revision 10681)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeNodeSimilarityComparer.cs	(revision 10681)
@@ -0,0 +1,76 @@
+﻿using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("SymbolicExpressionTreeNodeSimilarityComparer", "A comparison operator that checks node equality based on different similarity measures.")]
+  [StorableClass]
+  public class SymbolicExpressionTreeNodeSimilarityComparer : Item, ISymbolicExpressionTreeNodeSimilarityComparer {
+    [StorableConstructor]
+    protected SymbolicExpressionTreeNodeSimilarityComparer(bool deserializing) : base(deserializing) { }
+    protected SymbolicExpressionTreeNodeSimilarityComparer(SymbolicExpressionTreeNodeSimilarityComparer original, Cloner cloner)
+      : base(original, cloner) {
+      matchConstantValues = original.matchConstantValues;
+      matchVariableNames = original.matchVariableNames;
+      matchVariableWeights = original.matchVariableWeights;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) { return new SymbolicExpressionTreeNodeSimilarityComparer(this, cloner); }
+
+    // more flexible matching criteria 
+    [Storable]
+    private bool matchConstantValues;
+    public bool MatchConstantValues {
+      get { return matchConstantValues; }
+      set { matchConstantValues = value; }
+    }
+
+    [Storable]
+    private bool matchVariableNames;
+    public bool MatchVariableNames {
+      get { return matchVariableNames; }
+      set { matchVariableNames = value; }
+    }
+
+    [Storable]
+    private bool matchVariableWeights;
+    public bool MatchVariableWeights {
+      get { return matchVariableWeights; }
+      set { matchVariableWeights = value; }
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public SymbolicExpressionTreeNodeSimilarityComparer() {
+      matchConstantValues = true;
+      matchVariableNames = true;
+      matchVariableWeights = true;
+    }
+
+    public int GetHashCode(ISymbolicExpressionTreeNode n) {
+      return n.ToString().ToLower().GetHashCode();
+    }
+
+    public bool Equals(ISymbolicExpressionTreeNode a, ISymbolicExpressionTreeNode b) {
+      if (!(a is SymbolicExpressionTreeTerminalNode))
+        // if a and b are non terminal nodes, check equality of symbol names
+        return !(b is SymbolicExpressionTreeTerminalNode) && a.Symbol.Name.Equals(b.Symbol.Name);
+      var va = a as VariableTreeNode;
+      if (va != null) {
+        var vb = b as VariableTreeNode;
+        if (vb == null) return false;
+
+        return (!MatchVariableNames || va.VariableName.Equals(vb.VariableName)) && (!MatchVariableWeights || va.Weight.Equals(vb.Weight));
+      }
+      var ca = a as ConstantTreeNode;
+      if (ca != null) {
+        var cb = b as ConstantTreeNode;
+        if (cb == null) return false;
+        return (!MatchConstantValues || ca.Value.Equals(cb.Value));
+      }
+      return false;
+    }
+  }
+}
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Plugin.cs.frame
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Plugin.cs.frame	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Plugin.cs.frame	(revision 10681)
@@ -38,4 +38,5 @@
   [PluginDependency("HeuristicLab.Operators", "3.3")]
   [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization.Operators", "3.3")]
   [PluginDependency("HeuristicLab.Parameters", "3.3")]
   [PluginDependency("HeuristicLab.Persistence", "3.3")]
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionPruningOperator.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionPruningOperator.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionPruningOperator.cs	(revision 10681)
@@ -34,74 +34,120 @@
   [StorableClass]
   [Item("SymbolicExpressionTreePruningOperator", "An operator that replaces introns with constant values in a symbolic expression tree.")]
-  public class SymbolicDataAnalysisExpressionPruningOperator : SingleSuccessorOperator {
-    private const string NumberOfPrunedSubtreesParameterName = "PrunedSubtrees";
-    private const string NumberOfPrunedTreesParameterName = "PrunedTrees";
+  public abstract class SymbolicDataAnalysisExpressionPruningOperator : SingleSuccessorOperator {
+    #region parameter names
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string SymbolicDataAnalysisModelParameterName = "SymbolicDataAnalysisModel";
+    private const string ImpactValuesCalculatorParameterName = "ImpactValuesCalculator";
+    private const string PrunedSubtreesParameterName = "PrunedSubtrees";
+    private const string PrunedTreesParameterName = "PrunedTrees";
+    private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition";
+    private const string NodeImpactThresholdParameterName = "ImpactThreshold";
+    private const string PruneOnlyZeroImpactNodesParameterName = "PruneOnlyZeroImpactNodes";
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree"; // the tree to be pruned
+    private const string QualityParameterName = "Quality"; // the quality 
+    private const string EstimationLimitsParameterName = "EstimationLimits";
+    private const string InterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+    #endregion
+
     #region parameter properties
-    public ILookupParameter<DoubleValue> NumberOfPrunedSubtreesParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters[NumberOfPrunedSubtreesParameterName]; }
+    public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
     }
-    public ILookupParameter<DoubleValue> NumberOfPrunedTreesParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters[NumberOfPrunedTreesParameterName]; }
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+    public ILookupParameter<IDataAnalysisProblemData> ProblemDataParameter {
+      get { return (ILookupParameter<IDataAnalysisProblemData>)Parameters[ProblemDataParameterName]; }
+    }
+    public IValueParameter<ISymbolicDataAnalysisSolutionImpactValuesCalculator> ImpactValuesCalculatorParameter {
+      get { return (IValueParameter<ISymbolicDataAnalysisSolutionImpactValuesCalculator>)Parameters[ImpactValuesCalculatorParameterName]; }
+    }
+    public ILookupParameter<IntRange> FitnessCalculationPartitionParameter {
+      get { return (ILookupParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; }
+    }
+    public ILookupParameter<IntValue> PrunedSubtreesParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[PrunedSubtreesParameterName]; }
+    }
+    public ILookupParameter<IntValue> PrunedTreesParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[PrunedTreesParameterName]; }
+    }
+    public IFixedValueParameter<DoubleValue> NodeImpactThresholdParameter {
+      get { return (IFixedValueParameter<DoubleValue>)Parameters[NodeImpactThresholdParameterName]; }
+    }
+    public IFixedValueParameter<BoolValue> PruneOnlyZeroImpactNodesParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters[PruneOnlyZeroImpactNodesParameterName]; }
+    }
+    public ILookupParameter<DoubleLimit> EstimationLimitsParameter {
+      get { return (ILookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
+    }
+    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> InterpreterParameter {
+      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[InterpreterParameterName]; }
     }
     #endregion
     #region properties
-    private DoubleValue PrunedSubtrees { get { return NumberOfPrunedSubtreesParameter.ActualValue; } }
-    private DoubleValue PrunedTrees { get { return NumberOfPrunedTreesParameter.ActualValue; } }
+    protected IDataAnalysisProblemData ProblemData { get { return ProblemDataParameter.ActualValue; } }
+    protected ISymbolicDataAnalysisSolutionImpactValuesCalculator ImpactValuesCalculator { get { return ImpactValuesCalculatorParameter.Value; } }
+    protected IntRange FitnessCalculationPartition { get { return FitnessCalculationPartitionParameter.ActualValue; } }
+    protected BoolValue PruneOnlyZeroImpactNodes { get { return PruneOnlyZeroImpactNodesParameter.Value; } }
+    protected DoubleValue NodeImpactThreshold { get { return NodeImpactThresholdParameter.Value; } }
+    protected ISymbolicExpressionTree SymbolicExpressionTree { get { return SymbolicExpressionTreeParameter.ActualValue; } }
+    protected DoubleValue Quality { get { return QualityParameter.ActualValue; } }
+    protected DoubleLimit EstimationLimits { get { return EstimationLimitsParameter.ActualValue; } }
+    protected ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter { get { return InterpreterParameter.ActualValue; } }
     #endregion
 
     [StorableConstructor]
     protected SymbolicDataAnalysisExpressionPruningOperator(bool deserializing) : base(deserializing) { }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new SymbolicDataAnalysisExpressionPruningOperator(this, cloner);
+    protected SymbolicDataAnalysisExpressionPruningOperator(SymbolicDataAnalysisExpressionPruningOperator original, Cloner cloner)
+      : base(original, cloner) { }
+
+    protected SymbolicDataAnalysisExpressionPruningOperator() {
+      #region add parameters
+      Parameters.Add(new LookupParameter<IDataAnalysisProblemData>(ProblemDataParameterName));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisModel>(SymbolicDataAnalysisModelParameterName));
+      Parameters.Add(new LookupParameter<IntRange>(FitnessCalculationPartitionParameterName));
+      Parameters.Add(new LookupParameter<IntValue>(PrunedSubtreesParameterName, "A counter of how many subtrees were replaced."));
+      Parameters.Add(new LookupParameter<IntValue>(PrunedTreesParameterName, "A counter of how many trees were pruned."));
+      Parameters.Add(new FixedValueParameter<BoolValue>(PruneOnlyZeroImpactNodesParameterName, "Specify whether or not only zero impact nodes should be pruned."));
+      Parameters.Add(new FixedValueParameter<DoubleValue>(NodeImpactThresholdParameterName, "Specifies an impact value threshold below which nodes should be pruned."));
+      Parameters.Add(new LookupParameter<DoubleLimit>(EstimationLimitsParameterName));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(InterpreterParameterName));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName));
+      Parameters.Add(new LookupParameter<DoubleValue>(QualityParameterName));
+      #endregion
     }
-    protected SymbolicDataAnalysisExpressionPruningOperator(SymbolicDataAnalysisExpressionPruningOperator original, Cloner cloner)
-      : base(original, cloner) {
-    }
-
-    public SymbolicDataAnalysisExpressionPruningOperator() {
-      Parameters.Add(new LookupParameter<DoubleValue>(NumberOfPrunedSubtreesParameterName));
-      Parameters.Add(new LookupParameter<DoubleValue>(NumberOfPrunedTreesParameterName));
-    }
-
-    public ISymbolicDataAnalysisModel Model { get; set; }
-    public IDataAnalysisProblemData ProblemData { get; set; }
-    public ISymbolicDataAnalysisSolutionImpactValuesCalculator ImpactsCalculator { get; set; }
-
-    public IntRange FitnessCalculationPartition { get; set; }
-    public IRandom Random { get; set; }
-
-    public bool PruneOnlyZeroImpactNodes { get; set; }
-    public double NodeImpactThreshold { get; set; }
-
     public override IOperation Apply() {
-      int prunedSubtrees = 0;
-
-      var nodes = Model.SymbolicExpressionTree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPrefix().ToList();
+      var model = CreateModel();
+      var nodes = SymbolicExpressionTree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPrefix().ToList();
       var rows = Enumerable.Range(FitnessCalculationPartition.Start, FitnessCalculationPartition.Size).ToList();
 
-      for (int j = 0; j < nodes.Count; ++j) {
-        var node = nodes[j];
+      var prunedSubtrees = 0;
+      var prunedTrees = 0;
+
+      double quality = Evaluate(model);
+
+      for (int i = 0; i < nodes.Count; ++i) {
+        var node = nodes[i];
         if (node is ConstantTreeNode) continue;
 
-        var impact = ImpactsCalculator.CalculateImpactValue(Model, node, ProblemData, rows);
+        double impactValue, replacementValue;
+        ImpactValuesCalculator.CalculateImpactAndReplacementValues(model, node, ProblemData, rows, out impactValue, out replacementValue, quality);
 
-        if (PruneOnlyZeroImpactNodes) {
-          if (!impact.IsAlmost(0.0)) continue;
-        } else {
-          if (NodeImpactThreshold < impact) continue;
-        }
+        if (PruneOnlyZeroImpactNodes.Value && (!impactValue.IsAlmost(0.0))) continue;
+        else if (NodeImpactThreshold.Value < impactValue) continue;
 
-        var replacementValue = ImpactsCalculator.CalculateReplacementValue(Model, node, ProblemData, rows);
         var constantNode = new ConstantTreeNode(new Constant()) { Value = replacementValue };
         ReplaceWithConstant(node, constantNode);
-        j += node.GetLength() - 1; // skip subtrees under the node that was folded
+        i += node.GetLength() - 1; // skip subtrees under the node that was folded
+
+        quality -= impactValue;
 
         prunedSubtrees++;
       }
 
-      if (prunedSubtrees > 0) {
-        lock (PrunedSubtrees) { PrunedSubtrees.Value += prunedSubtrees; }
-        lock (PrunedTrees) { PrunedTrees.Value += 1; }
-      }
+      if (prunedSubtrees > 0) prunedTrees = 1;
+      PrunedSubtreesParameter.ActualValue = new IntValue(prunedSubtrees);
+      PrunedTreesParameter.ActualValue = new IntValue(prunedTrees);
+
       return base.Apply();
     }
@@ -112,4 +158,6 @@
       parent.InsertSubtree(i, replacement);
     }
+    protected abstract ISymbolicDataAnalysisModel CreateModel();
+    protected abstract double Evaluate(IDataAnalysisModel model);
   }
 }
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs	(revision 10680)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs	(revision 10681)
@@ -22,10 +22,21 @@
 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 {
-  public abstract class SymbolicDataAnalysisSolutionImpactValuesCalculator : ISymbolicDataAnalysisSolutionImpactValuesCalculator {
+  [StorableClass]
+  [Item("SymbolicDataAnalysisSolutionImpactValuesCalculator", "Calculates the impact values and replacements values for symbolic expression tree nodes.")]
+  public abstract class SymbolicDataAnalysisSolutionImpactValuesCalculator : Item, ISymbolicDataAnalysisSolutionImpactValuesCalculator {
+    protected SymbolicDataAnalysisSolutionImpactValuesCalculator() { }
+
+    protected SymbolicDataAnalysisSolutionImpactValuesCalculator(SymbolicDataAnalysisSolutionImpactValuesCalculator original, Cloner cloner)
+      : base(original, cloner) { }
+    [StorableConstructor]
+    protected SymbolicDataAnalysisSolutionImpactValuesCalculator(bool deserializing) : base(deserializing) { }
     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);
+    public abstract void CalculateImpactAndReplacementValues(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, IEnumerable<int> rows, out double impactValue, out double replacementValue, double originalQuality = double.NaN);
 
     protected static double CalculateReplacementValue(ISymbolicExpressionTreeNode node, ISymbolicExpressionTree sourceTree, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter,
