Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP.Cli/Program.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP.Cli/Program.cs	(revision 14320)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP.Cli/Program.cs	(revision 14323)
@@ -1,3 +1,7 @@
 ﻿using System;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+using HeuristicLab.Algorithms.PushGP.Generators;
 using HeuristicLab.Algorithms.PushGP.Interpreter;
 
@@ -8,11 +12,7 @@
         static void Main(string[] args)
         {
-            var interpreter = new PushGPInterpreter();
-
-            interpreter.IntegerStack.Push(3, 3);
-            interpreter.FloatStack.Push(2.0, 3.0);
-
-            interpreter.Interprete(example17);
-            interpreter.PrintStacks();
+            //Stepwise().Wait();
+            PerformanceTest();
+            //PerformanceTestCodeGenerator();
 
             Console.WriteLine("\nPress any key to continue...");
@@ -20,32 +20,61 @@
         }
 
-        static string example1 = "( 2 3 INTEGER.* 4.1 5.2 FLOAT.+ TRUE FALSE BOOLEAN.OR )";
-        static string example2 = "( 5 1.23 INTEGER.+ ( 4 ) INTEGER.- 5.67 FLOAT.* )";
-        static string example3 = "( 5 INTEGER.DUP INTEGER.+ )";
-        static string example4 = "5";
-        static string example5 = "INTEGER.DUP";
-        static string example6 = "( 5 CODE.QUOTE ( INTEGER.DUP INTEGER.+ ) CODE.DO )";
-        static string example7 = "( DOUBLE CODE.QUOTE ( INTEGER.DUP INTEGER.+ ) CODE.DEFINE 5 DOUBLE )";
-        static string example8 = "( CODE.QUOTE ( INTEGER.DUP INTEGER.+ ) DOUBLE CODE.DEFINE 5 DOUBLE )";
-        static string example9 = "( DOUBLE EXEC.DEFINE ( INTEGER.DUP INTEGER.+ ) 5 DOUBLE )";
+        static async Task Stepwise()
+        {
+            var program = PushGPInterpreter.Encode("( 2 3 INTEGER.* 4.1 5.2 FLOAT.+ TRUE FALSE BOOLEAN.OR )");
+            var interpreter = new PushGPInterpreter();
 
-        // Requires an integer preloaded
-        static string example10 = @"( CODE.QUOTE ( INTEGER.POP 1 )
-                                      CODE.QUOTE ( CODE.DUP INTEGER.DUP 1 INTEGER.- CODE.DO INTEGER.* )
-                                      INTEGER.DUP 2 INTEGER.< CODE.IF )";
-        static string example11 = "( 1 INTEGER.MAX 1 EXEC.DO*RANGE INTEGER.* )";
-        static string example12 = "( 1 INTEGER.MAX 1 EXEC.DO*RANGE ( 2 INTEGER.* ) )";
-        static string example13 = "( INTEGER.= CODE.QUOTE FLOAT.* CODE.QUOTE FLOAT./ CODE.IF )";
-        static string example14 = "( INTEGER.= EXEC.IF FLOAT.* FLOAT./ )";
-        static string example15 = "( EXEC.Y ( ( FALSE 2 INTEGER.* ) EXEC.IF ( ) EXEC.POP ) )";
-        static string example16 = "( EXEC.Y ( ( 2 INTEGER.* INTEGER.DUP 1000 INTEGER.< ) EXEC.IF ( ) EXEC.POP ) )";
-        static string example17 = @"( ARG FLOAT.DEFINE
-                                      EXEC.Y (
-                                          ARG FLOAT.*
-                                          1 INTEGER.-
-                                          INTEGER.DUP 1 INTEGER.>
-                                          EXEC.IF ( ) EXEC.POP
-                                      )
-                                    )";
+            var task = interpreter.InterpreteAsync(program);
+            await interpreter.PauseAsync();
+
+            while (!interpreter.IsCompleted)
+            {
+                Console.Clear();
+                interpreter.PrintStacks();
+                interpreter.Step();
+
+                var input = Console.ReadKey();
+                if (input.Key == ConsoleKey.Escape)
+                {
+                    break;
+                }
+                else if (input.Key == ConsoleKey.Spacebar)
+                {
+                    await interpreter.ResumeAsync();
+                }
+            }
+
+            Console.Clear();
+            interpreter.PrintStacks();
+        }
+
+        static void PerformanceTest()
+        {
+            var program = PushGPInterpreter.Encode("( 5 INTEGER.DUP INTEGER.+ )");
+            var interpreter = new PushGPInterpreter();
+            var sw = new Stopwatch();
+
+            sw.Start();
+            for (var i = 0; i < 20000000; i++)
+            {
+                interpreter.Interprete(program);
+                interpreter.Reset();
+            }
+            sw.Stop();
+
+            Console.WriteLine(sw.Elapsed);
+        }
+
+        static void PerformanceTestCodeGenerator()
+        {
+            var sw = new Stopwatch();
+
+            sw.Start();
+            var expressions = CodeGenerator.RandomCode(10000000);
+            sw.Stop();
+
+            Console.WriteLine($"Count: {expressions.Count()}");
+            Console.WriteLine(sw.Elapsed);
+        }
     }
 }
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP.sln
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP.sln	(revision 14320)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP.sln	(revision 14323)
@@ -7,4 +7,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.PushGP.Cli", "HeuristicLab.Algorithms.PushGP.Cli\HeuristicLab.Algorithms.PushGP.Cli.csproj", "{293FD718-99E9-4F6A-A0EC-343C92D0B03E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Tests", "HeuristicLab.Tests\HeuristicLab.Tests.csproj", "{117B7D68-ED7D-4350-996B-9CA15259E107}"
 EndProject
 Global
@@ -22,4 +24,8 @@
 		{293FD718-99E9-4F6A-A0EC-343C92D0B03E}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{293FD718-99E9-4F6A-A0EC-343C92D0B03E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{117B7D68-ED7D-4350-996B-9CA15259E107}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{117B7D68-ED7D-4350-996B-9CA15259E107}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{117B7D68-ED7D-4350-996B-9CA15259E107}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{117B7D68-ED7D-4350-996B-9CA15259E107}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Data/Configuration.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Data/Configuration.cs	(revision 14320)
+++ 	(revision )
@@ -1,34 +1,0 @@
-﻿using System.Collections.Generic;
-
-namespace HeuristicLab.Algorithms.PushGP.Data
-{
-    public class Configuration
-    {
-        public bool IsBooleanStackEnabled { get; set; } = true;
-        public bool IsIntegerStackEnabled { get; set; } = true;
-        public bool IsFloatStackEnabled { get; set; } = true;
-        public bool IsCodeStackEnabled { get; set; } = true;
-        public bool IsNameStackEnabled { get; set; } = true;
-
-        public IList<OpCode> AllowedInstructions { get; set; }
-
-        /// <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 uint EvalpushLimit { get; set; } = int.MaxValue;
-
-        /// <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 uint MaxPointsInProgram { get; set; } = int.MaxValue;
-
-        public bool TopLevelPushCode { get; set; } = true;
-    }
-}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/ExpressionCreatorTable.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/ExpressionCreatorTable.cs	(revision 14320)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/ExpressionCreatorTable.cs	(revision 14323)
@@ -2,4 +2,6 @@
 using System.Collections.Generic;
 using HeuristicLab.Algorithms.PushGP.Expressions;
+
+using LinqExpression = System.Linq.Expressions.Expression;
 
 namespace HeuristicLab.Algorithms.PushGP
@@ -72,7 +74,7 @@
         private static Func<Expression> GetExpressionCreator(Type type)
         {
-            return System.Linq.Expressions.Expression.Lambda<Func<Expression>>(
-                       System.Linq.Expressions.Expression.New(type.GetConstructor(Type.EmptyTypes))
-                     ).Compile();
+            return LinqExpression.Lambda<Func<Expression>>(
+                       LinqExpression.New(type.GetConstructor(Type.EmptyTypes))
+                   ).Compile();
         }
 
@@ -83,4 +85,9 @@
             else throw new NotSupportedException("OpCode: " + opCode);
         }
+
+        public static bool TryGetCreator(OpCode opCode, out Func<Expression> creator)
+        {
+            return symbolTable.TryGetValue(opCode, out creator);
+        }
     }
 }
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Boolean/BooleanPushExpression.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Boolean/BooleanPushExpression.cs	(revision 14320)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Boolean/BooleanPushExpression.cs	(revision 14323)
@@ -19,5 +19,5 @@
         public override string ToString()
         {
-            return $"{base.ToString()}({this.Value})";
+            return $"{this.Value.ToString().ToUpper()}";
         }
     }
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Exec/ExecExpandExpression.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Exec/ExecExpandExpression.cs	(revision 14320)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Exec/ExecExpandExpression.cs	(revision 14323)
@@ -23,5 +23,5 @@
         public override string ToString()
         {
-            return $"({string.Join(", ", this.Expressions.Reverse())})";
+            return $"( {string.Join(" ", this.Expressions.Reverse())} )";
         }
     }
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Exec/ExecYExpression.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Exec/ExecYExpression.cs	(revision 14320)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Exec/ExecYExpression.cs	(revision 14323)
@@ -20,5 +20,5 @@
             });
 
