Index: stable/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs
===================================================================
--- stable/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs	(revision 14186)
+++ stable/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs	(revision 14811)
@@ -70,4 +70,22 @@
     }
 
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void CompiledInterpreterTestTypeCoherentGrammarPerformance() {
+      TestTypeCoherentGrammarPerformance(new SymbolicDataAnalysisExpressionCompiledTreeInterpreter(), 12.5e6);
+    }
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void CompiledInterpreterTestFullGrammarPerformance() {
+      TestFullGrammarPerformance(new SymbolicDataAnalysisExpressionCompiledTreeInterpreter(), 12.5e6);
+    }
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void CompiledInterpreterTestArithmeticGrammarPerformance() {
+      TestArithmeticGrammarPerformance(new SymbolicDataAnalysisExpressionCompiledTreeInterpreter(), 12.5e6);
+    }
 
     [TestMethod]
@@ -80,14 +98,7 @@
     [TestCategory("Problems.DataAnalysis.Symbolic")]
     [TestProperty("Time", "long")]
-    public void ILEmittingInterpreterTestFullGrammarPerformance() {
-      TestFullGrammarPerformance(new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(), 7.5e6);
-    }
-    [TestMethod]
-    [TestCategory("Problems.DataAnalysis.Symbolic")]
-    [TestProperty("Time", "long")]
     public void ILEmittingInterpreterTestArithmeticGrammarPerformance() {
       TestArithmeticGrammarPerformance(new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(), 7.5e6);
     }
-
 
     [TestMethod]
@@ -113,10 +124,8 @@
       var twister = new MersenneTwister(31415);
       var dataset = Util.CreateRandomDataset(twister, Rows, Columns);
+
       var grammar = new TypeCoherentExpressionGrammar();
       grammar.ConfigureAsDefaultRegressionGrammar();
-      grammar.MaximumFunctionArguments = 0;
-      grammar.MaximumFunctionDefinitions = 0;
-      grammar.MinimumFunctionArguments = 0;
-      grammar.MinimumFunctionDefinitions = 0;
+
       var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 100, 0, 0);
       foreach (ISymbolicExpressionTree tree in randomTrees) {
@@ -131,9 +140,6 @@
       var twister = new MersenneTwister(31415);
       var dataset = Util.CreateRandomDataset(twister, Rows, Columns);
+
       var grammar = new FullFunctionalExpressionGrammar();
-      grammar.MaximumFunctionArguments = 0;
-      grammar.MaximumFunctionDefinitions = 0;
-      grammar.MinimumFunctionArguments = 0;
-      grammar.MinimumFunctionDefinitions = 0;
       var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 100, 0, 0);
       foreach (ISymbolicExpressionTree tree in randomTrees) {
@@ -148,10 +154,6 @@
       var twister = new MersenneTwister(31415);
       var dataset = Util.CreateRandomDataset(twister, Rows, Columns);
+
       var grammar = new ArithmeticExpressionGrammar();
-      //grammar.Symbols.OfType<Variable>().First().Enabled = false;
-      grammar.MaximumFunctionArguments = 0;
-      grammar.MaximumFunctionDefinitions = 0;
-      grammar.MinimumFunctionArguments = 0;
-      grammar.MinimumFunctionDefinitions = 0;
       var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 100, 0, 0);
       foreach (SymbolicExpressionTree tree in randomTrees) {
@@ -175,7 +177,12 @@
       EvaluateTerminals(interpreter, ds);
       EvaluateOperations(interpreter, ds);
+      EvaluateLaggedOperations(interpreter, ds);
+      EvaluateSpecialFunctions(interpreter, ds);
       EvaluateAdf(interpreter, ds);
     }
 
+    /// <summary>
+    ///A test for Evaluate
+    ///</summary>
     [TestMethod]
     [TestCategory("Problems.DataAnalysis.Symbolic")]
@@ -185,4 +192,16 @@
       EvaluateTerminals(interpreter, ds);
       EvaluateOperations(interpreter, ds);
