Index: branches/SymbolicExpressionTreeEncoding/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeEncoding.cs
===================================================================
--- branches/SymbolicExpressionTreeEncoding/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeEncoding.cs	(revision 12314)
+++ branches/SymbolicExpressionTreeEncoding/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeEncoding.cs	(revision 12316)
@@ -29,4 +29,5 @@
 using HeuristicLab.Data;
 using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.PluginInfrastructure;
@@ -72,4 +73,86 @@
       }
     }
+
+    [Storable]
+    private IValueParameter<ISymbolicExpressionGrammar> grammarParameter;
+    public IValueParameter<ISymbolicExpressionGrammar> GrammarParameter {
+      get { return grammarParameter; }
+      set {
+        if (value == null) throw new ArgumentNullException("Grammar parameter must not be null.");
+        if (value.Value == null) throw new ArgumentNullException("Grammar parameter value must not be null.");
+        if (grammarParameter == value) return;
+
+        if (grammarParameter != null)
+          Parameters.Remove(grammarParameter);
+
+        grammarParameter = value;
+        Parameters.Add(grammarParameter);
+        OnGrammarParameterChanged();
+      }
+    }
+
+
+    [Storable]
+    private IFixedValueParameter<IntValue> functionDefinitionsParameter;
+    public IFixedValueParameter<IntValue> FunctionDefinitionsParameter {
+      get { return functionDefinitionsParameter; }
+      set {
+        if (value == null) throw new ArgumentNullException("Function definitions parameter must not be null.");
+        if (value.Value == null) throw new ArgumentNullException("Function definitions parameter value must not be null.");
+        if (functionDefinitionsParameter == value) return;
+
+        if (functionDefinitionsParameter != null)
+          Parameters.Remove(functionDefinitionsParameter);
+
+        functionDefinitionsParameter = value;
+        Parameters.Add(functionDefinitionsParameter);
+        OnFunctionDefinitionsParameterChanged();
+      }
+    }
+
+    [Storable]
+    private IFixedValueParameter<IntValue> functionArgumentsParameter;
+    public IFixedValueParameter<IntValue> FunctionArgumentsParameter {
+      get { return functionArgumentsParameter; }
+      set {
+        if (value == null) throw new ArgumentNullException("Function arguments parameter must not be null.");
+        if (value.Value == null) throw new ArgumentNullException("Function arguments parameter value must not be null.");
+        if (functionArgumentsParameter == value) return;
+
+        if (functionArgumentsParameter != null)
+          Parameters.Remove(functionArgumentsParameter);
+
+        functionArgumentsParameter = value;
+        Parameters.Add(functionArgumentsParameter);
+        OnFunctionArgumentsParameterChanged();
+      }
+    }
+    #endregion
+
+    #region Parameter properties
+    public int TreeLength {
+      get { return TreeLengthParameter.Value.Value; }
+      set { TreeLengthParameter.Value.Value = value; }
+    }
+
+    public int TreeDepth {
+      get { return TreeDepthParameter.Value.Value; }
+      set { TreeDepthParameter.Value.Value = value; }
+    }
+
+    public ISymbolicExpressionGrammar Grammar {
+      get { return GrammarParameter.Value; }
+      set { GrammarParameter.Value = value; }
+    }
+
+    public int FunctionDefinitions {
+      get { return FunctionDefinitionsParameter.Value.Value; }
+      set { FunctionDefinitionsParameter.Value.Value = value; }
+    }
+
+    public int FunctionArguments {
+      get { return FunctionArgumentsParameter.Value.Value; }
+      set { FunctionArgumentsParameter.Value.Value = value; }
+    }
     #endregion
 
@@ -78,5 +161,25 @@
     public SymbolicExpressionTreeEncoding(bool deserializing) : base(deserializing) { }
     public SymbolicExpressionTreeEncoding() : this("SymbolicExpressionTree") { }
