Index: anches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionSizefairCrossover.cs
===================================================================
--- /branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionSizefairCrossover.cs	(revision 13212)
+++ 	(revision )
@@ -1,46 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-
-namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Crossovers {
-  [Item("SizeFairCrossover", "An operator which performs subtree swapping crossover.")]
-  class SymbolicDataAnalysisExpressionSizefairCrossover<T> : SubtreeCrossover, ISymbolicDataAnalysisExpressionCrossover<T> {
-    [StorableConstructor]
-    protected SymbolicDataAnalysisExpressionSizefairCrossover(bool deserializing) : base(deserializing) { }
-    protected SymbolicDataAnalysisExpressionSizefairCrossover(SubtreeCrossover original, Cloner cloner) : base(original, cloner) { }
-    public override IDeepCloneable Clone(Cloner cloner) { return new SymbolicDataAnalysisExpressionSizefairCrossover<T>(this, cloner); }
-
-    public override bool CanChangeName {
-      get { return true; }
-    }
-
-    public SymbolicDataAnalysisExpressionSizefairCrossover()
-      : base() {
-      SymbolicDataAnalysisEvaluationPartitionParameter.Hidden = true;
-      Name = "SizeFairCrossover";
-    }
-  }
-}
Index: /branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionCSharpFormatter.cs
===================================================================
--- /branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionCSharpFormatter.cs	(revision 13212)
+++ /branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionCSharpFormatter.cs	(revision 13213)
@@ -56,4 +56,5 @@
 
     private void FormatRecursively(ISymbolicExpressionTreeNode node, StringBuilder strBuilder) {
+      // TODO: adapt to interpreter semantics. The HL interpreter also allows Boolean operations on reals
       if (node.Subtrees.Any()) {
         if (node.Symbol is Addition) {
@@ -83,8 +84,10 @@
         } else if (node.Symbol is Or) {
           FormatOperator(node, "||", strBuilder);
+        } else if (node.Symbol is Xor) {
+          FormatOperator(node, "^", strBuilder);
         } else if (node.Symbol is Sine) {
           FormatFunction(node, "Math.Sin", strBuilder);
         } else if (node.Symbol is Subtraction) {
-          FormatOperator(node, "-", strBuilder);
+          FormatSubtraction(node, strBuilder);
         } else if (node.Symbol is Tangent) {
           FormatFunction(node, "Math.Tan", strBuilder);
@@ -142,4 +145,14 @@
     }
 
+    private void FormatSubtraction(ISymbolicExpressionTreeNode node, StringBuilder strBuilder) {
+      if (node.SubtreeCount == 1) {
+        strBuilder.Append("-");
+        FormatRecursively(node.GetSubtree(0), strBuilder);
+        return;
+      }
+      //Default case: more than 1 child
+      FormatOperator(node, "-", strBuilder);
+    }
+
     private void FormatOperator(ISymbolicExpressionTreeNode node, string symbol, StringBuilder strBuilder) {
       strBuilder.Append("(");
@@ -176,5 +189,5 @@
       }
 
-      var orderedNames = varNames.OrderBy(n => n, new NaturalStringComparer()).Select(n=> "double " + n);
+      var orderedNames = varNames.OrderBy(n => n, new NaturalStringComparer()).Select(n => "double " + n);
       strBuilder.Append(string.Join(", ", orderedNames));
 
Index: /branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMathematicaFormatter.cs
===================================================================
--- /branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMathematicaFormatter.cs	(revision 13213)
+++ /branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMathematicaFormatter.cs	(revision 13213)
@@ -0,0 +1,231 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Globalization;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("Mathematica Symbolic Expression Tree Formatter", "A string formatter that converts symbolic expression trees to Mathematica expressions.")]
+  [StorableClass]
+  public sealed class SymbolicDataAnalysisExpressionMathematicaFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter {
+    [StorableConstructor]
+    private SymbolicDataAnalysisExpressionMathematicaFormatter(bool deserializing) : base(deserializing) { }
+    private SymbolicDataAnalysisExpressionMathematicaFormatter(SymbolicDataAnalysisExpressionMathematicaFormatter original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicDataAnalysisExpressionMathematicaFormatter()
+      : base() {
+      Name = ItemName;
+      Description = ItemDescription;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisExpressionMathematicaFormatter(this, cloner);
+    }
+
+    public string Format(ISymbolicExpressionTree symbolicExpressionTree) {
+      // skip root and start symbols
+      StringBuilder strBuilder = new StringBuilder();
+      FormatRecursively(symbolicExpressionTree.Root.GetSubtree(0).GetSubtree(0), strBuilder);
+      return strBuilder.ToString();
+    }
+
+    private void FormatRecursively(ISymbolicExpressionTreeNode node, StringBuilder strBuilder) {
+      if (node.Subtrees.Any()) {
+        if (node.Symbol is Addition) {
+          FormatFunction(node, "Plus", strBuilder);
+        } else if (node.Symbol is Average) {
+          FormatAverage(node, strBuilder);
+        } else if (node.Symbol is Multiplication) {
+          FormatFunction(node, "Times", strBuilder);
+        } else if (node.Symbol is Subtraction) {
+          FormatSubtraction(node, strBuilder);
+        } else if (node.Symbol is Division) {
+          FormatDivision(node, strBuilder);
+        } else if (node.Symbol is Sine) {
+          FormatFunction(node, "Sin", strBuilder);
+        } else if (node.Symbol is Cosine) {
+          FormatFunction(node, "Cos", strBuilder);
+        } else if (node.Symbol is Tangent) {
+          FormatFunction(node, "Tan", strBuilder);
+        } else if (node.Symbol is Exponential) {
+          FormatFunction(node, "Exp", strBuilder);
+        } else if (node.Symbol is Logarithm) {
+          FormatFunction(node, "Log", strBuilder);
+        } else if (node.Symbol is IfThenElse) {
+          FormatIf(node, strBuilder);
+        } else if (node.Symbol is GreaterThan) {
+          strBuilder.Append("If[Greater[");
+          FormatRecursively(node.GetSubtree(0), strBuilder);
+          strBuilder.Append(",");
+          FormatRecursively(node.GetSubtree(1), strBuilder);
+          strBuilder.Append("], 1, -1]");
+        } else if (node.Symbol is LessThan) {
+          strBuilder.Append("If[Less[");
+          FormatRecursively(node.GetSubtree(0), strBuilder);
+          strBuilder.Append(",");
+          FormatRecursively(node.GetSubtree(1), strBuilder);
+          strBuilder.Append("], 1, -1]");
+        } else if (node.Symbol is And) {
+          FormatAnd(node, strBuilder);
+        } else if (node.Symbol is Not) {
+          strBuilder.Append("If[Greater[");
+          FormatRecursively(node.GetSubtree(0), strBuilder);
+          strBuilder.Append(", 0], -1, 1]");
+        } else if (node.Symbol is Or) {
+          FormatOr(node, strBuilder);
+        } else if (node.Symbol is Xor) {
+          FormatXor(node, strBuilder);
+        } else if (node.Symbol is Square) {
+          FormatSquare(node, strBuilder);
+        } else if (node.Symbol is SquareRoot) {
+          FormatFunction(node, "Sqrt", strBuilder);
+        } else if (node.Symbol is Power) {
+          FormatFunction(node, "Power", strBuilder);
+        } else if (node.Symbol is Root) {
+          FormatRoot(node, strBuilder);
+        } else {
+          throw new NotSupportedException("Formatting of symbol: " + node.Symbol + " is not supported.");
+        }
+      } else {
+        if (node is VariableTreeNode) {
+          var varNode = node as VariableTreeNode;
+          strBuilder.AppendFormat("Times[{0}, {1}]", varNode.VariableName, varNode.Weight.ToString("G17", CultureInfo.InvariantCulture));
+        } else if (node is ConstantTreeNode) {
+          var constNode = node as ConstantTreeNode;
+          strBuilder.Append(constNode.Value.ToString("G17", CultureInfo.InvariantCulture));
+        } else {
+          throw new NotSupportedException("Formatting of symbol: " + node.Symbol + " is not supported.");
+        }
+      }
+    }
+
+    private void FormatXor(ISymbolicExpressionTreeNode node, StringBuilder strBuilder) {
+      strBuilder.Append("If[Xor[");
+      foreach (var t in node.Subtrees) {
+        strBuilder.Append("Greater[");
+        FormatRecursively(t, strBuilder);
+        strBuilder.Append(", 0]");
+        if (t != node.Subtrees.Last()) strBuilder.Append(",");
+      }
+      strBuilder.Append("], 1, -1]");
+    }
+
+    private void FormatOr(ISymbolicExpressionTreeNode node, StringBuilder strBuilder) {
+      strBuilder.Append("If[Or[");
+      foreach (var t in node.Subtrees) {
+        strBuilder.Append("Greater[");
+        FormatRecursively(t, strBuilder);
+        strBuilder.Append(", 0]");
+        if (t != node.Subtrees.Last()) strBuilder.Append(",");
+      }
+      strBuilder.Append("], 1, -1]");
+    }
+
+    private void FormatAnd(ISymbolicExpressionTreeNode node, StringBuilder strBuilder) {
+      strBuilder.Append("If[And[");
+      foreach (var t in node.Subtrees) {
+        strBuilder.Append("Greater[");
+        FormatRecursively(t, strBuilder);
+        strBuilder.Append(", 0]");
+        if (t != node.Subtrees.Last()) strBuilder.Append(",");
+      }
+      strBuilder.Append("], 1, -1]");
+    }
+
+    private void FormatIf(ISymbolicExpressionTreeNode node, StringBuilder strBuilder) {
+      strBuilder.Append("If[Greater[");
+      FormatRecursively(node.GetSubtree(0), strBuilder);
+      strBuilder.Append(", 0], ");
+      FormatRecursively(node.GetSubtree(1), strBuilder);
+      strBuilder.Append(", ");
+      FormatRecursively(node.GetSubtree(2), strBuilder);
+      strBuilder.Append("]");
+    }
+
+    private void FormatAverage(ISymbolicExpressionTreeNode node, StringBuilder strBuilder) {
+      // mean function needs a list of values
+      strBuilder.Append("Mean[{");
+      FormatRecursively(node.GetSubtree(0), strBuilder);
+      for (int i = 1; i < node.SubtreeCount; i++) {
+        strBuilder.Append(",");
+        FormatRecursively(node.GetSubtree(i), strBuilder);
+      }
+      strBuilder.Append("}]");
+    }
+
+    private void FormatSubtraction(ISymbolicExpressionTreeNode node, StringBuilder strBuilder) {
+      strBuilder.Append("Subtract[");
+      FormatRecursively(node.GetSubtree(0), strBuilder);
+      strBuilder.Append(", Times[-1");
+      foreach (var t in node.Subtrees) {
+        strBuilder.Append(",");
+        FormatRecursively(t, strBuilder);
+      }
+      strBuilder.Append("]]");
+    }
+
+    private void FormatSquare(ISymbolicExpressionTreeNode node, StringBuilder strBuilder) {
+      strBuilder.Append("Power[");
+      FormatRecursively(node.GetSubtree(0), strBuilder);
+      strBuilder.Append(", 2]");
+    }
+
+    private void FormatRoot(ISymbolicExpressionTreeNode node, StringBuilder strBuilder) {
+      strBuilder.Append("Power[");
+      FormatRecursively(node.GetSubtree(0), strBuilder);
+      strBuilder.Append(", Divide[1,");
+      FormatRecursively(node.GetSubtree(1), strBuilder);
+      strBuilder.Append("]]");
+    }
+
+    private void FormatDivision(ISymbolicExpressionTreeNode node, StringBuilder strBuilder) {
+      if (node.SubtreeCount == 1) {
+        strBuilder.Append("Divide[1, ");
+        FormatRecursively(node.GetSubtree(0), strBuilder);
+        strBuilder.Append("]");
+      } else {
+        strBuilder.Append("Divide[");
+        FormatRecursively(node.GetSubtree(0), strBuilder);
+        strBuilder.Append(", Times[");
+        FormatRecursively(node.GetSubtree(1), strBuilder);
+        for (int i = 2; i < node.SubtreeCount; i++) {
+          strBuilder.Append(",");
+          FormatRecursively(node.GetSubtree(i), strBuilder);
+        }
+        strBuilder.Append("]]");
+      }
+    }
+
+    private void FormatFunction(ISymbolicExpressionTreeNode node, string function, StringBuilder strBuilder) {
+      strBuilder.Append(function + "[");
+      foreach (var child in node.Subtrees) {
+        FormatRecursively(child, strBuilder);
+        if (child != node.Subtrees.Last())
+          strBuilder.Append(", ");
+      }
+      strBuilder.Append("]");
+    }
+  }
+}
Index: /branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
===================================================================
--- /branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj	(revision 13212)
+++ /branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj	(revision 13213)
@@ -198,4 +198,5 @@
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="Formatters\SymbolicDataAnalysisExpressionMathematicaFormatter.cs" />
     <Compile Include="Formatters\SymbolicDataAnalysisExpressionCSharpFormatter.cs" />
     <Compile Include="Importer\SymbolicExpressionImporter.cs" />
