Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs	(revision 3723)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs	(revision 3733)
@@ -115,4 +115,5 @@
               s -= Evaluate();
             }
+            if (currentInstr.nArguments == 1) s = -s;
             return s;
           }
@@ -129,4 +130,5 @@
               p /= Evaluate();
             }
+            if (currentInstr.nArguments == 1) p = 1.0 / p;
             return p;
           }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/HeuristicLab.Problems.DataAnalysis.Tests-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/HeuristicLab.Problems.DataAnalysis.Tests-3.3.csproj	(revision 3733)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/HeuristicLab.Problems.DataAnalysis.Tests-3.3.csproj	(revision 3733)
@@ -0,0 +1,93 @@
+﻿<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{5A4679EF-A8F3-4647-B722-441A36B3BA6B}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.DataAnalysis.Tests_3._3</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.DataAnalysis.Tests-3.3</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+  </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="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="SimpleArithmeticExpressionInterpreterTest.cs" />
+    <Compile Include="SymbolicExpressionImporter.cs" />
+    <Compile Include="Token.cs" />
+    <Compile Include="Util.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.3\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.csproj">
+      <Project>{125D3006-67F5-48CB-913E-73C0548F17FA}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
+      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
+      <Name>HeuristicLab.Operators-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
+      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
+      <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
+      <Name>HeuristicLab.Random-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Problems.DataAnalysis-3.3.csproj">
+      <Project>{70DFD984-B1D9-46FE-8EB7-4DE92D71A9FC}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis-3.3</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\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: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Properties/AssemblyInfo.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Properties/AssemblyInfo.cs	(revision 3733)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Properties/AssemblyInfo.cs	(revision 3733)
@@ -0,0 +1,35 @@
+﻿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.Problems.DataAnalysis.Tests-3.3")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("HeuristicLab.Problems.DataAnalysis.Tests-3.3")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM componenets.  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("7dddd116-d8ae-459a-ae2a-d55294e0fd8a")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SimpleArithmeticExpressionInterpreterTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SimpleArithmeticExpressionInterpreterTest.cs	(revision 3733)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SimpleArithmeticExpressionInterpreterTest.cs	(revision 3733)
@@ -0,0 +1,147 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.IO;
+using System;
+using HeuristicLab.Random;
+using System.Collections.Generic;
+using System.Diagnostics;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System.Linq;
+namespace HeuristicLab.Problems.DataAnalysis.Tests {
+
+
+  /// <summary>
+  ///This is a test class for SimpleArithmeticExpressionInterpreter and is intended
+  ///to contain all SimpleArithmeticExpressionInterpreter Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class SimpleArithmeticExpressionInterpreterTest {
+    private const int N = 1000;
+    private const int Rows = 1000;
+    private const int Columns = 50;
+    private static SymbolicExpressionTree[] randomTrees;
+    private static Dataset dataset;
+    private static MersenneTwister twister;
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    [ClassInitialize()]
+    public static void CreateRandomTrees(TestContext testContext) {
+      twister = new MersenneTwister();
+      dataset = Util.CreateRandomDataset(twister, Rows, Columns);
+      var grammar = new GlobalSymbolicExpressionGrammar(new ArithmeticExpressionGrammar());
+      grammar.MaxFunctionArguments = 0;
+      grammar.MaxFunctionDefinitions = 0;
+      grammar.MinFunctionArguments = 0;
+      grammar.MinFunctionDefinitions = 0;
+      randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 100, 0, 0);
+    }
+
+
+    [TestMethod()]
+    public void SimpleArithmeticExpressionInterpreterPerformanceTest() {
+      double[] estimation = new double[Rows];
+      foreach (SymbolicExpressionTree tree in randomTrees) {
+        Util.InitTree(tree, twister, new List<string>(dataset.VariableNames));
+      }
+      SimpleArithmeticExpressionInterpreter interpreter = new SimpleArithmeticExpressionInterpreter();
+      Util.EvaluateTrees(randomTrees, interpreter, dataset, 10);
+    }
+
+
+    /// <summary>
+    ///A test for Evaluate
+    ///</summary>
+    [TestMethod()]
+    public void SimpleArithmeticExpressionInterpreterEvaluateTest() {
+
+      Dataset ds = new Dataset(new string[] { "y", "a", "b" }, new double[,] {
+        { 1.0, 1.0, 1.0 },
+        { 2.0, 2.0, 2.0 },
+        { 3.0, 1.0, 2.0 }
+      });
+
+      SimpleArithmeticExpressionInterpreter interpreter = new SimpleArithmeticExpressionInterpreter();
+
+      // constants
+      Evaluate(interpreter, ds, "(+ 1.5 3.5)", 0, 5.0);
+
+      // variables
+      Evaluate(interpreter, ds, "(variable 2.0 a)", 0, 2.0);
+      Evaluate(interpreter, ds, "(variable 2.0 a)", 1, 4.0);
+
+
+      // addition
+      Evaluate(interpreter, ds, "(+ (variable 2.0 a ))", 1, 4.0);
+      Evaluate(interpreter, ds, "(+ (variable 2.0 a ) (variable 3.0 b ))", 0, 5.0);
+      Evaluate(interpreter, ds, "(+ (variable 2.0 a ) (variable 3.0 b ))", 1, 10.0);
+      Evaluate(interpreter, ds, "(+ (variable 2.0 a) (variable 3.0 b ))", 2, 8.0);
+      Evaluate(interpreter, ds, "(+ 8.0 2.0 2.0)", 0, 12.0);
+
+      // subtraction
+      Evaluate(interpreter, ds, "(- (variable 2.0 a ))", 1, -4.0);
+      Evaluate(interpreter, ds, "(- (variable 2.0 a ) (variable 3.0 b))", 0, -1.0);
+      Evaluate(interpreter, ds, "(- (variable 2.0 a ) (variable 3.0 b ))", 1, -2.0);
+      Evaluate(interpreter, ds, "(- (variable 2.0 a ) (variable 3.0 b ))", 2, -4.0);
+      Evaluate(interpreter, ds, "(- 8.0 2.0 2.0)", 0, 4.0);
+
+      // multiplication
+      Evaluate(interpreter, ds, "(* (variable 2.0 a ))", 0, 2.0);
+      Evaluate(interpreter, ds, "(* (variable 2.0 a ) (variable 3.0 b ))", 0, 6.0);
+      Evaluate(interpreter, ds, "(* (variable 2.0 a ) (variable 3.0 b ))", 1, 24.0);
+      Evaluate(interpreter, ds, "(* (variable 2.0 a ) (variable 3.0 b ))", 2, 12.0);
+      Evaluate(interpreter, ds, "(* 8.0 2.0 2.0)", 0, 32.0);
+
+      // division
+      Evaluate(interpreter, ds, "(/ (variable 2.0 a ))", 1, 1.0 / 4.0);
+      Evaluate(interpreter, ds, "(/ (variable 2.0 a ) 2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(/ (variable 2.0 a ) 2.0)", 1, 2.0);
+      Evaluate(interpreter, ds, "(/ (variable 3.0 b ) 2.0)", 2, 3.0);
+      Evaluate(interpreter, ds, "(/ 8.0 2.0 2.0)", 0, 2.0);
+
+      // TODO ADF      
+    }
+
+    private void Evaluate(SimpleArithmeticExpressionInterpreter interpreter, Dataset ds, string expr, int index, double expected) {
+      var importer = new SymbolicExpressionImporter();
+      SymbolicExpressionTree tree = importer.Import(expr);
+
+      double actual = interpreter.GetSymbolicExpressionTreeValues(tree, ds, Enumerable.Range(index, 1)).First();
+
+      Assert.AreEqual(expected, actual, 1.0E-12, expr);
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SymbolicExpressionImporter.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SymbolicExpressionImporter.cs	(revision 3733)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SymbolicExpressionImporter.cs	(revision 3733)
@@ -0,0 +1,110 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.IO;
+using System.Diagnostics;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Tests {
+  internal class SymbolicExpressionImporter {
+    private const string VARSTART = "var";
+    private Dictionary<string, Symbol> knownSymbols = new Dictionary<string, Symbol>() 
+      {
+        {"+", new Addition()},
+        {"/", new Division()},
+        {"*", new Multiplication()},
+        {"-", new Subtraction()},
+
+      };
+    Constant constant = new Constant();
+    Variable variable = new Variable();
+    ProgramRootSymbol programRootSymbol = new ProgramRootSymbol();
+    StartSymbol startSymbol = new StartSymbol();
+
+    public SymbolicExpressionImporter() {
+    }
+
+    internal SymbolicExpressionTree Import(string str) {
+      str = str.Replace("(", " ( ").Replace(")", " ) ");
+      SymbolicExpressionTreeNode root = programRootSymbol.CreateTreeNode();
+      SymbolicExpressionTreeNode start = startSymbol.CreateTreeNode();
+      SymbolicExpressionTreeNode mainBranch = ParseSexp(new Queue<Token>(GetTokenStream(str)));
+      root.AddSubTree(start);
+      start.AddSubTree(mainBranch);
+      return new SymbolicExpressionTree(root);
+    }
+
+    private IEnumerable<Token> GetTokenStream(string str) {
+      return
+             from strToken in str.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries).AsEnumerable()
+             let t = Token.Parse(strToken)
+             where t != null
+             select t;
+    }
+
+    private SymbolicExpressionTreeNode ParseSexp(Queue<Token> tokens) {
+      if (tokens.Peek().Symbol == TokenSymbol.LPAR) {
+        SymbolicExpressionTreeNode tree;
+        Expect(Token.LPAR, tokens);
+        if (tokens.Peek().StringValue.StartsWith(VARSTART)) {
+          tree = ParseVariable(tokens);
+        } else {
+          Token curToken = tokens.Dequeue();
+          tree = CreateTree(curToken);
+          while (!tokens.Peek().Equals(Token.RPAR)) {
+            tree.AddSubTree(ParseSexp(tokens));
+          }
+        }
+        Expect(Token.RPAR, tokens);
+        return tree;
+      } else if (tokens.Peek().Symbol == TokenSymbol.NUMBER) {
+        ConstantTreeNode t = (ConstantTreeNode)constant.CreateTreeNode();
+        t.Value = tokens.Dequeue().DoubleValue;
+        return t;
+      } else throw new FormatException("Expected function or constant symbol");
+    }
+
+    private SymbolicExpressionTreeNode ParseVariable(Queue<Token> tokens) {
+      Token varTok = tokens.Dequeue();
+      Debug.Assert(varTok.StringValue == "variable");
+      VariableTreeNode t = (VariableTreeNode)variable.CreateTreeNode();
+      t.Weight = tokens.Dequeue().DoubleValue;
+      t.VariableName = tokens.Dequeue().StringValue;
+      return t;
+    }
+
+    private SymbolicExpressionTreeNode CreateTree(Token token) {
+      if (token.Symbol != TokenSymbol.SYMB) throw new FormatException("Expected function symbol, but got: " + token.StringValue);
+      return knownSymbols[token.StringValue].CreateTreeNode();
+    }
+
+    private void Expect(Token token, Queue<Token> tokens) {
+      Token cur = tokens.Dequeue();
+      if (!token.Equals(cur)) throw new FormatException("Expected: " + token.StringValue + ", but got: " + cur.StringValue);
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Token.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Token.cs	(revision 3733)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Token.cs	(revision 3733)
@@ -0,0 +1,68 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.IO;
+using System.Diagnostics;
+using System.Globalization;
+
+namespace HeuristicLab.Problems.DataAnalysis.Tests {
+  internal enum TokenSymbol { LPAR, RPAR, SYMB, NUMBER };
+  internal class Token {
+    public static readonly Token LPAR = Token.Parse("(");
+    public static readonly Token RPAR = Token.Parse(")");
+
+    public TokenSymbol Symbol { get; set; }
+    public string StringValue { get; set; }
+    public double DoubleValue { get; set; }
+    public Token() { }
+
+    public override bool Equals(object obj) {
+      Token other = (obj as Token);
+      if (other == null) return false;
+      if (other.Symbol != Symbol) return false;
+      return other.StringValue == this.StringValue;
+    }
+
+    public static Token Parse(string strToken) {
+      strToken = strToken.Trim();
+      Token t = new Token();
+      t.StringValue = strToken.Trim();
+      double temp;
+      if (strToken == "") {
+        t = null;
+      } else if (strToken == "(") {
+        t.Symbol = TokenSymbol.LPAR;
+      } else if (strToken == ")") {
+        t.Symbol = TokenSymbol.RPAR;
+      } else if (double.TryParse(strToken, NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out temp)) {
+        t.Symbol = TokenSymbol.NUMBER;
+        t.DoubleValue = double.Parse(strToken, CultureInfo.InvariantCulture.NumberFormat);
+      } else {
+        t.Symbol = TokenSymbol.SYMB;
+      }
+      return t;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Util.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Util.cs	(revision 3733)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Util.cs	(revision 3733)
@@ -0,0 +1,106 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using HeuristicLab.Random;
+using System.Collections.Generic;
+using System.Text;
+using System.Diagnostics;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using System.Linq;
+namespace HeuristicLab.Problems.DataAnalysis.Tests {
+  internal class Util {
+
+    public static void InitTree(SymbolicExpressionTree tree, MersenneTwister twister, List<string> varNames) {
+      foreach (var node in tree.IterateNodesPostfix()) {
+        if (node is VariableTreeNode) {
+          var varNode = node as VariableTreeNode;
+          varNode.Weight = twister.NextDouble() * 20.0 - 10.0;
+          varNode.VariableName = varNames[twister.Next(varNames.Count)];
+        } else if (node is ConstantTreeNode) {
+          var constantNode = node as ConstantTreeNode;
+          constantNode.Value = twister.NextDouble() * 20.0 - 10.0;
+        }
+      }
+    }
+
+
+    public static SymbolicExpressionTree[] CreateRandomTrees(MersenneTwister twister, Dataset dataset, ISymbolicExpressionGrammar grammar, int popSize) {
+      return CreateRandomTrees(twister, dataset, grammar, popSize, 1, 200, 3, 3);
+    }
+
+    public static SymbolicExpressionTree[] CreateRandomTrees(MersenneTwister twister, Dataset dataset, ISymbolicExpressionGrammar grammar,
+      int popSize, int minSize, int maxSize,
+      int maxFunctionDefinitions, int maxFunctionArguments) {
+      foreach (Variable variableSymbol in grammar.Symbols.OfType<Variable>()) {
+        variableSymbol.VariableNames = dataset.VariableNames.Skip(1);
+      }
+      SymbolicExpressionTree[] randomTrees = new SymbolicExpressionTree[popSize];
+      for (int i = 0; i < randomTrees.Length; i++) {
+        randomTrees[i] = ProbabilisticTreeCreator.Create(twister, grammar, maxSize, 10, maxFunctionDefinitions, maxFunctionArguments);
+      }
+      return randomTrees;
+    }
+
+
+    public static Dataset CreateRandomDataset(MersenneTwister twister, int rows, int columns) {
+      double[,] data = new double[rows, columns];
+      for (int i = 0; i < rows; i++) {
+        for (int j = 0; j < columns; j++) {
+          data[i, j] = twister.NextDouble() * 2.0 - 1.0;
+        }
+      }
+      IEnumerable<string> variableNames = new string[] { "y" }.Concat(Enumerable.Range(0, columns - 1).Select(x => "x" + x.ToString()));
+      Dataset ds = new Dataset(variableNames, data);
+      return ds;
+    }
+
+    public static double NodesPerSecond(long nNodes, Stopwatch watch) {
+      return nNodes / (watch.ElapsedMilliseconds / 1000.0);
+    }
+
+    public static void EvaluateTrees(SymbolicExpressionTree[] trees, ISymbolicExpressionTreeInterpreter interpreter, Dataset dataset, int repetitions) {
+      double[] estimation = new double[dataset.Rows];
+      // warm up
+      for (int i = 0; i < trees.Length; i++) {
+        estimation = interpreter.GetSymbolicExpressionTreeValues(trees[i], dataset, Enumerable.Range(0, dataset.Rows)).ToArray();
+      }
+
+      Stopwatch watch = new Stopwatch();
+      long nNodes = 0;
+      for (int rep = 0; rep < repetitions; rep++) {
+        watch.Start();
+        for (int i = 0; i < trees.Length; i++) {
+          nNodes += trees[i].Size * (dataset.Rows - 1);
+          estimation = interpreter.GetSymbolicExpressionTreeValues(trees[i], dataset, Enumerable.Range(0, dataset.Rows)).ToArray();
+        }
+        watch.Stop();
+      }
+      Assert.Inconclusive("Random tree evaluation performance of " + interpreter.GetType() + ":" +
+        watch.ElapsedMilliseconds + "ms " +
+        Util.NodesPerSecond(nNodes, watch) + " nodes/sec");
+    }
+  }
+}