-    public SymbolicExpressionTreeEncoding(string name) : base(name) { }
+
+    public SymbolicExpressionTreeEncoding(string name)
+      : base(name) {
+      treeLengthParameter = new FixedValueParameter<IntValue>("Maximium Tree Length", "Maximal length of the symbolic expression.", new IntValue(50));
+      treeDepthParameter = new FixedValueParameter<IntValue>("Maximum Tree Depth", "Maximal depth of the symbolic expression. The minimum depth needed for the algorithm is 3 because two levels are reserved for the ProgramRoot and the Start symbol.", new IntValue(50));
+      grammarParameter = new ValueParameter<ISymbolicExpressionGrammar>("Grammar", "The grammar that should be used for symbolic expression tree.");
+      functionDefinitionsParameter = new FixedValueParameter<IntValue>("Function Definitions", "Maximal number of automatically defined functions", new IntValue(0));
+      functionArgumentsParameter = new FixedValueParameter<IntValue>("Function Arguments", "Maximal number of arguments of automatically defined functions.", new IntValue(0));
+
+      //TODO set default grammar
+
+      Parameters.Add(treeLengthParameter);
+      Parameters.Add(treeDepthParameter);
+      Parameters.Add(grammarParameter);
+      Parameters.Add(functionDefinitionsParameter);
+      Parameters.Add(functionArgumentsParameter);
+
+      SolutionCreator = new ProbabilisticTreeCreator();
+      RegisterParameterEvents();
+      DiscoverOperators();
+    }
 
     private SymbolicExpressionTreeEncoding(SymbolicExpressionTreeEncoding original, Cloner cloner)
@@ -84,4 +187,8 @@
       TreeLengthParameter = cloner.Clone(original.TreeLengthParameter);
       TreeDepthParameter = cloner.Clone(original.TreeDepthParameter);
+      GrammarParameter = cloner.Clone(original.GrammarParameter);
+      FunctionDefinitionsParameter = cloner.Clone(original.FunctionDefinitionsParameter);
+      FunctionArgumentsParameter = cloner.Clone(original.FunctionArgumentsParameter);
+      RegisterParameterEvents();
     }
 
@@ -90,30 +197,56 @@
     }
 
-
-
+    #region changed events
     private void OnLengthParameterChanged() {
       RegisterLengthParameterEvents();
       ConfigureOperators(Operators);
     }
-
     private void OnDepthParameterChanged() {
       RegisterDepthParameterEvents();
       ConfigureOperators(Operators);
     }
-
-    private void RegisterEvents() {
+    private void OnGrammarParameterChanged() {
+      RegisterGrammarParameterEvents();
+      ConfigureOperators(Operators);
+    }
+
+    private void OnFunctionDefinitionsParameterChanged() {
+      RegisterFunctionDefinitionsParameterEvents();
+      Grammar.MaximumFunctionDefinitions = FunctionDefinitions;
+    }
+
+    private void OnFunctionArgumentsParameterChanged() {
+      RegisterFunctionArgumentsParameterEvetns();
+      Grammar.MaximumFunctionArguments = FunctionArguments;
+    }
+
+    private void RegisterParameterEvents() {
       RegisterLengthParameterEvents();
       RegisterLengthParameterEvents();
-    }
+      RegisterGrammarParameterEvents();
+      RegisterFunctionDefinitionsParameterEvents();
+      RegisterFunctionArgumentsParameterEvetns();
+    }
+
 
     private void RegisterLengthParameterEvents() {
-      TreeLengthParameter.ValueChanged += (o, s) => ConfigureOperators(Operators);
       TreeLengthParameter.Value.ValueChanged += (o, s) => ConfigureOperators(Operators);
     }
 
     private void RegisterDepthParameterEvents() {
-      TreeDepthParameter.ValueChanged += (o, s) => ConfigureOperators(Operators);
       TreeDepthParameter.Value.ValueChanged += (o, s) => ConfigureOperators(Operators);
     }
+    private void RegisterGrammarParameterEvents() {
+      GrammarParameter.ValueChanged += (o, s) => ConfigureOperators(Operators);
+      GrammarParameter.Value.Changed += (o, s) => ConfigureOperators(Operators);
+    }
+
+    private void RegisterFunctionDefinitionsParameterEvents() {
+      FunctionDefinitionsParameter.Value.ValueChanged += (o, s) => Grammar.MaximumFunctionDefinitions = FunctionDefinitions;
+    }
+    private void RegisterFunctionArgumentsParameterEvetns() {
+      FunctionArgumentsParameter.Value.ValueChanged += (o, s) => Grammar.MaximumFunctionArguments = FunctionArguments;
+    }
+    #endregion
 
     #region Operator discovery
@@ -125,5 +258,7 @@
         typeof(ISymbolicExpressionTreeCreator),
         typeof(ISymbolicExpressionTreeCrossover),