-            interpreterService.ExecStack.Insert(1, expandExpression);
+            interpreterService.ExecStack.Insert(interpreterService.ExecStack.Count - 1, expandExpression);
         }
     }
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Expression.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Expression.cs	(revision 14320)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Expression.cs	(revision 14323)
@@ -44,5 +44,5 @@
                 return;
 
-            var value = stack.ElementAt(0);
+            var value = stack.Top;
             stack.Push(value);
         }
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Float/FloatPushExpression.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Float/FloatPushExpression.cs	(revision 14320)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Float/FloatPushExpression.cs	(revision 14323)
@@ -19,5 +19,5 @@
         public override string ToString()
         {
-            return $"{base.ToString()}({this.Value})";
+            return $"{this.Value}";
         }
     }
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Integer/IntegerPushExpression.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Integer/IntegerPushExpression.cs	(revision 14320)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Integer/IntegerPushExpression.cs	(revision 14323)
@@ -19,5 +19,5 @@
         public override string ToString()
         {
-            return $"{base.ToString()}({this.Value})";
+            return $"{this.Value}";
         }
     }
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Generators/CodeGenerator.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Generators/CodeGenerator.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Generators/CodeGenerator.cs	(revision 14323)
@@ -0,0 +1,55 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Algorithms.PushGP.Expressions;
+
+namespace HeuristicLab.Algorithms.PushGP.Generators
+{
+    public static class CodeGenerator
+    {
+        public static IEnumerable<Expression> RandomCode(int maxPoints)
+        {
+            var actualPoints = StaticRandom.Next(1, maxPoints);
+
+            return RandomCodeWithSize(actualPoints).ToArray();
+        }
+
+        private static IEnumerable<Expression> RandomCodeWithSize(int points)
+        {
+            if (points == 1)
+            {
+                OpCode opCode;
+                Func<Expression> creator;
+
+                do
+                {
+                    // TODO: If this is an "ephemeral random constant"???? then return a randomly - chosen value of the appropriate type;
+                    opCode = (OpCode)StaticRandom.Next(OpCodeExtensions.Min, OpCodeExtensions.Max);
+                }
+                while (!ExpressionCreatorTable.TryGetCreator(opCode, out creator));
+
+                return new[] { creator.Invoke() };
+            }
+            else
+            {
+                var sizesThisLevel = Decompose(points - 1, points - 1);
+
+                return sizesThisLevel.SelectMany(size => RandomCodeWithSize(size));
+            }
+        }
+
+        private static IEnumerable<int> Decompose(int number, int maxParts)
+        {
+            if (number == 1 || maxParts == 1)
+            {
+                return new[] { number };
+            }
+            else
+            {
+                var thisPart = StaticRandom.Next(1, number - 1);
+
+                return new[] { thisPart }.Concat(Decompose(number - thisPart, maxParts - 1));
+            }
+        }
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Generators/Configuration.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Generators/Configuration.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Generators/Configuration.cs	(revision 14323)
@@ -0,0 +1,32 @@
+﻿namespace HeuristicLab.Algorithms.PushGP.Generators
+{
+    public class Configuration
+    {
+        /// <summary>
+        /// The minimum INTEGER that will be produced as an ephemeral random INTEGER constant or from a call to INTEGER.RAND.
+        /// </summary>
+        public long MinRandomInteger { get; set; } = long.MinValue;
+
+        /// <summary>
+        /// The maximum INTEGER that will be produced as an ephemeral random INTEGER constant or from a call to INTEGER.RAND.
+        /// </summary>
+        public long MaxRandomInteger { get; set; } = long.MaxValue;
+
+        /// <summary>
+        /// The minimum FLOAT that will be produced as an ephemeral random FLOAT constant or from a call to FLOAT.RAND.
+        /// </summary>
+        public double MinRandomFloag { get; set; } = double.MinValue;
+
+        /// <summary>
+        /// The maximum FLOAT that will be produced as an ephemeral random FLOAT constant or from a call to FLOAT.RAND.
+        /// </summary>
+        public double MaxRandomFloag { get; set; } = double.MaxValue;
+
+        /// <summary>
+        /// The probability that the selection of the ephemeral
+        /// random NAME constant for inclusion in randomly generated code will produce a new name
+        /// (rather than a name that was previously generated).
+        /// </summary>
+        public double NewErcNameProbability { get; set; } = 0.5;
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP.csproj
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP.csproj	(revision 14320)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP.csproj	(revision 14323)
@@ -41,5 +41,5 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Data\Configuration.cs" />
+    <Compile Include="Interpreter\Configuration.cs" />
     <Compile Include="Data\Expression.cs" />
     <Compile Include="Expressions\Boolean\BooleanAndExpression.cs" />
@@ -96,4 +96,6 @@
     <Compile Include="Expressions\Name\NameDuplicateExpression.cs" />
     <Compile Include="Expressions\Name\NameDefineXExecExpression.cs" />
+    <Compile Include="Generators\CodeGenerator.cs" />
+    <Compile Include="Generators\Configuration.cs" />
     <Compile Include="InstructionSets\ExecInstructionSet.cs" />
     <Compile Include="InstructionSets\CodeInstructionSet.cs" />
@@ -106,14 +108,12 @@
     <Compile Include="OpCodeExtensions.cs" />
     <Compile Include="OperationTable.cs" />
-    <Compile Include="Parser.cs" />
+    <Compile Include="Parser\Parser.cs" />
+    <Compile Include="StaticRandom.cs" />
     <Compile Include="Stack\IStack.cs" />
-    <Compile Include="Interpreter.cs" />
+    <Compile Include="Interpreter\Interpreter.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Stack\IInterpreterService.cs" />
     <Compile Include="Stack\PushGPStack.cs" />
-    <Compile Include="SymbolTable.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <Folder Include="Generator\" />
+    <Compile Include="Parser\SymbolTable.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/InstructionSets/CommonInstructionSet.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/InstructionSets/CommonInstructionSet.cs	(revision 14320)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/InstructionSets/CommonInstructionSet.cs	(revision 14323)
@@ -45,5 +45,5 @@
 //                return;
 
-//            var value = stack.ElementAt(0);
+//            var value = stack.Top;
 //            stack.Push(value);
 //        }
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Interpreter.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Interpreter.cs	(revision 14320)
+++ 	(revision )
@@ -1,102 +1,0 @@
-﻿using System.Collections.Generic;
-using HeuristicLab.Algorithms.PushGP.Data;
-using HeuristicLab.Algorithms.PushGP.Expressions;
-using HeuristicLab.Algorithms.PushGP.Stack;
-
-namespace HeuristicLab.Algorithms.PushGP.Interpreter
-{
-    public class PushGPInterpreter : IInterpreterService
-    {
-        private Parser parser = new Parser();
-
-        public PushGPInterpreter(Configuration config = null)
-        {
-            this.Configuration = config ?? new Configuration();
-
-            this.CodeStack = new PushGPStack<Expression>();
-            this.ExecStack = new PushGPStack<Expression>();
-            this.NameStack = new PushGPStack<string>();
-            this.BooleanStack = new PushGPStack<bool>();
-            this.IntegerStack = new PushGPStack<long>();
-            this.FloatStack = new PushGPStack<double>();
-        }
-
-        public Configuration Configuration { get; }
-
-        public IStack<Expression> CodeStack { get; }
-        public IStack<Expression> ExecStack { get; }
-        public IStack<string> NameStack { get; }
-        public IStack<bool> BooleanStack { get; }
-        public IStack<long> IntegerStack { get; }
-        public IStack<double> FloatStack { get; }
-
-        public IDictionary<string, Expression> CustomExpressions { get; } = new Dictionary<string, Expression>();
-
-        public void Interprete(string code)
-        {
-            var program = this.Encode(code);
-
-            this.Interprete(program);
-        }
-
-        public void Interprete(Expression program)
-        {
-            this.ExecStack.Push(program);
-
-            if (this.Configuration.TopLevelPushCode)
-            {
-                this.CodeStack.Push(program);
-            }
-
-            // run top level expression
-            this.ExecStack.Pop().Eval(this);
-
-            while (this.ExecStack.Count > 0)
-            {
-                var expression = this.ExecStack.Pop();
-                var isNotCodeOp = !expression.OpCode.IsCodeOp();
-
-                if (isNotCodeOp)
-                {
-                    this.CodeStack.Push(expression);
-                }
-
-                expression.Eval(this);
-
-                //System.Console.WriteLine($"Current: {expression}");
-                //this.PrintStacks();
-                //System.Console.WriteLine("\n\n\n");
-
-                if (isNotCodeOp)
-                {
-                    CodeStack.Pop();
-                }
-            }
-        }
-
-        public Expression Encode(string code)
-        {
-            return this.parser.Parse(code);
-        }
-
-        public string Decode(Expression expression)
-        {
-            return string.Concat(expression.ToString());
-        }
-
-        public void PrintStacks()
-        {
-            this.PrintStack("EXEC", this.ExecStack);
-            this.PrintStack("CODE", this.CodeStack);
-            this.PrintStack("NAME", this.NameStack);
-            this.PrintStack("BOOLEAN", this.BooleanStack);
-            this.PrintStack("FLOAT", this.FloatStack);
-            this.PrintStack("INTEGER", this.IntegerStack);
-        }
-
-        private void PrintStack<T>(string name, IStack<T> stack)
-        {
-            System.Console.WriteLine($"--- {name} ---\n{stack}\n---------------------------------------------------");
-        }
-    }
-}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Interpreter/Configuration.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Interpreter/Configuration.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Interpreter/Configuration.cs	(revision 14323)
@@ -0,0 +1,83 @@
+﻿using System.Collections.Generic;
+using HeuristicLab.Algorithms.PushGP.Expressions;
+
+namespace HeuristicLab.Algorithms.PushGP.Interpreter
+{
+    public class Configuration
+    {
+        public bool IsBooleanStackEnabled { get; set; } = true;
+        public bool IsIntegerStackEnabled { get; set; } = true;
+        public bool IsFloatStackEnabled { get; set; } = true;
+        public bool IsCodeStackEnabled { get; set; } = true;
+        public bool IsNameStackEnabled { get; set; } = true;
+
+        public IList<OpCode> AllowedInstructions { get; set; }
+
+        public IList<Expression> PredefinedExpressions { get; set; }
+
+        /// <summary>
+        /// The minimum INTEGER that will be produced as an ephemeral random INTEGER constant or from a call to INTEGER.RAND.
+        /// </summary>
+        public long MinRandomInteger { get; set; } = long.MinValue;
+
+        /// <summary>
+        /// The maximum INTEGER that will be produced as an ephemeral random INTEGER constant or from a call to INTEGER.RAND.
+        /// </summary>
+        public long MaxRandomInteger { get; set; } = long.MaxValue;
+
+        /// <summary>
+        /// The minimum FLOAT that will be produced as an ephemeral random FLOAT constant or from a call to FLOAT.RAND.
+        /// </summary>
+        public double MinRandomFloag { get; set; } = double.MinValue;
+
+        /// <summary>
+        /// The maximum FLOAT that will be produced as an ephemeral random FLOAT constant or from a call to FLOAT.RAND.
+        /// </summary>
+        public double MaxRandomFloag { get; set; } = double.MaxValue;
+
+        /// <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 uint EvalPushLimit { get; set; } = uint.MaxValue;
+
+        /// <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 uint MaxPointsInProgram { get; set; } = uint.MaxValue;
+
+        /// <summary>
+        /// The maximum number of points in an expression produced by the CODE.RAND instruction.
+        /// </summary>
+        public uint MaxPointsInRandomExpression { get; set; } = uint.MaxValue;
+
+        /// <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 bool TopLevelPushCode { get; set; } = true;
+
+        /// <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 bool TopLevelPopCode { get; set; } = true;
+
+        /// <summary>
+        /// The probability that the selection of the ephemeral
+        /// random NAME constant for inclusion in randomly generated code will produce a new name
+        /// (rather than a name that was previously generated).
+        /// </summary>
+        public double NewErcNameProbability { get; set; } = 0.5;
+
+        public ushort RandomSeedMax { get; set; } = 30081;
+        public ushort RandomSeedMin { get; set; } = 0;
+
+        public ushort? RandomSeed { get; set; } = null;
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Interpreter/Interpreter.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Interpreter/Interpreter.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Interpreter/Interpreter.cs	(revision 14323)
@@ -0,0 +1,217 @@
+﻿using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using HeuristicLab.Algorithms.PushGP.Expressions;
+using HeuristicLab.Algorithms.PushGP.Stack;
+
+namespace HeuristicLab.Algorithms.PushGP.Interpreter
+{
+    public class PushGPInterpreter : IInterpreterService
+    {
+        private static Parser parser = new Parser();
+        private Task currentTask;
+
+        public PushGPInterpreter(Configuration config = null)
+        {
+            this.Configuration = config ?? new Configuration();
+
+            this.CodeStack = new PushGPStack<Expression>();
+            this.ExecStack = new PushGPStack<Expression>();
+            this.NameStack = new PushGPStack<string>();
+            this.BooleanStack = new PushGPStack<bool>();
+            this.IntegerStack = new PushGPStack<long>();
+            this.FloatStack = new PushGPStack<double>();
+        }
+
+        public Configuration Configuration { get; }
+
+        public bool IsPaused { get; private set; } = false;
+        public bool IsAborted { get; private set; } = false;
+        public bool IsRunning => this.ExecStack.Count > 0 && !IsPaused && !IsAborted;
+        public bool IsCompleted => this.ExecStack.Count == 0;
+        public bool CanStep => !IsCompleted && !IsAborted && IsPaused;
+
+        public IStack<Expression> CodeStack { get; }
+        public IStack<Expression> ExecStack { get; }
+        public IStack<string> NameStack { get; }
+        public IStack<bool> BooleanStack { get; }
+        public IStack<long> IntegerStack { get; }
+        public IStack<double> FloatStack { get; }
+
+        public IDictionary<string, Expression> CustomExpressions { get; } = new Dictionary<string, Expression>();
+
+        public void Reset()
+        {
+            this.IsAborted = false;
+            this.IsPaused = false;
+            this.currentTask = null;
+
+            this.ExecStack.Clear();
+            this.CodeStack.Clear();
+            this.NameStack.Clear();
+            this.BooleanStack.Clear();
+            this.IntegerStack.Clear();
+            this.FloatStack.Clear();
+        }
+
+        public async void AbortAndReset()
+        {
+            await this.AbortAsync();
+            this.Reset();
+        }
+
+        public void Interprete(string code)
+        {
+            var program = Encode(code);
+            this.Interprete(program);
+        }
+
+        public Task InterpreteAsync(string code, CancellationToken token = default(CancellationToken))
+        {
+            var program = Encode(code);
+
+            this.currentTask = this.InterpreteAsync(program, token);
+
+            return currentTask;
+        }
+
+        public Task InterpreteAsync(Expression program, CancellationToken token = default(CancellationToken))
+        {
+            this.currentTask = Task.Run(() => this.Interprete(program), token);
+
+            return currentTask;
+        }
+
+        public void Interprete(Expression program)
+        {
+            this.ExecStack.Push(program);
+            this.CodeStack.Push(program);
+
+            // run top expression
+            this.ExecStack.Pop().Eval(this);
+
+            this.Interprete();
+        }
+
+        private void Interprete()
+        {
+            while (IsRunning)
+            {
+                this.DoStep();
+            }
+
+            if (this.Configuration.TopLevelPushCode)
+            {
+                this.CodeStack.Pop();
+            }
+        }
+
+        private void DoStep()
+        {
+            var expression = this.ExecStack.Pop();
+            var isNotCodeOp = !expression.OpCode.IsCodeOp();
+
+            if (isNotCodeOp)
+            {
+                this.CodeStack.Push(expression);
+            }
+
+            expression.Eval(this);
+
+            if (isNotCodeOp)
+            {
+                CodeStack.Pop();
+            }
+        }
+
+        private Task InterpreteAsync()
+        {
+            this.currentTask = Task.Run(() =>
+            {
+                this.Interprete();
+            });
+
+            return this.currentTask;
+        }
+
+        public async Task AbortAsync()
+        {
+            if (this.IsAborted || this.IsCompleted)
+                return;
+
+            this.IsAborted = true;
+
+            if (this.currentTask != null)
+            {
+                await this.currentTask;
+            }
+        }
+
+        public async Task PauseAsync()
+        {
+            if (this.IsPaused || this.IsCompleted)
+                return;
+
+            this.IsPaused = true;
+
+            if (this.currentTask != null)
+            {
+                await this.currentTask;
+            }
+        }
+
+        public Task ResumeAsync()
+        {
+            if (this.IsPaused)
+            {
+                this.IsPaused = false;
+                return this.InterpreteAsync();
+            }
+
+            return this.currentTask;
+        }
+
+        public void Step()
+        {
+            if (CanStep)
+            {
+                DoStep();
+            }
+        }
+
+        public static Expression Encode(string code)
+        {
+            return parser.Parse(code);
+        }
+
+        public static Task<Expression> EncodeAsync(string code, CancellationToken token = default(CancellationToken))
+        {
+            return Task.Run(() => Encode(code), token);
+        }
+
+        public static string Decode(Expression expression)
+        {
+            return string.Concat(expression.ToString());
+        }
+
+        public static Task<string> DecodeAsync(Expression expression, CancellationToken token = default(CancellationToken))
+        {
+            return Task.Run(() => Decode(expression), token);
+        }
+
+        public void PrintStacks()
+        {
+            this.PrintStack("EXEC", this.ExecStack);
+            this.PrintStack("CODE", this.CodeStack);
+            this.PrintStack("NAME", this.NameStack);
+            this.PrintStack("BOOLEAN", this.BooleanStack);
+            this.PrintStack("FLOAT", this.FloatStack);
+            this.PrintStack("INTEGER", this.IntegerStack);
+        }
+
+        private void PrintStack<T>(string name, IStack<T> stack)
+        {
+            System.Console.WriteLine($"--- {name} ---\n{stack}\n---------------------------------------------------");
+        }
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/OpCodeExtensions.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/OpCodeExtensions.cs	(revision 14320)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/OpCodeExtensions.cs	(revision 14323)
@@ -1,6 +1,12 @@
-﻿namespace HeuristicLab.Algorithms.PushGP
+﻿using System;
+using System.Linq;
+
+namespace HeuristicLab.Algorithms.PushGP
 {
     public static class OpCodeExtensions
     {
+        public readonly static byte Min = 0;
+        public readonly static byte Max = Enum.GetValues(typeof(OpCode)).Cast<byte>().Last();
+
         public static bool IsCodeOp(this OpCode opCode)
         {
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Parser.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Parser.cs	(revision 14320)
+++ 	(revision )
@@ -1,109 +1,0 @@
-﻿using System.Collections.Generic;
-using System.Globalization;
-using HeuristicLab.Algorithms.PushGP.Expressions;
-
-namespace HeuristicLab.Algorithms.PushGP
-{
-    public class Parser
-    {
-        private readonly CultureInfo cultureInfo = CultureInfo.CreateSpecificCulture("en-US");
-
-        private const string OpenBrace = "(";
-        private const string CloseBrace = ")";
-        private readonly char[] symbolTrim = new[] { '\r', '\n' };
-
-        public Expression Parse(string source, int startIndex = 0)
-        {
-            var symbols = source.Split(' ');
-
-            int endIndex;
-            return this.Parse(symbols, 0, out endIndex);
-        }
-
-        private Expression Parse(string[] symbols, int startIndex, out int endIndex)
-        {
-            var expressions = new List<Expression>();
-
-            for (var i = startIndex; i < symbols.Length; i++)
-            {
-                var symbol = symbols[i].TrimEnd(symbolTrim);
-                if (string.IsNullOrWhiteSpace(symbol))
-                {
-                    continue;
-                }
-
-                if (symbol == OpenBrace)
-                {
-                    var subExpression = Parse(symbols, i + 1, out endIndex);
-                    expressions.Insert(0, subExpression);
-                    i = endIndex;
-                    continue;
-                }
-                else if (symbol == CloseBrace)
-                {
-                    endIndex = i;
-                    return expressions.Count != 0
-                        ? new ExecExpandExpression(expressions.ToArray())
-                        : new CodeNoopExpression() as Expression;
-                }
-
-                if (string.IsNullOrWhiteSpace(symbol))
-                {
-                    continue;
-                }
-
-                // literal
-                Expression expression;
-                if (TryParseLiteral(symbol, out expression))
-                {
-                    expressions.Insert(0, expression);
-                    continue;
-                }
-
-                // instruction
-                OpCode opCode;
-                if (SymbolTable.TryGetOpCode(symbol, out opCode))
-                {
-                    expression = ExpressionCreatorTable.GetCreator(opCode).Invoke();
-                    expressions.Insert(0, expression);
-                    continue;
-                }
-
-                // identifier - custom instruction or named literals
-                expressions.Insert(0, new NameDefineXExecExpression(symbol));
-            }
-
-            endIndex = symbols.Length - 1;
-            return expressions.Count == 1
-                ? expressions[0]
-                : new ExecExpandExpression(expressions.ToArray());
-        }
-
-        private bool TryParseLiteral(string word, out Expression expression)
-        {
-            long longValue;
-            if (long.TryParse(word, out longValue))
-            {
-                expression = new IntegerPushExpression(longValue);
-                return true;
-            }
-
-            double floatValue;
-            if (double.TryParse(word, NumberStyles.Float, cultureInfo, out floatValue))
-            {
-                expression = new FloatPushExpression(floatValue);
-                return true;
-            }
-
-            bool booleanValue;
-            if (bool.TryParse(word, out booleanValue))
-            {
-                expression = new BooleanPushExpression(booleanValue);
-                return true;
-            }
-
-            expression = null;
-            return false;
-        }
-    }
-}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Parser/Parser.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Parser/Parser.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Parser/Parser.cs	(revision 14323)
@@ -0,0 +1,109 @@
+﻿using System.Collections.Generic;
+using System.Globalization;
+using HeuristicLab.Algorithms.PushGP.Expressions;
+
+namespace HeuristicLab.Algorithms.PushGP
+{
+    public class Parser
+    {
+        private readonly CultureInfo cultureInfo = CultureInfo.CreateSpecificCulture("en-US");
+
+        private const string OpenBrace = "(";
+        private const string CloseBrace = ")";
+        private readonly char[] symbolTrim = new[] { '\r', '\n' };
+
+        public Expression Parse(string source, int startIndex = 0)
+        {
+            var symbols = source.Split(' ');
+
+            int endIndex;
+            return this.Parse(symbols, 0, out endIndex);
+        }
+
+        private Expression Parse(string[] symbols, int startIndex, out int endIndex)
+        {
+            var expressions = new List<Expression>();
+
+            for (var i = startIndex; i < symbols.Length; i++)
+            {
+                var symbol = symbols[i].TrimEnd(symbolTrim);
+                if (string.IsNullOrWhiteSpace(symbol))
+                {
+                    continue;
+                }
+
+                if (symbol == OpenBrace)
+                {
+                    var subExpression = Parse(symbols, i + 1, out endIndex);
+                    expressions.Insert(0, subExpression);
+                    i = endIndex;
+                    continue;
+                }
+                else if (symbol == CloseBrace)
+                {
+                    endIndex = i;
+                    return expressions.Count != 0
+                        ? new ExecExpandExpression(expressions.ToArray())
+                        : new CodeNoopExpression() as Expression;
+                }
+
+                if (string.IsNullOrWhiteSpace(symbol))
+                {
+                    continue;
+                }
+
+                // literal
+                Expression expression;
+                if (TryParseLiteral(symbol, out expression))
+                {
+                    expressions.Insert(0, expression);
+                    continue;
+                }
+
+                // instruction
+                OpCode opCode;
+                if (SymbolTable.TryGetOpCode(symbol, out opCode))
+                {
+                    expression = ExpressionCreatorTable.GetCreator(opCode).Invoke();
+                    expressions.Insert(0, expression);
+                    continue;
+                }
+
+                // identifier - custom instruction or named literals
+                expressions.Insert(0, new NameDefineXExecExpression(symbol));
+            }
+
+            endIndex = symbols.Length - 1;
+            return expressions.Count == 1
+                ? expressions[0]
+                : new ExecExpandExpression(expressions.ToArray());
+        }
+
+        private bool TryParseLiteral(string word, out Expression expression)
+        {
+            long longValue;
+            if (long.TryParse(word, out longValue))
+            {
+                expression = new IntegerPushExpression(longValue);
+                return true;
+            }
+
+            double floatValue;
+            if (double.TryParse(word, NumberStyles.Float, cultureInfo, out floatValue))
+            {
+                expression = new FloatPushExpression(floatValue);
+                return true;
+            }
+
+            bool booleanValue;
+            if (bool.TryParse(word, out booleanValue))
+            {
+                expression = new BooleanPushExpression(booleanValue);
+                return true;
+            }
+
+            expression = null;
+            return false;
+        }
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Parser/SymbolTable.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Parser/SymbolTable.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Parser/SymbolTable.cs	(revision 14323)
@@ -0,0 +1,100 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace HeuristicLab.Algorithms.PushGP
+{
+    public static class SymbolTable
+    {
+        private static Dictionary<string, OpCode> symbolTable = new Dictionary<string, OpCode>
+        {
+            #region Code
+            { "CODE.NOOP", OpCode.CodeNoop },
+            { "CODE.PUSH", OpCode.CodePush },
+            { "CODE.IF", OpCode.CodeIf },
+            { "CODE.DEFINE", OpCode.CodeDefine },
+            { "CODE.DUP", OpCode.CodeDup },
+            { "CODE.QUOTE", OpCode.CodeQuote },
+            { "CODE.DO", OpCode.CodeDo },
+            #endregion Code
+
+            #region Exec
+            { "EXEC.EXPAND", OpCode.ExecExpand },
+            { "EXEC.PUSH", OpCode.ExecPush },
+            { "EXEC.IF", OpCode.ExecIf },
+            { "EXEC.DEFINE", OpCode.ExecDefine },
+            { "EXEC.DUP", OpCode.ExecDup },
+            { "EXEC.POP", OpCode.ExecPop },
+            { "EXEC.Y", OpCode.ExecY },
+            { "EXEC.DO*RANGE", OpCode.ExecDoXRange },
+            #endregion Exec
+
+            #region Name
+            { "NAME.DEFINE*EXEC", OpCode.NameDefineXExec },
+            { "NAME.POP", OpCode.NamePop },
+            { "NAME.DUP", OpCode.NameDup },
+            #endregion Name
+
+            #region Boolean
+            { "BOOLEAN.PUSH", OpCode.BooleanPush },
+            { "BOOLEAN.POP", OpCode.BooleanPop },
+            { "BOOLEAN.DUP", OpCode.BooleanDup },
+            { "BOOLEAN.AND", OpCode.BooleanAnd },
+            { "BOOLEAN.OR", OpCode.BooleanOr },
+            #endregion Boolean
+
+            #region Integer
+            { "INTEGER.PUSH", OpCode.IntegerPush },
+            { "INTEGER.POP", OpCode.IntegerPop },
+            { "INTEGER.DUP", OpCode.IntegerDup },
+            { "INTEGER.DEFINE", OpCode.IntegerDefine },
+            { "INTEGER.+", OpCode.IntegerAdd },
+            { "INTEGER.-", OpCode.IntegerSubtract },
+            { "INTEGER.*", OpCode.IntegerMultiply },
+            { "INTEGER./", OpCode.IntegerDivide },
+            { "INTEGER.<", OpCode.IntegerSmallerThan },
+            { "INTEGER.>", OpCode.IntegerGreaterThan },
+            { "INTEGER.=", OpCode.IntegerEquals },
+            { "INTEGER.MIN", OpCode.IntegerMin },
+            { "INTEGER.MAX", OpCode.IntegerMax },
+            #endregion Integer
+
+            #region Float
+            { "FLOAT.PUSH", OpCode.FloatPush },
+            { "FLOAT.POP", OpCode.FloatPop },
+            { "FLOAT.DUP", OpCode.FloatDup },
+            { "FLOAT.DEFINE", OpCode.FloatDefine },
+            { "FLOAT.+", OpCode.FloatAdd },
+            { "FLOAT.-", OpCode.FloatSubtract },
+            { "FLOAT.*", OpCode.FloatMultiply },
+            { "FLOAT./", OpCode.FloatDivide },
+            { "FLOAT.<", OpCode.FloatSmallerThan },
+            { "FLOAT.>", OpCode.FloatGreaterThan },
+            { "FLOAT.=", OpCode.FloatEquals },
+            { "FLOAT.MIN", OpCode.FloatMin },
+            { "FLOAT.MAX", OpCode.FloatMax },
+            #endregion Float
+        };
+
+        public static OpCode GetOpCode(string operationName)
+        {
+            OpCode opCode;
+            if (symbolTable.TryGetValue(operationName, out opCode)) return opCode;
+            else throw new NotSupportedException("Symbol: " + operationName);
+        }
+
+        public static bool TryGetOpCode(string operationName, out OpCode opCode)
+        {
+            return symbolTable.TryGetValue(operationName, out opCode);
+        }
+
+        public static string GetSymbol(OpCode opCode)
+        {
+            var symbol = symbolTable.SingleOrDefault(pair => pair.Value == opCode);
+
+            return !symbol.Equals(default(KeyValuePair<string, OpCode>))
+                ? symbol.Key
+                : null;
+        }
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Stack/IStack.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Stack/IStack.cs	(revision 14320)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Stack/IStack.cs	(revision 14323)
@@ -5,4 +5,5 @@
     public interface IStack<T> : IEnumerable<T>, ICollection<T>
     {
+        bool IsEmpty { get; }
         void Push(T item);
 
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Stack/PushGPStack.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Stack/PushGPStack.cs	(revision 14320)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Stack/PushGPStack.cs	(revision 14323)
@@ -2,5 +2,4 @@
 using System.Collections;
 using System.Collections.Generic;
-using System.Linq;
 
 namespace HeuristicLab.Algorithms.PushGP.Stack
@@ -18,7 +17,7 @@
         private List<T> data = new List<T>();
 
-        public T Top => this.ElementAt(0);
-
+        public T Top => this.data[Count - 1];
         public int Count => data.Count;
+        public bool IsEmpty => this.Count == 0;
 
         public bool IsReadOnly
@@ -62,6 +61,7 @@
         public T Pop()
         {
-            var value = this.data[0];
-            this.data.RemoveAt(0);
+            var index = Count - 1;
+            var value = this.data[index];
+            this.data.RemoveAt(index);
 
             return value;
@@ -70,23 +70,26 @@
         public T[] Pop(int count)
         {
-            var items = this.data.GetRange(0, count).ToArray();
-            this.data.RemoveRange(0, count);
+            var startIndex = Count - count;
+            var items = this.data.GetRange(startIndex, count);
 
-            return items;
+            this.data.RemoveRange(startIndex, count);
+
+            items.Reverse();
+            return items.ToArray();
         }
 
         public void Push(T item)
         {
-            this.data.Insert(0, item);
+            this.data.Add(item);
         }
 
         public void Push(params T[] items)
         {
-            this.data.InsertRange(0, items.Reverse());
+            this.data.AddRange(items);
         }
 
         public void Push(IEnumerable<T> items)
         {
-            this.data.InsertRange(0, items);
+            this.data.AddRange(items);
         }
 
@@ -98,17 +101,18 @@
         public void Insert(int index, params T[] items)
         {
-            this.data.InsertRange(index, items.Reverse());
+            this.data.InsertRange(index, items);
         }
 
         public void Insert(int index, IEnumerable<T> items)
         {
-            this.data.InsertRange(index, items.Reverse());
+            this.data.InsertRange(index, items);
         }
 
         public bool Remove(T item)
         {
-            if (this.data.Count > 0 && this.data[0].Equals(item))
+            var index = Count - 1;
+            if (this.data.Count > 0 && this.data[index].Equals(item))
             {
-                this.data.RemoveAt(0);
+                this.data.RemoveAt(index);
                 return true;
             }
@@ -123,5 +127,5 @@
             if (this.data.Count > 0)
             {
-                item = this.data[0];
+                item = this.Pop();
                 return true;
             }
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/StaticRandom.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/StaticRandom.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/StaticRandom.cs	(revision 14323)
@@ -0,0 +1,20 @@
+﻿using System;
+using System.Threading;
+
+namespace HeuristicLab.Algorithms.PushGP
+{
+    public static class StaticRandom
+    {
+        static int seed = Environment.TickCount;
+
+        static readonly ThreadLocal<Random> random =
+            new ThreadLocal<Random>(() => new Random(Interlocked.Increment(ref seed)));
+
+        public static int Next(int minValue = int.MinValue, int maxValue = int.MaxValue)
+        {
+            return random.Value.Next(minValue, maxValue);
+        }
+
+        public static double NextDouble => random.Value.NextDouble();
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/SymbolTable.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/SymbolTable.cs	(revision 14320)
+++ 	(revision )
@@ -1,100 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace HeuristicLab.Algorithms.PushGP
-{
-    public static class SymbolTable
-    {
-        private static Dictionary<string, OpCode> symbolTable = new Dictionary<string, OpCode>
-        {
-            #region Code
-            { "CODE.NOOP", OpCode.CodeNoop },
-            { "CODE.PUSH", OpCode.CodePush },
-            { "CODE.IF", OpCode.CodeIf },
-            { "CODE.DEFINE", OpCode.CodeDefine },
-            { "CODE.DUP", OpCode.CodeDup },
-            { "CODE.QUOTE", OpCode.CodeQuote },
-            { "CODE.DO", OpCode.CodeDo },
-            #endregion Code
-
-            #region Exec
-            { "EXEC.EXPAND", OpCode.ExecExpand },
-            { "EXEC.PUSH", OpCode.ExecPush },
-            { "EXEC.IF", OpCode.ExecIf },
-            { "EXEC.DEFINE", OpCode.ExecDefine },
-            { "EXEC.DUP", OpCode.ExecDup },
-            { "EXEC.POP", OpCode.ExecPop },
-            { "EXEC.Y", OpCode.ExecY },
-            { "EXEC.DO*RANGE", OpCode.ExecDoXRange },
-            #endregion Exec
-
-            #region Name
-            { "NAME.DEFINE*EXEC", OpCode.NameDefineXExec },
-            { "NAME.POP", OpCode.NamePop },
-            { "NAME.DUP", OpCode.NameDup },
-            #endregion Name
-
-            #region Boolean
-            { "BOOLEAN.PUSH", OpCode.BooleanPush },
-            { "BOOLEAN.POP", OpCode.BooleanPop },
-            { "BOOLEAN.DUP", OpCode.BooleanDup },
-            { "BOOLEAN.AND", OpCode.BooleanAnd },
-            { "BOOLEAN.OR", OpCode.BooleanOr },
-            #endregion Boolean
-
-            #region Integer
-            { "INTEGER.PUSH", OpCode.IntegerPush },
-            { "INTEGER.POP", OpCode.IntegerPop },
-            { "INTEGER.DUP", OpCode.IntegerDup },
-            { "INTEGER.DEFINE", OpCode.IntegerDefine },
-            { "INTEGER.+", OpCode.IntegerAdd },
-            { "INTEGER.-", OpCode.IntegerSubtract },
-            { "INTEGER.*", OpCode.IntegerMultiply },
-            { "INTEGER./", OpCode.IntegerDivide },
-            { "INTEGER.<", OpCode.IntegerSmallerThan },
-            { "INTEGER.>", OpCode.IntegerGreaterThan },
-            { "INTEGER.=", OpCode.IntegerEquals },
-            { "INTEGER.MIN", OpCode.IntegerMin },
-            { "INTEGER.MAX", OpCode.IntegerMax },
-            #endregion Integer
-
-            #region Float
-            { "FLOAT.PUSH", OpCode.FloatPush },
-            { "FLOAT.POP", OpCode.FloatPop },
-            { "FLOAT.DUP", OpCode.FloatDup },
-            { "FLOAT.DEFINE", OpCode.FloatDefine },
-            { "FLOAT.+", OpCode.FloatAdd },
-            { "FLOAT.-", OpCode.FloatSubtract },
-            { "FLOAT.*", OpCode.FloatMultiply },
-            { "FLOAT./", OpCode.FloatDivide },
-            { "FLOAT.<", OpCode.FloatSmallerThan },
-            { "FLOAT.>", OpCode.FloatGreaterThan },
-            { "FLOAT.=", OpCode.FloatEquals },
-            { "FLOAT.MIN", OpCode.FloatMin },
-            { "FLOAT.MAX", OpCode.FloatMax },
-            #endregion Float
-        };
-
-        public static OpCode GetOpCode(string operationName)
-        {
-            OpCode opCode;
-            if (symbolTable.TryGetValue(operationName, out opCode)) return opCode;
-            else throw new NotSupportedException("Symbol: " + operationName);
-        }
-
-        public static bool TryGetOpCode(string operationName, out OpCode opCode)
-        {
-            return symbolTable.TryGetValue(operationName, out opCode);
-        }
-
-        public static string GetSymbol(OpCode opCode)
-        {
-            var symbol = symbolTable.SingleOrDefault(pair => pair.Value == opCode);
-
-            return !symbol.Equals(default(KeyValuePair<string, OpCode>))
-                ? symbol.Key
-                : null;
-        }
-    }
-}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/BooleanExpressionTests.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/BooleanExpressionTests.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/BooleanExpressionTests.cs	(revision 14323)
@@ -0,0 +1,10 @@
+﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests.HeuristicLabAlgorithmsPushGP.Expressions
+{
+    [TestClass]
+    public class BooleanExpressionTests : InterpreterTest
+    {
+
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/CodeExpressionTests.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/CodeExpressionTests.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/CodeExpressionTests.cs	(revision 14323)
@@ -0,0 +1,10 @@
+﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests.HeuristicLabAlgorithmsPushGP.Expressions
+{
+    [TestClass]
+    public class CodeExpressionTests : InterpreterTest
+    {
+
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/ExecExpressionTests.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/ExecExpressionTests.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/ExecExpressionTests.cs	(revision 14323)
@@ -0,0 +1,10 @@
+﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests.HeuristicLabAlgorithmsPushGP.Expressions
+{
+    [TestClass]
+    public class ExecExpressionTests : InterpreterTest
+    {
+
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/FloatExpressionTests.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/FloatExpressionTests.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/FloatExpressionTests.cs	(revision 14323)
@@ -0,0 +1,10 @@
+﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests.HeuristicLabAlgorithmsPushGP.Expressions
+{
+    [TestClass]
+    public class FloatExpressionTests : InterpreterTest
+    {
+
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/IntegerExpressionTests.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/IntegerExpressionTests.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/IntegerExpressionTests.cs	(revision 14323)
@@ -0,0 +1,68 @@
+﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests.HeuristicLabAlgorithmsPushGP.Expressions
+{
+    [TestClass]
+    public class IntegerExpressionTests : InterpreterTest
+    {
+        [TestMethod]
+        public void TestAdd()
+        {
+            var code = "5 5 INTEGER.+";
+
+            interpreter.Interprete(code);
+
+            Assert.AreEqual(10, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.FloatStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void TestAddOverflow()
+        {
+            var code = $"1 {long.MaxValue} INTEGER.+";
+
+            interpreter.Interprete(code);
+
+            Assert.AreEqual(long.MinValue, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.FloatStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void TestSubtract()
+        {
+            var code = "10 5 INTEGER.-";
+
+            interpreter.Interprete(code);
+
+            Assert.AreEqual(5, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.FloatStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void TestSubtractOverflow()
+        {
+            var code = $"{long.MinValue} 1 INTEGER.-";
+
+            interpreter.Interprete(code);
+
+            Assert.AreEqual(long.MaxValue, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.FloatStack.IsEmpty);
+        }
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/MixedExpressionTests.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/MixedExpressionTests.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/MixedExpressionTests.cs	(revision 14323)
@@ -0,0 +1,256 @@
+﻿using HeuristicLab.Algorithms.PushGP.Interpreter;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests.HeuristicLabAlgorithmsPushGP.Expressions
+{
+    [TestClass]
+    public class MixedExpressionTests : InterpreterTest
+    {
+        const double Delta = 0.00000001;
+
+        [TestMethod]
+        public void Example1()
+        {
+            this.interpreter.Interprete("( 2 3 INTEGER.* 4.1 5.2 FLOAT.+ TRUE FALSE BOOLEAN.OR )");
+
+            Assert.AreEqual(interpreter.IntegerStack.Top, 6);
+            Assert.AreEqual(interpreter.FloatStack.Top, 9.3);
+            Assert.AreEqual(interpreter.BooleanStack.Top, true);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void Example2()
+        {
+            this.interpreter.Interprete("( 5 1.23 INTEGER.+ ( 4 ) INTEGER.- 5.67 FLOAT.* )");
+
+            Assert.AreEqual(1, interpreter.IntegerStack.Top);
+            Assert.AreEqual(6.9741, interpreter.FloatStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void Example3()
+        {
+            this.interpreter.Interprete("( 5 INTEGER.DUP INTEGER.+ )");
+
+            Assert.AreEqual(10, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.FloatStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void Example4()
+        {
+            this.interpreter.Interprete("( 5 CODE.QUOTE ( INTEGER.DUP INTEGER.+ ) CODE.DO )");
+
+            Assert.AreEqual(10, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.FloatStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void Example5()
+        {
+            this.interpreter.Interprete("( DOUBLE CODE.QUOTE ( INTEGER.DUP INTEGER.+ ) CODE.DEFINE 5 DOUBLE )");
+
+            Assert.AreEqual(10, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.FloatStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void Example6()
+        {
+            this.interpreter.Interprete("( CODE.QUOTE ( INTEGER.DUP INTEGER.+ ) DOUBLE CODE.DEFINE 5 DOUBLE )");
+
+            Assert.AreEqual(10, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.FloatStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void Example7()
+        {
+            this.interpreter.Interprete("( DOUBLE EXEC.DEFINE ( INTEGER.DUP INTEGER.+ ) 5 DOUBLE )");
+
+            Assert.AreEqual(10, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.FloatStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void Example8()
+        {
+            this.interpreter.IntegerStack.Push(5);
+            this.interpreter.Interprete(@"( CODE.QUOTE ( INTEGER.POP 1 )
+                                            CODE.QUOTE ( CODE.DUP INTEGER.DUP 1 INTEGER.- CODE.DO INTEGER.* )
+                                            INTEGER.DUP 2 INTEGER.< CODE.IF )");
+
+            Assert.AreEqual(120, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.FloatStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void Example9()
+        {
+            this.interpreter.IntegerStack.Push(5);
+            this.interpreter.Interprete("( 1 INTEGER.MAX 1 EXEC.DO*RANGE INTEGER.* )");
+
+            Assert.AreEqual(120, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.FloatStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void Example10()
+        {
+            this.interpreter.IntegerStack.Push(5);
+            this.interpreter.Interprete("( 1 INTEGER.MAX 1 EXEC.DO*RANGE ( 2 INTEGER.* ) )");
+
+            Assert.AreEqual(32, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.FloatStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void Example11()
+        {
+            var program = PushGPInterpreter.Encode(("( INTEGER.= CODE.QUOTE FLOAT.* CODE.QUOTE FLOAT./ CODE.IF )"));
+
+            this.interpreter.IntegerStack.Push(1, 1);
+            this.interpreter.FloatStack.Push(2.1, 0.7);
+
+            this.interpreter.Interprete(program);
+
+            Assert.IsTrue(interpreter.IntegerStack.IsEmpty);
+            Assert.AreEqual(1.47, interpreter.FloatStack.Top, Delta);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+
+            this.interpreter.Reset();
+            this.interpreter.IntegerStack.Push(1, 2);
+            this.interpreter.FloatStack.Push(2.1, 0.7);
+            this.interpreter.Interprete(program);
+
+            Assert.IsTrue(interpreter.IntegerStack.IsEmpty);
+            Assert.AreEqual(3d, interpreter.FloatStack.Top, Delta);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void Example12()
+        {
+            var program = PushGPInterpreter.Encode("( INTEGER.= EXEC.IF FLOAT.* FLOAT./ )");
+
+            this.interpreter.IntegerStack.Push(1, 1);
+            this.interpreter.FloatStack.Push(2.1, 0.7);
+
+            this.interpreter.Interprete(program);
+
+            Assert.IsTrue(interpreter.IntegerStack.IsEmpty);
+            Assert.AreEqual(1.47, interpreter.FloatStack.Top, Delta);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+
+            this.interpreter.Reset();
+            this.interpreter.IntegerStack.Push(1, 2);
+            this.interpreter.FloatStack.Push(2.1, 0.7);
+            this.interpreter.Interprete(program);
+
+            Assert.IsTrue(interpreter.IntegerStack.IsEmpty);
+            Assert.AreEqual(3d, interpreter.FloatStack.Top, Delta);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void Example13()
+        {
+            this.interpreter.IntegerStack.Push(5);
+            this.interpreter.Interprete("( EXEC.Y ( ( FALSE 2 INTEGER.* ) EXEC.IF ( ) EXEC.POP ) )");
+
+            Assert.AreEqual(10, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.FloatStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void Example14()
+        {
+            this.interpreter.IntegerStack.Push(5);
+            this.interpreter.Interprete("( EXEC.Y ( ( 2 INTEGER.* INTEGER.DUP 1000 INTEGER.< ) EXEC.IF ( ) EXEC.POP ) )");
+
+            Assert.AreEqual(1280, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+            Assert.IsTrue(interpreter.FloatStack.IsEmpty);
+        }
+
+        [TestMethod]
+        public void Example15()
+        {
+            this.interpreter.IntegerStack.Push(10);
+            this.interpreter.FloatStack.Push(2);
+            this.interpreter.Interprete(@"( ARG FLOAT.DEFINE
+                                            EXEC.Y (
+                                            ARG FLOAT.*
+                                            1 INTEGER.-
+                                            INTEGER.DUP 1 INTEGER.>
+                                            EXEC.IF ( ) EXEC.POP
+                                            )
+                                          )");
+
+            Assert.AreEqual(1024, interpreter.FloatStack.Top, Delta);
+            Assert.AreEqual(1, interpreter.IntegerStack.Top);
+            Assert.IsTrue(interpreter.CodeStack.IsEmpty);
+            Assert.IsTrue(interpreter.ExecStack.IsEmpty);
+            Assert.IsTrue(interpreter.NameStack.IsEmpty);
+            Assert.IsTrue(interpreter.BooleanStack.IsEmpty);
+        }
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/NameExpressionTests.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/NameExpressionTests.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/Expressions/NameExpressionTests.cs	(revision 14323)
@@ -0,0 +1,10 @@
+﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests.HeuristicLabAlgorithmsPushGP.Expressions
+{
+    [TestClass]
+    public class NameExpressionTests : InterpreterTest
+    {
+
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/InterpreterTest.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/InterpreterTest.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Algorithms.PushGP/InterpreterTest.cs	(revision 14323)
@@ -0,0 +1,16 @@
+﻿using HeuristicLab.Algorithms.PushGP.Interpreter;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests.HeuristicLabAlgorithmsPushGP
+{
+    public class InterpreterTest
+    {
+        protected PushGPInterpreter interpreter;
+
+        [TestInitialize]
+        public void BeforeTest()
+        {
+            interpreter = new PushGPInterpreter();
+        }
+    }
+}
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Tests.csproj
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 14323)
@@ -0,0 +1,99 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{117B7D68-ED7D-4350-996B-9CA15259E107}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Tests</RootNamespace>
+    <AssemblyName>HeuristicLab.Tests</AssemblyName>
+    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
+    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+    <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
+    <IsCodedUITest>False</IsCodedUITest>
+    <TestProjectType>UnitTest</TestProjectType>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+  </ItemGroup>
+  <Choose>
+    <When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
+      <ItemGroup>
+        <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+      </ItemGroup>
+    </When>
+    <Otherwise>
+      <ItemGroup>
+        <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
+      </ItemGroup>
+    </Otherwise>
+  </Choose>
+  <ItemGroup>
+    <Compile Include="HeuristicLab.Algorithms.PushGP\Expressions\MixedExpressionTests.cs" />
+    <Compile Include="HeuristicLab.Algorithms.PushGP\Expressions\NameExpressionTests.cs" />
+    <Compile Include="HeuristicLab.Algorithms.PushGP\Expressions\FloatExpressionTests.cs" />
+    <Compile Include="HeuristicLab.Algorithms.PushGP\Expressions\BooleanExpressionTests.cs" />
+    <Compile Include="HeuristicLab.Algorithms.PushGP\Expressions\ExecExpressionTests.cs" />
+    <Compile Include="HeuristicLab.Algorithms.PushGP\Expressions\CodeExpressionTests.cs" />
+    <Compile Include="HeuristicLab.Algorithms.PushGP\Expressions\IntegerExpressionTests.cs" />
+    <Compile Include="HeuristicLab.Algorithms.PushGP\InterpreterTest.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\HeuristicLab.Algorithms.PushGP\HeuristicLab.Algorithms.PushGP.csproj">
+      <Project>{368d1303-470c-4f31-91f2-0fad379daa45}</Project>
+      <Name>HeuristicLab.Algorithms.PushGP</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="HeuristicLab.Algorithms.PushGP\Problems\" />
+  </ItemGroup>
+  <Choose>
+    <When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
+      <ItemGroup>
+        <Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+          <Private>False</Private>
+        </Reference>
+        <Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+          <Private>False</Private>
+        </Reference>
+        <Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+          <Private>False</Private>
+        </Reference>
+        <Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+          <Private>False</Private>
+        </Reference>
+      </ItemGroup>
+    </When>
+  </Choose>
+  <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/Properties/AssemblyInfo.cs
===================================================================
--- branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/Properties/AssemblyInfo.cs	(revision 14323)
+++ branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Tests/Properties/AssemblyInfo.cs	(revision 14323)
@@ -0,0 +1,36 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab.Tests")]
+[assembly: AssemblyCopyright("Copyright ©  2016")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("117b7d68-ed7d-4350-996b-9ca15259e107")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
