Index: branches/SmalltalkExport/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Formatters/3.3/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Formatters.csproj
===================================================================
--- branches/SmalltalkExport/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Formatters/3.3/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Formatters.csproj	(revision 4822)
+++ branches/SmalltalkExport/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Formatters/3.3/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Formatters.csproj	(revision 4823)
@@ -1,3 +1,3 @@
-<?xml version="1.0" encoding="utf-8"?>
+﻿<?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
@@ -59,4 +59,7 @@
       <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     </Reference>
+    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.3">
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Problems.DataAnalysis-3.3.dll</HintPath>
+    </Reference>
     <Reference Include="Microsoft.Build.Conversion.v3.5" />
     <Reference Include="System" />
Index: branches/SmalltalkExport/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Formatters/3.3/SymbolicExpressionTreeSmalltalkStringFormatter.cs
===================================================================
--- branches/SmalltalkExport/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Formatters/3.3/SymbolicExpressionTreeSmalltalkStringFormatter.cs	(revision 4822)
+++ branches/SmalltalkExport/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Formatters/3.3/SymbolicExpressionTreeSmalltalkStringFormatter.cs	(revision 4823)
@@ -24,4 +24,6 @@
 using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Formatters {
@@ -31,39 +33,121 @@
   public class SymbolicExpressionTreeSmalltalkStringFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter {
 
-    public bool Indent { get; set; }
-
     [StorableConstructor]
     protected SymbolicExpressionTreeSmalltalkStringFormatter(bool deserializing) : base(deserializing) { }
     protected SymbolicExpressionTreeSmalltalkStringFormatter(SymbolicExpressionTreeSmalltalkStringFormatter original, Cloner cloner) : base(original, cloner) { }
-    public SymbolicExpressionTreeSmalltalkStringFormatter()
-      : base() {
-      Indent = true;
+    public SymbolicExpressionTreeSmalltalkStringFormatter() : base() { }
+
+    public string Format(SymbolicExpressionTree symbolicExpressionTree) {
+      return FormatRecursively(symbolicExpressionTree.Root);
     }
 
-    public string Format(SymbolicExpressionTree symbolicExpressionTree) {
-      return FormatRecursively(symbolicExpressionTree.Root, 0);
-    }
+    private string FormatRecursively(SymbolicExpressionTreeNode node) {
+      StringBuilder stringBuilder = new StringBuilder();
 
-    private string FormatRecursively(SymbolicExpressionTreeNode node, int indentLength) {
-      StringBuilder strBuilder = new StringBuilder();
-      if (Indent) strBuilder.Append(' ', indentLength);
-      strBuilder.Append(".(");
-      // internal nodes or leaf nodes?
-      if (node.SubTrees.Count > 0) {
-        // symbol on same line as '('
-        strBuilder.AppendLine(node.ToString());
-        // each subtree expression on a new line
-        // and closing ')' also on new line
-        foreach (var subtree in node.SubTrees) {
-          strBuilder.AppendLine(FormatRecursively(subtree, indentLength + 2));
+      Symbol symbol = node.Symbol;
+      if (symbol is Addition) {
+        for (int i = 0; i < node.SubTrees.Count; i++) {
+          if (i > 0) stringBuilder.Append("+");
+          stringBuilder.Append("(");
+          stringBuilder.Append(FormatRecursively(node.SubTrees[i]));
+          stringBuilder.Append(")");
         }
-        if (Indent) strBuilder.Append(' ', indentLength);
-        strBuilder.Append(")");
-      } else {
-        // symbol in the same line with as '(' and ')'
-        strBuilder.Append(node.ToString());
-        strBuilder.Append(")");
+      } else if (symbol is And) {
+        for (int i = 0; i < node.SubTrees.Count; i++) {
+          if (i > 0) stringBuilder.Append("&");
+          stringBuilder.Append("(");
+          stringBuilder.Append(FormatRecursively(node.SubTrees[i]));
+          stringBuilder.Append(")");
+        }
+      } else if (symbol is Average) {
+        stringBuilder.Append("(1/");
+        stringBuilder.Append(node.SubTrees.Count);
+        stringBuilder.Append(")*(");
+        for (int i = 0; i < node.SubTrees.Count; i++) {
+          if (i > 0) stringBuilder.Append("+");
+          stringBuilder.Append("(");
+          stringBuilder.Append(FormatRecursively(node.SubTrees[i]));
+          stringBuilder.Append(")");
+        }
+        stringBuilder.Append(")");
+      } else if (symbol is Constant) {
+        ConstantTreeNode constantTreeNode = node as ConstantTreeNode;
+        stringBuilder.Append(constantTreeNode.Value);
+      } else if (symbol is Cosine) {
+        stringBuilder.Append(FormatRecursively(node.SubTrees[0]));
+        stringBuilder.Append("cos");
+      } else if (symbol is Division) {
+        for (int i = 0; i < node.SubTrees.Count; i++) {
+          if (i > 0) stringBuilder.Append("/");
+          stringBuilder.Append("(");
+          stringBuilder.Append(FormatRecursively(node.SubTrees[i]));
+          stringBuilder.Append(")");
+        }
+      } else if (symbol is Exponential) {
+        stringBuilder.Append("not yet implemented");
+      } else if (symbol is GreaterThan) {
+        stringBuilder.Append("(");
+        stringBuilder.Append(FormatRecursively(node.SubTrees[0]));
+        stringBuilder.Append(">");
+        stringBuilder.Append(FormatRecursively(node.SubTrees[1]));
+        stringBuilder.Append(")");
+      } else if (symbol is IfThenElse) {
+        stringBuilder.Append("(");
+        stringBuilder.Append(FormatRecursively(node.SubTrees[0]));
+        stringBuilder.Append(" ifTrue: [");
+        stringBuilder.Append(FormatRecursively(node.SubTrees[1]));
+        stringBuilder.Append("] ifFalse: [");
+        stringBuilder.Append(FormatRecursively(node.SubTrees[2]));
+        stringBuilder.Append("] )");
+      } else if (symbol is LaggedVariable) {
+        stringBuilder.Append("not implemented");
+      } else if (symbol is LessThan) {
+        stringBuilder.Append("(");
+        stringBuilder.Append(FormatRecursively(node.SubTrees[0]));
+        stringBuilder.Append("<");
+        stringBuilder.Append(FormatRecursively(node.SubTrees[1]));
+        stringBuilder.Append(")");
+      } else if (symbol is Logarithm) {
+        stringBuilder.Append(FormatRecursively(node.SubTrees[0]));
+        stringBuilder.Append("log");
+      } else if (symbol is Multiplication) {
+        for (int i = 0; i < node.SubTrees.Count; i++) {
+          if (i > 0) stringBuilder.Append("*");
+          stringBuilder.Append("(");
+          stringBuilder.Append(FormatRecursively(node.SubTrees[i]));
+          stringBuilder.Append(")");
+        }
+      } else if (symbol is Not) {
+        stringBuilder.Append("!");
+        stringBuilder.Append(FormatRecursively(node.SubTrees[0]));
+      } else if (symbol is Or) {
+        for (int i = 0; i < node.SubTrees.Count; i++) {
+          if (i > 0) stringBuilder.Append("|");
+          stringBuilder.Append("(");
+          stringBuilder.Append(FormatRecursively(node.SubTrees[i]));
+          stringBuilder.Append(")");
+        }
+      } else if (symbol is Sine) {
+        stringBuilder.Append(FormatRecursively(node.SubTrees[0]));
+        stringBuilder.Append("sin");
+      } else if (symbol is Subtraction) {
+        for (int i = 0; i < node.SubTrees.Count; i++) {
+          if (i > 0) stringBuilder.Append("-");
+          stringBuilder.Append("(");
+          stringBuilder.Append(FormatRecursively(node.SubTrees[i]));
+          stringBuilder.Append(")");
+        }
+      } else if (symbol is Tangent) {
+        stringBuilder.Append(FormatRecursively(node.SubTrees[0]));
+        stringBuilder.Append("tan");
+      } else if (symbol is HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols.Variable) {
+        stringBuilder.Append("not yet implemented");
       }
-      return strBuilder.ToString();
+
+      else {
+        stringBuilder.Append("ERROR");
+      }
+
+      return stringBuilder.ToString();
     }
 