-        typeof(ISymbolicExpressionTreeManipulator)
+        typeof(ISymbolicExpressionTreeManipulator),
+        typeof(ISymbolicExpressionTreeArchitectureAlteringOperator),
+        typeof(ISymbolicExpressionTreeAnalyzer),
       };
     }
@@ -144,4 +279,10 @@
 
     public override void ConfigureOperators(IEnumerable<IOperator> operators) {
+      ConfigureTreeOperators(operators.OfType<ISymbolicExpressionTreeOperator>());
+      ConfigureSizeConstraintOperators(operators.OfType<ISymbolicExpressionTreeSizeConstraintOperator>());
+      ConfigureGrammarBaseOperators(operators.OfType<ISymbolicExpressionTreeGrammarBasedOperator>());
+      ConfigureArchitectureAlteringOperators(operators.OfType<ISymbolicExpressionTreeArchitectureAlteringOperator>());
+
+      ConfigureAnalyzers(operators.OfType<ISymbolicExpressionTreeAnalyzer>());
       ConfigureCreators(operators.OfType<ISymbolicExpressionTreeCreator>());
       ConfigureCrossovers(operators.OfType<ISymbolicExpressionTreeCrossover>());
@@ -149,9 +290,41 @@
     }
 
+    private void ConfigureTreeOperators(IEnumerable<ISymbolicExpressionTreeOperator> treeOperators) {
+      foreach (var treeOperator in treeOperators) {
+        treeOperator.SymbolicExpressionTreeParameter.ActualName = Name;
+        treeOperator.SymbolicExpressionTreeParameter.Hidden = true;
+      }
+    }
+
+    private void ConfigureSizeConstraintOperators(IEnumerable<ISymbolicExpressionTreeSizeConstraintOperator> sizeConstraintOperators) {
+      foreach (var sizeConstraintOperator in sizeConstraintOperators) {
+        sizeConstraintOperator.MaximumSymbolicExpressionTreeLengthParameter.ActualName = TreeLengthParameter.Name;
+        sizeConstraintOperator.MaximumSymbolicExpressionTreeDepthParameter.ActualName = TreeDepthParameter.Name;
+      }
+    }
+
+    private void ConfigureGrammarBaseOperators(IEnumerable<ISymbolicExpressionTreeGrammarBasedOperator> grammarBasedOperators) {
+      foreach (var grammarBasedOperator in grammarBasedOperators) {
+        grammarBasedOperator.SymbolicExpressionTreeGrammarParameter.ActualName = GrammarParameter.Name;
+      }
+    }
+
+    private void ConfigureArchitectureAlteringOperators(IEnumerable<ISymbolicExpressionTreeArchitectureAlteringOperator> architectureAlteringOperators) {
+      foreach (var architectureAlteringOperator in architectureAlteringOperators) {
+        architectureAlteringOperator.MaximumFunctionDefinitionsParameter.ActualName = FunctionDefinitionsParameter.Name;
+        architectureAlteringOperator.MaximumFunctionArgumentsParameter.ActualName = FunctionArgumentsParameter.Name;
+      }
+
+    }
+
+    private void ConfigureAnalyzers(IEnumerable<ISymbolicExpressionTreeAnalyzer> analyzers) {
+      foreach (var analyzer in analyzers) {
+        analyzer.SymbolicExpressionTreeParameter.ActualName = Name;
+      }
+    }
+
     private void ConfigureCreators(IEnumerable<ISymbolicExpressionTreeCreator> creators) {
-      foreach (var creator in creators) {
-        creator.SymbolicExpressionTreeParameter.ActualName = Name;
-        // creator should have depth and length parameters?
-      }
+      //Empty interface
+      foreach (var creator in creators) { }
     }
 
@@ -159,13 +332,10 @@
       foreach (var crossover in crossovers) {
         crossover.ParentsParameter.ActualName = Name;
-        crossover.SymbolicExpressionTreeParameter.ActualName = Name;
       }
     }
 
     private void ConfigureManipulators(IEnumerable<ISymbolicExpressionTreeManipulator> manipulators) {
-      foreach (var manipulator in manipulators) {
-        manipulator.SymbolicExpressionTreeParameter.ActualName = Name;
-        manipulator.SymbolicExpressionTreeParameter.Hidden = true;
-      }
+      //Empty interface
+      foreach (var manipulator in manipulators) { }
     }
     #endregion