+      EvaluateLaggedOperations(interpreter, ds);
+      EvaluateSpecialFunctions(interpreter, ds);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "short")]
+    public void CompiledInterpreterTestEvaluation() {
+      var interpreter = new SymbolicDataAnalysisExpressionCompiledTreeInterpreter();
+      EvaluateTerminals(interpreter, ds);
+      EvaluateOperations(interpreter, ds);
+      EvaluateSpecialFunctions(interpreter, ds);
     }
 
@@ -192,11 +211,127 @@
     public void LinearInterpreterTestEvaluation() {
       var interpreter = new SymbolicDataAnalysisExpressionTreeLinearInterpreter();
-
       //ADFs are not supported by the linear interpreter
       EvaluateTerminals(interpreter, ds);
       EvaluateOperations(interpreter, ds);
-    }
-
-    private void EvaluateTerminals(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds) {
+      EvaluateLaggedOperations(interpreter, ds);
+      EvaluateSpecialFunctions(interpreter, ds);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void TestInterpretersEstimatedValuesConsistency() {
+      var twister = new MersenneTwister();
+      int seed = twister.Next(0, int.MaxValue);
+      twister.Seed((uint)seed);
+      const int numRows = 100;
+      var dataset = Util.CreateRandomDataset(twister, numRows, Columns);
+
+      var grammar = new TypeCoherentExpressionGrammar();
+
+      var interpreters = new ISymbolicDataAnalysisExpressionTreeInterpreter[] {
+        new SymbolicDataAnalysisExpressionTreeLinearInterpreter(),
+        new SymbolicDataAnalysisExpressionTreeInterpreter(),
+      };
+
+      var rows = Enumerable.Range(0, numRows).ToList();
+      var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 10, 0, 0);
+      foreach (ISymbolicExpressionTree tree in randomTrees) {
+        Util.InitTree(tree, twister, new List<string>(dataset.VariableNames));
+      }
+
+      for (int i = 0; i < randomTrees.Length; ++i) {
+        var tree = randomTrees[i];
+        var valuesMatrix = interpreters.Select(x => x.GetSymbolicExpressionTreeValues(tree, dataset, rows)).ToList();
+        for (int m = 0; m < interpreters.Length - 1; ++m) {
+          var sum = valuesMatrix[m].Sum();
+          for (int n = m + 1; n < interpreters.Length; ++n) {
+            var s = valuesMatrix[n].Sum();
+            if (double.IsNaN(sum) && double.IsNaN(s)) continue;
+
+            string errorMessage = string.Format("Interpreters {0} and {1} do not agree on tree {2} (seed = {3}).", interpreters[m].Name, interpreters[n].Name, i, seed);
+            Assert.AreEqual(sum, s, 1e-12, errorMessage);
+          }
+        }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void TestCompiledInterpreterEstimatedValuesConsistency() {
+      const double delta = 1e-12;
+
+      var twister = new MersenneTwister();
+      int seed = twister.Next(0, int.MaxValue);
+      twister.Seed((uint)seed);
+
+      Console.WriteLine(seed);
+
+      const int numRows = 100;
+      var dataset = Util.CreateRandomDataset(twister, numRows, Columns);
+
+      var grammar = new TypeCoherentExpressionGrammar();
+      grammar.ConfigureAsDefaultRegressionGrammar();
+      grammar.Symbols.First(x => x.Name == "Power Functions").Enabled = true;
+
+      var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 10, 0, 0);
+      foreach (ISymbolicExpressionTree tree in randomTrees) {
+        Util.InitTree(tree, twister, new List<string>(dataset.VariableNames));
+      }
+
+      var interpreters = new ISymbolicDataAnalysisExpressionTreeInterpreter[] {
+        new SymbolicDataAnalysisExpressionCompiledTreeInterpreter(),
+        new SymbolicDataAnalysisExpressionTreeInterpreter(),
+        new SymbolicDataAnalysisExpressionTreeLinearInterpreter(),
+      };
+      var rows = Enumerable.Range(0, numRows).ToList();
+      var formatter = new SymbolicExpressionTreeHierarchicalFormatter();
+
+      for (int i = 0; i < randomTrees.Length; ++i) {
+        var tree = randomTrees[i];
+        var valuesMatrix = interpreters.Select(x => x.GetSymbolicExpressionTreeValues(tree, dataset, rows).ToList()).ToList();
+        for (int m = 0; m < interpreters.Length - 1; ++m) {
+          for (int n = m + 1; n < interpreters.Length; ++n) {
+            for (int row = 0; row < numRows; ++row) {
+              var v1 = valuesMatrix[m][row];
+              var v2 = valuesMatrix[n][row];
+              if (double.IsNaN(v1) && double.IsNaN(v2)) continue;
+              if (Math.Abs(v1 - v2) > delta) {
+                Console.WriteLine(formatter.Format(tree));
+                foreach (var node in tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPrefix().ToList()) {
+                  var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
+                  if (rootNode.HasLocalParameters) rootNode.ResetLocalParameters(twister);
+                  rootNode.SetGrammar(grammar.CreateExpressionTreeGrammar());
+
+                  var startNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode();
+                  if (startNode.HasLocalParameters) startNode.ResetLocalParameters(twister);
+                  startNode.SetGrammar(grammar.CreateExpressionTreeGrammar());
+
+                  rootNode.AddSubtree(startNode);
+                  var t = new SymbolicExpressionTree(rootNode);
+                  var start = t.Root.GetSubtree(0);
+                  var p = node.Parent;
+                  start.AddSubtree(node);
+                  Console.WriteLine(node);
+
+                  var y1 = interpreters[m].GetSymbolicExpressionTreeValues(t, dataset, new[] { row }).First();
+                  var y2 = interpreters[n].GetSymbolicExpressionTreeValues(t, dataset, new[] { row }).First();
+
+                  if (double.IsNaN(y1) && double.IsNaN(y2)) continue;
+                  string prefix = Math.Abs(y1 - y2) > delta ? "++" : "==";
+                  Console.WriteLine("\t{0} Row {1}: {2} {3}, Deviation = {4}", prefix, row, y1, y2, Math.Abs(y1 - y2));
+                  node.Parent = p;
+                }
+              }
+              string errorMessage = string.Format("Interpreters {0} and {1} do not agree on tree {2} and row {3} (seed = {4}).", interpreters[m].Name, interpreters[n].Name, i, row, seed);
+              Assert.AreEqual(v1, v2, delta, errorMessage);
+            }
+          }
+        }
+      }
+    }
+
+    private void EvaluateTerminals(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, IDataset ds) {
       // constants
       Evaluate(interpreter, ds, "(+ 1.5 3.5)", 0, 5.0);
@@ -207,5 +342,5 @@
     }
 
-    private void EvaluateAdf(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds) {
+    private void EvaluateAdf(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, IDataset ds) {
 
       // ADF      
@@ -246,5 +381,103 @@
     }
 
-    private void EvaluateOperations(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds) {
+    private void EvaluateSpecialFunctions(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, IDataset ds) {
+      // special functions
+      Action<double> checkAiry = (x) => {
+        double ai, aip, bi, bip;
+        alglib.airy(x, out ai, out aip, out bi, out bip);
+        Evaluate(interpreter, ds, "(airya " + x + ")", 0, ai);
+        Evaluate(interpreter, ds, "(airyb " + x + ")", 0, bi);
+      };
+
+      Action<double> checkBessel = (x) => {
+        Evaluate(interpreter, ds, "(bessel " + x + ")", 0, alglib.besseli0(x));
+      };
+
+      Action<double> checkSinCosIntegrals = (x) => {
+        double si, ci;
+        alglib.sinecosineintegrals(x, out si, out ci);
+        Evaluate(interpreter, ds, "(cosint " + x + ")", 0, ci);
+        Evaluate(interpreter, ds, "(sinint " + x + ")", 0, si);
+      };
+      Action<double> checkHypSinCosIntegrals = (x) => {
+        double shi, chi;
+        alglib.hyperbolicsinecosineintegrals(x, out shi, out chi);
+        Evaluate(interpreter, ds, "(hypcosint " + x + ")", 0, chi);
+        Evaluate(interpreter, ds, "(hypsinint " + x + ")", 0, shi);
+      };
+      Action<double> checkFresnelSinCosIntegrals = (x) => {
+        double c = 0, s = 0;
+        alglib.fresnelintegral(x, ref c, ref s);
+        Evaluate(interpreter, ds, "(fresnelcosint " + x + ")", 0, c);
+        Evaluate(interpreter, ds, "(fresnelsinint " + x + ")", 0, s);
+      };
+      Action<double> checkNormErf = (x) => {
+        Evaluate(interpreter, ds, "(norm " + x + ")", 0, alglib.normaldistribution(x));
+        Evaluate(interpreter, ds, "(erf " + x + ")", 0, alglib.errorfunction(x));
+      };
+
+      Action<double> checkGamma = (x) => {
+        Evaluate(interpreter, ds, "(gamma " + x + ")", 0, alglib.gammafunction(x));
+      };
+      Action<double> checkPsi = (x) => {
+        try {
+          Evaluate(interpreter, ds, "(psi " + x + ")", 0, alglib.psi(x));
+        } catch (alglib.alglibexception) { // ignore cases where alglib throws an exception
+        }
+      };
+      Action<double> checkDawson = (x) => {
+        Evaluate(interpreter, ds, "(dawson " + x + ")", 0, alglib.dawsonintegral(x));
+      };
+      Action<double> checkExpInt = (x) => {
+        Evaluate(interpreter, ds, "(expint " + x + ")", 0, alglib.exponentialintegralei(x));
+      };
+
+      foreach (var e in new[] { -2.0, -1.0, 0.0, 1.0, 2.0 }) {
+        checkAiry(e);
+        checkBessel(e);
+        checkSinCosIntegrals(e);
+        checkGamma(e);
+        checkExpInt(e);
+        checkDawson(e);
+        checkPsi(e);
+        checkNormErf(e);
+        checkFresnelSinCosIntegrals(e);
+        checkHypSinCosIntegrals(e);
+      }
+    }
+
+    private void EvaluateLaggedOperations(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, IDataset ds) {
+      // lag
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a -1) ", 1, ds.GetDoubleValue("A", 0));
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a -1) ", 2, ds.GetDoubleValue("A", 1));
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a 0) ", 2, ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a 1) ", 0, ds.GetDoubleValue("A", 1));
+
+      // integral
+      Evaluate(interpreter, ds, "(integral -1.0 (variable 1.0 a)) ", 1, ds.GetDoubleValue("A", 0) + ds.GetDoubleValue("A", 1));
+      Evaluate(interpreter, ds, "(integral -1.0 (lagVariable 1.0 a 1)) ", 1, ds.GetDoubleValue("A", 1) + ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(integral -2.0 (variable 1.0 a)) ", 2, ds.GetDoubleValue("A", 0) + ds.GetDoubleValue("A", 1) + ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(integral -1.0 (* (variable 1.0 a) (variable 1.0 b)))", 1, ds.GetDoubleValue("A", 0) * ds.GetDoubleValue("B", 0) + ds.GetDoubleValue("A", 1) * ds.GetDoubleValue("B", 1));
+      Evaluate(interpreter, ds, "(integral -2.0 3.0)", 1, 9.0);
+
+      // derivative
+      // (f_0 + 2 * f_1 - 2 * f_3 - f_4) / 8; // h = 1
+      Evaluate(interpreter, ds, "(diff (variable 1.0 a)) ", 5, (ds.GetDoubleValue("A", 5) + 2 * ds.GetDoubleValue("A", 4) - 2 * ds.GetDoubleValue("A", 2) - ds.GetDoubleValue("A", 1)) / 8.0);
+      Evaluate(interpreter, ds, "(diff (variable 1.0 b)) ", 5, (ds.GetDoubleValue("B", 5) + 2 * ds.GetDoubleValue("B", 4) - 2 * ds.GetDoubleValue("B", 2) - ds.GetDoubleValue("B", 1)) / 8.0);
+      Evaluate(interpreter, ds, "(diff (* (variable 1.0 a) (variable 1.0 b)))", 5, +
+        (ds.GetDoubleValue("A", 5) * ds.GetDoubleValue("B", 5) +
+        2 * ds.GetDoubleValue("A", 4) * ds.GetDoubleValue("B", 4) -
+        2 * ds.GetDoubleValue("A", 2) * ds.GetDoubleValue("B", 2) -
+        ds.GetDoubleValue("A", 1) * ds.GetDoubleValue("B", 1)) / 8.0);
+      Evaluate(interpreter, ds, "(diff -2.0 3.0)", 5, 0.0);
+
+      // timelag
+      Evaluate(interpreter, ds, "(lag -1.0 (lagVariable 1.0 a 2)) ", 1, ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(lag -2.0 (lagVariable 1.0 a 2)) ", 2, ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(lag -1.0 (* (lagVariable 1.0 a 1) (lagVariable 1.0 b 2)))", 1, ds.GetDoubleValue("A", 1) * ds.GetDoubleValue("B", 2));
+      Evaluate(interpreter, ds, "(lag -2.0 3.0)", 1, 3.0);
+    }
+
+    private void EvaluateOperations(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, IDataset ds) {
       // addition
       Evaluate(interpreter, ds, "(+ (variable 2.0 a ))", 1, 4.0);
@@ -369,106 +602,7 @@
       // mean
       Evaluate(interpreter, ds, "(mean -1.0 1.0 -1.0)", 0, -1.0 / 3.0);
-
-      // lag
-      Evaluate(interpreter, ds, "(lagVariable 1.0 a -1) ", 1, ds.GetDoubleValue("A", 0));
-      Evaluate(interpreter, ds, "(lagVariable 1.0 a -1) ", 2, ds.GetDoubleValue("A", 1));
-      Evaluate(interpreter, ds, "(lagVariable 1.0 a 0) ", 2, ds.GetDoubleValue("A", 2));
-      Evaluate(interpreter, ds, "(lagVariable 1.0 a 1) ", 0, ds.GetDoubleValue("A", 1));
-
-      // integral
-      Evaluate(interpreter, ds, "(integral -1.0 (variable 1.0 a)) ", 1, ds.GetDoubleValue("A", 0) + ds.GetDoubleValue("A", 1));
-      Evaluate(interpreter, ds, "(integral -1.0 (lagVariable 1.0 a 1)) ", 1, ds.GetDoubleValue("A", 1) + ds.GetDoubleValue("A", 2));
-      Evaluate(interpreter, ds, "(integral -2.0 (variable 1.0 a)) ", 2, ds.GetDoubleValue("A", 0) + ds.GetDoubleValue("A", 1) + ds.GetDoubleValue("A", 2));
-      Evaluate(interpreter, ds, "(integral -1.0 (* (variable 1.0 a) (variable 1.0 b)))", 1, ds.GetDoubleValue("A", 0) * ds.GetDoubleValue("B", 0) + ds.GetDoubleValue("A", 1) * ds.GetDoubleValue("B", 1));
-      Evaluate(interpreter, ds, "(integral -2.0 3.0)", 1, 9.0);
-
-      // derivative
-      // (f_0 + 2 * f_1 - 2 * f_3 - f_4) / 8; // h = 1
-      Evaluate(interpreter, ds, "(diff (variable 1.0 a)) ", 5, (ds.GetDoubleValue("A", 5) + 2 * ds.GetDoubleValue("A", 4) - 2 * ds.GetDoubleValue("A", 2) - ds.GetDoubleValue("A", 1)) / 8.0);
-      Evaluate(interpreter, ds, "(diff (variable 1.0 b)) ", 5, (ds.GetDoubleValue("B", 5) + 2 * ds.GetDoubleValue("B", 4) - 2 * ds.GetDoubleValue("B", 2) - ds.GetDoubleValue("B", 1)) / 8.0);
-      Evaluate(interpreter, ds, "(diff (* (variable 1.0 a) (variable 1.0 b)))", 5, +
-        (ds.GetDoubleValue("A", 5) * ds.GetDoubleValue("B", 5) +
-        2 * ds.GetDoubleValue("A", 4) * ds.GetDoubleValue("B", 4) -
-        2 * ds.GetDoubleValue("A", 2) * ds.GetDoubleValue("B", 2) -
-        ds.GetDoubleValue("A", 1) * ds.GetDoubleValue("B", 1)) / 8.0);
-      Evaluate(interpreter, ds, "(diff -2.0 3.0)", 5, 0.0);
-
-      // timelag
-      Evaluate(interpreter, ds, "(lag -1.0 (lagVariable 1.0 a 2)) ", 1, ds.GetDoubleValue("A", 2));
-      Evaluate(interpreter, ds, "(lag -2.0 (lagVariable 1.0 a 2)) ", 2, ds.GetDoubleValue("A", 2));
-      Evaluate(interpreter, ds, "(lag -1.0 (* (lagVariable 1.0 a 1) (lagVariable 1.0 b 2)))", 1, ds.GetDoubleValue("A", 1) * ds.GetDoubleValue("B", 2));
-      Evaluate(interpreter, ds, "(lag -2.0 3.0)", 1, 3.0);
-
-      {
-        // special functions
-        Action<double> checkAiry = (x) => {
-          double ai, aip, bi, bip;
-          alglib.airy(x, out ai, out aip, out bi, out bip);
-          Evaluate(interpreter, ds, "(airya " + x + ")", 0, ai);
-          Evaluate(interpreter, ds, "(airyb " + x + ")", 0, bi);
-        };
-
-        Action<double> checkBessel = (x) => {
-          Evaluate(interpreter, ds, "(bessel " + x + ")", 0, alglib.besseli0(x));
-        };
-
-        Action<double> checkSinCosIntegrals = (x) => {
-          double si, ci;
-          alglib.sinecosineintegrals(x, out si, out ci);
-          Evaluate(interpreter, ds, "(cosint " + x + ")", 0, ci);
-          Evaluate(interpreter, ds, "(sinint " + x + ")", 0, si);
-        };
-        Action<double> checkHypSinCosIntegrals = (x) => {
-          double shi, chi;
-          alglib.hyperbolicsinecosineintegrals(x, out shi, out chi);
-          Evaluate(interpreter, ds, "(hypcosint " + x + ")", 0, chi);
-          Evaluate(interpreter, ds, "(hypsinint " + x + ")", 0, shi);
-        };
-        Action<double> checkFresnelSinCosIntegrals = (x) => {
-          double c = 0, s = 0;
-          alglib.fresnelintegral(x, ref c, ref s);
-          Evaluate(interpreter, ds, "(fresnelcosint " + x + ")", 0, c);
-          Evaluate(interpreter, ds, "(fresnelsinint " + x + ")", 0, s);
-        };
-        Action<double> checkNormErf = (x) => {
-          Evaluate(interpreter, ds, "(norm " + x + ")", 0, alglib.normaldistribution(x));
-          Evaluate(interpreter, ds, "(erf " + x + ")", 0, alglib.errorfunction(x));
-        };
-
-        Action<double> checkGamma = (x) => {
-          Evaluate(interpreter, ds, "(gamma " + x + ")", 0, alglib.gammafunction(x));
-        };
-        Action<double> checkPsi = (x) => {
-          try {
-            Evaluate(interpreter, ds, "(psi " + x + ")", 0, alglib.psi(x));
-          }
-          catch (alglib.alglibexception) { // ignore cases where alglib throws an exception
-          }
-        };
-        Action<double> checkDawson = (x) => {
-          Evaluate(interpreter, ds, "(dawson " + x + ")", 0, alglib.dawsonintegral(x));
-        };
-        Action<double> checkExpInt = (x) => {
-          Evaluate(interpreter, ds, "(expint " + x + ")", 0, alglib.exponentialintegralei(x));
-        };
-
-
-
-        foreach (var e in new[] { -2.0, -1.0, 0.0, 1.0, 2.0 }) {
-          checkAiry(e);
-          checkBessel(e);
-          checkSinCosIntegrals(e);
-          checkGamma(e);
-          checkExpInt(e);
-          checkDawson(e);
-          checkPsi(e);
-          checkNormErf(e);
-          checkFresnelSinCosIntegrals(e);
-          checkHypSinCosIntegrals(e);
-        }
-      }
-    }
-
-    private void Evaluate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds, string expr, int index, double expected) {
+    }
+
+    private void Evaluate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, IDataset ds, string expr, int index, double expected) {
       var importer = new SymbolicExpressionImporter();
       ISymbolicExpressionTree tree = importer.Import(expr);
