Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/HeuristicLab.Algorithms.Bandits.csproj
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/HeuristicLab.Algorithms.Bandits.csproj	(revision 11847)
+++ branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/HeuristicLab.Algorithms.Bandits.csproj	(revision 11848)
@@ -33,7 +33,4 @@
     <Reference Include="ALGLIB-3.7.0">
       <HintPath>..\..\..\trunk\sources\bin\ALGLIB-3.7.0.dll</HintPath>
-    </Reference>
-    <Reference Include="HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3">
-      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.dll</HintPath>
     </Reference>
     <Reference Include="System" />
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/ExpressionInterpreter.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/ExpressionInterpreter.cs	(revision 11848)
+++ branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/ExpressionInterpreter.cs	(revision 11848)
@@ -0,0 +1,135 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Diagnostics.Eventing.Reader;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Runtime.Remoting.Messaging;
+using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Problems.GrammaticalOptimization {
+  public class ExpressionInterpreter {
+    private static readonly double[] emptyErc = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+    private string sentence;
+    private int syIdx;
+    // interprets sentences from L(G(Expr)):
+    // Expr -> Term { ('+' | '-' | '^' ) Term } 
+    // Term -> Fact { ('*' | '/') Fact }
+    // Fact -> '!' Expr | '(' Expr ')' | Var | const
+    // Var -> 'a'..'z'
+    // const -> '0' .. '9'
+
+    // constants are Koza-style ephemeral random constants (ERC). for now we only allow up to 10 constants.
+    // The constant symbols '0' .. '9' are treated as ERC indices
+
+    // for boolean problems the symbol * representes the AND operator, the symbol + represents the OR operator, ! = NOT, ^ = XOR
+
+    public bool Interpret(string sentence, bool[] vars) {
+      return Interpret(sentence, vars, emptyErc);
+    }
+
+    public bool Interpret(string sentence, bool[] vars, double[] erc) {
+      InitLex(sentence);
+      var d = new double[vars.Length];
+      for (int i = 0; i < vars.Length; i++) d[i] = vars[i] ? 1.0 : 0.0;
+      return ! DoubleExtensions.IsAlmost(Expr(d, erc), 0);
+    }
+
+    public double Interpret(string sentence, double[] vars) {
+      return Interpret(sentence, vars, emptyErc);
+    }
+
+    public double Interpret(string sentence, double[] vars, double[] erc) {
+      InitLex(sentence);
+      return Expr(vars, erc);
+    }
+
+
+    private void InitLex(string sentence) {
+      this.sentence = sentence;
+      this.syIdx = 0;
+    }
+
+    private char CurSy() {
+      if (syIdx >= sentence.Length) return '\0';
+      return sentence[syIdx];
+    }
+    private void NewSy() {
+      if (syIdx < sentence.Length) syIdx++;
+    }
+
+    // helper for xor
+    private double Not(double x) {
+      return DoubleExtensions.IsAlmost(x, 0) ? 1.0 : 0.0;
+    }
+
+    private double Expr(double[] d, double[] erc) {
+      var r = 0.0;
+      r = Term(d, erc);
+      var curSy = CurSy();
+      while (curSy == '+' || curSy == '-' || curSy == '^') {
+        if (curSy == '+') {
+          NewSy();
+          r += Expr(d, erc);
+        } else if (curSy == '-') {
+          NewSy();
+          r -= Expr(d, erc);
+        } else {
+          NewSy();
+          var e = Expr(d, erc);
+          r = Not(r) * e + r * Not(e); // xor = (!x AND y) OR (x AND !y)
+        }
+        curSy = CurSy();
+      }
+      return r;
+    }
+
+    private double Term(double[] d, double[] erc) {
+      var r = 0.0;
+      r = Fact(d, erc);
+      var curSy = CurSy();
+      while (curSy == '*' || curSy == '/') {
+        if (curSy == '*') {
+          NewSy();
+          r *= Term(d, erc);
+        } else {
+          NewSy();
+          r /= Term(d, erc);
+        }
+        curSy = CurSy();
+      }
+      return r;
+    }
+
+    private double Fact(double[] d, double[] erc) {
+      double r = 0.0;
+      var curSy = CurSy();
+      if (curSy == '!') {
+        NewSy();
+        r = Not(Expr(d, erc));
+      } else if (curSy == '(') {
+        NewSy();
+        r = Expr(d, erc);
+        if (CurSy() != ')') throw new ArgumentException();
+        NewSy();
+      } else if (curSy >= 'a' && curSy <= 'z') {
+        int o = (byte)curSy - (byte)'a';
+        //int o = Convert.ToByte(CurSy()) - Convert.ToByte('a');
+        if (o < 0 || o >= d.Length) throw new ArgumentException();
+        r = d[o];
+        NewSy();
+      } else /* if (curSy >= '0' && curSy <= '9') */ {
+        int o = (byte)curSy - (byte)'0';
+        //int o = Convert.ToByte(CurSy()) - Convert.ToByte('a');
+        if (o < 0 || o >= 10) throw new ArgumentException();
+        r = erc[o];
+        NewSy();
+      }
+      //} else throw new ArgumentException();
+      return r;
+    }
+
+  }
+}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization.csproj
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization.csproj	(revision 11847)
+++ branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization.csproj	(revision 11848)
@@ -78,12 +78,9 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="ISymbolicExpressionTreeProblem.cs" />
+    <Compile Include="ExpressionInterpreter.cs" />
     <Compile Include="Feature.cs" />
