Index: /branches/PushGP/HeuristicLab.PushGP/FeatureTests/Program.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/FeatureTests/Program.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/FeatureTests/Program.cs	(revision 15017)
@@ -573,5 +573,5 @@
       };
 
-      var simplerProgram = Simplifier.Simplify(program, evaluator);
+      var simplerProgram = Simplifier.Simplify(program, pool.PushConfiguration, evaluator);
 
       Console.WriteLine(simplerProgram);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/BenchmarkSuiteDataDescriptor.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/BenchmarkSuiteDataDescriptor.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/BenchmarkSuiteDataDescriptor.cs	(revision 15017)
@@ -6,7 +6,4 @@
   using System.Reflection;
   using System.Text.RegularExpressions;
-  using HeuristicLab.BenchmarkSuite.Problems;
-
-  using Microsoft.VisualBasic.FileIO;
 
 
@@ -33,4 +30,31 @@
     protected abstract Example ParseExample(string[] input, string[] output);
 
+    //private IEnumerable<Example> ParseData() {
+    //  using (var file = GetType().Assembly.GetManifestResourceStream(InstanceArchiveName))
+    //  using (var archive = new ZipArchive(file, ZipArchiveMode.Read)) {
+    //    var entry = archive.Entries.SingleOrDefault(x => x.Name == FileName);
+
+    //    using (var parser = new TextFieldParser(entry.Open())) {
+    //      parser.TextFieldType = FieldType.Delimited;
+    //      parser.SetDelimiters(ExampleFieldDelimiter);
+    //      parser.HasFieldsEnclosedInQuotes = true;
+    //      parser.TrimWhiteSpace = false;
+
+    //      //Processing rows
+    //      while (!parser.EndOfData) {
+    //        var fields = parser.ReadFields();
+
+    //        if (fields.Length != InputArgumentCount + OutputArgumentCount)
+    //          throw new InvalidDataException("Number of values do not fit");
+
+    //        var input = fields.Take(InputArgumentCount).ToArray();
+    //        var output = fields.Skip(InputArgumentCount).ToArray();
+
+    //        yield return ParseExample(input, output);
+    //      }
+    //    }
+    //  }
+    //}
+
     private IEnumerable<Example> ParseData() {
       using (var file = GetType().Assembly.GetManifestResourceStream(InstanceArchiveName))
@@ -38,19 +62,10 @@
         var entry = archive.Entries.SingleOrDefault(x => x.Name == FileName);
 
-        using (var parser = new TextFieldParser(entry.Open())) {
-          parser.TextFieldType = FieldType.Delimited;
-          parser.SetDelimiters(ExampleFieldDelimiter);
-          parser.HasFieldsEnclosedInQuotes = true;
-          parser.TrimWhiteSpace = false;
+        using (var reader = new StreamReader(entry.Open())) {
+          var lines = CsvParser.Parse(reader, ',', '"');
 
-          //Processing rows
-          while (!parser.EndOfData) {
-            var fields = parser.ReadFields();
-
-            if (fields.Length != InputArgumentCount + OutputArgumentCount)
-              throw new InvalidDataException("Number of values do not fit");
-
-            var input = fields.Take(InputArgumentCount).ToArray();
-            var output = fields.Skip(InputArgumentCount).ToArray();
+          foreach (var line in lines) {
+            var input = line.Take(InputArgumentCount).ToArray();
+            var output = line.Skip(InputArgumentCount).ToArray();
 
             yield return ParseExample(input, output);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/CsvParser.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/CsvParser.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/CsvParser.cs	(revision 15017)
@@ -0,0 +1,100 @@
+﻿/*
+ * License: CPOL
+ * Source: https://www.codeproject.com/Tips/823670/Csharp-Light-and-Fast-CSV-Parser
+ * Author: Yuriy Magurdumov
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeuristicLab.BenchmarkSuite {
+  using System.IO;
+
+  public static class CsvParser {
+    private static Tuple<T, IEnumerable<T>> HeadAndTail<T>(this IEnumerable<T> source) {
+      if (source == null)
+        throw new ArgumentNullException("source");
+      var en = source.GetEnumerator();
+      en.MoveNext();
+      return Tuple.Create(en.Current, EnumerateTail(en));
+    }
+
+    private static IEnumerable<T> EnumerateTail<T>(IEnumerator<T> en) {
+      while (en.MoveNext()) yield return en.Current;
+    }
+
+    public static IEnumerable<IList<string>> Parse(string content, char delimiter, char qualifier) {
+      using (var reader = new StringReader(content))
+        return Parse(reader, delimiter, qualifier);
+    }
+
+    public static Tuple<IList<string>, IEnumerable<IList<string>>> ParseHeadAndTail(TextReader reader, char delimiter, char qualifier) {
+      return HeadAndTail(Parse(reader, delimiter, qualifier));
+    }
+
+    public static IEnumerable<IList<string>> Parse(TextReader reader, char delimiter, char qualifier) {
+      var inQuote = false;
+      var record = new List<string>();
+      var sb = new StringBuilder();
+
+      while (reader.Peek() != -1) {
+        var readChar = (char)reader.Read();
+
+        if (readChar == '\n' || (readChar == '\r' && (char)reader.Peek() == '\n')) {
+          // If it's a \r\n combo consume the \n part and throw it away.
+          if (readChar == '\r')
+            reader.Read();
+
+          if (inQuote) {
+            if (readChar == '\r')
+              sb.Append('\r');
+            sb.Append('\n');
+          } else {
+            if (record.Count > 0 || sb.Length > 0) {
+              record.Add(sb.ToString());
+              sb.Clear();
+            }
+
+            if (record.Count > 0)
+              yield return record;
+
+            record = new List<string>(record.Count);
+          }
+        } else if (sb.Length == 0 && !inQuote) {
+          if (readChar == qualifier)
+            inQuote = true;
+          else if (readChar == delimiter) {
+            record.Add(sb.ToString());
+            sb.Clear();
+          //} else if (char.IsWhiteSpace(readChar)) { // Ignore leading whitespace
+          } else
+            sb.Append(readChar);
+        } else if (readChar == delimiter) {
+          if (inQuote)
+            sb.Append(delimiter);
+          else {
+            record.Add(sb.ToString());
+            sb.Clear();
+          }
+        } else if (readChar == qualifier) {
+          if (inQuote) {
+            if ((char)reader.Peek() == qualifier) {
+              reader.Read();
+              sb.Append(qualifier);
+            } else
+              inQuote = false;
+          } else
+            sb.Append(readChar);
+        } else
+          sb.Append(readChar);
+      }
+
+      if (record.Count > 0 || sb.Length > 0)
+        record.Add(sb.ToString());
+
+      if (record.Count > 0)
+        yield return record;
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Example.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Example.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Example.cs	(revision 15017)
@@ -1,3 +1,4 @@
 ﻿namespace HeuristicLab.BenchmarkSuite {
+  using System;
 
   using HeuristicLab.Common;
@@ -40,4 +41,6 @@
       OutputStringVector = emptyStringVectors;
       OutputPrint = string.Empty;
+      OutputFloatPrecision = 15;
+      OutputFloatVectorPrecision = 15;
     }
 
@@ -67,4 +70,6 @@
       OutputPrint = origin.OutputPrint;
       OutputPrintLineCount = origin.OutputPrintLineCount;
+      OutputFloatPrecision = origin.OutputFloatPrecision;
+      OutputFloatVectorPrecision = origin.OutputFloatVectorPrecision;
     }
 
@@ -115,7 +120,23 @@
     public string[][] OutputStringVector { get; set; }
     [Storable]
-    public string OutputPrint { get; set; }
+    private string outputPrint;
+    private static readonly string[] NewLineSeparator = { "\r\n", "\n" };
+    public string OutputPrint
+    {
+      get { return outputPrint; }
+      set
+      {
+        outputPrint = value;
+        OutputPrintLineCount = value != null ? value.Split(NewLineSeparator, StringSplitOptions.None).Length : 0;
+      }
+    }
+
     [Storable]
-    public int OutputPrintLineCount { get; set; }
+    public int OutputPrintLineCount { get; private set; }
+
+    [Storable]
+    public int OutputFloatPrecision { get; set; }
+    [Storable]
+    public int OutputFloatVectorPrecision { get; set; }
 
     public override IDeepCloneable Clone(Cloner cloner) {
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/ExampleArgumentConverter.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/ExampleArgumentConverter.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/ExampleArgumentConverter.cs	(revision 15017)
@@ -15,5 +15,5 @@
 
     public static double[] ConvertDoubles(string input) {
-      return ConvertMultiple(input, str => double.Parse(str, CultureInfo.InvariantCulture));
+      return ConvertMultiple(input, str => double.Parse(str, NumberStyles.Float, CultureInfo.InvariantCulture));
     }
 
@@ -36,5 +36,28 @@
 
     public static string[] ConvertStringVector(string input) {
-      return ConvertMultiple(input, s => s.Trim('\"'));
+      var length = input.Length - 1;
+      var strs = new List<string>();
+
+      for (var i = 1; i < length; i++) {
+        // collect string
+        var c = input[i];
+
+        if (c == ' ') continue;
+        if (c != '\"') throw new InvalidDataException("Unable to parse string vector");
+
+        var start = i + 1;
+        do {
+          i++;
+          c = input[i];
+        } while (i < length - 1  &&
+               !(c == '\"' && input[i + 1] == ' ') &&
+               !(i == length - 2 && c == '\"' && input[i + 1] == ']'));
+
+
+        var str = input.Substring(start, i - start);
+        strs.Add(str);
+      }
+
+      return strs.ToArray();
     }
 
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/HeuristicLab.BenchmarkSuite.csproj
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/HeuristicLab.BenchmarkSuite.csproj	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/HeuristicLab.BenchmarkSuite.csproj	(revision 15017)
@@ -105,4 +105,5 @@
     <Compile Include="BenchmarkSuiteDataDescriptor.cs" />
     <Compile Include="BenchmarkSuiteInstanceProvider.cs" />
+    <Compile Include="CsvParser.cs" />
     <Compile Include="DataTypes.cs" />
     <Compile Include="Problems\ScrabbleScore.cs" />
@@ -141,4 +142,5 @@
     <Compile Include="Problems\WordStats.cs" />
     <Compile Include="Problems\XWordLines.cs" />
+    <Compile Include="ProblemType.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Views\ViewHelper.cs" />
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/ProblemData.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/ProblemData.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/ProblemData.cs	(revision 15017)
@@ -10,7 +10,9 @@
   public class ProblemData : NamedItem {
 
-    public ProblemData() {
+    public ProblemData(ProblemType problemType) {
       Name = "BenchmarkSuite Problem Data";
       ErcOptions = new ErcOptions(); // default does nothing
+      FloatStringFormat = "R";
+      ProblemType = problemType;
     }
 
@@ -31,5 +33,9 @@
       EnabledDataTypes = origin.EnabledDataTypes;
       ErcOptions = cloner.Clone(origin.ErcOptions);
+      FloatStringFormat = origin.FloatStringFormat;
     }
+
+    [Storable]
+    public readonly ProblemType ProblemType;
 
     [Storable]
@@ -71,4 +77,7 @@
     public ErcOptions ErcOptions { get; set; }
 
+    [Storable]
+    public string FloatStringFormat { get; set; }
+
     public override IDeepCloneable Clone(Cloner cloner) {
       return new ProblemData(this, cloner);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/ProblemType.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/ProblemType.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/ProblemType.cs	(revision 15017)
@@ -0,0 +1,33 @@
+﻿namespace HeuristicLab.BenchmarkSuite {
+  public enum ProblemType : uint {
+    Checksum,
+    CollatzNumbers,
+    CompareStringLengths,
+    CountOdds,
+    Digits,
+    DoubleLetters,
+    EvenSquares,
+    ForLoopIndex,
+    Grades,
+    LastIndexOfZero,
+    Median,
+    MirrorImage,
+    NegativeToZero,
+    NumberIO,
+    PigLatin,
+    ReplaceSpaceWithNewline,
+    ScrabbleScore,
+    Smallest,
+    SmallOrLarge,
+    StringDifferences,
+    StringLengthsBackwards,
+    SumOfSquares,
+    SuperAnagrams,
+    Syllables,
+    VectorAverage,
+    VectorSummed,
+    WallisPi,
+    WordStats,
+    XWordLines,
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Checksum.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Checksum.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Checksum.cs	(revision 15017)
@@ -15,5 +15,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.Checksum) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/CollatzNumbers.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/CollatzNumbers.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/CollatzNumbers.cs	(revision 15017)
@@ -14,5 +14,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.CollatzNumbers) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/CompareStringLengths.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/CompareStringLengths.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/CompareStringLengths.cs	(revision 15017)
@@ -14,5 +14,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.CompareStringLengths) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/CountOdds.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/CountOdds.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/CountOdds.cs	(revision 15017)
@@ -14,5 +14,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.CountOdds) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Digits.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Digits.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Digits.cs	(revision 15017)
@@ -15,5 +15,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.Digits) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/DoubleLetters.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/DoubleLetters.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/DoubleLetters.cs	(revision 15017)
@@ -15,5 +15,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.DoubleLetters) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/EvenSquares.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/EvenSquares.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/EvenSquares.cs	(revision 15017)
@@ -12,5 +12,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.EvenSquares) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/ForLoopIndex.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/ForLoopIndex.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/ForLoopIndex.cs	(revision 15017)
@@ -16,5 +16,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.ForLoopIndex) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Grades.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Grades.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Grades.cs	(revision 15017)
@@ -15,5 +15,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.Grades) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/LastIndexOfZero.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/LastIndexOfZero.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/LastIndexOfZero.cs	(revision 15017)
@@ -14,5 +14,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.LastIndexOfZero) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Median.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Median.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Median.cs	(revision 15017)
@@ -14,5 +14,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.Median) {
         Name = Name,
         Description = Description,
@@ -21,8 +21,8 @@
         WorstResult = 100,
         InputArgumentTypes = new[] { ExampleArgumentType.Integer, ExampleArgumentType.Integer, ExampleArgumentType.Integer },
-        OutputArgumentTypes = new[] { ExampleArgumentType.Integer },
+        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
         TrainingCount = 100,
         TestCount = 1000,
-        EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean,
+        EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.Print,
         MaxSize = 200,
         EvalLimit = 200,
@@ -30,6 +30,5 @@
           ErcProbability = 0.05,
           IntegerErcOptions = new IntegerErcOptions(
-            new IntegerConstantErc(0),
-            new IntegerRangeErc(-1000, 100))
+            new IntegerRangeErc(-100, 100))
         }
       };
@@ -41,5 +40,5 @@
         OutputArgs = output,
         InputInteger = ExampleArgumentConverter.ConvertIntegers(input),
-        OutputInteger = ExampleArgumentConverter.ConvertIntegers(output[0]),
+        OutputPrint = output[0]
       };
     }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/MirrorImage.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/MirrorImage.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/MirrorImage.cs	(revision 15017)
@@ -14,5 +14,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.MirrorImage) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/NegativeToZero.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/NegativeToZero.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/NegativeToZero.cs	(revision 15017)
@@ -15,5 +15,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.NegativeToZero) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/NumberIo.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/NumberIo.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/NumberIo.cs	(revision 15017)
@@ -1,3 +1,5 @@
 ﻿namespace HeuristicLab.BenchmarkSuite.Problems {
+  using System.Globalization;
+
   using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Float;
   using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Integer;
@@ -15,5 +17,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.NumberIO) {
         Name = Name,
         Description = Description,
@@ -22,5 +24,5 @@
         WorstResult = 400,
         InputArgumentTypes = new[] { ExampleArgumentType.Float, ExampleArgumentType.Integer },
-        OutputArgumentTypes = new[] { ExampleArgumentType.Float },
+        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
         TrainingCount = 25,
         TestCount = 1000,
@@ -39,4 +41,5 @@
 
     protected override Example ParseExample(string[] input, string[] output) {
+      var estimedFloatValue = double.Parse(output[0], CultureInfo.InvariantCulture);
       return new Example {
         InputArgs = input,
@@ -44,6 +47,6 @@
         InputFloat = ExampleArgumentConverter.ConvertDoubles(input[0]),
         InputInteger = ExampleArgumentConverter.ConvertIntegers(input[1]),
-        OutputFloat = ExampleArgumentConverter.ConvertDoubles(output[0]),
-        //OutputPrint = output[0]
+        //OutputFloat = new[] { estimedFloatValue },
+        OutputPrint = estimedFloatValue.ToString("R", CultureInfo.InvariantCulture),
       };
     }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/PigLatin.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/PigLatin.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/PigLatin.cs	(revision 15017)
@@ -16,5 +16,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.PigLatin) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/ReplaceSpaceWithNewline.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/ReplaceSpaceWithNewline.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/ReplaceSpaceWithNewline.cs	(revision 15017)
@@ -16,5 +16,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.ReplaceSpaceWithNewline) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/ScrabbleScore.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/ScrabbleScore.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/ScrabbleScore.cs	(revision 15017)
@@ -45,5 +45,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.ReplaceSpaceWithNewline) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/SmallOrLarge.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/SmallOrLarge.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/SmallOrLarge.cs	(revision 15017)
@@ -16,5 +16,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.SmallOrLarge) {
         Name = Name,
         Description = Description,
@@ -23,5 +23,5 @@
         WorstResult = 5,
         InputArgumentTypes = new[] { ExampleArgumentType.Integer },
-        OutputArgumentTypes = new[] { ExampleArgumentType.String },
+        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
         TrainingCount = 100,
         TestCount = 1000,
@@ -44,5 +44,5 @@
         OutputArgs = output,
         InputInteger = ExampleArgumentConverter.ConvertIntegers(input[0]),
-        OutputString = output
+        OutputPrint = output[0]
       };
     }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Smallest.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Smallest.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Smallest.cs	(revision 15017)
@@ -14,5 +14,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.Smallest) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/StringDifferences.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/StringDifferences.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/StringDifferences.cs	(revision 15017)
@@ -15,5 +15,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.StringDifferences) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/StringLengthsBackwards.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/StringLengthsBackwards.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/StringLengthsBackwards.cs	(revision 15017)
@@ -14,5 +14,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.StringDifferences) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/SumOfSquares.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/SumOfSquares.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/SumOfSquares.cs	(revision 15017)
@@ -14,5 +14,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.SumOfSquares) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/SuperAnagrams.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/SuperAnagrams.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/SuperAnagrams.cs	(revision 15017)
@@ -16,5 +16,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.SuperAnagrams) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Syllables.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Syllables.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Syllables.cs	(revision 15017)
@@ -16,5 +16,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.Syllables) {
         Name = Name,
         Description = Description,
@@ -26,5 +26,5 @@
         TrainingCount = 100,
         TestCount = 1000,
-        EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.Char | DataTypes.String,
+        EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.Char | DataTypes.String | DataTypes.Print,
         MaxSize = 800,
         EvalLimit = 1600,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/VectorAverage.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/VectorAverage.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/VectorAverage.cs	(revision 15017)
@@ -12,5 +12,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.VectorAverage) {
         Name = Name,
         Description = Description,
@@ -34,4 +34,5 @@
         InputFloatVector = new[] { ExampleArgumentConverter.ConvertDoubles(input[0]) },
         OutputFloat = ExampleArgumentConverter.ConvertDoubles(output[0]),
+        OutputFloatPrecision = 4
       };
     }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/VectorSummed.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/VectorSummed.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/VectorSummed.cs	(revision 15017)
@@ -15,5 +15,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.VectorSummed) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/WallisPi.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/WallisPi.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/WallisPi.cs	(revision 15017)
@@ -15,5 +15,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.WallisPi) {
         Name = Name,
         Description = Description,
@@ -44,4 +44,5 @@
         InputInteger = ExampleArgumentConverter.ConvertIntegers(input),
         OutputFloat = ExampleArgumentConverter.ConvertDoubles(output),
+        OutputFloatPrecision = 5
       };
     }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/WordStats.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/WordStats.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/WordStats.cs	(revision 15017)
@@ -17,5 +17,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.WordStats) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/XWordLines.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/XWordLines.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/XWordLines.cs	(revision 15017)
@@ -15,5 +15,5 @@
 
     public override ProblemData CreateProblemData() {
-      return new ProblemData {
+      return new ProblemData(ProblemType.XWordLines) {
         Name = Name,
         Description = Description,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/String/StringRandomErc.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/String/StringRandomErc.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/String/StringRandomErc.cs	(revision 15017)
@@ -49,5 +49,5 @@
 
     public override string GetErcValue(IRandom random) {
-      if (random.NextDouble().IsAlmost(NewStringProbability) || generatedValues.Count == 0) {
+      if (random.NextDouble() < NewStringProbability || generatedValues.Count == 0) {
         var value = StringGenerator.RandomString(
           AllowLowercaseLetters,
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/StringVector/StringVectorConstantsErc.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/StringVector/StringVectorConstantsErc.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/StringVector/StringVectorConstantsErc.cs	(revision 15017)
@@ -16,4 +16,5 @@
 
     public StringVectorConstantsErc() : this(false, 1d) { }
+    public StringVectorConstantsErc(params string[][] arrays) : this(true, 1d, arrays.Select(x => new StringArray(x)).ToArray()) { }
     public StringVectorConstantsErc(params StringArray[] arrays) : this(true, 1d, arrays) { }
 
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/Views/ErcOptionsView.Designer.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/Views/ErcOptionsView.Designer.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/Views/ErcOptionsView.Designer.cs	(revision 15017)
@@ -34,6 +34,6 @@
       this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
       this.errorProvider.SetIconPadding(this.nameTextBox, 2);
-      this.nameTextBox.Location = new System.Drawing.Point(63, 0);
-      this.nameTextBox.Size = new System.Drawing.Size(645, 20);
+      this.nameTextBox.Location = new System.Drawing.Point(75, 0);
+      this.nameTextBox.Size = new System.Drawing.Size(633, 20);
       //
       // infoLabel
@@ -54,8 +54,8 @@
       this.possibilityTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
-      this.possibilityTextBox.Location = new System.Drawing.Point(63, 25);
+      this.possibilityTextBox.Location = new System.Drawing.Point(75, 25);
       this.possibilityTextBox.Name = "possibilityTextBox";
-      this.possibilityTextBox.Size = new System.Drawing.Size(670, 20);
-      this.possibilityTextBox.TabIndex = 1;
+      this.possibilityTextBox.Size = new System.Drawing.Size(658, 20);
+      this.possibilityTextBox.TabIndex = 2;
       //
       // ErcOptionListView
@@ -69,4 +69,5 @@
       this.ErcOptionListView.Name = "ErcOptionListView";
       this.ErcOptionListView.ReadOnly = false;
+      this.ErcOptionListView.ShowDetails = true;
       this.ErcOptionListView.Size = new System.Drawing.Size(733, 434);
       this.ErcOptionListView.TabIndex = 3;
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/Views/ErcOptionsView.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/Views/ErcOptionsView.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/Views/ErcOptionsView.cs	(revision 15017)
@@ -15,12 +15,24 @@
 
       possibilityTextBox.Validating += PossibilityTextBoxValidating;
+      possibilityTextBox.KeyDown += PossibilityTextBoxKeyDown;
+    }
+
+    private void PossibilityTextBoxKeyDown(object sender, System.Windows.Forms.KeyEventArgs e) {
+      if (e.KeyCode == System.Windows.Forms.Keys.Enter) {
+        Validate();
+      }
     }
 
     private void PossibilityTextBoxValidating(object sender, System.ComponentModel.CancelEventArgs e) {
+      var text = possibilityTextBox.Text.Trim();
+      if (text.EndsWith("%")) {
+        text = text.Substring(0, text.Length - 1);
+      }
+
       double value;
-      if (double.TryParse(possibilityTextBox.Text, out value)) {
-        possibilityTextBox.Text = value.ToString(PERCENTAGE_FORMAT);
+      if (double.TryParse(text, out value)) {
+        possibilityTextBox.Text = (value / 100.0).ToString(PERCENTAGE_FORMAT);
       } else {
-        possibilityTextBox.Text = "0 %";
+        possibilityTextBox.Text = "0%";
         e.Cancel = true;
       }
@@ -37,4 +49,10 @@
         base.Content = value;
       }
+    }
+
+    protected override void OnReadOnlyChanged() {
+      base.OnReadOnlyChanged();
+
+      possibilityTextBox.ReadOnly = ReadOnly;
     }
 
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/Views/ErcOptionsView.resx
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/Views/ErcOptionsView.resx	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/Views/ErcOptionsView.resx	(revision 15017)
@@ -121,7 +121,4 @@
     <value>17, 17</value>
   </metadata>
-  <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
   <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>140, 17</value>
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Settings.StyleCop
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Settings.StyleCop	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Settings.StyleCop	(revision 15017)
@@ -0,0 +1,1 @@
+<StyleCopSettings Version="105" />
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/HeuristicLab.Problems.ProgramSynthesis.csproj
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/HeuristicLab.Problems.ProgramSynthesis.csproj	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/HeuristicLab.Problems.ProgramSynthesis.csproj	(revision 15017)
@@ -121,4 +121,6 @@
     <Compile Include="Push\Attributes\PushStackAttribute.cs" />
     <Compile Include="Push\Configuration\IEnabledExpressionsConfiguration.cs" />
+    <Compile Include="Push\Configuration\PushConfigurationBase.cs" />
+    <Compile Include="Push\Configuration\PushConfigurationParameterCollection.cs" />
     <Compile Include="Push\Data\List\SkipList.cs" />
     <Compile Include="Push\Data\Pool\IPooledObject.cs" />
@@ -126,5 +128,4 @@
     <Compile Include="Push\Data\Pool\ObjectPool.cs" />
     <Compile Include="Push\Data\Pool\PooledList.cs" />
-    <Compile Include="Push\Data\Tree\Tree.cs" />
     <Compile Include="Push\Data\Tree\TreeExtensions.cs" />
     <Compile Include="Push\Data\Tree\TreeNode.cs" />
@@ -147,5 +148,4 @@
     <Compile Include="Push\Expressions\FlushExpressions.cs" />
     <Compile Include="Push\Expressions\IntegerExpressions.cs" />
-    <Compile Include="Push\Expressions\LoopExpression.cs" />
     <Compile Include="Push\Expressions\NameExpressions.cs" />
     <Compile Include="Push\Expressions\PopExpressions.cs" />
@@ -184,6 +184,9 @@
     <Compile Include="Push\Expressions\YankDuplicateExpressions.cs" />
     <Compile Include="Push\Expressions\YankExpressions.cs" />
+    <Compile Include="Push\Extensions\CharExtentions.cs" />
     <Compile Include="Push\Extensions\CollectionExtensions.cs" />
     <Compile Include="Push\Extensions\ControlExntensions.cs" />
+    <Compile Include="Push\Extensions\LongExtensions.cs" />
+    <Compile Include="Push\Extensions\RandomExtensions.cs" />
     <Compile Include="Push\Generators\CodeGenerator\CodeGeneratorUtils.cs" />
     <Compile Include="Push\Generators\CodeGenerator\LinearCodeGenerator.cs" />
@@ -236,4 +239,10 @@
       <DependentUpon>BenchmarkSuitePushSolutionView.cs</DependentUpon>
     </Compile>
+    <Compile Include="Push\Views\PushProgramTreeView.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Push\Views\PushProgramTreeView.Designer.cs">
+      <DependentUpon>PushProgramTreeView.cs</DependentUpon>
+    </Compile>
   </ItemGroup>
   <ItemGroup>
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Attributes/PushExpressionAttriubte.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Attributes/PushExpressionAttriubte.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Attributes/PushExpressionAttriubte.cs	(revision 15017)
@@ -10,9 +10,22 @@
     public readonly string ExpressionName;
     public readonly bool ManipulatesExec;
+    public readonly uint ExecIn;
 
-    public PushExpressionAttribute(StackTypes stackType, string expressionName, StackTypes additionalStackDependencies = default(StackTypes)) {
+    /// <summary>
+    /// Determines if the expression is visible to the user during the configuration phase for example.
+    /// </summary>
+    public readonly bool IsHidden;
+
+    public PushExpressionAttribute(
+      StackTypes stackType,
+      string expressionName,
+      StackTypes additionalStackDependencies = default(StackTypes),
+      uint execIn = 0,
+      bool isHidden = false) {
       StackType = stackType;
       AdditionalStackDependencies = additionalStackDependencies;
       ExpressionName = expressionName;
+      ExecIn = execIn;
+      IsHidden = isHidden;
       ManipulatesExec = stackType == StackTypes.Exec || AdditionalStackDependencies.HasFlag(StackTypes.Exec);
     }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/IReadonlyPushConfiguration.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/IReadonlyPushConfiguration.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/IReadonlyPushConfiguration.cs	(revision 15017)
@@ -11,11 +11,13 @@
     int MaxStringLength { get; }
     int MaxVectorLength { get; }
-    int MinPointsInProgram { get; }
     int MaxPointsInProgram { get; }
     int MaxPointsInRandomExpression { get; }
     bool TopLevelPushCode { get; }
     bool TopLevelPopCode { get; }
+    int MaxParenthesesClose { get; }
+    double ParenthesesCloseBiasLevel { get; }
     IReadOnlyErcOptions ErcOptions { get; }
     IReadOnlyList<string> EnabledExpressions { get; }
+    string FloatStringFormat { get; }
   }
 }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/PushConfiguration.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/PushConfiguration.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/PushConfiguration.cs	(revision 15017)
@@ -25,7 +25,10 @@
       TopLevelPopCode = false;
       MaxPointsInRandomExpression = 64;
-      MaxStringLength = 128;
-      MaxVectorLength = 64;
-      MaxDepth = 32;
+      MaxStringLength = 1000;
+      MaxVectorLength = 500;
+      MaxDepth = 100;
+      FloatStringFormat = "R";
+      MaxParenthesesClose = 4;
+      ParenthesesCloseBiasLevel = 1;
 
       InitEnabledStacks();
@@ -58,4 +61,7 @@
       MaxVectorLength = origin.MaxVectorLength;
       MaxDepth = origin.MaxDepth;
+      FloatStringFormat = origin.FloatStringFormat;
+      MaxParenthesesClose = origin.MaxParenthesesClose;
+      ParenthesesCloseBiasLevel = origin.ParenthesesCloseBiasLevel;
     }
 
@@ -67,4 +73,6 @@
     }
 
+    [Storable]
+    public string FloatStringFormat { get; set; }
 
     [Storable]
@@ -92,6 +100,11 @@
       }
     }
-
     IReadOnlyList<string> IReadOnlyPushConfiguration.EnabledExpressions { get { return enabledExpressions; } }
+
+    [Storable]
+    public int MaxParenthesesClose { get; set; }
+    [Storable]
+    public double ParenthesesCloseBiasLevel { get; set; }
+
 
     [Storable]
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/PushConfigurationBase.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/PushConfigurationBase.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/PushConfigurationBase.cs	(revision 15017)
@@ -0,0 +1,205 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace HeuristicLab.Problems.ProgramSynthesis.Push.Configuration {
+  using HeuristicLab.Common;
+  using HeuristicLab.Core;
+  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
+
+  [StorableClass]
+  public abstract class PushConfigurationBase : NamedItem, IEnabledExpressionsConfiguration {
+
+    protected PushConfigurationBase() {
+      Name = "Push Configuration";
+
+      enabledExpressions = ExpressionTable.ExpressionNames.ToList();
+      enabledStacks = new Dictionary<StackTypes, bool>();
+
+      InitEnabledStacks();
+    }
+
+    [StorableConstructor]
+    protected PushConfigurationBase(bool deserializing) : base(deserializing) { }
+
+    protected PushConfigurationBase(PushConfigurationBase origin, Cloner cloner) : base(origin, cloner) {
+      enabledExpressions = origin.EnabledExpressions.ToList();
+      enabledStacks = origin.EnabledStacks.ToDictionary(x => x.Key, x => x.Value);
+    }
+
+    [Storable]
+    private readonly Dictionary<StackTypes, bool> enabledStacks;
+
+    public IReadOnlyDictionary<StackTypes, bool> EnabledStacks { get { return enabledStacks; } }
+
+    public event EventHandler<EnabledExpressionsChangedEventArgs> EnabledExpressionsChanged;
+
+    [Storable]
+    protected readonly List<string> enabledExpressions;
+
+    public IList<string> EnabledExpressions
+    {
+      get { return enabledExpressions; }
+      set
+      {
+        var removedExpressions = enabledExpressions.ToArray();
+        enabledExpressions.Clear();
+        enabledExpressions.AddRange(value);
+
+        if (EnabledExpressionsChanged != null) {
+          EnabledExpressionsChanged(this, new EnabledExpressionsChangedEventArgs(value, removedExpressions));
+        }
+      }
+    }
+
+    private void InitEnabledStacks(bool state = true) {
+      foreach (StackTypes type in Enum.GetValues(typeof(StackTypes))) {
+        if (!enabledStacks.ContainsKey(type) && type != StackTypes.None)
+          enabledStacks.Add(type, state);
+      }
+    }
+
+    public void SetEnabledStacks(StackTypes types) {
+      // Disable all
+      EnabledExpressions.Clear();
+
+      foreach (StackTypes type in Enum.GetValues(types.GetType())) {
+        if (type == StackTypes.None) continue;
+        enabledStacks[type] = false;
+      }
+
+      foreach (var pair in ExpressionTable.StackDependencyToNamesTable) {
+        if (types.HasFlag(pair.Key)) {
+          foreach (var name in pair.Value) {
+            EnableExpression(name, true);
+          }
+        }
+      }
+    }
+
+    public void EnableExpressionOfStack(StackTypes types) {
+      EnableExpressions(ExpressionTable.StackTypeToNamesTable[types]);
+    }
+
+    public void EnableExpressionDependentOnStack(StackTypes types) {
+      var names = ExpressionTable.StackDependencyToNamesTable[types].Where(
+        name => {
+          var type = ExpressionTable.NameToTypeTable[name];
+          var attribute = ExpressionTable.TypeToAttributeTable[type];
+
+          return (attribute.StackType | attribute.AdditionalStackDependencies)
+            .ToEnumerable()
+            .All(st => enabledStacks.ContainsKey(st) && enabledStacks[st]);
+        });
+
+      EnableExpressions(names);
+    }
+
+    private void EnableExpressions(IEnumerable<string> names) {
+      foreach (var name in names.Except(EnabledExpressions))
+        EnabledExpressions.Add(name);
+
+      if (EnabledExpressionsChanged != null) {
+        EnabledExpressionsChanged(this, new EnabledExpressionsChangedEventArgs(names, new string[0]));
+      }
+    }
+
+    public void DisableExpressionsOfStack(StackTypes types) {
+      DisableExpressions(ExpressionTable.StackTypeToNamesTable[types]);
+    }
+
+    public void DisableExpressionsDependentOnStack(StackTypes types) {
+      var names = ExpressionTable.StackDependencyToNamesTable
+          .Where(pair => pair.Key.HasFlag(types))
+          .SelectMany(pair => pair.Value);
+
+      DisableExpressions(names);
+    }
+
+    private void DisableExpressions(IEnumerable<string> names) {
+      foreach (var name in names.Intersect(EnabledExpressions))
+        EnabledExpressions.Remove(name);
+
+      if (EnabledExpressionsChanged != null) {
+        EnabledExpressionsChanged(this, new EnabledExpressionsChangedEventArgs(new string[0], names));
+      }
+    }
+
+    public void EnableExpression(string name, bool enableStackIfDisabled = false) {
+      if (EnabledExpressions.Contains(name)) return;
+
+      EnabledExpressions.Add(name);
+
+      if (enableStackIfDisabled) {
+        var type = ExpressionTable.TypeToNameTable.Single(x => x.Value == name).Key;
+        var attribute = ExpressionTable.TypeToAttributeTable[type];
+        enabledStacks[attribute.StackType] = true;
+      }
+
+      if (EnabledExpressionsChanged != null) {
+        EnabledExpressionsChanged(this, new EnabledExpressionsChangedEventArgs(
+          new[] { name },
+          new string[0]));
+      }
+    }
+
+    public void DisableExpression(string name, bool disableStackIfEnabled = false) {
+      if (!EnabledExpressions.Contains(name)) return;
+
+      EnabledExpressions.Remove(name);
+
+      if (disableStackIfEnabled) {
+        var type = ExpressionTable.TypeToNameTable.Single(x => x.Value == name).Key;
+        var attribute = ExpressionTable.TypeToAttributeTable[type];
+        enabledStacks[attribute.StackType] = false;
+      }
+
+      if (EnabledExpressionsChanged != null) {
+        EnabledExpressionsChanged(this, new EnabledExpressionsChangedEventArgs(
+          new string[0],
+          new[] { name }));
+      }
+    }
+
+    public void EnableExpression<T>(bool enableStackIfDisabled = false) where T : Expression {
+      var attribute = ExpressionTable.TypeToAttributeTable[typeof(T)];
+      EnableExpression(attribute.ExpressionName, enableStackIfDisabled);
+    }
+
+    public void DisableExpression<T>(bool disableStackIfEnabled = false) where T : Expression {
+      var attribute = ExpressionTable.TypeToAttributeTable[typeof(T)];
+      DisableExpression(attribute.ExpressionName, disableStackIfEnabled);
+    }
+
+    public void SetExpression(string name, bool state, bool cascadeForStack = false) {
+      if (state) EnableExpression(name, cascadeForStack);
+      else DisableExpression(name, cascadeForStack);
+    }
+
+    public void SetExpression<T>(bool state, bool cascadeForStack = false) where T : Expression {
+      if (state) EnableExpression<T>(cascadeForStack);
+      else DisableExpression<T>(cascadeForStack);
+    }
+
+    public void EnableStack(StackTypes type, bool enableExpressions = true, bool enableDependencies = true) {
+      enabledStacks[type] = true;
+
+      if (enableExpressions) EnableExpressionOfStack(type);
+      if (enableDependencies) EnableExpressionDependentOnStack(type);
+    }
+
+    public void DisableStack(StackTypes type, bool disableExpressions = true, bool disableDependencies = true) {
+      enabledStacks[type] = false;
+
+      if (disableExpressions) DisableExpressionsOfStack(type);
+      if (disableDependencies) DisableExpressionsDependentOnStack(type);
+    }
+
+    public void SetStack(StackTypes type, bool state, bool setExpressions = true, bool setDependencies = true) {
+      if (state) EnableStack(type, setExpressions, setDependencies);
+      else DisableStack(type, setExpressions, setDependencies);
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/PushConfigurationParameterCollection.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/PushConfigurationParameterCollection.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/PushConfigurationParameterCollection.cs	(revision 15017)
@@ -0,0 +1,335 @@
+﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Configuration {
+  using System.Collections.Generic;
+
+  using HeuristicLab.Common;
+  using HeuristicLab.Core;
+  using HeuristicLab.Data;
+  using HeuristicLab.Parameters;
+  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc;
+
+  [StorableClass]
+  public class PushConfigurationParameterCollection : PushConfigurationBase, IReadOnlyPushConfiguration {
+    private const string InstructionsParameterName = "Instructions";
+    private const string InstructionsParameterDescription = "Enables/Disables Instructions";
+    private const string EvalPushLimitParameterName = "EvalPushLimit";
+    private const string EvalPushLimitParameterDescription = "This is the maximum allowed number of \"executions\" in a single top-level call to the interpreter. The execution of a single Push instruction counts as one execution, as does the processing of a single literal, as does the descent into one layer of parentheses (that is, the processing of the \"(\" counts as one execution).";
+    private const string MaxPointsInProgramParameterName = "MaxProgramLength";
+    private const string MaxProgramLengthParameterDescription = "This is the maximum size of an item on the CODE/EXEC stack, expressed as a number of points. A point is an instruction, a literal, or a pair of parentheses.";
+    private const string TopLevelPushCodeParameterName = "TopLevelPushCode";
+    private const string TopLevelPushCodeParameterDescription = "When TRUE (which is the default), code passed to the top level of the interpreter will be pushed onto the CODE stack prior to execution.";
+    private const string TopLevelPopCodeParameterName = "TopLevelPopCode";
+    private const string TopLevelPopCodeParameterDescription = "When TRUE, the CODE stack will be popped at the end of top level calls to the interpreter. The default is FALSE.";
+    private const string MaxPointsInRandomInstructionParameterName = "MaxPointsInRandomInstruction";
+    private const string MaxPointsInRandomInstructionParameterDescription = "MaxPointsInRandomInstruction";
+    private const string ErcOptionsParameterName = "ERC options";
+    private const string MaxStringLengthParameterName = "Max. string length";
+    private const string MaxDepthParameterName = "Max. program recursion";
+    private const string MaxParenthesesCloseParameterName = "Max. parentheses close";
+    private const string MaxParenthesesCloseParameterDescription = "Specifies how many sub programs are closed if open during the recursive translation of an individual to a push program. Value is exclusive.";
+    private const string ParenthesesCloseBiasLevelParameterName = "Parentheses close bias level";
+    private const string ParenthesesCloseBiasLevelParameterDescription = "Specifies how strong a random value between 0 .. 'Max. parentheses close' is biased towards 0. In other words, this parameter controls the length of sub programs.";
+    private const string MaxVectorLengthParameterName = "Max. vector length";
+
+    public PushConfigurationParameterCollection() {
+      Parameters = new ParameterCollection();
+
+      InitParameters();
+    }
+
+    public PushConfigurationParameterCollection(PushConfigurationParameterCollection origin, Cloner cloner) : base(origin, cloner) {
+      Parameters = cloner.Clone(origin.Parameters);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PushConfigurationParameterCollection(this, cloner);
+    }
+
+    [StorableConstructor]
+    protected PushConfigurationParameterCollection(bool deserialize) { }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    // ReSharper disable once UnusedMember.Local
+    private void AfterDeserialization() {
+      InitParameters();
+    }
+
+    [Storable]
+    public ParameterCollection Parameters { get; private set; }
+
+    [Storable]
+    public string FloatStringFormat { get; set; }
+
+    private void InitParameters() {
+      if (!Parameters.ContainsKey(InstructionsParameterName))
+        Parameters.Add(new ValueParameter<IEnabledExpressionsConfiguration>(
+          InstructionsParameterName,
+          InstructionsParameterDescription,
+          this));
+
+      if (!Parameters.ContainsKey(ErcOptionsParameterName))
+        Parameters.Add(new ValueParameter<ErcOptions>(ErcOptionsParameterName));
+
+      if (!Parameters.ContainsKey(MaxVectorLengthParameterName))
+        Parameters.Add(new FixedValueParameter<IntValue>(
+          MaxVectorLengthParameterName,
+          new IntValue(500)) { Hidden = true });
+
+      if (!Parameters.ContainsKey(EvalPushLimitParameterName))
+        Parameters.Add(new FixedValueParameter<IntValue>(
+          EvalPushLimitParameterName,
+          EvalPushLimitParameterDescription,
+          new IntValue(1000)));
+
+      if (!Parameters.ContainsKey(MaxPointsInProgramParameterName))
+        Parameters.Add(new FixedValueParameter<IntValue>(
+          MaxPointsInProgramParameterName,
+          MaxProgramLengthParameterDescription,
+          new IntValue(200)));
+
+      if (!Parameters.ContainsKey(MaxParenthesesCloseParameterName))
+        Parameters.Add(new FixedValueParameter<IntValue>(
+          MaxParenthesesCloseParameterName,
+          MaxParenthesesCloseParameterDescription,
+          new IntValue(4)) { Hidden = true });
+
+      if (!Parameters.ContainsKey(ParenthesesCloseBiasLevelParameterName))
+        Parameters.Add(new FixedValueParameter<DoubleValue>(
+          ParenthesesCloseBiasLevelParameterName,
+          ParenthesesCloseBiasLevelParameterDescription,
+          new DoubleValue(4)) { Hidden = true });
+
+      if (!Parameters.ContainsKey(TopLevelPushCodeParameterName))
+        Parameters.Add(new FixedValueParameter<BoolValue>(
+          TopLevelPushCodeParameterName,
+          TopLevelPushCodeParameterDescription,
+          new BoolValue(true)) { Hidden = true });
+
+      if (!Parameters.ContainsKey(TopLevelPopCodeParameterName))
+        Parameters.Add(new FixedValueParameter<BoolValue>(
+          TopLevelPopCodeParameterName,
+          TopLevelPopCodeParameterDescription,
+          new BoolValue(false)) { Hidden = true });
+
+      if (!Parameters.ContainsKey(MaxPointsInRandomInstructionParameterName))
+        Parameters.Add(new FixedValueParameter<IntValue>(
+          MaxPointsInRandomInstructionParameterName,
+          MaxPointsInRandomInstructionParameterDescription,
+          new IntValue(50)) { Hidden = true });
+
+      if (!Parameters.ContainsKey(MaxStringLengthParameterName))
+        Parameters.Add(new FixedValueParameter<IntValue>(
+          MaxStringLengthParameterName,
+          new IntValue(1000)) { Hidden = true });
+
+      if (!Parameters.ContainsKey(MaxDepthParameterName))
+        Parameters.Add(new FixedValueParameter<IntValue>(
+          MaxDepthParameterName,
+          new IntValue(1000)) { Hidden = true });
+    }
+
+    public IValueParameter<IEnabledExpressionsConfiguration> InstructionsParameter
+    {
+      get { return (IValueParameter<IEnabledExpressionsConfiguration>)Parameters[InstructionsParameterName]; }
+    }
+
+    public IEnabledExpressionsConfiguration Instructions
+    {
+      get { return InstructionsParameter.Value; }
+      set { InstructionsParameter.Value = value; }
+    }
+
+    public IValueParameter<ErcOptions> ErcOptionsParameter
+    {
+      get { return (IValueParameter<ErcOptions>)Parameters[ErcOptionsParameterName]; }
+    }
+
+    public ErcOptions ErcOptions
+    {
+      get { return ErcOptionsParameter.Value; }
+      set
+      {
+        ErcOptionsParameter.Value = value;
+      }
+    }
+
+    IReadOnlyList<string> IReadOnlyPushConfiguration.EnabledExpressions
+    {
+      get
+      {
+        return enabledExpressions;
+      }
+    }
+
+    IReadOnlyErcOptions IReadOnlyPushConfiguration.ErcOptions
+    {
+      get
+      {
+        return ErcOptions;
+      }
+    }
+
+    /// <summary>
+    ///     This is the maximum allowed number of "executions" in a single top-level call to the interpreter.
+    ///     The execution of a single Push instruction counts as one execution, as does the processing of a single literal,
+    ///     as does the descent into one layer of parentheses (that is, the processing of the "(" counts as one execution).
+    ///     When this limit is exceeded the interpreter aborts immediately, leaving its stacks in the states they were in prior
+    ///     to the abort (so they may still be examined by a calling program). Whether or not this counts as an "abnormal"
+    ///     termination
+    ///     is up to the calling program.
+    /// </summary>
+    public IValueParameter<IntValue> EvalPushLimitParameter
+    {
+      get { return (IValueParameter<IntValue>)Parameters[EvalPushLimitParameterName]; }
+    }
+
+    public int EvalPushLimit
+    {
+      get { return EvalPushLimitParameter.Value.Value; }
+      set { EvalPushLimitParameter.Value.Value = value; }
+    }
+
+
+    /// <summary>
+    /// This is the maximum of depth a push program can have. Expressions, which lead to exceed this limit are interpreted as NOOP.
+    /// </summary>
+    public IValueParameter<DoubleValue> ParenthesesCloseBiasLevelParameter
+    {
+      get { return (IValueParameter<DoubleValue>)Parameters[ParenthesesCloseBiasLevelParameterName]; }
+    }
+
+    public double ParenthesesCloseBiasLevel
+    {
+      get { return ParenthesesCloseBiasLevelParameter.Value.Value; }
+      set { ParenthesesCloseBiasLevelParameter.Value.Value = value; }
+    }
+
+    /// <summary>
+    /// This is the maximum of depth a push program can have. Expressions, which lead to exceed this limit are interpreted as NOOP.
+    /// </summary>
+    public IValueParameter<IntValue> MaxParenthesesCloseParameter
+    {
+      get { return (IValueParameter<IntValue>)Parameters[MaxParenthesesCloseParameterName]; }
+    }
+
+    public int MaxParenthesesClose
+    {
+      get { return MaxParenthesesCloseParameter.Value.Value; }
+      set
+      {
+        MaxParenthesesCloseParameter.Value.Value = value;
+      }
+    }
+
+    /// <summary>
+    /// This is the maximum of depth a push program can have. Expressions, which lead to exceed this limit are interpreted as NOOP.
+    /// </summary>
+    public IValueParameter<IntValue> MaxDepthParameter
+    {
+      get { return (IValueParameter<IntValue>)Parameters[MaxDepthParameterName]; }
+    }
+
+    public int MaxDepth
+    {
+      get { return MaxDepthParameter.Value.Value; }
+      set
+      {
+        MaxDepthParameter.Value.Value = value;
+      }
+    }
+
+    /// <summary>
+    ///     This is the maximum size of an item on the CODE stack, expressed as a number of points.
+    ///     A point is an instruction, a literal, or a pair of parentheses. Any instruction that would cause this limit to be
+    ///     exceeded should instead act as a NOOP, leaving all stacks in the states that they were in before the execution of the
+    ///     instruction.
+    /// </summary>
+    public IValueParameter<IntValue> MaxPointsInProgramParameter
+    {
+      get { return (IValueParameter<IntValue>)Parameters[MaxPointsInProgramParameterName]; }
+    }
+
+    public int MaxPointsInProgram
+    {
+      get { return MaxPointsInProgramParameter.Value.Value; }
+      set
+      {
+        MaxPointsInProgramParameter.Value.Value = value;
+      }
+    }
+
+    public IValueParameter<IntValue> MaxVectorLengthParameter
+    {
+      get { return (IValueParameter<IntValue>)Parameters[MaxVectorLengthParameterName]; }
+    }
+
+    public int MaxVectorLength
+    {
+      get { return MaxVectorLengthParameter.Value.Value; }
+      set { MaxVectorLengthParameter.Value.Value = value; }
+    }
+
+    /// <summary>
+    ///     The maximum number of points in an expression produced by the CODE.RAND instruction.
+    /// </summary>
+    public IValueParameter<IntValue> MaxPointsInRandomExpressionParameter
+    {
+      get { return (IValueParameter<IntValue>)Parameters[MaxPointsInRandomInstructionParameterName]; }
+    }
+
+    public int MaxPointsInRandomExpression
+    {
+      get { return MaxPointsInRandomExpressionParameter.Value.Value; }
+      set
+      {
+        MaxPointsInRandomExpressionParameter.Value.Value = value;
+      }
+    }
+
+    /// <summary>
+    ///     When TRUE (which is the default), code passed to the top level of the interpreter
+    ///     will be pushed onto the CODE stack prior to execution.
+    /// </summary>
+    public IValueParameter<BoolValue> TopLevelPushCodeParameter
+    {
+      get { return (IValueParameter<BoolValue>)Parameters[TopLevelPushCodeParameterName]; }
+    }
+
+    public bool TopLevelPushCode
+    {
+      get { return TopLevelPushCodeParameter.Value.Value; }
+      set
+      {
+        TopLevelPushCodeParameter.Value.Value = value;
+      }
+    }
+
+    /// <summary>
+    ///     When TRUE, the CODE stack will be popped at the end of top level calls to the interpreter. The default is FALSE.
+    /// </summary>
+    public IValueParameter<BoolValue> TopLevelPopCodeParameter
+    {
+      get { return (IValueParameter<BoolValue>)Parameters[TopLevelPopCodeParameterName]; }
+    }
+
+    public bool TopLevelPopCode
+    {
+      get { return TopLevelPopCodeParameter.Value.Value; }
+      set
+      {
+        TopLevelPopCodeParameter.Value.Value = value;
+      }
+    }
+
+    public IValueParameter<IntValue> MaxStringLengthParameter
+    {
+      get { return (IValueParameter<IntValue>)Parameters[MaxStringLengthParameterName]; }
+    }
+
+    public int MaxStringLength
+    {
+      get { return MaxStringLengthParameter.Value.Value; }
+      set { MaxStringLengthParameter.Value.Value = value; }
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Constants/Environment.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Constants/Environment.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Constants/Environment.cs	(revision 15017)
@@ -2,9 +2,19 @@
   public static class PushEnvironment {
     public const char VectorStartSymbol = '[';
+    public const string VectorStartSymbolStr = "[";
     public const char VectorEndSymbol = ']';
+    public const string VectorEndSymbolStr = "]";
     public const char VectorSeparatorSymbol = ' ';
+    public const string VectorSeparatorSymbolStr = " ";
 
-    public const char CharacterSymbol = '\'';
+    public const char ProgramStartSymbol = '(';
+    public const string ProgramStartSymbolStr = "(";
+    public const char ProgramEndSymbol = ')';
+    public const string ProgramEndSymbolStr = ")";
+
+    public const char CharSymbol = '\'';
     public const char StringSymbol = '\"';
+    public const string CharSymbolStr = "'";
+    public const string StringSymbolStr = "\"";
     public const string NewLine = "\n";
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Data/Pool/ManagedPoolProvider.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Data/Pool/ManagedPoolProvider.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Data/Pool/ManagedPoolProvider.cs	(revision 15017)
@@ -25,10 +25,10 @@
 
     public readonly int PartitionSize;
-    public readonly int MaxParitionCount;
+    public readonly int MaxPartitionCount;
     public const int DefaultMaxInstanceCount = 65536;
 
     public ManagedPoolProvider(int partitionSize, Func<T> factory, int? maxPartitionCount = null) {
       PartitionSize = partitionSize;
-      MaxParitionCount = maxPartitionCount ?? DefaultMaxInstanceCount / PartitionSize;
+      MaxPartitionCount = maxPartitionCount ?? DefaultMaxInstanceCount / PartitionSize;
       this.factory = factory;
 
@@ -50,6 +50,10 @@
     }
 
+    public void Clear() {
+      partitions.Clear();
+    }
+
     public void ReleasePartitions(List<T[]> releasedPartitions) {
-      if (partitions.Count < MaxParitionCount)
+      if (partitions.Count < MaxPartitionCount)
         partitions.PushRange((T[][])InternalListArrayProperty.GetValue(releasedPartitions), 0, releasedPartitions.Count);
     }
Index: anches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Data/Tree/Tree.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Data/Tree/Tree.cs	(revision 15016)
+++ 	(revision )
@@ -1,4 +1,0 @@
-﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Data.Tree {
-  public class Tree<T> : TreeNode<T> {
-  }
-}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Data/Tree/TreeExtensions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Data/Tree/TreeExtensions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Data/Tree/TreeExtensions.cs	(revision 15017)
@@ -8,9 +8,12 @@
 
   public static class TreeExtensions {
-    public static Tree<T> ToTree<T>(
+    private static readonly Expression ExecNoop = ExpressionTable.GetStatelessExpression<ExecNoopExpression>();
+    private static readonly Expression CodeNoop = ExpressionTable.GetStatelessExpression<CodeNoopExpression>();
+
+    public static TreeNode<T> ToTree<T>(
       this IEnumerable<T> items,
       Predicate<T> isChild,
       Func<T, IReadOnlyList<T>> childrenResolver) {
-      var tree = new Tree<T>();
+      var tree = new TreeNode<T>();
 
       foreach (var item in items) {
@@ -35,4 +38,6 @@
         } else yield return child;
       }
+
+      yield return node;
     }
 
@@ -46,5 +51,16 @@
     }
 
+    public static PushProgram ToPushProgramWithoutNoopExpressions(this TreeNode<Expression> tree) {
+      return ToPushProgram(tree, e => !ReferenceEquals(e, ExecNoop) && !ReferenceEquals(e, CodeNoop));
+    }
+
     public static PushProgram ToPushProgram(this TreeNode<Expression> tree, Func<Expression, bool> condition = null) {
+      // wrap into program as depthlast expects that tree represents program and not a single expression
+      if (tree.Count == 1) {
+        var tmp = tree;
+        tree = new TreeNode<Expression>();
+        tree.AddNode(tmp);
+      }
+
       var expressions = tree.DepthLast(e => ResolveProgram(e, condition));
 
@@ -52,5 +68,5 @@
     }
 
-    public static Tree<Expression> ToTree(this PushProgram program) {
+    public static TreeNode<Expression> ToTree(this PushProgram program) {
       var tree = program.Expressions.ToTree(e => e.IsProgram, e => ((PushProgram)e).Expressions);
       tree.Value = program;
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Data/Tree/TreeNode.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Data/Tree/TreeNode.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Data/Tree/TreeNode.cs	(revision 15017)
@@ -5,7 +5,9 @@
     public T Value { get; set; }
     public IList<TreeNode<T>> Children { get; private set; }
+    public int Count { get; private set; }
 
     public TreeNode() {
       Children = new List<TreeNode<T>>();
+      Count = 1;
     }
 
@@ -16,12 +18,16 @@
     public void Add(T value) {
       Children.Add(new TreeNode<T>(value));
+      Count++;
     }
 
     public void AddNode(TreeNode<T> node) {
       Children.Add(node);
+      Count += node.Count;
     }
 
     public void ReplaceNode(int index, TreeNode<T> node) {
+      Count -= Children[index].Count;
       Children[index] = node;
+      Count += node.Count;
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/BooleanExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/BooleanExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/BooleanExpressions.cs	(revision 15017)
@@ -29,5 +29,5 @@
       var result = second && first;
 
-      interpreter.BooleanStack.SetTop(result);
+      interpreter.BooleanStack.Top = result;
     }
   }
@@ -52,5 +52,5 @@
       var result = second || first;
 
-      interpreter.BooleanStack.SetTop(result);
+      interpreter.BooleanStack.Top = result;
     }
   }
@@ -71,5 +71,5 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
-      interpreter.BooleanStack.SetTop(!interpreter.BooleanStack.Top);
+      interpreter.BooleanStack.Top = !interpreter.BooleanStack.Top;
     }
   }
@@ -134,5 +134,5 @@
       var result = second && !first;
 
-      interpreter.BooleanStack.SetTop(result);
+      interpreter.BooleanStack.Top = result;
     }
   }
@@ -157,5 +157,5 @@
       var result = !second && first;
 
-      interpreter.BooleanStack.SetTop(result);
+      interpreter.BooleanStack.Top = result;
     }
   }
@@ -181,5 +181,5 @@
       var result = second ^ first;
 
-      interpreter.BooleanStack.SetTop(result);
+      interpreter.BooleanStack.Top = result;
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/CharExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/CharExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/CharExpressions.cs	(revision 15017)
@@ -1,4 +1,6 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
   using System;
+  using System.Linq;
+
   using Attributes;
   using Interpreter;
@@ -107,5 +109,5 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
-      var chars = interpreter.StringStack.Pop().ToCharArray();
+      var chars = interpreter.StringStack.Pop().Reverse().ToArray();
       interpreter.CharStack.Push(chars);
     }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/CodeExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/CodeExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/CodeExpressions.cs	(revision 15017)
@@ -12,4 +12,5 @@
 
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Extensions;
 
   using Interpreter;
@@ -185,5 +186,5 @@
       }
 
-      interpreter.CodeStack.SetTop(result);
+      interpreter.CodeStack.Top = result;
     }
   }
@@ -235,5 +236,5 @@
       var first = expand.Expressions[expand.Expressions.Count - 1];
 
-      interpreter.CodeStack.SetTop(first);
+      interpreter.CodeStack.Top = first;
     }
   }
@@ -270,5 +271,5 @@
 
 
-      interpreter.CodeStack.SetTop(result);
+      interpreter.CodeStack.Top = result;
     }
   }
@@ -304,5 +305,5 @@
       expressions.Add(interpreter.CodeStack.Top);
       var result = PushProgram.Create(interpreter.PoolContainer.PushProgramPool, expressions);
-      interpreter.CodeStack.SetTop(result);
+      interpreter.CodeStack.Top = result;
     }
   }
@@ -335,5 +336,5 @@
       var result = container ?? PushProgram.Empty;
 
-      interpreter.CodeStack.SetTop(result);
+      interpreter.CodeStack.Top = result;
     }
 
@@ -511,8 +512,8 @@
     public override void Eval(IInternalPushInterpreter interpreter) {
       var expression = (PushProgram)interpreter.CodeStack.Top;
-      var index = (int)Math.Abs(interpreter.IntegerStack.Pop() % expression.TotalCount);
+      var index = interpreter.IntegerStack.Pop().AsInt(expression.TotalCount);
       var result = expression.GetFromTree(index);
 
-      interpreter.CodeStack.SetTop(result);
+      interpreter.CodeStack.Top = result;
     }
   }
@@ -534,5 +535,6 @@
     public override void Eval(IInternalPushInterpreter interpreter) {
       var value = interpreter.BooleanStack.Pop();
-      var expression = new BooleanPushExpression(value);
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<BooleanPushExpression>();
+      var expression = BooleanPushExpression.Create(pool, value);
 
       interpreter.CodeStack.Push(expression);
@@ -556,5 +558,6 @@
     public override void Eval(IInternalPushInterpreter interpreter) {
       var value = interpreter.FloatStack.Pop();
-      var expression = new FloatPushExpression(value);
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<FloatPushExpression>();
+      var expression = FloatPushExpression.Create(pool, value);
 
       interpreter.CodeStack.Push(expression);
@@ -578,5 +581,6 @@
     public override void Eval(IInternalPushInterpreter interpreter) {
       var value = interpreter.IntegerStack.Pop();
-      var expression = new IntegerPushExpression(value);
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<IntegerPushExpression>();
+      var expression = IntegerPushExpression.Create(pool, value);
 
       interpreter.CodeStack.Push(expression);
@@ -626,9 +630,9 @@
       var source = interpreter.CodeStack[1];
       var target = (PushProgram)interpreter.CodeStack.Pop();
-      var index = (int)interpreter.IntegerStack.Pop();
 
       IList<Expression> newExpressions;
       if (!target.IsEmpty) {
-        index = target.Expressions.Count - 1 - Math.Abs(index % target.Expressions.Count);
+        var index = interpreter.IntegerStack.Pop().AsInt(target.Expressions.Count);
+        index = target.Expressions.Count - 1 - index;
         newExpressions = target.CopyExpressions(interpreter.PoolContainer.ExpressionListPool);
 
@@ -642,5 +646,5 @@
 
       var result = PushProgram.Create(interpreter.PoolContainer.PushProgramPool, newExpressions as IReadOnlyList<Expression>);
-      interpreter.CodeStack.SetTop(result);
+      interpreter.CodeStack.Top = result;
     }
   }
@@ -699,5 +703,5 @@
 
       var expandExpression = PushProgram.Create(interpreter.PoolContainer.PushProgramPool, expressions);
-      interpreter.CodeStack.SetTop(expandExpression);
+      interpreter.CodeStack.Top = expandExpression;
     }
   }
@@ -759,5 +763,5 @@
           nthExpression = PushProgram.Empty;
         } else {
-          var index = (int)(subExpression.Expressions.Count - 1 - Math.Abs(n % subExpression.Expressions.Count));
+          var index = (subExpression.Expressions.Count - 1 - n.AsInt(subExpression.Expressions.Count));
 
           nthExpression = subExpression.Expressions[index];
@@ -767,5 +771,5 @@
       }
 
-      interpreter.CodeStack.SetTop(nthExpression);
+      interpreter.CodeStack.Top = nthExpression;
     }
   }
@@ -802,5 +806,5 @@
           nthExpression = PushProgram.Empty;
         } else {
-          var index = (int)(subExpressions.Count - 2 - Math.Abs(n % (subExpressions.Count - 1)));
+          var index = subExpressions.Count - 2 - n.AsInt(subExpressions.Count - 1);
 
           nthExpression = subExpressions[index];
@@ -810,5 +814,5 @@
       }
 
-      interpreter.CodeStack.SetTop(nthExpression);
+      interpreter.CodeStack.Top = nthExpression;
     }
   }
@@ -929,5 +933,5 @@
 
       var result = PushProgram.Create(interpreter.PoolContainer.PushProgramPool, newExpressions);
-      interpreter.CodeStack.SetTop(result);
+      interpreter.CodeStack.Top = result;
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DefineExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DefineExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DefineExpressions.cs	(revision 15017)
@@ -48,9 +48,11 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<ExecPushExpression>();
+
       Eval(
         interpreter.CodeStack,
         interpreter.NameStack,
         interpreter.CustomExpressions,
-        v => new ExecPushExpression(v));
+        v => ExecPushExpression.Create(pool, v));
 
       interpreter.CodeStack.Pop();
@@ -58,5 +60,5 @@
   }
 
-  [PushExpression(StackTypes.Exec, "EXEC.DEFINE", StackTypes.Name)]
+  [PushExpression(StackTypes.Exec, "EXEC.DEFINE", StackTypes.Name, execIn: 1)]
   [StorableClass]
   public class ExecDefineExpression : DefineExpression<Expression> {
@@ -71,9 +73,11 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<ExecPushExpression>();
+
       Eval(
         interpreter.ExecStack,
         interpreter.NameStack,
         interpreter.CustomExpressions,
-        v => new ExecPushExpression(v));
+        v => ExecPushExpression.Create(pool, v));
 
       interpreter.ExecStack.Pop();
@@ -94,9 +98,11 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<FloatPushExpression>();
+
       Eval(
         interpreter.FloatStack,
         interpreter.NameStack,
         interpreter.CustomExpressions,
-        v => new FloatPushExpression(v));
+        v => FloatPushExpression.Create(pool, v));
     }
   }
@@ -115,9 +121,11 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<IntegerPushExpression>();
+
       Eval(
         interpreter.IntegerStack,
         interpreter.NameStack,
         interpreter.CustomExpressions,
-        v => new IntegerPushExpression(v));
+        v => IntegerPushExpression.Create(pool, v));
     }
   }
@@ -136,9 +144,11 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<BooleanPushExpression>();
+
       Eval(
         interpreter.BooleanStack,
         interpreter.NameStack,
         interpreter.CustomExpressions,
-        v => new BooleanPushExpression(v));
+        v => BooleanPushExpression.Create(pool, v));
     }
   }
@@ -157,9 +167,11 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<CharPushExpression>();
+
       Eval(
         interpreter.CharStack,
         interpreter.NameStack,
         interpreter.CustomExpressions,
-        v => new CharPushExpression(v));
+        v => CharPushExpression.Create(pool, v));
     }
   }
@@ -178,9 +190,11 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<StringPushExpression>();
+
       Eval(
         interpreter.StringStack,
         interpreter.NameStack,
         interpreter.CustomExpressions,
-        v => new StringPushExpression(v));
+        v => StringPushExpression.Create(pool, v));
     }
   }
@@ -188,5 +202,5 @@
   [PushExpression(StackTypes.IntegerVector, "INTEGER[].DEFINE", StackTypes.Name)]
   [StorableClass]
-  public class IntegerVectorDefineExpression : DefineExpression<List<long>> {
+  public class IntegerVectorDefineExpression : DefineExpression<IReadOnlyList<long>> {
     public IntegerVectorDefineExpression() { }
     [StorableConstructor]
@@ -199,9 +213,11 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<IntegerVectorPushExpression>();
+
       Eval(
         interpreter.IntegerVectorStack,
         interpreter.NameStack,
         interpreter.CustomExpressions,
-        v => new IntegerVectorPushExpression(v));
+        v => IntegerVectorPushExpression.Create(pool, v));
     }
   }
@@ -209,5 +225,5 @@
   [PushExpression(StackTypes.FloatVector, "FLOAT[].DEFINE", StackTypes.Name)]
   [StorableClass]
-  public class FloatVectorDefineExpression : DefineExpression<List<double>> {
+  public class FloatVectorDefineExpression : DefineExpression<IReadOnlyList<double>> {
     public FloatVectorDefineExpression() { }
     [StorableConstructor]
@@ -220,9 +236,11 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<FloatVectorPushExpression>();
+
       Eval(
         interpreter.FloatVectorStack,
         interpreter.NameStack,
         interpreter.CustomExpressions,
-        v => new FloatVectorPushExpression(v));
+        v => FloatVectorPushExpression.Create(pool, v));
     }
   }
@@ -230,5 +248,5 @@
   [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].DEFINE", StackTypes.Name)]
   [StorableClass]
-  public class BooleanVectorDefineExpression : DefineExpression<List<bool>> {
+  public class BooleanVectorDefineExpression : DefineExpression<IReadOnlyList<bool>> {
     public BooleanVectorDefineExpression() { }
     [StorableConstructor]
@@ -241,9 +259,11 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<BooleanVectorPushExpression>();
+
       Eval(
         interpreter.BooleanVectorStack,
         interpreter.NameStack,
         interpreter.CustomExpressions,
-        v => new BooleanVectorPushExpression(v));
+        v => BooleanVectorPushExpression.Create(pool, v));
     }
   }
@@ -251,5 +271,5 @@
   [PushExpression(StackTypes.StringVector, "STRING[].DEFINE", StackTypes.Name)]
   [StorableClass]
-  public class StringVectorDefineExpression : DefineExpression<List<string>> {
+  public class StringVectorDefineExpression : DefineExpression<IReadOnlyList<string>> {
     public StringVectorDefineExpression() { }
     [StorableConstructor]
@@ -262,9 +282,11 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<BooleanVectorPushExpression>();
+
       Eval(
         interpreter.StringVectorStack,
         interpreter.NameStack,
         interpreter.CustomExpressions,
-        v => new StringVectorPushExpression(v));
+        v => StringVectorPushExpression.Create(pool, v));
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DoCountExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DoCountExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DoCountExpressions.cs	(revision 15017)
@@ -1,111 +1,69 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
   using System;
+  using Attributes;
+  using Interpreter;
+  using Persistence.Default.CompositeSerializers.Storable;
+  using Stack;
 
-  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
-
+  /// <summary>
+  /// An iteration instruction that performs a loop (the body of which is taken from the CODE stack) the number of times
+  /// indicated by the INTEGER argument, pushing an index (which runs from zero to one less than the number of iterations) onto the
+  /// INTEGER stack prior to each execution of the loop body. This should be implemented as a macro that expands into a call to
+  /// CODE.DO*RANGE. CODE.DO*COUNT takes a single INTEGER argument (the number of times that the loop will be executed) and a single
+  /// CODE argument (the body of the loop). If the provided INTEGER argument is negative or zero then this becomes a NOOP. Otherwise it
+  /// expands into: ( 0 '1 - IntegerArg>' CODE.QUOTE 'CodeArg' CODE.DO*RANGE )
+  /// </summary>
   [Serializable]
   [StorableClass]
-  public abstract class DoCountExpression : LoopExpression {
+  [PushExpression(StackTypes.Code, "CODE.DO*COUNT", StackTypes.Integer)]
+  public class CodeDoCountExpression : StatelessExpression {
 
-    protected DoCountExpression() { }
-    protected DoCountExpression(LoopState state) : base(state) { }
+    public CodeDoCountExpression() { }
     [StorableConstructor]
-    protected DoCountExpression(bool deserializing) : base(deserializing) { }
-    protected override bool HasInsufficientArguments(IInternalPushInterpreter interpreter, IPushStack<Expression> sourceStack) {
-      return interpreter.IntegerStack.Count < 1 ||
-             sourceStack.Count == 0 ||
-             interpreter.IntegerStack.Top <= 0;
+    protected CodeDoCountExpression(bool deserializing) : base(deserializing) { }
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      var destinationIndex = interpreter.IntegerStack.Top;
+      interpreter.IntegerStack.Top = 0;
+      interpreter.IntegerStack.Push(destinationIndex);
+
+      interpreter.ExecStack.Push(ExpressionTable.GetStatelessExpression<CodeDoRangeExpression>());
     }
 
-    protected override LoopState InitState(IInternalPushInterpreter interpreter, IPushStack<Expression> sourceStack) {
-      var state = LoopState.Create(interpreter.PoolContainer.LoopStatePool,
-        body: sourceStack.Pop(),
-        currentIndex: 1,
-        destinationIndex: interpreter.IntegerStack.Top,
-        incrementor: 1);
-
-      interpreter.IntegerStack.SetTop(0);
-
-      return state;
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.IntegerStack.IsEmpty ||
+             interpreter.IntegerStack.Top < 1 ||
+             interpreter.CodeStack.IsEmpty;
     }
   }
 
   /// <summary>
-  ///     An iteration instruction that performs a loop (the body of which is taken from the CODE stack) the number of times
-  ///     indicated by
-  ///     the INTEGER argument, pushing an index (which runs from zero to one less than the number of iterations) onto the
-  ///     INTEGER stack
-  ///     prior to each execution of the loop body. This should be implemented as a macro that expands into a call to
-  ///     CODE.DO*RANGE.
-  ///     CODE.DO*COUNT takes a single INTEGER argument (the number of times that the loop will be executed) and a single
-  ///     CODE argument
-  ///     (the body of the loop). If the provided INTEGER argument is negative or zero then this becomes a NOOP. Otherwise it
-  ///     expands into:
-  ///     ( 0 '1 - IntegerArg>' CODE.QUOTE 'CodeArg' CODE.DO*RANGE )
+  /// An iteration instruction that performs a loop (the body of which is taken from the EXEC stack) the number of times
+  /// indicated by the INTEGER argument, pushing an index (which runs from zero to one less than the number of iterations) onto the
+  /// INTEGER stack prior to each execution of the loop body. This is similar to CODE.DO*COUNT except that it takes its code
+  /// argument from the EXEC stack. This should be implemented as a macro that expands into a call to EXEC.DO*RANGE. EXEC.DO*COUNT
+  /// takes a single INTEGER argument (the number of times that the loop will be executed) and a single EXEC argument (the body of the
+  /// loop). If the provided INTEGER argument is negative or zero then this becomes a NOOP. Otherwise it expands into:
+  /// ( 0 '1 - IntegerArg' EXEC.DO* RANGE'ExecArg' )
   /// </summary>
   [Serializable]
   [StorableClass]
-  [PushExpression(StackTypes.Code, "CODE.DO*COUNT", StackTypes.Integer)]
-  public class CodeDoCountExpression : DoCountExpression {
-
-    public CodeDoCountExpression() { }
-    public CodeDoCountExpression(LoopState state) : base(state) { }
-    [StorableConstructor]
-    protected CodeDoCountExpression(bool deserializing) : base(deserializing) { }
-    public override bool IsNoop(IInternalPushInterpreter interpreter) {
-      return State.Body == null && HasInsufficientArguments(interpreter, interpreter.CodeStack);
-    }
-
-    public override void Eval(IInternalPushInterpreter interpreter) {
-      Eval(interpreter, interpreter.CodeStack);
-    }
-
-    protected override LoopExpression Clone(LoopState state, IInternalPushInterpreter interpreter) {
-      var expression = interpreter.PoolContainer.GetStatefulExpression<CodeDoCountExpression>();
-      expression.State = state;
-
-      return expression;
-    }
-  }
-
-  /// <summary>
-  ///     An iteration instruction that performs a loop (the body of which is taken from the EXEC stack) the number of times
-  ///     indicated
-  ///     by the INTEGER argument, pushing an index (which runs from zero to one less than the number of iterations) onto the
-  ///     INTEGER
-  ///     stack prior to each execution of the loop body. This is similar to CODE.DO*COUNT except that it takes its code
-  ///     argument from
-  ///     the EXEC stack. This should be implemented as a macro that expands into a call to EXEC.DO*RANGE. EXEC.DO*COUNT
-  ///     takes a single
-  ///     INTEGER argument (the number of times that the loop will be executed) and a single EXEC argument (the body of the
-  ///     loop). If
-  ///     the provided INTEGER argument is negative or zero then this becomes a NOOP. Otherwise it expands into:
-  ///     ( 0 '1 - IntegerArg' EXEC.DO* RANGE'ExecArg' )
-  /// </summary>
-  [Serializable]
-  [StorableClass]
-  [PushExpression(StackTypes.Exec, "EXEC.DO*COUNT", StackTypes.Integer)]
-  public class ExecDoCountExpression : DoCountExpression {
+  [PushExpression(StackTypes.Exec, "EXEC.DO*COUNT", StackTypes.Integer, execIn: 1)]
+  public class ExecDoCountExpression : StatelessExpression {
     public ExecDoCountExpression() { }
-    public ExecDoCountExpression(LoopState state) : base(state) { }
     [StorableConstructor]
     protected ExecDoCountExpression(bool deserializing) : base(deserializing) { }
 
     public override void Eval(IInternalPushInterpreter interpreter) {
-      Eval(interpreter, interpreter.ExecStack);
+      var destinationIndex = interpreter.IntegerStack.Top;
+      interpreter.IntegerStack.Top = 0;
+      interpreter.IntegerStack.Push(destinationIndex);
+
+      interpreter.ExecStack.Push(ExpressionTable.GetStatelessExpression<ExecDoRangeExpression>());
     }
 
     public override bool IsNoop(IInternalPushInterpreter interpreter) {
-      return State.Body == null && HasInsufficientArguments(interpreter, interpreter.ExecStack);
-    }
-
-    protected override LoopExpression Clone(LoopState state, IInternalPushInterpreter interpreter) {
-      var expression = interpreter.PoolContainer.GetStatefulExpression<ExecDoCountExpression>();
-      expression.State = state;
-
-      return expression;
+      return interpreter.IntegerStack.IsEmpty ||
+             interpreter.IntegerStack.Top < 1 ||
+             interpreter.ExecStack.IsEmpty;
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DoRangeExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DoRangeExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DoRangeExpressions.cs	(revision 15017)
@@ -1,82 +1,58 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
   using System;
-
   using Attributes;
-
-  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
   using Interpreter;
+  using Persistence.Default.CompositeSerializers.Storable;
   using Stack;
 
-  [Serializable]
-  [StorableClass]
-  public abstract class DoRangeExpression : LoopExpression {
-    protected DoRangeExpression() { }
-    protected DoRangeExpression(LoopState state) : base(state) { }
-    [StorableConstructor]
-    protected DoRangeExpression(bool deserializing) : base(deserializing) { }
-
-    protected override bool HasInsufficientArguments(IInternalPushInterpreter interpreter, IPushStack<Expression> sourceStack) {
-      return interpreter.IntegerStack.Count < 2 ||
-             sourceStack.Count == 0 ||
-             interpreter.IntegerStack.Top == interpreter.IntegerStack[1];
-    }
-
-    protected override LoopState InitState(IInternalPushInterpreter interpreter, IPushStack<Expression> sourceStack) {
-      var destinationIndex = interpreter.IntegerStack.Pop();
-      var incrementor = destinationIndex < interpreter.IntegerStack.Top ? -1 : 1;
-
-      return LoopState.Create(interpreter.PoolContainer.LoopStatePool,
-          body: sourceStack.Pop(),
-          currentIndex: interpreter.IntegerStack.Top + incrementor,
-          destinationIndex: destinationIndex,
-          incrementor: incrementor);
-    }
-  }
-
   /// <summary>
-  ///     An iteration instruction that executes the top item on the CODE stack a number of times that depends on the
-  ///     top two integers, while also pushing the loop counter onto the INTEGER stack for possible access during the
-  ///     execution of
-  ///     the body of the loop. The top integer is the "destination index" and the second integer is the "current index."
-  ///     Last the code
-  ///     and the integer arguments are saved locally and popped. Then the integers are compared. If the integers are equal
-  ///     then the current
-  ///     index is pushed onto the INTEGER stack and the code (which is the "body" of the loop) is pushed onto the EXEC stack
-  ///     for subsequent
-  ///     execution. If the integers are not equal then the current index will still be pushed onto the INTEGER stack but two
-  ///     items will be
-  ///     pushed onto the EXEC stack -- first a recursive call to CODE.DO*RANGE (with the same code and destination index,
-  ///     but with a current
-  ///     index that has been either incremented or decremented by 1 to be closer to the destination index) and then the body
-  ///     code. Note that
-  ///     the range is inclusive of both endpoints; a call with integer arguments 3 and 5 will cause its body to be executed
-  ///     3 times, with the
-  ///     loop counter having the values 3, 4, and 5. Note also that one can specify a loop that "counts down" by providing a
-  ///     destination index
-  ///     that is less than the specified current index.
+  /// An iteration instruction that executes the top item on the CODE stack a number of times that depends on the
+  /// top two integers, while also pushing the loop counter onto the INTEGER stack for possible access during the
+  /// execution of the body of the loop. The top integer is the "destination index" and the second integer is the "current index."
+  /// Last the code and the integer arguments are saved locally and popped. Then the integers are compared. If the integers are equal
+  /// then the current index is pushed onto the INTEGER stack and the code (which is the "body" of the loop) is pushed onto the EXEC stack
+  /// for subsequent execution. If the integers are not equal then the current index will still be pushed onto the INTEGER stack but two
+  /// items will be pushed onto the EXEC stack -- first a recursive call to CODE.DO*RANGE (with the same code and destination index,
+  /// but with a current index that has been either incremented or decremented by 1 to be closer to the destination index) and then the body
+  /// code. Note that the range is inclusive of both endpoints; a call with integer arguments 3 and 5 will cause its body to be executed
+  /// 3 times, with the loop counter having the values 3, 4, and 5. Note also that one can specify a loop that "counts down" by providing a
+  /// destination index that is less than the specified current index.
   /// </summary>
   [Serializable]
   [StorableClass]
   [PushExpression(StackTypes.Code, "CODE.DO*RANGE", StackTypes.Integer)]
-  public class CodeDoRangeExpression : DoRangeExpression {
+  public class CodeDoRangeExpression : StatelessExpression {
     public CodeDoRangeExpression() { }
-    public CodeDoRangeExpression(LoopState state) : base(state) { }
     [StorableConstructor]
     protected CodeDoRangeExpression(bool deserializing) : base(deserializing) { }
 
     public override bool IsNoop(IInternalPushInterpreter interpreter) {
-      return State.Body == null && HasInsufficientArguments(interpreter, interpreter.CodeStack);
+      return interpreter.IntegerStack.Count < 2 || interpreter.CodeStack.IsEmpty;
     }
 
     public override void Eval(IInternalPushInterpreter interpreter) {
-      Eval(interpreter, interpreter.CodeStack);
-    }
+      var toDo = interpreter.CodeStack.Pop();
+      var currentIndex = interpreter.IntegerStack[1];
+      var destinationIndex = interpreter.IntegerStack[0];
 
-    protected override LoopExpression Clone(LoopState state, IInternalPushInterpreter interpreter) {
-      var expression = interpreter.PoolContainer.GetStatefulExpression<CodeDoRangeExpression>();
-      expression.State = state;
+      interpreter.IntegerStack.Pop();
 
-      return expression;
+      if (currentIndex != destinationIndex) {
+
+        var incrementor = currentIndex < destinationIndex ? 1 : -1;
+        var continuation = interpreter.PoolContainer.ExpressionListPool.Get();
+        var pool = interpreter.PoolContainer.GetStatefulExpressionPool<IntegerPushExpression>();
+
+        continuation.Add(this);
+        continuation.Add(toDo);
+        continuation.Add(ExpressionTable.GetStatelessExpression<CodeQuoteExpression>());
+        continuation.Add(IntegerPushExpression.Create(pool, destinationIndex));
+        continuation.Add(IntegerPushExpression.Create(pool, currentIndex + incrementor));
+
+        var program = PushProgram.Create(interpreter.PoolContainer.PushProgramPool, continuation);
+        interpreter.ExecStack.Push(program);
+      }
+
+      interpreter.ExecStack.Push(toDo);
     }
   }
@@ -84,48 +60,50 @@
   /// <summary>
   ///     An iteration instruction that executes the top item on the EXEC stack a number of times that depends on the top two
-  ///     integers,
-  ///     while also pushing the loop counter onto the INTEGER stack for possible access during the execution of the body of
-  ///     the loop.
-  ///     This is similar to CODE.DO*COUNT except that it takes its code argument from the EXEC stack. The top integer is the
+  ///     integers, while also pushing the loop counter onto the INTEGER stack for possible access during the execution of the body of
+  ///     the loop. This is similar to CODE.DO*COUNT except that it takes its code argument from the EXEC stack. The top integer is the
   ///     "destination index" and the second integer is the "current index." Last the code and the integer arguments are
-  ///     saved locally
-  ///     and popped. Then the integers are compared. If the integers are equal then the current index is pushed onto the
-  ///     INTEGER stack
-  ///     and the code (which is the "body" of the loop) is pushed onto the EXEC stack for subsequent execution. If the
-  ///     integers are not
-  ///     equal then the current index will still be pushed onto the INTEGER stack but two items will be pushed onto the EXEC
-  ///     stack
-  ///     -- first a recursive call to EXEC.DO*RANGE (with the same code and destination index, but with a current index that
-  ///     has been
-  ///     either incremented or decremented by 1 to be closer to the destination index) and then the body code. Note that the
-  ///     range is
-  ///     inclusive of both endpoints; a call with integer arguments 3 and 5 will cause its body to be executed 3 times, with
-  ///     the loop
-  ///     counter having the values 3, 4, and 5. Note also that one can specify a loop that "counts down" by providing a
-  ///     destination
-  ///     index that is less than the specified current index.
+  ///     saved locally and popped. Then the integers are compared. If the integers are equal then the current index is pushed onto the
+  ///     INTEGER stack and the code (which is the "body" of the loop) is pushed onto the EXEC stack for subsequent execution. If the
+  ///     integers are not equal then the current index will still be pushed onto the INTEGER stack but two items will be pushed onto the EXEC
+  ///     stack -- first a recursive call to EXEC.DO*RANGE (with the same code and destination index, but with a current index that
+  ///     has been either incremented or decremented by 1 to be closer to the destination index) and then the body code. Note that the
+  ///     range is inclusive of both endpoints; a call with integer arguments 3 and 5 will cause its body to be executed 3 times, with
+  ///     the loop counter having the values 3, 4, and 5. Note also that one can specify a loop that "counts down" by providing a
+  ///     destination index that is less than the specified current index.
   /// </summary>
   [Serializable]
   [StorableClass]
-  [PushExpression(StackTypes.Exec, "EXEC.DO*RANGE", StackTypes.Integer)]
-  public class ExecDoRangeExpression : DoRangeExpression {
+  [PushExpression(StackTypes.Exec, "EXEC.DO*RANGE", StackTypes.Integer, execIn: 1)]
+  public class ExecDoRangeExpression : StatelessExpression {
     public ExecDoRangeExpression() { }
 
-    public ExecDoRangeExpression(LoopState state) : base(state) { }
     [StorableConstructor]
     protected ExecDoRangeExpression(bool deserializing) : base(deserializing) { }
 
     public override bool IsNoop(IInternalPushInterpreter interpreter) {
-      return State.Body == null && HasInsufficientArguments(interpreter, interpreter.ExecStack);
+      return interpreter.IntegerStack.Count < 2 || interpreter.ExecStack.IsEmpty;
     }
 
     public override void Eval(IInternalPushInterpreter interpreter) {
-      Eval(interpreter, interpreter.ExecStack);
-    }
-    protected override LoopExpression Clone(LoopState state, IInternalPushInterpreter interpreter) {
-      var expression = interpreter.PoolContainer.GetStatefulExpression<ExecDoRangeExpression>();
-      expression.State = state;
+      var currentIndex = interpreter.IntegerStack[1];
+      var destinationIndex = interpreter.IntegerStack[0];
 
-      return expression;
+      interpreter.IntegerStack.Pop();
+
+      if (currentIndex == destinationIndex)
+        return;
+
+      var toDo = interpreter.ExecStack.Top;
+      var incrementor = currentIndex < destinationIndex ? 1 : -1;
+      var continuation = interpreter.PoolContainer.ExpressionListPool.Get();
+      var pool = interpreter.PoolContainer.GetStatefulExpressionPool<IntegerPushExpression>();
+
+      continuation.Add(toDo);
+      continuation.Add(this);
+      continuation.Add(IntegerPushExpression.Create(pool, destinationIndex));
+      continuation.Add(IntegerPushExpression.Create(pool, currentIndex + incrementor));
+
+      interpreter.ExecStack.Top = PushProgram.Create(interpreter.PoolContainer.PushProgramPool, continuation);
+      interpreter.ExecStack.Push(toDo);
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DoTimesExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DoTimesExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DoTimesExpressions.cs	(revision 15017)
@@ -1,41 +1,8 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
   using System;
-
-  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
-
-  [Serializable]
-  [StorableClass]
-  public abstract class DoTimesExpression : LoopExpression {
-    protected DoTimesExpression() { }
-    protected DoTimesExpression(LoopState state) : base(state) { }
-    [StorableConstructor]
-    protected DoTimesExpression(bool deserializing) : base(deserializing) { }
-
-    protected override bool HasInsufficientArguments(IInternalPushInterpreter interpreter, IPushStack<Expression> sourceStack) {
-      return (interpreter.IntegerStack.Count < 1) || (sourceStack.Count == 0) || (interpreter.IntegerStack.Top <= 0);
-    }
-
-    protected override LoopState InitState(IInternalPushInterpreter interpreter, IPushStack<Expression> sourceStack) {
-      return LoopState.Create(interpreter.PoolContainer.LoopStatePool,
-        body: sourceStack.Pop(),
-        currentIndex: 1,
-        destinationIndex: interpreter.IntegerStack.Pop(),
-        incrementor: 1);
-    }
-
-    protected override void PushIteration(IInternalPushInterpreter interpreter) {
-      var newState = LoopState.Create(interpreter.PoolContainer.LoopStatePool, State.Body, State.CurrentIndex + State.Incrementor, State.DestinationIndex, State.Incrementor);
-      var nextLoopExpression = Clone(newState, interpreter);
-
-      interpreter.ExecStack.Push(nextLoopExpression, State.Body);
-    }
-
-    protected override void PushLastIteration(IInternalPushInterpreter interpreter) {
-      interpreter.ExecStack.Push(State.Body);
-    }
-  }
+  using Attributes;
+  using Interpreter;
+  using Persistence.Default.CompositeSerializers.Storable;
+  using Stack;
 
   /// <summary>
@@ -48,22 +15,46 @@
   [StorableClass]
   [PushExpression(StackTypes.Code, "CODE.DO*TIMES", StackTypes.Integer)]
-  public class CodeDoTimesExpression : DoTimesExpression {
+  public class CodeDoTimesExpression : StatelessExpression {
     public CodeDoTimesExpression() { }
-    public CodeDoTimesExpression(LoopState state) : base(state) { }
     [StorableConstructor]
     protected CodeDoTimesExpression(bool deserializing) : base(deserializing) { }
 
     public override void Eval(IInternalPushInterpreter interpreter) {
-      Eval(interpreter, interpreter.CodeStack);
-    }
-    public override bool IsNoop(IInternalPushInterpreter interpreter) {
-      return State.Body == null && HasInsufficientArguments(interpreter, interpreter.CodeStack);
+      var destinationIndex = Math.Max(0, interpreter.IntegerStack.Top - 1);
+
+      if (destinationIndex == 0) {
+        interpreter.IntegerStack.Pop();
+        interpreter.ExecStack.Push((PushProgram)interpreter.CodeStack.Pop());
+        return;
+      }
+
+      interpreter.IntegerStack.Top = 0;
+      interpreter.IntegerStack.Push(destinationIndex);
+
+      var popExpressions = ExpressionTable.GetStatelessExpression<IntegerPopExpression>();
+      PushProgram program;
+
+      if (!interpreter.CodeStack.Top.IsProgram) {
+        var expressions = interpreter.PoolContainer.ExpressionListPool.Get();
+        expressions.Add(interpreter.ExecStack.Top);
+        expressions.Add(popExpressions);
+
+        program = PushProgram.Create(interpreter.PoolContainer.PushProgramPool, expressions);
+      } else {
+        program = PushProgram.Merge(
+          interpreter.PoolContainer.PushProgramPool,
+          interpreter.PoolContainer.ExpressionListPool,
+          (PushProgram)interpreter.CodeStack.Top,
+          popExpressions);
+      }
+
+      interpreter.CodeStack.Top = program;
+      interpreter.ExecStack.Push(ExpressionTable.GetStatelessExpression<CodeDoRangeExpression>());
     }
 
-    protected override LoopExpression Clone(LoopState state, IInternalPushInterpreter interpreter) {
-      var expression = interpreter.PoolContainer.GetStatefulExpression<CodeDoTimesExpression>();
-      expression.State = state;
-
-      return expression;
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.IntegerStack.IsEmpty ||
+             interpreter.IntegerStack.Top < 0 ||
+             interpreter.CodeStack.IsEmpty;
     }
   }
@@ -80,24 +71,46 @@
   [Serializable]
   [StorableClass]
-  [PushExpression(StackTypes.Exec, "EXEC.DO*TIMES", StackTypes.Integer)]
-  public class ExecDoTimesExpression : DoTimesExpression {
+  [PushExpression(StackTypes.Exec, "EXEC.DO*TIMES", StackTypes.Integer, execIn: 1)]
+  public class ExecDoTimesExpression : StatelessExpression {
     public ExecDoTimesExpression() { }
-    public ExecDoTimesExpression(LoopState state) : base(state) { }
     [StorableConstructor]
     protected ExecDoTimesExpression(bool deserializing) : base(deserializing) { }
 
     public override void Eval(IInternalPushInterpreter interpreter) {
-      Eval(interpreter, interpreter.ExecStack);
+      var destinationIndex = Math.Max(0, interpreter.IntegerStack.Top - 1);
+
+      if (destinationIndex == 0) {
+        interpreter.IntegerStack.Pop();
+        return;
+      }
+
+      interpreter.IntegerStack.Top = 0;
+      interpreter.IntegerStack.Push(destinationIndex);
+
+      var popExpressions = ExpressionTable.GetStatelessExpression<IntegerPopExpression>();
+      PushProgram program;
+
+      if (!interpreter.ExecStack.Top.IsProgram) {
+        var expressions = interpreter.PoolContainer.ExpressionListPool.Get();
+        expressions.Add(interpreter.ExecStack.Top);
+        expressions.Add(popExpressions);
+
+        program = PushProgram.Create(interpreter.PoolContainer.PushProgramPool, expressions);
+      } else {
+        program = PushProgram.Merge(
+          interpreter.PoolContainer.PushProgramPool,
+          interpreter.PoolContainer.ExpressionListPool,
+          (PushProgram)interpreter.ExecStack.Top,
+          popExpressions);
+      }
+
+      interpreter.ExecStack.Top = program;
+      interpreter.ExecStack.Push(ExpressionTable.GetStatelessExpression<ExecDoRangeExpression>());
     }
 
     public override bool IsNoop(IInternalPushInterpreter interpreter) {
-      return State.Body == null && HasInsufficientArguments(interpreter, interpreter.ExecStack);
-    }
-
-    protected override LoopExpression Clone(LoopState state, IInternalPushInterpreter interpreter) {
-      var expression = interpreter.PoolContainer.GetStatefulExpression<ExecDoTimesExpression>();
-      expression.State = state;
-
-      return expression;
+      return interpreter.IntegerStack.IsEmpty ||
+             interpreter.IntegerStack.Top < 0 ||
+             interpreter.ExecStack.IsEmpty;
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DuplicateExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DuplicateExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DuplicateExpressions.cs	(revision 15017)
@@ -88,5 +88,5 @@
 
   [StorableClass]
-  [PushExpression(StackTypes.Exec, "EXEC.DUP")]
+  [PushExpression(StackTypes.Exec, "EXEC.DUP", execIn: 1)]
   public class ExecDuplicateExpression : DuplicateExpression<Expression> {
     public ExecDuplicateExpression() { }
@@ -120,6 +120,38 @@
 
   [StorableClass]
+  [PushExpression(StackTypes.Char, "CHAR.DUP")]
+  public class CharDuplicateExpression : DuplicateExpression<char> {
+    public CharDuplicateExpression() { }
+    [StorableConstructor]
+    protected CharDuplicateExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.CharStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.CharStack);
+    }
+  }
+
+  [StorableClass]
+  [PushExpression(StackTypes.String, "STRING.DUP")]
+  public class StringDuplicateExpression : DuplicateExpression<string> {
+    public StringDuplicateExpression() { }
+    [StorableConstructor]
+    protected StringDuplicateExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.StringStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.StringStack);
+    }
+  }
+
+  [StorableClass]
   [PushExpression(StackTypes.IntegerVector, "INTEGER[].DUP")]
-  public class IntegerVectorDuplicateExpression : DuplicateExpression<List<long>> {
+  public class IntegerVectorDuplicateExpression : DuplicateExpression<IReadOnlyList<long>> {
     public IntegerVectorDuplicateExpression() { }
     [StorableConstructor]
@@ -137,5 +169,5 @@
   [StorableClass]
   [PushExpression(StackTypes.FloatVector, "FLOAT[].DUP")]
-  public class FloatVectorDuplicateExpression : DuplicateExpression<List<double>> {
+  public class FloatVectorDuplicateExpression : DuplicateExpression<IReadOnlyList<double>> {
     public FloatVectorDuplicateExpression() { }
     [StorableConstructor]
@@ -153,5 +185,5 @@
   [StorableClass]
   [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].DUP")]
-  public class BooleanVectorDuplicateExpression : DuplicateExpression<List<bool>> {
+  public class BooleanVectorDuplicateExpression : DuplicateExpression<IReadOnlyList<bool>> {
     public BooleanVectorDuplicateExpression() { }
     [StorableConstructor]
@@ -169,5 +201,5 @@
   [StorableClass]
   [PushExpression(StackTypes.StringVector, "STRING[].DUP")]
-  public class StringVectorDuplicateExpression : DuplicateExpression<List<string>> {
+  public class StringVectorDuplicateExpression : DuplicateExpression<IReadOnlyList<string>> {
     public StringVectorDuplicateExpression() { }
     [StorableConstructor]
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/EmptyExpression.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/EmptyExpression.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/EmptyExpression.cs	(revision 15017)
@@ -101,5 +101,5 @@
 
   [PushExpression(StackTypes.IntegerVector, "INTEGER[].EMPTY", StackTypes.Boolean)]
-  public class IntegerVectorEmptyExpression : EmptyExpression<List<long>> {
+  public class IntegerVectorEmptyExpression : EmptyExpression<IReadOnlyList<long>> {
     public IntegerVectorEmptyExpression() { }
     [StorableConstructor]
@@ -111,5 +111,5 @@
 
   [PushExpression(StackTypes.FloatVector, "FLOAT[].EMPTY", StackTypes.Boolean)]
-  public class FloatVectorEmptyExpression : EmptyExpression<List<double>> {
+  public class FloatVectorEmptyExpression : EmptyExpression<IReadOnlyList<double>> {
     public FloatVectorEmptyExpression() { }
     [StorableConstructor]
@@ -121,5 +121,5 @@
 
   [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].EMPTY", StackTypes.Boolean)]
-  public class BooleanVectorEmptyExpression : EmptyExpression<List<bool>> {
+  public class BooleanVectorEmptyExpression : EmptyExpression<IReadOnlyList<bool>> {
     public BooleanVectorEmptyExpression() { }
     [StorableConstructor]
@@ -131,5 +131,5 @@
 
   [PushExpression(StackTypes.StringVector, "STRING[].EMPTY", StackTypes.Boolean)]
-  public class StringVectorEmptyExpression : EmptyExpression<List<string>> {
+  public class StringVectorEmptyExpression : EmptyExpression<IReadOnlyList<string>> {
     public StringVectorEmptyExpression() { }
     [StorableConstructor]
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/EqualsExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/EqualsExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/EqualsExpressions.cs	(revision 15017)
@@ -1,4 +1,6 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
   using System.Collections.Generic;
+  using System.Linq;
+
   using Attributes;
 
@@ -23,5 +25,15 @@
       stack.Remove(2);
 
-      booleanStack.Push(first.Equals(second));
+      var equal = first.Equals(second);
+      booleanStack.Push(equal);
+    }
+
+    protected void Eval(IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<bool> booleanStack) {
+      var first = vectorStack[1];
+      var second = vectorStack[0];
+      vectorStack.Remove(2);
+
+      var equal = first.SequenceEqual(second);
+      booleanStack.Push(equal);
     }
   }
@@ -92,5 +104,5 @@
 
   [StorableClass]
-  [PushExpression(StackTypes.Exec, "EXEC.=", StackTypes.Boolean)]
+  [PushExpression(StackTypes.Exec, "EXEC.=", StackTypes.Boolean, execIn: 0)]
   public class ExecEqualsExpression : EqualsExpression<Expression> {
     public ExecEqualsExpression() { }
@@ -157,5 +169,5 @@
   [StorableClass]
   [PushExpression(StackTypes.IntegerVector, "INTEGER[].=", StackTypes.Boolean)]
-  public class IntegerVectorEqualsExpression : EqualsExpression<List<long>> {
+  public class IntegerVectorEqualsExpression : EqualsExpression<long> {
     public IntegerVectorEqualsExpression() { }
     [StorableConstructor]
@@ -173,5 +185,5 @@
   [StorableClass]
   [PushExpression(StackTypes.FloatVector, "FLOAT[].=", StackTypes.Boolean)]
-  public class FloatVectorEqualsExpression : EqualsExpression<List<double>> {
+  public class FloatVectorEqualsExpression : EqualsExpression<double> {
     public FloatVectorEqualsExpression() { }
     [StorableConstructor]
@@ -189,5 +201,5 @@
   [StorableClass]
   [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].=", StackTypes.Boolean)]
-  public class BooleanVectorEqualsExpression : EqualsExpression<List<bool>> {
+  public class BooleanVectorEqualsExpression : EqualsExpression<bool> {
     public BooleanVectorEqualsExpression() { }
     [StorableConstructor]
@@ -205,5 +217,5 @@
   [StorableClass]
   [PushExpression(StackTypes.StringVector, "STRING[].=", StackTypes.Boolean)]
-  public class StringVectorEqualsExpression : EqualsExpression<List<string>> {
+  public class StringVectorEqualsExpression : EqualsExpression<string> {
     public StringVectorEqualsExpression() { }
     [StorableConstructor]
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/ExecExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/ExecExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/ExecExpressions.cs	(revision 15017)
@@ -1,3 +1,5 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
+  using System;
+
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
@@ -13,5 +15,5 @@
   /// </summary>
   [StorableClass]
-  [PushExpression(StackTypes.Exec, "EXEC.IF", StackTypes.Boolean)]
+  [PushExpression(StackTypes.Exec, "EXEC.IF", StackTypes.Boolean, execIn: 2)]
   public class ExecIfExpression : StatelessExpression {
     public ExecIfExpression() { }
@@ -35,5 +37,5 @@
   ///     "( EXEC.Y <TopItem> )".
   /// </summary>
-  [PushExpression(StackTypes.Exec, "EXEC.Y")]
+  [PushExpression(StackTypes.Exec, "EXEC.Y", execIn: 1)]
   [StorableClass]
   public class ExecYExpression : StatelessExpression {
@@ -58,5 +60,5 @@
       var result = PushProgram.Create(interpreter.PoolContainer.PushProgramPool, expressions);
 
-      interpreter.ExecStack.SetTop(result);
+      interpreter.ExecStack.Top = result;
       interpreter.ExecStack.Add(top);
     }
@@ -66,5 +68,5 @@
   ///     Removes the second item on the EXEC stack.
   /// </summary>
-  [PushExpression(StackTypes.Exec, "EXEC.K")]
+  [PushExpression(StackTypes.Exec, "EXEC.K", execIn: 2)]
   [StorableClass]
   public class ExecKExpression : StatelessExpression {
@@ -79,5 +81,5 @@
     public override void Eval(IInternalPushInterpreter interpreter) {
       var top = interpreter.ExecStack.Pop();
-      interpreter.ExecStack.SetTop(top);
+      interpreter.ExecStack.Top = top;
     }
   }
@@ -88,5 +90,5 @@
   ///     another instance of C, followed by another instance of A.
   /// </summary>
-  [PushExpression(StackTypes.Exec, "EXEC.S")]
+  [PushExpression(StackTypes.Exec, "EXEC.S", execIn: 3)]
   [StorableClass]
   public class ExecSExpression : StatelessExpression {
@@ -113,5 +115,5 @@
       var newTop = PushProgram.Create(interpreter.PoolContainer.PushProgramPool, expressions);
 
-      interpreter.ExecStack.SetTop(newTop);
+      interpreter.ExecStack.Top = newTop;
       interpreter.ExecStack.Push(c, a);
     }
@@ -121,6 +123,8 @@
   ///     Does nothing.
   /// </summary>
+  ///
+  [StorableClass]
+  [Serializable]
   [PushExpression(StackTypes.Exec, "EXEC.NOOP")]
-  [StorableClass]
   public class ExecNoopExpression : StatelessExpression {
     public ExecNoopExpression() { }
@@ -137,5 +141,5 @@
   }
 
-  [PushExpression(StackTypes.Exec, "EXEC.WHILE", StackTypes.Boolean)]
+  [PushExpression(StackTypes.Exec, "EXEC.WHILE", StackTypes.Boolean, execIn: 1)]
   [StorableClass]
   public class ExecWhileExpression : StatelessExpression {
@@ -165,5 +169,5 @@
   }
 
-  [PushExpression(StackTypes.Exec, "EXEC.DO*WHILE")]
+  [PushExpression(StackTypes.Exec, "EXEC.DO*WHILE", execIn: 1)]
   [StorableClass]
   public class ExecDoWhileExpression : StatelessExpression {
@@ -181,5 +185,5 @@
   }
 
-  [PushExpression(StackTypes.Exec, "EXEC.WHEN", StackTypes.Boolean)]
+  [PushExpression(StackTypes.Exec, "EXEC.WHEN", StackTypes.Boolean, execIn: 1)]
   [StorableClass]
   public class ExecWhenExpression : StatelessExpression {
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/Expression.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/Expression.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/Expression.cs	(revision 15017)
@@ -22,10 +22,7 @@
     public static readonly IReadOnlyCollection<Expression> EmptyContainer = new Expression[0];
 
-    public virtual string StringRepresentation
+    public abstract string StringRepresentation
     {
-      get
-      {
-        return ExpressionTable.TypeToAttributeTable[GetType()].ExpressionName;
-      }
+      get;
     }
 
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/ExpressionTable.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/ExpressionTable.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/ExpressionTable.cs	(revision 15017)
@@ -33,4 +33,5 @@
       ExpressionNames = StatelessExpressionTable.Keys
         .Concat(StatefulExpressionFactory.Keys)
+        .Where(t => typeToNameTable.ContainsKey(t))
         .Select(type => typeToNameTable[type])
         .ToArray();
@@ -55,4 +56,8 @@
         typeToAttributeTable.Add(type, attribute);
         dictionary.Add(type, expression);
+
+        // do not index hidden expressions like push expression in tables
+        if (attribute.IsHidden) continue;
+
         indexToNameTable.Add(indexToNameTable.Keys.Count, attribute.ExpressionName);
         typeToNameTable.Add(type, attribute.ExpressionName);
@@ -89,4 +94,8 @@
         typeToAttributeTable.Add(type, attribute);
         dictionary.Add(type, creator);
+
+        // do not index hidden expressions like push expression in tables
+        if (attribute.IsHidden) continue;
+
         indexToNameTable.Add(indexToNameTable.Keys.Count, attribute.ExpressionName);
         typeToNameTable.Add(type, attribute.ExpressionName);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/FloatExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/FloatExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/FloatExpressions.cs	(revision 15017)
@@ -1,4 +1,6 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
   using System;
+  using System.Globalization;
+
   using Common;
 
@@ -30,5 +32,5 @@
       if (double.IsNegativeInfinity(result)) result = double.MinValue;
 
-      interpreter.FloatStack.SetTop(result);
+      interpreter.FloatStack.Top = result;
     }
   }
@@ -56,5 +58,5 @@
       if (double.IsNegativeInfinity(result)) result = double.MinValue;
 
-      interpreter.FloatStack.SetTop(result);
+      interpreter.FloatStack.Top = result;
     }
   }
@@ -82,5 +84,5 @@
       if (double.IsNegativeInfinity(result)) result = double.MinValue;
 
-      interpreter.FloatStack.SetTop(result);
+      interpreter.FloatStack.Top = result;
     }
   }
@@ -109,5 +111,5 @@
       if (double.IsNegativeInfinity(result)) result = double.MinValue;
 
-      interpreter.FloatStack.SetTop(result);
+      interpreter.FloatStack.Top = result;
     }
   }
@@ -136,5 +138,5 @@
       var result = second % first;
 
-      interpreter.FloatStack.SetTop(result);
+      interpreter.FloatStack.Top = result;
     }
   }
@@ -159,5 +161,5 @@
       var result = Math.Min(second, first);
 
-      interpreter.FloatStack.SetTop(result);
+      interpreter.FloatStack.Top = result;
     }
   }
@@ -182,5 +184,5 @@
       var result = Math.Max(second, first);
 
-      interpreter.FloatStack.SetTop(result);
+      interpreter.FloatStack.Top = result;
     }
   }
@@ -298,5 +300,5 @@
     public override void Eval(IInternalPushInterpreter interpreter) {
       var result = Math.Sin(interpreter.FloatStack.Top);
-      interpreter.FloatStack.SetTop(result);
+      interpreter.FloatStack.Top = result;
     }
   }
@@ -317,5 +319,5 @@
     public override void Eval(IInternalPushInterpreter interpreter) {
       var result = Math.Cos(interpreter.FloatStack.Top);
-      interpreter.FloatStack.SetTop(result);
+      interpreter.FloatStack.Top = result;
     }
   }
@@ -362,3 +364,86 @@
     }
   }
+
+  /// <summary>
+  ///     Pushes the result of truncating the top CHAR.
+  /// </summary>
+  [PushExpression(StackTypes.Float, "FLOAT.FROMCHAR", StackTypes.Char)]
+  [StorableClass]
+  public class FloatFromCharExpression : StatelessExpression {
+    public FloatFromCharExpression() { }
+    [StorableConstructor]
+    protected FloatFromCharExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.CharStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      var value = interpreter.CharStack.Pop();
+      interpreter.FloatStack.Push(value);
+    }
+  }
+
+  /// <summary>
+  ///     Pushes the result of parsing the top STRING.
+  /// </summary>
+  [PushExpression(StackTypes.Float, "FLOAT.FROMSTRING", StackTypes.String)]
+  [StorableClass]
+  public class FloatFromStringExpression : StatelessExpression {
+    public FloatFromStringExpression() { }
+    [StorableConstructor]
+    protected FloatFromStringExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      double tmp;
+      return interpreter.StringStack.IsEmpty ||
+             interpreter.StringStack.Top.Length == 0 ||
+             !double.TryParse(interpreter.StringStack.Top, out tmp);
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      var str = interpreter.StringStack.Pop();
+      var value = double.Parse(str, CultureInfo.InvariantCulture);
+
+      interpreter.FloatStack.Push(value);
+    }
+  }
+
+  /// <summary>
+  ///     Pushes the result of increasing the top INTEGER by 1.
+  /// </summary>
+  [PushExpression(StackTypes.Float, "FLOAT.INC")]
+  [StorableClass]
+  public class FloatIncExpression : StatelessExpression {
+    public FloatIncExpression() { }
+    [StorableConstructor]
+    protected FloatIncExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.FloatStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      interpreter.FloatStack.Top += 1;
+    }
+  }
+
+  /// <summary>
+  ///     Pushes the result of decreasing the top INTEGER by 1.
+  /// </summary>
+  [PushExpression(StackTypes.Float, "FLOAT.DEC")]
+  [StorableClass]
+  public class FloatDecExpression : StatelessExpression {
+    public FloatDecExpression() { }
+    [StorableConstructor]
+    protected FloatDecExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.FloatStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      interpreter.FloatStack.Top -= 1;
+    }
+  }
 }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/FlushExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/FlushExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/FlushExpressions.cs	(revision 15017)
@@ -153,5 +153,5 @@
   [PushExpression(StackTypes.IntegerVector, "INTEGER[].FLUSH")]
   [StorableClass]
-  public class IntegerVectorFlushExpression : FlushExpression<List<long>> {
+  public class IntegerVectorFlushExpression : FlushExpression<IReadOnlyList<long>> {
     public IntegerVectorFlushExpression() { }
     [StorableConstructor]
@@ -169,5 +169,5 @@
   [PushExpression(StackTypes.FloatVector, "FLOAT[].FLUSH")]
   [StorableClass]
-  public class FloatVectorFlushExpression : FlushExpression<List<double>> {
+  public class FloatVectorFlushExpression : FlushExpression<IReadOnlyList<double>> {
     public FloatVectorFlushExpression() { }
     [StorableConstructor]
@@ -185,5 +185,5 @@
   [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].FLUSH")]
   [StorableClass]
-  public class BooleanVectorFlushExpression : FlushExpression<List<bool>> {
+  public class BooleanVectorFlushExpression : FlushExpression<IReadOnlyList<bool>> {
     public BooleanVectorFlushExpression() { }
     [StorableConstructor]
@@ -201,5 +201,5 @@
   [PushExpression(StackTypes.StringVector, "STRING[].FLUSH")]
   [StorableClass]
-  public class StringVectorFlushExpression : FlushExpression<List<string>> {
+  public class StringVectorFlushExpression : FlushExpression<IReadOnlyList<string>> {
     public StringVectorFlushExpression() { }
     [StorableConstructor]
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/IntegerExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/IntegerExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/IntegerExpressions.cs	(revision 15017)
@@ -27,5 +27,5 @@
       var result = second + first;
 
-      interpreter.IntegerStack.SetTop(result);
+      interpreter.IntegerStack.Top = result;
     }
   }
@@ -50,5 +50,5 @@
       var result = second - first;
 
-      interpreter.IntegerStack.SetTop(result);
+      interpreter.IntegerStack.Top = result;
     }
   }
@@ -73,5 +73,5 @@
       var result = second * first;
 
-      interpreter.IntegerStack.SetTop(result);
+      interpreter.IntegerStack.Top = result;
     }
   }
@@ -97,5 +97,5 @@
       var result = second / first;
 
-      interpreter.IntegerStack.SetTop(result);
+      interpreter.IntegerStack.Top = result;
     }
   }
@@ -123,5 +123,5 @@
       var result = second % first;
 
-      interpreter.IntegerStack.SetTop(result);
+      interpreter.IntegerStack.Top = result;
     }
   }
@@ -146,5 +146,5 @@
       var result = Math.Min(second, first);
 
-      interpreter.IntegerStack.SetTop(result);
+      interpreter.IntegerStack.Top = result;
     }
   }
@@ -169,5 +169,5 @@
       var result = Math.Max(second, first);
 
-      interpreter.IntegerStack.SetTop(result);
+      interpreter.IntegerStack.Top = result;
     }
   }
@@ -198,12 +198,12 @@
 
   /// <summary>
-  ///     Pushes TRUE onto the BOOLEAN stack if the second item is greater than the top item, or FALSE otherwise.
-  /// </summary>
-  [PushExpression(StackTypes.Integer, "INTEGER.>", StackTypes.Boolean)]
-  [StorableClass]
-  public class IntegerGreaterThanExpression : StatelessExpression {
-    public IntegerGreaterThanExpression() { }
-    [StorableConstructor]
-    protected IntegerGreaterThanExpression(bool deserializing) : base(deserializing) { }
+  ///     Pushes TRUE onto the BOOLEAN stack if the second item is less than or equal to the top item, or FALSE otherwise.
+  /// </summary>
+  [PushExpression(StackTypes.Integer, "INTEGER.<=", StackTypes.Boolean)]
+  [StorableClass]
+  public class IntegerSmallerOrEqualToExpression : StatelessExpression {
+    public IntegerSmallerOrEqualToExpression() { }
+    [StorableConstructor]
+    protected IntegerSmallerOrEqualToExpression(bool deserializing) : base(deserializing) { }
 
     public override bool IsNoop(IInternalPushInterpreter interpreter) {
@@ -216,5 +216,54 @@
       interpreter.IntegerStack.Remove(2);
 
+      var result = second <= first;
+      interpreter.BooleanStack.Push(result);
+    }
+  }
+
+  /// <summary>
+  ///     Pushes TRUE onto the BOOLEAN stack if the second item is greater than the top item, or FALSE otherwise.
+  /// </summary>
+  [PushExpression(StackTypes.Integer, "INTEGER.>", StackTypes.Boolean)]
+  [StorableClass]
+  public class IntegerGreaterThanExpression : StatelessExpression {
+    public IntegerGreaterThanExpression() { }
+    [StorableConstructor]
+    protected IntegerGreaterThanExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.IntegerStack.Count < 2;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      var first = interpreter.IntegerStack.Top;
+      var second = interpreter.IntegerStack[1];
+      interpreter.IntegerStack.Remove(2);
+
       var result = second > first;
+      interpreter.BooleanStack.Push(result);
+    }
+  }
+
+
+  /// <summary>
+  ///     Pushes TRUE onto the BOOLEAN stack if the second item is greater than or equal to the top item, or FALSE otherwise.
+  /// </summary>
+  [PushExpression(StackTypes.Integer, "INTEGER.>=", StackTypes.Boolean)]
+  [StorableClass]
+  public class IntegerGreaterOrEqualToExpression : StatelessExpression {
+    public IntegerGreaterOrEqualToExpression() { }
+    [StorableConstructor]
+    protected IntegerGreaterOrEqualToExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.IntegerStack.Count < 2;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      var first = interpreter.IntegerStack.Top;
+      var second = interpreter.IntegerStack[1];
+      interpreter.IntegerStack.Remove(2);
+
+      var result = second >= first;
       interpreter.BooleanStack.Push(result);
     }
@@ -257,7 +306,90 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
-      var value = (int)interpreter.FloatStack.Pop();
+      var value = (long)(interpreter.FloatStack.Pop());
       interpreter.IntegerStack.Push(value);
     }
   }
+
+  /// <summary>
+  ///     Pushes the result of truncating the top CHAR.
+  /// </summary>
+  [PushExpression(StackTypes.Integer, "INTEGER.FROMCHAR", StackTypes.Char)]
+  [StorableClass]
+  public class IntegerFromCharExpression : StatelessExpression {
+    public IntegerFromCharExpression() { }
+    [StorableConstructor]
+    protected IntegerFromCharExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.CharStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      var value = interpreter.CharStack.Pop();
+      interpreter.IntegerStack.Push(value);
+    }
+  }
+
+  /// <summary>
+  ///     Pushes the result of parsing the top STRING.
+  /// </summary>
+  [PushExpression(StackTypes.Integer, "INTEGER.FROMSTRING", StackTypes.String)]
+  [StorableClass]
+  public class IntegerFromStringExpression : StatelessExpression {
+    public IntegerFromStringExpression() { }
+    [StorableConstructor]
+    protected IntegerFromStringExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      long tmp;
+
+      return interpreter.StringStack.IsEmpty ||
+             interpreter.StringStack.Top.Length == 0 ||
+             !long.TryParse(interpreter.StringStack.Top, out tmp);
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      var str = interpreter.StringStack.Pop();
+      var value = long.Parse(str);
+      interpreter.IntegerStack.Push(value);
+    }
+  }
+
+  /// <summary>
+  ///     Pushes the result of increasing the top INTEGER by 1.
+  /// </summary>
+  [PushExpression(StackTypes.Integer, "INTEGER.INC")]
+  [StorableClass]
+  public class IntegerIncExpression : StatelessExpression {
+    public IntegerIncExpression() { }
+    [StorableConstructor]
+    protected IntegerIncExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.IntegerStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      interpreter.IntegerStack.Top += 1;
+    }
+  }
+
+  /// <summary>
+  ///     Pushes the result of decreasing the top INTEGER by 1.
+  /// </summary>
+  [PushExpression(StackTypes.Integer, "INTEGER.DEC")]
+  [StorableClass]
+  public class IntegerDecExpression : StatelessExpression {
+    public IntegerDecExpression() { }
+    [StorableConstructor]
+    protected IntegerDecExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.IntegerStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      interpreter.IntegerStack.Top -= 1;
+    }
+  }
 }
Index: anches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/LoopExpression.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/LoopExpression.cs	(revision 15016)
+++ 	(revision )
@@ -1,150 +1,0 @@
-﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
-  using System;
-
-  using HeuristicLab.Common;
-  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Data.Pool;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
-
-  [Serializable]
-  [StorableClass]
-  public class LoopState : IDeepCloneable, IPooledObject {
-    public static LoopState Create(
-      IManagedPool<LoopState> pool,
-      Expression body,
-      long currentIndex,
-      long destinationIndex,
-      long incrementor) {
-      var state = pool.Get(false);
-
-      state.Body = body;
-      state.CurrentIndex = currentIndex;
-      state.DestinationIndex = destinationIndex;
-      state.Incrementor = incrementor;
-
-      return state;
-    }
-
-    public LoopState() { }
-
-    [StorableConstructor]
-    protected LoopState(bool deserializing) { }
-    protected LoopState(LoopState origin, Cloner cloner) {
-      Body = origin.Body;
-      CurrentIndex = origin.CurrentIndex;
-      DestinationIndex = origin.DestinationIndex;
-      Incrementor = origin.Incrementor;
-    }
-
-    public Expression Body { get; private set; }
-    public long CurrentIndex { get; private set; }
-    public long DestinationIndex { get; private set; }
-    public long Incrementor { get; private set; }
-
-    private int? hashCode;
-    public override int GetHashCode() {
-      if (hashCode == null) hashCode = CalcHashCode();
-      return hashCode.Value;
-    }
-
-
-
-    public void Reset() {
-      Body = null;
-      CurrentIndex = default(long);
-      DestinationIndex = default(long);
-      Incrementor = default(long);
-    }
-
-    private int CalcHashCode() {
-      var hash = 19;
-
-      if (Body != null)
-        hash = hash * 31 + Body.GetHashCode();
-
-      hash = hash * 31 + CurrentIndex.GetHashCode();
-      hash = hash * 31 + DestinationIndex.GetHashCode();
-      hash = hash * 31 + Incrementor.GetHashCode();
-
-      return hash;
-    }
-
-    public object Clone() {
-      return Clone(new Cloner());
-    }
-
-    public IDeepCloneable Clone(Cloner cloner) {
-      return new LoopState(this, cloner);
-    }
-  }
-
-  [Serializable]
-  [StorableClass]
-  public abstract class LoopExpression : StatefulExpression<LoopState> {
-    protected LoopExpression() : base(new LoopState()) { }
-    protected LoopExpression(LoopState state) : base(state) { }
-    [StorableConstructor]
-    protected LoopExpression(bool deserializing) : base(deserializing) { }
-
-    protected void Eval(IInternalPushInterpreter interpreter, IPushStack<Expression> sourceStack, bool pushCurrentIndex = false) {
-      // if not initialized
-      if (State.Body == null) {
-        if (HasInsufficientArguments(interpreter, sourceStack)) return;
-
-        var state = InitState(interpreter, sourceStack);
-        var initLoopExpression = Clone(state, interpreter);
-
-        interpreter.ExecStack.Push(initLoopExpression, state.Body);
-        return;
-      }
-
-      // if loop end reached
-      if (State.DestinationIndex == State.CurrentIndex) {
-        PushLastIteration(interpreter);
-        return;
-      }
-
-      PushIteration(interpreter);
-    }
-
-    private string stringRepresentation;
-    public override string StringRepresentation
-    {
-      get
-      {
-        if (stringRepresentation == null) {
-          var attribute = (PushExpressionAttribute)Attribute.GetCustomAttribute(GetType(), typeof(PushExpressionAttribute));
-          stringRepresentation = attribute.ExpressionName;
-        }
-
-        return stringRepresentation;
-      }
-    }
-
-    protected virtual void PushIteration(IInternalPushInterpreter interpreter) {
-      interpreter.IntegerStack.Push(State.CurrentIndex);
-
-      var newState = LoopState.Create(
-        interpreter.PoolContainer.LoopStatePool,
-        State.Body,
-        State.CurrentIndex + State.Incrementor,
-        State.DestinationIndex,
-        State.Incrementor);
-
-      var nextLoopExpression = Clone(newState, interpreter);
-
-      interpreter.ExecStack.Push(nextLoopExpression, State.Body);
-    }
-
-    protected virtual void PushLastIteration(IInternalPushInterpreter interpreter) {
-      interpreter.IntegerStack.Push(State.CurrentIndex);
-      interpreter.ExecStack.Push(State.Body);
-    }
-
-    protected abstract LoopExpression Clone(LoopState state, IInternalPushInterpreter interpreter);
-    protected abstract bool HasInsufficientArguments(IInternalPushInterpreter interpreter, IPushStack<Expression> sourceStack);
-    protected abstract LoopState InitState(IInternalPushInterpreter interpreter, IPushStack<Expression> sourceStack);
-  }
-}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/NameExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/NameExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/NameExpressions.cs	(revision 15017)
@@ -69,5 +69,5 @@
       var index = interpreter.CustomExpressions.Keys.Count == 1
         ? 0
-        : interpreter.Random.Next(0, interpreter.CustomExpressions.Keys.Count - 1);
+        : interpreter.Random.Next(0, interpreter.CustomExpressions.Keys.Count);
 
       var state = interpreter.CustomExpressions.Keys.ElementAt(index);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PopExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PopExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PopExpressions.cs	(revision 15017)
@@ -84,5 +84,5 @@
 
   [StorableClass]
-  [PushExpression(StackTypes.Exec, "EXEC.POP")]
+  [PushExpression(StackTypes.Exec, "EXEC.POP", execIn: 1)]
   public class ExecPopExpression : PopExpression<Expression> {
     public ExecPopExpression() { }
@@ -149,5 +149,5 @@
   [StorableClass]
   [PushExpression(StackTypes.IntegerVector, "INTEGER[].POP")]
-  public class IntegerVectorPopExpression : PopExpression<List<long>> {
+  public class IntegerVectorPopExpression : PopExpression<IReadOnlyList<long>> {
     public IntegerVectorPopExpression() { }
     [StorableConstructor]
@@ -165,5 +165,5 @@
   [StorableClass]
   [PushExpression(StackTypes.FloatVector, "FLOAT[].POP")]
-  public class FloatVectorPopExpression : PopExpression<List<double>> {
+  public class FloatVectorPopExpression : PopExpression<IReadOnlyList<double>> {
     public FloatVectorPopExpression() { }
     [StorableConstructor]
@@ -181,5 +181,5 @@
   [StorableClass]
   [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].POP")]
-  public class BooleanVectorPopExpression : PopExpression<List<bool>> {
+  public class BooleanVectorPopExpression : PopExpression<IReadOnlyList<bool>> {
     public BooleanVectorPopExpression() { }
     [StorableConstructor]
@@ -197,5 +197,5 @@
   [StorableClass]
   [PushExpression(StackTypes.StringVector, "STRING[].POP")]
-  public class StringVectorPopExpression : PopExpression<List<string>> {
+  public class StringVectorPopExpression : PopExpression<IReadOnlyList<string>> {
     public StringVectorPopExpression() { }
     [StorableConstructor]
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PrintExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PrintExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PrintExpressions.cs	(revision 15017)
@@ -1,6 +1,5 @@
-﻿using System;
-
-namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
+﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
   using System.Collections.Generic;
+  using System.Globalization;
   using System.Text;
   using Attributes;
@@ -22,5 +21,5 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
-      interpreter.PrintStack.Push(PushEnvironment.NewLine);
+      interpreter.PrintStack.Push(string.Empty);
     }
   }
@@ -34,8 +33,12 @@
     protected void Eval(IInternalPushInterpreter interpreter, IPushStack<T> stack) {
       var value = stack.Pop().ToString();
-      interpreter.PrintStack.Push(value);
-    }
-
-    protected void EvalVector(IInternalPushInterpreter interpreter, IPushStack<List<T>> vectorStack) {
+
+      if (interpreter.PrintStack.IsEmpty)
+        interpreter.PrintStack.Push(value);
+      else
+        interpreter.PrintStack.Top += value;
+    }
+
+    protected void EvalVector(IInternalPushInterpreter interpreter, IPushStack<IReadOnlyList<T>> vectorStack) {
       var sb = new StringBuilder();
       var vector = vectorStack.Pop();
@@ -92,5 +95,5 @@
 
   [StorableClass]
-  [PushExpression(StackTypes.Print, "PRINT.PRINTEXEC", StackTypes.Exec)]
+  [PushExpression(StackTypes.Print, "PRINT.PRINTEXEC", StackTypes.Exec, execIn: 1)]
   public class ExecPrintExpression : PrintExpression<Expression> {
     public ExecPrintExpression() { }
@@ -119,5 +122,11 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
-      Eval(interpreter, interpreter.FloatStack);
+      var value = interpreter.FloatStack.Pop();
+      var str = value.ToString(interpreter.Configuration.FloatStringFormat, CultureInfo.InvariantCulture);
+
+      if (interpreter.PrintStack.IsEmpty)
+        interpreter.PrintStack.Push(str);
+      else
+        interpreter.PrintStack.Top += str;
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PushExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PushExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PushExpressions.cs	(revision 15017)
@@ -1,9 +1,15 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
+  using System;
   using System.Collections.Generic;
-
-  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
-
+  using System.Linq;
+  using Attributes;
+  using Constants;
+  using Data.Pool;
+  using Extensions;
+  using Interpreter;
+  using Persistence.Default.CompositeSerializers.Storable;
+  using Stack;
+
+  [Serializable]
   [StorableClass]
   public abstract class PushExpression<T> : StatefulExpression<T> {
@@ -20,130 +26,187 @@
       stack.Push(State);
     }
-
-    public override string StringRepresentation { get { return State.ToString(); } }
-  }
-
-  [StorableClass]
+  }
+
+  [StorableClass]
+  [Serializable]
+  public abstract class VectorPushExpression<T> : PushExpression<IReadOnlyList<T>> {
+    [StorableConstructor]
+    protected VectorPushExpression(bool deserializing) : base(deserializing) { }
+
+    protected VectorPushExpression(IReadOnlyList<T> state) : base(state, null) { }
+
+    protected override string GetStringRepresentation() {
+      return PushEnvironment.VectorStartSymbolStr +
+             string.Join(PushEnvironment.VectorSeparatorSymbolStr, State) +
+             PushEnvironment.VectorEndSymbolStr;
+    }
+
+    protected override int CalcHashCode() {
+      return State.HashCode();
+    }
+  }
+
+  [StorableClass]
+  [Serializable]
+  [PushExpression(StackTypes.Integer, "INTEGER.PUSH", isHidden: true)]
   public class IntegerPushExpression : PushExpression<long> {
     [StorableConstructor]
     protected IntegerPushExpression(bool deserializing) : base(deserializing) { }
 
+    public static IntegerPushExpression Create(IManagedPool<Expression> statefulExpressionPool, long state) {
+      var expression = (IntegerPushExpression)statefulExpressionPool.Get();
+      expression.State = state;
+
+      return expression;
+    }
+
+    /// <summary>
+    /// Pushes default(long)
+    /// </summary>
+    public IntegerPushExpression() : base(default(long), null) {
+    }
+
+    public IntegerPushExpression(long state)
+      : base(state, null) {
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.IntegerStack);
+    }
+  }
+
+  [StorableClass]
+  [Serializable]
+  [PushExpression(StackTypes.Float, "FLOAT.PUSH", isHidden: true)]
+  public class FloatPushExpression : PushExpression<double> {
+    [StorableConstructor]
+    protected FloatPushExpression(bool deserializing) : base(deserializing) { }
+
+    public static FloatPushExpression Create(IManagedPool<Expression> statefulExpressionPool, double state) {
+      var expression = (FloatPushExpression)statefulExpressionPool.Get();
+      expression.State = state;
+
+      return expression;
+    }
+
+    /// <summary>
+    /// Pushes default(double)
+    /// </summary>
+    public FloatPushExpression() : base(default(double), null) {
+    }
+
+    public FloatPushExpression(double state)
+      : base(state, null) {
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.FloatStack);
+    }
+  }
+
+  [StorableClass]
+  [Serializable]
+  [PushExpression(StackTypes.Boolean, "BOOLEAN.PUSH", isHidden: true)]
+  public class BooleanPushExpression : PushExpression<bool> {
+    [StorableConstructor]
+    protected BooleanPushExpression(bool deserializing, object other) : base(deserializing) { }
+
+    public static BooleanPushExpression Create(IManagedPool<Expression> statefulExpressionPool, bool state) {
+      var expression = (BooleanPushExpression)statefulExpressionPool.Get();
+      expression.State = state;
+
+      return expression;
+    }
+
+    /// <summary>
+    /// Pushes default(bool)
+    /// </summary>
+    public BooleanPushExpression() : base(default(bool), null) {
+    }
+
+    public BooleanPushExpression(bool state)
+      : base(state, null) {
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.BooleanStack);
+    }
+  }
+
+  [StorableClass]
+  [Serializable]
+  [PushExpression(StackTypes.Name, "NAME.PUSH", isHidden: true)]
+  public class NamePushExpression : PushExpression<string> {
+    [StorableConstructor]
+    protected NamePushExpression(bool deserializing) : base(deserializing) { }
+    public static NamePushExpression Create(IManagedPool<Expression> statefulExpressionPool, string state) {
+      var expression = (NamePushExpression)statefulExpressionPool.Get();
+      expression.State = state;
+
+      return expression;
+    }
+
+    public NamePushExpression() : base(string.Empty, null) {
+    }
+
+    public NamePushExpression(string state)
+      : base(state, null) {
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.NameStack);
+    }
+  }
+
+  [StorableClass]
+  [Serializable]
+  [PushExpression(StackTypes.Exec, "EXEC.PUSH", isHidden: true)]
+  public class ExecPushExpression : PushExpression<Expression> {
+    [StorableConstructor]
+    protected ExecPushExpression(bool deserializing) : base(deserializing) { }
+    public static ExecPushExpression Create(IManagedPool<Expression> statefulExpressionPool, Expression state) {
+      var expression = (ExecPushExpression)statefulExpressionPool.Get();
+      expression.State = state;
+
+      return expression;
+    }
+
+    private static readonly Expression Noop = ExpressionTable.GetStatelessExpression<ExecNoopExpression>();
+
+    /// <summary>
+    /// Pushes ExecNoop
+    /// </summary>
+    public ExecPushExpression() : base(Noop, null) {
+    }
+
+    public ExecPushExpression(Expression state)
+      : base(state, null) {
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.ExecStack);
+    }
+  }
+
+  [StorableClass]
+  [Serializable]
+  [PushExpression(StackTypes.Char, "CHAR.PUSH", isHidden: true)]
+  public class CharPushExpression : PushExpression<char> {
+    [StorableConstructor]
+    protected CharPushExpression(bool deserializing) : base(deserializing) { }
+
     // not supported so far
-    //public static IntegerPushExpression Create(IManagedPool<Expression> statefulExpressionPool, long state) {
-    //  var expression = (IntegerPushExpression)statefulExpressionPool.Get();
-    //  expression.State = state;
-
-    //  return expression;
-    //}
-
-    public IntegerPushExpression(long state)
-      : base(state, null) {
-    }
-
-    public override void Eval(IInternalPushInterpreter interpreter) {
-      Eval(interpreter.IntegerStack);
-    }
-  }
-
-  [StorableClass]
-  public class FloatPushExpression : PushExpression<double> {
-    [StorableConstructor]
-    protected FloatPushExpression(bool deserializing) : base(deserializing) { }
-
-    // not supported so far
-    //public static FloatPushExpression Create(IManagedPool<Expression> statefulExpressionPool, double state) {
-    //  var expression = (FloatPushExpression)statefulExpressionPool.Get();
-    //  expression.State = state;
-
-    //  return expression;
-    //}
-
-    public FloatPushExpression(double state)
-      : base(state, null) {
-    }
-
-    public override void Eval(IInternalPushInterpreter interpreter) {
-      Eval(interpreter.FloatStack);
-    }
-  }
-
-  [StorableClass]
-  public class BooleanPushExpression : PushExpression<bool> {
-    [StorableConstructor]
-    protected BooleanPushExpression(bool deserializing, object other) : base(deserializing) { }
-
-    // not supported so far
-    //public static BooleanPushExpression Create(IManagedPool<Expression> statefulExpressionPool, bool state) {
-    //  var expression = (BooleanPushExpression)statefulExpressionPool.Get();
-    //  expression.State = state;
-
-    //  return expression;
-    //}
-
-    public BooleanPushExpression(bool state)
-      : base(state, null) {
-    }
-
-    public override void Eval(IInternalPushInterpreter interpreter) {
-      Eval(interpreter.BooleanStack);
-    }
-  }
-
-  [StorableClass]
-  public class NamePushExpression : PushExpression<string> {
-    [StorableConstructor]
-    protected NamePushExpression(bool deserializing) : base(deserializing) { }
-
-    // not supported so far
-    //public static NamePushExpression Create(IManagedPool<Expression> statefulExpressionPool, string state) {
-    //  var expression = (NamePushExpression)statefulExpressionPool.Get();
-    //  expression.State = state;
-
-    //  return expression;
-    //}
-
-    public NamePushExpression(string state)
-      : base(state, null) {
-    }
-
-    public override void Eval(IInternalPushInterpreter interpreter) {
-      Eval(interpreter.NameStack);
-    }
-  }
-
-  [StorableClass]
-  public class ExecPushExpression : PushExpression<Expression> {
-    [StorableConstructor]
-    protected ExecPushExpression(bool deserializing) : base(deserializing) { }
-
-    // not supported so far
-    //public static ExecPushExpression Create(IManagedPool<Expression> statefulExpressionPool, Expression state) {
-    //  var expression = (ExecPushExpression)statefulExpressionPool.Get();
-    //  expression.State = state;
-
-    //  return expression;
-    //}
-
-    public ExecPushExpression(Expression state)
-      : base(state, null) {
-    }
-
-    public override void Eval(IInternalPushInterpreter interpreter) {
-      Eval(interpreter.ExecStack);
-    }
-  }
-
-  [StorableClass]
-  public class CharPushExpression : PushExpression<char> {
-    [StorableConstructor]
-    protected CharPushExpression(bool deserializing) : base(deserializing) { }
-
-    // not supported so far
-    //public static CharPushExpression Create(IManagedPool<Expression> statefulExpressionPool, char state) {
-    //  var expression = (CharPushExpression)statefulExpressionPool.Get();
-    //  expression.State = state;
-
-    //  return expression;
-    //}
+    public static CharPushExpression Create(IManagedPool<Expression> statefulExpressionPool, char state) {
+      var expression = (CharPushExpression)statefulExpressionPool.Get();
+      expression.State = state;
+
+      return expression;
+    }
+
+    /// <summary>
+    /// Pushes default(char)
+    /// </summary>
+    public CharPushExpression() : base(default(char), null) {
+    }
 
     public CharPushExpression(char state)
@@ -151,4 +214,8 @@
     }
 
+    protected override string GetStringRepresentation() {
+      return PushEnvironment.CharSymbol + State.Printify() + PushEnvironment.CharSymbol;
+    }
+
     public override void Eval(IInternalPushInterpreter interpreter) {
       Eval(interpreter.CharStack);
@@ -157,15 +224,26 @@
 
   [StorableClass]
+  [Serializable]
+  [PushExpression(StackTypes.String, "STRING.PUSH", isHidden: true)]
   public class StringPushExpression : PushExpression<string> {
     [StorableConstructor]
     protected StringPushExpression(bool deserializing) : base(deserializing) { }
 
-    // not supported so far
-    //public static StringPushExpression Create(IManagedPool<Expression> statefulExpressionPool, string state) {
-    //  var expression = (StringPushExpression)statefulExpressionPool.Get();
-    //  expression.State = state;
-
-    //  return expression;
-    //}
+    public static StringPushExpression Create(IManagedPool<Expression> statefulExpressionPool, string state) {
+      var expression = (StringPushExpression)statefulExpressionPool.Get();
+      expression.State = state;
+
+      return expression;
+    }
+
+    /// <summary>
+    /// Pushes String.Empty
+    /// </summary>
+    public StringPushExpression() : base(string.Empty, null) {
+    }
+
+    protected override string GetStringRepresentation() {
+      return PushEnvironment.StringSymbol + State + PushEnvironment.StringSymbol;
+    }
 
     public StringPushExpression(string state)
@@ -179,18 +257,27 @@
 
   [StorableClass]
-  public class IntegerVectorPushExpression : PushExpression<List<long>> {
+  [Serializable]
+  [PushExpression(StackTypes.IntegerVector, "INTEGER[].PUSH", isHidden: true)]
+  public class IntegerVectorPushExpression : VectorPushExpression<long> {
     [StorableConstructor]
     protected IntegerVectorPushExpression(bool deserializing) : base(deserializing) { }
 
-    // not supported so far
-    //public static IntegerVectorPushExpression Create(IManagedPool<Expression> statefulExpressionPool, List<long> state) {
-    //  var expression = (IntegerVectorPushExpression)statefulExpressionPool.Get();
-    //  expression.State = state;
-
-    //  return expression;
-    //}
-
-    public IntegerVectorPushExpression(List<long> state)
-      : base(state, null) {
+    public static IntegerVectorPushExpression Create(IManagedPool<Expression> statefulExpressionPool, IReadOnlyList<long> state) {
+      var expression = (IntegerVectorPushExpression)statefulExpressionPool.Get();
+      expression.State = state;
+
+      return expression;
+    }
+
+    [NonSerialized]
+    private static readonly long[] EmptyState = new long[0];
+
+    /// <summary>
+    /// Pushes long[0]
+    /// </summary>
+    public IntegerVectorPushExpression() : base(EmptyState) {
+    }
+
+    public IntegerVectorPushExpression(IReadOnlyList<long> state) : base(state) {
     }
 
@@ -201,19 +288,27 @@
 
   [StorableClass]
-  public class FloatVectorPushExpression : PushExpression<List<double>> {
+  [Serializable]
+  [PushExpression(StackTypes.FloatVector, "FLOAT[].PUSH", isHidden: true)]
+  public class FloatVectorPushExpression : VectorPushExpression<double> {
     [StorableConstructor]
     protected FloatVectorPushExpression(bool deserializing) : base(deserializing) { }
 
-    // not supported so far
-    //public static FloatVectorPushExpression Create(IManagedPool<Expression> statefulExpressionPool, List<double> state) {
-    //  var expression = (FloatVectorPushExpression)statefulExpressionPool.Get();
-    //  expression.State = state;
-
-    //  return expression;
-    //}
-
-    public FloatVectorPushExpression(List<double> state)
-      : base(state, null) {
-    }
+    public static FloatVectorPushExpression Create(IManagedPool<Expression> statefulExpressionPool, IReadOnlyList<double> state) {
+      var expression = (FloatVectorPushExpression)statefulExpressionPool.Get();
+      expression.State = state;
+
+      return expression;
+    }
+
+    [NonSerialized]
+    private static readonly double[] EmptyState = new double[0];
+
+    /// <summary>
+    /// Pushes double[0]
+    /// </summary>
+    public FloatVectorPushExpression() : base(EmptyState) {
+    }
+
+    public FloatVectorPushExpression(IReadOnlyList<double> state) : base(state) { }
 
     public override void Eval(IInternalPushInterpreter interpreter) {
@@ -223,19 +318,27 @@
 
   [StorableClass]
-  public class BooleanVectorPushExpression : PushExpression<List<bool>> {
+  [Serializable]
+  [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].PUSH", isHidden: true)]
+  public class BooleanVectorPushExpression : VectorPushExpression<bool> {
     [StorableConstructor]
     protected BooleanVectorPushExpression(bool deserializing) : base(deserializing) { }
 
-    // not supported so far
-    //public static BooleanVectorPushExpression Create(IManagedPool<Expression> statefulExpressionPool, List<bool> state) {
-    //  var expression = (BooleanVectorPushExpression)statefulExpressionPool.Get();
-    //  expression.State = state;
-
-    //  return expression;
-    //}
-
-    public BooleanVectorPushExpression(List<bool> state)
-      : base(state, null) {
-    }
+    public static BooleanVectorPushExpression Create(IManagedPool<Expression> statefulExpressionPool, IReadOnlyList<bool> state) {
+      var expression = (BooleanVectorPushExpression)statefulExpressionPool.Get();
+      expression.State = state;
+
+      return expression;
+    }
+
+    [NonSerialized]
+    private static readonly bool[] EmptyState = new bool[0];
+
+    /// <summary>
+    /// Pushes bool[0]
+    /// </summary>
+    public BooleanVectorPushExpression() : base(EmptyState) {
+    }
+
+    public BooleanVectorPushExpression(IReadOnlyList<bool> state) : base(state) { }
 
     public override void Eval(IInternalPushInterpreter interpreter) {
@@ -245,19 +348,33 @@
 
   [StorableClass]
-  public class StringVectorPushExpression : PushExpression<List<string>> {
+  [Serializable]
+  [PushExpression(StackTypes.StringVector, "STRING[].PUSH", isHidden: true)]
+  public class StringVectorPushExpression : VectorPushExpression<string> {
     [StorableConstructor]
     protected StringVectorPushExpression(bool deserializing) : base(deserializing) { }
 
-    // not supported so far
-    //public static StringVectorPushExpression Create(IManagedPool<Expression> statefulExpressionPool, List<string> state) {
-    //  var expression = (StringVectorPushExpression)statefulExpressionPool.Get();
-    //  expression.State = state;
-
-    //  return expression;
-    //}
-
-    public StringVectorPushExpression(List<string> state)
-      : base(state, null) {
-    }
+    public static StringVectorPushExpression Create(IManagedPool<Expression> statefulExpressionPool, IReadOnlyList<string> state) {
+      var expression = (StringVectorPushExpression)statefulExpressionPool.Get();
+      expression.State = state;
+
+      return expression;
+    }
+
+    [NonSerialized]
+    private static readonly string[] EmptyState = new string[0];
+
+    /// <summary>
+    /// Pushes string[0]
+    /// </summary>
+    public StringVectorPushExpression() : base(EmptyState) {
+    }
+
+    protected override string GetStringRepresentation() {
+      return PushEnvironment.VectorStartSymbolStr +
+             string.Join(PushEnvironment.VectorSeparatorSymbolStr, State.Select(str => PushEnvironment.StringSymbol + str + PushEnvironment.StringSymbol)) +
+             PushEnvironment.VectorEndSymbolStr;
+    }
+
+    public StringVectorPushExpression(IReadOnlyList<string> state) : base(state) { }
 
     public override void Eval(IInternalPushInterpreter interpreter) {
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PushProgram.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PushProgram.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PushProgram.cs	(revision 15017)
@@ -5,21 +5,17 @@
 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
   using System.Diagnostics;
-
-  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Data.Pool;
-
+  using Constants;
+  using Data.Pool;
+  using Extensions;
   using Interpreter;
-
-  public interface IMutablePushProgram {
-    void SetAtIndex(int index, Expression expression);
-  }
+  using Persistence.Default.CompositeSerializers.Storable;
 
   [Serializable]
   [StorableClass]
-  public sealed class PushProgram : Expression, IPooledObject, IMutablePushProgram {
+  public sealed class PushProgram : Expression, IPooledObject {
 #if DEBUG
-    private const int StringRepresentationCountBeforeAggregate = 50;
+    private const int STRING_REPRESENTATION_COUNT_BEFORE_AGGREGATE = 10;
 #else
-    private const int StringRepresentationCountBeforeAggregate = 10;
+    private const int STRING_REPRESENTATION_COUNT_BEFORE_AGGREGATE = 1;
 #endif
 
@@ -27,8 +23,8 @@
     public static readonly PushProgram Empty = new PushProgram();
 
-    private const string Prefix = "(";
-    private const string PrefixReduced = "[";
-    private const string Postfix = ")";
-    private const string PostfixReduced = "]";
+    private const string Prefix = PushEnvironment.ProgramStartSymbolStr + " ";
+    private const string Postfix = " " + PushEnvironment.ProgramEndSymbolStr;
+    private const string PrefixReduced = "|";
+    private const string PostfixReduced = "|";
     private const string Delimiter = " ";
 
@@ -112,4 +108,5 @@
     }
 
+    [NonSerialized]
     private string stringRepresentation;
     public override string StringRepresentation
@@ -117,10 +114,10 @@
       get
       {
-        if (stringRepresentation == null) stringRepresentation = BuildString();
-        return stringRepresentation;
-      }
-    }
-
-
+        return stringRepresentation ?? (stringRepresentation = BuildStringRepresentation());
+      }
+    }
+
+
+    [NonSerialized]
     private int? depth;
     public int Depth
@@ -133,4 +130,5 @@
     }
 
+    [NonSerialized]
     private int[] treeIndex;
     private int[] TreeIndex
@@ -138,20 +136,19 @@
       get
       {
-        if (treeIndex == null) treeIndex = BuildTreeIndex();
-        return treeIndex;
-      }
-    }
-
+        return treeIndex ?? (treeIndex = BuildTreeIndex());
+      }
+    }
+
+    [NonSerialized]
     private int? hashCode;
     public override int GetHashCode() {
-      if (hashCode == null) hashCode = HashExpressions();
+      if (hashCode == null) hashCode = expressions.HashCode();
       return hashCode.Value;
     }
 
-    void IMutablePushProgram.SetAtIndex(int index, Expression expression) {
-
-    }
-
     public override bool Equals(object obj) {
+      if (obj == null)
+        return false;
+
       if (ReferenceEquals(this, obj))
         return true;
@@ -183,4 +180,7 @@
       return StringRepresentation;
     }
+
+    [NonSerialized]
+    private int? totalCount;
 
     /// <summary>
@@ -192,8 +192,66 @@
       get
       {
-        return IsEmpty
+        if (totalCount == null) {
+          totalCount = IsEmpty
             ? 1
             // + 1 because "this" is also counted
             : TreeIndex[0] + 1;
+        }
+
+        return totalCount.Value;
+      }
+    }
+
+    [NonSerialized]
+    private int? totalExpressionCount;
+    /// <summary>
+    /// Returns the amount of none program expressions
+    /// </summary>
+    /// <returns></returns>
+    public int TotalExpressionCount
+    {
+      get
+      {
+        if (totalExpressionCount == null) {
+          totalExpressionCount = 0;
+
+          for (var i = 0; i < Count; i++) {
+            var expression = expressions[i];
+
+            totalExpressionCount += expression.IsProgram
+              ? ((PushProgram)expression).TotalExpressionCount
+              : 1;
+          }
+        }
+
+        return totalExpressionCount.Value;
+      }
+    }
+
+    [NonSerialized]
+    private int? branches;
+    /// <summary>
+    /// Returns the amount of branches in the whole tree. Even an empty program represents at least one branch
+    /// </summary>
+    /// <returns></returns>
+    public int Branches
+    {
+      get
+      {
+        if (branches == null) {
+          branches = 1;
+
+          for (var i = 0; i < Count; i++) {
+            var expression = expressions[i];
+
+            if (!expression.IsProgram)
+              continue;
+
+            var program = (PushProgram)expression;
+            branches += program.Branches;
+          }
+        }
+
+        return branches.Value;
       }
     }
@@ -247,10 +305,10 @@
 
     private int CalcDepth() {
-      var maxDepth = 1;
+      var maxDepth = 0;
       for (var i = 0; i < Count; i++) {
         var expression = expressions[i];
         if (!expression.IsProgram) continue;
+
         var expandExpression = (PushProgram)expression;
-
         if (expandExpression.Depth > maxDepth)
           maxDepth = expandExpression.Depth;
@@ -260,14 +318,13 @@
     }
 
-    private string BuildString() {
+    private string BuildStringRepresentation() {
       // prevent too big string
-      return TotalCount > StringRepresentationCountBeforeAggregate
+      return Count > STRING_REPRESENTATION_COUNT_BEFORE_AGGREGATE
         ? PrefixReduced + Count + PostfixReduced
-        : Prefix + string.Join(Delimiter, expressions) + Postfix;
+        : Prefix + string.Join(Delimiter, expressions.Reverse()) + Postfix;
     }
 
     private int[] BuildTreeIndex() {
-      var local_treeIndex = new int[Count];
-
+      var localTreeIndex = new int[Count];
       var next = 1;
 
@@ -275,5 +332,5 @@
         var subExpression = expressions[i];
 
-        local_treeIndex[i] = next;
+        localTreeIndex[i] = next;
 
         if (subExpression.IsProgram) {
@@ -284,15 +341,5 @@
       }
 
-      return local_treeIndex;
-    }
-
-    private int HashExpressions() {
-      var hash = 19 * 31 + typeof(PushProgram).GetHashCode();
-
-      for (var i = 0; i < Count; i++) {
-        hash = hash * 31 + expressions[i].GetHashCode();
-      }
-
-      return hash;
+      return localTreeIndex;
     }
 
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/RandExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/RandExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/RandExpressions.cs	(revision 15017)
@@ -1,5 +1,9 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
+  using System.Collections.Generic;
+  using System.Linq;
+
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Extensions;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Generators.CodeGenerator;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
@@ -101,5 +105,5 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
-      var size = (int)(interpreter.IntegerStack.Pop() % interpreter.Configuration.MaxPointsInRandomExpression);
+      var size = interpreter.IntegerStack.Pop().AsInt(interpreter.Configuration.MaxPointsInRandomExpression);
       var program = LinearCodeGenerator.RandomProgram(
         interpreter.PoolContainer.PushProgramPool,
@@ -113,3 +117,103 @@
     }
   }
+
+  /// <summary>
+  ///     Pushes a random char.
+  /// </summary>
+  [PushExpression(StackTypes.Char, "CHAR.RAND")]
+  [StorableClass]
+  public class CharRandExpression : StatelessExpression {
+    public CharRandExpression() { }
+    [StorableConstructor]
+    protected CharRandExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return !interpreter.Configuration.ErcOptions.CharErcOptions.IsEnabled;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      var value = interpreter.Configuration.ErcOptions.CharErcOptions.GetErcValue(interpreter.Random);
+      interpreter.CharStack.Push(value);
+    }
+
+    /// <summary>
+    ///     Pushes a random string.
+    /// </summary>
+    [PushExpression(StackTypes.String, "STRING.RAND")]
+    [StorableClass]
+    public class StringRandExpression : StatelessExpression {
+      public StringRandExpression() { }
+      [StorableConstructor]
+      protected StringRandExpression(bool deserializing) : base(deserializing) { }
+
+      public override bool IsNoop(IInternalPushInterpreter interpreter) {
+        return !interpreter.Configuration.ErcOptions.StringErcOptions.IsEnabled;
+      }
+
+      public override void Eval(IInternalPushInterpreter interpreter) {
+        var value = interpreter.Configuration.ErcOptions.StringErcOptions.GetErcValue(interpreter.Random);
+        interpreter.StringStack.Push(value);
+      }
+
+      /// <summary>
+      ///     Pushes a random interger vector.
+      /// </summary>
+      [PushExpression(StackTypes.IntegerVector, "INTEGER[].RAND")]
+      [StorableClass]
+      public class IntegerVectorRandExpression : StatelessExpression {
+        public IntegerVectorRandExpression() { }
+        [StorableConstructor]
+        protected IntegerVectorRandExpression(bool deserializing) : base(deserializing) { }
+
+        public override bool IsNoop(IInternalPushInterpreter interpreter) {
+          return !interpreter.Configuration.ErcOptions.IntegerVectorErcOptions.IsEnabled;
+        }
+
+        public override void Eval(IInternalPushInterpreter interpreter) {
+          var value = interpreter.Configuration.ErcOptions.IntegerVectorErcOptions.GetErcValue(interpreter.Random);
+          interpreter.IntegerVectorStack.Push(new List<long>(value.Select(i => (long)i)));
+        }
+      }
+
+      /// <summary>
+      ///     Pushes a random float vector.
+      /// </summary>
+      [PushExpression(StackTypes.FloatVector, "FLOAT[].RAND")]
+      [StorableClass]
+      public class FloatVectorRandExpression : StatelessExpression {
+        public FloatVectorRandExpression() { }
+        [StorableConstructor]
+        protected FloatVectorRandExpression(bool deserializing) : base(deserializing) { }
+
+        public override bool IsNoop(IInternalPushInterpreter interpreter) {
+          return !interpreter.Configuration.ErcOptions.FloatVectorErcOptions.IsEnabled;
+        }
+
+        public override void Eval(IInternalPushInterpreter interpreter) {
+          var value = interpreter.Configuration.ErcOptions.FloatVectorErcOptions.GetErcValue(interpreter.Random);
+          interpreter.FloatVectorStack.Push(value);
+        }
+      }
+
+      /// <summary>
+      ///     Pushes a random boolean vector.
+      /// </summary>
+      [PushExpression(StackTypes.StringVector, "STRING[].RAND")]
+      [StorableClass]
+      public class StringVectorRandExpression : StatelessExpression {
+        public StringVectorRandExpression() { }
+        [StorableConstructor]
+        protected StringVectorRandExpression(bool deserializing) : base(deserializing) { }
+
+        public override bool IsNoop(IInternalPushInterpreter interpreter) {
+          return !interpreter.Configuration.ErcOptions.StringVectorErcOptions.IsEnabled;
+        }
+
+        public override void Eval(IInternalPushInterpreter interpreter) {
+          var value = interpreter.Configuration.ErcOptions.StringVectorErcOptions.GetErcValue(interpreter.Random);
+          interpreter.StringVectorStack.Push(value);
+        }
+      }
+    }
+  }
 }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/RotateExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/RotateExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/RotateExpressions.cs	(revision 15017)
@@ -84,5 +84,5 @@
   }
 
-  [PushExpression(StackTypes.Exec, "EXEC.ROT")]
+  [PushExpression(StackTypes.Exec, "EXEC.ROT", execIn: 3)]
   [StorableClass]
   public class ExecRotateExpression : RotateExpression<Expression> {
@@ -150,5 +150,5 @@
   [PushExpression(StackTypes.IntegerVector, "INTEGER[].ROT")]
   [StorableClass]
-  public class IntegerVectorRotateExpression : RotateExpression<List<long>> {
+  public class IntegerVectorRotateExpression : RotateExpression<IReadOnlyList<long>> {
     public IntegerVectorRotateExpression() { }
     [StorableConstructor]
@@ -166,5 +166,5 @@
   [PushExpression(StackTypes.FloatVector, "FLOAT[].ROT")]
   [StorableClass]
-  public class FloatVectorRotateExpression : RotateExpression<List<double>> {
+  public class FloatVectorRotateExpression : RotateExpression<IReadOnlyList<double>> {
     public FloatVectorRotateExpression() { }
     [StorableConstructor]
@@ -182,5 +182,5 @@
   [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].ROT")]
   [StorableClass]
-  public class BooleanVectorRotateExpression : RotateExpression<List<bool>> {
+  public class BooleanVectorRotateExpression : RotateExpression<IReadOnlyList<bool>> {
     public BooleanVectorRotateExpression() { }
     [StorableConstructor]
@@ -198,5 +198,5 @@
   [PushExpression(StackTypes.StringVector, "STRING[].ROT")]
   [StorableClass]
-  public class StringVectorRotateExpression : RotateExpression<List<string>> {
+  public class StringVectorRotateExpression : RotateExpression<IReadOnlyList<string>> {
     public StringVectorRotateExpression() { }
     [StorableConstructor]
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/ShoveExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/ShoveExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/ShoveExpressions.cs	(revision 15017)
@@ -1,4 +1,3 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
-  using System;
   using System.Collections.Generic;
 
@@ -6,4 +5,5 @@
 
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Extensions;
 
   using Interpreter;
@@ -17,5 +17,5 @@
 
     protected void Eval(IPushStack<T> stack, IPushStack<long> integerStack) {
-      var index = (int)Math.Abs(integerStack.Pop() % stack.Count);
+      var index = integerStack.Pop().AsInt(stack.Count);
       var item = stack.Pop();
       stack.Insert(index, item);
@@ -87,5 +87,5 @@
   }
 
-  [PushExpression(StackTypes.Exec, "EXEC.SHOVE", StackTypes.Integer)]
+  [PushExpression(StackTypes.Exec, "EXEC.SHOVE", StackTypes.Integer, execIn: 1)]
   [StorableClass]
   public class ExecShoveExpression : ShoveExpression<Expression> {
@@ -153,5 +153,5 @@
   [PushExpression(StackTypes.IntegerVector, "INTEGER[].SHOVE", StackTypes.Integer)]
   [StorableClass]
-  public class IntegerVectorShoveExpression : ShoveExpression<List<long>> {
+  public class IntegerVectorShoveExpression : ShoveExpression<IReadOnlyList<long>> {
     public IntegerVectorShoveExpression() { }
     [StorableConstructor]
@@ -169,5 +169,5 @@
   [PushExpression(StackTypes.FloatVector, "FLOAT[].SHOVE", StackTypes.Integer)]
   [StorableClass]
-  public class FloatVectorShoveExpression : ShoveExpression<List<double>> {
+  public class FloatVectorShoveExpression : ShoveExpression<IReadOnlyList<double>> {
     public FloatVectorShoveExpression() { }
     [StorableConstructor]
@@ -185,5 +185,5 @@
   [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].SHOVE", StackTypes.Integer)]
   [StorableClass]
-  public class BooleanVectorShoveExpression : ShoveExpression<List<bool>> {
+  public class BooleanVectorShoveExpression : ShoveExpression<IReadOnlyList<bool>> {
     public BooleanVectorShoveExpression() { }
     [StorableConstructor]
@@ -201,5 +201,5 @@
   [PushExpression(StackTypes.StringVector, "STRING[].SHOVE", StackTypes.Integer)]
   [StorableClass]
-  public class StringVectorShoveExpression : ShoveExpression<List<string>> {
+  public class StringVectorShoveExpression : ShoveExpression<IReadOnlyList<string>> {
     public StringVectorShoveExpression() { }
     [StorableConstructor]
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StackdepthExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StackdepthExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StackdepthExpressions.cs	(revision 15017)
@@ -127,5 +127,5 @@
   [StorableClass]
   [PushExpression(StackTypes.IntegerVector, "INTEGER[].STACKDEPTH", StackTypes.Integer)]
-  public class IntegerVectorStackdepthExpression : StackdepthExpression<List<long>> {
+  public class IntegerVectorStackdepthExpression : StackdepthExpression<IReadOnlyList<long>> {
     public IntegerVectorStackdepthExpression() { }
     [StorableConstructor]
@@ -139,5 +139,5 @@
   [StorableClass]
   [PushExpression(StackTypes.FloatVector, "FLOAT[].STACKDEPTH", StackTypes.Integer)]
-  public class FloatVectorStackdepthExpression : StackdepthExpression<List<double>> {
+  public class FloatVectorStackdepthExpression : StackdepthExpression<IReadOnlyList<double>> {
     public FloatVectorStackdepthExpression() { }
     [StorableConstructor]
@@ -150,5 +150,5 @@
   [StorableClass]
   [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].STACKDEPTH", StackTypes.Integer)]
-  public class BooleanVectorStackdepthExpression : StackdepthExpression<List<bool>> {
+  public class BooleanVectorStackdepthExpression : StackdepthExpression<IReadOnlyList<bool>> {
     public BooleanVectorStackdepthExpression() { }
     [StorableConstructor]
@@ -162,5 +162,5 @@
   [StorableClass]
   [PushExpression(StackTypes.StringVector, "STRING[].STACKDEPTH", StackTypes.Integer)]
-  public class StringVectorStackdepthExpression : StackdepthExpression<List<string>> {
+  public class StringVectorStackdepthExpression : StackdepthExpression<IReadOnlyList<string>> {
     public StringVectorStackdepthExpression() { }
     [StorableConstructor]
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StatefulExpression.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StatefulExpression.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StatefulExpression.cs	(revision 15017)
@@ -9,5 +9,7 @@
     [Storable]
     public T State { get; protected set; }
+    [NonSerialized]
     private int? hashCode;
+    [NonSerialized]
     private string stringRepresentation;
 
@@ -20,5 +22,12 @@
 
     protected virtual int CalcHashCode() {
-      return State.GetHashCode();
+      var hash = 19 * 31 + GetType().FullName.GetHashCode();
+      hash = hash * 31 + State.GetHashCode();
+
+      return hash;
+    }
+
+    protected virtual string GetStringRepresentation() {
+      return State.ToString();
     }
 
@@ -27,5 +36,5 @@
       get
       {
-        return stringRepresentation ?? (stringRepresentation = State.ToString());
+        return stringRepresentation ?? (stringRepresentation = GetStringRepresentation());
       }
     }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StatelessExpression.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StatelessExpression.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StatelessExpression.cs	(revision 15017)
@@ -1,11 +1,15 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
+  using System;
+
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
   [StorableClass]
+  [Serializable]
   public abstract class StatelessExpression : Expression {
+    [NonSerialized]
     private readonly int hashCode;
 
     protected StatelessExpression() {
-      hashCode = GetType().GetHashCode();
+      hashCode = GetType().FullName.GetHashCode();
     }
 
@@ -17,4 +21,12 @@
     }
 
+    public override string StringRepresentation
+    {
+      get
+      {
+        return ExpressionTable.TypeToAttributeTable[GetType()].ExpressionName;
+      }
+    }
+
     public override bool Equals(object obj) {
       return ReferenceEquals(this, obj) ||
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StringExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StringExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StringExpressions.cs	(revision 15017)
@@ -1,4 +1,5 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
   using System;
+  using System.Globalization;
   using System.Linq;
 
@@ -6,4 +7,5 @@
 
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Extensions;
 
   using Interpreter;
@@ -40,5 +42,7 @@
     public override void Eval(IInternalPushInterpreter interpreter) {
       var value = interpreter.FloatStack.Pop();
-      interpreter.StringStack.Push(value.ToString());
+      var str = value.ToString(interpreter.Configuration.FloatStringFormat, CultureInfo.InvariantCulture);
+
+      interpreter.StringStack.Push(str);
     }
   }
@@ -92,5 +96,5 @@
     public override void Eval(IInternalPushInterpreter interpreter) {
       var str = interpreter.StringStack.Pop();
-      interpreter.StringStack.SetTop(str + interpreter.StringStack.Top);
+      interpreter.StringStack.Top += str;
     }
   }
@@ -114,5 +118,5 @@
     public override void Eval(IInternalPushInterpreter interpreter) {
       var c = interpreter.CharStack.Pop();
-      interpreter.StringStack.SetTop(interpreter.StringStack.Top + c);
+      interpreter.StringStack.Top += c;
     }
   }
@@ -131,5 +135,4 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
-      var value = interpreter.IntegerStack.Pop();
       var str = interpreter.StringStack.Top;
 
@@ -137,6 +140,6 @@
         return;
 
-      value = Math.Abs(value) % str.Length;
-      interpreter.StringStack.SetTop(str.Substring(0, (int)value));
+      var endIndex = interpreter.IntegerStack.Pop().AsInt(str.Length);
+      interpreter.StringStack.Top = str.Substring(0, endIndex);
     }
   }
@@ -165,5 +168,5 @@
 
       if (length > 0)
-        interpreter.StringStack.SetTop(str.Substring((int)first, (int)length));
+        interpreter.StringStack.Top = str.Substring((int)first, (int)length);
     }
   }
@@ -182,5 +185,5 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
-      interpreter.StringStack.SetTop(interpreter.StringStack.Top[0].ToString());
+      interpreter.StringStack.Top = interpreter.StringStack.Top[0].ToString();
     }
   }
@@ -201,5 +204,5 @@
       var str = interpreter.StringStack.Top;
       var c = str[str.Length - 1].ToString();
-      interpreter.StringStack.SetTop(c);
+      interpreter.StringStack.Top = c;
     }
   }
@@ -220,7 +223,7 @@
     public override void Eval(IInternalPushInterpreter interpreter) {
       var str = interpreter.StringStack.Top;
-      var index = str.Length == 1 ? 0 : (int)Math.Abs(interpreter.IntegerStack.Pop()) % str.Length;
+      var index = str.Length == 1 ? 0 : interpreter.IntegerStack.Pop().AsInt(str.Length);
       var c = str[index].ToString();
-      interpreter.StringStack.SetTop(c);
+      interpreter.StringStack.Top = c;
     }
   }
@@ -240,5 +243,5 @@
     public override void Eval(IInternalPushInterpreter interpreter) {
       var str = interpreter.StringStack.Top;
-      interpreter.StringStack.SetTop(str.Length == 1 ? string.Empty : str.Substring(1, str.Length - 1));
+      interpreter.StringStack.Top = str.Length == 1 ? string.Empty : str.Substring(1, str.Length - 1);
     }
   }
@@ -258,5 +261,5 @@
     public override void Eval(IInternalPushInterpreter interpreter) {
       var str = interpreter.StringStack.Top;
-      interpreter.StringStack.SetTop(str.Length == 1 ? string.Empty : str.Substring(0, str.Length - 1));
+      interpreter.StringStack.Top = str.Length == 1 ? string.Empty : str.Substring(0, str.Length - 1);
     }
   }
@@ -287,9 +290,11 @@
 
     public override bool IsNoop(IInternalPushInterpreter interpreter) {
-      return interpreter.StringStack.IsEmpty;
-    }
-
-    public override void Eval(IInternalPushInterpreter interpreter) {
-      interpreter.StringStack.SetTop(interpreter.StringStack.Top.Reverse().ToString());
+      return interpreter.StringStack.IsEmpty || interpreter.StringStack.Top.Length <= 1;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      var chars = interpreter.StringStack.Top.ToArray();
+      Array.Reverse(chars);
+      interpreter.StringStack.Top = new string(chars);
     }
   }
@@ -313,5 +318,5 @@
 
       var str = interpreter.StringStack.Top;
-      interpreter.StringStack.SetTop(str[0].ToString());
+      interpreter.StringStack.Top = str[0].ToString();
 
       if (str.Length > 1) {
@@ -334,13 +339,21 @@
 
     public override bool IsNoop(IInternalPushInterpreter interpreter) {
-      return interpreter.StringStack.IsEmpty ||
-             interpreter.StringStack.Top.Trim().Split().Length <= 1;
-    }
-
-    public override void Eval(IInternalPushInterpreter interpreter) {
-      var words = interpreter.StringStack.Top.Trim().Split();
-
-      interpreter.StringStack.SetTop(words[0]);
-      interpreter.StringStack.Push(words, 1);
+      return interpreter.StringStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      var words = interpreter.StringStack.Top
+        .Trim()
+        .Split()
+        .Where(x => !string.IsNullOrWhiteSpace(x))
+        .Reverse()
+        .ToArray();
+
+      if (words.Length == 0) {
+        interpreter.StringStack.Pop();
+      } else {
+        interpreter.StringStack.Top = words[0];
+        interpreter.StringStack.Push(words, 1);
+      }
     }
   }
@@ -439,5 +452,5 @@
   /// </summary>
   [StorableClass]
-  [PushExpression(StackTypes.String, "STRING.OCCURENCESOFCHAR", StackTypes.Integer | StackTypes.Char)]
+  [PushExpression(StackTypes.String, "STRING.OCCURRENCESOFCHAR", StackTypes.Integer | StackTypes.Char)]
   public class StringOccurrencesOfCharExpression : StatelessExpression {
     public StringOccurrencesOfCharExpression() { }
@@ -477,26 +490,24 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
-      var first = interpreter.StringStack[1];
-      var second = interpreter.StringStack.Top;
+      var third = interpreter.StringStack[2];
+      var second = interpreter.StringStack[1];
+      var first = interpreter.StringStack[0];
       interpreter.StringStack.Remove(2);
 
-      if (first.Length == 0 || second.Length == 0)
-        interpreter.StringStack.SetTop(first);
-      else {
-        var result = first.Replace(second, interpreter.StringStack.Top);
-        interpreter.StringStack.SetTop(result);
-      }
-    }
-  }
-
-  /// <summary>
-  /// In third string on stack, replaces first occurence of second string with first string
+      interpreter.StringStack.Top = third.Length == 0 || second.Length == 0
+        ? third
+        : third.Replace(second, first);
+    }
+  }
+
+  /// <summary>
+  /// In third string on stack, replaces first occurrence of second string with first string
   /// </summary>
   [StorableClass]
   [PushExpression(StackTypes.String, "STRING.REPLACEFIRST")]
-  public class StringReplaceLastExpression : StatelessExpression {
-    public StringReplaceLastExpression() { }
-    [StorableConstructor]
-    protected StringReplaceLastExpression(bool deserializing) : base(deserializing) { }
+  public class StringReplaceFirstExpression : StatelessExpression {
+    public StringReplaceFirstExpression() { }
+    [StorableConstructor]
+    protected StringReplaceFirstExpression(bool deserializing) : base(deserializing) { }
 
     public override bool IsNoop(IInternalPushInterpreter interpreter) {
@@ -505,24 +516,22 @@
 
     public override void Eval(IInternalPushInterpreter interpreter) {
+      var third = interpreter.StringStack[2];
+      var second = interpreter.StringStack[1];
       var first = interpreter.StringStack[0];
-      var second = interpreter.StringStack[1];
-      var third = interpreter.StringStack[2];
       interpreter.StringStack.Remove(2);
 
-      var result = ReplaceFirst(third, second, first);
-      interpreter.StringStack.SetTop(result);
+      interpreter.StringStack.Top = third.Length == 0 || second.Length == 0
+        ? third
+        : ReplaceFirst(third, second, first);
     }
 
     private static string ReplaceFirst(string text, string search, string replace) {
-      int pos = text.IndexOf(search);
-      if (pos < 0) {
-        return text;
-      }
-      return text.Substring(0, pos) + replace + text.Substring(pos + search.Length);
-    }
-  }
-
-  /// <summary>
-  /// In top string on stack, replaces all occurences of second char with first char
+      var pos = text.IndexOf(search, StringComparison.Ordinal);
+      return pos < 0 ? text : text.Substring(0, pos) + replace + text.Substring(pos + search.Length);
+    }
+  }
+
+  /// <summary>
+  /// In top string on stack, replaces all occurrences of second char with first char
   /// </summary>
   [StorableClass]
@@ -544,17 +553,17 @@
 
       var result = interpreter.StringStack.Top.Replace(first, second);
-      interpreter.StringStack.SetTop(result);
-    }
-  }
-
-  /// <summary>
-  /// In top string on stack, replaces first occurence of second char with first char
+      interpreter.StringStack.Top = result;
+    }
+  }
+
+  /// <summary>
+  /// In top string on stack, replaces first occurrence of second char with first char
   /// </summary>
   [StorableClass]
   [PushExpression(StackTypes.String, "STRING.REPLACEFIRSTCHAR", StackTypes.Char)]
-  public class StringReplaceLastCharExpression : StatelessExpression {
-    public StringReplaceLastCharExpression() { }
-    [StorableConstructor]
-    protected StringReplaceLastCharExpression(bool deserializing) : base(deserializing) { }
+  public class StringReplaceFirstCharExpression : StatelessExpression {
+    public StringReplaceFirstCharExpression() { }
+    [StorableConstructor]
+    protected StringReplaceFirstCharExpression(bool deserializing) : base(deserializing) { }
 
     public override bool IsNoop(IInternalPushInterpreter interpreter) {
@@ -576,12 +585,12 @@
       var result = str.Substring(0, pos) +
                    second +
-                   str.Substring(Math.Min(pos + 2, str.Length - 1));
-
-      interpreter.StringStack.SetTop(result);
-    }
-  }
-
-  /// <summary>
-  /// In top string on stack, remove all occurences of char
+                   str.Substring(Math.Min(pos + 1, str.Length - 1));
+
+      interpreter.StringStack.Top = result;
+    }
+  }
+
+  /// <summary>
+  /// In top string on stack, remove all occurrences of char
   /// </summary>
   [StorableClass]
@@ -600,10 +609,10 @@
       var c = interpreter.CharStack.Pop();
       var result = interpreter.StringStack.Top.Trim(c);
-      interpreter.StringStack.SetTop(result);
-    }
-  }
-
-  /// <summary>
-  /// Returns a function that sets char at index in string
+      interpreter.StringStack.Top = result;
+    }
+  }
+
+  /// <summary>
+  /// Sets char at index in string
   /// </summary>
   [StorableClass]
@@ -622,16 +631,53 @@
     public override void Eval(IInternalPushInterpreter interpreter) {
       var str = interpreter.StringStack.Top;
-      var i = (int)interpreter.IntegerStack.Pop();
       var c = interpreter.CharStack.Pop();
-
-      if (str.Length == 0) {
-        interpreter.StringStack.Pop();
+      var x = interpreter.IntegerStack.Pop();
+
+      if (str.Length == 0) return;
+      if (str.Length == 1) {
+        interpreter.StringStack.Top = c.ToString();
         return;
       }
 
-      var pos = str.Length == 1 ? 0 : Math.Abs(i) % (str.Length - 1);
-      var result = str.Substring(0, pos) + c + str.Substring(Math.Min(pos + 2, str.Length - 1));
-
-      interpreter.StringStack.SetTop(result);
+      var pos = x.AsInt(str.Length);
+      var result = str.Substring(0, pos) + c + str.Substring(Math.Min(pos + 1, str.Length - 1));
+
+      interpreter.StringStack.Top = result;
+    }
+  }
+
+  /// <summary>
+  /// Iterates over a string using the code on the exec stack.
+  /// </summary>
+  [StorableClass]
+  [PushExpression(StackTypes.String, "STRING.ITERATE", StackTypes.Exec | StackTypes.Char, execIn: 1)]
+  public class StringIterateExpression : StatelessExpression {
+    public StringIterateExpression() { }
+    [StorableConstructor]
+    protected StringIterateExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.StringStack.IsEmpty ||
+             interpreter.ExecStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      var str = interpreter.StringStack.Pop();
+
+      if (str.Length == 0) {
+        interpreter.ExecStack.Pop();
+      }
+      // If the rest of the string is empty, we're done iterating.
+      else if (str.Length == 1) {
+        interpreter.CharStack.Push(str[0]);
+      } else {
+        var pool = interpreter.PoolContainer.GetStatefulExpressionPool<StringPushExpression>();
+
+        interpreter.CharStack.Push(str[0]);
+        interpreter.ExecStack.Push(
+          this,
+          StringPushExpression.Create(pool, str.Substring(1)),
+          interpreter.ExecStack.Top);
+      }
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/SwapExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/SwapExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/SwapExpressions.cs	(revision 15017)
@@ -88,5 +88,5 @@
 
   [StorableClass]
-  [PushExpression(StackTypes.Exec, "EXEC.SWAP")]
+  [PushExpression(StackTypes.Exec, "EXEC.SWAP", execIn: 2)]
   public class ExecSwapExpression : SwapExpression<Expression> {
     public ExecSwapExpression() { }
@@ -153,5 +153,5 @@
   [StorableClass]
   [PushExpression(StackTypes.IntegerVector, "INTEGER[].SWAP")]
-  public class IntegerVectorSwapExpression : SwapExpression<List<long>> {
+  public class IntegerVectorSwapExpression : SwapExpression<IReadOnlyList<long>> {
     public IntegerVectorSwapExpression() { }
     [StorableConstructor]
@@ -169,5 +169,5 @@
   [StorableClass]
   [PushExpression(StackTypes.FloatVector, "FLOAT[].SWAP")]
-  public class FloatVectorSwapExpression : SwapExpression<List<double>> {
+  public class FloatVectorSwapExpression : SwapExpression<IReadOnlyList<double>> {
     public FloatVectorSwapExpression() { }
     [StorableConstructor]
@@ -185,5 +185,5 @@
   [StorableClass]
   [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].SWAP")]
-  public class BooleanVectorSwapExpression : SwapExpression<List<bool>> {
+  public class BooleanVectorSwapExpression : SwapExpression<IReadOnlyList<bool>> {
     public BooleanVectorSwapExpression() { }
     [StorableConstructor]
@@ -201,5 +201,5 @@
   [StorableClass]
   [PushExpression(StackTypes.StringVector, "STRING[].SWAP")]
-  public class StringVectorSwapExpression : SwapExpression<List<string>> {
+  public class StringVectorSwapExpression : SwapExpression<IReadOnlyList<string>> {
     public StringVectorSwapExpression() { }
     [StorableConstructor]
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorButLastExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorButLastExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorButLastExpressions.cs	(revision 15017)
@@ -1,4 +1,5 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
   using System.Collections.Generic;
+  using System.Linq;
 
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -17,11 +18,12 @@
     protected VectorButLastExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IPushStack<List<T>> vectorStack) {
+    protected bool IsNoop(IPushStack<IReadOnlyList<T>> vectorStack) {
       return vectorStack.IsEmpty || vectorStack.Top.Count < 2;
     }
 
-    protected void Eval(IPushStack<List<T>> vectorStack) {
-      var result = vectorStack.Top.GetRange(0, vectorStack.Top.Count - 1);
-      vectorStack.SetTop(result);
+    protected void Eval(IPushStack<IReadOnlyList<T>> vectorStack) {
+      vectorStack.Top = vectorStack.Top
+        .Take(vectorStack.Top.Count - 1)
+        .ToArray();
     }
   }
@@ -76,5 +78,5 @@
 
   [StorableClass]
-  [PushExpression(StackTypes.StringVector, "String[].BUTLAST")]
+  [PushExpression(StackTypes.StringVector, "STRING[].BUTLAST")]
   public class StringVectorButLastExpression : VectorButLastExpression<string> {
     public StringVectorButLastExpression() { }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorConcatExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorConcatExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorConcatExpressions.cs	(revision 15017)
@@ -16,17 +16,17 @@
     protected VectorConcatExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IInternalPushInterpreter interpreter, IPushStack<List<T>> vectorStack) {
+    protected bool IsNoop(IInternalPushInterpreter interpreter, IPushStack<IReadOnlyList<T>> vectorStack) {
       return vectorStack.Count < 2 ||
              vectorStack.Top.Count + vectorStack[1].Count > interpreter.Configuration.MaxVectorLength;
     }
 
-    protected void Eval(IInternalPushInterpreter interpter, IPushStack<List<T>> vectorStack) {
+    protected void Eval(IInternalPushInterpreter interpter, IPushStack<IReadOnlyList<T>> vectorStack) {
       var first = vectorStack.Pop();
       var second = vectorStack.Top;
-      var result = new T[first.Count + second.Count];
+      var result = new List<T>(second.Count + first.Count);
+      result.AddRange(second);
+      result.AddRange(first);
 
-      first.CopyTo(result, 0);
-      second.CopyTo(result, first.Count);
-      vectorStack.SetTop(new List<T>(result));
+      vectorStack.Top = result;
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorConjExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorConjExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorConjExpressions.cs	(revision 15017)
@@ -16,5 +16,5 @@
     protected VectorConjExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IInternalPushInterpreter interpreter, IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
+    protected bool IsNoop(IInternalPushInterpreter interpreter, IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
       return vectorStack.IsEmpty ||
              literalStack.IsEmpty ||
@@ -22,7 +22,7 @@
     }
 
-    protected void Eval(IInternalPushInterpreter interpreter, IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
+    protected void Eval(IInternalPushInterpreter interpreter, IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
       var literal = literalStack.Pop();
-      vectorStack.Top.Add(literal);
+      vectorStack.Top = new List<T>(vectorStack.Top) { literal };
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorContainsExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorContainsExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorContainsExpressions.cs	(revision 15017)
@@ -2,4 +2,6 @@
 
 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
+  using System.Linq;
+
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
@@ -17,14 +19,14 @@
     protected VectorContainsExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
+    protected bool IsNoop(IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
       return vectorStack.IsEmpty || literalStack.IsEmpty;
     }
 
-    protected void Eval(IInternalPushInterpreter interpreter, IPushStack<List<T>> vectorStack, IPushStack<T> literalStack, bool canOverride = false) {
+    protected void Eval(IInternalPushInterpreter interpreter, IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack, bool canOverride = false) {
       var vector = vectorStack.Pop();
       var literal = canOverride ? literalStack.Top : literalStack.Pop();
       var contains = vector.Contains(literal);
 
-      if (canOverride) interpreter.BooleanStack.SetTop(contains);
+      if (canOverride) interpreter.BooleanStack.Top = contains;
       else interpreter.BooleanStack.Push(contains);
     }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorEmptyExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorEmptyExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorEmptyExpressions.cs	(revision 15017)
@@ -17,9 +17,9 @@
     protected VectorEmptyVectorExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IPushStack<List<T>> vectorStack) {
+    protected bool IsNoop(IPushStack<IReadOnlyList<T>> vectorStack) {
       return vectorStack.IsEmpty;
     }
 
-    protected void Eval(IInternalPushInterpreter interpreter, IPushStack<List<T>> vectorStack) {
+    protected void Eval(IInternalPushInterpreter interpreter, IPushStack<IReadOnlyList<T>> vectorStack) {
       var vector = vectorStack.Pop();
       interpreter.BooleanStack.Push(vector.Count == 0);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorFirstExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorFirstExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorFirstExpressions.cs	(revision 15017)
@@ -17,9 +17,9 @@
     protected VectorFirstExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IPushStack<List<T>> vectorStack) {
+    protected bool IsNoop(IPushStack<IReadOnlyList<T>> vectorStack) {
       return vectorStack.IsEmpty || vectorStack.Top.Count == 0;
     }
 
-    protected void Eval(IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
+    protected void Eval(IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
       var vector = vectorStack.Pop();
       literalStack.Push(vector[0]);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorIndexOfExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorIndexOfExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorIndexOfExpressions.cs	(revision 15017)
@@ -17,5 +17,5 @@
     protected VectorIndexOfExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
+    protected bool IsNoop(IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
       return vectorStack.IsEmpty || literalStack.IsEmpty;
     }
@@ -23,13 +23,20 @@
     protected void Eval(
       IInternalPushInterpreter interpreter,
-      IPushStack<List<T>> vectorStack,
+      IPushStack<IReadOnlyList<T>> vectorStack,
       IPushStack<T> literalStack,
       bool canOverride = false) {
       var vector = vectorStack.Pop();
       var literal = canOverride ? literalStack.Top : literalStack.Pop();
-      var result = vector.IndexOf(literal);
 
-      if (canOverride) interpreter.IntegerStack.SetTop(result);
-      else interpreter.IntegerStack.Push(result);
+      var index = -1;
+      for (var i = 0; i < vector.Count && index < 0; i++) {
+        if (vector[i].Equals(literal)) {
+          index = i;
+          break;
+        }
+      }
+
+      if (canOverride) interpreter.IntegerStack.Top = index;
+      else interpreter.IntegerStack.Push(index);
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorIterateExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorIterateExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorIterateExpressions.cs	(revision 15017)
@@ -2,4 +2,7 @@
 
 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
+  using System;
+  using System.Linq;
+
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
@@ -18,9 +21,9 @@
     protected VectorIterateExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IInternalPushInterpreter interpter, IPushStack<List<T>> vectorStack) {
+    protected bool IsNoop(IInternalPushInterpreter interpter, IPushStack<IReadOnlyList<T>> vectorStack) {
       return vectorStack.IsEmpty || interpter.ExecStack.IsEmpty;
     }
 
-    protected void Eval(IInternalPushInterpreter interpter, IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
+    protected void Eval(IInternalPushInterpreter interpter, IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
       var vector = vectorStack.Top;
 
@@ -36,5 +39,22 @@
         var last = vector.Count - 1;
         literalStack.Push(vector[last]);
-        vector.RemoveAt(last);
+
+        var list = vector as List<T>;
+        if (list != null) {
+          var newTop = new T[last];
+          list.CopyTo(0, newTop, 0, last);
+          vectorStack.Top = newTop;
+          return;
+        }
+
+        var array = vector as T[];
+        if (array != null) {
+          var newTop = new T[last];
+          Array.Copy(array, 0, newTop, 0, last);
+          vectorStack.Top = newTop;
+          return;
+        }
+
+        vectorStack.Top = vector.Take(last).ToArray();
       }
     }
@@ -42,5 +62,5 @@
 
   [StorableClass]
-  [PushExpression(StackTypes.IntegerVector, "INTEGER[].ITERATE", StackTypes.Integer | StackTypes.Exec)]
+  [PushExpression(StackTypes.IntegerVector, "INTEGER[].ITERATE", StackTypes.Integer | StackTypes.Exec, execIn: 1)]
   public class IntegerVectorIterateExpression : VectorIterateExpression<long> {
     public IntegerVectorIterateExpression() { }
@@ -58,5 +78,5 @@
 
   [StorableClass]
-  [PushExpression(StackTypes.FloatVector, "FLOAT[].ITERATE", StackTypes.Float | StackTypes.Exec)]
+  [PushExpression(StackTypes.FloatVector, "FLOAT[].ITERATE", StackTypes.Float | StackTypes.Exec, execIn: 1)]
   public class FloatVectorIterateExpression : VectorIterateExpression<double> {
     public FloatVectorIterateExpression() { }
@@ -74,5 +94,5 @@
 
   [StorableClass]
-  [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].ITERATE", StackTypes.Boolean | StackTypes.Exec)]
+  [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].ITERATE", StackTypes.Boolean | StackTypes.Exec, execIn: 1)]
   public class BooleanVectorIterateExpression : VectorIterateExpression<bool> {
     public BooleanVectorIterateExpression() { }
@@ -90,5 +110,5 @@
 
   [StorableClass]
-  [PushExpression(StackTypes.StringVector, "STRING[].ITERATE", StackTypes.String | StackTypes.Exec)]
+  [PushExpression(StackTypes.StringVector, "STRING[].ITERATE", StackTypes.String | StackTypes.Exec, execIn: 1)]
   public class StringVectorIterateExpression : VectorIterateExpression<string> {
     public StringVectorIterateExpression() { }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorLastExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorLastExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorLastExpressions.cs	(revision 15017)
@@ -17,9 +17,9 @@
     protected VectorLastExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IPushStack<List<T>> vectorStack) {
+    protected bool IsNoop(IPushStack<IReadOnlyList<T>> vectorStack) {
       return vectorStack.IsEmpty || vectorStack.Top.Count == 0;
     }
 
-    protected void Eval(IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
+    protected void Eval(IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
       var vector = vectorStack.Pop();
       literalStack.Push(vector[vector.Count - 1]);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorLengthExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorLengthExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorLengthExpressions.cs	(revision 15017)
@@ -17,9 +17,9 @@
     protected VectorLengthExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IPushStack<List<T>> vectorStack) {
+    protected bool IsNoop(IPushStack<IReadOnlyList<T>> vectorStack) {
       return vectorStack.IsEmpty;
     }
 
-    protected void Eval(IInternalPushInterpreter interpreter, IPushStack<List<T>> vectorStack) {
+    protected void Eval(IInternalPushInterpreter interpreter, IPushStack<IReadOnlyList<T>> vectorStack) {
       var length = vectorStack.Pop().Count;
       interpreter.IntegerStack.Push(length);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorNthExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorNthExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorNthExpressions.cs	(revision 15017)
@@ -2,6 +2,8 @@
 
 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
+
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Extensions;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
@@ -17,18 +19,23 @@
     protected VectorNthExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IInternalPushInterpreter interpreter, IPushStack<List<T>> vectorStack) {
-      return vectorStack.IsEmpty || vectorStack.Top.Count == 0 || interpreter.IntegerStack.IsEmpty;
+    protected bool IsNoop(IInternalPushInterpreter interpreter, IPushStack<IReadOnlyList<T>> vectorStack) {
+      return vectorStack.IsEmpty ||
+             vectorStack.Top.Count == 0 ||
+             interpreter.IntegerStack.IsEmpty;
     }
 
     protected void Eval(
       IInternalPushInterpreter interpreter,
-      IPushStack<List<T>> vectorStack,
+      IPushStack<IReadOnlyList<T>> vectorStack,
       IPushStack<T> literalStack) {
       var vector = vectorStack.Pop();
-      var n = (int)interpreter.IntegerStack.Pop() % vector.Count;
 
-      if (n < 0) n = n + vector.Count;
-
-      literalStack.Push(vector[n]);
+      if (literalStack == interpreter.IntegerStack) {
+        var n = interpreter.IntegerStack.Top.AsInt(vector.Count);
+        literalStack.Top = vector[n];
+      } else {
+        var n = interpreter.IntegerStack.Pop().AsInt(vector.Count);
+        literalStack.Push(vector[n]);
+      }
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorOccurrenceOfExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorOccurrenceOfExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorOccurrenceOfExpressions.cs	(revision 15017)
@@ -17,5 +17,5 @@
     protected VectorOccurrenceOfExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
+    protected bool IsNoop(IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
       return vectorStack.IsEmpty || literalStack.IsEmpty;
     }
@@ -23,5 +23,5 @@
     protected void Eval(
       IInternalPushInterpreter interpreter,
-      IPushStack<List<T>> vectorStack,
+      IPushStack<IReadOnlyList<T>> vectorStack,
       IPushStack<T> literalStack,
       bool canOverride = false) {
@@ -34,5 +34,5 @@
       }
 
-      if (canOverride) interpreter.IntegerStack.SetTop(occurrence);
+      if (canOverride) interpreter.IntegerStack.Top = occurrence;
       else interpreter.IntegerStack.Push(occurrence);
     }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorPushAllExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorPushAllExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorPushAllExpressions.cs	(revision 15017)
@@ -1,4 +1,5 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
   using System.Collections.Generic;
+  using System.Linq;
 
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -17,11 +18,10 @@
     protected VectorPushAllExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IPushStack<List<T>> vectorStack) {
+    protected bool IsNoop(IPushStack<IReadOnlyList<T>> vectorStack) {
       return vectorStack.IsEmpty;
     }
 
-    protected void Eval(IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
-      var vector = vectorStack.Pop();
-      vector.Reverse();
+    protected void Eval(IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
+      var vector = vectorStack.Pop().Reverse().ToArray();
       literalStack.Push(vector);
     }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorRemoveExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorRemoveExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorRemoveExpressions.cs	(revision 15017)
@@ -2,4 +2,6 @@
 
 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
+  using System.Linq;
+
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
@@ -17,11 +19,11 @@
     protected VectorRemoveExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
+    protected bool IsNoop(IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
       return vectorStack.IsEmpty || literalStack.IsEmpty;
     }
 
-    protected void Eval(IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
+    protected void Eval(IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
       var literal = literalStack.Pop();
-      vectorStack.Top.RemoveAll(x => x.Equals(literal));
+      vectorStack.Top = vectorStack.Top.Where(x => !x.Equals(literal)).ToArray();
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorReplaceExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorReplaceExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorReplaceExpressions.cs	(revision 15017)
@@ -17,9 +17,9 @@
     protected VectorReplaceExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
+    protected bool IsNoop(IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
       return vectorStack.IsEmpty || literalStack.Count < 2;
     }
 
-    protected void Eval(IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
+    protected void Eval(IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
       var vector = vectorStack.Top;
       var first = literalStack.Top;
@@ -27,8 +27,11 @@
       literalStack.Remove(2);
 
+      var result = new List<T>(vector);
       for (var i = 0; i < vector.Count; i++) {
         if (vector[i].Equals(second))
-          vector[i] = first;
+          result[i] = first;
       }
+
+      vectorStack.Top = result;
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorReplaceFirstExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorReplaceFirstExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorReplaceFirstExpressions.cs	(revision 15017)
@@ -17,17 +17,27 @@
     protected VectorReplaceFirstExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
+    protected bool IsNoop(IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
       return vectorStack.IsEmpty || literalStack.Count < 2;
     }
 
-    protected void Eval(IPushStack<List<T>> vectorStack, IPushStack<T> literalStack) {
+    protected void Eval(IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack) {
       var vector = vectorStack.Top;
       var first = literalStack.Top;
       var second = literalStack[1];
-      var index = vector.IndexOf(second);
       literalStack.Remove(2);
 
-      if (index >= 0)
-        vector[index] = first;
+      var index = -1;
+      for (var i = 0; i < vector.Count && index < 0; i++) {
+        if (vector[i].Equals(second)) {
+          index = i;
+          break;
+        }
+      }
+
+      if (index >= 0) {
+        var result = new List<T>(vector);
+        result[index] = first;
+        vectorStack.Top = result;
+      }
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorRestExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorRestExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorRestExpressions.cs	(revision 15017)
@@ -1,4 +1,6 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
+  using System;
   using System.Collections.Generic;
+  using System.Linq;
 
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -17,11 +19,28 @@
     protected VectorRestExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IPushStack<List<T>> vectorStack) {
+    protected bool IsNoop(IPushStack<IReadOnlyList<T>> vectorStack) {
       return vectorStack.IsEmpty || vectorStack.Top.Count < 2;
     }
 
-    protected void Eval(IPushStack<List<T>> vectorStack) {
-      var result = vectorStack.Top.GetRange(1, vectorStack.Top.Count - 1);
-      vectorStack.SetTop(result);
+    protected void Eval(IPushStack<IReadOnlyList<T>> vectorStack) {
+      var vector = vectorStack.Top;
+      var list = vector as List<T>;
+      var newLength = vector.Count - 1;
+      if (list != null) {
+        var newTop = new T[newLength];
+        list.CopyTo(1, newTop, 0, newLength);
+        vectorStack.Top = newTop;
+        return;
+      }
+
+      var array = vector as T[];
+      if (array != null) {
+        var newTop = new T[newLength];
+        Array.Copy(array, 1, newTop, 0, newLength);
+        vectorStack.Top = newTop;
+        return;
+      }
+
+      vectorStack.Top = vector.Skip(1).ToArray();
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorReverseExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorReverseExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorReverseExpressions.cs	(revision 15017)
@@ -2,4 +2,6 @@
 
 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
+  using System.Linq;
+
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
@@ -18,10 +20,10 @@
     protected VectorReverseExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IPushStack<List<T>> vectorStack) {
-      return vectorStack.IsEmpty;
+    protected bool IsNoop(IPushStack<IReadOnlyList<T>> vectorStack) {
+      return vectorStack.IsEmpty || vectorStack.Top.Count < 2;
     }
 
-    protected void Eval(IPushStack<List<T>> vectorStack) {
-      vectorStack.Top.Reverse();
+    protected void Eval(IPushStack<IReadOnlyList<T>> vectorStack) {
+      vectorStack.Top = vectorStack.Top.Reverse().ToArray();
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorSetExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorSetExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorSetExpressions.cs	(revision 15017)
@@ -4,4 +4,5 @@
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Extensions;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
@@ -17,5 +18,5 @@
     protected VectorSetExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IInternalPushInterpreter interpreter, IPushStack<List<T>> vectorStack, IPushStack<T> literalStack, bool isLiteralTypeInteger = false) {
+    protected bool IsNoop(IInternalPushInterpreter interpreter, IPushStack<IReadOnlyList<T>> vectorStack, IPushStack<T> literalStack, bool isLiteralTypeInteger = false) {
       return vectorStack.IsEmpty ||
              vectorStack.Top.Count == 0 ||
@@ -27,26 +28,28 @@
     protected void Eval(
       IInternalPushInterpreter interpreter,
-      IPushStack<List<T>> vectorStack,
+      IPushStack<IReadOnlyList<T>> vectorStack,
       IPushStack<T> literalStack,
       bool isLiteralTypeInteger = false) {
       T literal;
-      int index;
+      long x;
 
       if (isLiteralTypeInteger) {
         literal = literalStack.Top;
-        index = (int)interpreter.IntegerStack[1];
+        x = interpreter.IntegerStack[1];
         interpreter.IntegerStack.Remove(2);
       } else {
         literal = literalStack.Pop();
-        index = (int)interpreter.IntegerStack.Pop();
+        x = interpreter.IntegerStack.Pop();
       }
 
-      var vector = vectorStack.Pop();
-      index = index % vector.Count;
+      var vector = vectorStack.Top;
+      var newTop = new List<T>(vector);
+      var index = x.AsInt(vector.Count);
 
       if (index < 0)
         index *= -1;
 
-      vector[index] = literal;
+      newTop[index] = literal;
+      vectorStack.Top = newTop;
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorSubExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorSubExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorSubExpressions.cs	(revision 15017)
@@ -3,4 +3,5 @@
 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
   using System;
+  using System.Linq;
 
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -19,9 +20,9 @@
     protected VectorSubExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IInternalPushInterpreter interpreter, IPushStack<List<T>> vectorStack) {
+    protected bool IsNoop(IInternalPushInterpreter interpreter, IPushStack<IReadOnlyList<T>> vectorStack) {
       return vectorStack.IsEmpty || interpreter.IntegerStack.Count < 2;
     }
 
-    protected void Eval(IInternalPushInterpreter interpreter, IPushStack<List<T>> vectorStack) {
+    protected void Eval(IInternalPushInterpreter interpreter, IPushStack<IReadOnlyList<T>> vectorStack) {
       var first = (int)Math.Min(vectorStack.Top.Count, Math.Max(0, interpreter.IntegerStack[1]));
       var second = (int)Math.Min(vectorStack.Top.Count, Math.Max(first, interpreter.IntegerStack.Top));
@@ -31,6 +32,24 @@
         return;
 
-      var result = vectorStack.Top.GetRange(first, second - first);
-      vectorStack.SetTop(result);
+      var vector = vectorStack.Top;
+      var list = vector as List<T>;
+      var lenght = second - first;
+
+      if (list != null) {
+        var newTop = new T[lenght];
+        list.CopyTo(first, newTop, 0, lenght);
+        vectorStack.Top = newTop;
+        return;
+      }
+
+      var array = vector as T[];
+      if (array != null) {
+        var newTop = new T[lenght];
+        Array.Copy(array, first, newTop, 0, lenght);
+        vectorStack.Top = newTop;
+        return;
+      }
+
+      vectorStack.Top = vector.Skip(first).Take(lenght).ToArray();
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorTakeExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorTakeExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorTakeExpressions.cs	(revision 15017)
@@ -2,6 +2,10 @@
 
 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
+  using System;
+  using System.Linq;
+
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Extensions;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
@@ -17,21 +21,37 @@
     protected VectorTakeExpression(bool deserializing) : base(deserializing) { }
 
-    protected bool IsNoop(IInternalPushInterpreter interpreter, IPushStack<List<T>> vectorStack) {
+    protected bool IsNoop(IInternalPushInterpreter interpreter, IPushStack<IReadOnlyList<T>> vectorStack) {
       return vectorStack.IsEmpty || interpreter.IntegerStack.IsEmpty;
     }
 
-    protected void Eval(IInternalPushInterpreter interpreter, IPushStack<List<T>> vectorStack) {
-      var count = (int)interpreter.IntegerStack.Pop();
+    protected void Eval(IInternalPushInterpreter interpreter, IPushStack<IReadOnlyList<T>> vectorStack) {
 
       if (vectorStack.Top.Count == 0)
         return;
 
-      count %= vectorStack.Top.Count;
+      var count = interpreter.IntegerStack.Pop().AsInt(vectorStack.Top.Count);
 
       if (count < 0)
         count *= -1;
 
-      var result = vectorStack.Top.GetRange(0, count);
-      vectorStack.SetTop(result);
+      var vector = vectorStack.Top;
+      var list = vector as List<T>;
+
+      if (list != null) {
+        var newTop = new T[count];
+        list.CopyTo(0, newTop, 0, count);
+        vectorStack.Top = newTop;
+        return;
+      }
+
+      var array = vector as T[];
+      if (array != null) {
+        var newTop = new T[count];
+        Array.Copy(array, 0, newTop, 0, count);
+        vectorStack.Top = newTop;
+        return;
+      }
+
+      vectorStack.Top = vector.Take(count).ToArray();
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/YankDuplicateExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/YankDuplicateExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/YankDuplicateExpressions.cs	(revision 15017)
@@ -5,4 +5,5 @@
 
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Extensions;
 
   using Interpreter;
@@ -26,5 +27,5 @@
 
     protected void Eval(IPushStack<T> stack, IPushStack<long> integerStack) {
-      var index = (int)Math.Abs(integerStack.Pop() % stack.Count);
+      var index = integerStack.Pop().AsInt(stack.Count);
       stack.Push(stack[index]);
     }
@@ -96,5 +97,5 @@
 
   [StorableClass]
-  [PushExpression(StackTypes.Exec, "EXEC.YANKDUP", StackTypes.Integer)]
+  [PushExpression(StackTypes.Exec, "EXEC.YANKDUP", StackTypes.Integer, execIn: 0)]
   public class ExecYankDuplicateExpression : YankDuplicateExpression<Expression> {
     public ExecYankDuplicateExpression() { }
@@ -161,5 +162,5 @@
   [StorableClass]
   [PushExpression(StackTypes.IntegerVector, "INTEGER[].YANKDUP", StackTypes.Integer)]
-  public class IntegerVectorYankDuplicateExpression : YankDuplicateExpression<List<long>> {
+  public class IntegerVectorYankDuplicateExpression : YankDuplicateExpression<IReadOnlyList<long>> {
     public IntegerVectorYankDuplicateExpression() { }
     [StorableConstructor]
@@ -177,5 +178,5 @@
   [StorableClass]
   [PushExpression(StackTypes.FloatVector, "FLOAT[].YANKDUP", StackTypes.Integer)]
-  public class FloatVectorYankDuplicateExpression : YankDuplicateExpression<List<double>> {
+  public class FloatVectorYankDuplicateExpression : YankDuplicateExpression<IReadOnlyList<double>> {
     public FloatVectorYankDuplicateExpression() { }
     [StorableConstructor]
@@ -193,5 +194,5 @@
   [StorableClass]
   [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].YANKDUP", StackTypes.Integer)]
-  public class BooleanVectorYankDuplicateExpression : YankDuplicateExpression<List<bool>> {
+  public class BooleanVectorYankDuplicateExpression : YankDuplicateExpression<IReadOnlyList<bool>> {
     public BooleanVectorYankDuplicateExpression() { }
     [StorableConstructor]
@@ -209,5 +210,5 @@
   [StorableClass]
   [PushExpression(StackTypes.StringVector, "STRING[].YANKDUP", StackTypes.Integer)]
-  public class StringVectorYankDuplicateExpression : YankDuplicateExpression<List<string>> {
+  public class StringVectorYankDuplicateExpression : YankDuplicateExpression<IReadOnlyList<string>> {
     public StringVectorYankDuplicateExpression() { }
     [StorableConstructor]
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/YankExpressions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/YankExpressions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/YankExpressions.cs	(revision 15017)
@@ -5,4 +5,5 @@
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Extensions;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
@@ -25,5 +26,5 @@
 
     protected void Eval(IPushStack<T> stack, IPushStack<long> integerStack) {
-      var index = (int)Math.Abs(integerStack.Pop() % stack.Count);
+      var index = integerStack.Pop().AsInt(stack.Count);
       stack.Yank(index);
     }
@@ -95,5 +96,5 @@
 
   [StorableClass]
-  [PushExpression(StackTypes.Exec, "EXEC.YANK", StackTypes.Integer)]
+  [PushExpression(StackTypes.Exec, "EXEC.YANK", StackTypes.Integer, execIn: 0)]
   public class ExecYankExpression : YankExpression<Expression> {
     public ExecYankExpression() { }
@@ -160,5 +161,5 @@
   [StorableClass]
   [PushExpression(StackTypes.IntegerVector, "INTEGER[].YANK", StackTypes.Integer)]
-  public class IntegerVectorYankExpression : YankExpression<List<long>> {
+  public class IntegerVectorYankExpression : YankExpression<IReadOnlyList<long>> {
     public IntegerVectorYankExpression() { }
     [StorableConstructor]
@@ -176,5 +177,5 @@
   [StorableClass]
   [PushExpression(StackTypes.FloatVector, "FLOAT[].YANK", StackTypes.Integer)]
-  public class FloatVectorYankExpression : YankExpression<List<double>> {
+  public class FloatVectorYankExpression : YankExpression<IReadOnlyList<double>> {
     public FloatVectorYankExpression() { }
     [StorableConstructor]
@@ -192,5 +193,5 @@
   [StorableClass]
   [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].YANK", StackTypes.Integer)]
-  public class BooleanVectorYankExpression : YankExpression<List<bool>> {
+  public class BooleanVectorYankExpression : YankExpression<IReadOnlyList<bool>> {
     public BooleanVectorYankExpression() { }
     [StorableConstructor]
@@ -208,5 +209,5 @@
   [StorableClass]
   [PushExpression(StackTypes.StringVector, "STRING[].YANK", StackTypes.Integer)]
-  public class StringVectorYankExpression : YankExpression<List<string>> {
+  public class StringVectorYankExpression : YankExpression<IReadOnlyList<string>> {
     public StringVectorYankExpression() { }
     [StorableConstructor]
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Extensions/CharExtentions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Extensions/CharExtentions.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Extensions/CharExtentions.cs	(revision 15017)
@@ -0,0 +1,17 @@
+﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Extensions {
+  public static class CharExtentions {
+    public static string Printify(this char c) {
+      switch (c) {
+        case '\0': return "\\0";
+        case '\a': return "\\a";
+        case '\b': return "\\b";
+        case '\f': return "\\f";
+        case '\n': return "\\n";
+        case '\r': return "\\r";
+        case '\t': return "\\t";
+        case '\v': return "\\v";
+        default: return c.ToString();
+      }
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Extensions/CollectionExtensions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Extensions/CollectionExtensions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Extensions/CollectionExtensions.cs	(revision 15017)
@@ -12,4 +12,22 @@
       return source[x];
     }
+
+    public static int HashCode<T>(this IReadOnlyList<T> source) {
+      var hash = 19 * 31 + typeof(T).FullName.GetHashCode();
+
+      for (var i = 0; i < source.Count; i++)
+        hash = hash * 31 + source[i].GetHashCode();
+
+      return hash;
+    }
+
+    public static int HashCode<T>(this IEnumerable<T> source) {
+      var hash = 19 * 31 + typeof(T).FullName.GetHashCode();
+
+      foreach (var item in source)
+        hash = hash * 31 + item.GetHashCode();
+
+      return hash;
+    }
   }
 }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Extensions/LongExtensions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Extensions/LongExtensions.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Extensions/LongExtensions.cs	(revision 15017)
@@ -0,0 +1,9 @@
+﻿using System;
+
+namespace HeuristicLab.Problems.ProgramSynthesis.Push.Extensions {
+  public static class LongExtensions {
+    public static int AsInt(this long value, int length) {
+      return (int)Math.Abs(value % length);
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Extensions/RandomExtensions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Extensions/RandomExtensions.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Extensions/RandomExtensions.cs	(revision 15017)
@@ -0,0 +1,20 @@
+﻿using System;
+
+namespace HeuristicLab.Problems.ProgramSynthesis.Push.Extensions {
+  using HeuristicLab.Core;
+
+  public static class RandomExtensions {
+    /// <summary>
+    /// Generates a random biased towards min
+    /// <see href="https://gamedev.stackexchange.com/questions/116832/random-number-in-a-range-biased-toward-the-low-end-of-the-range">Source</see>
+    /// </summary>
+    /// <param name="min">Minimum random int</param>
+    /// <param name="max">Maximum random int</param>
+    /// <param name="biasLevel">The bigger this values is, the bigger is the probability that min will be generated</param>
+    /// <param name="random">Random number generater</param>
+    /// <returns></returns>
+    public static int NextBiased(this IRandom random, int min, int max, double biasLevel) {
+      return (int)(min + (max - min) * Math.Pow(random.NextDouble(), biasLevel));
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Generators/CodeGenerator/CodeGeneratorUtils.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Generators/CodeGenerator/CodeGeneratorUtils.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Generators/CodeGenerator/CodeGeneratorUtils.cs	(revision 15017)
@@ -96,4 +96,19 @@
             : new CharPushExpression(ercOptions.CharErcOptions.GetErcValue(random));
 
+        case StackTypes.IntegerVector:
+          return ercOptions.IntegerVectorErcOptions == null || !ercOptions.IntegerVectorErcOptions.IsEnabled
+            ? Noop
+            : new IntegerVectorPushExpression(ercOptions.IntegerVectorErcOptions.GetErcValue(random).Select(i => (long)i).ToList());
+
+        case StackTypes.FloatVector:
+          return ercOptions.FloatVectorErcOptions == null || !ercOptions.FloatVectorErcOptions.IsEnabled
+            ? Noop
+            : new FloatVectorPushExpression(ercOptions.FloatVectorErcOptions.GetErcValue(random));
+
+        case StackTypes.StringVector:
+          return ercOptions.StringVectorErcOptions == null || !ercOptions.StringVectorErcOptions.IsEnabled
+            ? Noop
+            : new StringVectorPushExpression(ercOptions.StringVectorErcOptions.GetErcValue(random));
+
         default:
           return Noop;
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/Extensions.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/Extensions.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/Extensions.cs	(revision 15017)
@@ -34,9 +34,13 @@
 
       foreach (StackTypes type in Enum.GetValues(stackTypesType)) {
+        if (!interpreter.Stacks.ContainsKey(type)) continue;
+
         var stackName = Enum.GetName(stackTypesType, type);
         var stack = interpreter.Stacks[type];
 
-        if (stack.IsEmpty || !stack.IsEnabled) return;
-        Console.WriteLine("--------- {0} ---------\n{1}\n", stackName, stack);
+        if (stack.IsEmpty || !stack.IsEnabled) continue;
+
+        var stackString = string.Join(" ", interpreter.StringifyStack(type).Reverse());
+        Console.WriteLine("--------- {0} ---------\n{1}\n", stackName, stackString);
       }
 
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/IPushInterpreter.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/IPushInterpreter.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/IPushInterpreter.cs	(revision 15017)
@@ -20,8 +20,8 @@
     IPushStack<char> CharStack { get; }
     IPushStack<string> StringStack { get; }
-    IPushStack<List<long>> IntegerVectorStack { get; }
-    IPushStack<List<double>> FloatVectorStack { get; }
-    IPushStack<List<bool>> BooleanVectorStack { get; }
-    IPushStack<List<string>> StringVectorStack { get; }
+    IPushStack<IReadOnlyList<long>> IntegerVectorStack { get; }
+    IPushStack<IReadOnlyList<double>> FloatVectorStack { get; }
+    IPushStack<IReadOnlyList<bool>> BooleanVectorStack { get; }
+    IPushStack<IReadOnlyList<string>> StringVectorStack { get; }
     IPushStack<string> PrintStack { get; }
     IDictionary<string, Expression> CustomExpressions { get; }
@@ -30,4 +30,6 @@
     void Clear();
     void Reset();
+
+    void Run(bool stepwise);
     void Run(string code, bool stepwise = false);
     void Run(Expression expression, bool stepwise = false);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/InterpreterPoolContainer.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/InterpreterPoolContainer.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/InterpreterPoolContainer.cs	(revision 15017)
@@ -8,5 +8,4 @@
   public class InterpreterPoolContainer {
     private readonly ManagedPoolProvider<PushProgram> pushProgramPoolProvider;
-    private readonly ManagedPoolProvider<LoopState> loopStatePoolProvider;
     private readonly ManagedPoolProvider<PooledList<Expression>> expressionListPoolProvider;
 
@@ -19,5 +18,4 @@
     public InterpreterPoolContainer(int partitionSize = 512, int maxPartitionCount = 1024) {
       pushProgramPoolProvider = new ManagedPoolProvider<PushProgram>(partitionSize, () => new PushProgram(), maxPartitionCount);
-      loopStatePoolProvider = new ManagedPoolProvider<LoopState>(partitionSize, () => new LoopState(), maxPartitionCount);
       expressionListPoolProvider = new ManagedPoolProvider<PooledList<Expression>>(partitionSize, () => new PooledList<Expression>(), maxPartitionCount);
 
@@ -27,8 +25,6 @@
     public InterpreterPoolContainer(
       ManagedPoolProvider<PushProgram> pushProgramPoolProvider,
-      ManagedPoolProvider<LoopState> loopStatePoolProvider,
       ManagedPoolProvider<PooledList<Expression>> expressionListPoolProvider) {
       this.pushProgramPoolProvider = pushProgramPoolProvider;
-      this.loopStatePoolProvider = loopStatePoolProvider;
       this.expressionListPoolProvider = expressionListPoolProvider;
 
@@ -43,14 +39,4 @@
         if (pushProgramPool == null) pushProgramPool = pushProgramPoolProvider.CreatePool();
         return pushProgramPool;
-      }
-    }
-
-    private IManagedPool<LoopState> loopStatePool;
-    public IManagedPool<LoopState> LoopStatePool
-    {
-      get
-      {
-        if (loopStatePool == null) loopStatePool = loopStatePoolProvider.CreatePool();
-        return loopStatePool;
       }
     }
@@ -96,9 +82,4 @@
       }
 
-      if (loopStatePool != null) {
-        loopStatePool.Dispose();
-        loopStatePool = null;
-      }
-
       if (expressionListPool != null) {
         expressionListPool.Dispose();
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/PushInterpreter.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/PushInterpreter.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/PushInterpreter.cs	(revision 15017)
@@ -5,18 +5,12 @@
   using System.Threading;
   using System.Threading.Tasks;
+  using Attributes;
   using Configuration;
   using Core;
   using Expressions;
-
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
-
   using Parser;
   using Random;
   using Stack;
 
-#if DEBUG
-  using System.Diagnostics;
-  using System.Linq;
-#endif
 
   public class PushInterpreter : IInternalPushInterpreter, IDisposable {
@@ -24,6 +18,5 @@
 
     public PushInterpreter(IReadOnlyPushConfiguration config = null, IRandom random = null, InterpreterPoolContainer poolContainer = null) {
-      Random = random ?? new FastRandom();
-
+      Random = random ?? new MersenneTwister();
       Configuration = config ?? new PushConfiguration();
 
@@ -59,17 +52,17 @@
       };
 
-      IntegerVectorStack = new PushStack<List<long>> {
+      IntegerVectorStack = new PushStack<IReadOnlyList<long>> {
         IsEnabled = Configuration.EnabledStacks[StackTypes.IntegerVector]
       };
 
-      FloatVectorStack = new PushStack<List<double>> {
+      FloatVectorStack = new PushStack<IReadOnlyList<double>> {
         IsEnabled = Configuration.EnabledStacks[StackTypes.FloatVector]
       };
 
-      BooleanVectorStack = new PushStack<List<bool>> {
+      BooleanVectorStack = new PushStack<IReadOnlyList<bool>> {
         IsEnabled = Configuration.EnabledStacks[StackTypes.BooleanVector]
       };
 
-      StringVectorStack = new PushStack<List<string>> {
+      StringVectorStack = new PushStack<IReadOnlyList<string>> {
         IsEnabled = Configuration.EnabledStacks[StackTypes.StringVector]
       };
@@ -88,9 +81,9 @@
         { StackTypes.String, StringStack },
         { StackTypes.Name, NameStack },
+        { StackTypes.Print, PrintStack },
         { StackTypes.IntegerVector, IntegerVectorStack },
         { StackTypes.FloatVector, FloatVectorStack },
         { StackTypes.BooleanVector, BooleanVectorStack },
         { StackTypes.StringVector, StringVectorStack },
-        { StackTypes.Print, PrintStack },
       };
 
@@ -160,11 +153,11 @@
     public IPushStack<string> StringStack { get; private set; }
     [PushStack(StackTypes.IntegerVector)]
-    public IPushStack<List<long>> IntegerVectorStack { get; private set; }
+    public IPushStack<IReadOnlyList<long>> IntegerVectorStack { get; private set; }
     [PushStack(StackTypes.FloatVector)]
-    public IPushStack<List<double>> FloatVectorStack { get; private set; }
+    public IPushStack<IReadOnlyList<double>> FloatVectorStack { get; private set; }
     [PushStack(StackTypes.BooleanVector)]
-    public IPushStack<List<bool>> BooleanVectorStack { get; private set; }
+    public IPushStack<IReadOnlyList<bool>> BooleanVectorStack { get; private set; }
     [PushStack(StackTypes.StringVector)]
-    public IPushStack<List<string>> StringVectorStack { get; private set; }
+    public IPushStack<IReadOnlyList<string>> StringVectorStack { get; private set; }
     [PushStack(StackTypes.Print)]
     public IPushStack<string> PrintStack { get; private set; }
@@ -186,4 +179,8 @@
       var program = PushParser.Parse(code);
       Run(program, stepwise);
+    }
+
+    public void Run(bool stepwise) {
+      Run(PushProgram.Empty, stepwise);
     }
 
@@ -322,27 +319,4 @@
     }
 
-#if DEBUG
-    private Expression last;
-    private bool DoStep() {
-      double[] bk;
-      if (!FloatStack.IsEmpty) {
-        bk = FloatStack.Peek(Math.Min(FloatStack.Count, 3));
-      }
-
-      var expression = ExecStack.Pop();
-      var succ = expression.TryEval(this);
-
-      if ((ExecStack.Count > 0 && ExecStack.Top == null) ||
-          (CodeStack.Count > 0 && CodeStack.Top == null) ||
-          FloatStack.Any(x => double.IsNaN(x) || double.IsInfinity(x)) ||
-          StringStack.Count > 0 && StringStack.Any(x => x == null)) {
-        Debugger.Break();
-      }
-
-      ExecCounter++;
-      last = expression;
-      return succ;
-    }
-#else
     [MethodImpl(MethodImplOptions.AggressiveInlining)]
     private bool DoStep() {
@@ -350,5 +324,4 @@
       return ExecStack.Pop().TryEval(this);
     }
-#endif
 
     [MethodImpl(MethodImplOptions.AggressiveInlining)]
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/PushInterpreterPool.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/PushInterpreterPool.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/PushInterpreterPool.cs	(revision 15017)
@@ -11,5 +11,4 @@
 
     public readonly ManagedPoolProvider<PushProgram> PushProgramPoolProvider;
-    public readonly ManagedPoolProvider<LoopState> LoopStatePoolProvider;
     public readonly ManagedPoolProvider<PooledList<Expression>> ExpressionListPoolProvider;
 
@@ -19,17 +18,16 @@
 
     public PushInterpreterPool(int size, int poolPartitionSize, int? maxPartitionCount = null, IReadOnlyPushConfiguration config = null) {
-      PushGpConfiguration = config ?? new PushConfiguration();
+      PushConfiguration = config ?? new PushConfiguration();
 
       PushProgramPoolProvider = new ManagedPoolProvider<PushProgram>(poolPartitionSize, () => new PushProgram(), maxPartitionCount);
-      LoopStatePoolProvider = new ManagedPoolProvider<LoopState>(poolPartitionSize, () => new LoopState(), maxPartitionCount);
-      ExpressionListPoolProvider = new ManagedPoolProvider<PooledList<Expression>>(poolPartitionSize * 2, () => new PooledList<Expression>(), maxPartitionCount);
+      ExpressionListPoolProvider = new ManagedPoolProvider<PooledList<Expression>>(poolPartitionSize, () => new PooledList<Expression>(), maxPartitionCount);
 
       pool = new ObjectPool<PooledPushInterpreter>(() => {
-        var poolContainer = new InterpreterPoolContainer(PushProgramPoolProvider, LoopStatePoolProvider, ExpressionListPoolProvider);
-        return new PooledPushInterpreter(this, PushGpConfiguration, poolContainer);
+        var poolContainer = new InterpreterPoolContainer(PushProgramPoolProvider, ExpressionListPoolProvider);
+        return new PooledPushInterpreter(this, PushConfiguration, poolContainer);
       }, size);
     }
 
-    public IReadOnlyPushConfiguration PushGpConfiguration { get; private set; }
+    public IReadOnlyPushConfiguration PushConfiguration { get; private set; }
 
     public PooledPushInterpreter Create(IRandom random = null) {
@@ -41,5 +39,11 @@
 
     public void Free(PooledPushInterpreter interpreter) {
+      interpreter.Random = null;
       pool.Free(interpreter);
+    }
+
+    public void Clear() {
+      PushProgramPoolProvider.Clear();
+      ExpressionListPoolProvider.Clear();
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Parser/PushParser.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Parser/PushParser.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Parser/PushParser.cs	(revision 15017)
@@ -1,13 +1,13 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Parser {
+  using System;
   using System.Collections.Generic;
   using System.Globalization;
   using System.Linq;
+  using System.Text.RegularExpressions;
+
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Constants;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
 
   public static class PushParser {
-    private const string openBrace = "(";
-
-    private const string closeBrace = ")";
-
     private const char delimiter = ' ';
 
@@ -17,8 +17,9 @@
 
     public static Expression Parse(string source, int startIndex = 0) {
-      var symbols = source.Split(delimiter);
+      bool error;
+      var symbols = GetSymbols(source, out error); // source.Split(delimiter);
 
       int endIndex;
-      return Parse(symbols, 0, out endIndex);
+      return Parse(symbols, startIndex, out endIndex);
     }
 
@@ -29,8 +30,81 @@
     }
 
-    private static Expression Parse(string[] symbols, int startIndex, out int endIndex) {
+    private static IReadOnlyList<string> GetSymbols(string source, out bool error) {
+      var chars = source.ToCharArray();
+      var symbols = new List<string>();
+
+      for (var i = 0; i < chars.Length; i++) {
+        var cur = chars[i];
+        int endIndex;
+        int length;
+        string str;
+
+        switch (cur) {
+          case delimiter: break;
+          case PushEnvironment.StringSymbol:
+            endIndex = source.IndexOf(PushEnvironment.StringSymbol, i + 1);
+            if (endIndex < i) {
+              error = true;
+              return symbols;
+            }
+
+            length = endIndex - i + 1;
+            str = source.Substring(i, length);
+            symbols.Add(str);
+            i += length; // skip following space
+
+            break;
+
+          case PushEnvironment.CharSymbol:
+            endIndex = source.IndexOf(PushEnvironment.CharSymbol, i + 1);
+            if (endIndex < i) {
+              error = true;
+              return symbols;
+            }
+
+            length = endIndex - i + 1;
+            str = source.Substring(i, length);
+            str = EscapeLikeALiteral(str);
+            symbols.Add(str);
+            i += length; // skip following space
+
+            break;
+
+          case PushEnvironment.VectorStartSymbol:
+            endIndex = source.IndexOf(PushEnvironment.VectorEndSymbol, i + 1);
+            if (endIndex < i) {
+              error = true;
+              return symbols;
+            }
+
+            length = endIndex - i + 1;
+            str = source.Substring(i, length);
+            symbols.Add(str);
+            i += length; // skip following space
+            break;
+
+          default:
+            endIndex = source.IndexOf(' ', i + 1);
+
+            length = endIndex < i
+              ? chars.Length - i
+              : endIndex - i;
+
+            str = source.Substring(i, length);
+            symbols.Add(str);
+            i += length; // skip following space
+
+            break;
+        }
+      }
+
+      error = true;
+      return symbols;
+    }
+
+    private static Expression Parse(IReadOnlyList<string> symbols, int startIndex, out int endIndex) {
       var expressions = new List<Expression>();
 
-      for (var i = startIndex; i < symbols.Length; i++) {
+      for (var i = startIndex; i < symbols.Count; i++) {
         var symbol = symbols[i].TrimEnd(symbolTrim);
 
@@ -38,10 +112,10 @@
 
         switch (symbol) {
-          case openBrace:
+          case PushEnvironment.ProgramStartSymbolStr:
             var subExpression = Parse(symbols, i + 1, out endIndex);
             expressions.Insert(0, subExpression);
             i = endIndex;
             continue;
-          case closeBrace:
+          case PushEnvironment.ProgramEndSymbolStr:
             endIndex = i;
             return new PushProgram(expressions);
@@ -66,5 +140,5 @@
       }
 
-      endIndex = symbols.Length - 1;
+      endIndex = symbols.Count - 1;
 
       switch (expressions.Count) {
@@ -79,25 +153,26 @@
 
     private static bool TryParseLiteral(string word, out Expression expression) {
-      if (word.StartsWith("'") && word.EndsWith("'") && word.Length == 3) {
-        expression = new CharPushExpression(word[1]);
-        return true;
-      }
-
-      if (word.StartsWith("\"") && word.EndsWith("\"")) {
-        expression = new StringPushExpression(word);
-        return true;
-      }
-
-      // "[]" has no values and can therefer not parsed correctly as vector of a specific type
-      if (word.StartsWith("[") && word.EndsWith("]") && word.Length > 3) {
+      if (word.StartsWith(PushEnvironment.CharSymbolStr) &&
+          word.EndsWith(PushEnvironment.CharSymbolStr) &&
+          word.Length == 3) {
+          expression = new CharPushExpression(word[1]);
+          return true;
+      }
+
+      if (word.StartsWith(PushEnvironment.StringSymbolStr) &&
+          word.EndsWith(PushEnvironment.StringSymbolStr)) {
+        var stringValue = word.Length == 0 ? string.Empty : word.Substring(1, word.Length - 2);
+        expression = new StringPushExpression(stringValue);
+        return true;
+      }
+
+      // "[]" has no values and can therefor not parsed correctly as vector of a specific type
+      if (word.StartsWith(PushEnvironment.VectorStartSymbolStr) &&
+          word.EndsWith(PushEnvironment.VectorEndSymbolStr) &&
+          word.Length > 2) {
+
         var vectorEntries = word
           .Substring(1, word.Length - 2)
-          .Split(',')
-          .Select(x => {
-            Expression e;
-            var success = TryParseLiteral(x.Trim(), out e);
-
-            return new { success, e, type = e.GetType() };
-          })
+          .Split(PushEnvironment.VectorSeparatorSymbol)
           .ToArray();
 
@@ -107,22 +182,29 @@
         }
 
-        var vectorEntryType = vectorEntries.First().type;
-        if (vectorEntries.Any(x => !x.success || x.type != vectorEntryType)) {
+        Expression e;
+        var first = vectorEntries.First();
+        if (!TryParseLiteral(first, out e)) {
           expression = null;
           return false;
         }
 
-        var result = vectorEntries
-          .Select(x => x.e)
-          .ToArray();
-
-        // TODO
-        //switch(vectorEntryType.GetHashCode())
-        //{
-        //  case typeof(IntegerPushExpression).GetHashCode(): return new IntegerVectorPushExpression(result)
-        //}
-
-        //expression = new StringPushExpression(word);
-        //return true;
+        if (e.GetType() == typeof(IntegerPushExpression)) {
+          var integerValues = vectorEntries.Select(long.Parse).ToArray();
+          expression = new IntegerVectorPushExpression(integerValues);
+        } else if (e.GetType() == typeof(FloatPushExpression)) {
+          var doubleValues = vectorEntries.Select(x => double.Parse(x, NumberStyles.Float, cultureInfo)).ToArray();
+          expression = new FloatVectorPushExpression(doubleValues);
+        } else if (e.GetType() == typeof(StringPushExpression)) {
+          var stringValues = vectorEntries.Select(str => str.Substring(1, str.Length - 2)).ToArray();
+          expression = new StringVectorPushExpression(stringValues);
+        } else if (e.GetType() == typeof(BooleanPushExpression)) {
+          var booleanValues = vectorEntries.Select(bool.Parse).ToArray();
+          expression = new BooleanVectorPushExpression(booleanValues);
+        } else {
+          expression = null;
+          return false;
+        }
+
+        return true;
       }
 
@@ -148,4 +230,24 @@
       return false;
     }
+
+    private static string EscapeLikeALiteral(string src) {
+      return Regex.Replace(src, @"\\(?<simple>['""\\0abfnrtv])", m => {
+        var s = m.Groups["simple"].Value;
+        switch (s) {
+          case "'": return "'";
+          case "\"": return "\"";
+          case "0": return "\0";
+          case "a": return "\a";
+          case "b": return "\b";
+          case "f": return "\f";
+          case "n": return "\n";
+          case "r": return "\r";
+          case "t": return "\t";
+          case "v": return "\v";
+          default:
+            throw new InvalidOperationException();
+        }
+      });
+    }
   }
 }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/BenchmarkSuitePushSolutionView.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/BenchmarkSuitePushSolutionView.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/BenchmarkSuitePushSolutionView.cs	(revision 15017)
@@ -10,4 +10,5 @@
   using HeuristicLab.BenchmarkSuite.Views;
   using HeuristicLab.Common;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Constants;
 
   using Interpreter;
@@ -237,7 +238,5 @@
 
         case ExampleArgumentType.Print:
-          var requiredLines = example.OutputPrint.Split(new[] { Environment.NewLine }, StringSplitOptions.None).Length;
-          var count = Math.Min(requiredLines, interpreter.PrintStack.Count);
-          return string.Join(valueSeparator, string.Join(Environment.NewLine, interpreter.PrintStack.Peek(count)));
+          return string.Join(valueSeparator, string.Join(PushEnvironment.NewLine, interpreter.PrintStack.Take(example.OutputPrintLineCount)));
 
         case ExampleArgumentType.String:
@@ -257,16 +256,8 @@
     }
 
-    private static string GetVectorEntryAsString<T>(int offset, IPushStack<List<T>> vectorStack) {
+    private static string GetVectorEntryAsString<T>(int offset, IPushStack<IReadOnlyList<T>> vectorStack) {
       return vectorStack.Count > offset
        ? "[" + string.Join(",", vectorStack[offset]) + "]"
        : string.Empty;
-    }
-
-    private int GetCount<T>(IPushStack<T> stack, T[] data) {
-      return Math.Max(0, Math.Min(data.Length, stack.Count));
-    }
-
-    private int GetVectorCount<T>(IPushStack<List<T>> stack, T[][] data) {
-      return Math.Max(0, Math.Min(data.Length, stack.Count));
     }
 
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/PushBenchmarkSuiteEvaluator.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/PushBenchmarkSuiteEvaluator.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/PushBenchmarkSuiteEvaluator.cs	(revision 15017)
@@ -12,4 +12,5 @@
   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Constants;
 
   using Interpreter;
@@ -78,5 +79,5 @@
     }
 
-    public EvaluationResult Evaluate(IPushInterpreter interpreter, PushProgram program, IRandom random, int start, int end) {
+    public EvaluationResult Evaluate(IPushInterpreter interpreter, PushProgram program, int start, int end) {
       var length = end - start;
       if (length <= 0) return null;
@@ -87,40 +88,40 @@
         var result = Evaluate(interpreter, program, i);
         evaluationResult.ExampleQualities[i - start] = result;
-        evaluationResult.TotalQuality += result;
+        evaluationResult.AvgQuality += result;
         interpreter.Reset();
       }
 
-      evaluationResult.TotalQuality /= length;
+      evaluationResult.AvgQuality /= length;
 
       return evaluationResult;
     }
 
-    public EvaluationResult EvaluateTest(IPushInterpreter interpreter, PushProgram program, IRandom random) {
-      return Evaluate(interpreter, program, random, DataBounds.TestRange.Start, DataBounds.TestRange.End);
+    public EvaluationResult EvaluateTest(IPushInterpreter interpreter, PushProgram program) {
+      return Evaluate(interpreter, program, DataBounds.TestRange.Start, DataBounds.TestRange.End);
     }
 
     public EvaluationResult EvaluateTest(IReadOnlyPushConfiguration config, PushProgram program, IRandom random) {
       var interpreter = new PushInterpreter(config, random);
-      return EvaluateTest(interpreter, program, random);
+      return EvaluateTest(interpreter, program);
     }
 
     public EvaluationResult EvaluateTest(PushInterpreterPool pool, PushProgram program, IRandom random) {
       using (var interpreter = pool.Create(random)) {
-        return EvaluateTest(interpreter, program, random);
-      }
-    }
-
-    public EvaluationResult EvaluateTraining(IPushInterpreter interpreter, PushProgram program, IRandom random) {
-      return Evaluate(interpreter, program, random, DataBounds.TrainingRange.Start, DataBounds.TrainingRange.End);
+        return EvaluateTest(interpreter, program);
+      }
+    }
+
+    public EvaluationResult EvaluateTraining(IPushInterpreter interpreter, PushProgram program) {
+      return Evaluate(interpreter, program, DataBounds.TrainingRange.Start, DataBounds.TrainingRange.End);
     }
 
     public EvaluationResult EvaluateTraining(IReadOnlyPushConfiguration config, PushProgram program, IRandom random) {
       var interpreter = new PushInterpreter(config, random);
-      return EvaluateTraining(interpreter, program, random);
+      return EvaluateTraining(interpreter, program);
     }
 
     public EvaluationResult EvaluateTraining(PushInterpreterPool pool, PushProgram program, IRandom random) {
       using (var interpreter = pool.Create(random)) {
-        return EvaluateTraining(interpreter, program, random);
+        return EvaluateTraining(interpreter, program);
       }
     }
@@ -134,18 +135,32 @@
       interpreter.CharStack.Push(example.InputChar);
       interpreter.StringStack.Push(example.InputString);
-      interpreter.StringVectorStack.Push(example.InputStringVector.Select(v => new List<string>(v)));
-      interpreter.IntegerVectorStack.Push(example.InputIntegerVector.Select(v => new List<long>(v)));
-      interpreter.FloatVectorStack.Push(example.InputFloatVector.Select(v => new List<double>(v)));
+      interpreter.StringVectorStack.Push(example.InputStringVector);
+      interpreter.IntegerVectorStack.Push(example.InputIntegerVector);
+      interpreter.FloatVectorStack.Push(example.InputFloatVector);
 
       interpreter.Run(program);
 
+      switch (Data.ProblemType) {
+        //case ProblemType.NumberIO:
+        //  if (interpreter.PrintStack.IsEmpty)
+        //    return Data.WorstResult;
+
+        //  double value;
+        //  var levenshteinDistance = GetPrintDiffer(example.OutputPrint, interpreter.PrintStack, example.OutputPrintLineCount, Data.WorstResult);
+        //  return levenshteinDistance + (double.TryParse(interpreter.PrintStack.Top, out value)
+        //    ? FloatDiffer(value, example.OutputFloat[0], example.OutputFloatPrecision)
+        //    : Data.WorstResult / 2);
+
+        case ProblemType.Median: return interpreter.PrintStack.IsEmpty ? 1 : interpreter.PrintStack.Top.Equals(example.OutputPrint) ? 0 : 1;
+      }
+
       var result = GetDiff(example.OutputInteger, interpreter.IntegerStack, Data.WorstResult, IntegerDiffer)
-                 + GetDiff(example.OutputFloat, interpreter.FloatStack, Data.WorstResult, FloatDiffer)
+                 + GetDiff(example.OutputFloat, interpreter.FloatStack, Data.WorstResult, (a, b) => FloatDiffer(a, b, example.OutputFloatPrecision))
                  + GetDiff(example.OutputBoolean, interpreter.BooleanStack, Data.WorstResult, BooleanDiffer)
                  + GetDiff(example.OutputString, interpreter.StringStack, Data.WorstResult, StringDiffer)
                  + GetDiff(example.OutputChar, interpreter.CharStack, Data.WorstResult, CharDiffer)
-                 + GetPrintDiffer(example.OutputPrint, interpreter.PrintStack)
+                 + GetPrintDiffer(example.OutputPrint, interpreter.PrintStack, example.OutputPrintLineCount, Data.WorstResult)
                  + GetVectorDiff(example.OutputIntegerVector, interpreter.IntegerVectorStack, Data.WorstResult, (a, b) => VectorDiffer(a, b, IntegerDiffer))
-                 + GetVectorDiff(example.OutputFloatVector, interpreter.FloatVectorStack, Data.WorstResult, (a, b) => VectorDiffer(a, b, FloatDiffer))
+                 + GetVectorDiff(example.OutputFloatVector, interpreter.FloatVectorStack, Data.WorstResult, (a, b) => VectorDiffer(a, b, (x, y) => FloatDiffer(x, y, example.OutputFloatVectorPrecision)))
                  + GetVectorDiff(example.OutputStringVector, interpreter.StringVectorStack, Data.WorstResult, (a, b) => VectorDiffer(a, b, StringDiffer));
 
@@ -153,11 +168,13 @@
     }
 
-    private static double FloatDiffer(double a, double b) {
-      var result = a - b;
-
-      if (result.IsAlmost(double.MinValue) || double.IsPositiveInfinity(result) || double.IsNaN(result))
+    private static double FloatDiffer(double a, double b, int digits) {
+      var result = Math.Round(a, digits) - Math.Round(b, digits);
+
+      // ReSharper disable once CompareOfFloatsByEqualityOperator
+      if (result == double.MinValue || double.IsPositiveInfinity(result) || double.IsNaN(result))
         return double.MaxValue;
 
-      if (result.IsAlmost(double.MaxValue) || double.IsNegativeInfinity(result))
+      // ReSharper disable once CompareOfFloatsByEqualityOperator
+      if (result == double.MaxValue || double.IsNegativeInfinity(result))
         return double.MinValue;
 
@@ -200,13 +217,12 @@
     }
 
-    private static readonly string[] separator = { "\n" };
-    private static double GetPrintDiffer(string estimated, IPushStack<string> printStack) {
-      var estimatedCount = estimated.Split(separator, StringSplitOptions.None).Length;
-      var printResult = string.Join(separator[0], printStack.Take(estimatedCount));
-
-      return LevenshteinDistance(estimated, printResult);
-    }
-
-    private static double GetVectorDiff<T>(IReadOnlyList<IReadOnlyList<T>> estimated, IPushStack<List<T>> resultStack, double worstResult, Func<IReadOnlyList<T>, IReadOnlyList<T>, double> differ)
+    private static double GetPrintDiffer(string estimated, IPushStack<string> printStack, int estimatedCount, double worstResult) {
+      var printResult = string.Join(PushEnvironment.NewLine, printStack.Take(estimatedCount));
+      var distance = LevenshteinDistance(estimated, printResult);
+
+      return Math.Min(distance, worstResult);
+    }
+
+    private static double GetVectorDiff<T>(IReadOnlyList<IReadOnlyList<T>> estimated, IPushStack<IReadOnlyList<T>> resultStack, double worstResult, Func<IReadOnlyList<T>, IReadOnlyList<T>, double> differ)
       where T : IComparable {
       if (estimated.Count == 0) return 0d;
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/PushBenchmarkSuiteProblem.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/PushBenchmarkSuiteProblem.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/PushBenchmarkSuiteProblem.cs	(revision 15017)
@@ -5,5 +5,5 @@
 
   using HeuristicLab.BenchmarkSuite;
-  using HeuristicLab.Encodings.IntegerVectorEncoding;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
 
   using Instances;
@@ -38,11 +38,11 @@
       PushEvaluator.LoadData(data);
 
-      BestKnownQuality = data.BestResult;
-      MaxPointsInProgram = data.MaxSize;
-      MinPointsInProgram = data.MaxSize;
-      EvalPushLimit = data.EvalLimit;
-      ErcOptions = data.ErcOptions;
       Name = "Push Problem: " + data.Name;
       Description = data.Description;
+      BestKnownQuality = data.BestResult;
+      config.MaxPointsInProgram = data.MaxSize;
+      config.EvalPushLimit = data.EvalLimit;
+      config.ErcOptions = data.ErcOptions;
+      config.FloatStringFormat = data.FloatStringFormat;
 
       config.SetEnabledStacks((StackTypes)data.EnabledDataTypes);
@@ -50,14 +50,15 @@
       Encoding.Bounds[0, 0] = 0;
       Encoding.Bounds[0, 1] = config.EnabledExpressions.Count;
-      Encoding.Length = config.MaxPointsInProgram;
+
+      InitProgramLength = data.MaxSize / 2;
     }
 
     protected override PushSolution CreatePushSolution(
-      IntegerVector vector,
+      PushProgram program,
       double bestQuality,
       IRandom random,
       IReadOnlyPushConfiguration config,
       IPushEvaluator evaluator) {
-      return new PushBenchmarkSuiteSolution(vector, bestQuality, random, (IReadOnlyPushConfiguration)config.Clone(), (PushBenchmarkSuiteEvaluator)PushEvaluator.Clone());
+      return new PushBenchmarkSuiteSolution(program, bestQuality, random, (IReadOnlyPushConfiguration)config.Clone(), (PushBenchmarkSuiteEvaluator)PushEvaluator.Clone());
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/PushBenchmarkSuiteSolution.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/PushBenchmarkSuiteSolution.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/PushBenchmarkSuiteSolution.cs	(revision 15017)
@@ -3,5 +3,7 @@
   using Configuration;
   using Core;
-  using Encodings.IntegerVectorEncoding;
+
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
+
   using Persistence.Default.CompositeSerializers.Storable;
 
@@ -9,10 +11,10 @@
   public class PushBenchmarkSuiteSolution : PushSolution {
     public PushBenchmarkSuiteSolution(
-      IntegerVector integerVector,
+      PushProgram program,
       double quality,
       IRandom random,
       IReadOnlyPushConfiguration config,
       PushBenchmarkSuiteEvaluator evaluator,
-      bool simplify = false) : base(integerVector, quality, random, config, evaluator, simplify) {
+      bool simplify = false) : base(program, quality, random, config, evaluator, simplify) {
     }
 
@@ -23,5 +25,5 @@
 
     public override PushSolution Simplify() {
-      return new PushBenchmarkSuiteSolution(IntegerVector, Quality, Random, Config, (PushBenchmarkSuiteEvaluator)Evaluator, true);
+      return new PushBenchmarkSuiteSolution(Program, Quality, Random, Config, (PushBenchmarkSuiteEvaluator)Evaluator, true);
     }
 
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/EvaluationResult.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/EvaluationResult.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/EvaluationResult.cs	(revision 15017)
@@ -6,5 +6,5 @@
 
 
-    public double TotalQuality { get; set; }
+    public double AvgQuality { get; set; }
     public double[] ExampleQualities { get; set; }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/IPushEvaluator.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/IPushEvaluator.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/IPushEvaluator.cs	(revision 15017)
@@ -8,8 +8,8 @@
   public interface IPushEvaluator : IDeepCloneable {
     EvaluationResult EvaluateTest(IReadOnlyPushConfiguration config, PushProgram program, IRandom random);
-    EvaluationResult EvaluateTest(IPushInterpreter interpreter, PushProgram program, IRandom random);
+    EvaluationResult EvaluateTest(IPushInterpreter interpreter, PushProgram program);
     EvaluationResult EvaluateTest(PushInterpreterPool pool, PushProgram program, IRandom random);
     EvaluationResult EvaluateTraining(IReadOnlyPushConfiguration config, PushProgram program, IRandom random);
-    EvaluationResult EvaluateTraining(IPushInterpreter interpreter, PushProgram program, IRandom random);
+    EvaluationResult EvaluateTraining(IPushInterpreter interpreter, PushProgram program);
     EvaluationResult EvaluateTraining(PushInterpreterPool pool, PushProgram program, IRandom random);
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/IndividualMapper.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/IndividualMapper.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/IndividualMapper.cs	(revision 15017)
@@ -1,3 +1,4 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Problem {
+  using System.Collections.Generic;
 
   using HeuristicLab.Core;
@@ -7,4 +8,5 @@
   using HeuristicLab.Problems.ProgramSynthesis.Push.Data.Pool;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Extensions;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Generators.CodeGenerator;
   using HeuristicLab.Random;
@@ -17,4 +19,8 @@
     public static PushProgram ToPushProgram(this Individual individual, IReadOnlyPushConfiguration config) {
       return individual.IntegerVector().ToPushProgram(config);
+    }
+
+    public static PushProgram ToPushProgram(this Individual individual, IReadOnlyPushConfiguration config, IRandom random) {
+      return individual.IntegerVector().ToPushProgram(config, random);
     }
 
@@ -35,19 +41,63 @@
     }
 
-    private static int GetSeed(this IntegerVector vector) {
-      var seed = 0;
+    public static int GetSeed(this IntegerVector vector) {
+      var seed = 17;
       for (var i = 0; i < vector.Length; i++)
-        seed += (i + 1) * vector[i];
+        seed = seed * 23 + vector[i];
       return seed;
     }
 
-    private static PushProgram ToPushProgram(this IntegerVector vector, IReadOnlyPushConfiguration config, IRandom random) {
-      var enabledExpressions = config.EnabledExpressions;
-      var ercOptions = config.ErcOptions;
-      //var programLength = random.Next(config.MinPointsInProgram, config.MaxPointsInProgram + 1);
-      var expressions = new Expression[vector.Length];
+    public static PushProgram ToPushProgram(this IntegerVector vector, IReadOnlyPushConfiguration config, IRandom random) {
+      var currentIndex = 0;
+      var close = 0;
 
-      for (var i = 0; i < vector.Length; i++)
-        expressions[i] = CodeGeneratorUtils.CreateExpressionOrErc(vector[i], random, enabledExpressions, ercOptions);
+      return FromPlush(vector, ref currentIndex, ref close, 0, config, random);
+    }
+
+    private static PushProgram FromPlush(IntegerVector vector, ref int currentIndex, ref int close, int depth, IReadOnlyPushConfiguration config, IRandom random) {
+      if (currentIndex >= vector.Length)
+        return PushProgram.Empty;
+
+      var expressions = new List<Expression>();
+
+      for (; currentIndex < vector.Length; currentIndex++) {
+        var expression = CodeGeneratorUtils.CreateExpressionOrErc(
+          vector[currentIndex] % config.EnabledExpressions.Count,
+          random,
+          config.EnabledExpressions,
+          config.ErcOptions);
+
+        var expressionType = expression.GetType();
+        close += random.NextBiased(0, config.MaxParenthesesClose, config.ParenthesesCloseBiasLevel);
+
+
+        // check if expression requires additional blocks
+        if (ExpressionTable.TypeToAttributeTable.ContainsKey(expressionType)) {
+          var attr = ExpressionTable.TypeToAttributeTable[expressionType];
+
+          for (var blockIdx = 0u; blockIdx < attr.ExecIn && currentIndex < vector.Length; blockIdx++) {
+            if (close != 0) {
+              close--;
+              expressions.Add(PushProgram.Empty);
+            } else {
+              currentIndex++;
+              var subProgram = FromPlush(vector, ref currentIndex, ref close, depth + 1, config, random);
+              var subExpression = subProgram.Count == 1 ? subProgram.Expressions[0] : subProgram;
+              expressions.Add(subExpression);
+            }
+          }
+        }
+
+        expressions.Add(expression);
+
+        if (close > 0 && depth > 0) {
+          close--;
+          break;
+        }
+
+        if (depth == 0) {
+          close = 0;
+        }
+      }
 
       return new PushProgram(expressions);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/PushProblem.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/PushProblem.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/PushProblem.cs	(revision 15017)
@@ -10,5 +10,5 @@
   using HeuristicLab.Data;
   using HeuristicLab.Encodings.IntegerVectorEncoding;
-  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Problem.BenchmarkSuite;
 
@@ -22,17 +22,16 @@
   public abstract class PushProblem : SingleObjectiveBasicProblem<IntegerVectorEncoding> {
     [Storable]
-    protected readonly PushConfiguration config;
+    protected readonly PushConfigurationParameterCollection config;
     protected PushInterpreterPool pool;
-    protected readonly ObjectPool<IRandom> randomPool = new ObjectPool<IRandom>(() => new MersenneTwister());
+    protected readonly ObjectPool<IRandom> randomPool = new ObjectPool<IRandom>(() => new MersenneTwister(), Environment.ProcessorCount * 4);
 
     [Storable]
     protected readonly IPushEvaluator PushEvaluator;
 
-    public const string CaseQualitiesScopeParameterName = "CaseQualities";
     private const string BestTrainingSolutionResultName = "Best Solution";
     private const string TestQualityResultName = "Test Quality";
 
     protected PushProblem(PushBenchmarkSuiteEvaluator evaluator) {
-      config = new PushConfiguration();
+      config = new PushConfigurationParameterCollection();
       PushEvaluator = evaluator;
 
@@ -40,4 +39,5 @@
       InitEvents();
       InitParameters();
+      InitEncoding();
     }
 
@@ -61,4 +61,5 @@
       InitData();
       InitEvents();
+      InitParameters();
     }
 
@@ -76,74 +77,47 @@
     }
 
+    public ILookupParameter<IntValue> SeedParamater
+    {
+      get { return (ILookupParameter<IntValue>)Parameters["Seed"]; }
+    }
+
     #region Parameters
-
-    private const string InstructionsParameterName = "Instructions";
-    private const string InstructionsParameterDescription = "Enables/Disables Instructions";
-    private const string EvalPushLimitParameterName = "EvalPushLimit";
-    private const string EvalPushLimitParameterDescription = "This is the maximum allowed number of \"executions\" in a single top-level call to the interpreter. The execution of a single Push instruction counts as one execution, as does the processing of a single literal, as does the descent into one layer of parentheses (that is, the processing of the \"(\" counts as one execution).";
-    private const string MinPointsInProgramParameterName = "MinProgramLength";
-    private const string MinProgramLengthParameterDescription = "This is the minimum size of an item on the CODE/EXEC stack, expressed as a number of points. A point is an instruction, a literal, or a pair of parentheses.";
-    private const string MaxPointsInProgramParameterName = "MaxProgramLength";
-    private const string MaxProgramLengthParameterDescription = "This is the maximum size of an item on the CODE/EXEC stack, expressed as a number of points. A point is an instruction, a literal, or a pair of parentheses.";
-    private const string TopLevelPushCodeParameterName = "TopLevelPushCode";
-    private const string TopLevelPushCodeParameterDescription = "When TRUE (which is the default), code passed to the top level of the interpreter will be pushed onto the CODE stack prior to execution.";
-    private const string TopLevelPopCodeParameterName = "TopLevelPopCode";
-    private const string TopLevelPopCodeParameterDescription = "When TRUE, the CODE stack will be popped at the end of top level calls to the interpreter. The default is FALSE.";
-    private const string MaxPointsInRandomInstructionParameterName = "MaxPointsInRandomInstruction";
-    private const string MaxPointsInRandomInstructionParameterDescription = "MaxPointsInRandomInstruction";
-    private const string ErcOptionsParameterName = "ERC options";
-    private const string MaxStringLengthParameterName = "Max. string length";
-    private const string MaxDepthParameterName = "Max. program recursion";
+    private const string InitProgramLengthParameterName = "InitProgramLength";
+    private const string InitProgramLengthParameterDescription = "This is the initial size of a push program.";
+
+    public const string CasesScopeParameterName = "CaseQualities";
+    public const string CaseQualitiesScopeParameterName = "CaseQualities";
 
     private void InitParameters() {
-      Parameters.Add(new ValueParameter<IEnabledExpressionsConfiguration>(
-        InstructionsParameterName,
-        InstructionsParameterDescription,
-        config));
-
-      Parameters.Add(new ValueParameter<ErcOptions>(ErcOptionsParameterName, config.ErcOptions));
-
-      Parameters.Add(new FixedValueParameter<IntValue>(
-        EvalPushLimitParameterName,
-        EvalPushLimitParameterDescription,
-        new IntValue(config.EvalPushLimit)));
-
-      Parameters.Add(new FixedValueParameter<IntValue>(
-        MinPointsInProgramParameterName,
-        MinProgramLengthParameterDescription,
-        new IntValue(config.MinPointsInProgram)) { Hidden = true });
-
-      Parameters.Add(new FixedValueParameter<IntValue>(
-        MaxPointsInProgramParameterName,
-        MaxProgramLengthParameterDescription,
-        new IntValue(config.MaxPointsInProgram)));
-      Encoding.LengthParameter = MaxPointsInProgramParameter as IFixedValueParameter<IntValue>;
-
-      Parameters.Add(new FixedValueParameter<BoolValue>(
-        TopLevelPushCodeParameterName,
-        TopLevelPushCodeParameterDescription,
-        new BoolValue(config.TopLevelPushCode)) { Hidden = true });
-
-      Parameters.Add(new FixedValueParameter<BoolValue>(
-        TopLevelPopCodeParameterName,
-        TopLevelPopCodeParameterDescription,
-        new BoolValue(config.TopLevelPopCode)) { Hidden = true });
-
-      Parameters.Add(new FixedValueParameter<IntValue>(
-        MaxPointsInRandomInstructionParameterName,
-        MaxPointsInRandomInstructionParameterDescription,
-        new IntValue(config.MaxPointsInRandomExpression)) { Hidden = true });
-
-      Parameters.Add(new FixedValueParameter<IntValue>(
-        MaxStringLengthParameterName,
-        new IntValue(config.MaxStringLength)) { Hidden = true });
-
-      Parameters.Add(new FixedValueParameter<IntValue>(
-        MaxDepthParameterName,
-        new IntValue(config.MaxDepth)) { Hidden = true });
-
-      Parameters.Add(new LookupParameter<BoolArray>("Cases", "The training cases that have been successfully executed."));
-      Parameters.Add(new LookupParameter<DoubleArray>(CaseQualitiesScopeParameterName, "The quality of every single training case for each individual"));
-
+      foreach (var paramater in config.Parameters) {
+        if (!Parameters.ContainsKey(paramater.Name)) {
+          Parameters.Add(paramater);
+        }
+      }
+
+      if (!Parameters.ContainsKey(InitProgramLengthParameterName)) {
+        Parameters.Add(new FixedValueParameter<IntValue>(
+          InitProgramLengthParameterName,
+          InitProgramLengthParameterDescription,
+          new IntValue(50)));
+      }
+
+      Encoding.LengthParameter = InitProgramLengthParameter as IFixedValueParameter<IntValue>;
+
+      if (!Parameters.ContainsKey(CasesScopeParameterName))
+        Parameters.Add(new LookupParameter<BoolArray>(CasesScopeParameterName, "The training cases that have been successfully executed."));
+
+      if (!Parameters.ContainsKey(CaseQualitiesScopeParameterName))
+        Parameters.Add(new LookupParameter<DoubleArray>(CaseQualitiesScopeParameterName, "The quality of every single training case for each individual"));
+    }
+
+    protected override void OnReset() {
+      base.OnReset();
+
+      // clear pools and free reserved memory
+      pool.Clear();
+    }
+
+    private void InitEncoding() {
       Encoding.Bounds[0, 0] = 0;
       Encoding.Bounds[0, 1] = config.EnabledExpressions.Count;
@@ -151,183 +125,18 @@
     }
 
-    public IValueParameter<IEnabledExpressionsConfiguration> InstructionsParameter
+    /// <summary>
+    ///     This is the inital size of an push program generated by a solution creator
+    /// </summary>
+    public IValueParameter<IntValue> InitProgramLengthParameter
     {
-      get { return (IValueParameter<IEnabledExpressionsConfiguration>)Parameters[InstructionsParameterName]; }
-    }
-
-    public IEnabledExpressionsConfiguration Instructions
+      get { return (IValueParameter<IntValue>)Parameters[InitProgramLengthParameterName]; }
+    }
+
+    public int InitProgramLength
     {
-      get { return InstructionsParameter.Value; }
-      set { InstructionsParameter.Value = value; }
-    }
-
-    public IValueParameter<ErcOptions> ErcOptionsParameter
-    {
-      get { return (IValueParameter<ErcOptions>)Parameters[ErcOptionsParameterName]; }
-    }
-
-    public ErcOptions ErcOptions
-    {
-      get { return config.ErcOptions; }
+      get { return InitProgramLengthParameter.Value.Value; }
       set
       {
-        ErcOptionsParameter.Value = value;
-        config.ErcOptions = value;
-      }
-    }
-
-    /// <summary>
-    ///     This is the maximum allowed number of "executions" in a single top-level call to the interpreter.
-    ///     The execution of a single Push instruction counts as one execution, as does the processing of a single literal,
-    ///     as does the descent into one layer of parentheses (that is, the processing of the "(" counts as one execution).
-    ///     When this limit is exceeded the interpreter aborts immediately, leaving its stacks in the states they were in prior
-    ///     to the abort (so they may still be examined by a calling program). Whether or not this counts as an "abnormal"
-    ///     termination
-    ///     is up to the calling program.
-    /// </summary>
-    public IValueParameter<IntValue> EvalPushLimitParameter
-    {
-      get { return (IValueParameter<IntValue>)Parameters[EvalPushLimitParameterName]; }
-    }
-
-    public int EvalPushLimit
-    {
-      get { return config.EvalPushLimit; }
-      set
-      {
-        EvalPushLimitParameter.Value.Value = value;
-        config.EvalPushLimit = value;
-      }
-    }
-
-    /// <summary>
-    /// This is the maximum of depth a push program can have. Expressions, which lead to exceed this limit are interpreted as NOOP.
-    /// </summary>
-    public IValueParameter<IntValue> MaxDepthParameter
-    {
-      get { return (IValueParameter<IntValue>)Parameters[MaxDepthParameterName]; }
-    }
-
-    public int MaxDepth
-    {
-      get { return config.MaxDepth; }
-      set
-      {
-        MaxDepthParameter.Value.Value = value;
-        config.MaxDepth = value;
-      }
-    }
-
-    /// <summary>
-    ///     This is the maximum size of an item on the CODE stack, expressed as a number of points.
-    ///     A point is an instruction, a literal, or a pair of parentheses. Any instruction that would cause this limit to be
-    ///     exceeded
-    ///     should instead act as a NOOP, leaving all stacks in the states that they were in before the execution of the
-    ///     instruction.
-    /// </summary>
-    public IValueParameter<IntValue> MaxPointsInProgramParameter
-    {
-      get { return (IValueParameter<IntValue>)Parameters[MaxPointsInProgramParameterName]; }
-    }
-
-    public int MaxPointsInProgram
-    {
-      get { return config.MaxPointsInProgram; }
-      set
-      {
-        MaxPointsInProgramParameter.Value.Value = value;
-        config.MaxPointsInProgram = value;
-      }
-    }
-
-    /// <summary>
-    ///     This is the minimum size of an item on the CODE stack, expressed as a number of points.
-    ///     A point is an instruction, a literal, or a pair of parentheses. Any instruction that would cause this limit to be
-    ///     exceeded
-    ///     should instead act as a NOOP, leaving all stacks in the states that they were in before the execution of the
-    ///     instruction.
-    /// </summary>
-    public IValueParameter<IntValue> MinPointsInProgramParameter
-    {
-      get { return (IValueParameter<IntValue>)Parameters[MinPointsInProgramParameterName]; }
-    }
-
-    public int MinPointsInProgram
-    {
-      get { return config.MaxPointsInProgram; }
-      set
-      {
-        MinPointsInProgramParameter.Value.Value = value;
-        config.MinPointsInProgram = value;
-      }
-    }
-
-    /// <summary>
-    ///     The maximum number of points in an expression produced by the CODE.RAND instruction.
-    /// </summary>
-    public IValueParameter<IntValue> MaxPointsInRandomExpressionParameter
-    {
-      get { return (IValueParameter<IntValue>)Parameters[MaxPointsInRandomInstructionParameterName]; }
-    }
-
-    public int MaxPointsInRandomExpression
-    {
-      get { return config.MaxPointsInRandomExpression; }
-      set
-      {
-        MaxPointsInRandomExpressionParameter.Value.Value = value;
-        config.MaxPointsInRandomExpression = value;
-      }
-    }
-
-    /// <summary>
-    ///     When TRUE (which is the default), code passed to the top level of the interpreter
-    ///     will be pushed onto the CODE stack prior to execution.
-    /// </summary>
-    public IValueParameter<BoolValue> TopLevelPushCodeParameter
-    {
-      get { return (IValueParameter<BoolValue>)Parameters[TopLevelPushCodeParameterName]; }
-    }
-
-    public bool TopLevelPushCode
-    {
-      get { return config.TopLevelPushCode; }
-      set
-      {
-        TopLevelPushCodeParameter.Value.Value = value;
-        config.TopLevelPushCode = value;
-      }
-    }
-
-    /// <summary>
-    ///     When TRUE, the CODE stack will be popped at the end of top level calls to the interpreter. The default is FALSE.
-    /// </summary>
-    public IValueParameter<BoolValue> TopLevelPopCodeParameter
-    {
-      get { return (IValueParameter<BoolValue>)Parameters[TopLevelPopCodeParameterName]; }
-    }
-
-    public bool TopLevelPopCode
-    {
-      get { return config.TopLevelPopCode; }
-      set
-      {
-        TopLevelPopCodeParameter.Value.Value = value;
-        config.TopLevelPopCode = value;
-      }
-    }
-
-    public IValueParameter<IntValue> MaxStringLengthParameter
-    {
-      get { return (IValueParameter<IntValue>)Parameters[MaxStringLengthParameterName]; }
-    }
-
-    public int MaxStringLength
-    {
-      get { return config.MaxStringLength; }
-      set
-      {
-        MaxStringLengthParameter.Value.Value = value;
-        config.MaxStringLength = value;
+        InitProgramLengthParameter.Value.Value = value;
       }
     }
@@ -339,33 +148,39 @@
       var bestQuality = Maximization ? qualities.Max() : qualities.Min();
       var bestIdx = Array.IndexOf(qualities, bestQuality);
-      var bestIndividual = individuals[bestIdx].IntegerVector();
-
-      var isIndividualBetter = AnalyzeBestTrainingSolution(bestIndividual, bestQuality, results, random);
+      var vector = individuals[bestIdx].IntegerVector();
+      var seed = vector.GetSeed();
+      var rand = randomPool.Allocate();
+      rand.Reset(seed);
+
+      var program = vector.ToPushProgram(config, rand);
+      var isIndividualBetter = AnalyzeBestTrainingSolution(program, bestQuality, results, rand);
 
       if (isIndividualBetter) {
-        AnalyzeBestTestSolution(bestIndividual, results, random);
-      }
-    }
-
-    private void AnalyzeBestTestSolution(IntegerVector bestIndividual, ResultCollection results, IRandom random) {
-      var program = bestIndividual.ToPushProgram(config, randomPool);
-      var testResult = PushEvaluator.EvaluateTest(pool, program, random);
+        rand.Reset(seed);
+        AnalyzeBestTestSolution(program, results, rand);
+      }
+
+      randomPool.Free(rand);
+    }
+
+    private void AnalyzeBestTestSolution(PushProgram program, ResultCollection results, IRandom random) {
+      var testResult = PushEvaluator.EvaluateTraining(pool, program, random);
 
       if (!results.ContainsKey(TestQualityResultName)) {
-        results.Add(new Result(TestQualityResultName, new DoubleValue(testResult.TotalQuality)));
+        results.Add(new Result(TestQualityResultName, new DoubleValue(testResult.AvgQuality)));
       } else {
-        ((DoubleValue)results[TestQualityResultName].Value).Value = testResult.TotalQuality;
-      }
-    }
-
-    private bool AnalyzeBestTrainingSolution(IntegerVector bestIndividual, double bestQuality, ResultCollection results, IRandom random) {
-      var solution = CreatePushSolution(
-        bestIndividual,
-        bestQuality,
-        random,
-        config,
-        PushEvaluator);
-
+        ((DoubleValue)results[TestQualityResultName].Value).Value = testResult.AvgQuality;
+      }
+    }
+
+    private bool AnalyzeBestTrainingSolution(PushProgram program, double bestQuality, ResultCollection results, IRandom random) {
       if (!results.ContainsKey(BestTrainingSolutionResultName)) {
+        var solution = CreatePushSolution(
+            program,
+            bestQuality,
+            random,
+            config,
+            PushEvaluator);
+
         results.Add(new Result(BestTrainingSolutionResultName, solution));
         return true;
@@ -374,7 +189,12 @@
       var currentBestQuality = ((PushSolution)results[BestTrainingSolutionResultName].Value).Quality;
 
-      if (Maximization && currentBestQuality < bestQuality ||
-         !Maximization && currentBestQuality > bestQuality) {
-        results[BestTrainingSolutionResultName].Value = solution;
+      if ((!Maximization && currentBestQuality > bestQuality) ||
+           (Maximization && currentBestQuality < bestQuality)) {
+        results[BestTrainingSolutionResultName].Value = CreatePushSolution(
+            program,
+            bestQuality,
+            random,
+            config,
+            PushEvaluator);
         return true;
       }
@@ -383,6 +203,18 @@
     }
 
+    private EvaluationResult EvaluateIntegerVector(IntegerVector vector) {
+      var rand = randomPool.Allocate();
+      var seed = vector.GetSeed();
+      rand.Reset(seed);
+
+      var program = vector.ToPushProgram(config, rand);
+      var result = PushEvaluator.EvaluateTraining(pool, program, rand);
+      randomPool.Free(rand);
+
+      return result;
+    }
+
     protected abstract PushSolution CreatePushSolution(
-      IntegerVector vector,
+      PushProgram program,
       double bestQuality,
       IRandom random,
@@ -391,10 +223,10 @@
 
     public override double Evaluate(Individual individual, IRandom random) {
-      var program = individual.ToPushProgram(config, randomPool);
-      var result = PushEvaluator.EvaluateTraining(pool, program, random);
+      var vector = individual.IntegerVector();
+      var result = EvaluateIntegerVector(vector);
 
       individual[CaseQualitiesScopeParameterName] = new DoubleArray(result.ExampleQualities);
 
-      return result.TotalQuality;
+      return result.AvgQuality;
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/PushSolution.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/PushSolution.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/PushSolution.cs	(revision 15017)
@@ -3,5 +3,4 @@
   using Configuration;
   using Core;
-  using Encodings.IntegerVectorEncoding;
   using Expressions;
   using Persistence.Default.CompositeSerializers.Storable;
@@ -12,6 +11,4 @@
     public readonly double Quality;
     [Storable]
-    public readonly IntegerVector IntegerVector;
-    [Storable]
     public readonly IRandom Random;
     [Storable]
@@ -21,11 +18,10 @@
     [Storable]
     protected readonly bool simplify;
-
+    [Storable]
     public PushProgram Program;
 
 
-    public PushSolution(IntegerVector integerVector, double quality, IRandom random, IReadOnlyPushConfiguration config, IPushEvaluator evaluator, bool simplify = false)
+    public PushSolution(PushProgram program, double quality, IRandom random, IReadOnlyPushConfiguration config, IPushEvaluator evaluator, bool simplify = false)
       : base("Solution", "A push solution.") {
-      IntegerVector = integerVector;
       Quality = quality;
       Random = random;
@@ -34,16 +30,12 @@
       this.simplify = simplify;
 
-      InitProgram();
-    }
+      Program = simplify
+        ? Simplifier.Simplifier.Simplify(program, Config, p => Evaluator.EvaluateTraining(Config, p, Random).AvgQuality)
+        : program;
 
-    private void InitProgram() {
-      Program = IntegerVector.ToPushProgram(Config);
-
-      if (simplify)
-        Program = Simplifier.Simplifier.Simplify(Program, Config, p => Evaluator.EvaluateTraining(Config, p, Random).TotalQuality);
     }
 
     public PushSolution(PushSolution origin, Cloner cloner) : base(origin, cloner) {
-      IntegerVector = cloner.Clone(origin.IntegerVector);
+      Program = cloner.Clone(origin.Program);
       Quality = origin.Quality;
       Random = cloner.Clone(origin.Random);
@@ -55,15 +47,9 @@
 
     public virtual PushSolution Simplify() {
-      return new PushSolution(IntegerVector, Quality, Random, Config, Evaluator, true);
+      return new PushSolution(Program, Quality, Random, Config, Evaluator, true);
     }
 
     [StorableConstructor]
     protected PushSolution(bool deserializing) : base(deserializing) { }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    // ReSharper disable once UnusedMember.Local
-    private void AfterDeserialization() {
-      InitProgram();
-    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Simplifier/Simplifier.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Simplifier/Simplifier.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Simplifier/Simplifier.cs	(revision 15017)
@@ -1,45 +1,52 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Simplifier {
   using System;
-  using System.Collections.Generic;
 
   using Expressions;
 
+  using HeuristicLab.Common;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Data.Tree;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
 
   public static class Simplifier {
     private static readonly TreeNode<Expression> NoopNode =
-      new TreeNode<Expression>(ExpressionTable.GetStatelessExpression<CodeNoopExpression>());
+      new TreeNode<Expression>(ExpressionTable.GetStatelessExpression<ExecNoopExpression>());
 
-    public static PushProgram Simplify(PushProgram program, IReadOnlyPushConfiguration config, Func<PushProgram, double> evaluator) {
+    public static PushProgram Simplify(PushProgram program, IReadOnlyPushConfiguration config, Func<PushProgram, double> evaluator, bool improveIfPossible = false) {
       var bestResult = evaluator(program);
-      //var noopFreeProgram = RemoveNoops(program, config);
       var tree = program.ToTree();
-      var optimizedTree = RemoveUnnecessaryExpressions(tree, tree, ref bestResult, evaluator);
+      var optimizedTree = RemoveUnnecessaryExpressions(tree, tree, ref bestResult, evaluator, improveIfPossible);
+      var tmp = RemoveUnnecessaryExpressions(optimizedTree, optimizedTree, ref bestResult, evaluator, improveIfPossible);
 
-      var optimizedPrgram = optimizedTree.ToPushProgram(e => !ReferenceEquals(e, NoopNode.Value));
-      return optimizedPrgram; // RemoveNoops(optimizedPrgram, config);
+      while (tmp.Count < optimizedTree.Count) {
+        optimizedTree = tmp;
+      }
+
+      var optimizedProgram = optimizedTree.ToPushProgramWithoutNoopExpressions();
+      optimizedProgram = SimplifySubPrograms(optimizedProgram);
+
+      return optimizedProgram;
     }
 
-    // not working so far, an expression can only be a noop if it is a noop for all examples of a problem
-    private static PushProgram RemoveNoops(PushProgram pushProgram, IReadOnlyPushConfiguration config) {
-      var expressions = new List<Expression>();
-      var interpreter = new PushInterpreter(config);
+    public static PushProgram SimplifySubPrograms(PushProgram program) {
+      var tree = program.ToTree();
+      var optimizedTree = SimplifySubPrograms(tree);
+      var optimizedPrgram = optimizedTree.ToPushProgram();
 
-      interpreter.Run(pushProgram, true);
+      return optimizedPrgram;
+    }
 
-      while (interpreter.CanStep) {
-        var isNoop = interpreter.ExecStack.Top.IsNoop(interpreter);
-        if (!isNoop)
-          expressions.Add(interpreter.ExecStack.Top);
+    private static TreeNode<Expression> SimplifySubPrograms(TreeNode<Expression> program) {
+      while (program.Children.Count == 1)
+        program = program.Children[0];
 
-        interpreter.Step();
+      for (var i = 0; i < program.Children.Count; i++) {
+        var child = program.Children[i];
+        program.ReplaceNode(i, SimplifySubPrograms(child));
       }
 
-      return new PushProgram(expressions);
+      return program;
     }
 
-    private static TreeNode<Expression> RemoveUnnecessaryExpressions(Tree<Expression> program, TreeNode<Expression> node, ref double bestResult, Func<PushProgram, double> evaluator) {
+    private static TreeNode<Expression> RemoveUnnecessaryExpressions(TreeNode<Expression> program, TreeNode<Expression> node, ref double bestResult, Func<PushProgram, double> evaluator, bool improveIfPossible = false) {
       for (var i = 0; i < node.Children.Count; i++) {
         var child = node.Children[i];
@@ -49,5 +56,6 @@
         var currentResult = evaluator(currentProgram);
 
-        if (currentResult <= bestResult) {
+        if ((improveIfPossible && currentResult <= bestResult) ||
+            (!improveIfPossible && currentResult.IsAlmost(bestResult))) {
           bestResult = currentResult;
         } else if (child.Value.IsProgram) {
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Stack/IPushStack.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Stack/IPushStack.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Stack/IPushStack.cs	(revision 15017)
@@ -4,5 +4,5 @@
 
   public interface IPushStack<T> : ICollection<T>, IPushStack {
-    T Top { get; }
+    T Top { get; set; }
     T TopOrDefault { get; }
     T Bottom { get; }
@@ -23,5 +23,4 @@
     void Insert(int index, T item);
     T ReverseElementAt(int offset);
-    void SetTop(T value);
     T Pop();
     T[] Pop(int count);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Stack/InterpreterStackStringifier.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Stack/InterpreterStackStringifier.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Stack/InterpreterStackStringifier.cs	(revision 15017)
@@ -3,25 +3,28 @@
 
 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Stack {
+  using System.Globalization;
+
   using HeuristicLab.Problems.ProgramSynthesis.Push.Constants;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Extensions;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
 
-  public class InterpreterStackStringifier {
+  public static class InterpreterStackStringifier {
 
-    public static IEnumerable<string> StringifyStack(IPushInterpreter interpreter, StackTypes type) {
+    public static IEnumerable<string> StringifyStack(this IPushInterpreter interpreter, StackTypes type) {
       switch (type) {
         case StackTypes.Boolean: return StringifyLiteralStack(interpreter.BooleanStack);
         case StackTypes.Integer: return StringifyLiteralStack(interpreter.IntegerStack);
-        case StackTypes.Float: return StringifyLiteralStack(interpreter.FloatStack);
-        case StackTypes.Char: return StringifyLiteralStack(interpreter.CharStack);
-        case StackTypes.String: return StringifyLiteralStack(interpreter.StringStack, "\"", "\"");
+        case StackTypes.Float: return StringifyFloatStack(interpreter.FloatStack, interpreter.Configuration.FloatStringFormat);
+        case StackTypes.Char: return StringifyCharStack(interpreter.CharStack);
+        case StackTypes.String: return StringifyLiteralStack(interpreter.StringStack, PushEnvironment.StringSymbolStr, PushEnvironment.StringSymbolStr);
         case StackTypes.Name: return StringifyLiteralStack(interpreter.NameStack);
         case StackTypes.Code: return StringifyLiteralStack(interpreter.CodeStack);
         case StackTypes.Exec: return StringifyLiteralStack(interpreter.ExecStack);
-        case StackTypes.Print: return StringifyLiteralStack(interpreter.PrintStack);
+        case StackTypes.Print: return StringifyLiteralStack(interpreter.PrintStack, PushEnvironment.StringSymbolStr, PushEnvironment.StringSymbolStr, false);
 
         case StackTypes.BooleanVector: return StringifyVectorStack(interpreter.BooleanVectorStack);
         case StackTypes.IntegerVector: return StringifyVectorStack(interpreter.IntegerVectorStack);
-        case StackTypes.FloatVector: return StringifyVectorStack(interpreter.FloatVectorStack);
-        case StackTypes.StringVector: return StringifyVectorStack(interpreter.StringVectorStack, "\"", "\"");
+        case StackTypes.FloatVector: return StringifyFloatVectorStack(interpreter.FloatVectorStack, interpreter.Configuration.FloatStringFormat);
+        case StackTypes.StringVector: return StringifyVectorStack(interpreter.StringVectorStack, PushEnvironment.StringSymbolStr, PushEnvironment.StringSymbolStr);
 
         default: return Enumerable.Empty<string>();
@@ -29,9 +32,33 @@
     }
 
-    private static IEnumerable<string> StringifyLiteralStack<T>(IPushStack<T> stack, string prefix = "", string postfix = "") {
-      return stack.Reverse().Select(x => prefix + x.ToString().Replace(PushEnvironment.NewLine, "\\n") + postfix);
+    private static IEnumerable<string> StringifyCharStack(IPushStack<char> stack) {
+      var result = stack.AsEnumerable();
+
+      return result.Select(x => PushEnvironment.CharSymbol + x.Printify() + PushEnvironment.CharSymbol);
     }
 
-    private static IEnumerable<string> StringifyVectorStack<T>(IPushStack<List<T>> stack, string prefix = "", string postfix = "") {
+    private static IEnumerable<string> StringifyFloatStack(IPushStack<double> stack, string format) {
+      var result = stack.AsEnumerable();
+
+      return result.Select(x => x.ToString(format, CultureInfo.InvariantCulture));
+    }
+
+    private static IEnumerable<string> StringifyLiteralStack<T>(IPushStack<T> stack, string prefix = "", string postfix = "", bool reverse = true) {
+      var result = stack.AsEnumerable();
+
+      if (reverse)
+        result = result.Reverse();
+
+      return result.Select(x => prefix + x.ToString() + postfix);
+    }
+
+    private static IEnumerable<string> StringifyFloatVectorStack(IPushStack<IReadOnlyList<double>> stack, string format) {
+      var separator = PushEnvironment.VectorSeparatorSymbol.ToString();
+      return stack
+        .Reverse()
+        .Select(x => PushEnvironment.VectorStartSymbol + string.Join(separator, x.Select(_ => _.ToString(format, CultureInfo.InvariantCulture))) + PushEnvironment.VectorEndSymbol);
+    }
+
+    private static IEnumerable<string> StringifyVectorStack<T>(IPushStack<IReadOnlyList<T>> stack, string prefix = "", string postfix = "") {
       var separator = PushEnvironment.VectorSeparatorSymbol.ToString();
       return stack
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Stack/PushStack.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Stack/PushStack.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Stack/PushStack.cs	(revision 15017)
@@ -43,4 +43,9 @@
         return data[Count - 1];
       }
+
+      set
+      {
+        data[Count - 1] = value;
+      }
     }
 
@@ -119,8 +124,4 @@
     public T ReverseElementAt(int offset) {
       return data[offset];
-    }
-
-    public void SetTop(T value) {
-      data[Count - 1] = value;
     }
 
@@ -276,6 +277,5 @@
 
     public override string ToString() {
-      var data = this.data as IEnumerable<T>;
-      return string.Join(Delimiter, data.Reverse());
+      return string.Join(Delimiter, data.Select(x => x.ToString()).Reverse());
     }
 
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/ExpressionSelectionView.Designer.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/ExpressionSelectionView.Designer.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/ExpressionSelectionView.Designer.cs	(revision 15017)
@@ -26,27 +26,14 @@
       this.groupBox1 = new System.Windows.Forms.GroupBox();
       this.expressionsTreeView = new System.Windows.Forms.TreeView();
-      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
       this.groupBox1.SuspendLayout();
       this.SuspendLayout();
       //
-      // nameTextBox
-      //
-      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
-      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
-      this.nameTextBox.Size = new System.Drawing.Size(244, 20);
-      //
-      // infoLabel
-      //
-      this.infoLabel.Location = new System.Drawing.Point(308, 3);
-      //
       // groupBox1
       //
-      this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-            | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
       this.groupBox1.Controls.Add(this.expressionsTreeView);
-      this.groupBox1.Location = new System.Drawing.Point(6, 26);
+      this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.groupBox1.Location = new System.Drawing.Point(0, 0);
       this.groupBox1.Name = "groupBox1";
-      this.groupBox1.Size = new System.Drawing.Size(318, 426);
+      this.groupBox1.Size = new System.Drawing.Size(327, 455);
       this.groupBox1.TabIndex = 3;
       this.groupBox1.TabStop = false;
@@ -55,11 +42,9 @@
       // expressionsTreeView
       //
-      this.expressionsTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-            | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
       this.expressionsTreeView.CheckBoxes = true;
-      this.expressionsTreeView.Location = new System.Drawing.Point(6, 19);
+      this.expressionsTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.expressionsTreeView.Location = new System.Drawing.Point(3, 16);
       this.expressionsTreeView.Name = "expressionsTreeView";
-      this.expressionsTreeView.Size = new System.Drawing.Size(306, 401);
+      this.expressionsTreeView.Size = new System.Drawing.Size(321, 436);
       this.expressionsTreeView.TabIndex = 0;
       //
@@ -71,12 +56,6 @@
       this.Name = "ExpressionSelectionView";
       this.Size = new System.Drawing.Size(327, 455);
-      this.Controls.SetChildIndex(this.nameLabel, 0);
-      this.Controls.SetChildIndex(this.nameTextBox, 0);
-      this.Controls.SetChildIndex(this.infoLabel, 0);
-      this.Controls.SetChildIndex(this.groupBox1, 0);
-      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
       this.groupBox1.ResumeLayout(false);
       this.ResumeLayout(false);
-      this.PerformLayout();
 
     }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/ExpressionSelectionView.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/ExpressionSelectionView.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/ExpressionSelectionView.cs	(revision 15017)
@@ -16,5 +16,5 @@
   [View("Push Expression Selection Editor")]
   [Content(typeof(IEnabledExpressionsConfiguration), true)]
-  public partial class ExpressionSelectionView : NamedItemView {
+  public partial class ExpressionSelectionView : ItemView {
     public ExpressionSelectionView() {
       InitializeComponent();
@@ -57,10 +57,13 @@
           subNode.Checked = e.Node.Checked;
       } else {
-        Content.SetExpression(e.Node.Text, e.Node.Checked, false);
+        Content.SetExpression(e.Node.Text, e.Node.Checked);
         SetStackNodeText(e.Node.Parent);
 
+        // enable/disable stack if no or at least one expression is enabled
         if ((e.Node.Checked && !e.Node.Parent.Checked) ||
-            (!e.Node.Checked && !e.Node.Parent.Nodes.OfType<TreeNode>().Any(n => n.Checked)))
+            (!e.Node.Checked && !e.Node.Parent.Nodes.OfType<TreeNode>().Any(n => n.Checked))) {
+          Content.SetStack(stackType, e.Node.Checked, false, false);
           e.Node.Parent.Checked = e.Node.Checked;
+        }
       }
 
@@ -70,5 +73,4 @@
     protected override void OnContentChanged() {
       expressionsTreeView.Nodes.Clear();
-      nameTextBox.Text = "Push Expression Selection";
 
       if (Content == null) {
@@ -77,6 +79,5 @@
 
       Content.EnabledExpressionsChanged += EnabledExpressionsChanged;
-      var treeNodes = GetTreeNodes(Content.EnabledExpressions).ToArray();
-      expressionsTreeView.Nodes.AddRange(treeNodes);
+      UpdateNodes();
     }
 
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/ExpressionSelectionView.resx
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/ExpressionSelectionView.resx	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/ExpressionSelectionView.resx	(revision 15017)
@@ -1,16 +1,16 @@
 ﻿<?xml version="1.0" encoding="utf-8"?>
 <root>
-  <!-- 
-    Microsoft ResX Schema 
-    
+  <!--
+    Microsoft ResX Schema
+
     Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
+
+    The primary goals of this format is to allow a simple XML format
+    that is mostly human readable. The generation and parsing of the
+    various data types are done through the TypeConverter classes
     associated with the data types.
-    
+
     Example:
-    
+
     ... ado.net/XML headers & schema ...
     <resheader name="resmimetype">text/microsoft-resx</resheader>
@@ -27,34 +27,34 @@
         <comment>This is a comment</comment>
     </data>
-                
-    There are any number of "resheader" rows that contain simple 
+
+    There are any number of "resheader" rows that contain simple
     name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
+
+    Each data row contains a name, and value. The row also contains a
+    type or mimetype. Type corresponds to a .NET class that support
+    text/value conversion through the TypeConverter architecture.
+    Classes that don't support this are serialized and stored with the
     mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
+
+    The mimetype is used for serialized objects, and tells the
+    ResXResourceReader how to depersist the object. This is currently not
     extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
+
+    Note - application/x-microsoft.net.object.binary.base64 is the format
+    that the ResXResourceWriter will generate, however the reader can
     read any of the formats listed below.
-    
+
     mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
+    value   : The object must be serialized with
             : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
             : and then encoded with base64 encoding.
-    
+
     mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
+    value   : The object must be serialized with
             : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
             : and then encoded with base64 encoding.
 
     mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
+    value   : The object must be serialized into a byte array
             : using a System.ComponentModel.TypeConverter
             : and then encoded with base64 encoding.
@@ -67,10 +67,10 @@
           <xsd:element name="metadata">
             <xsd:complexType>
-              <xsd:items>
-                <xsd:element name="value" types="xsd:string" minOccurs="0" />
-              </xsd:items>
-              <xsd:attribute name="name" use="required" types="xsd:string" />
-              <xsd:attribute name="types" types="xsd:string" />
-              <xsd:attribute name="mimetypes" types="xsd:string" />
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
               <xsd:attribute ref="xml:space" />
             </xsd:complexType>
@@ -78,17 +78,17 @@
           <xsd:element name="assembly">
             <xsd:complexType>
-              <xsd:attribute name="alias" types="xsd:string" />
-              <xsd:attribute name="name" types="xsd:string" />
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
             </xsd:complexType>
           </xsd:element>
           <xsd:element name="data">
             <xsd:complexType>
-              <xsd:items>
-                <xsd:element name="value" types="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" types="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:items>
-              <xsd:attribute name="name" types="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="types" types="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetypes" types="xsd:string" msdata:Ordinal="4" />
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
               <xsd:attribute ref="xml:space" />
             </xsd:complexType>
@@ -96,8 +96,8 @@
           <xsd:element name="resheader">
             <xsd:complexType>
-              <xsd:items>
-                <xsd:element name="value" types="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:items>
-              <xsd:attribute name="name" types="xsd:string" use="required" />
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
             </xsd:complexType>
           </xsd:element>
@@ -118,9 +118,3 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="errorProvider.TrayLocation" types="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
-  <metadata name="toolTip.TrayLocation" types="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>140, 17</value>
-  </metadata>
 </root>
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushDebuggerView.Designer.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushDebuggerView.Designer.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushDebuggerView.Designer.cs	(revision 15017)
@@ -29,7 +29,7 @@
     private void InitializeComponent() {
       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PushDebuggerView));
-      this.execGroupBox = new System.Windows.Forms.GroupBox();
-      this.execList = new System.Windows.Forms.ListBox();
       this.debugTableLayout = new System.Windows.Forms.TableLayoutPanel();
+      this.exec2GroupBox = new System.Windows.Forms.GroupBox();
+      this.execTreeView = new HeuristicLab.Problems.ProgramSynthesis.Push.Views.PushProgramTreeView();
       this.stepButton = new System.Windows.Forms.Button();
       this.resetButton = new System.Windows.Forms.Button();
@@ -39,32 +39,8 @@
       this.simplifyButton = new System.Windows.Forms.Button();
       this.execCountLabel = new System.Windows.Forms.Label();
-      this.execGroupBox.SuspendLayout();
       this.debugTableLayout.SuspendLayout();
+      this.exec2GroupBox.SuspendLayout();
       ((System.ComponentModel.ISupportInitialize)(this.stepWidthBox)).BeginInit();
       this.SuspendLayout();
-      //
-      // execGroupBox
-      //
-      this.execGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-            | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-      this.execGroupBox.AutoSize = true;
-      this.execGroupBox.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
-      this.execGroupBox.Controls.Add(this.execList);
-      this.execGroupBox.Location = new System.Drawing.Point(3, 3);
-      this.execGroupBox.Name = "execGroupBox";
-      this.execGroupBox.Size = new System.Drawing.Size(244, 460);
-      this.execGroupBox.TabIndex = 3;
-      this.execGroupBox.TabStop = false;
-      this.execGroupBox.Text = "Exec";
-      //
-      // execList
-      //
-      this.execList.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.execList.FormattingEnabled = true;
-      this.execList.Location = new System.Drawing.Point(3, 16);
-      this.execList.Name = "execList";
-      this.execList.Size = new System.Drawing.Size(238, 441);
-      this.execList.TabIndex = 0;
       //
       // debugTableLayout
@@ -76,7 +52,8 @@
       this.debugTableLayout.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
       this.debugTableLayout.ColumnCount = 2;
-      this.debugTableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 250F));
+      this.debugTableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 350F));
       this.debugTableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
-      this.debugTableLayout.Controls.Add(this.execGroupBox, 0, 0);
+      this.debugTableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+      this.debugTableLayout.Controls.Add(this.exec2GroupBox, 0, 0);
       this.debugTableLayout.Location = new System.Drawing.Point(3, 3);
       this.debugTableLayout.Name = "debugTableLayout";
@@ -85,4 +62,23 @@
       this.debugTableLayout.Size = new System.Drawing.Size(872, 466);
       this.debugTableLayout.TabIndex = 18;
+      //
+      // exec2GroupBox
+      //
+      this.exec2GroupBox.Controls.Add(this.execTreeView);
+      this.exec2GroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.exec2GroupBox.Location = new System.Drawing.Point(3, 3);
+      this.exec2GroupBox.Name = "exec2GroupBox";
+      this.exec2GroupBox.Size = new System.Drawing.Size(344, 460);
+      this.exec2GroupBox.TabIndex = 4;
+      this.exec2GroupBox.TabStop = false;
+      this.exec2GroupBox.Text = "Exec";
+      //
+      // execTreeView
+      //
+      this.execTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.execTreeView.Location = new System.Drawing.Point(3, 16);
+      this.execTreeView.Name = "execTreeView";
+      this.execTreeView.Size = new System.Drawing.Size(338, 441);
+      this.execTreeView.TabIndex = 0;
       //
       // stepButton
@@ -187,7 +183,6 @@
       this.Name = "PushDebuggerView";
       this.Size = new System.Drawing.Size(878, 504);
-      this.execGroupBox.ResumeLayout(false);
       this.debugTableLayout.ResumeLayout(false);
-      this.debugTableLayout.PerformLayout();
+      this.exec2GroupBox.ResumeLayout(false);
       ((System.ComponentModel.ISupportInitialize)(this.stepWidthBox)).EndInit();
       this.ResumeLayout(false);
@@ -197,7 +192,4 @@
 
     #endregion
-
-    private GroupBox execGroupBox;
-    private ListBox execList;
     private TableLayoutPanel debugTableLayout;
     private Button stepButton;
@@ -208,4 +200,6 @@
     private Button simplifyButton;
     private Label execCountLabel;
+    private GroupBox exec2GroupBox;
+    private PushProgramTreeView execTreeView;
   }
 }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushDebuggerView.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushDebuggerView.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushDebuggerView.cs	(revision 15017)
@@ -15,5 +15,6 @@
 
   public partial class PushDebuggerView : ItemView {
-    private readonly IDictionary<StackTypes, ListBox> debugControlDict = new Dictionary<StackTypes, ListBox>();
+    private readonly IDictionary<StackTypes, ListBox> debugListDict = new Dictionary<StackTypes, ListBox>();
+    private readonly IDictionary<StackTypes, PushProgramTreeView> debugPushProgramDict = new Dictionary<StackTypes, PushProgramTreeView>();
 
     private PooledPushInterpreter interpreter;
@@ -157,22 +158,21 @@
 
     private void ClearDebugLists() {
-      foreach (var list in debugControlDict.Values) {
+      foreach (var list in debugListDict.Values) {
         list.Items.Clear();
       }
+
+      foreach (var treeView in debugPushProgramDict.Values) {
+        treeView.Nodes.Clear();
+      }
     }
 
     private void UpdateExecList() {
-      execList.Items.Clear();
-      var expressions = interpreter.ExecStack.AsEnumerable()
-        .Reverse()
-        .Select(e => e.StringRepresentation)
-        .ToArray();
-
-      execList.Items.AddRange(expressions);
-      execGroupBox.Text = string.Format(GROUP_BOX_TEXT_STRING_FORMAT, Enum.GetName(typeof(StackTypes), StackTypes.Exec), interpreter.ExecStack.Count);
+      execTreeView.LoadExpressions(interpreter.ExecStack.Reverse());
+      exec2GroupBox.Text = string.Format(GROUP_BOX_TEXT_STRING_FORMAT, Enum.GetName(typeof(StackTypes), StackTypes.Exec), interpreter.ExecStack.Count);
     }
 
     private void InitDebugLists(IReadOnlyPushConfiguration config) {
-      debugControlDict.Clear();
+      debugListDict.Clear();
+      debugPushProgramDict.Clear();
 
       // 2 = ExecList + EmptyColumn which is required to fill empty space
@@ -185,18 +185,41 @@
         if (stackType != StackTypes.Exec &&
             ExpressionTable.GetExpressionsByStackTypes(stackType).Intersect(config.EnabledExpressions).Any()) {
-          var list = CreateDebugList(stackType);
-          debugControlDict.Add(stackType, list);
+
+          switch (stackType) {
+            case StackTypes.Code:
+              var treeView = CreatePushProgramTreeView(stackType);
+              debugPushProgramDict.Add(stackType, treeView);
+              break;
+            default:
+              var list = CreateDebugList(stackType);
+              debugListDict.Add(stackType, list);
+              break;
+          }
         }
       }
     }
 
+    private PushProgramTreeView CreatePushProgramTreeView(StackTypes type) {
+
+      var treeView = new PushProgramTreeView {
+        Dock = DockStyle.Fill
+      };
+
+      AddStackControlToTableLayout(type, treeView, 400);
+
+      return treeView;
+    }
+
+    private void AddStackControlToTableLayout(StackTypes type, Control control, int width) {
+      var groupBox = CreateStackGroupBox(type);
+      groupBox.Controls.Add(control);
+
+      debugTableLayout.ColumnCount++;
+      debugTableLayout.ColumnStyles.Insert(1, new ColumnStyle(SizeType.Absolute, width));
+      debugTableLayout.Controls.Add(groupBox);
+      debugTableLayout.Controls.SetChildIndex(groupBox, 1);
+    }
+
     private ListBox CreateDebugList(StackTypes type) {
-      var groupBox = new GroupBox {
-        Anchor = AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top,
-        AutoSize = true,
-        AutoSizeMode = AutoSizeMode.GrowAndShrink,
-        Text = Enum.GetName(typeof(StackTypes), type)
-      };
-
       var list = new ListBox {
         Dock = DockStyle.Fill
@@ -227,16 +250,17 @@
       }
 
-      groupBox.Controls.Add(list);
-
-      var columnWidth = stackEntryType == typeof(Expression) ? 250 : 150;
-
-      debugTableLayout.ColumnCount++;
-      debugTableLayout.ColumnStyles.Insert(1, new ColumnStyle(SizeType.Absolute, columnWidth));
-      debugTableLayout.Controls.Add(groupBox);
-      debugTableLayout.Controls.SetChildIndex(groupBox, 1);
+      AddStackControlToTableLayout(type, list, 150);
 
       return list;
     }
 
+    private static GroupBox CreateStackGroupBox(StackTypes type) {
+      return new GroupBox {
+        Anchor = AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top,
+        AutoSize = true,
+        AutoSizeMode = AutoSizeMode.GrowAndShrink,
+        Text = Enum.GetName(typeof(StackTypes), type)
+      };
+    }
 
     private void UpdateDebugLists() {
@@ -246,7 +270,15 @@
         return;
 
-      foreach (var pair in debugControlDict) {
+      foreach (var pair in debugPushProgramDict) {
         var name = Enum.GetName(typeof(StackTypes), pair.Key);
-        var items = InterpreterStackStringifier.StringifyStack(interpreter, pair.Key).ToArray();
+        var stack = (IPushStack<Expression>)interpreter.Stacks[pair.Key];
+
+        pair.Value.AddExpressions(stack);
+        ((GroupBox)pair.Value.Parent).Text = string.Format(GROUP_BOX_TEXT_STRING_FORMAT, name, pair.Value.Nodes.Count);
+      }
+
+      foreach (var pair in debugListDict) {
+        var name = Enum.GetName(typeof(StackTypes), pair.Key);
+        var items = interpreter.StringifyStack(pair.Key).ToArray();
 
         pair.Value.Items.AddRange(items);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushDebuggerView.resx
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushDebuggerView.resx	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushDebuggerView.resx	(revision 15017)
@@ -1,16 +1,16 @@
 ﻿<?xml version="1.0" encoding="utf-8"?>
 <root>
-  <!-- 
-    Microsoft ResX Schema 
-    
+  <!--
+    Microsoft ResX Schema
+
     Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
+
+    The primary goals of this format is to allow a simple XML format
+    that is mostly human readable. The generation and parsing of the
+    various data types are done through the TypeConverter classes
     associated with the data types.
-    
+
     Example:
-    
+
     ... ado.net/XML headers & schema ...
     <resheader name="resmimetype">text/microsoft-resx</resheader>
@@ -27,34 +27,34 @@
         <comment>This is a comment</comment>
     </data>
-                
-    There are any number of "resheader" rows that contain simple 
+
+    There are any number of "resheader" rows that contain simple
     name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
+
+    Each data row contains a name, and value. The row also contains a
+    type or mimetype. Type corresponds to a .NET class that support
+    text/value conversion through the TypeConverter architecture.
+    Classes that don't support this are serialized and stored with the
     mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
+
+    The mimetype is used for serialized objects, and tells the
+    ResXResourceReader how to depersist the object. This is currently not
     extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
+
+    Note - application/x-microsoft.net.object.binary.base64 is the format
+    that the ResXResourceWriter will generate, however the reader can
     read any of the formats listed below.
-    
+
     mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
+    value   : The object must be serialized with
             : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
             : and then encoded with base64 encoding.
-    
+
     mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
+    value   : The object must be serialized with
             : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
             : and then encoded with base64 encoding.
 
     mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
+    value   : The object must be serialized into a byte array
             : using a System.ComponentModel.TypeConverter
             : and then encoded with base64 encoding.
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushProgramTreeView.Designer.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushProgramTreeView.Designer.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushProgramTreeView.Designer.cs	(revision 15017)
@@ -0,0 +1,32 @@
+﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Views {
+  partial class PushProgramTreeView {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      components = new System.ComponentModel.Container();
+      //this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+    }
+
+    #endregion
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushProgramTreeView.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushProgramTreeView.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Views/PushProgramTreeView.cs	(revision 15017)
@@ -0,0 +1,56 @@
+﻿using System.Windows.Forms;
+
+namespace HeuristicLab.Problems.ProgramSynthesis.Push.Views {
+  using System.Collections.Generic;
+  using System.Linq;
+
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
+
+  public partial class PushProgramTreeView : TreeView {
+    private const string PushProgramStringFormat = "List {0}@{1}";
+    private const string EmptyList = "Empty List";
+
+    public PushProgramTreeView() {
+      InitializeComponent();
+    }
+
+    public void LoadExpressions(IEnumerable<Expression> expressions) {
+      Nodes.Clear();
+      AddExpressions(expressions);
+    }
+
+    public void AddExpressions(IEnumerable<Expression> expressions) {
+      var nodes = expressions.Select(ToTreeNode).ToArray();
+      Nodes.AddRange(nodes);
+    }
+
+    private TreeNode ToTreeNode(Expression expression) {
+      var node = new TreeNode {
+        Text = GetNodeText(expression),
+        Tag = expression
+      };
+
+      if (expression.IsProgram) {
+        var program = (PushProgram)expression;
+        var subNodes = program.Expressions.Reverse().Select(ToTreeNode).ToArray();
+
+        node.Nodes.AddRange(subNodes);
+      }
+
+      return node;
+    }
+
+    private string GetNodeText(Expression expression) {
+      if (expression.IsProgram) {
+        var program = (PushProgram)expression;
+
+        if (program.IsEmpty)
+          return EmptyList;
+
+        return string.Format(PushProgramStringFormat, program.TotalExpressionCount, program.Depth);
+      }
+
+      return expression.StringRepresentation;
+    }
+  }
+}
Index: anches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Benchmark/DataTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Benchmark/DataTests.cs	(revision 15016)
+++ 	(revision )
@@ -1,249 +1,0 @@
-﻿namespace HeuristicLab.Tests.Benchmark {
-  using System.Collections.Generic;
-  using System.Linq;
-
-  using HeuristicLab.BenchmarkSuite;
-  using HeuristicLab.BenchmarkSuite.Problems;
-
-  using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-  public class DataTests {
-    public void DataLoadedTest(BenchmarkSuiteDataDescriptor descriptor) {
-      var data = descriptor.CreateProblemData();
-
-      foreach (var example in data.Examples) {
-        Assert.AreEqual(example.InputArgs.Length + example.OutputArgs.Length, data.TotalArgumentCount);
-        var inputTypeCount = GetTypeCounterDict(data.InputArgumentTypes);
-        var outputTypeCount = GetTypeCounterDict(data.OutputArgumentTypes);
-
-        for (var i = 0; i < data.InputArgumentTypes.Length; i++)
-          TestPerArgumentType(i, example, data.InputArgumentTypes[i], inputTypeCount);
-
-        //for (var i = 0; i < data.OutputArgumentTypes.Length; i++)
-        //  TestPerArgumentType(example.OutputArgs[i], example, data.OutputArgumentTypes[i], outputTypeCount);
-      }
-    }
-
-    private IReadOnlyDictionary<ExampleArgumentType, ArgumentTypeCounter> GetTypeCounterDict(
-      ExampleArgumentType[] types) {
-      return types
-        .GroupBy(type => type)
-        .ToDictionary(group => group.Key, group => new ArgumentTypeCounter(group.Count()));
-    }
-
-    private void TestPerArgumentType(
-      int i,
-      Example example,
-      ExampleArgumentType type,
-      IReadOnlyDictionary<ExampleArgumentType, ArgumentTypeCounter> inputTypeCount) {
-
-      inputTypeCount[type].Counter++;
-      Assert.IsTrue(inputTypeCount[type].Counter < inputTypeCount[type].Total);
-    }
-
-    private class ArgumentTypeCounter {
-      public ArgumentTypeCounter(int total, int counter = 0) {
-        Total = total;
-        Counter = counter;
-      }
-      public int Total { get; set; }
-      public int Counter { get; set; }
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void Checksum() {
-      DataLoadedTest(new Checksum());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void CollatzNumbers() {
-      DataLoadedTest(new CollatzNumbers());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void CompareStringLengths() {
-      DataLoadedTest(new CompareStringLengths());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void CountOdds() {
-      DataLoadedTest(new CountOdds());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void Digits() {
-      DataLoadedTest(new Digits());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void DoubleLetters() {
-      DataLoadedTest(new DoubleLetters());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void EvenSquares() {
-      DataLoadedTest(new EvenSquares());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void ForLoopIndex() {
-      DataLoadedTest(new ForLoopIndex());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void Grades() {
-      DataLoadedTest(new Grades());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void LastIndexOfZero() {
-      DataLoadedTest(new LastIndexOfZero());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void Median() {
-      DataLoadedTest(new Median());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void MirrorImage() {
-      DataLoadedTest(new MirrorImage());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void NegativeToZero() {
-      DataLoadedTest(new NegativeToZero());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void NumberIo() {
-      DataLoadedTest(new NumberIO());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void PigLatin() {
-      DataLoadedTest(new PigLatin());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void ReplaceSpaceWithNewLine() {
-      DataLoadedTest(new ReplaceSpaceWithNewline());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void ScrabbleScore() {
-      DataLoadedTest(new ScrabbleScore());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void Smallest() {
-      DataLoadedTest(new Smallest());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void SmallOrLarge() {
-      DataLoadedTest(new SmallOrLarge());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void StringDifferences() {
-      DataLoadedTest(new StringDifferences());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void StringLengthsBackwards() {
-      DataLoadedTest(new StringLengthsBackwards());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void SumOfSquares() {
-      DataLoadedTest(new SumOfSquares());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void SuperAnagrams() {
-      DataLoadedTest(new SuperAnagrams());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void Syllables() {
-      DataLoadedTest(new Syllables());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void VectorAverage() {
-      DataLoadedTest(new VectorAverage());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void VectorSummed() {
-      DataLoadedTest(new VectorSummed());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void WallisPi() {
-      DataLoadedTest(new WallisPi());
-    }
-
-    [TestMethod]
-    [TestProperty("Time", "Medium")]
-    [TestCategory("ProblemTest")]
-    public void WordStats() {
-      DataLoadedTest(new WordStats());
-    }
-  }
-}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Benchmark/RandomWalkTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Benchmark/RandomWalkTests.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Benchmark/RandomWalkTests.cs	(revision 15017)
@@ -17,8 +17,4 @@
   public class RandomWalkTests {
     private static void RandomWalk(BenchmarkSuiteDataDescriptor descriptor) {
-      var iterations = 2;
-      var best = double.MaxValue;
-      var random = new MersenneTwister(1337);
-
       var instance = new BenchmarkSuiteInstanceProvider();
       var data = instance.LoadData(descriptor);
@@ -34,38 +30,21 @@
 
       var pool = new PushInterpreterPool(config);
-      var bestProgram = Enumerable
-        .Range(0, iterations)
+      var best = Enumerable
+        .Range(0, 10)
         .AsParallel()
         .Select(_ => {
+          var random = new MersenneTwister(1337);
           var program = LinearCodeGenerator.RandomProgram(data.MaxSize, random, config);
           var result = evaluator.EvaluateTraining(pool, program, random);
 
           return new {
-            Quality = result.TotalQuality,
+            Quality = result.AvgQuality,
             Program = program
           };
         })
         .OrderBy(x => x.Quality)
-        .Select(x => x.Program)
         .First();
-      //  var program = RecursiveCodeGenerator.RandomProgram(data.MaxSize, random, config);
-      //  var avg = evaluator.EvaluateTraining(pool, program, random);
-
-      //  lock (lockObj) {
-      //    if (avg.TotalQuality < best) {
-      //      best = avg.TotalQuality;
-      //      bestProgram = program;
-      //    }
-      //  }
-      //});
-
-      var averageTestResult = evaluator.EvaluateTest(pool, bestProgram, random);
-      //var simplifiedProgram = Simplifier.Simplify(
-      //  bestProgram,
-      //  p => evaluator.EvaluateTraining(pool, p, random).TotalQuality);
-
-      Console.WriteLine("Training: {0}", best);
-      Console.WriteLine("RandomWalk: {0}", averageTestResult.TotalQuality);
-      //Console.WriteLine("Best program (simplified): {0}", simplifiedProgram);
+
+      Console.WriteLine("Training: {0}", best.Quality);
     }
 
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Benchmark/SolutionTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Benchmark/SolutionTests.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Benchmark/SolutionTests.cs	(revision 15017)
@@ -0,0 +1,351 @@
+﻿namespace HeuristicLab.Tests.Benchmark {
+
+  using HeuristicLab.BenchmarkSuite;
+  using HeuristicLab.BenchmarkSuite.Problems;
+  using HeuristicLab.Core;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Parser;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Problem.BenchmarkSuite;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
+  using HeuristicLab.Random;
+
+  using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+  [TestClass]
+  public class SolutionTests {
+
+    private IRandom random;
+
+    [TestInitialize]
+    public void BeforeTest() {
+      random = new MersenneTwister(1337);
+    }
+
+    private void TestProgram(PushProgram program, IBenchmarkSuiteDataDescriptor descriptor, string floatStringFormat = "R") {
+      var data = descriptor.CreateProblemData();
+      var config = new PushConfiguration {
+        EvalPushLimit = data.EvalLimit,
+        MaxPointsInProgram = data.MaxSize,
+        ErcOptions = data.ErcOptions,
+        FloatStringFormat = floatStringFormat
+      };
+
+      config.SetEnabledStacks((StackTypes)data.EnabledDataTypes);
+
+      var evaluator = new PushBenchmarkSuiteEvaluator(data);
+      var pool = new PushInterpreterPool(config);
+      var result = evaluator.EvaluateTraining(pool, program, random);
+
+      Assert.AreEqual(0, result.AvgQuality);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void Checksum() {
+      TestProgram(
+        PushParser.ParseProgram("( 0 STRING.ITERATE ( INTEGER.FROMCHAR INTEGER.+ ) 64 INTEGER.% \' \' INTEGER.FROMCHAR INTEGER.+ \"Check sum is \" PRINT.PRINTSTRING CHAR.FROMINTEGER PRINT.PRINTCHAR )"),
+        new Checksum());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void CollatzNumbers() {
+      TestProgram(
+        PushParser.ParseProgram("( INTEGER.DUP 1 INTEGER.= BOOLEAN.NOT EXEC.WHILE ( INTEGER.DUP INTEGER.DUP 2 INTEGER.% 0 INTEGER.= EXEC.IF ( 2 INTEGER./ ) ( 3 INTEGER.* 1 INTEGER.+ ) INTEGER.DUP 1 INTEGER.= BOOLEAN.NOT ) INTEGER.POP INTEGER.STACKDEPTH )"),
+        new CollatzNumbers());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void CompareStringLengths() {
+      TestProgram(
+        PushParser.ParseProgram("STRING.LENGTH STRING.LENGTH INTEGER.DUP STRING.LENGTH INTEGER.> INTEGER.> BOOLEAN.AND"),
+        new CompareStringLengths());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void CountOdds() {
+      TestProgram(
+        PushParser.ParseProgram("( 0 INTEGER[].ITERATE ( 2 INTEGER.% INTEGER.DUP 1 INTEGER.= -1 INTEGER.= BOOLEAN.OR EXEC.WHEN INTEGER.INC ) )"),
+        new CountOdds());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void Digits() {
+      TestProgram(
+        PushParser.ParseProgram("( INTEGER.DUP STRING.FROMINTEGER 0 INTEGER.< BOOLEAN.DUP EXEC.WHEN ( STRING.REST STRING.DUP STRING.FIRST STRING.SWAP STRING.REST ) STRING.REVERSE STRING.ITERATE ( PRINT.NEWLINE PRINT.PRINTCHAR ) EXEC.WHEN ( PRINT.NEWLINE \'-\' PRINT.PRINTCHAR PRINT.PRINTSTRING ) )"),
+        new Digits());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void DoubleLetters() {
+      TestProgram(
+        PushParser.ParseProgram(
+        @"
+        STRING.ITERATE (
+          3 EXEC.DO*COUNT CHAR.DUP
+          CHAR.ISLETTER EXEC.WHEN PRINT.PRINTCHAR
+          '!' CHAR.= EXEC.WHEN ( CHAR.DUP PRINT.PRINTCHAR PRINT.PRINTCHAR )
+          PRINT.PRINTCHAR
+        )"),
+        new DoubleLetters());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void EvenSquares() {
+      TestProgram(
+        PushParser.ParseProgram(
+        @"INTEGER.DUP EXEC.DO*COUNT (
+            INTEGER.DUP 0 INTEGER.>
+            EXEC.WHEN (
+              INTEGER.DUP 2 INTEGER.*
+              INTEGER.DUP INTEGER.DUP INTEGER.*
+              INTEGER.DUP 4 INTEGER.YANKDUP INTEGER.<
+              EXEC.IF (
+                PRINT.PRINTINTEGER
+                PRINT.NEWLINE
+              )
+              EXEC.FLUSH
+              INTEGER.POP
+            )
+            INTEGER.POP
+          )"),
+        new EvenSquares());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void ForLoopIndex() {
+      TestProgram(
+        PushParser.ParseProgram(
+        @"( STRING.FROMINTEGER INTEGER.SWAP true EXEC.WHILE ( INTEGER.DUP PRINT.NEWLINE PRINT.PRINTINTEGER STRING.DUP INTEGER.FROMSTRING INTEGER.+ INTEGER.DUP 2 INTEGER.YANKDUP INTEGER.< ) )"),
+        new ForLoopIndex());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void Grades() {
+      TestProgram(
+        PushParser.ParseProgram("( \"Student has a \" PRINT.PRINTSTRING INTEGER.DUP INTEGER.ROT INTEGER.> EXEC.WHEN ( \"F\" \" grade.\" STRING.CONCAT PRINT.PRINTSTRING EXEC.FLUSH ) INTEGER.DUP INTEGER.ROT INTEGER.> EXEC.WHEN ( \"D\" \" grade.\" STRING.CONCAT PRINT.PRINTSTRING EXEC.FLUSH ) INTEGER.DUP INTEGER.ROT INTEGER.> EXEC.WHEN ( \"C\" \" grade.\" STRING.CONCAT PRINT.PRINTSTRING EXEC.FLUSH ) INTEGER.DUP INTEGER.ROT INTEGER.> EXEC.WHEN ( \"B\" \" grade.\" STRING.CONCAT PRINT.PRINTSTRING EXEC.FLUSH ) \"A\" \" grade.\" STRING.CONCAT PRINT.PRINTSTRING )"),
+        new Grades());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void LastIndexOfZero() {
+      TestProgram(
+        PushParser.ParseProgram("( INTEGER[].DUP INTEGER[].LENGTH INTEGER[].REVERSE 0 INTEGER[].INDEXOF INTEGER.- INTEGER.DEC )"),
+        new LastIndexOfZero());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void Median() {
+      TestProgram(
+        PushParser.ParseProgram("( INTEGER.ROT INTEGER.DUP 2 INTEGER.YANKDUP INTEGER.MAX 3 INTEGER.YANKDUP INTEGER.MIN INTEGER.ROT INTEGER.MIN INTEGER.MAX PRINT.PRINTINTEGER )"),
+        new Median());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void MirrorImage() {
+      TestProgram(
+        PushParser.ParseProgram(
+          @"( INTEGER[].PUSHALL INTEGER[].ITERATE (
+                INTEGER.= BOOLEAN.NOT EXEC.WHEN ( false EXEC.FLUSH )
+              )
+              true
+            )"),
+        new MirrorImage());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void NegativeToZero() {
+      TestProgram(
+        PushParser.ParseProgram("( INTEGER[].DUP INTEGER[].LENGTH INTEGER.DEC EXEC.DO*COUNT ( INTEGER.DUP INTEGER[].DUP INTEGER[].NTH 0 INTEGER.< EXEC.WHEN ( 0 INTEGER[].SET ) ) )"),
+        new NegativeToZero());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void NumberIo() {
+      TestProgram(
+        PushParser.ParseProgram("FLOAT.FROMINTEGER FLOAT.+ PRINT.PRINTFLOAT"),
+        new NumberIO());
+    }
+
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void PigLatin() {
+      TestProgram(
+        PushParser.ParseProgram("@( STRING.SPLIT STRING.STACKDEPTH 0 INTEGER.= EXEC.WHEN EXEC.FLUSH STRING.STACKDEPTH EXEC.DO*TIMES ( STRING.DUP STRING.FIRST CHAR.ALLFROMSTRING CHAR.DUP \"aeiou\" STRING.CONTAINSCHAR EXEC.IF ( CHAR.POP ) ( STRING.REST STRING.CONJCHAR ) \"ay\" STRING.CONCAT STRING.STACKDEPTH 1 INTEGER.> EXEC.WHEN ( ' ' STRING.CONJCHAR ) PRINT.PRINTSTRING ) )"),
+        new PigLatin());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void ReplaceSpaceWithNewLine() {
+
+      TestProgram(
+        PushParser.ParseProgram("STRING.DUP 0 STRING.ITERATE ( CHAR.DUP ' ' CHAR.= EXEC.IF ( CHAR.POP '\n' ) INTEGER.INC PRINT.PRINTCHAR )"),
+        new ReplaceSpaceWithNewline());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void ScrabbleScore() {
+      TestProgram(
+        PushParser.ParseProgram("( STRING.ITERATE ( INTEGER.FROMCHAR INTEGER.DUP INTEGER.DUP 96 INTEGER.> 123 INTEGER.< BOOLEAN.AND EXEC.WHEN ( 32 INTEGER.- ) 65 INTEGER.- INTEGER.DUP INTEGER.DUP 0 INTEGER.>= 26 INTEGER.< BOOLEAN.AND EXEC.IF ( [1 3 3 2 1 4 2 4 1 8 5 1 3 1 1 3 10 1 1 1 1 4 4 8 4 10] INTEGER[].NTH INTEGER.+ ) ( INTEGER.POP ) ) )"),
+        new ScrabbleScore());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void Smallest() {
+      TestProgram(
+        PushParser.ParseProgram("( 3 EXEC.DO*TIMES INTEGER.MIN )"),
+        new Smallest());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void SmallOrLarge() {
+      TestProgram(
+        PushParser.ParseProgram(
+          @"INTEGER.DUP 1000 INTEGER.< 2000 INTEGER.>=
+            EXEC.WHEN ""large""
+            EXEC.WHEN ""small""
+            STRING.EMPTY
+            EXEC.WHEN """"
+            PRINT.PRINTSTRING"),
+        new SmallOrLarge());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void StringDifferences() {
+      TestProgram(
+        PushParser.ParseProgram(
+          @"CHAR.ALLFROMSTRING 0 STRING.ITERATE (
+            CHAR.DUP 2 CHAR.YANKDUP CHAR.= BOOLEAN.NOT EXEC.IF (
+              INTEGER.DUP PRINT.PRINTINTEGER
+              ' ' PRINT.PRINTCHAR PRINT.PRINTCHAR
+              ' ' PRINT.PRINTCHAR PRINT.PRINTCHAR
+              PRINT.NEWLINE
+            )
+            ( CHAR.POP CHAR.POP )
+            INTEGER.INC )"),
+        new StringDifferences());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void StringLengthsBackwards() {
+      TestProgram(
+        PushParser.ParseProgram(@"STRING[].ITERATE ( STRING.LENGTH PRINT.NEWLINE PRINT.PRINTINTEGER )"),
+        new StringLengthsBackwards());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void SumOfSquares() {
+      TestProgram(
+       PushParser.ParseProgram(@"( EXEC.DO*COUNT ( INTEGER.DUP INTEGER.* INTEGER.+ ) )"),
+       new SumOfSquares());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void SuperAnagrams() {
+      TestProgram(
+        PushParser.ParseProgram(@"( STRING.SWAP STRING.DUP STRING.ITERATE ( CHAR.DUP STRING.DUP STRING.OCCURRENCESOFCHAR 1 STRING.YANKDUP STRING.OCCURRENCESOFCHAR INTEGER.> EXEC.WHEN ( false EXEC.FLUSH ) ) true )"),
+        new SuperAnagrams());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void Syllables() {
+      TestProgram(
+       PushParser.ParseProgram("( \"aeiouy\" 0 STRING.ITERATE ( STRING.DUP STRING.OCCURRENCESOFCHAR INTEGER.+ ) \"The number of syllables is \" PRINT.PRINTSTRING PRINT.PRINTINTEGER )"),
+       new Syllables());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void VectorAverage() {
+      TestProgram(
+        PushParser.ParseProgram("( FLOAT[].DUP FLOAT[].LENGTH FLOAT[].ITERATE FLOAT.+ FLOAT.FROMINTEGER FLOAT./ )"),
+        new VectorAverage());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void VectorSummed() {
+      TestProgram(
+        PushParser.ParseProgram(@"( INTEGER[].PUSHALL INTEGER[].DUP INTEGER[].LENGTH INTEGER.DEC EXEC.DO*COUNT ( INTEGER.DUP INTEGER[].DUP INTEGER[].NTH INTEGER.SWAP INTEGER.ROT INTEGER.+ INTEGER[].SET ) )"),
+        new VectorSummed());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void WallisPi() {
+      TestProgram(
+        PushParser.ParseProgram(@"( 2 3 INTEGER.ROT INTEGER.ROT EXEC.DO*TIMES ( 2 EXEC.DO*TIMES ( 1 INTEGER.YANKDUP 1 INTEGER.YANKDUP ) FLOAT.FROMINTEGER FLOAT.FROMINTEGER FLOAT.SWAP FLOAT./ FLOAT.* INTEGER.< EXEC.IF ( INTEGER.SWAP 2 INTEGER.+ INTEGER.SWAP ) ( 2 INTEGER.+ ) ) )"),
+        new WallisPi());
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void WordStats() {
+      TestProgram(
+        PushParser.ParseProgram("( STRING.DUP STRING.SPLIT STRING.STACKDEPTH 1 INTEGER.= BOOLEAN.NOT EXEC.WHEN ( true EXEC.WHILE ( STRING.LENGTH INTEGER.MAX STRING.STACKDEPTH 1 INTEGER.= BOOLEAN.NOT ) [0] 2 INTEGER.- INTEGER.DUP 0 INTEGER.>= EXEC.WHEN ( INTEGER.INC EXEC.DO*TIMES ( 0 INTEGER[].CONJ ) ) STRING.DUP STRING.SPLIT STRING.STACKDEPTH 1 INTEGER.> EXEC.WHILE ( STRING.LENGTH INTEGER.DEC INTEGER.DUP INTEGER[].DUP INTEGER[].NTH INTEGER.INC INTEGER[].SET STRING.STACKDEPTH 1 INTEGER.> ) INTEGER[].DUP INTEGER[].LENGTH INTEGER.DEC EXEC.DO*COUNT ( PRINT.NEWLINE \"words of length \" PRINT.PRINTSTRING INTEGER.DUP INTEGER.INC PRINT.PRINTINTEGER \": \" PRINT.PRINTSTRING INTEGER[].DUP INTEGER[].NTH PRINT.PRINTINTEGER ) \'.\' STRING.DUP STRING.OCCURRENCESOFCHAR \'!\' STRING.DUP STRING.OCCURRENCESOFCHAR INTEGER.+ \'?\' STRING.DUP STRING.OCCURRENCESOFCHAR INTEGER.+ INTEGER.DUP PRINT.NEWLINE \"number of sentences: \" PRINT.PRINTSTRING PRINT.PRINTINTEGER STRING.SPLIT STRING.STACKDEPTH FLOAT.FROMINTEGER FLOAT.FROMINTEGER FLOAT./ PRINT.NEWLINE \"average sentence length: \" PRINT.PRINTSTRING PRINT.PRINTFLOAT ) )"),
+        new WordStats(),
+        "0.0#########");
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ProblemTest")]
+    public void XWordLines() {
+      TestProgram(
+        PushParser.ParseProgram(@"( STRING.SPLIT STRING.EMPTY BOOLEAN.NOT INTEGER.DUP 1 INTEGER.= EXEC.IF ( EXEC.WHILE ( PRINT.NEWLINE PRINT.PRINTSTRING STRING.EMPTY BOOLEAN.NOT ) ) ( 2 INTEGER.- EXEC.WHILE ( STRING.STACKDEPTH 2 INTEGER.- 1 INTEGER.YANKDUP INTEGER.MIN INTEGER.DUP 0 INTEGER.>= EXEC.IF ( INTEGER.INC EXEC.DO*TIMES ( ' ' STRING.CONJCHAR STRING.SWAP STRING.CONCAT ) PRINT.NEWLINE PRINT.PRINTSTRING STRING.EMPTY BOOLEAN.NOT ) ( PRINT.NEWLINE PRINT.PRINTSTRING STRING.EMPTY BOOLEAN.NOT ) ) ) )"),
+        new XWordLines());
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Erc/ErcTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Erc/ErcTests.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Erc/ErcTests.cs	(revision 15017)
@@ -112,4 +112,25 @@
     [TestProperty("Time", "Short")]
     [TestCategory("ErcTests")]
+    public void StringStringErcValueTests() {
+      var options = new StringErcOptions(
+        new StringConstantErc(true, 1.0, "_1", "_2", "_3"));
+
+      Assert.IsTrue(options.IsEnabled);
+
+      var distribution = Enumerable.Range(0, 1000)
+        .Select(_ => options.GetErcValue(random))
+        .GroupBy(x => x)
+        .ToDictionary(group => group.Key, group => group.Count());
+
+      var estimatedRatio = 1.0 / 3.0;
+
+      Assert.IsTrue(IsAlmost(estimatedRatio, distribution["_1"] / 1000.0, tolerance));
+      Assert.IsTrue(IsAlmost(estimatedRatio, distribution["_2"] / 1000.0, tolerance));
+      Assert.IsTrue(IsAlmost(estimatedRatio, distribution["_3"] / 1000.0, tolerance));
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ErcTests")]
     public void MixedIntegerVectorErcValueTests() {
       var options = new IntegerVectorErcOptions(
@@ -133,4 +154,23 @@
     [TestProperty("Time", "Short")]
     [TestCategory("ErcTests")]
+    public void DisabledIntegerVectorErcValueTests() {
+      var options = new IntegerVectorErcOptions(
+        new IntegerVectorConstantsErc(false, 0.8, new[] { 1, 2, 3 }, new[] { 4, 5, 6 }),
+        new IntegerVectorConstantsErc(true, 0.2, new[] { 10, 11, 12 }, new[] { 13, 14, 15 }));
+
+      Assert.IsTrue(options.IsEnabled);
+
+      var distribution = Enumerable.Range(0, 1000)
+        .Select(_ => options.GetErcValue(random))
+        .GroupBy(x => x.All(_ => _ < 10) ? "constants1" : "constants2")
+        .ToDictionary(group => group.Key, group => group.Count());
+
+      Assert.IsFalse(distribution.ContainsKey("constants1"));
+      Assert.AreEqual(1000, distribution["constants2"]);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ErcTests")]
     public void MixedFloatVectorErcValueTests() {
       var options = new FloatVectorErcOptions(
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/HeuristicLab.Tests.csproj
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 15017)
@@ -55,4 +55,12 @@
       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
     </Reference>
+    <Reference Include="HeuristicLab.Encodings.IntegerVectorEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.IntegerVectorEncoding-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
+    </Reference>
     <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
@@ -79,9 +87,13 @@
   </Choose>
   <ItemGroup>
-    <Compile Include="Benchmark\DataTests.cs" />
     <Compile Include="Benchmark\RandomWalkTests.cs" />
+    <Compile Include="Benchmark\SolutionTests.cs" />
     <Compile Include="Erc\ErcTests.cs" />
+    <Compile Include="Interpreter\Expressions\BooleanVectorExpressionsTests.cs" />
+    <Compile Include="Interpreter\Expressions\CharExpressionTests.cs" />
     <Compile Include="Interpreter\Expressions\CommonTests.cs" />
     <Compile Include="Interpreter\Expressions\ExampleTests.cs" />
+    <Compile Include="Interpreter\Expressions\FloatVectorExpressionTests.cs" />
+    <Compile Include="Interpreter\Expressions\IntegerVectorExpressionTests.cs" />
     <Compile Include="Interpreter\Expressions\NameExpressionTests.cs" />
     <Compile Include="Interpreter\Expressions\FloatExpressionTests.cs" />
@@ -90,7 +102,14 @@
     <Compile Include="Interpreter\Expressions\CodeExpressionTests.cs" />
     <Compile Include="Interpreter\Expressions\IntegerExpressionTests.cs" />
+    <Compile Include="Interpreter\Expressions\PrintExpressionTests.cs" />
+    <Compile Include="Interpreter\Expressions\PushProgramTests.cs" />
     <Compile Include="Interpreter\Expressions\StandardTests.cs" />
+    <Compile Include="Interpreter\Expressions\StringExpressionTests.cs" />
+    <Compile Include="Interpreter\Expressions\StringVectorExpressionTests.cs" />
+    <Compile Include="Interpreter\Expressions\VectorExpressionTests.cs" />
     <Compile Include="Interpreter\ExpressionTest.cs" />
+    <Compile Include="Problem\IndividualMapperTests.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Simplifier\SimplifierTests.cs" />
   </ItemGroup>
   <ItemGroup>
@@ -108,5 +127,4 @@
     </ProjectReference>
   </ItemGroup>
-  <ItemGroup />
   <Choose>
     <When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/ExpressionTest.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/ExpressionTest.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/ExpressionTest.cs	(revision 15017)
@@ -1,16 +1,47 @@
 ﻿namespace HeuristicLab.Tests.Interpreter {
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration;
-  using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
+  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Boolean;
+  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Float;
+  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.FloatVector;
+  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.IntegerVector;
+  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.StringVector;
 
   using Microsoft.VisualStudio.TestTools.UnitTesting;
+  using Problems.ProgramSynthesis.Base.Erc;
+  using Problems.ProgramSynthesis.Base.Erc.Char;
+  using Problems.ProgramSynthesis.Base.Erc.Integer;
+  using Problems.ProgramSynthesis.Base.Erc.String;
+  using Problems.ProgramSynthesis.Push.Configuration;
+  using Problems.ProgramSynthesis.Push.Interpreter;
 
   public class ExpressionTest {
     protected PushInterpreter interpreter;
 
-    protected PushConfiguration configuration = new PushConfiguration { TopLevelPushCode = false };
+    protected PushConfiguration configuration = new PushConfiguration {
+      TopLevelPushCode = false,
+      ErcOptions = new ErcOptions {
+        ErcProbability = 0.05,
+        CharErcOptions = new CharErcOptions(new IntegerRangeErc(0x20, 0x7e)),
+        StringErcOptions = new StringErcOptions(new StringRandomErc {
+          IsEnabled = true,
+          AllowDigits = true,
+          NewStringProbability = 1,
+          AllowLowercaseLetters = true,
+          AllowUppercaseLetters = true
+        }),
+        IntegerErcOptions = new IntegerErcOptions(new IntegerRangeErc(-10000, 10000)),
+        FloatErcOptions = new FloatErcOptions(new FloatRangeErc(-10000, 10000)),
+        BooleanErcOptions = new BooleanErcOptions(new BooleanRandomErc(true, true, true)),
+        StringVectorErcOptions = new StringVectorErcOptions(
+          new StringVectorConstantsErc(new[] { "test", "123", "asdf", "a", "b" })),
+        IntegerVectorErcOptions = new IntegerVectorErcOptions(
+          new IntegerVectorConstantsErc(new[] { 0, -5, 10, 8, -3 })),
+        FloatVectorErcOptions = new FloatVectorErcOptions(
+          new FloatVectorConstantsErc(new[] { 0.0, -5.2, 10.3, 8.1, -3.4 }))
+      }
+    };
 
     [TestInitialize]
     public void BeforeTest() {
-      interpreter = new PushInterpreter(configuration);
+      interpreter = new PushInterpreter(1337, configuration);
     }
 
@@ -21,16 +52,23 @@
       int? booleanStack = 0,
       int? floatStack = 0,
-      int? integerStack = 0) {
+      int? integerStack = 0,
+      int? charStack = 0,
+      int? stringStack = 0,
+      int? integerVectorStack = 0,
+      int? floatVectorStack = 0,
+      int? booleanVectorStack = 0,
+      int? stringVectorStack = 0) {
       if (execStack.HasValue) Assert.AreEqual(execStack, interpreter.ExecStack.Count);
-
       if (codeStack.HasValue) Assert.AreEqual(codeStack, interpreter.CodeStack.Count);
-
       if (nameStack.HasValue) Assert.AreEqual(nameStack, interpreter.NameStack.Count);
-
       if (booleanStack.HasValue) Assert.AreEqual(booleanStack, interpreter.BooleanStack.Count);
-
       if (floatStack.HasValue) Assert.AreEqual(floatStack, interpreter.FloatStack.Count);
-
       if (integerStack.HasValue) Assert.AreEqual(integerStack, interpreter.IntegerStack.Count);
+      if (charStack.HasValue) Assert.AreEqual(charStack, interpreter.CharStack.Count);
+      if (stringStack.HasValue) Assert.AreEqual(stringStack, interpreter.StringStack.Count);
+      if (integerVectorStack.HasValue) Assert.AreEqual(integerVectorStack, interpreter.IntegerVectorStack.Count);
+      if (floatVectorStack.HasValue) Assert.AreEqual(floatVectorStack, interpreter.FloatVectorStack.Count);
+      if (booleanVectorStack.HasValue) Assert.AreEqual(booleanVectorStack, interpreter.BooleanVectorStack.Count);
+      if (stringVectorStack.HasValue) Assert.AreEqual(stringVectorStack, interpreter.StringVectorStack.Count);
     }
   }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/BooleanVectorExpressionsTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/BooleanVectorExpressionsTests.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/BooleanVectorExpressionsTests.cs	(revision 15017)
@@ -0,0 +1,34 @@
+﻿using System.Collections.Generic;
+using System.Linq;
+
+namespace HeuristicLab.Tests.Interpreter.Expressions {
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
+
+  using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+  [TestClass]
+  public class BooleanVectorExpressionsTests : VectorExpressionTests<bool> {
+    protected override string TypeName { get { return "BOOLEAN[]"; } }
+
+    protected override IPushStack<IReadOnlyList<bool>> Stack { get { return interpreter.BooleanVectorStack; } }
+    protected override IPushStack<bool> LiteralStack { get { return interpreter.BooleanStack; } }
+
+    protected override IReadOnlyList<bool>[] GetValues(int count) {
+      return Enumerable
+        .Range(0, count)
+        .Select(x => GetLiterals(interpreter.Configuration.MaxVectorLength / 2 - 1))
+        .ToArray();
+    }
+
+    protected override IReadOnlyList<bool> GetLiterals(int count) {
+      return Enumerable
+        .Range(0, count)
+        .Select(x => interpreter.Configuration.ErcOptions.BooleanErcOptions.GetErcValue(interpreter.Random))
+        .ToArray();
+    }
+
+    protected override void CheckOtherStacksAreEmpty() {
+      TestStackCounts(booleanVectorStack: null);
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/CharExpressionTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/CharExpressionTests.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/CharExpressionTests.cs	(revision 15017)
@@ -0,0 +1,115 @@
+﻿namespace HeuristicLab.Tests.Interpreter.Expressions {
+  using System.Linq;
+
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
+
+  using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+  [TestClass]
+  public class CharExpressionTests : CommonTests<char> {
+    protected override string TypeName { get { return "CHAR"; } }
+
+    protected override IPushStack<char> Stack { get { return interpreter.CharStack; } }
+
+    protected override char[] GetValues(int count) {
+      return Enumerable
+        .Range(0, count)
+        .Select(_ => interpreter.Configuration.ErcOptions.CharErcOptions.GetErcValue(interpreter.Random))
+        .ToArray();
+    }
+
+    protected override void CheckOtherStacksAreEmpty() {
+      TestStackCounts(charStack: null);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("CharExpressionTest")]
+    public void TestIsWhitespace() {
+      interpreter.CharStack.Push(' ', '_');
+      interpreter.Run(new CharIsWhitespaceExpression());
+      interpreter.Run(new CharIsWhitespaceExpression());
+
+      Assert.IsTrue(interpreter.BooleanStack[0]);
+      Assert.IsFalse(interpreter.BooleanStack[1]);
+      TestStackCounts(booleanStack: 2);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("CharExpressionTest")]
+    public void TestIsLetter() {
+      interpreter.CharStack.Push('a', '_');
+      interpreter.Run(new CharIsLetterExpression());
+      interpreter.Run(new CharIsLetterExpression());
+
+      Assert.IsTrue(interpreter.BooleanStack[0]);
+      Assert.IsFalse(interpreter.BooleanStack[1]);
+      TestStackCounts(booleanStack: 2);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("CharExpressionTest")]
+    public void TestIsDigit() {
+      interpreter.CharStack.Push('1', 'a');
+      interpreter.Run(new CharIsDigitExpression());
+      interpreter.Run(new CharIsDigitExpression());
+
+      Assert.IsTrue(interpreter.BooleanStack[0]);
+      Assert.IsFalse(interpreter.BooleanStack[1]);
+      TestStackCounts(booleanStack: 2);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("CharExpressionTest")]
+    public void TestFromInteger() {
+      interpreter.IntegerStack.Push(1, -1, 129);
+      interpreter.Run(new CharFromIntegerExpression());
+      interpreter.Run(new CharFromIntegerExpression());
+      interpreter.Run(new CharFromIntegerExpression());
+
+      Assert.AreEqual(0x01, interpreter.CharStack[0]);
+      Assert.AreEqual(0x01, interpreter.CharStack[1]);
+      Assert.AreEqual(0x01, interpreter.CharStack[2]);
+      TestStackCounts(charStack: 3);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("CharExpressionTest")]
+    public void TestFromFloat() {
+      interpreter.FloatStack.Push(1.5, -1.5, 129.5);
+      interpreter.Run(new CharFromFloatExpression());
+      interpreter.Run(new CharFromFloatExpression());
+      interpreter.Run(new CharFromFloatExpression());
+
+      Assert.AreEqual(0x01, interpreter.CharStack[0]);
+      Assert.AreEqual(0x01, interpreter.CharStack[1]);
+      Assert.AreEqual(0x01, interpreter.CharStack[2]);
+      TestStackCounts(charStack: 3);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("CharExpressionTest")]
+    public void TestAllFromString() {
+      interpreter.StringStack.Push("test");
+      interpreter.Run(new CharAllFromStringExpression());
+
+      Assert.AreEqual('t', interpreter.CharStack[0]);
+      Assert.AreEqual('e', interpreter.CharStack[1]);
+      Assert.AreEqual('s', interpreter.CharStack[2]);
+      Assert.AreEqual('t', interpreter.CharStack[3]);
+      TestStackCounts(charStack: 4);
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/CodeExpressionTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/CodeExpressionTests.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/CodeExpressionTests.cs	(revision 15017)
@@ -430,5 +430,5 @@
 
       Assert.AreEqual(3, interpreter.IntegerStack.Top);
-      TestStackCounts(codeStack: 1, integerStack: 2);
+      TestStackCounts(integerStack: 1);
     }
 
@@ -455,5 +455,5 @@
       var prog = PushParser.Parse("( INTEGER.DUP INTEGER.+ )");
 
-      interpreter.IntegerStack.Push(2, 3);
+      interpreter.IntegerStack.Push(2, 4);
       interpreter.CodeStack.Push(prog);
       interpreter.Run(new CodeDoTimesExpression());
@@ -508,5 +508,5 @@
     public void TestNestedDoTimes() {
       interpreter.Run(
-        "( 3 CODE.QUOTE ( 2 3 CODE.QUOTE ( 2 INTEGER.* ) CODE.DO*TIMES INTEGER.+ ) CODE.DO*TIMES )");
+        "( 4 CODE.QUOTE ( 2 4 CODE.QUOTE ( 2 INTEGER.* ) CODE.DO*TIMES INTEGER.+ ) CODE.DO*TIMES )");
 
       Assert.AreEqual(128, interpreter.IntegerStack.Top);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/CommonTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/CommonTests.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/CommonTests.cs	(revision 15017)
@@ -35,5 +35,4 @@
 
       var isBooleanStack = interpreter.BooleanStack.Count == 2;
-
       Test(ExpressionTable.GetStatelessExpression(TypeName + ".="));
 
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/ExampleTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/ExampleTests.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/ExampleTests.cs	(revision 15017)
@@ -145,7 +145,7 @@
     public void Example10() {
       interpreter.IntegerStack.Push(5);
-      interpreter.Run("( 1 INTEGER.MAX 1 EXEC.DO*RANGE ( 2 INTEGER.* ) )");
-
-      Assert.AreEqual(2, interpreter.IntegerStack.Top);
+      interpreter.Run("( 1 INTEGER.MAX 1 EXEC.DO*RANGE ( 2 INTEGER.* INTEGER.* ) )");
+
+      Assert.AreEqual(3840, interpreter.IntegerStack.Top);
       Assert.IsTrue(interpreter.CodeStack.IsEmpty);
       Assert.IsTrue(interpreter.ExecStack.IsEmpty);
@@ -254,11 +254,11 @@
       interpreter.FloatStack.Push(2);
       interpreter.Run(@"( ARG FLOAT.DEFINE
-                                     EXEC.Y (
-                                       ARG FLOAT.*
-                                       1 INTEGER.-
-                                       INTEGER.DUP 1 INTEGER.>
-                                       EXEC.IF ( ) EXEC.POP
-                                     )
-                                   )");
+                          EXEC.Y (
+                            ARG FLOAT.*
+                            1 INTEGER.-
+                            INTEGER.DUP 1 INTEGER.>
+                            EXEC.IF ( ) EXEC.POP
+                          )
+                        )");
 
       Assert.AreEqual(1024, interpreter.FloatStack.Top, Delta);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/ExecExpressionTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/ExecExpressionTests.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/ExecExpressionTests.cs	(revision 15017)
@@ -111,7 +111,7 @@
     public void TestNestedDoRange() {
       interpreter.Run(
-        "( 0 2 EXEC.DO*RANGE ( 1 INTEGER.+ 0 3 EXEC.DO*RANGE ( 1 INTEGER.+ INTEGER.* ) INTEGER.+ )");
+        "( 1 0 2 EXEC.DO*RANGE ( INTEGER.POP 1 1 4 EXEC.DO*RANGE INTEGER.* INTEGER.* ) )");
 
-      Assert.AreEqual(144, interpreter.IntegerStack.Top);
+      Assert.AreEqual(13824, interpreter.IntegerStack.Top);
       TestStackCounts(integerStack: 1);
     }
@@ -134,5 +134,5 @@
     [TestCategory("ExecExpressionTest")]
     public void TestNestedDoTimes() {
-      interpreter.Run("( 3 EXEC.DO*TIMES ( 2 3 EXEC.DO*TIMES ( 2 INTEGER.* ) INTEGER.+ )");
+      interpreter.Run("( 4 EXEC.DO*TIMES ( 2 4 EXEC.DO*TIMES ( 2 INTEGER.* ) INTEGER.+ )");
 
       Assert.AreEqual(128, interpreter.IntegerStack.Top);
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/FloatVectorExpressionTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/FloatVectorExpressionTests.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/FloatVectorExpressionTests.cs	(revision 15017)
@@ -0,0 +1,34 @@
+﻿using System.Collections.Generic;
+using System.Linq;
+
+namespace HeuristicLab.Tests.Interpreter.Expressions {
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
+
+  using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+  [TestClass]
+  public class FloatVectorExpressionTests : VectorExpressionTests<double> {
+    protected override string TypeName { get { return "FLOAT[]"; } }
+
+    protected override IPushStack<IReadOnlyList<double>> Stack { get { return interpreter.FloatVectorStack; } }
+    protected override IPushStack<double> LiteralStack { get { return interpreter.FloatStack; } }
+
+    protected override IReadOnlyList<double>[] GetValues(int count) {
+      return Enumerable
+        .Range(0, count)
+        .Select(x => GetLiterals(interpreter.Configuration.MaxVectorLength / 2 - 1))
+        .ToArray();
+    }
+
+    protected override IReadOnlyList<double> GetLiterals(int count) {
+      return Enumerable
+        .Range(0, count)
+        .Select(x => interpreter.Configuration.ErcOptions.FloatErcOptions.GetErcValue(interpreter.Random))
+        .ToArray();
+    }
+
+    protected override void CheckOtherStacksAreEmpty() {
+      TestStackCounts(floatVectorStack: null);
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/IntegerExpressionTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/IntegerExpressionTests.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/IntegerExpressionTests.cs	(revision 15017)
@@ -32,5 +32,4 @@
 
       Assert.AreEqual(10, interpreter.IntegerStack.Top);
-
       TestStackCounts(integerStack: 1);
     }
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/IntegerVectorExpressionTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/IntegerVectorExpressionTests.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/IntegerVectorExpressionTests.cs	(revision 15017)
@@ -0,0 +1,34 @@
+﻿using System.Collections.Generic;
+using System.Linq;
+
+namespace HeuristicLab.Tests.Interpreter.Expressions {
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
+
+  using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+  [TestClass]
+  public class IntegerVectorExpressionTests : VectorExpressionTests<long> {
+    protected override string TypeName { get { return "INTEGER[]"; } }
+
+    protected override IPushStack<IReadOnlyList<long>> Stack { get { return interpreter.IntegerVectorStack; } }
+    protected override IPushStack<long> LiteralStack { get { return interpreter.IntegerStack; } }
+
+    protected override IReadOnlyList<long>[] GetValues(int count) {
+      return Enumerable
+        .Range(0, count)
+        .Select(x => GetLiterals(interpreter.Configuration.MaxVectorLength / 2 - 1))
+        .ToArray();
+    }
+
+    protected override IReadOnlyList<long> GetLiterals(int count) {
+      return Enumerable
+        .Range(0, count)
+        .Select(x => (long)interpreter.Configuration.ErcOptions.IntegerErcOptions.GetErcValue(interpreter.Random))
+        .ToArray();
+    }
+
+    protected override void CheckOtherStacksAreEmpty() {
+      TestStackCounts(integerVectorStack: null);
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/PrintExpressionTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/PrintExpressionTests.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/PrintExpressionTests.cs	(revision 15017)
@@ -0,0 +1,23 @@
+﻿namespace HeuristicLab.Tests.Interpreter.Expressions {
+  using System.Globalization;
+
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
+
+  using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+  [TestClass]
+  public class PrintExpressionTests : ExpressionTest {
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("PrintExpressionTest")]
+    public void TestPrintFloat() {
+      var value = 29.561570440978656;
+      interpreter.FloatStack.Push(value);
+      interpreter.Run(new FloatPrintExpression());
+
+      Assert.AreEqual(value.ToString("R", CultureInfo.InvariantCulture), interpreter.PrintStack.Top);
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/PushProgramTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/PushProgramTests.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/PushProgramTests.cs	(revision 15017)
@@ -0,0 +1,38 @@
+﻿namespace HeuristicLab.Tests.Interpreter.Expressions {
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Parser;
+
+  using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+  [TestClass]
+  public class PushProgramTests : ExpressionTest {
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("PushProgramTests")]
+    public void TotalCountTest() {
+      var program = PushParser.ParseProgram("( 5 ( INTEGER.DUP FLOAT.+ FLOAT.- ) ( EXEC.DO ( EXEC.IF ) EXEC.Y ) INTEGER.+ )");
+
+      Assert.AreEqual(12, program.TotalCount);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("PushProgramTests")]
+    public void DepthTest() {
+      var program = PushParser.ParseProgram("( 5 ( INTEGER.DUP FLOAT.+ FLOAT.- ) ( EXEC.DO ( EXEC.IF ) EXEC.Y ) INTEGER.+ )");
+
+      Assert.AreEqual(3, program.Depth);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("PushProgramTests")]
+    public void BranchesTest() {
+      var program = PushParser.ParseProgram("( 5 ( INTEGER.DUP FLOAT.+ FLOAT.- ) ( EXEC.DO ( EXEC.IF ) EXEC.Y ) INTEGER.+ )");
+
+      Assert.AreEqual(4, program.Branches);
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/StandardTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/StandardTests.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/StandardTests.cs	(revision 15017)
@@ -13,4 +13,7 @@
   public class StandardTests {
     [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StandartTests")]
     public void TestGetHashCode() {
       var expressionTypes = from domainAssembly in AppDomain.CurrentDomain.GetAssemblies()
@@ -22,14 +25,24 @@
 
       var expressions = expressionTypes.Select(et => Activator.CreateInstance(et) as Expression);
-      var ids = expressions.Select(e => new { Epxression = e, Id = e.GetHashCode() });
+      var ids = expressions.Select(e => new { Expression = e, Id = e.GetHashCode() });
 
-      var duplicates = ids.GroupBy(s => s).SelectMany(grp => grp.Skip(1));
+      var duplicateGroups = ids.GroupBy(s => s.Id).Where(grp => grp.Count() > 2).ToList();
 
-      if (!duplicates.Any())
+      if (!duplicateGroups.Any())
         return;
 
       Debug.WriteLine("Duplicates: ");
-      foreach (var duplicate in duplicates)
-        Debug.WriteLine("Id: {0}, Expression: {1}", duplicate.Id, duplicate.Epxression);
+      foreach (var group in duplicateGroups) {
+        foreach (var duplicate in group) {
+          string name;
+          if (!ExpressionTable.TypeToNameTable.TryGetValue(duplicate.Expression.GetType(), out name)) {
+            name = duplicate.Expression.ToString();
+          }
+
+          Debug.WriteLine("Id: {0}, Expression: {1}", duplicate.Id, name);
+        }
+
+        Debug.WriteLine("");
+      }
 
       Assert.Fail();
@@ -37,4 +50,7 @@
 
     [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StandartTests")]
     public void TestExpandGetHashCode() {
       var expand = PushParser.Parse("( A B C D E F )");
@@ -44,4 +60,7 @@
 
     [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StandartTests")]
     public void TestExecExpandCopy() {
       var expressions = new Expression[]
@@ -59,4 +78,7 @@
 
     [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StandartTests")]
     public void TestExecExpandRecursiveCopy() {
       var expressions = new List<Expression>
@@ -83,4 +105,7 @@
 
     [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StandartTests")]
     public void TestExecExpandRecursiveGetHashCode() {
       var expressions = new List<Expression>
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/StringExpressionTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/StringExpressionTests.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/StringExpressionTests.cs	(revision 15017)
@@ -0,0 +1,524 @@
+﻿using System.Linq;
+
+namespace HeuristicLab.Tests.Interpreter.Expressions {
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
+
+  using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+  [TestClass]
+  public class StringExpressionTests : CommonTests<string> {
+    protected override string TypeName { get { return "STRING"; } }
+
+    protected override IPushStack<string> Stack { get { return interpreter.StringStack; } }
+
+    protected override string[] GetValues(int count) {
+      return Enumerable
+        .Range(0, count)
+        .Select(_ => interpreter.Configuration.ErcOptions.StringErcOptions.GetErcValue(interpreter.Random))
+        .ToArray();
+    }
+
+    protected override void CheckOtherStacksAreEmpty() {
+      TestStackCounts(stringStack: null);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestFromInteger() {
+      interpreter.IntegerStack.Push(123, -123);
+      interpreter.Run(new StringFromIntegerExpression());
+      interpreter.Run(new StringFromIntegerExpression());
+      interpreter.Run(new StringFromIntegerExpression());
+
+      Assert.AreEqual("123", interpreter.StringStack[0]);
+      Assert.AreEqual("-123", interpreter.StringStack[1]);
+      TestStackCounts(stringStack: 2);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestFromFloat() {
+      interpreter.FloatStack.Push(123.45, -123.45);
+      interpreter.Run(new StringFromFloatExpression());
+      interpreter.Run(new StringFromFloatExpression());
+      interpreter.Run(new StringFromFloatExpression());
+
+      Assert.AreEqual("123.45", interpreter.StringStack[0]);
+      Assert.AreEqual("-123.45", interpreter.StringStack[1]);
+      TestStackCounts(stringStack: 2);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestFromBoolean() {
+      interpreter.BooleanStack.Push(true, false);
+      interpreter.Run(new StringFromBooleanExpression());
+      interpreter.Run(new StringFromBooleanExpression());
+
+      Assert.AreEqual("True", interpreter.StringStack[0]);
+      Assert.AreEqual("False", interpreter.StringStack[1]);
+      TestStackCounts(stringStack: 2);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestFromChar() {
+      interpreter.CharStack.Push(' ', 'a');
+      interpreter.Run(new StringFromCharExpression());
+      interpreter.Run(new StringFromCharExpression());
+
+      Assert.AreEqual(" ", interpreter.StringStack[0]);
+      Assert.AreEqual("a", interpreter.StringStack[1]);
+      TestStackCounts(stringStack: 2);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestConcat() {
+      interpreter.StringStack.Push("test", "123");
+      interpreter.Run(new StringConcatExpression());
+
+      Assert.AreEqual("test123", interpreter.StringStack[0]);
+      TestStackCounts(stringStack: 1);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestConjChar() {
+      interpreter.CharStack.Push('3', '2', '1');
+      interpreter.StringStack.Push("test");
+
+      interpreter.Run(new StringConjCharExpression());
+      interpreter.Run(new StringConjCharExpression());
+      interpreter.Run(new StringConjCharExpression());
+
+      Assert.AreEqual("test123", interpreter.StringStack[0]);
+      TestStackCounts(stringStack: 1);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestTake() {
+      interpreter.IntegerStack.Push(3, -3, 7, 0);
+
+      interpreter.StringStack.Push("test");
+      interpreter.Run(new StringTakeExpression());
+      Assert.AreEqual("", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test");
+      interpreter.Run(new StringTakeExpression());
+      Assert.AreEqual("tes", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test");
+      interpreter.Run(new StringTakeExpression());
+      Assert.AreEqual("tes", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test");
+      interpreter.Run(new StringTakeExpression());
+      Assert.AreEqual("tes", interpreter.StringStack[0]);
+
+      TestStackCounts(stringStack: 4);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestFirst() {
+      interpreter.StringStack.Push("test");
+
+      interpreter.Run(new StringFirstExpression());
+
+      Assert.AreEqual("t", interpreter.StringStack[0]);
+      TestStackCounts(stringStack: 1);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestLast() {
+      interpreter.StringStack.Push("test");
+      interpreter.Run(new StringLastExpression());
+
+      Assert.AreEqual("t", interpreter.StringStack[0]);
+      TestStackCounts(stringStack: 1);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestNth() {
+      interpreter.IntegerStack.Push(2, -2, 6);
+
+      interpreter.StringStack.Push("test");
+      interpreter.Run(new StringNthExpression());
+      Assert.AreEqual("s", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test");
+      interpreter.Run(new StringNthExpression());
+      Assert.AreEqual("s", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test");
+      interpreter.Run(new StringNthExpression());
+      Assert.AreEqual("s", interpreter.StringStack[0]);
+
+      TestStackCounts(stringStack: 3);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestRest() {
+      interpreter.StringStack.Push("test");
+      interpreter.Run(new StringRestExpression());
+
+      Assert.AreEqual("est", interpreter.StringStack[0]);
+      TestStackCounts(stringStack: 1);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestButLast() {
+      interpreter.StringStack.Push("test");
+      interpreter.Run(new StringButLastExpression());
+
+      Assert.AreEqual("tes", interpreter.StringStack[0]);
+      TestStackCounts(stringStack: 1);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestLength() {
+      interpreter.StringStack.Push("test");
+      interpreter.Run(new StringLengthExpression());
+
+      Assert.AreEqual(4, interpreter.IntegerStack.Top);
+      TestStackCounts(stringStack: 0, integerStack: 1);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestReverse() {
+      interpreter.StringStack.Push("test");
+      interpreter.Run(new StringReverseExpression());
+
+      Assert.AreEqual("tset", interpreter.StringStack[0]);
+      TestStackCounts(stringStack: 1);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestParseToChars() {
+      interpreter.StringStack.Push("test");
+      interpreter.Run(new StringParseToCharsExpression());
+
+      Assert.AreEqual("t", interpreter.StringStack[0]);
+      Assert.AreEqual("s", interpreter.StringStack[1]);
+      Assert.AreEqual("e", interpreter.StringStack[2]);
+      Assert.AreEqual("t", interpreter.StringStack[3]);
+      TestStackCounts(stringStack: 4);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestSplit() {
+      interpreter.StringStack.Push("test1 test2");
+      interpreter.Run(new StringSplitExpression());
+
+      Assert.AreEqual("test1", interpreter.StringStack[0]);
+      Assert.AreEqual("test2", interpreter.StringStack[1]);
+      TestStackCounts(stringStack: 2);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestEmptyString() {
+      interpreter.StringStack.Push("test1", "");
+      interpreter.Run(new StringEmptyStringExpression());
+      interpreter.Run(new StringEmptyStringExpression());
+
+      Assert.AreEqual(false, interpreter.BooleanStack[0]);
+      Assert.AreEqual(true, interpreter.BooleanStack[1]);
+      TestStackCounts(stringStack: 0, booleanStack: 2);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestContains() {
+      interpreter.StringStack.Push(new[] { "test1", "est", "test", "abc", "test", "" });
+      interpreter.Run(new StringContainsExpression());
+      interpreter.Run(new StringContainsExpression());
+      interpreter.Run(new StringContainsExpression());
+
+      Assert.AreEqual(true, interpreter.BooleanStack[0]);
+      Assert.AreEqual(false, interpreter.BooleanStack[1]);
+      Assert.AreEqual(true, interpreter.BooleanStack[2]);
+      TestStackCounts(stringStack: 0, booleanStack: 3);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestContainsChar() {
+      interpreter.CharStack.Push('e', 'a');
+      interpreter.StringStack.Push("test", "test");
+      interpreter.Run(new StringContainsCharExpression());
+      interpreter.Run(new StringContainsCharExpression());
+
+      Assert.AreEqual(true, interpreter.BooleanStack[0]);
+      Assert.AreEqual(false, interpreter.BooleanStack[1]);
+      TestStackCounts(stringStack: 0, charStack: 0, booleanStack: 2);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestIndexOfChar() {
+      interpreter.CharStack.Push('e', 'a');
+      interpreter.StringStack.Push("test", "test");
+      interpreter.Run(new StringIndexOfCharExpression());
+      interpreter.Run(new StringIndexOfCharExpression());
+
+      Assert.AreEqual(1, interpreter.IntegerStack[0]);
+      Assert.AreEqual(-1, interpreter.IntegerStack[1]);
+      TestStackCounts(stringStack: 0, charStack: 0, integerStack: 2);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestOccurrencesOfChar() {
+      interpreter.CharStack.Push('t', 'a');
+      interpreter.StringStack.Push("test", "test");
+      interpreter.Run(new StringOccurrencesOfCharExpression());
+      interpreter.Run(new StringOccurrencesOfCharExpression());
+
+      Assert.AreEqual(2, interpreter.IntegerStack[0]);
+      Assert.AreEqual(0, interpreter.IntegerStack[1]);
+      TestStackCounts(stringStack: 0, charStack: 0, integerStack: 2);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestReplace() {
+      interpreter.StringStack.Push("test", "es", "12");
+      interpreter.Run(new StringReplaceExpression());
+      Assert.AreEqual("t12t", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test test", "es", "12");
+      interpreter.Run(new StringReplaceExpression());
+      Assert.AreEqual("t12t t12t", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test", "ab", "12");
+      interpreter.Run(new StringReplaceExpression());
+      Assert.AreEqual("test", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test", "", "12");
+      interpreter.Run(new StringReplaceExpression());
+      Assert.AreEqual("test", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test", "ab", "");
+      interpreter.Run(new StringReplaceExpression());
+      Assert.AreEqual("test", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test", "es", "");
+      interpreter.Run(new StringReplaceExpression());
+      Assert.AreEqual("tt", interpreter.StringStack[0]);
+
+      TestStackCounts(stringStack: 6);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestReplaceFirst() {
+      interpreter.StringStack.Push("test", "es", "12");
+      interpreter.Run(new StringReplaceFirstExpression());
+      Assert.AreEqual("t12t", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test test", "es", "12");
+      interpreter.Run(new StringReplaceFirstExpression());
+      Assert.AreEqual("t12t test", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test", "ab", "12");
+      interpreter.Run(new StringReplaceFirstExpression());
+      Assert.AreEqual("test", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test", "", "12");
+      interpreter.Run(new StringReplaceFirstExpression());
+      Assert.AreEqual("test", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test", "ab", "");
+      interpreter.Run(new StringReplaceFirstExpression());
+      Assert.AreEqual("test", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test", "es", "");
+      interpreter.Run(new StringReplaceFirstExpression());
+      Assert.AreEqual("tt", interpreter.StringStack[0]);
+
+      TestStackCounts(stringStack: 6);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestReplaceChar() {
+      interpreter.StringStack.Push("test");
+      interpreter.CharStack.Push('t', 'T');
+      interpreter.Run(new StringReplaceCharExpression());
+      Assert.AreEqual("TesT", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test");
+      interpreter.CharStack.Push('a', 'T');
+      interpreter.Run(new StringReplaceCharExpression());
+      Assert.AreEqual("test", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("");
+      interpreter.CharStack.Push('t', 'T');
+      interpreter.Run(new StringReplaceCharExpression());
+      Assert.AreEqual("", interpreter.StringStack[0]);
+
+      TestStackCounts(stringStack: 3);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestReplaceFirstChar() {
+      interpreter.StringStack.Push("test");
+      interpreter.CharStack.Push('t', 'T');
+      interpreter.Run(new StringReplaceFirstCharExpression());
+      Assert.AreEqual("Test", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test");
+      interpreter.CharStack.Push('a', 'T');
+      interpreter.Run(new StringReplaceFirstCharExpression());
+      Assert.AreEqual("test", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("");
+      interpreter.CharStack.Push('t', 'T');
+      interpreter.Run(new StringReplaceFirstCharExpression());
+      Assert.AreEqual("", interpreter.StringStack[0]);
+
+      TestStackCounts(stringStack: 3);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestRemoveChar() {
+      interpreter.StringStack.Push("test");
+      interpreter.CharStack.Push('t');
+      interpreter.Run(new StringRemoveCharExpression());
+      Assert.AreEqual("es", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test");
+      interpreter.CharStack.Push('a');
+      interpreter.Run(new StringRemoveCharExpression());
+      Assert.AreEqual("test", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("");
+      interpreter.CharStack.Push('t');
+      interpreter.Run(new StringRemoveCharExpression());
+      Assert.AreEqual("", interpreter.StringStack[0]);
+
+      TestStackCounts(stringStack: 3);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestSetChar() {
+      interpreter.StringStack.Push("test");
+      interpreter.CharStack.Push('x');
+      interpreter.IntegerStack.Push(2);
+      interpreter.Run(new StringSetCharExpression());
+      Assert.AreEqual("text", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test");
+      interpreter.CharStack.Push('x');
+      interpreter.IntegerStack.Push(-2);
+      interpreter.Run(new StringSetCharExpression());
+      Assert.AreEqual("text", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("test");
+      interpreter.CharStack.Push('x');
+      interpreter.IntegerStack.Push(6);
+      interpreter.Run(new StringSetCharExpression());
+      Assert.AreEqual("text", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("");
+      interpreter.CharStack.Push('x');
+      interpreter.IntegerStack.Push(2);
+      interpreter.Run(new StringSetCharExpression());
+      Assert.AreEqual("", interpreter.StringStack[0]);
+
+      interpreter.StringStack.Push("s");
+      interpreter.CharStack.Push('x');
+      interpreter.IntegerStack.Push(2);
+      interpreter.Run(new StringSetCharExpression());
+      Assert.AreEqual("x", interpreter.StringStack[0]);
+
+      TestStackCounts(stringStack: 5);
+    }
+
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("StringExpressionTest")]
+    public void TestIterate() {
+      interpreter.StringStack.Push("test");
+      interpreter.IntegerStack.Push(0);
+      interpreter.Run(new PushProgram(new Expression[] {
+        new IntegerIncExpression(),
+        new StringIterateExpression(),
+      }));
+
+      Assert.AreEqual(4, interpreter.IntegerStack[0]);
+      TestStackCounts(integerStack: 1, charStack: 4);
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/StringVectorExpressionTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/StringVectorExpressionTests.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/StringVectorExpressionTests.cs	(revision 15017)
@@ -0,0 +1,34 @@
+﻿namespace HeuristicLab.Tests.Interpreter.Expressions {
+  using System.Collections.Generic;
+  using System.Linq;
+
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
+
+  using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+  [TestClass]
+  public class StringVectorExpressionTests : VectorExpressionTests<string> {
+    protected override string TypeName { get { return "STRING[]"; } }
+
+    protected override IPushStack<IReadOnlyList<string>> Stack { get { return interpreter.StringVectorStack; } }
+    protected override IPushStack<string> LiteralStack { get { return interpreter.StringStack; } }
+
+    protected override IReadOnlyList<string>[] GetValues(int count) {
+      return Enumerable
+        .Range(0, count)
+        .Select(x => GetLiterals(interpreter.Configuration.MaxVectorLength / 2 - 1))
+        .ToArray();
+    }
+
+    protected override IReadOnlyList<string> GetLiterals(int count) {
+      return Enumerable
+        .Range(0, count)
+        .Select(x => interpreter.Configuration.ErcOptions.StringErcOptions.GetErcValue(interpreter.Random))
+        .ToArray();
+    }
+
+    protected override void CheckOtherStacksAreEmpty() {
+      TestStackCounts(stringVectorStack: null);
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/VectorExpressionTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/VectorExpressionTests.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/VectorExpressionTests.cs	(revision 15017)
@@ -0,0 +1,454 @@
+﻿namespace HeuristicLab.Tests.Interpreter.Expressions {
+  using System.Collections.Generic;
+  using System.Linq;
+
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
+
+  using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+  public abstract class VectorExpressionTests<T> : CommonTests<IReadOnlyList<T>> {
+
+    protected abstract IPushStack<T> LiteralStack { get; }
+    protected abstract IReadOnlyList<T> GetLiterals(int count);
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorButLast() {
+      var vector = GetValues(1)[0];
+      Stack.Push(vector);
+
+      var result = vector.Take(vector.Count - 1);
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".BUTLAST");
+      interpreter.Run(expression);
+
+      Assert.IsTrue(result.SequenceEqual(Stack.Top));
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorConcat() {
+      var vectors = GetValues(2);
+      Stack.Push(vectors);
+
+      var result = vectors.SelectMany(x => x);
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".CONCAT");
+      interpreter.Run(expression);
+
+      Assert.IsTrue(result.SequenceEqual(Stack.Top));
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorConj() {
+      var vectors = GetValues(1);
+      var literals = GetLiterals(1);
+
+      Stack.Push(vectors);
+      LiteralStack.Push(literals);
+
+      var result = new List<T>(vectors[0]);
+      result.AddRange(literals);
+
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".CONJ");
+      interpreter.Run(expression);
+
+      Assert.IsTrue(result.SequenceEqual(Stack.Top));
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorContains() {
+      var vectors = Get2Different();
+      var literalContained = vectors[0].Last();
+      var literalNotContained = vectors[1].FirstOrDefault(x => !vectors[0].Contains(x));
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".CONTAINS");
+
+      Stack.Push(vectors[0], vectors[0]);
+      LiteralStack.Push(literalContained, literalNotContained);
+
+      interpreter.Run(expression);
+      interpreter.Run(expression);
+
+      Assert.IsTrue(interpreter.BooleanStack[0]);
+      Assert.IsFalse(interpreter.BooleanStack[1]);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorEmpty() {
+      var emptyVector = new List<T>();
+      var noneEmptyVector = GetValues(1)[0];
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".EMPTYVECTOR");
+
+      Stack.Push(emptyVector, noneEmptyVector);
+      interpreter.Run(expression);
+      interpreter.Run(expression);
+
+      Assert.IsTrue(interpreter.BooleanStack[0]);
+      Assert.IsFalse(interpreter.BooleanStack[1]);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorFirst() {
+      var vector = GetValues(1)[0];
+      var emptyVector = new List<T>();
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".FIRST");
+
+      Stack.Push(emptyVector);
+      interpreter.Run(expression);
+      Assert.IsTrue(LiteralStack.IsEmpty);
+
+      Stack.Push(vector);
+      interpreter.Run(expression);
+      Assert.AreEqual(vector.First(), LiteralStack.Top);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorIndexOf() {
+      var vector = GetValues(1)[0].Distinct().ToList();
+      var emptyVector = new List<T>();
+      var literal = vector.Last();
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".INDEXOF");
+
+      Stack.Push(emptyVector);
+      LiteralStack.Push(literal);
+      interpreter.Run(expression);
+      Assert.IsTrue(LiteralStack == interpreter.IntegerStack ? LiteralStack.Count == 1 : LiteralStack.IsEmpty);
+
+      Stack.Push(vector);
+      LiteralStack.Push(literal);
+      interpreter.Run(expression);
+      Assert.AreEqual(vector.Count - 1, interpreter.IntegerStack.Top);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorIterate() {
+      var vector = GetValues(1)[0];
+      var emptyVector = new List<T>();
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".ITERATE");
+      var bodyExpression = new ExecNoopExpression();
+
+      Stack.Push(emptyVector);
+      interpreter.Run(new PushProgram(new[] { expression, bodyExpression }));
+      Assert.IsTrue(LiteralStack.IsEmpty);
+      Assert.AreEqual(0, Stack.Top.Count);
+
+      Stack.Push(vector);
+      interpreter.Run(new PushProgram(new[] { bodyExpression, expression }));
+      Assert.AreEqual(vector.Count, LiteralStack.Count);
+      Assert.IsTrue(LiteralStack.Reverse().SequenceEqual(vector));
+    }
+
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorLast() {
+      var vector = GetValues(1)[0];
+      var emptyVector = new List<T>();
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".LAST");
+
+      Stack.Push(emptyVector);
+      interpreter.Run(expression);
+      Assert.IsTrue(LiteralStack.IsEmpty);
+
+      Stack.Push(vector);
+      interpreter.Run(expression);
+      Assert.AreEqual(vector.Last(), LiteralStack.Top);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorLength() {
+      var vector = GetValues(1)[0];
+      var emptyVector = new List<T>();
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".LENGTH");
+
+      Stack.Push(emptyVector);
+      interpreter.Run(expression);
+      Assert.AreEqual(0, interpreter.IntegerStack.Top);
+
+      Stack.Push(vector);
+      interpreter.Run(expression);
+      Assert.AreEqual(vector.Count, interpreter.IntegerStack.Top);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorNth() {
+      var vector = GetValues(1)[0];
+      var emptyVector = new List<T>();
+      var index = vector.Count / 2;
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".NTH");
+
+      Stack.Push(emptyVector);
+      interpreter.IntegerStack.Push(index);
+      interpreter.Run(expression);
+      Assert.IsTrue(LiteralStack == interpreter.IntegerStack ? LiteralStack.Count == 1 : LiteralStack.IsEmpty);
+
+      Stack.Push(vector);
+      interpreter.IntegerStack.Push(index);
+      interpreter.Run(expression);
+      Assert.AreEqual(vector[index], LiteralStack.Top);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorOccurrenceOf() {
+      var vector = GetValues(1)[0];
+      var literal = vector.Last();
+      var result = vector.Count(x => x.Equals(literal));
+      var emptyVector = new List<T>();
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".OCCURRENCEOF");
+
+      Stack.Push(emptyVector);
+      LiteralStack.Push(literal);
+      interpreter.Run(expression);
+      Assert.AreEqual(0, interpreter.IntegerStack.Top);
+
+      Stack.Push(vector);
+      LiteralStack.Push(literal);
+      interpreter.Run(expression);
+      Assert.AreEqual(result, interpreter.IntegerStack.Top);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorPushAll() {
+      var vector = GetValues(1)[0];
+      var emptyVector = new List<T>();
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".PUSHALL");
+
+      Stack.Push(emptyVector);
+      interpreter.Run(expression);
+      Assert.IsTrue(LiteralStack.IsEmpty);
+
+      Stack.Push(vector);
+      interpreter.Run(expression);
+      Assert.IsTrue(LiteralStack.Reverse().SequenceEqual(vector));
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorRemove() {
+      var vector = GetValues(1)[0];
+      var emptyVector = new List<T>();
+      var literal = vector.Last();
+      var result = vector.Where(x => !x.Equals(literal));
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".REMOVE");
+
+      Stack.Push(emptyVector);
+      LiteralStack.Push(literal);
+      interpreter.Run(expression);
+      Assert.AreEqual(0, Stack.Top.Count);
+
+      Stack.Push(vector);
+      LiteralStack.Push(literal);
+      interpreter.Run(expression);
+      Assert.IsTrue(Stack.Top.SequenceEqual(result));
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorReplace() {
+      var vector = GetValues(1)[0];
+      var emptyVector = new List<T>();
+      var literal = vector.Last();
+      var literalTarget = vector.First();
+      var result = vector.Select(x => x.Equals(literal) ? literalTarget : x);
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".REPLACE");
+
+      Stack.Push(emptyVector);
+      LiteralStack.Push(literal, literalTarget);
+      interpreter.Run(expression);
+      Assert.AreEqual(0, Stack.Top.Count);
+
+      Stack.Push(vector);
+      LiteralStack.Push(literal, literalTarget);
+      interpreter.Run(expression);
+      Assert.IsTrue(Stack.Top.SequenceEqual(result));
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorReplaceFirst() {
+      var vector = GetValues(1)[0];
+      var emptyVector = new List<T>();
+      var literal = vector.Last();
+      var literalTarget = vector.First(x => !x.Equals(literal));
+      var firstReplaced = false;
+      var result = vector.Select(x => {
+        if (!x.Equals(literal) || firstReplaced) return x;
+        firstReplaced = true;
+        return literalTarget;
+      }).ToArray();
+
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".REPLACEFIRST");
+
+      Stack.Push(emptyVector);
+      LiteralStack.Push(literal, literalTarget);
+      interpreter.Run(expression);
+      Assert.AreEqual(0, Stack.Top.Count);
+
+      Stack.Push(vector);
+      LiteralStack.Push(literal, literalTarget);
+      interpreter.Run(expression);
+      Assert.IsTrue(Stack.Top.SequenceEqual(result));
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorRest() {
+      var vector = GetValues(1)[0];
+      var emptyVector = new List<T>();
+      var result = vector.Skip(1);
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".REST");
+
+      Stack.Push(emptyVector);
+      interpreter.Run(expression);
+      Assert.AreEqual(0, Stack.Top.Count);
+
+      Stack.Push(vector);
+      interpreter.Run(expression);
+      Assert.IsTrue(Stack.Top.SequenceEqual(result));
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorReverse() {
+      var vector = GetValues(1)[0];
+      var emptyVector = new List<T>();
+      var result = new List<T>(vector);
+      result.Reverse();
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".REVERSE");
+
+      Stack.Push(emptyVector);
+      interpreter.Run(expression);
+      Assert.AreEqual(emptyVector, Stack.Top);
+
+      Stack.Push(vector);
+      interpreter.Run(expression);
+      Assert.IsTrue(Stack.Top.SequenceEqual(result));
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorSet() {
+      var vector = GetValues(1)[0];
+      var emptyVector = new List<T>();
+      var index = vector.Count / 2;
+      var literal = vector.Last();
+      var result = vector.ToArray();
+      result[index] = literal;
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".SET");
+
+      Stack.Push(emptyVector);
+      LiteralStack.Push(literal);
+      interpreter.IntegerStack.Push(index);
+      interpreter.Run(expression);
+      Assert.AreEqual(emptyVector, Stack.Top);
+
+      Stack.Push(vector);
+      interpreter.IntegerStack.Push(index);
+      LiteralStack.Push(literal);
+      interpreter.Run(expression);
+      Assert.IsTrue(Stack.Top.SequenceEqual(result));
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorSub() {
+      var vector = GetValues(1)[0];
+      var emptyVector = new List<T>();
+      var start = 0;
+      var end = vector.Count / 2;
+      var result = vector.Skip(start).Take(end).ToArray();
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".SUB");
+
+      Stack.Push(emptyVector);
+      interpreter.IntegerStack.Push(start, end);
+      interpreter.Run(expression);
+      Assert.AreEqual(emptyVector, Stack.Top);
+
+      Stack.Push(vector);
+      interpreter.IntegerStack.Push(start, end);
+      interpreter.Run(expression);
+      Assert.IsTrue(Stack.Top.SequenceEqual(result));
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("ExpressionTest")]
+    [TestCategory("VectorExpressionTest")]
+    public void TestVectorTake() {
+      var vector = GetValues(1)[0];
+      var emptyVector = new List<T>();
+      var count = vector.Count / 2;
+      var result = vector.Take(count).ToArray();
+      var expression = ExpressionTable.GetStatelessExpression(TypeName + ".TAKE");
+
+      Stack.Push(emptyVector);
+      interpreter.IntegerStack.Push(count);
+      interpreter.Run(expression);
+      Assert.AreEqual(emptyVector, Stack.Top);
+
+      Stack.Push(vector);
+      interpreter.IntegerStack.Push(count);
+      interpreter.Run(expression);
+      Assert.IsTrue(Stack.Top.SequenceEqual(result));
+
+      Stack.Push(vector);
+      interpreter.IntegerStack.Push(count * -1);
+      interpreter.Run(expression);
+      Assert.IsTrue(Stack.Top.SequenceEqual(result));
+
+      Stack.Push(vector);
+      interpreter.IntegerStack.Push(count + vector.Count);
+      interpreter.Run(expression);
+      Assert.IsTrue(Stack.Top.SequenceEqual(result));
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Problem/IndividualMapperTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Problem/IndividualMapperTests.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Problem/IndividualMapperTests.cs	(revision 15017)
@@ -0,0 +1,78 @@
+﻿// ReSharper disable AccessToDisposedClosure
+namespace HeuristicLab.Tests.Problem {
+  using System;
+  using System.Diagnostics;
+  using System.Linq;
+
+  using HeuristicLab.Core;
+  using HeuristicLab.Encodings.IntegerVectorEncoding;
+  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc;
+  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Integer;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Data.Pool;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Problem;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
+  using HeuristicLab.Random;
+  using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+  [TestClass]
+  public class IndividualMapperTests {
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("Individual")]
+    public void TestRandomReset() {
+      var random = new MersenneTwister(1337);
+      var config = new PushConfiguration {
+        ErcOptions = new ErcOptions {
+          ErcProbability = 0.05,
+          IntegerErcOptions = new IntegerErcOptions(
+            new IntegerConstantErc(0),
+            new IntegerRangeErc(-1000, 100))
+        }
+      };
+
+      var vector = new IntegerVector(10000, random, 0, config.EnabledExpressions.Count);
+      var randomPool = new ObjectPool<IRandom>(() => new MersenneTwister());
+      var pool = new PushInterpreterPool(config);
+
+      var programs = Enumerable.Range(0, Environment.ProcessorCount)
+        .AsParallel()
+        .Select(i => vector.ToPushProgram(config, randomPool))
+        .ToArray();
+
+      var referenceProgram = vector.ToPushProgram(config, randomPool);
+      Assert.IsTrue(programs.All(p => p.Equals(referenceProgram)));
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("Individual")]
+    public void TestPlushToProgram() {
+      var random = new MersenneTwister();
+      var config = new PushConfiguration {
+        ParenthesesCloseBiasLevel = 4
+      };
+
+      config.DisableStack(StackTypes.Name);
+      config.DisableStack(StackTypes.Float);
+      config.DisableStack(StackTypes.Code);
+      config.DisableStack(StackTypes.Boolean);
+      config.DisableStack(StackTypes.IntegerVector);
+      config.DisableStack(StackTypes.FloatVector);
+      config.DisableStack(StackTypes.StringVector);
+      config.DisableStack(StackTypes.BooleanVector);
+
+      var sw = new Stopwatch();
+      var vector = new IntegerVector(100, random, 0, config.EnabledExpressions.Count);
+
+      sw.Start();
+      var program = vector.ToPushProgram(config, random);
+      sw.Stop();
+
+      Console.WriteLine(@"Duration: {0}ms", sw.ElapsedMilliseconds);
+      Assert.AreEqual(vector.Length, program.TotalExpressionCount);
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Simplifier/SimplifierTests.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Simplifier/SimplifierTests.cs	(revision 15017)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Simplifier/SimplifierTests.cs	(revision 15017)
@@ -0,0 +1,50 @@
+﻿namespace HeuristicLab.Tests.Simplifier {
+  using System;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Parser;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Simplifier;
+  using HeuristicLab.Random;
+
+  using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+  [TestClass]
+  public class SimplifierTests {
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("Simplifier")]
+    public void SimplifySubProgramsTest() {
+      var program = PushParser.ParseProgram("( ( ( ( ( 1 ) ) ) ) )");
+      var result = PushParser.ParseProgram("( 1 )");
+      var simplerProgram = Simplifier.SimplifySubPrograms(program);
+
+      Console.WriteLine(simplerProgram);
+      Assert.AreEqual(result, simplerProgram);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "Short")]
+    [TestCategory("Simplifier")]
+    public void RemoveUnnecessaryExpressionsTest() {
+      var program = PushParser.ParseProgram("( 5 ( INTEGER.DUP FLOAT.+ FLOAT.- ) ( EXEC.DO ( EXEC.IF ) EXEC.Y ) INTEGER.+ )");
+      var result = PushParser.ParseProgram("( 5 INTEGER.DUP INTEGER.+ )");
+      var pool = new PushInterpreterPool();
+      var random = new MersenneTwister(1337);
+
+      Func<PushProgram, double> evaluator = p => {
+        using (var interpreter = pool.Create(random)) {
+          interpreter.Run(p);
+          return interpreter.IntegerStack.IsEmpty
+            ? double.MaxValue
+            : Math.Abs(interpreter.IntegerStack.Top - 10);
+        }
+      };
+
+      var simplerProgram = Simplifier.Simplify(program, pool.PushConfiguration, evaluator);
+
+      Console.WriteLine(simplerProgram);
+      Assert.AreEqual(result, simplerProgram);
+    }
+  }
+}
Index: /branches/PushGP/HeuristicLab.PushGP/PushGP.Cli/Program.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/PushGP.Cli/Program.cs	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/PushGP.Cli/Program.cs	(revision 15017)
@@ -3,15 +3,46 @@
 
 namespace HeuristicLab.Algorithms.PushGP.Cli {
+  using System.Collections.Generic;
+  using System.Linq;
+
   using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration;
+  using HeuristicLab.Problems.ProgramSynthesis.Push.Constants;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
 
   class Program {
     static void Main(string[] args) {
-      if (args.Length == 0) return;
+      string code = null;
 
-      var code = args[0];
+      if (args.Length == 0) {
+        var lines = new List<string>();
+
+        Console.WriteLine(@"Program: ( must start with '(' and end with ')' )");
+
+        var bracesCount = 0;
+        var linesRead = 0;
+
+        while (bracesCount > 0 || lines.Count == 0 || linesRead == 0) {
+          var line = Console.ReadLine();
+          linesRead++;
+
+          if (string.IsNullOrWhiteSpace(line))
+            continue;
+
+          line = line.Trim();
+          lines.Add(line);
+
+          var openBraces = line.Count(c => c == PushEnvironment.ProgramStartSymbol);
+          var closeBraces = line.Count(c => c == PushEnvironment.ProgramEndSymbol);
+          bracesCount += openBraces - closeBraces;
+        }
+
+        code = string.Join(" ", lines);
+      } else {
+        code = args[0];
+      }
+
       EvaluateStepwise(code).Wait();
 
-      Console.ReadKey();
+      Console.WriteLine(@"Press any key to terminate...");
     }
 
Index: /branches/PushGP/HeuristicLab.PushGP/PushGP.Cli/Push.Cli.csproj
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/PushGP.Cli/Push.Cli.csproj	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/PushGP.Cli/Push.Cli.csproj	(revision 15017)
@@ -50,4 +50,5 @@
     <Reference Include="System" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Data.DataSetExtensions" />
Index: /branches/PushGP/HeuristicLab.PushGP/PushGp.sln.DotSettings.user
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/PushGp.sln.DotSettings.user	(revision 15016)
+++ /branches/PushGP/HeuristicLab.PushGP/PushGp.sln.DotSettings.user	(revision 15017)
@@ -1,7 +1,16 @@
 ﻿<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
+	<s:Boolean x:Key="/Default/CoverageSessionsPersistenceManagerSettings/SessionPersistentData/=93500A25BF4B4D74BD88F90837CFB4C0/@KeyIndexDefined">True</s:Boolean>
+	<s:String x:Key="/Default/CoverageSessionsPersistenceManagerSettings/SessionPersistentData/=93500A25BF4B4D74BD88F90837CFB4C0/ProductVersion/@EntryValue">2016.2.2</s:String>
+	<s:String x:Key="/Default/CoverageSessionsPersistenceManagerSettings/SessionPersistentData/=93500A25BF4B4D74BD88F90837CFB4C0/SnapshotLocation/@EntryValue">C:\Users\patrik\AppData\Local\Temp\ssm.Nabitin.tmp</s:String>
 	<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue">&lt;AssemblyExplorer&gt;&#xD;
   &lt;Assembly Path="T:\BTSync\projects\svn\hl\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll" /&gt;&#xD;
   &lt;Assembly Path="T:\BTSync\projects\svn\hl\trunk\sources\bin\HeuristicLab.Data-3.3.dll" /&gt;&#xD;
 &lt;/AssemblyExplorer&gt;</s:String>
+	<s:String x:Key="/Default/Environment/ContinuousTesting/PersistentDataLocation/@EntryValue">C:\Users\patrik\AppData\Local\Temp\JetBrains\ContinuousTesting\746fd168-170a-41d1-95ca-ce9f1586dc7d</s:String>
+	<s:String x:Key="/Default/Environment/ContinuousTesting/ScopeCriterion/@EntryValue">9b0nIQIAAAD5I2nNAgAAANetlRIwh2K/AQAAAOWawpcGAAAATQBTAFQAZQBzAHQAJAAAADEAMQA3AEIANwBEADYAOAAtAEUARAA3AEQALQA0ADMANQAwAC0AOQA5ADYAQgAtADkAQwBBADEANQAyADUAOQBFADEAMAA3ADgAAABIAGUAdQByAGkAcwB0AGkAYwBMAGEAYgAuAFQAZQBzAHQAcwAuAEIAZQBuAGMAaABtAGEAcgBrAC4AUAByAG8AYgBsAGUAbQBUAGUAcwB0AHMALgBDAG8AbABsAGEAdAB6AE4AdQBtAGIAZQByAHMA9b0nIQIAAADXrZUSMIdivwEAAADlmsKXBgAAAE0AUwBUAGUAcwB0ACQAAAAxADEANwBCADcARAA2ADgALQBFAEQANwBEAC0ANAAzADUAMAAtADkAOQA2AEIALQA5AEMAQQAxADUAMgA1ADkARQAxADAANwA4AAAASABlAHUAcgBpAHMAdABpAGMATABhAGIALgBUAGUAcwB0AHMALgBCAGUAbgBjAGgAbQBhAHIAawAuAFAAcgBvAGIAbABlAG0AVABlAHMAdABzAC4AQwBvAGwAbABhAHQAegBOAHUAbQBiAGUAcgBzADCHYr8BAAAA5ZrClwYAAABNAFMAVABlAHMAdAAkAAAAMQAxADcAQgA3AEQANgA4AC0ARQBEADcARAAtADQAMwA1ADAALQA5ADkANgBCAC0AOQBDAEEAMQA1ADIANQA5AEUAMQAwADcAMAAAAEgAZQB1AHIAaQBzAHQAaQBjAEwAYQBiAC4AVABlAHMAdABzAC4AUAByAG8AYgBsAGUAbQAuAEkAbgBkAGkAdgBpAGQAdQBhAGwATQBhAHAAcABlAHIAVABlAHMAdABzADCHYr8BAAAA5ZrClwYAAABNAFMAVABlAHMAdAAkAAAAMQAxADcAQgA3AEQANgA4AC0ARQBEADcARAAtADQAMwA1ADAALQA5ADkANgBCAC0AOQBDAEEAMQA1ADIANQA5AEUAMQAwADcAMwAAAEgAZQB1AHIAaQBzAHQAaQBjAEwAYQBiAC4AVABlAHMAdABzAC4AQgBlAG4AYwBoAG0AYQByAGsALgBTAG8AbAB1AHQAaQBvAG4AVABlAHMAdABzAC4AVwBhAGwAbABpAHMAUABpAA==</s:String>
+	<s:String x:Key="/Default/Environment/ContinuousTesting/SnapshotLocation/@EntryValue">C:\Users\patrik\AppData\Local\Temp\ssm.Gihabis.tmp</s:String>
+	
+	
+	<s:Int64 x:Key="/Default/Environment/ContinuousTestingSessionDescriptor/GroupingIndex/@EntryValue">5</s:Int64>
 	<s:Boolean x:Key="/Default/VsIntegrationViewOptions/ShowCharts/@EntryValue">False</s:Boolean>
 	</wpf:ResourceDictionary>