-    <Compile Include="Problems\GrammaticalOptimizationEvaluator.cs" />
-    <Compile Include="Problems\IGrammaticalOptimizationEvaluator.cs" />
-    <Compile Include="Problems\GenericSymbExprProblem.cs" />
-    <Compile Include="Problems\GenericSymbExprGrammar.cs" />
+    <Compile Include="Interfaces\IGrammar.cs" />
+    <Compile Include="Interfaces\IProblem.cs" />
     <Compile Include="Problems\EvenParityProblem.cs" />
-    <Compile Include="Problems\ExpressionInterpreter.cs" />
     <Compile Include="Problems\FindPhrasesProblem.cs" />
     <Compile Include="Problems\HardPalindromeProblem.cs" />
@@ -101,7 +98,10 @@
     <Compile Include="SentenceSetStatistics.cs" />
     <Compile Include="Sequence.cs" />
-    <Compile Include="IProblem.cs" />
-    <Compile Include="IGrammar.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="TreeRepresentation\GenericSymbExprGrammar.cs" />
+    <Compile Include="TreeRepresentation\GenericSymbExprProblem.cs" />
+    <Compile Include="TreeRepresentation\GrammaticalOptimizationEvaluator.cs" />
+    <Compile Include="TreeRepresentation\IGrammaticalOptimizationEvaluator.cs" />
+    <Compile Include="TreeRepresentation\ISymbolicExpressionTreeProblem.cs" />
   </ItemGroup>
   <ItemGroup>
@@ -111,7 +111,5 @@
     </ProjectReference>
   </ItemGroup>
-  <ItemGroup>
-    <Folder Include="TreeRepresentation\" />
-  </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/IGrammar.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/IGrammar.cs	(revision 11847)
+++ 	(revision )
@@ -1,28 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-
-namespace HeuristicLab.Problems.GrammaticalOptimization {
-
-  // symbols are characters, possible nonterminal symbols are : 'A'..'Z'
-  // phrases and sentences are strings
-  // each symbol is only on element in a string
-
-  public interface IGrammar {
-    char SentenceSymbol { get; }
-    IEnumerable<char> NonTerminalSymbols { get; }
-    IEnumerable<char> TerminalSymbols { get; }
-    IEnumerable<char> Symbols { get; }
-
-    IEnumerable<Sequence> GetAlternatives(char nt);
-    IEnumerable<Sequence> GetTerminalAlternatives(char nt);
-    IEnumerable<Sequence> GetNonTerminalAlternatives(char nt);
-
-    int MinPhraseLength(Sequence phrase);
-    int MaxPhraseLength(Sequence phrase);
-    Sequence CompleteSentenceRandomly(Random random, Sequence phrase, int maxLen);
-
-    bool IsTerminal(char symbol);
-    bool IsTerminal(string phrase);
-    bool IsNonTerminal(char symbol);
-  }
-}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/IProblem.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/IProblem.cs	(revision 11847)
+++ 	(revision )
@@ -1,16 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-
-namespace HeuristicLab.Problems.GrammaticalOptimization {
-  // represents a grammatical optimization problem
-  public interface IProblem {
-    double BestKnownQuality(int maxLen);
-    IGrammar Grammar { get; }
-    double Evaluate(string sentence);
-    string CanonicalRepresentation(string phrase); // canonical state must use correct syntax (must be a valid input for evaluate)
-    IEnumerable<Feature> GetFeatures(string phrase);
-  }
-}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/ISymbolicExpressionTreeProblem.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/ISymbolicExpressionTreeProblem.cs	(revision 11847)
+++ 	(revision )
@@ -1,14 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-
-namespace HeuristicLab.Problems.GrammaticalOptimization {
-  // represents a grammatical optimization problem that can also be used with tree-based GP in HeuristicLab
-  public interface ISymbolicExpressionTreeProblem : IProblem {
-    ISymbolicExpressionGrammar SymbolicExpressionGrammar { get; } // grammar for HL GP
-
-    string ConvertTreeToSentence(ISymbolicExpressionTree tree);
-  }
-}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Interfaces/IGrammar.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Interfaces/IGrammar.cs	(revision 11848)
+++ branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Interfaces/IGrammar.cs	(revision 11848)
@@ -0,0 +1,28 @@
+﻿using System;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.GrammaticalOptimization {
+
+  // symbols are characters, possible nonterminal symbols are : 'A'..'Z'
+  // phrases and sentences are strings
+  // each symbol is only on element in a string
+
+  public interface IGrammar {
+    char SentenceSymbol { get; }
+    IEnumerable<char> NonTerminalSymbols { get; }
+    IEnumerable<char> TerminalSymbols { get; }
+    IEnumerable<char> Symbols { get; }
+
+    IEnumerable<Sequence> GetAlternatives(char nt);
+    IEnumerable<Sequence> GetTerminalAlternatives(char nt);
+    IEnumerable<Sequence> GetNonTerminalAlternatives(char nt);
+
+    int MinPhraseLength(Sequence phrase);
+    int MaxPhraseLength(Sequence phrase);
+    Sequence CompleteSentenceRandomly(Random random, Sequence phrase, int maxLen);
+
+    bool IsTerminal(char symbol);
+    bool IsTerminal(string phrase);
+    bool IsNonTerminal(char symbol);
+  }
+}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Interfaces/IProblem.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Interfaces/IProblem.cs	(revision 11848)
+++ branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Interfaces/IProblem.cs	(revision 11848)
@@ -0,0 +1,16 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.GrammaticalOptimization {
+  // represents a grammatical optimization problem
+  public interface IProblem {
+    double BestKnownQuality(int maxLen);
+    IGrammar Grammar { get; }
+    double Evaluate(string sentence);
+    string CanonicalRepresentation(string phrase); // canonical state must use correct syntax (must be a valid input for evaluate)
+    IEnumerable<Feature> GetFeatures(string phrase);
+  }
+}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/ExpressionInterpreter.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/ExpressionInterpreter.cs	(revision 11847)
+++ 	(revision )
@@ -1,135 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Diagnostics.Eventing.Reader;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Runtime.Remoting.Messaging;
-using System.Text;
-using System.Threading.Tasks;
-using HeuristicLab.Common;
-
-namespace HeuristicLab.Problems.GrammaticalOptimization {
-  public class ExpressionInterpreter {
-    private static readonly double[] emptyErc = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-
-    private string sentence;
-    private int syIdx;
-    // interprets sentences from L(G(Expr)):
-    // Expr -> Term { ('+' | '-' | '^' ) Term } 
-    // Term -> Fact { ('*' | '/') Fact }
-    // Fact -> '!' Expr | '(' Expr ')' | Var | const
-    // Var -> 'a'..'z'
-    // const -> '0' .. '9'
-
-    // constants are Koza-style ephemeral random constants (ERC). for now we only allow up to 10 constants.
-    // The constant symbols '0' .. '9' are treated as ERC indices
-
-    // for boolean problems the symbol * representes the AND operator, the symbol + represents the OR operator, ! = NOT, ^ = XOR
-
-    public bool Interpret(string sentence, bool[] vars) {
-      return Interpret(sentence, vars, emptyErc);
-    }
-
-    public bool Interpret(string sentence, bool[] vars, double[] erc) {
-      InitLex(sentence);
-      var d = new double[vars.Length];
-      for (int i = 0; i < vars.Length; i++) d[i] = vars[i] ? 1.0 : 0.0;
-      return ! DoubleExtensions.IsAlmost(Expr(d, erc), 0);
-    }
-
-    public double Interpret(string sentence, double[] vars) {
-      return Interpret(sentence, vars, emptyErc);
-    }
-
-    public double Interpret(string sentence, double[] vars, double[] erc) {
-      InitLex(sentence);
-      return Expr(vars, erc);
-    }
-
-
-    private void InitLex(string sentence) {
-      this.sentence = sentence;
-      this.syIdx = 0;
-    }
-
-    private char CurSy() {
-      if (syIdx >= sentence.Length) return '\0';
-      return sentence[syIdx];
-    }
-    private void NewSy() {
-      if (syIdx < sentence.Length) syIdx++;
-    }
-
-    // helper for xor
-    private double Not(double x) {
-      return DoubleExtensions.IsAlmost(x, 0) ? 1.0 : 0.0;
-    }
-
-    private double Expr(double[] d, double[] erc) {
-      var r = 0.0;
-      r = Term(d, erc);
-      var curSy = CurSy();
-      while (curSy == '+' || curSy == '-' || curSy == '^') {
-        if (curSy == '+') {
-          NewSy();
-          r += Expr(d, erc);
-        } else if (curSy == '-') {
-          NewSy();
-          r -= Expr(d, erc);
-        } else {
-          NewSy();
-          var e = Expr(d, erc);
-          r = Not(r) * e + r * Not(e); // xor = (!x AND y) OR (x AND !y)
-        }
-        curSy = CurSy();
-      }
-      return r;
-    }
-
-    private double Term(double[] d, double[] erc) {
-      var r = 0.0;
-      r = Fact(d, erc);
-      var curSy = CurSy();
-      while (curSy == '*' || curSy == '/') {
-        if (curSy == '*') {
-          NewSy();
-          r *= Term(d, erc);
-        } else {
-          NewSy();
-          r /= Term(d, erc);
-        }
-        curSy = CurSy();
-      }
-      return r;
-    }
-
-    private double Fact(double[] d, double[] erc) {
-      double r = 0.0;
-      var curSy = CurSy();
-      if (curSy == '!') {
-        NewSy();
-        r = Not(Expr(d, erc));
-      } else if (curSy == '(') {
-        NewSy();
-        r = Expr(d, erc);
-        if (CurSy() != ')') throw new ArgumentException();
-        NewSy();
-      } else if (curSy >= 'a' && curSy <= 'z') {
-        int o = (byte)curSy - (byte)'a';
-        //int o = Convert.ToByte(CurSy()) - Convert.ToByte('a');
-        if (o < 0 || o >= d.Length) throw new ArgumentException();
-        r = d[o];
-        NewSy();
-      } else /* if (curSy >= '0' && curSy <= '9') */ {
-        int o = (byte)curSy - (byte)'0';
-        //int o = Convert.ToByte(CurSy()) - Convert.ToByte('a');
-        if (o < 0 || o >= 10) throw new ArgumentException();
-        r = erc[o];
-        NewSy();
-      }
-      //} else throw new ArgumentException();
-      return r;
-    }
-
-  }
-}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/GenericSymbExprGrammar.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/GenericSymbExprGrammar.cs	(revision 11847)
+++ 	(revision )
@@ -1,104 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-
-namespace HeuristicLab.Problems.GrammaticalOptimization {
-  [NonDiscoverableType]
-  [StorableClass]
-  [Item("GenericSymbExprGrammar", "Represents a general grammar for grammatical optimization problems.")]
-  public class GenericSymbExprGrammar : SymbolicExpressionGrammar {
-    [StorableClass]
-    [Item("GenericSymbol", "")]
-    public sealed class GenericSymbol : Symbol {
-      private readonly int minimumArity = 1;
-      private readonly int maximumArity = byte.MaxValue;
-
-      public override int MinimumArity { get { return minimumArity; } }
-      public override int MaximumArity { get { return maximumArity; } }
-
-      [StorableConstructor]
-      private GenericSymbol(bool deserializing) : base(deserializing) { }
-      private GenericSymbol(GenericSymbol original, Cloner cloner) : base(original, cloner) { }
-      public override IDeepCloneable Clone(Cloner cloner) {
-        return new GenericSymbol(this, cloner);
-      }
-      public GenericSymbol(char s, int minArity, int maxArity)
-        : base(s.ToString(), string.Empty) {
-        this.minimumArity = minArity;
-        this.maximumArity = maxArity;
-      }
-    }
-
-    [StorableConstructor]
-    public GenericSymbExprGrammar(bool deserializing) : base(deserializing) { }
-
-    public GenericSymbExprGrammar(SymbolicExpressionGrammar original, Cloner cloner) : base(original, cloner) { }
-
-    public GenericSymbExprGrammar(IGrammar grammar)
-      : base(ItemAttribute.GetName(typeof(GenericSymbExprGrammar)), ItemAttribute.GetDescription(typeof(GenericSymbExprGrammar))) {
-
-      var ntSymbs = new List<GenericSymbol>();
-      var tSymbs = new List<GenericSymbol>();
-      // for terminal and nonterminal symbol in the grammar create a symbol class
-      // for non-terminals set the arity and the allowed children
-      // for terminals set arity to 0 and allowed children to empty
-      foreach (var nt in grammar.NonTerminalSymbols) {
-        var ntSymb = CreateSymbol(grammar, nt);
-        AddSymbol(ntSymb);
-        SetSubtreeCount(ntSymb, ntSymb.MinimumArity, ntSymb.MaximumArity);
-        ntSymbs.Add(ntSymb);
-      }
-      foreach (var t in grammar.TerminalSymbols) {
-        var tSymb = new GenericSymbol(t, 0, 0);
-        AddSymbol(tSymb);
-        SetSubtreeCount(tSymb, 0, 0);
-        tSymbs.Add(tSymb);
-      }
-
-      Func<char, GenericSymbol> findSymb = (char s) => {
-        var selectedSymb = ntSymbs.SingleOrDefault(symb => symb.Name == s.ToString());
-        if (selectedSymb != null) return selectedSymb;
-        return tSymbs.SingleOrDefault(symb => symb.Name == s.ToString());
-      };
-
-      // set the sentence symbol as the allowed start symbol
-      AddAllowedChildSymbol(StartSymbol, findSymb(grammar.SentenceSymbol));
-
-      foreach (var nt in ntSymbs) {
-        // either all alts are only a single symbol 
-        // or all alts only use a single symbol (see assertion in CreateSymbol)
-        var alts = grammar.GetAlternatives(nt.Name[0]); // all symbols only have a single character name
-        Debug.Assert(alts.All(alt => alt.Length == 1 || alt.Distinct().Count() == 1));
-
-        foreach (var alt in alts) {
-          Debug.Assert(alt.All(ch => ch == alt[0]));
-          AddAllowedChildSymbol(nt, findSymb(alt.First()));
-        }
-      }
-    }
-
-    private GenericSymbol CreateSymbol(IGrammar g, char s) {
-
-      var minArity = g.GetAlternatives(s).Select(alt => alt.Length).Min();
-      var maxArity = g.GetAlternatives(s).Select(alt => alt.Length).Max();
-      // either the min and max arity is 1 or the alternatives all use the same symbol (hl doesn't know about dependencies between positions in the alternative
-      Debug.Assert(
-        (minArity == 1 && maxArity == 1) ||
-        g.GetAlternatives(s).Select(alt => alt.Distinct()).All(alt => alt.Count() == 1));
-      var symb = new GenericSymbol(s, minArity, maxArity);
-      return symb;
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new GenericSymbExprGrammar(this, cloner);
-    }
-  }
-}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/GenericSymbExprProblem.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/GenericSymbExprProblem.cs	(revision 11847)
+++ 	(revision )
@@ -1,79 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-
-namespace HeuristicLab.Problems.GrammaticalOptimization {
-  [NonDiscoverableType]
-  [StorableClass]
-  [Item("GenericSymbExprProblem", "Represents grammatical optimization problems (using a symbolic expression tree encoding).")]
-  public class GenericSymbExprProblem : SingleObjectiveHeuristicOptimizationProblem<IGrammaticalOptimizationEvaluator, ISymbolicExpressionTreeCreator> {
-    #region string consts
-    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
-    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
-    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
-
-    #endregion
-
-    #region parameter properties
-    public IValueParameter<ISymbolicExpressionTreeGrammar> SymbolicExpressionTreeGrammarParameter {
-      get { return (IValueParameter<ISymbolicExpressionTreeGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
-    }
-    public IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
-      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
-    }
-    public IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
-      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
-    }
-    #endregion
-
-
-    #region properties
-
-    public ISymbolicExpressionTreeGrammar SymbolicExpressionTreeGrammar {
-      get { return SymbolicExpressionTreeGrammarParameter.Value; }
-      set { SymbolicExpressionTreeGrammarParameter.Value = value; }
-    }
-    public IntValue MaximumSymbolicExpressionTreeDepth {
-      get { return MaximumSymbolicExpressionTreeDepthParameter.Value; }
-    }
-    public IntValue MaximumSymbolicExpressionTreeLength {
-      get { return MaximumSymbolicExpressionTreeLengthParameter.Value; }
-    }
-    public new GrammaticalOptimizationEvaluator Evaluator {
-      get { return (GrammaticalOptimizationEvaluator)base.Evaluator; }
-    }
-
-    #endregion
-    [StorableConstructor]
-    public GenericSymbExprProblem(bool deserializing) : base(deserializing) { }
-
-    public GenericSymbExprProblem(GenericSymbExprProblem original, Cloner cloner) : base(original, cloner) { }
-
-    public GenericSymbExprProblem(ISymbolicExpressionTreeProblem problem)
-      : base(new GrammaticalOptimizationEvaluator(problem.ConvertTreeToSentence, problem.Evaluate), new ProbabilisticTreeCreator()) {
-      Parameters.Add(new ValueParameter<ISymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName, problem.SymbolicExpressionGrammar));
-      Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, new IntValue(50)));
-      Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, new IntValue(15)));
-
-      Maximization = new BoolValue(true);
-      BestKnownQuality = new DoubleValue(1.0);
-
-      Operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>());
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new GenericSymbExprProblem(this, cloner);
-    }
-  }
-}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/GrammaticalOptimizationEvaluator.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/GrammaticalOptimizationEvaluator.cs	(revision 11847)
+++ 	(revision )
@@ -1,60 +1,0 @@
-﻿using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Operators;
-using HeuristicLab.Parameters;
-using HeuristicLab.PluginInfrastructure;
-
-namespace HeuristicLab.Problems.GrammaticalOptimization {
-  // this type is not storable because we use a func<ITree,double> for evaluation, which references back to the original grammatical optimization problem
-  [NonDiscoverableType]
-  [Item("GrammaticalOptimizationEvaluator", "Evaluator for grammatical optimization problems (using a symbolic expression tree encoding).")]
-  public class GrammaticalOptimizationEvaluator : SingleSuccessorOperator, IGrammaticalOptimizationEvaluator {
-    public event Action<string, double> SolutionEvaluated;
-
-    public ILookupParameter<DoubleValue> QualityParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
-    }
-    public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
-      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters["SymbolicExpressionTree"]; }
-    }
-
-    private Func<string, double> evalFunc;
-    private Func<ISymbolicExpressionTree, string> toStringFunc;
-
-    public GrammaticalOptimizationEvaluator(GrammaticalOptimizationEvaluator original, Cloner cloner)
-      : base(original, cloner) {
-      this.evalFunc = original.evalFunc;
-    }
-
-    public GrammaticalOptimizationEvaluator(Func<ISymbolicExpressionTree, string> toStringFunc, Func<string, double> evalFunc)
-      : base() {
-      Parameters.Add(new LookupParameter<DoubleValue>("Quality"));
-      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>("SymbolicExpressionTree"));
-      this.evalFunc = evalFunc;
-      this.toStringFunc = toStringFunc;
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new GrammaticalOptimizationEvaluator(this, cloner);
-    }
-
-    public override IOperation Apply() {
-      var tree = SymbolicExpressionTreeParameter.ActualValue;
-      var sentence = toStringFunc(tree);
-      var q = evalFunc(sentence);
-      QualityParameter.ActualValue = new DoubleValue(q);
-
-      RaiseSolutionEvaluated(sentence, q);
-
-      return base.Apply();
-    }
-
-    private void RaiseSolutionEvaluated(string sentence, double quality) {
-      var handler = SolutionEvaluated;
-      if (handler != null) handler(sentence, quality);
-    }
-  }
-}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/IGrammaticalOptimizationEvaluator.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/IGrammaticalOptimizationEvaluator.cs	(revision 11847)
+++ 	(revision )
@@ -1,18 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-
-namespace HeuristicLab.Problems.GrammaticalOptimization {
-  public interface IGrammaticalOptimizationEvaluator : ISingleObjectiveEvaluator, ISymbolicExpressionTreeOperator {
-    ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter { get; } 
-  }
-}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/GenericSymbExprGrammar.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/GenericSymbExprGrammar.cs	(revision 11848)
+++ branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/GenericSymbExprGrammar.cs	(revision 11848)
@@ -0,0 +1,104 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.GrammaticalOptimization {
+  [NonDiscoverableType]
+  [StorableClass]
+  [Item("GenericSymbExprGrammar", "Represents a general grammar for grammatical optimization problems.")]
+  public class GenericSymbExprGrammar : SymbolicExpressionGrammar {
+    [StorableClass]
+    [Item("GenericSymbol", "")]
+    public sealed class GenericSymbol : Symbol {
+      private readonly int minimumArity = 1;
+      private readonly int maximumArity = byte.MaxValue;
+
+      public override int MinimumArity { get { return minimumArity; } }
+      public override int MaximumArity { get { return maximumArity; } }
+
+      [StorableConstructor]
+      private GenericSymbol(bool deserializing) : base(deserializing) { }
+      private GenericSymbol(GenericSymbol original, Cloner cloner) : base(original, cloner) { }
+      public override IDeepCloneable Clone(Cloner cloner) {
+        return new GenericSymbol(this, cloner);
+      }
+      public GenericSymbol(char s, int minArity, int maxArity)
+        : base(s.ToString(), string.Empty) {
+        this.minimumArity = minArity;
+        this.maximumArity = maxArity;
+      }
+    }
+
+    [StorableConstructor]
+    public GenericSymbExprGrammar(bool deserializing) : base(deserializing) { }
+
+    public GenericSymbExprGrammar(SymbolicExpressionGrammar original, Cloner cloner) : base(original, cloner) { }
+
+    public GenericSymbExprGrammar(IGrammar grammar)
+      : base(ItemAttribute.GetName(typeof(GenericSymbExprGrammar)), ItemAttribute.GetDescription(typeof(GenericSymbExprGrammar))) {
+
+      var ntSymbs = new List<GenericSymbol>();
+      var tSymbs = new List<GenericSymbol>();
+      // for terminal and nonterminal symbol in the grammar create a symbol class
+      // for non-terminals set the arity and the allowed children
+      // for terminals set arity to 0 and allowed children to empty
+      foreach (var nt in grammar.NonTerminalSymbols) {
+        var ntSymb = CreateSymbol(grammar, nt);
+        AddSymbol(ntSymb);
+        SetSubtreeCount(ntSymb, ntSymb.MinimumArity, ntSymb.MaximumArity);
+        ntSymbs.Add(ntSymb);
+      }
+      foreach (var t in grammar.TerminalSymbols) {
+        var tSymb = new GenericSymbol(t, 0, 0);
+        AddSymbol(tSymb);
+        SetSubtreeCount(tSymb, 0, 0);
+        tSymbs.Add(tSymb);
+      }
+
+      Func<char, GenericSymbol> findSymb = (char s) => {
+        var selectedSymb = ntSymbs.SingleOrDefault(symb => symb.Name == s.ToString());
+        if (selectedSymb != null) return selectedSymb;
+        return tSymbs.SingleOrDefault(symb => symb.Name == s.ToString());
+      };
+
+      // set the sentence symbol as the allowed start symbol
+      AddAllowedChildSymbol(StartSymbol, findSymb(grammar.SentenceSymbol));
+
+      foreach (var nt in ntSymbs) {
+        // either all alts are only a single symbol 
+        // or all alts only use a single symbol (see assertion in CreateSymbol)
+        var alts = grammar.GetAlternatives(nt.Name[0]); // all symbols only have a single character name
+        Debug.Assert(alts.All(alt => alt.Length == 1 || alt.Distinct().Count() == 1));
+
+        foreach (var alt in alts) {
+          Debug.Assert(alt.All(ch => ch == alt[0]));
+          AddAllowedChildSymbol(nt, findSymb(alt.First()));
+        }
+      }
+    }
+
+    private GenericSymbol CreateSymbol(IGrammar g, char s) {
+
+      var minArity = g.GetAlternatives(s).Select(alt => alt.Length).Min();
+      var maxArity = g.GetAlternatives(s).Select(alt => alt.Length).Max();
+      // either the min and max arity is 1 or the alternatives all use the same symbol (hl doesn't know about dependencies between positions in the alternative
+      Debug.Assert(
+        (minArity == 1 && maxArity == 1) ||
+        g.GetAlternatives(s).Select(alt => alt.Distinct()).All(alt => alt.Count() == 1));
+      var symb = new GenericSymbol(s, minArity, maxArity);
+      return symb;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GenericSymbExprGrammar(this, cloner);
+    }
+  }
+}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/GenericSymbExprProblem.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/GenericSymbExprProblem.cs	(revision 11848)
+++ branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/GenericSymbExprProblem.cs	(revision 11848)
@@ -0,0 +1,79 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.GrammaticalOptimization {
+  [NonDiscoverableType]
+  [StorableClass]
+  [Item("GenericSymbExprProblem", "Represents grammatical optimization problems (using a symbolic expression tree encoding).")]
+  public class GenericSymbExprProblem : SingleObjectiveHeuristicOptimizationProblem<IGrammaticalOptimizationEvaluator, ISymbolicExpressionTreeCreator> {
+    #region string consts
+    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+
+    #endregion
+
+    #region parameter properties
+    public IValueParameter<ISymbolicExpressionTreeGrammar> SymbolicExpressionTreeGrammarParameter {
+      get { return (IValueParameter<ISymbolicExpressionTreeGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    #endregion
+
+
+    #region properties
+
+    public ISymbolicExpressionTreeGrammar SymbolicExpressionTreeGrammar {
+      get { return SymbolicExpressionTreeGrammarParameter.Value; }
+      set { SymbolicExpressionTreeGrammarParameter.Value = value; }
+    }
+    public IntValue MaximumSymbolicExpressionTreeDepth {
+      get { return MaximumSymbolicExpressionTreeDepthParameter.Value; }
+    }
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.Value; }
+    }
+    public new GrammaticalOptimizationEvaluator Evaluator {
+      get { return (GrammaticalOptimizationEvaluator)base.Evaluator; }
+    }
+
+    #endregion
+    [StorableConstructor]
+    public GenericSymbExprProblem(bool deserializing) : base(deserializing) { }
+
+    public GenericSymbExprProblem(GenericSymbExprProblem original, Cloner cloner) : base(original, cloner) { }
+
+    public GenericSymbExprProblem(ISymbolicExpressionTreeProblem problem)
+      : base(new GrammaticalOptimizationEvaluator(problem.ConvertTreeToSentence, problem.Evaluate), new ProbabilisticTreeCreator()) {
+      Parameters.Add(new ValueParameter<ISymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName, problem.SymbolicExpressionGrammar));
+      Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, new IntValue(50)));
+      Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, new IntValue(15)));
+
+      Maximization = new BoolValue(true);
+      BestKnownQuality = new DoubleValue(1.0);
+
+      Operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>());
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GenericSymbExprProblem(this, cloner);
+    }
+  }
+}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/GrammaticalOptimizationEvaluator.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/GrammaticalOptimizationEvaluator.cs	(revision 11848)
+++ branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/GrammaticalOptimizationEvaluator.cs	(revision 11848)
@@ -0,0 +1,60 @@
+﻿using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.GrammaticalOptimization {
+  // this type is not storable because we use a func<ITree,double> for evaluation, which references back to the original grammatical optimization problem
+  [NonDiscoverableType]
+  [Item("GrammaticalOptimizationEvaluator", "Evaluator for grammatical optimization problems (using a symbolic expression tree encoding).")]
+  public class GrammaticalOptimizationEvaluator : SingleSuccessorOperator, IGrammaticalOptimizationEvaluator {
+    public event Action<string, double> SolutionEvaluated;
+
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters["SymbolicExpressionTree"]; }
+    }
+
+    private Func<string, double> evalFunc;
+    private Func<ISymbolicExpressionTree, string> toStringFunc;
+
+    public GrammaticalOptimizationEvaluator(GrammaticalOptimizationEvaluator original, Cloner cloner)
+      : base(original, cloner) {
+      this.evalFunc = original.evalFunc;
+    }
+
+    public GrammaticalOptimizationEvaluator(Func<ISymbolicExpressionTree, string> toStringFunc, Func<string, double> evalFunc)
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality"));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>("SymbolicExpressionTree"));
+      this.evalFunc = evalFunc;
+      this.toStringFunc = toStringFunc;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GrammaticalOptimizationEvaluator(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      var tree = SymbolicExpressionTreeParameter.ActualValue;
+      var sentence = toStringFunc(tree);
+      var q = evalFunc(sentence);
+      QualityParameter.ActualValue = new DoubleValue(q);
+
+      RaiseSolutionEvaluated(sentence, q);
+
+      return base.Apply();
+    }
+
+    private void RaiseSolutionEvaluated(string sentence, double quality) {
+      var handler = SolutionEvaluated;
+      if (handler != null) handler(sentence, quality);
+    }
+  }
+}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/IGrammaticalOptimizationEvaluator.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/IGrammaticalOptimizationEvaluator.cs	(revision 11848)
+++ branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/IGrammaticalOptimizationEvaluator.cs	(revision 11848)
@@ -0,0 +1,18 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.GrammaticalOptimization {
+  public interface IGrammaticalOptimizationEvaluator : ISingleObjectiveEvaluator, ISymbolicExpressionTreeOperator {
+    ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter { get; } 
+  }
+}
Index: branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/ISymbolicExpressionTreeProblem.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/ISymbolicExpressionTreeProblem.cs	(revision 11848)
+++ branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/TreeRepresentation/ISymbolicExpressionTreeProblem.cs	(revision 11848)
@@ -0,0 +1,14 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.GrammaticalOptimization {
+  // represents a grammatical optimization problem that can also be used with tree-based GP in HeuristicLab
+  public interface ISymbolicExpressionTreeProblem : IProblem {
+    ISymbolicExpressionGrammar SymbolicExpressionGrammar { get; } // grammar for HL GP
+
+    string ConvertTreeToSentence(ISymbolicExpressionTree tree);
+  }
+}
