Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs	(revision 2222)
@@ -32,5 +32,4 @@
 using System.Linq;
 using HeuristicLab.CEDMA.Core;
-using HeuristicLab.GP.StructureIdentification;
 using HeuristicLab.Data;
 using HeuristicLab.Core;
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs	(revision 2222)
@@ -32,5 +32,4 @@
 using System.Linq;
 using HeuristicLab.CEDMA.Core;
-using HeuristicLab.GP.StructureIdentification;
 using HeuristicLab.Data;
 using HeuristicLab.Grid;
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs	(revision 2222)
@@ -32,5 +32,4 @@
 using System.Linq;
 using HeuristicLab.CEDMA.Core;
-using HeuristicLab.GP.StructureIdentification;
 using HeuristicLab.Data;
 using HeuristicLab.Grid;
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/IDispatcher.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/IDispatcher.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/IDispatcher.cs	(revision 2222)
@@ -20,18 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows.Forms;
-using HeuristicLab.PluginInfrastructure;
-using System.Net;
-using System.ServiceModel;
-using HeuristicLab.CEDMA.DB.Interfaces;
-using HeuristicLab.CEDMA.DB;
-using System.ServiceModel.Description;
-using System.Linq;
-using HeuristicLab.CEDMA.Core;
-using HeuristicLab.GP.StructureIdentification;
-using HeuristicLab.Data;
 using HeuristicLab.Core;
 using HeuristicLab.Modeling;
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/IExecuter.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/IExecuter.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/IExecuter.cs	(revision 2222)
@@ -20,18 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows.Forms;
-using HeuristicLab.PluginInfrastructure;
-using System.Net;
-using System.ServiceModel;
-using HeuristicLab.CEDMA.DB.Interfaces;
-using HeuristicLab.CEDMA.DB;
-using System.ServiceModel.Description;
-using System.Linq;
-using HeuristicLab.CEDMA.Core;
-using HeuristicLab.GP.StructureIdentification;
-using HeuristicLab.Data;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs	(revision 2222)
@@ -32,5 +32,4 @@
 using System.Linq;
 using HeuristicLab.CEDMA.Core;
-using HeuristicLab.GP.StructureIdentification;
 using HeuristicLab.Data;
 using HeuristicLab.Core;
Index: unk/sources/HeuristicLab.Constraints/3.2/AllSubOperatorsTypeConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/3.2/AllSubOperatorsTypeConstraint.cs	(revision 2221)
+++ 	(revision )
@@ -1,162 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using System.Xml;
-using System.Diagnostics;
-
-namespace HeuristicLab.Constraints {
-  /// <summary>
-  /// Constraint where all sub-operators have to be elements of a pre-defined group.
-  /// </summary>
-  public class AllSubOperatorsTypeConstraint : ConstraintBase {
-
-    private SubOperatorTypeConstraint groupConstraint;
-    /// <summary>
-    /// Gets all allowed sub-operators.
-    /// </summary>
-    public IList<IOperator> AllowedSubOperators {
-      get {
-        return groupConstraint.AllowedSubOperators;
-      }
-    }
-
-    /// <inheritdoc select="summary"/>
-    public override string Description {
-      get { return "All sub-operators have to be elements of a pre-defined group."; }
-    }
-
-    /// <summary>
-    /// Initializes a new instance of <see cref="AllSubOperatorsTypeConstraint"/>.
-    /// </summary>
-    public AllSubOperatorsTypeConstraint()
-      : base() {
-      groupConstraint = new SubOperatorTypeConstraint();
-    }
-
-    /// <summary>
-    /// Adds the given operator to the constraint.
-    /// </summary>
-    /// <remarks>Calls <see cref="ItemBase.FireChanged"/> of base class 
-    /// <see cref="ConstraintBase"/>.</remarks>
-    /// <param name="op">The operator to add.</param>
-    public void AddOperator(IOperator op) {
-      groupConstraint.AddOperator(op);
-      FireChanged();
-    }
-
-    /// <summary>
-    /// Removes the given operator from the contraint.
-    /// </summary>
-    /// <remarks>Calls <see cref="ItemBase.FireChanged"/> of base class 
-    /// <see cref="ConstraintBase"/>.</remarks>
-    /// <param name="op">The operator to remove.</param>
-    public void RemoveOperator(IOperator op) {
-      groupConstraint.RemoveOperator(op);
-      FireChanged();
-    }
-
-    /// <summary>
-    /// Checks whether the given element fulfills the current constraint.
-    /// </summary>
-    /// <param name="data">The item to check.</param>
-    /// <returns><c>true</c> if the constraint could be fulfilled, <c>false</c> otherwise.</returns>
-    public override bool Check(IItem data) {
-      IOperator op = data as IOperator;
-      if(data == null) return false;
-
-      for(int i = 0; i < op.SubOperators.Count; i++) {
-        groupConstraint.SubOperatorIndex.Data = i;
-        if(groupConstraint.Check(data) == false) {
-          return false;
-        }
-      }
-      return true;
-    }
-
-    /// <summary>
-    /// Empties the current instance.
-    /// </summary>
-    public void Clear() {
-      groupConstraint.Clear();
-    }
-
-    /// <summary>
-    /// Clones the current instance (deep clone).
-    /// </summary>
-    /// <remarks>Deep clone through <see cref="Auxiliary.Clone"/> method of helper class 
-    /// <see cref="Auxiliary"/>.</remarks>
-    /// <param name="clonedObjects">Dictionary of all already clone objects. (Needed to avoid cycles.)</param>
-    /// <returns>The cloned object as <see cref="AllSubOperatorsTypeConstraint"/>.</returns>
-    public override object Clone(IDictionary<Guid, object> clonedObjects) {
-      AllSubOperatorsTypeConstraint clone = new AllSubOperatorsTypeConstraint();
-      clonedObjects.Add(Guid, clone);
-      clone.groupConstraint = (SubOperatorTypeConstraint)Auxiliary.Clone(groupConstraint, clonedObjects);
-      return clone;
-    }
-
-    /// <summary>
-    /// Creates a new instance of <see cref="AllSubOperatorsTypeConstraintView"/> to represent the current 
-    /// instance visually.
-    /// </summary>
-    /// <returns>The created view as <see cref="AllSubOperatorsTypeConstraintView"/>.</returns>
-    public override IView CreateView() {
-      return new AllSubOperatorsTypeConstraintView(groupConstraint);
-    }
-
-    #region persistence
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>The sub-operators are saved as a child node with tag name 
-    /// <c>SubOperatorsGroupConstraint</c>.</remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
-    /// <param name="persistedObjects">The dictionary of all already persisted objects. 
-    /// (Needed to avoid cycles.)</param>
-    /// <returns>The saved <see cref="XmlNode"/>.</returns>
-    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
-      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
-      XmlNode subOperatorsNode = PersistenceManager.Persist("SubOperatorsGroupConstraint", groupConstraint, document, persistedObjects);
-      node.AppendChild(subOperatorsNode);
-
-      return node;
-    }
-
-    /// <summary>
-    /// Loads the persisted constraint from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>The constraint must be saved in a specific way, see <see cref="GetXmlNode"/> for 
-    /// more information.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the instance is saved.</param>
-    /// <param name="restoredObjects">The dictionary of all already restored objects. 
-    /// (Needed to avoid cycles.)</param>
-    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
-      base.Populate(node, restoredObjects);
-      groupConstraint = (SubOperatorTypeConstraint)PersistenceManager.Restore(node.SelectSingleNode("SubOperatorsGroupConstraint"), restoredObjects);
-    }
-    #endregion persistence
-  }
-}
Index: unk/sources/HeuristicLab.Constraints/3.2/AllSubOperatorsTypeConstraintView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/3.2/AllSubOperatorsTypeConstraintView.Designer.cs	(revision 2221)
+++ 	(revision )
@@ -1,113 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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
-
-namespace HeuristicLab.Constraints {
-  partial class AllSubOperatorsTypeConstraintView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if(disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.groupBox = new System.Windows.Forms.GroupBox();
-      this.listView = new System.Windows.Forms.ListView();
-      this.removeButton = new System.Windows.Forms.Button();
-      this.groupBox.SuspendLayout();
-      this.SuspendLayout();
-      // 
-      // groupBox
-      // 
-      this.groupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.groupBox.Controls.Add(this.listView);
-      this.groupBox.Location = new System.Drawing.Point(0, 0);
-      this.groupBox.Name = "groupBox";
-      this.groupBox.Size = new System.Drawing.Size(463, 305);
-      this.groupBox.TabIndex = 0;
-      this.groupBox.TabStop = false;
-      this.groupBox.Text = "Allowed sub-operators";
-      // 
-      // listView
-      // 
-      this.listView.AllowDrop = true;
-      this.listView.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.listView.Location = new System.Drawing.Point(3, 16);
-      this.listView.Name = "listView";
-      this.listView.Size = new System.Drawing.Size(457, 286);
-      this.listView.TabIndex = 1;
-      this.listView.UseCompatibleStateImageBehavior = false;
-      this.listView.View = System.Windows.Forms.View.List;
-      this.listView.SelectedIndexChanged += new System.EventHandler(this.listView_SelectedIndexChanged);
-      this.listView.DragDrop += new System.Windows.Forms.DragEventHandler(this.listView_DragDrop);
-      this.listView.DragEnter += new System.Windows.Forms.DragEventHandler(this.listView_DragEnter);
-      this.listView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listView_KeyDown);
-      this.listView.DragOver += new System.Windows.Forms.DragEventHandler(this.listView_DragOver);
-      // 
-      // removeButton
-      // 
-      this.removeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.removeButton.Location = new System.Drawing.Point(3, 311);
-      this.removeButton.Name = "removeButton";
-      this.removeButton.Size = new System.Drawing.Size(75, 23);
-      this.removeButton.TabIndex = 0;
-      this.removeButton.Text = "Remove";
-      this.removeButton.UseVisualStyleBackColor = true;
-      this.removeButton.Click += new System.EventHandler(this.removeButton_Click);
-      // 
-      // AllSubOperatorsTypeConstraintView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.removeButton);
-      this.Controls.Add(this.groupBox);
-      this.Name = "AllSubOperatorsTypeConstraintView";
-      this.Size = new System.Drawing.Size(463, 337);
-      this.groupBox.ResumeLayout(false);
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.GroupBox groupBox;
-    private System.Windows.Forms.Button removeButton;
-    private System.Windows.Forms.ListView listView;
-
-  }
-}
Index: unk/sources/HeuristicLab.Constraints/3.2/AllSubOperatorsTypeConstraintView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/3.2/AllSubOperatorsTypeConstraintView.cs	(revision 2221)
+++ 	(revision )
@@ -1,166 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Text;
-using System.Windows.Forms;
-using HeuristicLab.Core;
-
-namespace HeuristicLab.Constraints {
-  /// <summary>
-  /// The visual representation of the <see cref="AllSubOperatorsTypeConstraint"/>.
-  /// </summary>
-  public partial class AllSubOperatorsTypeConstraintView : ViewBase {
-    private SubOperatorTypeConstraint constraint = new SubOperatorTypeConstraint();
-
-    /// <summary>
-    /// Gets or sets the SubOperatorTypeConstraint to display.
-    /// </summary>
-    public SubOperatorTypeConstraint Constraint {
-      get { return constraint; }
-      set { 
-        constraint = value;
-        UpdateAllowedOperatorsList();
-      }
-    }
-
-    /// <summary>
-    /// Initializes a new instance of <see cref="AllSubOperatorsTypeConstraintView"/>.
-    /// </summary>
-    public AllSubOperatorsTypeConstraintView() {
-      InitializeComponent();
-    }
-
-    /// <summary>
-    /// Initializes a new instance of <see cref="AllSubOperatorsTypeConstraintView"/> with
-    /// the given <paramref name="constraint"/> to display.
-    /// </summary>
-    /// <param name="constraint">The constraint that should be displayed.</param>
-    public AllSubOperatorsTypeConstraintView(SubOperatorTypeConstraint constraint) {
-      this.constraint = constraint;
-      InitializeComponent();
-    }
-
-    private void UpdateAllowedOperatorsList() {
-      listView.Clear();
-      foreach(IOperator op in constraint.AllowedSubOperators) {
-        ListViewItem item = new ListViewItem();
-        item.Name = op.Name;
-        item.Text = op.Name;
-        item.Tag = op;
-        listView.Items.Add(item);
-      }
-      Refresh();
-    }
-
-    private void op_NameChanged(object sender, EventArgs e) {
-      IOperator srcOp = (IOperator)sender;
-
-      foreach(ListViewItem item in listView.Items) {
-        if(item.Tag == srcOp) {
-          item.Text = srcOp.Name;
-          item.Name = srcOp.Name;
-          break;
-        }
-      }
-      Refresh();
-    }
-
-    #region Key Events
-    private void listView_KeyDown(object sender, KeyEventArgs e) {
-      if(e.KeyCode == Keys.Delete) {
-        while(listView.SelectedIndices.Count > 0) {
-          constraint.RemoveOperator((IOperator)listView.SelectedItems[0].Tag);
-          listView.Items.RemoveAt(listView.SelectedIndices[0]);
-        }
-      }
-    }
-    #endregion
-
-    #region Drag Events
-    private void listView_DragDrop(object sender, DragEventArgs e) {
-      if(e.Effect != DragDropEffects.None) {
-        if(e.Data.GetDataPresent("IOperator")) {
-          IOperator op = (IOperator)e.Data.GetData("IOperator");
-          ListViewItem item = new ListViewItem();
-          item.Tag = op;
-          item.Name = op.Name;
-          item.Text = op.Name;
-          listView.Items.Add(item);
-          constraint.AddOperator(op);
-          op.NameChanged += new EventHandler(op_NameChanged);
-          listView.SelectedIndices.Clear();
-        }
-      }
-    }
-
-    private void listView_DragEnter(object sender, DragEventArgs e) {
-      this.FindForm().BringToFront();
-      this.Focus();
-      e.Effect = DragDropEffects.None;
-      if(e.Data.GetDataPresent("IOperator")) {
-        IOperator op = (IOperator)e.Data.GetData("IOperator");
-        if(!ListContains(op)) {
-          e.Effect = DragDropEffects.Copy;
-        }
-      }
-    }
-
-    private void listView_DragOver(object sender, DragEventArgs e) {
-      e.Effect = DragDropEffects.None;
-      if(e.Data.GetDataPresent("IOperator")) {
-        IOperator op = (IOperator)e.Data.GetData("IOperator");
-        if(!ListContains(op)) {
-          e.Effect = DragDropEffects.Copy;
-        }
-      }
-    }
-    #endregion
-
-    #region button events
-    private void removeButton_Click(object sender, EventArgs e) {
-      while(listView.SelectedIndices.Count > 0) {
-        constraint.RemoveOperator((IOperator)listView.SelectedItems[0].Tag);
-        listView.Items.RemoveAt(listView.SelectedIndices[0]);
-      }
-    }
-    #endregion
-
-    private bool ListContains(IOperator op) {
-      foreach(ListViewItem item in listView.Items) {
-        if(item.Tag == op) return true;
-      }
-      return false;
-    }
-
-    private void listView_SelectedIndexChanged(object sender, EventArgs e) {
-      if(listView.SelectedItems.Count > 0) {
-        removeButton.Enabled = true;
-      } else {
-        removeButton.Enabled = false;
-      }
-    }
-  }
-}
Index: unk/sources/HeuristicLab.Constraints/3.2/AllSubOperatorsTypeConstraintView.resx
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/3.2/AllSubOperatorsTypeConstraintView.resx	(revision 2221)
+++ 	(revision )
@@ -1,120 +1,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>
Index: /trunk/sources/HeuristicLab.Constraints/3.2/HeuristicLab.Constraints-3.2.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/3.2/HeuristicLab.Constraints-3.2.csproj	(revision 2221)
+++ /trunk/sources/HeuristicLab.Constraints/3.2/HeuristicLab.Constraints-3.2.csproj	(revision 2222)
@@ -78,11 +78,4 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="AllSubOperatorsTypeConstraint.cs" />
-    <Compile Include="AllSubOperatorsTypeConstraintView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="AllSubOperatorsTypeConstraintView.designer.cs">
-      <DependentUpon>AllSubOperatorsTypeConstraintView.cs</DependentUpon>
-    </Compile>
     <Compile Include="AndConstraint.cs" />
     <Compile Include="AndConstraintView.cs">
@@ -122,11 +115,4 @@
       <DependentUpon>NotConstraintView.cs</DependentUpon>
     </Compile>
-    <Compile Include="NumberOfSubOperatorsConstraint.cs" />
-    <Compile Include="NumberOfSubOperatorsConstraintView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="NumberOfSubOperatorsConstraintView.Designer.cs">
-      <DependentUpon>NumberOfSubOperatorsConstraintView.cs</DependentUpon>
-    </Compile>
     <Compile Include="OrConstraint.cs" />
     <Compile Include="OrConstraintView.cs">
@@ -135,12 +121,4 @@
     <Compile Include="OrConstraintView.Designer.cs">
       <DependentUpon>OrConstraintView.cs</DependentUpon>
-    </Compile>
-    <Compile Include="SubOperatorsConstraintAnalyser.cs" />
-    <Compile Include="SubOperatorsTypeConstraint.cs" />
-    <Compile Include="SubOperatorsTypeConstraintView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="SubOperatorsTypeConstraintView.designer.cs">
-      <DependentUpon>SubOperatorsTypeConstraintView.cs</DependentUpon>
     </Compile>
     <Compile Include="HeuristicLabConstraintsPlugin.cs" />
@@ -173,8 +151,4 @@
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="AllSubOperatorsTypeConstraintView.resx">
-      <DependentUpon>AllSubOperatorsTypeConstraintView.cs</DependentUpon>
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
     <EmbeddedResource Include="AndConstraintView.resx">
       <SubType>Designer</SubType>
@@ -197,15 +171,7 @@
       <SubType>Designer</SubType>
     </EmbeddedResource>
-    <EmbeddedResource Include="NumberOfSubOperatorsConstraintView.resx">
-      <SubType>Designer</SubType>
-      <DependentUpon>NumberOfSubOperatorsConstraintView.cs</DependentUpon>
-    </EmbeddedResource>
     <EmbeddedResource Include="OrConstraintView.resx">
       <SubType>Designer</SubType>
       <DependentUpon>OrConstraintView.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="SubOperatorsTypeConstraintView.resx">
-      <DependentUpon>SubOperatorsTypeConstraintView.cs</DependentUpon>
-      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="VariableComparisonConstraintView.resx">
Index: unk/sources/HeuristicLab.Constraints/3.2/NumberOfSubOperatorsConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/3.2/NumberOfSubOperatorsConstraint.cs	(revision 2221)
+++ 	(revision )
@@ -1,145 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Data;
-using System.Xml;
-
-namespace HeuristicLab.Constraints {
-  /// <summary>
-  /// Constraint where the number of sub-operators must be within a specific range.
-  /// </summary>
-  public class NumberOfSubOperatorsConstraint : ConstraintBase {
-    private IntData minOperators;
-    private IntData maxOperators;
-
-    /// <summary>
-    /// Gets the maximum number of sub-operators.
-    /// </summary>
-    public IntData MaxOperators {
-      get { return maxOperators; }
-    }
-
-    /// <summary>
-    /// Gets the minimum number of sub-operators.
-    /// </summary>
-    public IntData MinOperators {
-      get { return minOperators; }
-    }
-
-    /// <inheritdoc select="summary"/>
-    public override string Description {
-      get { return "Number of sub-operators has to be between " + MinOperators.ToString() + " and " + MaxOperators.ToString() + "."; }
-    }
-
-    /// <summary>
-    /// Initializes a new instance of <see cref="NumberOfSubOperatorsConstraint"/>.
-    /// </summary>
-    public NumberOfSubOperatorsConstraint()
-      : this(0,0) {
-    }
-
-    /// <summary>
-    /// Initializes a new instance of <see cref="NumberOfSubOperatorsConstraint"/> with the minimum and 
-    /// the maximum number of sub-operators.
-    /// </summary>
-    /// <param name="min">The minimum number of sub-operators.</param>
-    /// <param name="max">The maximum number of sub-operators.</param>
-    public NumberOfSubOperatorsConstraint(int min, int max) : base() {
-      minOperators = new IntData(min);
-      maxOperators = new IntData(max);
-    }
-
-    /// <summary>
-    /// Checks whether the given element fulfills the current constraint.
-    /// </summary>
-    /// <param name="data">The item to check.</param>
-    /// <returns><c>true</c> if the constraint could be fulfilled, <c>false</c> otherwise.</returns>
-    public override bool Check(IItem data) {
-      IOperator op = data as IOperator;
-      if (data == null) return false;
-
-      return (op.SubOperators.Count >= minOperators.Data && op.SubOperators.Count <= maxOperators.Data);
-    }
-
-    /// <summary>
-    /// Clones the current instance (deep clone).
-    /// </summary>
-    /// <param name="clonedObjects">Dictionary of all already clone objects. (Needed to avoid cycles.)</param>
-    /// <returns>The cloned object as <see cref="AndConstraint"/>.</returns>
-    public override object Clone(IDictionary<Guid, object> clonedObjects) {
-      NumberOfSubOperatorsConstraint clone = new NumberOfSubOperatorsConstraint();
-      clonedObjects.Add(Guid, clone);
-      clone.maxOperators.Data = maxOperators.Data;
-      clone.minOperators.Data = minOperators.Data;
-      return clone;
-    }
-
-    /// <summary>
-    /// Creates a new instance of <see cref="NumberOfSubOperatorsConstraintView"/> to represent the current 
-    /// instance visually.
-    /// </summary>
-    /// <returns>The created view as <see cref="NumberOfSubOperatorsConstraintView"/>.</returns>
-    public override IView CreateView() {
-      return new NumberOfSubOperatorsConstraintView(this);
-    }
-
-    #region persistence
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>The minimum and the maximum number of sub-operators are saved as child nodes with tag
-    /// names <c>min</c> and <c>max</c>.</remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
-    /// <param name="persistedObjects">The dictionary of all already persisted objects. 
-    /// (Needed to avoid cycles.)</param>
-    /// <returns>The saved <see cref="XmlNode"/>.</returns>
-    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
-      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
-      XmlNode minNode = PersistenceManager.Persist("min", minOperators, document, persistedObjects);
-      XmlNode maxNode = PersistenceManager.Persist("max", maxOperators, document, persistedObjects);
-      node.AppendChild(minNode);
-      node.AppendChild(maxNode);
-      return node;
-    }
-
-    /// <summary>
-    /// Loads the persisted constraint from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>The constraint must be saved in a specific way, see <see cref="GetXmlNode"/> for 
-    /// more information.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the instance is saved.</param>
-    /// <param name="restoredObjects">The dictionary of all already restored objects. 
-    /// (Needed to avoid cycles.)</param>
-    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
-      base.Populate(node, restoredObjects);
-      minOperators = (IntData)PersistenceManager.Restore(node.SelectSingleNode("min"), restoredObjects);
-      maxOperators = (IntData)PersistenceManager.Restore(node.SelectSingleNode("max"), restoredObjects);
-    }
-    #endregion persistence
-
-  }
-}
Index: unk/sources/HeuristicLab.Constraints/3.2/NumberOfSubOperatorsConstraintView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/3.2/NumberOfSubOperatorsConstraintView.Designer.cs	(revision 2221)
+++ 	(revision )
@@ -1,111 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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
-
-namespace HeuristicLab.Constraints {
-  partial class NumberOfSubOperatorsConstraintView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if(disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.minDataView = new HeuristicLab.Data.IntDataView();
-      this.maxDataView = new HeuristicLab.Data.IntDataView();
-      this.minLabel = new System.Windows.Forms.Label();
-      this.maxLabel = new System.Windows.Forms.Label();
-      this.SuspendLayout();
-      // 
-      // minDataView
-      // 
-      this.minDataView.Caption = "View";
-      this.minDataView.IntData = null;
-      this.minDataView.Location = new System.Drawing.Point(36, 3);
-      this.minDataView.Name = "minDataView";
-      this.minDataView.Size = new System.Drawing.Size(265, 26);
-      this.minDataView.TabIndex = 0;
-      // 
-      // maxDataView
-      // 
-      this.maxDataView.Caption = "View";
-      this.maxDataView.IntData = null;
-      this.maxDataView.Location = new System.Drawing.Point(36, 32);
-      this.maxDataView.Name = "maxDataView";
-      this.maxDataView.Size = new System.Drawing.Size(265, 26);
-      this.maxDataView.TabIndex = 1;
-      // 
-      // minLabel
-      // 
-      this.minLabel.AutoSize = true;
-      this.minLabel.Location = new System.Drawing.Point(3, 3);
-      this.minLabel.Name = "minLabel";
-      this.minLabel.Size = new System.Drawing.Size(27, 13);
-      this.minLabel.TabIndex = 2;
-      this.minLabel.Text = "Min:";
-      // 
-      // maxLabel
-      // 
-      this.maxLabel.AutoSize = true;
-      this.maxLabel.Location = new System.Drawing.Point(3, 32);
-      this.maxLabel.Name = "maxLabel";
-      this.maxLabel.Size = new System.Drawing.Size(30, 13);
-      this.maxLabel.TabIndex = 3;
-      this.maxLabel.Text = "Max:";
-      // 
-      // NumberOfSubOperatorsConstraintView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.maxLabel);
-      this.Controls.Add(this.minLabel);
-      this.Controls.Add(this.maxDataView);
-      this.Controls.Add(this.minDataView);
-      this.Name = "NumberOfSubOperatorsConstraintView";
-      this.Size = new System.Drawing.Size(306, 61);
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-    private HeuristicLab.Data.IntDataView minDataView;
-    private HeuristicLab.Data.IntDataView maxDataView;
-    private System.Windows.Forms.Label minLabel;
-    private System.Windows.Forms.Label maxLabel;
-  }
-}
Index: unk/sources/HeuristicLab.Constraints/3.2/NumberOfSubOperatorsConstraintView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/3.2/NumberOfSubOperatorsConstraintView.cs	(revision 2221)
+++ 	(revision )
@@ -1,58 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Text;
-using System.Windows.Forms;
-using HeuristicLab.Core;
-
-namespace HeuristicLab.Constraints {
-  /// <summary>
-  /// Visual representation of a <see cref="NumberOfSubOperatorsConstraint"/>.
-  /// </summary>
-  public partial class NumberOfSubOperatorsConstraintView : ViewBase {
-    private NumberOfSubOperatorsConstraint constraint;
-
-    /// <summary>
-    /// Initializes a new instance of <see cref="NumberOfSubOperatorsConstraintView"/>.
-    /// </summary>
-    public NumberOfSubOperatorsConstraintView() {
-      InitializeComponent();
-    }
-
-    /// <summary>
-    /// Initializes a new instance of <see cref="NumberOfSubOperatorsConstraintView"/>
-    /// with the given <paramref name="constraint"/> to display.
-    /// </summary>
-    /// <param name="constraint">The constraint to represent visually.</param>
-    public NumberOfSubOperatorsConstraintView(NumberOfSubOperatorsConstraint constraint) {
-      InitializeComponent();
-      this.constraint = constraint;
-
-      minDataView.IntData = constraint.MinOperators;
-      maxDataView.IntData = constraint.MaxOperators;
-    }
-  }
-}
Index: unk/sources/HeuristicLab.Constraints/3.2/NumberOfSubOperatorsConstraintView.resx
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/3.2/NumberOfSubOperatorsConstraintView.resx	(revision 2221)
+++ 	(revision )
@@ -1,120 +1,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>
Index: unk/sources/HeuristicLab.Constraints/3.2/SubOperatorsConstraintAnalyser.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/3.2/SubOperatorsConstraintAnalyser.cs	(revision 2221)
+++ 	(revision )
@@ -1,186 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Constraints;
-using HeuristicLab.Data;
-
-namespace HeuristicLab.Constraints {
-  /// <summary>
-  /// Analyzes the sub-operators for specific constraints.
-  /// </summary>
-  public class SubOperatorsConstraintAnalyser {
-    private ICollection<IOperator> allPossibleOperators;
-
-    /// <summary>
-    /// Gets or sets all possible operators. 
-    /// </summary>
-    public ICollection<IOperator> AllPossibleOperators {
-      get { return allPossibleOperators; }
-      set { allPossibleOperators = value; }
-    }
-    
-    /// <summary>
-    /// Gets all operators that fulfill the expression of the constraints of the given operator. 
-    /// </summary>
-    /// <param name="op">The operator whose constraints to check.</param>
-    /// <param name="childIndex">The index of the child.</param>
-    /// <returns>All allowed operators.</returns>
-    public IList<IOperator> GetAllowedOperators(IOperator op, int childIndex) {
-      AndConstraint andConstraint = new AndConstraint();
-      foreach (IConstraint constraint in op.Constraints) {
-        andConstraint.Clauses.Add(constraint);
-      }
-
-      return GetAllowedOperators(andConstraint, childIndex);
-    }
-
-    private IList<IOperator> GetAllowedOperators(IConstraint constraint, int childIndex) {
-      // manual dispatch on dynamic type
-      if (constraint is AndConstraint)
-        return GetAllowedOperators((AndConstraint)constraint, childIndex);
-      else if (constraint is OrConstraint)
-        return GetAllowedOperators((OrConstraint)constraint, childIndex);
-      else if (constraint is NotConstraint)
-        return GetAllowedOperators((NotConstraint)constraint, childIndex);
-      else if (constraint is AllSubOperatorsTypeConstraint)
-        return GetAllowedOperators((AllSubOperatorsTypeConstraint)constraint, childIndex);
-      else if (constraint is SubOperatorTypeConstraint)
-        return GetAllowedOperators((SubOperatorTypeConstraint)constraint, childIndex);
-      else return new List<IOperator>(allPossibleOperators); // ignore all other constraints
-    }
-
-    #region static set management methods
-    // better to use HashSets from .NET 3.5
-    // however we would need to switch the whole Constraints project to .NET 3.5 for that
-    private static IList<IOperator> Intersect(ICollection<IOperator> a, ICollection<IOperator> b) {
-      if (a.Count > b.Count) {
-        return Intersect(b, a);
-      }
-
-      List<IOperator> intersection = new List<IOperator>(a.Count);
-
-      foreach (IOperator element in a) {
-        if (InSet(element, b)) {
-          intersection.Add(element);
-        }
-      }
-      return intersection;
-    }
-
-    private static IList<IOperator> Union(ICollection<IOperator> a, ICollection<IOperator> b) {
-      List<IOperator> union = new List<IOperator>(a);
-      foreach (IOperator candidateElement in b) {
-        if (!InSet(candidateElement, union)) {
-          union.Add(candidateElement);
-        }
-      }
-
-      return union;
-    }
-
-    private static IList<IOperator> Substract(ICollection<IOperator> minuend, ICollection<IOperator> subtrahend) {
-      List<IOperator> difference = new List<IOperator>();
-      foreach (IOperator element in minuend) {
-        if (!InSet(element, subtrahend)) {
-          difference.Add(element);
-        }
-      }
-
-      return difference;
-    }
-
-    private static bool InSet(IOperator op, ICollection<IOperator> set) {
-      foreach (IOperator element in set) {
-        if (element == op)
-          return true;
-      }
-      return false;
-    }
-    #endregion
-
-    /// <summary>
-    /// Gets all allowed operators that fulfill the expression of the given <c>AndConstraint</c>.
-    /// </summary>
-    /// <param name="constraint">The constraint that must be fulfilled.</param>
-    /// <param name="childIndex">The index of the child.</param>
-    /// <returns>All allowed operators.</returns>
-    public IList<IOperator> GetAllowedOperators(AndConstraint constraint, int childIndex) {
-      IList<IOperator> allowedOperators = new List<IOperator>(allPossibleOperators);
-      // keep only the intersection of all subconstraints
-      foreach (ConstraintBase clause in constraint.Clauses) {
-        allowedOperators = Intersect(allowedOperators, GetAllowedOperators(clause, childIndex));
-      }
-      return allowedOperators;
-    }
-
-    /// <summary>
-    /// Gets all allowed operators that fulfill the expression of the given <c>OrConstraint</c>.
-    /// </summary>
-    /// <param name="constraint">The constraint that must be fulfilled.</param>
-    /// <param name="childIndex">The index of the child.</param>
-    /// <returns>All allowed operators.</returns>
-    public IList<IOperator> GetAllowedOperators(OrConstraint constraint, int childIndex) {
-      IList<IOperator> allowedOperators = new List<IOperator>();
-      foreach (ConstraintBase clause in constraint.Clauses) {
-        allowedOperators = Union(allowedOperators, GetAllowedOperators(clause, childIndex));
-      }
-      return allowedOperators;
-    }
-
-    /// <summary>
-    /// Gets all allowed operators that fulfill the expression of the given <c>NotConstraint</c>.
-    /// </summary>
-    /// <param name="constraint">The constraint that must be fulfilled.</param>
-    /// <param name="childIndex">The index of the child.</param>
-    /// <returns>All allowed operators.</returns>
-    public IList<IOperator> GetAllowedOperators(NotConstraint constraint, int childIndex) {
-      return Substract(allPossibleOperators, GetAllowedOperators(constraint.SubConstraint, childIndex));
-    }
-
-    /// <summary>
-    /// Gets all allowed operators that fulfill the expression of the given <c>AllSubOperatorsTypeConstraint</c>.
-    /// </summary>
-    /// <param name="constraint">The constraint that must be fulfilled.</param>
-    /// <param name="childIndex">The index of the child.</param>
-    /// <returns>All allowed operators.</returns>
-    public IList<IOperator> GetAllowedOperators(AllSubOperatorsTypeConstraint constraint, int childIndex) {
-      return Intersect(allPossibleOperators, constraint.AllowedSubOperators);
-    }
-
-    /// <summary>
-    /// Gets all allowed operators that fulfill the expression of the given <c>SubOperatorTypeConstraint</c>.
-    /// </summary>
-    /// <param name="constraint">The constraint that must be fulfilled.</param>
-    /// <param name="childIndex">The index of the child.</param>
-    /// <returns>All allowed operators.</returns>
-    public IList<IOperator> GetAllowedOperators(SubOperatorTypeConstraint constraint, int childIndex) {
-      if (childIndex != constraint.SubOperatorIndex.Data) {
-        return new List<IOperator>(allPossibleOperators);
-      } else {
-        return Intersect(allPossibleOperators, constraint.AllowedSubOperators);
-      }
-    }
-  }
-}
Index: unk/sources/HeuristicLab.Constraints/3.2/SubOperatorsTypeConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/3.2/SubOperatorsTypeConstraint.cs	(revision 2221)
+++ 	(revision )
@@ -1,191 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using System.Diagnostics;
-using System.Xml;
-
-namespace HeuristicLab.Constraints {
-  /// <summary>
-  /// Constraint where the sub-operator at a specific index has to be an element of a pre-defined group.
-  /// </summary>
-  public class SubOperatorTypeConstraint : ConstraintBase {
-    private IntData subOperatorIndex;
-    /// <summary>
-    /// Gets the index of the sub-operator.
-    /// </summary>
-    public IntData SubOperatorIndex {
-      get { return subOperatorIndex; }
-    }
-
-    private List<IOperator> subOperators;
-    /// <summary>
-    /// Gets all allowed sub-operators.
-    /// </summary>
-    public IList<IOperator> AllowedSubOperators {
-      get {
-        return subOperators.AsReadOnly();
-      }
-    }
-
-    ///<inheritdoc select="summary"/>
-    public override string Description {
-      get { return "The sub-operator at a specific index has to be an element of a pre-defined group."; }
-    }
-
-    /// <summary>
-    /// Initializes a new instance of <see cref="SubOperatorTypeConstraint"/>.
-    /// </summary>
-    public SubOperatorTypeConstraint()
-      : base() {
-      subOperatorIndex = new IntData(0);
-      subOperators = new List<IOperator>();
-    }
-
-    /// <summary>
-    /// Initializes a new instance of <see cref="SubOperatorTypeConstraint"/> with the given
-    /// <paramref name="index"/>.
-    /// </summary>
-    /// <param name="index">The index of the sub-operator.</param>
-    public SubOperatorTypeConstraint(int index) : base() {
-      subOperatorIndex = new IntData(index);
-      subOperators = new List<IOperator>();
-    }
-
-    /// <summary>
-    /// Adds the given operator to the list of sub-operators.
-    /// </summary>
-    /// <remarks>Calls <see cref="ItemBase.FireChanged"/> of base class <see cref="ConstraintBase"/>.</remarks>
-    /// <param name="op">The operator to add.</param>
-    public void AddOperator(IOperator op) {
-      if(!subOperators.Contains(op)) {
-        subOperators.Add(op);
-        FireChanged();
-      }
-    }
-
-    /// <summary>
-    /// Removes the given operator from the list of sub-operators.
-    /// </summary>
-    /// <remarks>Calls <see cref="ItemBase.FireChanged"/> of base class <see cref="ConstraintBase"/>.</remarks>
-    /// <param name="op">The operator to remove.</param>
-    public void RemoveOperator(IOperator op) {
-      if(subOperators.Contains(op)) {
-        subOperators.Remove(op);
-        FireChanged();
-      }
-    }
-
-    /// <summary>
-    /// Empties the list of sub-operators.
-    /// </summary>
-    public void Clear() {
-      subOperators.Clear();
-    }
-
-    /// <summary>
-    /// Checks whether the given element fulfills the current constraint.
-    /// </summary>
-    /// <param name="data">The item to check.</param>
-    /// <returns><c>true</c> if the constraint could be fulfilled, <c>false</c> otherwise.</returns>
-    public override bool Check(IItem data) {
-      IOperator op = data as IOperator;
-      if(data == null) return false;
-
-      if(op.SubOperators.Count <= subOperatorIndex.Data) {
-        return false;
-      }
-      return subOperators.Contains(op.SubOperators[subOperatorIndex.Data]);
-    }
-
-    /// <summary>
-    /// Clones the current instance (deep clone).
-    /// </summary>
-    /// <remarks>Deep clone through <see cref="Auxiliary.Clone"/> method of helper class 
-    /// <see cref="Auxiliary"/>.</remarks>
-    /// <param name="clonedObjects">Dictionary of all already clone objects. (Needed to avoid cycles.)</param>
-    /// <returns>The cloned object as <see cref="SubOperatorTypeConstraint"/>.</returns>
-    public override object Clone(IDictionary<Guid, object> clonedObjects) {
-      SubOperatorTypeConstraint clone = new SubOperatorTypeConstraint();
-      clonedObjects.Add(Guid, clone);
-      clone.subOperatorIndex.Data = subOperatorIndex.Data;
-      foreach(IOperator op in subOperators) {
-        clone.AddOperator((IOperator)Auxiliary.Clone(op, clonedObjects));
-      }
-      return clone;
-    }
-
-    /// <summary>
-    /// Creates a new instance of <see cref="SubOperatorsTypeConstraintView"/> to represent the current 
-    /// instance visually.
-    /// </summary>
-    /// <returns>The created view as <see cref="SubOperatorsTypeConstraintView"/>.</returns>
-    public override IView CreateView() {
-      return new SubOperatorsTypeConstraintView(this);
-    }
-
-    #region persistence
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>The index and the list of sub-operators are saved as child nodes with tag names 
-    /// <c>SubOperatorIndex</c> and <c>AllowedSubOperators</c>.</remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
-    /// <param name="persistedObjects">The dictionary of all already persisted objects. 
-    /// (Needed to avoid cycles.)</param>
-    /// <returns>The saved <see cref="XmlNode"/>.</returns>
-    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
-      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
-      XmlNode indexNode = PersistenceManager.Persist("SubOperatorIndex", subOperatorIndex, document, persistedObjects);
-      node.AppendChild(indexNode);
-      XmlNode listNode = document.CreateNode(XmlNodeType.Element, "AllowedSubOperators", document.NamespaceURI);
-      foreach(IOperator op in subOperators) {
-        XmlNode opNode = PersistenceManager.Persist(op, document, persistedObjects);
-        listNode.AppendChild(opNode);
-      }
-      node.AppendChild(listNode);
-      return node;
-    }
-
-    /// <summary>
-    /// Loads the persisted constraint from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>The constraint must be saved in a specific way, see <see cref="GetXmlNode"/> for 
-    /// more information.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the instance is saved.</param>
-    /// <param name="restoredObjects">The dictionary of all already restored objects. 
-    /// (Needed to avoid cycles.)</param>
-    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
-      base.Populate(node, restoredObjects);
-      subOperatorIndex = (IntData)PersistenceManager.Restore(node.SelectSingleNode("SubOperatorIndex"), restoredObjects);
-      subOperators = new List<IOperator>();
-      foreach(XmlNode childNode in node.SelectSingleNode("AllowedSubOperators").ChildNodes) {
-        subOperators.Add((IOperator)PersistenceManager.Restore(childNode, restoredObjects));
-      }
-    }
-    #endregion persistence
-  }
-}
Index: unk/sources/HeuristicLab.Constraints/3.2/SubOperatorsTypeConstraintView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/3.2/SubOperatorsTypeConstraintView.Designer.cs	(revision 2221)
+++ 	(revision )
@@ -1,101 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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
-
-namespace HeuristicLab.Constraints {
-  partial class SubOperatorsTypeConstraintView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if(disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.indexDataView = new HeuristicLab.Data.IntDataView();
-      this.indexLabel = new System.Windows.Forms.Label();
-      this.allSubOperatorsTypeConstraintView = new HeuristicLab.Constraints.AllSubOperatorsTypeConstraintView();
-      this.SuspendLayout();
-      // 
-      // indexDataView
-      // 
-      this.indexDataView.Caption = "View";
-      this.indexDataView.IntData = null;
-      this.indexDataView.Location = new System.Drawing.Point(109, 3);
-      this.indexDataView.Name = "indexDataView";
-      this.indexDataView.Size = new System.Drawing.Size(265, 26);
-      this.indexDataView.TabIndex = 1;
-      // 
-      // indexLabel
-      // 
-      this.indexLabel.AutoSize = true;
-      this.indexLabel.Location = new System.Drawing.Point(4, 4);
-      this.indexLabel.Name = "indexLabel";
-      this.indexLabel.Size = new System.Drawing.Size(99, 13);
-      this.indexLabel.TabIndex = 2;
-      this.indexLabel.Text = "Sub-operator index:";
-      // 
-      // allSubOperatorsTypeConstraintView
-      // 
-      this.allSubOperatorsTypeConstraintView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.allSubOperatorsTypeConstraintView.Caption = "View";
-      this.allSubOperatorsTypeConstraintView.Location = new System.Drawing.Point(0, 35);
-      this.allSubOperatorsTypeConstraintView.Name = "allSubOperatorsTypeConstraintView";
-      this.allSubOperatorsTypeConstraintView.Size = new System.Drawing.Size(492, 337);
-      this.allSubOperatorsTypeConstraintView.TabIndex = 3;
-      // 
-      // SubOperatorsTypeConstraintView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.allSubOperatorsTypeConstraintView);
-      this.Controls.Add(this.indexLabel);
-      this.Controls.Add(this.indexDataView);
-      this.Name = "SubOperatorsTypeConstraintView";
-      this.Size = new System.Drawing.Size(496, 377);
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-    private HeuristicLab.Data.IntDataView indexDataView;
-    private System.Windows.Forms.Label indexLabel;
-    private AllSubOperatorsTypeConstraintView allSubOperatorsTypeConstraintView;
-  }
-}
Index: unk/sources/HeuristicLab.Constraints/3.2/SubOperatorsTypeConstraintView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/3.2/SubOperatorsTypeConstraintView.cs	(revision 2221)
+++ 	(revision )
@@ -1,58 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Text;
-using System.Windows.Forms;
-using HeuristicLab.Core;
-
-namespace HeuristicLab.Constraints {
-  /// <summary>
-  /// The visual representation of a <see cref="SubOperatorTypeConstraint"/>.
-  /// </summary>
-  public partial class SubOperatorsTypeConstraintView : ViewBase {
-    private SubOperatorTypeConstraint constraint;
-
-    /// <summary>
-    /// Initializes a new instance of <see cref="SubOperatorsTypeConstraintView"/>.
-    /// </summary>
-    public SubOperatorsTypeConstraintView() {
-      InitializeComponent();
-    }
-
-    /// <summary>
-    /// Initializes a new instance of <see cref="SubOperatorTypeConstraint"/> with the given
-    /// <paramref name="constraint"/> to display.
-    /// </summary>
-    /// <param name="constraint">The constraint to represent visually.</param>
-    public SubOperatorsTypeConstraintView(SubOperatorTypeConstraint constraint) {
-      InitializeComponent();
-
-      this.constraint = constraint;
-      allSubOperatorsTypeConstraintView.Constraint = constraint;
-      indexDataView.IntData = constraint.SubOperatorIndex;
-    }
-  }
-}
Index: unk/sources/HeuristicLab.Constraints/3.2/SubOperatorsTypeConstraintView.resx
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/3.2/SubOperatorsTypeConstraintView.resx	(revision 2221)
+++ 	(revision )
@@ -1,120 +1,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>
Index: /trunk/sources/HeuristicLab.DataAnalysis/3.2/Dataset.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataAnalysis/3.2/Dataset.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.DataAnalysis/3.2/Dataset.cs	(revision 2222)
@@ -382,4 +382,5 @@
         cachedRanges[i] = new Dictionary<int, Dictionary<int, double>>();
       }
+      cachedValuesInvalidated = false;
     }
   }
Index: unk/sources/HeuristicLab.GP.Boolean/3.3/And.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/And.cs	(revision 2221)
+++ 	(revision )
@@ -1,45 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.Boolean{
-  public sealed class And : FunctionBase {
-
-    public override string Description {
-      get { return ""; }
-    }
-
-    public And()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/BooleanTreeInterpreter.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/BooleanTreeInterpreter.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/BooleanTreeInterpreter.cs	(revision 2222)
@@ -24,9 +24,10 @@
 using System.Linq;
 using System.Text;
-using HeuristicLab.DataAnalysis;
 using HeuristicLab.Core;
 using System.Xml;
 using System.Diagnostics;
 using HeuristicLab.Data;
+using HeuristicLab.GP.Interfaces;
+using HeuristicLab.DataAnalysis;
 
 namespace HeuristicLab.GP.Boolean {
@@ -34,12 +35,11 @@
     private const double EPSILON = 0.00001;
     private Dataset dataset;
-    private List<LightWeightFunction> expression;
+    private IFunctionTree tree;
     private int targetVariable;
     private int currentRow;
-    private int pc;
 
-    public void Reset(Dataset dataset, BakedFunctionTree tree, int targetVariable) {
+    public void Reset(Dataset dataset, IFunctionTree tree, int targetVariable) {
       this.dataset = dataset;
-      this.expression = tree.LinearRepresentation;
+      this.tree = tree;
       this.targetVariable = targetVariable;
     }
@@ -48,7 +48,6 @@
       int errors = 0;
       for (int i = start; i < end; i++) {
-        pc = 0;
         currentRow = i;
-        int result = Step() ? 1 : 0;
+        int result = Step(tree) ? 1 : 0;
         if (Math.Abs(result - dataset.GetValue(i, targetVariable)) > EPSILON) errors++;
       }
@@ -56,21 +55,26 @@
     }
 
-    internal bool Step() {
-      LightWeightFunction curFun = expression[pc++];
-      int symbol = SymbolTable.MapFunction(curFun.functionType);
+    internal bool Step(IFunctionTree t) {
+      int symbol = SymbolTable.MapFunction(t.Function);
       switch (symbol) {
-        case SymbolTable.AND: return Step() & Step();
-        case SymbolTable.OR: return Step() | Step();
-        case SymbolTable.NOT: return !Step();
-        case SymbolTable.XOR: return Step() ^ Step();
-        case SymbolTable.NAND: return !(Step() & Step());
-        case SymbolTable.NOR: return !(Step() | Step());
-        case SymbolTable.VARIABLE:
-          return dataset.GetValue(currentRow, (int)curFun.localData[0]) != 0.0;
+        case SymbolTable.AND: return Step(t.SubTrees[0]) && Step(t.SubTrees[1]);
+        case SymbolTable.OR: return Step(t.SubTrees[0]) || Step(t.SubTrees[1]);
+        case SymbolTable.NOT: return !Step(t.SubTrees[0]);
+        case SymbolTable.XOR: return Step(t.SubTrees[0]) ^ Step(t.SubTrees[1]);
+        case SymbolTable.NAND: return !(Step(t.SubTrees[0]) && Step(t.SubTrees[1]));
+        case SymbolTable.NOR: return !(Step(t.SubTrees[0]) || Step(t.SubTrees[1]));
+        case SymbolTable.VARIABLE: {
+            var varNode = (VariableFunctionTree)t;
+            int index = dataset.GetVariableIndex(varNode.VariableName);
+            return !IsAlmost(dataset.GetValue(currentRow, index), 0.0);
+          }
         case SymbolTable.UNKNOWN:
         default:
-          throw new InvalidOperationException(curFun.functionType.ToString());
+          throw new UnknownFunctionException(t.Function.Name);
+      }
+    }
 
-      }
+    private bool IsAlmost(double x, double y) {
+      return Math.Abs(x - y) < EPSILON;
     }
   }
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/Evaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Evaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/Evaluator.cs	(revision 2222)
@@ -26,4 +26,5 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.GP.Interfaces;
 using HeuristicLab.DataAnalysis;
 
@@ -32,5 +33,5 @@
     public Evaluator()
       : base() {
-      AddVariableInfo(new VariableInfo("FunctionTree", "The function tree representing the ant", typeof(BakedFunctionTree), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionTree", "The function tree representing the boolean expression to evaluate", typeof(IGeneticProgrammingModel), VariableKind.In));
       AddVariableInfo(new VariableInfo("Dataset", "The boolean dataset (values 0.0 = false, 1.0=true)", typeof(Dataset), VariableKind.In));
       AddVariableInfo(new VariableInfo("TargetVariable", "Index of the column of the dataset that holds the target variable", typeof(IntData), VariableKind.In));
@@ -41,5 +42,5 @@
 
     public override IOperation Apply(IScope scope) {
-      BakedFunctionTree tree = GetVariableValue<BakedFunctionTree>("FunctionTree", scope, true);
+      IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope, true);
       Dataset dataset = GetVariableValue<Dataset>("Dataset", scope, true);
       int targetVariable = GetVariableValue<IntData>("TargetVariable", scope, true).Data;
@@ -48,5 +49,5 @@
 
       BooleanTreeInterpreter interpreter = new BooleanTreeInterpreter();
-      interpreter.Reset(dataset, tree, targetVariable);
+      interpreter.Reset(dataset, gpModel.FunctionTree, targetVariable);
       int errors = interpreter.GetNumberOfErrors(start, end);
 
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/FunctionLibraryInjector.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/FunctionLibraryInjector.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/FunctionLibraryInjector.cs	(revision 2222)
@@ -27,14 +27,9 @@
 using HeuristicLab.Data;
 using HeuristicLab.DataAnalysis;
-using HeuristicLab.Constraints;
+using HeuristicLab.GP.Interfaces;
+using HeuristicLab.GP.SantaFe;
 
 namespace HeuristicLab.GP.Boolean {
-  public class FunctionLibraryInjector : OperatorBase {
-    private const string TARGETVARIABLE = "TargetVariable";
-    private const string OPERATORLIBRARY = "FunctionLibrary";
-
-    private GPOperatorLibrary operatorLibrary;
-    private Variable variable;
-
+  public class FunctionLibraryInjector : FunctionLibraryInjectorBase {
     public override string Description {
       get { return @"Injects a function library for boolean logic."; }
@@ -43,33 +38,22 @@
     public FunctionLibraryInjector()
       : base() {
-      AddVariableInfo(new VariableInfo(TARGETVARIABLE, "The target variable", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo(OPERATORLIBRARY, "Preconfigured default operator library", typeof(GPOperatorLibrary), VariableKind.New));
     }
 
-    public override IOperation Apply(IScope scope) {
-      int targetVariable = GetVariableValue<IntData>(TARGETVARIABLE, scope, true).Data;
-
-      InitDefaultOperatorLibrary();
-
-      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(OPERATORLIBRARY), operatorLibrary));
-      return null;
-    }
-
-    private void InitDefaultOperatorLibrary() {
+    protected override FunctionLibrary CreateFunctionLibrary() {
       And and = new And();
       Or or = new Or();
-      //Not not = new Not();
+      Not not = new Not();
       Nand nand = new Nand();
       Nor nor = new Nor();
-      //Xor xor = new Xor();
-      variable = new HeuristicLab.GP.Boolean.Variable();
+      Xor xor = new Xor();
+      Variable variable = new Variable();
 
       IFunction[] allFunctions = new IFunction[] {
         and,
         or,
-        //not,
+        not,
         nand,
         nor,
-        //xor,
+        xor,
         variable
       };
@@ -77,35 +61,18 @@
       SetAllowedSubOperators(and, allFunctions);
       SetAllowedSubOperators(or, allFunctions);
-      //SetAllowedSubOperators(not, allFunctions);
+      SetAllowedSubOperators(not, allFunctions);
       SetAllowedSubOperators(nand, allFunctions);
       SetAllowedSubOperators(nor, allFunctions);
-      //SetAllowedSubOperators(xor, allFunctions);
+      SetAllowedSubOperators(xor, allFunctions);
 
-      operatorLibrary = new GPOperatorLibrary();
-      operatorLibrary.GPOperatorGroup.AddOperator(and);
-      operatorLibrary.GPOperatorGroup.AddOperator(or);
-      //operatorLibrary.GPOperatorGroup.AddOperator(not);
-      operatorLibrary.GPOperatorGroup.AddOperator(nand);
-      operatorLibrary.GPOperatorGroup.AddOperator(nor);
-      //operatorLibrary.GPOperatorGroup.AddOperator(xor);
-      operatorLibrary.GPOperatorGroup.AddOperator(variable);
-    }
-
-    private void SetAllowedSubOperators(IFunction f, IFunction[] gs) {
-      foreach (IConstraint c in f.Constraints) {
-        if (c is SubOperatorTypeConstraint) {
-          SubOperatorTypeConstraint typeConstraint = c as SubOperatorTypeConstraint;
-          typeConstraint.Clear();
-          foreach (IFunction g in gs) {
-            typeConstraint.AddOperator(g);
-          }
-        } else if (c is AllSubOperatorsTypeConstraint) {
-          AllSubOperatorsTypeConstraint typeConstraint = c as AllSubOperatorsTypeConstraint;
-          typeConstraint.Clear();
-          foreach (IFunction g in gs) {
-            typeConstraint.AddOperator(g);
-          }
-        }
-      }
+      var functionLibrary = new FunctionLibrary();
+      functionLibrary.AddFunction(and);
+      functionLibrary.AddFunction(or);
+      functionLibrary.AddFunction(not);
+      functionLibrary.AddFunction(nand);
+      functionLibrary.AddFunction(nor);
+      functionLibrary.AddFunction(xor);
+      functionLibrary.AddFunction(variable);
+      return functionLibrary;
     }
   }
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/HeuristicLab.GP.Boolean-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/HeuristicLab.GP.Boolean-3.3.csproj	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/HeuristicLab.GP.Boolean-3.3.csproj	(revision 2222)
@@ -81,16 +81,17 @@
   <ItemGroup>
     <Compile Include="BooleanTreeInterpreter.cs" />
-    <Compile Include="Not.cs" />
-    <Compile Include="Xor.cs" />
-    <Compile Include="Or.cs" />
-    <Compile Include="Nand.cs" />
-    <Compile Include="Nor.cs" />
+    <Compile Include="Symbols\And.cs" />
+    <Compile Include="Symbols\Nand.cs" />
+    <Compile Include="Symbols\Nor.cs" />
+    <Compile Include="Symbols\Not.cs" />
+    <Compile Include="Symbols\Or.cs" />
+    <Compile Include="Symbols\SymbolTable.cs" />
+    <Compile Include="Symbols\Variable.cs" />
+    <Compile Include="Symbols\VariableFunctionTree.cs" />
+    <Compile Include="Symbols\Xor.cs" />
     <Compile Include="Evaluator.cs" />
     <Compile Include="FunctionLibraryInjector.cs" />
     <Compile Include="HeuristicLabGPBooleanPlugin.cs" />
-    <Compile Include="And.cs" />
-    <Compile Include="Variable.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="SymbolTable.cs" />
   </ItemGroup>
   <ItemGroup>
@@ -99,8 +100,4 @@
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Constraints\3.2\HeuristicLab.Constraints-3.2.csproj">
-      <Project>{FCD62C6F-4793-4593-AE9A-0BDCA256EE99}</Project>
-      <Name>HeuristicLab.Constraints-3.2</Name>
-    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
       <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
@@ -114,4 +111,8 @@
       <Project>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</Project>
       <Name>HeuristicLab.Data-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.GP.Interfaces\3.3\HeuristicLab.GP.Interfaces-3.3.csproj">
+      <Project>{924B6BEA-9A99-40FE-9334-5C01E8D540EC}</Project>
+      <Name>HeuristicLab.GP.Interfaces-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.GP\3.3\HeuristicLab.GP-3.3.csproj">
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/HeuristicLabGPBooleanPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/HeuristicLabGPBooleanPlugin.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/HeuristicLabGPBooleanPlugin.cs	(revision 2222)
@@ -28,9 +28,9 @@
   [ClassInfo(Name = "HeuristicLab.GP.Boolean-3.3")]
   [PluginFile(Filename = "HeuristicLab.GP.Boolean-3.3.dll", Filetype = PluginFileType.Assembly)]
-  [Dependency(Dependency = "HeuristicLab.Constraints-3.2")]
-  [Dependency(Dependency = "HeuristicLab.GP-3.3")]
   [Dependency(Dependency = "HeuristicLab.Core-3.2")]
   [Dependency(Dependency = "HeuristicLab.Data-3.2")]
   [Dependency(Dependency = "HeuristicLab.DataAnalysis-3.2")]
+  [Dependency(Dependency = "HeuristicLab.GP-3.3")]
+  [Dependency(Dependency = "HeuristicLab.GP.Interfaces-3.3")]
   [Dependency(Dependency = "HeuristicLab.Operators-3.2")]
   [Dependency(Dependency = "HeuristicLab.Random-3.2")]
Index: unk/sources/HeuristicLab.GP.Boolean/3.3/Nand.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Nand.cs	(revision 2221)
+++ 	(revision )
@@ -1,45 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.Boolean{
-  public sealed class Nand : FunctionBase {
-
-    public override string Description {
-      get { return ""; }
-    }
-
-    public Nand()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.Boolean/3.3/Nor.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Nor.cs	(revision 2221)
+++ 	(revision )
@@ -1,45 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.Boolean{
-  public sealed class Nor : FunctionBase {
-
-    public override string Description {
-      get { return ""; }
-    }
-
-    public Nor()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.Boolean/3.3/Not.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Not.cs	(revision 2221)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.Boolean{
-  public sealed class Not : FunctionBase {
-
-    public override string Description {
-      get { return ""; }
-    }
-
-    public Not()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.Boolean/3.3/Or.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Or.cs	(revision 2221)
+++ 	(revision )
@@ -1,45 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.Boolean{
-  public sealed class Or : FunctionBase {
-
-    public override string Description {
-      get { return ""; }
-    }
-
-    public Or()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.Boolean/3.3/SymbolTable.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/SymbolTable.cs	(revision 2221)
+++ 	(revision )
@@ -1,58 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using System.Xml;
-
-namespace HeuristicLab.GP.Boolean {
-  class SymbolTable : StorableBase {
-    public const int VARIABLE = 1;
-    public const int NOT = 2;
-    public const int AND = 3;
-    public const int OR = 4;
-    public const int NAND = 5;
-    public const int NOR = 6;
-    public const int XOR = 7;
-    public const int UNKNOWN = 8;
-    private static Dictionary<Type, int> staticTypes = new Dictionary<Type, int>();
-
-    // needs to be public for persistence mechanism (Activator.CreateInstance needs empty constructor)
-    static SymbolTable() {
-      staticTypes = new Dictionary<Type, int>();
-      staticTypes[typeof(Variable)] = VARIABLE;
-      staticTypes[typeof(Not)] = NOT;
-      staticTypes[typeof(And)] = AND;
-      staticTypes[typeof(Or)] = OR;
-      staticTypes[typeof(Nand)] = NAND;
-      staticTypes[typeof(Nor)] = NOR;
-      staticTypes[typeof(Xor)] = XOR;
-    }
-
-    internal static int MapFunction(IFunction function) {
-      if(staticTypes.ContainsKey(function.GetType())) return staticTypes[function.GetType()];
-      else return UNKNOWN;
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/And.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/And.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/And.cs	(revision 2222)
@@ -0,0 +1,26 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.Boolean{
+  public sealed class And : BinaryFunction {
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Nand.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Nand.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Nand.cs	(revision 2222)
@@ -0,0 +1,26 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.Boolean{
+  public sealed class Nand : BinaryFunction {
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Nor.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Nor.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Nor.cs	(revision 2222)
@@ -0,0 +1,25 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+namespace HeuristicLab.GP.Boolean{
+  public sealed class Nor : BinaryFunction {
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Not.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Not.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Not.cs	(revision 2222)
@@ -0,0 +1,25 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+namespace HeuristicLab.GP.Boolean{
+  public sealed class Not : UnaryFunction {
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Or.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Or.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Or.cs	(revision 2222)
@@ -0,0 +1,25 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+namespace HeuristicLab.GP.Boolean{
+  public sealed class Or : BinaryFunction {
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/SymbolTable.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/SymbolTable.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/SymbolTable.cs	(revision 2222)
@@ -0,0 +1,56 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Boolean {
+  class SymbolTable : StorableBase {
+    public const int VARIABLE = 1;
+    public const int NOT = 2;
+    public const int AND = 3;
+    public const int OR = 4;
+    public const int NAND = 5;
+    public const int NOR = 6;
+    public const int XOR = 7;
+    public const int UNKNOWN = 8;
+    private static Dictionary<Type, int> staticTypes = new Dictionary<Type, int>();
+
+    // needs to be public for persistence mechanism (Activator.CreateInstance needs empty constructor)
+    static SymbolTable() {
+      staticTypes = new Dictionary<Type, int>();
+      staticTypes[typeof(Variable)] = VARIABLE;
+      staticTypes[typeof(Not)] = NOT;
+      staticTypes[typeof(And)] = AND;
+      staticTypes[typeof(Or)] = OR;
+      staticTypes[typeof(Nand)] = NAND;
+      staticTypes[typeof(Nor)] = NOR;
+      staticTypes[typeof(Xor)] = XOR;
+    }
+
+    internal static int MapFunction(IFunction function) {
+      if(staticTypes.ContainsKey(function.GetType())) return staticTypes[function.GetType()];
+      else return UNKNOWN;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Variable.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Variable.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Variable.cs	(revision 2222)
@@ -0,0 +1,76 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Text;
+using HeuristicLab.Data;
+using HeuristicLab.Core;
+using System.Xml;
+using HeuristicLab.Operators;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.GP.Boolean {
+  public sealed class Variable : Terminal {
+    public const string VARIABLENAME = "Variable";
+
+    public Variable()
+      : base() {
+      SetupInitialization();
+      SetupManipulation();
+    }
+
+    public override HeuristicLab.GP.Interfaces.IFunctionTree GetTreeNode() {
+      return new VariableFunctionTree(this);
+    }
+
+    private void SetupInitialization() {
+      CombinedOperator combinedOp = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      UniformItemChooser variableRandomizer = new UniformItemChooser();
+      variableRandomizer.GetVariableInfo("Value").ActualName = VARIABLENAME;
+      variableRandomizer.GetVariableInfo("Values").ActualName = "InputVariables";
+      variableRandomizer.Name = "Variable randomizer";
+
+      combinedOp.OperatorGraph.AddOperator(seq);
+      combinedOp.OperatorGraph.AddOperator(variableRandomizer);
+      combinedOp.OperatorGraph.InitialOperator = seq;
+      seq.AddSubOperator(variableRandomizer);
+      Initializer = combinedOp;
+    }
+
+    private void SetupManipulation() {
+      // manipulation operator
+      CombinedOperator combinedOp = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      UniformItemChooser variableRandomizer = new UniformItemChooser();
+      variableRandomizer.GetVariableInfo("Value").ActualName = VARIABLENAME;
+      variableRandomizer.GetVariableInfo("Values").ActualName = "InputVariables";
+      variableRandomizer.Name = "Variable randomizer";
+
+      combinedOp.OperatorGraph.AddOperator(seq);
+      combinedOp.OperatorGraph.AddOperator(variableRandomizer);
+      combinedOp.OperatorGraph.InitialOperator = seq;
+      seq.AddSubOperator(variableRandomizer);
+      Manipulator = combinedOp;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/VariableFunctionTree.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/VariableFunctionTree.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/VariableFunctionTree.cs	(revision 2222)
@@ -0,0 +1,86 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.GP.Interfaces;
+using System.Xml;
+
+namespace HeuristicLab.GP.Boolean {
+  public class VariableFunctionTree : TerminalTreeNode {
+    public string VariableName { get; set; }
+
+    public VariableFunctionTree(Variable variable)
+      : base(variable) {
+    }
+
+    protected VariableFunctionTree(VariableFunctionTree original)
+      : base(original) {
+      VariableName = original.VariableName;
+    }
+
+    public override bool HasLocalParameters {
+      get {
+        return true;
+      }
+    }
+
+    public override IOperation CreateShakingOperation(IScope scope) {
+      Scope myVariableScope = new Scope();
+      scope.AddSubScope(myVariableScope);
+      myVariableScope.AddVariable(CreateVariableIndexVariable());
+      return new AtomicOperation(Function.Manipulator, myVariableScope);
+    }
+
+    public override IOperation CreateInitOperation(IScope scope) {
+      Scope myVariableScope = new Scope();
+      scope.AddSubScope(myVariableScope);
+      myVariableScope.AddVariable(CreateVariableIndexVariable());
+      return new AtomicOperation(Function.Initializer, myVariableScope);
+    }
+
+    public override object Clone() {
+      return new VariableFunctionTree(this);
+    }
+
+    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<System.Guid, IStorable> persistedObjects) {
+      XmlNode node = document.CreateElement(name);
+      XmlAttribute varAttr = document.CreateAttribute("Variable");
+      varAttr.Value = VariableName;
+      node.Attributes.Append(varAttr);
+      return node;
+    }
+
+    public override void Populate(XmlNode node, IDictionary<System.Guid, IStorable> restoredObjects) {
+      base.Populate(node, restoredObjects);
+      VariableName = node.Attributes["Variable"].Value;
+    }
+
+    private IVariable CreateVariableIndexVariable() {
+      StringData data = new StringData(VariableName);
+      data.Changed += (sender, args) => VariableName = data.Data;
+      var variable = new HeuristicLab.Core.Variable(Variable.VARIABLENAME, data);
+      variable.ValueChanged += (sender, args) => VariableName = ((StringData)variable.Value).Data;
+      return variable;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Xor.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Xor.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/Symbols/Xor.cs	(revision 2222)
@@ -0,0 +1,25 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+namespace HeuristicLab.GP.Boolean{
+  public sealed class Xor : BinaryFunction {
+  }
+}
Index: unk/sources/HeuristicLab.GP.Boolean/3.3/Variable.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Variable.cs	(revision 2221)
+++ 	(revision )
@@ -1,149 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Operators;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.GP.Boolean {
-  public sealed class Variable : FunctionBase {
-    public const string INDEX = "Variable";
-
-    private int minIndex;
-    private int maxIndex;
-
-    public override string Description {
-      get { return ""; }
-    }
-
-    public Variable()
-      : base() {
-      AddVariableInfo(new VariableInfo(INDEX, "Index of the variable in the dataset representing this feature", typeof(ConstrainedIntData), VariableKind.None));
-      GetVariableInfo(INDEX).Local = true;
-      AddVariableInfo(new VariableInfo(INITIALIZATION, "Initialization operator for variables", typeof(CombinedOperator), VariableKind.None));
-      GetVariableInfo(INITIALIZATION).Local = false;
-      AddVariableInfo(new VariableInfo(MANIPULATION, "Manipulation operator for variables", typeof(CombinedOperator), VariableKind.None));
-      GetVariableInfo(MANIPULATION).Local = false;
-
-      AddConstraint(new NumberOfSubOperatorsConstraint(0, 0));
-
-      ConstrainedIntData variable = new ConstrainedIntData();
-      AddVariable(new HeuristicLab.Core.Variable(INDEX, variable));
-      minIndex = 0; maxIndex = 100;
-
-      SetupInitialization();
-      SetupManipulation();
-
-    }
-
-    private void SetupInitialization() {
-      CombinedOperator combinedOp = new CombinedOperator();
-      SequentialProcessor seq = new SequentialProcessor();
-      UniformRandomizer indexRandomizer = new UniformRandomizer();
-      indexRandomizer.Min = minIndex;
-      indexRandomizer.Max = maxIndex + 1; // uniform randomizer generates numbers in the range [min, max[
-      indexRandomizer.GetVariableInfo("Value").ActualName = INDEX;
-      indexRandomizer.Name = "Index Randomizer";
-
-      combinedOp.OperatorGraph.AddOperator(seq);
-      combinedOp.OperatorGraph.AddOperator(indexRandomizer);
-      combinedOp.OperatorGraph.InitialOperator = seq;
-      seq.AddSubOperator(indexRandomizer);
-      HeuristicLab.Core.IVariable initOp = GetVariable(INITIALIZATION);
-      if(initOp == null) {
-        AddVariable(new HeuristicLab.Core.Variable(INITIALIZATION, combinedOp));
-      } else {
-        initOp.Value = combinedOp;
-      }
-    }
-
-    private void SetupManipulation() {
-      // manipulation operator
-      CombinedOperator combinedOp = new CombinedOperator();
-      SequentialProcessor seq = new SequentialProcessor();
-      UniformRandomizer indexRandomizer = new UniformRandomizer();
-      indexRandomizer.Min = minIndex;
-      indexRandomizer.Max = maxIndex + 1;
-      indexRandomizer.GetVariableInfo("Value").ActualName = INDEX;
-      indexRandomizer.Name = "Index Randomizer";
-
-      combinedOp.OperatorGraph.AddOperator(seq);
-      combinedOp.OperatorGraph.AddOperator(indexRandomizer);
-      combinedOp.OperatorGraph.InitialOperator = seq;
-      seq.AddSubOperator(indexRandomizer);
-      HeuristicLab.Core.IVariable manipulationOp = GetVariable(MANIPULATION);
-      if(manipulationOp == null) {
-        AddVariable(new HeuristicLab.Core.Variable(MANIPULATION, combinedOp));
-      } else {
-        manipulationOp.Value = combinedOp;
-      }
-    }
-
-    public void SetConstraints(int[] allowedIndexes) {
-      ConstrainedIntData index = GetVariableValue<ConstrainedIntData>(INDEX, null, false);
-      Array.Sort(allowedIndexes);
-      minIndex = allowedIndexes[0]; maxIndex = allowedIndexes[allowedIndexes.Length - 1];
-      List<IConstraint> constraints = new List<IConstraint>();
-      int start = allowedIndexes[0];
-      int prev = start;
-      for(int i = 1; i < allowedIndexes.Length; i++) {
-        if(allowedIndexes[i] != prev + 1) {
-          IntBoundedConstraint lastRange = new IntBoundedConstraint();
-          lastRange.LowerBound = start;
-          lastRange.LowerBoundEnabled = true;
-          lastRange.LowerBoundIncluded = true;
-          lastRange.UpperBound = prev;
-          lastRange.UpperBoundEnabled = true;
-          lastRange.UpperBoundIncluded = true;
-          constraints.Add(lastRange);
-          start = allowedIndexes[i];
-          prev = start;
-        }
-        prev = allowedIndexes[i];
-      }
-      IntBoundedConstraint range = new IntBoundedConstraint();
-      range.LowerBound = start;
-      range.LowerBoundEnabled = true;
-      range.LowerBoundIncluded = true;
-      range.UpperBound = prev;
-      range.UpperBoundEnabled = true;
-      range.UpperBoundIncluded = true;
-      constraints.Add(range);
-      if(constraints.Count > 1) {
-        OrConstraint or = new OrConstraint();
-        foreach(IConstraint c in constraints) or.Clauses.Add(c);
-        index.AddConstraint(or);
-      } else {
-        index.AddConstraint(constraints[0]);
-      }
-
-      SetupInitialization();
-      SetupManipulation();
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.Boolean/3.3/Xor.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/Xor.cs	(revision 2221)
+++ 	(revision )
@@ -1,45 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.Boolean{
-  public sealed class Xor : FunctionBase {
-
-    public override string Description {
-      get { return ""; }
-    }
-
-    public Xor()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP.Interfaces/3.3/HeuristicLab.GP.Interfaces-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.GP.Interfaces/3.3/HeuristicLab.GP.Interfaces-3.3.csproj	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Interfaces/3.3/HeuristicLab.GP.Interfaces-3.3.csproj	(revision 2222)
@@ -0,0 +1,124 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{924B6BEA-9A99-40FE-9334-5C01E8D540EC}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.GP.Interfaces</RootNamespace>
+    <AssemblyName>HeuristicLab.GP.Interfaces-3.3</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="IFunctionTreeNameGenerator.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="IFunctionTreeSerializer.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="IGeneticProgrammingModel.cs" />
+    <Compile Include="HeuristicLabGPInterfacesPlugin.cs" />
+    <Compile Include="IFunction.cs" />
+    <Compile Include="IFunctionTree.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
+      <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
+      <Name>HeuristicLab.Core-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /trunk/sources/HeuristicLab.GP.Interfaces/3.3/HeuristicLabGPInterfacesPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Interfaces/3.3/HeuristicLabGPInterfacesPlugin.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Interfaces/3.3/HeuristicLabGPInterfacesPlugin.cs	(revision 2222)
@@ -0,0 +1,33 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.GP.Interfaces {
+  [ClassInfo(Name = "HeuristicLab.GP.Interfaces-3.3")]
+  [PluginFile(Filename = "HeuristicLab.GP.Interfaces-3.3.dll", Filetype = PluginFileType.Assembly)]
+  [Dependency(Dependency = "HeuristicLab.Core-3.2")]
+  public class HeuristicLabGPInterfacesPlugin : PluginBase {
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IFunction.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IFunction.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IFunction.cs	(revision 2222)
@@ -0,0 +1,43 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Text;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.GP.Interfaces {
+  public interface IFunction : IItem {
+    string Name { get; }
+    IFunctionTree GetTreeNode();
+    ICollection<IFunction> GetAllowedSubFunctions(int index);
+    void AddAllowedSubFunction(IFunction f, int index);
+    void RemoveAllowedSubFunction(IFunction f, int index);
+    bool IsAllowedSubFunction(IFunction f, int index);
+    int MinSubTrees { get; }
+    int MaxSubTrees { get; }
+    int MinTreeHeight { get; }
+    int MinTreeSize { get; }
+    double Tickets { get; }
+    IOperator Initializer { get; }
+    IOperator Manipulator { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTree.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTree.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTree.cs	(revision 2222)
@@ -0,0 +1,40 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Text;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.GP.Interfaces {
+  public interface IFunctionTree : IStorable {
+    bool HasLocalParameters { get; }
+    IList<IFunctionTree> SubTrees { get; }
+    IFunction Function { get; }
+    IOperation CreateShakingOperation(IScope scope);
+    IOperation CreateInitOperation(IScope scope);
+    int GetSize();
+    int GetHeight();
+    void AddSubTree(IFunctionTree tree);
+    void InsertSubTree(int index, IFunctionTree tree);
+    void RemoveSubTree(int index);
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTreeNameGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTreeNameGenerator.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTreeNameGenerator.cs	(revision 2222)
@@ -0,0 +1,32 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Text;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.GP.Interfaces {
+  public interface IFunctionTreeNameGenerator {
+    string Name { get; }
+    string GetName(IFunctionTree tree);
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTreeSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTreeSerializer.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTreeSerializer.cs	(revision 2222)
@@ -0,0 +1,33 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Text;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.GP.Interfaces {
+  public interface IFunctionTreeSerializer {
+    string Name { get; }
+    string Export(IFunctionTree tree);
+    bool TryExport(IFunctionTree tree, out string exported);
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IGeneticProgrammingModel.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IGeneticProgrammingModel.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Interfaces/3.3/IGeneticProgrammingModel.cs	(revision 2222)
@@ -0,0 +1,33 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Text;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.GP.Interfaces {
+  public interface IGeneticProgrammingModel : IItem {
+    IFunctionTree FunctionTree { get; set; }
+    int Size { get; set; }
+    int Height { get; set; }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Interfaces/3.3/Properties/AssemblyInfo.frame
===================================================================
--- /trunk/sources/HeuristicLab.GP.Interfaces/3.3/Properties/AssemblyInfo.frame	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Interfaces/3.3/Properties/AssemblyInfo.frame	(revision 2222)
@@ -0,0 +1,58 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using HeuristicLab.PluginInfrastructure;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.GP.Interfaces")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2008 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("863021a4-3cde-48be-8af6-dac1077f5fb5")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.$WCREV$")]
+[assembly: AssemblyFileVersion("3.3.0.$WCREV$")]
+[assembly: AssemblyBuildDate("$WCNOW$")]
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/EqualiserController.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/EqualiserController.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/EqualiserController.cs	(revision 2222)
@@ -0,0 +1,57 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.GP.Operators {
+  public class EqualiserController : OperatorBase {
+    public override string Description {
+      get { return @"TODO\r\nOperator description still missing ..."; }
+    }
+
+    public EqualiserController() {
+      AddVariableInfo(new VariableInfo("EqualiserHistogram", "Histogram of the target distribution", typeof(DoubleArrayData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("AcceptanceProbabilities", "Acceptance probabilities of individuals falling into bins", typeof(DoubleArrayData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("Histogram", "The histogram of the actual distribution", typeof(IntArrayData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("Rate", "Parameter that controls the convergence rate of the population to the equalised distribution", typeof(DoubleData), VariableKind.In));
+    }
+
+    public override IOperation Apply(IScope scope) {
+      DoubleArrayData equaliserHistogram = GetVariableValue<DoubleArrayData>("EqualiserHistogram", scope, true);
+      DoubleArrayData acceptanceProbabilities = GetVariableValue<DoubleArrayData>("AcceptanceProbabilities", scope, false, false);
+      IntArrayData currentHistogram = GetVariableValue<IntArrayData>("Histogram", scope, false, false);
+      double rate = GetVariableValue<DoubleData>("Rate", scope, false, false).Data;
+
+      double sum = 0.0;
+      Array.ForEach(currentHistogram.Data, delegate(int i) { sum += i; });
+      for(int i = 0; i < acceptanceProbabilities.Data.Length; i++) {
+        double normalizedDiff = (equaliserHistogram.Data[i] - (currentHistogram.Data[i] / sum)) / equaliserHistogram.Data[i];
+        acceptanceProbabilities.Data[i] = acceptanceProbabilities.Data[i] + normalizedDiff * rate;
+        currentHistogram.Data[i] = 0;
+      }
+      currentHistogram.FireChanged();
+      acceptanceProbabilities.FireChanged();
+      return null;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/HeuristicLab.GP.Operators-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/HeuristicLab.GP.Operators-3.3.csproj	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/HeuristicLab.GP.Operators-3.3.csproj	(revision 2222)
@@ -0,0 +1,164 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.GP.Operators</RootNamespace>
+    <AssemblyName>HeuristicLab.GP.Operators-3.3</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Util.cs" />
+    <Compile Include="EqualiserController.cs" />
+    <Compile Include="HeuristicLabGPOperatorsPlugin.cs" />
+    <Compile Include="Initialization\ProbabilisticTreeCreator.cs" />
+    <Compile Include="Initialization\RampedTreeCreator.cs" />
+    <Compile Include="Logging\TreeArityAnalyser.cs" />
+    <Compile Include="Manipulation\ChangeNodeTypeManipulation.cs" />
+    <Compile Include="Manipulation\CutOutNodeManipulation.cs" />
+    <Compile Include="Manipulation\DeleteSubTreeManipulation.cs" />
+    <Compile Include="Manipulation\FullTreeShaker.cs" />
+    <Compile Include="Manipulation\GPManipulatorBase.cs" />
+    <Compile Include="Manipulation\OnePointShaker.cs" />
+    <Compile Include="Manipulation\SubstituteSubTreeManipulation.cs" />
+    <Compile Include="OffspringEqualiser.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Recombination\GPCrossoverBase.cs" />
+    <Compile Include="Recombination\LangdonHomologousCrossOver.cs" />
+    <Compile Include="Recombination\OnePointCrossOver.cs" />
+    <Compile Include="Recombination\SizeConstrictedGPCrossoverBase.cs" />
+    <Compile Include="Recombination\SizeFairCrossOver.cs" />
+    <Compile Include="Recombination\StandardCrossOver.cs" />
+    <Compile Include="Recombination\UniformCrossover.cs" />
+    <Compile Include="TrainingWindowSlider.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
+      <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
+      <Name>HeuristicLab.Core-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.2\HeuristicLab.Data-3.2.csproj">
+      <Project>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</Project>
+      <Name>HeuristicLab.Data-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Evolutionary\3.2\HeuristicLab.Evolutionary-3.2.csproj">
+      <Project>{F5614C53-153C-4A37-A608-121E1C087F07}</Project>
+      <Name>HeuristicLab.Evolutionary-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.GP.Interfaces\3.3\HeuristicLab.GP.Interfaces-3.3.csproj">
+      <Project>{924B6BEA-9A99-40FE-9334-5C01E8D540EC}</Project>
+      <Name>HeuristicLab.GP.Interfaces-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.GP\3.3\HeuristicLab.GP-3.3.csproj">
+      <Project>{1F1CF3ED-374C-4288-995B-93F6B872F571}</Project>
+      <Name>HeuristicLab.GP-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Operators\3.2\HeuristicLab.Operators-3.2.csproj">
+      <Project>{A9983BA2-B3B2-475E-8E2C-62050B71D1C5}</Project>
+      <Name>HeuristicLab.Operators-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Random\3.2\HeuristicLab.Random-3.2.csproj">
+      <Project>{47019A74-F7F7-482E-83AA-D3F4F777E879}</Project>
+      <Name>HeuristicLab.Random-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Selection\3.2\HeuristicLab.Selection-3.2.csproj">
+      <Project>{F7CF0571-25CB-43D5-8443-0843A1E2861A}</Project>
+      <Name>HeuristicLab.Selection-3.2</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/HeuristicLabGPOperatorsPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/HeuristicLabGPOperatorsPlugin.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/HeuristicLabGPOperatorsPlugin.cs	(revision 2222)
@@ -0,0 +1,40 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.GP.Operators {
+  [ClassInfo(Name = "HeuristicLab.GP.Operators-3.3")]
+  [PluginFile(Filename = "HeuristicLab.GP.Operators-3.3.dll", Filetype = PluginFileType.Assembly)]
+  [Dependency(Dependency = "HeuristicLab.Core-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Data-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Evolutionary-3.2")]
+  [Dependency(Dependency = "HeuristicLab.GP-3.3")]
+  [Dependency(Dependency = "HeuristicLab.GP.Interfaces-3.3")]
+  [Dependency(Dependency = "HeuristicLab.Operators-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Random-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Selection-3.2")]
+  public class HeuristicLabGPOperatorsPlugin : PluginBase {
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Initialization/ProbabilisticTreeCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Initialization/ProbabilisticTreeCreator.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Initialization/ProbabilisticTreeCreator.cs	(revision 2222)
@@ -0,0 +1,70 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Random;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  public class ProbabilisticTreeCreator : OperatorBase {
+    private int MAX_TRIES { get { return 100; } }
+
+    public override string Description {
+      get { return @"Generates a new random operator tree."; }
+    }
+
+    public ProbabilisticTreeCreator()
+      : base() {
+      AddVariableInfo(new VariableInfo("Random", "Uniform random number generator", typeof(MersenneTwister), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionLibrary", "The function library containing all available functions", typeof(FunctionLibrary), VariableKind.In));
+      AddVariableInfo(new VariableInfo("MinTreeSize", "The minimal allowed size of the tree", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("MaxTreeSize", "The maximal allowed size of the tree", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionTree", "The created tree", typeof(IGeneticProgrammingModel), VariableKind.New | VariableKind.Out));
+    }
+
+    public override IOperation Apply(IScope scope) {
+      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
+      FunctionLibrary funLibrary = GetVariableValue<FunctionLibrary>("FunctionLibrary", scope, true);
+      int minTreeSize = GetVariableValue<IntData>("MinTreeSize", scope, true).Data;
+      int maxTreeSize = GetVariableValue<IntData>("MaxTreeSize", scope, true).Data;
+      int maxTreeHeight = GetVariableValue<IntData>("MaxTreeHeight", scope, true).Data;
+
+      int treeSize = random.Next(minTreeSize, maxTreeSize + 1);
+      IFunctionTree root;
+      int tries = 0;
+      TreeGardener gardener = new TreeGardener(random, funLibrary);
+      do {
+        root = gardener.PTC2(treeSize, maxTreeHeight);
+        if (tries++ >= MAX_TRIES) {
+          // try a different size
+          treeSize = random.Next(minTreeSize, maxTreeSize + 1);
+          tries = 0;
+        }
+      } while (root.GetSize() > maxTreeSize || root.GetHeight() > maxTreeHeight);
+
+      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("FunctionTree"), new GeneticProgrammingModel(root)));
+      return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(root), scope);
+    }
+
+ }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Initialization/RampedTreeCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Initialization/RampedTreeCreator.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Initialization/RampedTreeCreator.cs	(revision 2222)
@@ -0,0 +1,70 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Core;
+using HeuristicLab.Data;
+using System;
+using HeuristicLab.Random;
+using System.Diagnostics;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  public class RampedTreeCreator : OperatorBase {
+    public override string Description {
+      get { return @"Generates a new random operator tree."; }
+    }
+
+    public RampedTreeCreator()
+      : base() {
+      AddVariableInfo(new VariableInfo("Random", "Uniform random number generator", typeof(MersenneTwister), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionLibrary", "The function library containing all available functions", typeof(FunctionLibrary), VariableKind.In));
+      AddVariableInfo(new VariableInfo("MinTreeHeight", "The minimal allowed height of the tree", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("BalancedTreesRate", "Determines how many trees should be balanced", typeof(DoubleData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionTree", "The created tree", typeof(IGeneticProgrammingModel), VariableKind.New | VariableKind.Out));
+      AddVariableInfo(new VariableInfo("TreeSize", "The size (number of nodes) of the tree", typeof(IntData), VariableKind.New | VariableKind.Out));
+      AddVariableInfo(new VariableInfo("TreeHeight", "The height of the tree", typeof(IntData), VariableKind.New | VariableKind.Out));
+    }
+
+    public override IOperation Apply(IScope scope) {
+      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
+      FunctionLibrary opLibrary = GetVariableValue<FunctionLibrary>("FunctionLibrary", scope, true);
+      int minTreeHeight = GetVariableValue<IntData>("MinTreeHeight", scope, true).Data;
+      int maxTreeHeight = GetVariableValue<IntData>("MaxTreeHeight", scope, true).Data;
+      double balancedTreesRate = GetVariableValue<DoubleData>("BalancedTreesRate", scope, true).Data;
+
+      TreeGardener gardener = new TreeGardener(random, opLibrary);
+
+      int treeHeight = random.Next(minTreeHeight, maxTreeHeight + 1);
+      IFunctionTree root;
+      if(random.NextDouble() <= balancedTreesRate) {
+        root = gardener.CreateBalancedRandomTree(Int32.MaxValue, treeHeight);
+      } else {
+        root = gardener.CreateUnbalancedRandomTree(Int32.MaxValue, treeHeight);
+      }
+
+      Debug.Assert(gardener.IsValidTree(root) && root.GetHeight() <= maxTreeHeight);
+
+      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("FunctionTree"), new GeneticProgrammingModel(root)));
+      return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(root), scope);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Logging/TreeArityAnalyser.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Logging/TreeArityAnalyser.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Logging/TreeArityAnalyser.cs	(revision 2222)
@@ -0,0 +1,115 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  /// <summary>
+  /// Creates a histogram of the arities of functions used in the whole GP population.
+  /// </summary>
+  public class TreeArityAnalyser : OperatorBase {
+    public override string Description {
+      get {
+        return @"Creates a histogram of the arities of functions used in the whole GP population.";
+      }
+    }
+    public TreeArityAnalyser()
+      : base() {
+      AddVariableInfo(new VariableInfo("FunctionTree", "The tree to analyse", typeof(IGeneticProgrammingModel), VariableKind.In));
+      AddVariableInfo(new VariableInfo("Histogram", "The histogram of arities over all functions in all functiontrees", typeof(ItemList<ItemList<IntData>>), VariableKind.New | VariableKind.Out));
+    }
+
+    public override IOperation Apply(IScope scope) {
+      ItemList<ItemList<IntData>> histogram = GetVariableValue<ItemList<ItemList<IntData>>>("Histogram", scope, false, false);
+      if(histogram == null) {
+        histogram = new ItemList<ItemList<IntData>>();
+        IVariableInfo info = GetVariableInfo("Histogram");
+        if(info.Local)
+          AddVariable(new HeuristicLab.Core.Variable(info.ActualName, histogram));
+        else
+          scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(info.FormalName), histogram));
+      } else {
+        histogram.Clear();
+      }
+
+      foreach(IScope subScope in scope.SubScopes) {
+        ItemList<ItemList<IntData>> subHistogram = GetArityHistogram(subScope);
+        MergeHistogram(subHistogram, histogram);
+      }
+
+      return null;
+    }
+
+    private ItemList<ItemList<IntData>> GetArityHistogram(IScope subScope) {
+      IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", subScope, false);
+      List<int> arities = new List<int>();
+      Arities(gpModel.FunctionTree, arities);
+      var histogram = arities.GroupBy(x => x, (g, xs) => new { Group = g, Count = xs.Count() }).OrderBy(g=>g.Group); // count number of distinct arities
+      ItemList<ItemList<IntData>> result = new ItemList<ItemList<IntData>>();
+      
+      // translate enumerable to itemlist
+      histogram.Aggregate(result, (r, g) => { 
+        ItemList<IntData> entry = new ItemList<IntData>(); 
+        entry.Add(new IntData(g.Group));
+        entry.Add(new IntData(g.Count));
+        r.Add(entry); return r; 
+      });
+      return result;
+    }
+
+    private void Arities(IFunctionTree tree, List<int> arities) {
+      arities.Add(tree.SubTrees.Count);
+      foreach(IFunctionTree subTree in tree.SubTrees) {
+        Arities(subTree, arities);
+      }
+    }
+
+    private void MergeHistogram(ItemList<ItemList<IntData>> srcHistogram, ItemList<ItemList<IntData>> dstHistogram) {
+      int j = 0;
+      for(int i = 0; i < srcHistogram.Count; i++) {
+        int g = srcHistogram[i][0].Data;
+        int c = srcHistogram[i][1].Data;
+        int dstG, dstC;
+        if(j < dstHistogram.Count) {
+          dstG = dstHistogram[j][0].Data;
+          dstC = dstHistogram[j][1].Data;
+        } else {
+          dstG = int.MaxValue;
+          dstC = 0;
+        }
+        if(g < dstG) {
+          // new group before the current group
+          if(j < dstHistogram.Count)
+            dstHistogram.Insert(j, srcHistogram[i]);
+          else
+            dstHistogram.Add(srcHistogram[i]);
+        } else if(g == dstG) {
+          dstHistogram[j][1] = new IntData(c + dstC);
+        }
+        j++;
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/ChangeNodeTypeManipulation.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/ChangeNodeTypeManipulation.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/ChangeNodeTypeManipulation.cs	(revision 2222)
@@ -0,0 +1,169 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Random;
+using System.Diagnostics;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  public class ChangeNodeTypeManipulation : GPManipulatorBase {
+
+    public override string Description {
+      get {
+        return @"This manipulation operator selects a random tree-node and changes the function type.
+If this leads to a constraint-violation (wrong number or type of sub-trees) the sub-trees are repaired
+resulting in a valid tree again.";
+      }
+    }
+
+    public ChangeNodeTypeManipulation()
+      : base() {
+    }
+
+    internal override IOperation Manipulate(MersenneTwister random, IGeneticProgrammingModel gpModel, FunctionLibrary library, int maxTreeSize, int maxTreeHeight, IScope scope) {
+      TreeGardener gardener = new TreeGardener(random, library);
+      IFunctionTree parent = gardener.GetRandomParentNode(gpModel.FunctionTree);
+      IFunctionTree selectedChild;
+      int selectedChildIndex;
+      if (parent == null) {
+        selectedChildIndex = 0;
+        selectedChild = gpModel.FunctionTree;
+      } else {
+        selectedChildIndex = random.Next(parent.SubTrees.Count);
+        selectedChild = parent.SubTrees[selectedChildIndex];
+      }
+
+      if (selectedChild.SubTrees.Count == 0) {
+        IFunctionTree newTerminal = ChangeTerminalType(parent, selectedChild, selectedChildIndex, gardener, random);
+        if (parent == null) {
+          // no parent means the new child is the initial operator
+          gpModel.FunctionTree = newTerminal;
+        } else {
+          parent.RemoveSubTree(selectedChildIndex);
+          parent.InsertSubTree(selectedChildIndex, newTerminal);
+          // updating the variable is not necessary because it stays the same
+        }
+        Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
+        // size and height stays the same when changing a terminal so no need to update the variables
+        // schedule an operation to initialize the new terminal
+        return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTerminal), scope);
+      } else {
+        List<IFunctionTree> uninitializedBranches;
+        IFunctionTree newFunctionTree = ChangeFunctionType(parent, selectedChild, selectedChildIndex, gardener, random, out uninitializedBranches);
+        // in rare cases the function creates a tree that breaks the size limits
+        // calculate the height and size difference and 
+        // check if the size of the new tree is still in the allowed bounds
+        int oldChildSize = selectedChild.GetSize();
+        int oldChildHeight = selectedChild.GetHeight();
+        int newChildSize = newFunctionTree.GetSize();
+        int newChildHeight = newFunctionTree.GetHeight();
+        if ((gpModel.Height - oldChildHeight) + newChildHeight > maxTreeHeight ||
+          (gpModel.Size - oldChildSize) + newChildSize > maxTreeSize) {
+          // if size-constraints are violated don't change anything
+          return null;
+        }
+        if (parent == null) {
+          // no parent means the new function is the initial operator
+          gpModel.FunctionTree = newFunctionTree;
+        } else {
+          // remove the old child
+          parent.RemoveSubTree(selectedChildIndex);
+          // add the new child as sub-tree of parent
+          parent.InsertSubTree(selectedChildIndex, newFunctionTree);
+        }
+        // update size and height
+        gpModel.Size = gpModel.Size - oldChildSize + newChildSize;
+        gpModel.Height = gpModel.FunctionTree.GetHeight(); // must recalculate height because we can't know wether the manipulated branch was the deepest branch
+        // check if whole tree is ok
+        Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
+        // return a composite operation that initializes all created sub-trees
+        return Util.CreateInitializationOperation(uninitializedBranches, scope);
+      }
+    }
+
+    private IFunctionTree ChangeTerminalType(IFunctionTree parent, IFunctionTree child, int childIndex, TreeGardener gardener, MersenneTwister random) {
+      IList<IFunction> allowedTerminals;
+      if (parent == null) {
+        allowedTerminals = gardener.Terminals;
+      } else {
+        allowedTerminals = new List<IFunction>();
+        var allAllowedChildren = gardener.GetAllowedSubFunctions(parent.Function, childIndex);
+        foreach (IFunction c in allAllowedChildren) {
+          if (TreeGardener.IsTerminal(c)) allowedTerminals.Add(c);
+        }
+      }
+      // selecting from the terminals should always work since the current child was also a terminal
+      // so in the worst case we will just create a new terminal of the same type again.
+      return gardener.CreateRandomTree(allowedTerminals, 1, 1);
+    }
+
+    private IFunctionTree ChangeFunctionType(IFunctionTree parent, IFunctionTree child, int childIndex, TreeGardener gardener, MersenneTwister random,
+      out List<IFunctionTree> uninitializedBranches) {
+      // since there are subtrees, we have to check which 
+      // and how many of the existing subtrees we can reuse.
+      // first let's choose the function we want to use instead of the old child. For this we have to determine the
+      // pool of allowed functions based on constraints of the parent if there is one.
+      List<IFunction> allowedFunctions = new List<IFunction>(gardener.GetAllowedSubFunctions(parent != null ? parent.Function : null, childIndex));
+      // try to make a tree with the same arity as the old child.
+      int actualArity = child.SubTrees.Count;
+      // create a new tree-node for a randomly selected function
+      IFunction selectedFunction = allowedFunctions[random.Next(allowedFunctions.Count)];
+      // arity of the selected operator
+      int minArity = selectedFunction.MinSubTrees;
+      int maxArity = selectedFunction.MaxSubTrees;
+      // if the old child had too many sub-trees then the new child should keep as many sub-trees as possible
+      if (actualArity > maxArity)
+        actualArity = maxArity;
+      if (actualArity < minArity)
+        actualArity = minArity;
+      // create a list that holds old sub-trees that we can reuse in the new tree
+      List<IFunctionTree> availableSubTrees = new List<IFunctionTree>(child.SubTrees);
+      List<IFunctionTree> freshSubTrees = new List<IFunctionTree>();
+      IFunctionTree newTree = selectedFunction.GetTreeNode();
+      // randomly select the sub-trees that we keep
+      for (int i = 0; i < actualArity; i++) {
+        // fill all sub-tree slots of the new tree
+        // if for a given slot i there are multiple existing sub-trees that can be used in that slot
+        // then use a random existing sub-tree. When there are no existing sub-trees
+        // that fit in the given slot then create a new random tree and use it for the slot
+        ICollection<IFunction> allowedSubFunctions = gardener.GetAllowedSubFunctions(selectedFunction, i);
+        var matchingSubTrees = availableSubTrees.Where(subTree => allowedSubFunctions.Contains(subTree.Function));
+        if (matchingSubTrees.Count() > 0) {
+          IFunctionTree selectedSubTree = matchingSubTrees.ElementAt(random.Next(matchingSubTrees.Count()));
+          // we can just add it as subtree
+          newTree.InsertSubTree(i, selectedSubTree);
+          availableSubTrees.Remove(selectedSubTree); // the branch shouldn't be available for the following slots
+        } else {
+          // no existing matching tree found => create a new tree of minimal size
+          IFunctionTree freshTree = gardener.CreateRandomTree(allowedSubFunctions, 1, 1);
+          freshSubTrees.AddRange(TreeGardener.GetAllSubTrees(freshTree));
+          newTree.InsertSubTree(i, freshTree);
+        }
+      }
+      freshSubTrees.Add(newTree);
+      uninitializedBranches = freshSubTrees;
+      return newTree;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/CutOutNodeManipulation.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/CutOutNodeManipulation.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/CutOutNodeManipulation.cs	(revision 2222)
@@ -0,0 +1,111 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Random;
+using System.Diagnostics;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  public class CutOutNodeManipulation : GPManipulatorBase {
+    public override string Description {
+      get {
+        return @"Takes a tree, selects a random node of the tree and then tries to replace a random sub-tree
+of that node with one of the childs of the selected child.
+
+               O                             O
+              / \                           / \
+             O   X                         O   2
+                / \    2 is selected =>       / \
+               1   2                         4   5
+              /   / \
+             3   4   5
+";
+      }
+    }
+
+    public CutOutNodeManipulation()
+      : base() {
+    }
+
+
+    internal override IOperation Manipulate(MersenneTwister random, IGeneticProgrammingModel gpModel, FunctionLibrary library, int maxTreeSize, int maxTreeHeight, IScope scope) {
+      TreeGardener gardener = new TreeGardener(random, library);
+      IFunctionTree parent = gardener.GetRandomParentNode(gpModel.FunctionTree);
+      // parent == null means we should cut out the root node
+      // => return a random sub-tree of the root
+      if (parent == null) {
+        // when there are sub-trees then replace the old tree with a random sub-tree
+        if (gpModel.FunctionTree.SubTrees.Count > 0) {
+          gpModel.FunctionTree = gpModel.FunctionTree.SubTrees[random.Next(gpModel.FunctionTree.SubTrees.Count)];
+          Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
+          // we reused a sub-tree so we don't have to schedule initialization operations
+          return null;
+        } else {
+          // we want to cut the root node and there are no sub-trees => create a new random terminal
+          gpModel.FunctionTree = gardener.CreateRandomTree(gardener.Terminals, 1, 1);
+          Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
+
+          // schedule an operation to initialize the whole tree
+          return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(gpModel.FunctionTree), scope);
+        }
+      }
+
+      // select a child to cut away
+      int childIndex = random.Next(parent.SubTrees.Count);
+      IFunctionTree child = parent.SubTrees[childIndex];
+      // match the sub-trees of the child with the allowed sub-trees of the parent
+      ICollection<IFunction> allowedFunctions = gardener.GetAllowedSubFunctions(parent.Function, childIndex);
+      IFunctionTree[] possibleChilds = child.SubTrees.Where(t => allowedFunctions.Contains(t.Function)).ToArray();
+      if (possibleChilds.Length > 0) {
+        // replace child with a random child of that child
+        IFunctionTree selectedChild = possibleChilds[random.Next(possibleChilds.Length)];
+        parent.RemoveSubTree(childIndex);
+        parent.InsertSubTree(childIndex, selectedChild);
+        Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
+        // recalculate the size and height of our tree
+        gpModel.Size = gpModel.FunctionTree.GetSize();
+        gpModel.Height = gpModel.FunctionTree.GetHeight();
+        // don't need to schedule initialization operations
+        return null;
+      } else {
+        // can't reuse an existing branch => create a new tree
+        // determine the level of the parent
+        int parentLevel = gardener.GetBranchLevel(gpModel.FunctionTree, parent);
+        // first remove the old child (first step essential!)
+        parent.RemoveSubTree(childIndex);
+        // then determine the number of nodes left over after the child has been removed!
+        int remainingNodes = gpModel.FunctionTree.GetSize();
+        allowedFunctions = gardener.GetAllowedSubFunctions(parent.Function, childIndex);
+        IFunctionTree newFunctionTree = gardener.CreateRandomTree(allowedFunctions, maxTreeSize - remainingNodes, maxTreeHeight - parentLevel);
+        parent.InsertSubTree(childIndex, newFunctionTree);
+        Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
+        // recalculate size and height
+        gpModel.Size = gpModel.FunctionTree.GetSize();
+        gpModel.Height = gpModel.FunctionTree.GetHeight();
+        // schedule an initialization operation for the new function-tree
+        return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newFunctionTree), scope);
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/DeleteSubTreeManipulation.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/DeleteSubTreeManipulation.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/DeleteSubTreeManipulation.cs	(revision 2222)
@@ -0,0 +1,87 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Random;
+using System.Diagnostics;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  public class DeleteSubTreeManipulation : GPManipulatorBase {
+    public override string Description {
+      get {
+        return @"Deletes a random sub-tree of the input tree. If the remaining tree is not valid 
+the operator tries to fix the tree by generating random subtrees where necessary.";
+      }
+    }
+
+    public DeleteSubTreeManipulation()
+      : base() {
+    }
+
+    internal override IOperation Manipulate(MersenneTwister random, IGeneticProgrammingModel gpModel, FunctionLibrary library, int maxTreeSize, int maxTreeHeight, IScope scope) {
+      TreeGardener gardener = new TreeGardener(random, library);
+      IFunctionTree parent = gardener.GetRandomParentNode(gpModel.FunctionTree);
+
+      // parent==null means the whole tree should be deleted.
+      // => return a new minimal random tree
+      if (parent == null) {
+        IFunctionTree newTree = gardener.CreateBalancedRandomTree(1, 1);
+        // check if the tree is ok
+        Debug.Assert(gardener.IsValidTree(newTree));
+        gpModel.FunctionTree = newTree;
+        // schedule an operation to initialize the newly created operator
+        return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTree), scope);
+      }
+
+      // select a branch to prune
+      int childIndex = random.Next(parent.SubTrees.Count);
+      if (parent.SubTrees.Count > parent.Function.MinSubTrees) {
+        parent.RemoveSubTree(childIndex);
+        // actually since the next sub-trees are shifted in the place of the removed branch
+        // it might be possible that these sub-trees are not allowed in the place of the old branch
+        // we ignore this problem for now.
+        // when this starts to become a problem a possible solution is to go through the shifted branches from the place of the shifted
+        // and find the first one that doesn't fit. At this position we insert a new randomly initialized subtree of matching type (gkronber 25.12.07)
+
+        Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
+        // recalculate size and height
+        gpModel.Size = gpModel.FunctionTree.GetSize();
+        gpModel.Height = gpModel.FunctionTree.GetHeight();
+        // root hasn't changed so don't need to update 'FunctionTree' variable
+        return null;
+      } else {
+        // replace with a minimal random seedling
+        parent.RemoveSubTree(childIndex);
+        ICollection<IFunction> allowedFunctions = gardener.GetAllowedSubFunctions(parent.Function, childIndex);
+        IFunctionTree newFunctionTree = gardener.CreateRandomTree(allowedFunctions, 1, 1);
+        parent.InsertSubTree(childIndex, newFunctionTree);
+        Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
+        // recalculate size and height
+        gpModel.Size = gpModel.FunctionTree.GetSize();
+        gpModel.Height = gpModel.FunctionTree.GetHeight();
+        // return an initialization operation for the newly created tree
+        return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newFunctionTree), scope);
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/FullTreeShaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/FullTreeShaker.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/FullTreeShaker.cs	(revision 2222)
@@ -0,0 +1,76 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Random;
+using HeuristicLab.Data;
+using HeuristicLab.GP.Interfaces;
+using HeuristicLab.Selection;
+
+namespace HeuristicLab.GP.Operators {
+  public class FullTreeShaker : DelegatingOperator {
+    public override string Description {
+      get { return "Manipulates all tree nodes for which a manipulator is defined."; }
+    }
+
+    public FullTreeShaker()
+      : base() {
+      AddVariableInfo(new VariableInfo("Random", "A random generator (uniform)", typeof(MersenneTwister), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionLibrary", "Function library that defines function mutations", typeof(FunctionLibrary), VariableKind.In));
+      AddVariableInfo(new VariableInfo("ShakingFactor", "Variable that determines the force of the shaking operation", typeof(DoubleData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be mutated", typeof(IGeneticProgrammingModel), VariableKind.In | VariableKind.Out));
+    }
+
+    public override IOperation Apply(IScope scope) {
+      FunctionLibrary library = GetVariableValue<FunctionLibrary>("FunctionLibrary", scope, true);
+      IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope, false);
+      MersenneTwister mt = GetVariableValue<MersenneTwister>("Random", scope, true);
+
+      // save all existing sub-scopes in a backup scope
+      Scope backupScope = new Scope("backup");
+      foreach (Scope subScope in scope.SubScopes) {
+        backupScope.AddSubScope(subScope);
+      }
+
+      // create a scope for all shaking operations
+      Scope tempScope = new Scope("Temp. manipulation scope");
+      scope.AddSubScope(tempScope); // scope containing a subscope for each manipulation
+      scope.AddSubScope(backupScope); // scope containing the old subscopes
+
+      // create a composite operation for all shaking operations
+      CompositeOperation next = new CompositeOperation();
+      next.ExecuteInParallel = false;
+
+      // enqueue all shaking operations
+      foreach (IFunctionTree subTree in TreeGardener.GetAllSubTrees(gpModel.FunctionTree).Where(x=>x.HasLocalParameters)) {
+        IOperation shakingOperation = subTree.CreateShakingOperation(tempScope);
+        next.AddOperation(shakingOperation);
+      }
+
+      // schedule a reducer operation to delete all temporary scopes and restore
+      // the subscopes of the backup scope after all manipulations are finished.
+      next.AddOperation(new AtomicOperation(new RightReducer(), scope));
+      return next;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/GPManipulatorBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/GPManipulatorBase.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/GPManipulatorBase.cs	(revision 2222)
@@ -0,0 +1,50 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Core;
+using HeuristicLab.Random;
+using HeuristicLab.Data;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  public abstract class GPManipulatorBase : OperatorBase {
+    public GPManipulatorBase()
+      : base() {
+      AddVariableInfo(new VariableInfo("Random", "Uniform random number generator", typeof(MersenneTwister), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionLibrary", "The operator library containing all available operators", typeof(FunctionLibrary), VariableKind.In));
+      AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("MaxTreeSize", "The maximal allowed size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionTree", "The tree to crossover", typeof(IGeneticProgrammingModel), VariableKind.In | VariableKind.New));
+    }
+
+    internal abstract IOperation Manipulate(MersenneTwister random, IGeneticProgrammingModel gpModel, FunctionLibrary library, int maxSize, int maxHeight, IScope scope);
+
+    public override IOperation Apply(IScope scope) {
+      FunctionLibrary funLibrary = GetVariableValue<FunctionLibrary>("FunctionLibrary", scope, true);
+      IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope, false);
+      MersenneTwister random = GetVariableValue<MersenneTwister>("Random", scope, true);
+      int maxTreeSize = GetVariableValue<IntData>("MaxTreeSize", scope, true).Data;
+      int maxTreeHeight = GetVariableValue<IntData>("MaxTreeHeight", scope, true).Data;
+
+      return Manipulate(random, gpModel, funLibrary, maxTreeSize, maxTreeHeight, scope);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/OnePointShaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/OnePointShaker.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/OnePointShaker.cs	(revision 2222)
@@ -0,0 +1,76 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Random;
+using HeuristicLab.Data;
+using HeuristicLab.Selection;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  public class OnePointShaker : DelegatingOperator {
+    public override string Description {
+      get { return "Selects a random node of all tree-nodes that have a manipulator defined and manipulates the selected node."; }
+    }
+
+    public OnePointShaker()
+      : base() {
+      AddVariableInfo(new VariableInfo("FunctionLibrary", "Function library that defines mutation operations for functions", typeof(FunctionLibrary), VariableKind.In));
+      AddVariableInfo(new VariableInfo("Random", "A random generator (uniform)", typeof(MersenneTwister), VariableKind.In));
+      AddVariableInfo(new VariableInfo("ShakingFactor", "Factor that determines the force of the shaking operation", typeof(DoubleData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be mutated", typeof(IGeneticProgrammingModel), VariableKind.In | VariableKind.Out));
+    }
+
+    public override IOperation Apply(IScope scope) {
+      FunctionLibrary library = GetVariableValue<FunctionLibrary>("FunctionLibrary", scope, true);
+      IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope, false);
+      MersenneTwister mt = GetVariableValue<MersenneTwister>("Random", scope, true);
+
+      // get all nodes with local parameters
+      var parametricBranches = TreeGardener.GetAllSubTrees(gpModel.FunctionTree).Where(branch => branch.HasLocalParameters);
+      if (parametricBranches.Count() == 0) return null; // don't manipulate anything if there are no nodes with a manipulation operator
+      IFunctionTree selectedBranch = parametricBranches.ElementAt(mt.Next(parametricBranches.Count()));
+
+      // save the exising sub-scopes in a backup scope
+      Scope backupScope = new Scope("backup");
+      foreach (Scope subScope in scope.SubScopes) {
+        backupScope.AddSubScope(subScope);
+      }
+
+      // create a scope for all shaking operations
+      Scope tempScope = new Scope("Temp. manipulation scope");
+      
+      // add the new sub-scopes
+      scope.AddSubScope(tempScope);
+      scope.AddSubScope(backupScope);
+
+      CompositeOperation next = new CompositeOperation();
+      next.ExecuteInParallel = false;
+      // the next operation should first manipulate and then restore the sub-scopes from the backup scope
+      next.AddOperation(selectedBranch.CreateShakingOperation(tempScope));
+      next.AddOperation(new AtomicOperation(new RightReducer(), scope));
+
+      return next;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/SubstituteSubTreeManipulation.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/SubstituteSubTreeManipulation.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Manipulation/SubstituteSubTreeManipulation.cs	(revision 2222)
@@ -0,0 +1,84 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Random;
+using System.Diagnostics;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  public class SubstituteSubTreeManipulation : GPManipulatorBase {
+
+    public override string Description {
+      get { return "Selects a random node of the tree and replaces it with randomly initialized subtree."; }
+    }
+
+    public SubstituteSubTreeManipulation()
+      : base() {
+    }
+
+    internal override IOperation Manipulate(MersenneTwister random, IGeneticProgrammingModel gpModel, FunctionLibrary library, int maxTreeSize, int maxTreeHeight, IScope scope) {
+      TreeGardener gardener = new TreeGardener(random, library);
+      IFunctionTree parent = gardener.GetRandomParentNode(gpModel.FunctionTree);
+      if (parent == null) {
+        // parent == null means we should subsitute the whole tree
+        // => create a new random tree
+        IFunctionTree newTree = gardener.CreateRandomTree(gardener.AllFunctions, maxTreeSize, maxTreeHeight);
+        Debug.Assert(gardener.IsValidTree(newTree));
+
+        gpModel.FunctionTree = newTree;
+        // return a CompositeOperation that randomly initializes the new tree
+        return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTree), scope);
+      } else {
+        // determine a random child of the parent to be replaced
+        int childIndex = random.Next(parent.SubTrees.Count);
+        // get the list of allowed functions for the new sub-tree
+        ICollection<IFunction> allowedFunctions = gardener.GetAllowedSubFunctions(parent.Function, childIndex);
+        if (allowedFunctions.Count == 0) {
+          // don't change anything
+          // this shouldn't happen
+          throw new InvalidProgramException();
+        }
+
+        // calculate the maximum size and height of the new sub-tree based on the location where
+        // it will be inserted
+        int parentLevel = gardener.GetBranchLevel(gpModel.FunctionTree, parent);
+        int maxSubTreeHeight = maxTreeHeight - parentLevel;
+        int maxSubTreeSize = maxTreeSize - (gpModel.Size - parent.SubTrees[childIndex].GetSize());
+
+        // create a random function tree
+        IFunctionTree newTree = gardener.CreateRandomTree(allowedFunctions, maxSubTreeSize, maxSubTreeHeight);
+        parent.RemoveSubTree(childIndex);
+        parent.InsertSubTree(childIndex, newTree);
+
+        Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
+        // update the values of treeSize and treeHeight
+        gpModel.Size = gpModel.FunctionTree.GetSize();
+        gpModel.Height = gpModel.FunctionTree.GetHeight();
+        // the root hasn't changed so we don't need to update 
+        // return a CompositeOperation that randomly initializes all nodes of the new subtree
+        return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTree), scope);
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/OffspringEqualiser.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/OffspringEqualiser.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/OffspringEqualiser.cs	(revision 2222)
@@ -0,0 +1,60 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.GP.Operators {
+  public class OffspringEqualiser : OperatorBase {
+    public override string Description {
+      get { return @"TODO\r\nOperator description still missing ..."; }
+    }
+
+    public OffspringEqualiser() {
+      AddVariableInfo(new VariableInfo("Random", "Pseudo random number generator", typeof(MersenneTwister), VariableKind.In));
+      AddVariableInfo(new VariableInfo("Value", "The value to equalise", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("BinSize", "Size of histogram bins", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("EqualiserHistogram", "Histogram of the target distribution", typeof(DoubleArrayData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("AcceptanceProbabilities", "Acceptance probabilities of individuals falling into bins", typeof(DoubleArrayData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("Histogram", "The histogram of the actual distribution", typeof(IntArrayData), VariableKind.In));
+    }
+
+    public override IOperation Apply(IScope scope) {
+      int binSize = GetVariableValue<IntData>("BinSize", scope, true).Data;
+      DoubleArrayData equaliserHistogram = GetVariableValue<DoubleArrayData>("EqualiserHistogram", scope, true);
+      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
+      DoubleArrayData acceptanceProbabilities = GetVariableValue<DoubleArrayData>("AcceptanceProbabilities", scope, true);
+      IntArrayData currentHistogram = GetVariableValue<IntArrayData>("Histogram", scope, true);
+
+      int value = GetVariableValue<IntData>("Value", scope, false).Data;
+      int bin = value / binSize;
+      if(bin<acceptanceProbabilities.Data.Length && random.NextDouble() < acceptanceProbabilities.Data[bin]) {
+        currentHistogram.Data[bin]++;
+        currentHistogram.FireChanged();
+        return new AtomicOperation(SubOperators[0], scope);
+      } else {
+        scope.AddVariable(new Variable(scope.TranslateName("Quality"), new DoubleData(double.NaN)));
+        return null;
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Properties/AssemblyInfo.frame
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Properties/AssemblyInfo.frame	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Properties/AssemblyInfo.frame	(revision 2222)
@@ -0,0 +1,58 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using HeuristicLab.PluginInfrastructure;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.GP.Operators")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2008 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("863021a4-3cde-48be-8af6-dac1077f5fb5")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.$WCREV$")]
+[assembly: AssemblyFileVersion("3.3.0.$WCREV$")]
+[assembly: AssemblyBuildDate("$WCNOW$")]
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/GPCrossoverBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/GPCrossoverBase.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/GPCrossoverBase.cs	(revision 2222)
@@ -0,0 +1,60 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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 HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Evolutionary;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  public abstract class GPCrossoverBase : CrossoverBase {
+    public GPCrossoverBase()
+      : base() {
+      AddVariableInfo(new VariableInfo("FunctionLibrary", "The operator library containing all available operators", typeof(FunctionLibrary), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionTree", "The tree to crossover", typeof(IGeneticProgrammingModel), VariableKind.In | VariableKind.New));
+    }
+
+    internal abstract IFunctionTree Cross(IScope scope, TreeGardener gardener, IRandom random, IFunctionTree tree0, IFunctionTree tree1);
+
+    protected override void Cross(IScope scope, IRandom random) {
+      FunctionLibrary opLibrary = GetVariableValue<FunctionLibrary>("FunctionLibrary", scope, true);
+      TreeGardener gardener = new TreeGardener(random, opLibrary);
+
+      if (scope.SubScopes.Count != 2)
+        throw new InvalidOperationException("Number of parents must be exactly two.");
+
+      IGeneticProgrammingModel parent0 = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope.SubScopes[0], false);
+      IGeneticProgrammingModel parent1 = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope.SubScopes[1], false);
+
+      // randomly swap parents to remove a possible bias from selection (e.g. when using gender-specific selection)
+      if (random.NextDouble() < 0.5) {
+        IGeneticProgrammingModel tmp = parent0;
+        parent0 = parent1;
+        parent1 = tmp;
+      }
+
+      IFunctionTree child = Cross(scope, gardener, random, parent0.FunctionTree, parent1.FunctionTree);
+      Debug.Assert(gardener.IsValidTree(child));
+      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("FunctionTree"), new GeneticProgrammingModel(child)));
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/LangdonHomologousCrossOver.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/LangdonHomologousCrossOver.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/LangdonHomologousCrossOver.cs	(revision 2222)
@@ -0,0 +1,56 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using HeuristicLab.Random;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  /// <summary>
+  /// Implementation of a homologous crossover operator as described in: 
+  /// William B. Langdon 
+  /// Size Fair and Homologous Tree Genetic Programming Crossovers, 
+  /// Genetic Programming and Evolvable Machines, Vol. 1, Number 1/2, pp. 95-119, April 2000
+  /// </summary>
+  public class LangdonHomologousCrossOver : SizeFairCrossOver {
+    protected override IFunctionTree SelectReplacement(MersenneTwister random, List<int> replacedTrail, List<CrossoverPoint> crossoverPoints) {
+      List<CrossoverPoint> bestPoints = new List<CrossoverPoint> { crossoverPoints[0] };
+      int bestMatchLength = MatchingSteps(replacedTrail, crossoverPoints[0].trail);
+      for (int i = 1; i < crossoverPoints.Count; i++) {
+        int currentMatchLength = MatchingSteps(replacedTrail, crossoverPoints[i].trail);
+        if (currentMatchLength > bestMatchLength) {
+          bestMatchLength = currentMatchLength;
+          bestPoints.Clear();
+          bestPoints.Add(crossoverPoints[i]);
+        } else if (currentMatchLength == bestMatchLength) {
+          bestPoints.Add(crossoverPoints[i]);
+        }
+      }
+      return bestPoints[random.Next(bestPoints.Count)].tree;
+    }
+    private int MatchingSteps(List<int> t1, List<int> t2) {
+      int n = Math.Min(t1.Count, t2.Count);
+      for (int i = 0; i < n; i++) if (t1[i] != t2[i]) return i;
+      return n;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/OnePointCrossOver.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/OnePointCrossOver.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/OnePointCrossOver.cs	(revision 2222)
@@ -0,0 +1,74 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  /// <summary>
+  /// Implementation of a homologous one point crossover operator as described in: 
+  /// W. B. Langdon and R. Poli.  Foundations of Genetic Programming. Springer-Verlag, 2002.
+  /// </summary>
+  public class OnePointCrossOver : SizeConstrictedGPCrossoverBase {
+    // internal data structure to represent crossover points
+    private class CrossoverPoint {
+      public IFunctionTree parent0;
+      public IFunctionTree parent1;
+      public int childIndex;
+    }
+    public override string Description {
+      get {
+        return @"One point crossover for trees as described in W. B. Langdon and R. Poli. Foundations of Genetic Programming. Springer-Verlag, 2002.";
+      }
+    }
+
+    internal override IFunctionTree Cross(TreeGardener gardener, IRandom random, IFunctionTree tree0, IFunctionTree tree1, int maxTreeSize, int maxTreeHeight) {
+      List<CrossoverPoint> allowedCrossOverPoints = new List<CrossoverPoint>();
+      GetCrossOverPoints(gardener, tree0, tree1, maxTreeSize - tree0.GetSize(), allowedCrossOverPoints);
+      if (allowedCrossOverPoints.Count > 0) {
+        CrossoverPoint crossOverPoint = allowedCrossOverPoints[random.Next(allowedCrossOverPoints.Count)];
+        IFunctionTree parent0 = crossOverPoint.parent0;
+        IFunctionTree branch1 = crossOverPoint.parent1.SubTrees[crossOverPoint.childIndex];
+        parent0.RemoveSubTree(crossOverPoint.childIndex);
+        parent0.InsertSubTree(crossOverPoint.childIndex, branch1);
+      }
+      return tree0;
+    }
+
+    private void GetCrossOverPoints(TreeGardener gardener, IFunctionTree branch0, IFunctionTree branch1, int maxNewNodes, List<CrossoverPoint> crossoverPoints) {
+      if (branch0.SubTrees.Count != branch1.SubTrees.Count) return;
+
+      for (int i = 0; i < branch0.SubTrees.Count; i++) {
+        // if the current branch can be attached as a sub-tree to branch0
+        if (gardener.GetAllowedSubFunctions(branch0.Function, i).Contains(branch1.SubTrees[i].Function) &&
+           branch1.SubTrees[i].GetSize() - branch0.SubTrees[i].GetSize() <= maxNewNodes) {
+          CrossoverPoint p = new CrossoverPoint();
+          p.childIndex = i;
+          p.parent0 = branch0;
+          p.parent1 = branch1;
+          crossoverPoints.Add(p);
+        }
+        GetCrossOverPoints(gardener, branch0.SubTrees[i], branch1.SubTrees[i], maxNewNodes, crossoverPoints);
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/SizeConstrictedGPCrossoverBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/SizeConstrictedGPCrossoverBase.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/SizeConstrictedGPCrossoverBase.cs	(revision 2222)
@@ -0,0 +1,59 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Core;
+using HeuristicLab.Data;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  public abstract class SizeConstrictedGPCrossoverBase : GPCrossoverBase {
+
+    private int MaxRecombinationTries { get { return 20; } }
+
+    public SizeConstrictedGPCrossoverBase()
+      : base() {
+      AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("MaxTreeSize", "The maximal allowed size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
+    }
+
+    internal override IFunctionTree Cross(IScope scope, TreeGardener gardener, IRandom random, IFunctionTree tree0, IFunctionTree tree1) {
+      int maxTreeHeight = GetVariableValue<IntData>("MaxTreeHeight", scope, true).Data;
+      int maxTreeSize = GetVariableValue<IntData>("MaxTreeSize", scope, true).Data;
+
+      // when tree0 is terminal then try to cross into tree1, when tree1 is also terminal just return tree0 unchanged.
+      IFunctionTree newTree;
+      int tries = 0;
+      do {
+        if (tries++ > MaxRecombinationTries)
+          // if after so many tries it was not possible to create a solution within the given size constraints just return the tree without changes.
+          return tree0;
+        if (tree0.SubTrees.Count > 0) {
+          newTree = Cross(gardener, random, (IFunctionTree)tree0.Clone(), (IFunctionTree)tree1.Clone(), maxTreeSize, maxTreeHeight);
+        } else if (tree1.SubTrees.Count > 0) {
+          newTree = Cross(gardener, random, (IFunctionTree)tree1.Clone(), (IFunctionTree)tree0.Clone(), maxTreeSize, maxTreeHeight);
+        } else newTree = tree0;
+      } while (newTree.GetSize() > maxTreeSize || newTree.GetHeight() > maxTreeHeight);
+      return newTree;
+    }
+
+    internal abstract IFunctionTree Cross(TreeGardener gardener, IRandom random, IFunctionTree tree0, IFunctionTree tree1, int maxTreeSize, int maxTreeHeight);
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/SizeFairCrossOver.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/SizeFairCrossOver.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/SizeFairCrossOver.cs	(revision 2222)
@@ -0,0 +1,148 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.GP.Operators {
+  /// <summary>
+  /// Implementation of a size fair crossover operator as described in: 
+  /// William B. Langdon 
+  /// Size Fair and Homologous Tree Genetic Programming Crossovers, 
+  /// Genetic Programming and Evolvable Machines, Vol. 1, Number 1/2, pp. 95-119, April 2000
+  /// </summary>
+  public class SizeFairCrossOver : SizeConstrictedGPCrossoverBase {
+    private int MaxRecombinationTries { get { return 20; } }
+    // private data structure for crossover points
+    protected class CrossoverPoint {
+      public IFunctionTree tree;
+      public int branchSize;
+      public List<int> trail;
+    }
+
+    internal override IFunctionTree Cross(TreeGardener gardener, IRandom random, IFunctionTree tree0, IFunctionTree tree1, int maxTreeSize, int maxTreeHeight) {
+      int tries = 0;
+      IFunctionTree insertedBranch = null;
+      IFunctionTree parent = null;
+      int removedBranchIndex = 0;
+      do {
+        // select a random suboperator of the 'receiving' tree
+        while (parent == null) parent = gardener.GetRandomParentNode(tree0);
+        removedBranchIndex = random.Next(parent.SubTrees.Count);
+        insertedBranch = GetReplacementBranch((MersenneTwister)random, gardener, tree0, parent, removedBranchIndex, tree1, maxTreeSize, maxTreeHeight);
+      } while (insertedBranch == null && tries++ < MaxRecombinationTries);
+
+      if (insertedBranch != null) {
+        // replace the branch below the crossoverpoint with the selected branch from root1
+        parent.RemoveSubTree(removedBranchIndex);
+        parent.InsertSubTree(removedBranchIndex, insertedBranch);
+      }
+      return tree0;
+    }
+
+    private IFunctionTree GetReplacementBranch(MersenneTwister random, TreeGardener gardener, IFunctionTree intoTree, IFunctionTree parent, int replacedBranchIndex, IFunctionTree fromTree, int maxTreeSize, int maxTreeHeight) {
+      IList<IFunction> allowedFunctions = new List<IFunction>(gardener.GetAllowedSubFunctions(parent.Function, replacedBranchIndex));
+      int removedBranchSize = parent.SubTrees[replacedBranchIndex].GetSize();
+      int maxBranchSize = maxTreeSize - (intoTree.GetSize() - removedBranchSize);
+      int maxBranchHeight = maxTreeHeight - gardener.GetBranchLevel(intoTree, parent);  // returns 1 if intoTree==parent and 2 if parent is a child of intoTree
+      List<int> replacedTrail = GetTrail(intoTree, parent);
+      replacedTrail.Add(replacedBranchIndex);
+
+      List<CrossoverPoint> shorterBranches = new List<CrossoverPoint>();
+      List<CrossoverPoint> longerBranches = new List<CrossoverPoint>();
+      List<CrossoverPoint> equalLengthBranches = new List<CrossoverPoint>();
+
+      FindPossibleBranches(fromTree, allowedFunctions, maxBranchSize, maxBranchHeight, removedBranchSize, shorterBranches, equalLengthBranches, longerBranches, new List<int>());
+
+      if (shorterBranches.Count > 0 && longerBranches.Count > 0) {
+        double pEqualLength = equalLengthBranches.Count > 0 ? 1.0 / removedBranchSize : 0.0;
+        double pLonger;
+        if (parent.GetSize() == maxTreeSize) {
+          pLonger = 0.0;
+        } else {
+          pLonger = (1.0 - pEqualLength) / (longerBranches.Count * (1.0 + longerBranches.Average(p => p.branchSize) / shorterBranches.Average(p => p.branchSize)));
+        }
+        double pShorter = (1.0 - pEqualLength - pLonger);
+
+        double r = random.NextDouble();
+        if (r < pLonger) {
+          return SelectReplacement(random, replacedTrail, longerBranches);
+        } else if (r < pLonger + pShorter) {
+          return SelectReplacement(random, replacedTrail, shorterBranches);
+        } else {
+          return SelectReplacement(random, replacedTrail, equalLengthBranches);
+        }
+      } else if (equalLengthBranches.Count > 0) {
+        return SelectReplacement(random, replacedTrail, equalLengthBranches);
+      } else {
+        return null;
+      }
+    }
+
+    protected virtual IFunctionTree SelectReplacement(MersenneTwister random, List<int> replacedTrail, List<CrossoverPoint> crossoverPoints) {
+      return crossoverPoints[random.Next(crossoverPoints.Count)].tree;
+    }
+
+    private void FindPossibleBranches(IFunctionTree tree, IList<IFunction> allowedFunctions, int maxBranchSize, int maxBranchHeight, int removedBranchSize,
+      List<CrossoverPoint> shorterBranches, List<CrossoverPoint> equalLengthBranches, List<CrossoverPoint> longerBranches, List<int> trail) {
+      int treeSize = tree.GetSize();
+      if (allowedFunctions.Contains(tree.Function) && treeSize <= maxBranchSize && tree.GetHeight() <= maxBranchHeight) {
+        CrossoverPoint p = new CrossoverPoint();
+        p.branchSize = treeSize;
+        p.tree = tree;
+        p.trail = new List<int>(trail);
+        if (treeSize < removedBranchSize) shorterBranches.Add(p);
+        else if (treeSize > removedBranchSize) longerBranches.Add(p);
+        else equalLengthBranches.Add(p);
+      }
+      for (int i = 0; i < tree.SubTrees.Count; i++) {
+        trail.Add(i);
+        FindPossibleBranches(tree.SubTrees[i], allowedFunctions, maxBranchSize, maxBranchHeight, removedBranchSize, shorterBranches, equalLengthBranches, longerBranches, trail);
+        trail.RemoveAt(trail.Count - 1);
+      }
+    }
+
+    private List<int> GetTrail(IFunctionTree root, IFunctionTree branch) {
+      List<int> trail = new List<int>();
+      GetTrail(root, branch, trail);
+      trail.Reverse();
+      trail.RemoveAt(trail.Count - 1);
+      return trail;
+    }
+    private void GetTrail(IFunctionTree root, IFunctionTree branch, List<int> trail) {
+      if (root == branch) {
+        trail.Add(-1); // add flag that there was a match
+        return;
+      }
+
+      for (int i = 0; i < root.SubTrees.Count; i++) {
+        GetTrail(root.SubTrees[i], branch, trail);
+        if (trail.Count > 0) {
+          trail.Add(i);
+          return;
+        }
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/StandardCrossOver.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/StandardCrossOver.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/StandardCrossOver.cs	(revision 2222)
@@ -0,0 +1,78 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  public class StandardCrossOver : SizeConstrictedGPCrossoverBase {
+    private int MaxRecombinationTries { get { return 20; } }
+
+    public override string Description {
+      get {
+        return @"Takes two parent individuals P0 and P1 each. Selects a random node N0 of P0 and a random node N1 of P1.
+And replaces the branch with root0 N0 in P0 with N1 from P1 if the tree-size limits are not violated.
+When recombination with N0 and N1 would create a tree that is too large or invalid the operator randomly selects new N0 and N1 
+until a valid configuration is found.";
+      }
+    }
+
+    internal override IFunctionTree Cross(TreeGardener gardener, IRandom random, IFunctionTree tree0, IFunctionTree tree1, int maxTreeSize, int maxTreeHeight) {
+      int tries = 0;
+      List<IFunctionTree> allowedCrossoverPoints = null;
+      IFunctionTree parent0;
+      int replacedChildIndex;
+      do {
+        // select a random crossover point in the first parent tree0
+        parent0 = null;
+        while (parent0 == null) parent0 = gardener.GetRandomParentNode(tree0);
+        // select a random branch to replace
+        replacedChildIndex = random.Next(parent0.SubTrees.Count);
+
+        // calculate the max size and height that the inserted branch can have 
+        int maxInsertedBranchSize = maxTreeSize - (tree0.GetSize() - parent0.SubTrees[replacedChildIndex].GetSize());
+        int maxInsertedBranchHeight = maxTreeHeight - gardener.GetBranchLevel(tree0, parent0); // branchlevel is 1 if tree0==parent0
+
+        IList<IFunction> allowedFunctions = new List<IFunction>(gardener.GetAllowedSubFunctions(parent0.Function, replacedChildIndex));
+        allowedCrossoverPoints = GetPossibleCrossoverPoints(tree1, maxInsertedBranchSize, maxInsertedBranchHeight, allowedFunctions);
+      } while (allowedCrossoverPoints.Count == 0 && tries++ < MaxRecombinationTries);
+
+      if (allowedCrossoverPoints.Count > 0) {
+        IFunctionTree branch1 = allowedCrossoverPoints[random.Next(allowedCrossoverPoints.Count)];
+
+        // replace the branch in tree0 with the selected branch from tree1
+        parent0.RemoveSubTree(replacedChildIndex);
+        parent0.InsertSubTree(replacedChildIndex, branch1);
+      }
+      return tree0;
+    }
+
+    private List<IFunctionTree> GetPossibleCrossoverPoints(IFunctionTree tree, int maxInsertedBranchSize, int maxInsertedBranchHeight, IList<IFunction> allowedFunctions) {
+      List<IFunctionTree> crossoverPoints = new List<IFunctionTree>();
+      foreach (IFunctionTree possiblePoint in TreeGardener.GetAllSubTrees(tree)) {
+        if (allowedFunctions.Contains(possiblePoint.Function) && possiblePoint.GetSize() <= maxInsertedBranchSize && possiblePoint.GetHeight() <= maxInsertedBranchHeight)
+          crossoverPoints.Add(possiblePoint);
+      }
+      return crossoverPoints;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/UniformCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/UniformCrossover.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Recombination/UniformCrossover.cs	(revision 2222)
@@ -0,0 +1,155 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.Operators {
+  /// <summary>
+  /// Implementation of a homologous uniform crossover operator as described in: 
+  /// R. Poli and W. B. Langdon.  On the Search Properties of Different Crossover Operators in Genetic Programming.
+  /// In Proceedings of Genetic Programming '98, Madison, Wisconsin, 1998.
+  /// </summary>
+  public class UniformCrossover : SizeConstrictedGPCrossoverBase {
+    // internal datastructure to represent crossover points
+    private class CrossoverPoint {
+      public IFunctionTree Parent0;
+      public IFunctionTree Parent1;
+      public int ChildIndex;
+      public bool IsInternal;
+    }
+
+    public override string Description {
+      get {
+        return @"Uniform crossover as defined by Poli and Langdon";
+      }
+    }
+
+    internal override IFunctionTree Cross(TreeGardener gardener, IRandom random, IFunctionTree tree0, IFunctionTree tree1, int maxTreeSize, int maxTreeHeight) {
+      List<CrossoverPoint> allowedCrossOverPoints = new List<CrossoverPoint>();
+      GetCrossOverPoints(gardener, tree0, tree1, allowedCrossOverPoints);
+      // iterate through the list of crossover points and swap nodes with p=0.5
+      foreach (CrossoverPoint crossoverPoint in allowedCrossOverPoints) {
+        if (random.NextDouble() < 0.5) {
+          if (crossoverPoint.IsInternal) {
+            ExchangeNodes(crossoverPoint);
+          } else {
+            SwapSubtrees(crossoverPoint);
+          }
+        }
+      }
+      return tree0;
+    }
+
+    private void GetCrossOverPoints(TreeGardener gardener, IFunctionTree branch0, IFunctionTree branch1, List<CrossoverPoint> crossoverPoints) {
+      if (branch0.SubTrees.Count != branch1.SubTrees.Count) return; // branches have to have same number of sub-trees to be valid crossover points
+      // iterate over all sub-trees
+      for (int i = 0; i < branch0.SubTrees.Count; i++) {
+        IFunctionTree currentSubTree0 = branch0.SubTrees[i];
+        IFunctionTree currentSubTree1 = branch1.SubTrees[i];
+        // when the current sub-tree in branch1 can be attached as a child of branch0
+        // and the sub-tree of branch0 can be attached as child of branch1.
+        // note: we have to check both cases because either branch0 or branch1 can end up in the result tree
+        if (gardener.GetAllowedSubFunctions(branch0.Function, i).Contains(currentSubTree1.Function) &&
+          gardener.GetAllowedSubFunctions(branch1.Function, i).Contains(currentSubTree0.Function)) {
+          // and the sub-tree is at the border of the common region 
+          if (currentSubTree0.SubTrees.Count != currentSubTree1.SubTrees.Count) {
+            // then we have found a valid crossover point
+            CrossoverPoint p = new CrossoverPoint();
+            p.ChildIndex = i;
+            p.Parent0 = branch0;
+            p.Parent1 = branch1;
+            p.IsInternal = false;
+            crossoverPoints.Add(p);
+          } else {
+            // when the sub-trees are not on the border of the common region
+            // we also have to check if the children of the current sub-trees of branch0 and branch1 can be exchanged 
+            if (CanHaveSubTrees(gardener, currentSubTree0, currentSubTree1.SubTrees) &&
+              CanHaveSubTrees(gardener, currentSubTree1, currentSubTree0.SubTrees)) {
+              CrossoverPoint p = new CrossoverPoint();
+              p.ChildIndex = i;
+              p.Parent0 = branch0;
+              p.Parent1 = branch1;
+              p.IsInternal = true;
+              crossoverPoints.Add(p);
+            }
+          }
+        }
+        GetCrossOverPoints(gardener, currentSubTree0, currentSubTree1, crossoverPoints);
+      }
+    }
+
+    private bool CanHaveSubTrees(TreeGardener gardener, IFunctionTree parent, IList<IFunctionTree> subTrees) {
+      for (int i = 0; i < subTrees.Count; i++) {
+        if (!gardener.GetAllowedSubFunctions(parent.Function, i).Contains(subTrees[i].Function)) return false;
+      }
+      return true;
+    }
+
+    private void ExchangeNodes(CrossoverPoint crossoverPoint) {
+      IFunctionTree parent0 = crossoverPoint.Parent0;
+      IFunctionTree parent1 = crossoverPoint.Parent1;
+      int childIndex = crossoverPoint.ChildIndex;
+      IFunctionTree branch0 = crossoverPoint.Parent0.SubTrees[childIndex];
+      IFunctionTree branch1 = crossoverPoint.Parent1.SubTrees[childIndex];
+      // exchange the branches in the parent
+      parent0.RemoveSubTree(childIndex);
+      parent0.InsertSubTree(childIndex, branch1);
+      parent1.RemoveSubTree(childIndex);
+      parent1.InsertSubTree(childIndex, branch0);
+
+      ExchangeChildren(branch0, branch1);
+    }
+
+    private void SwapSubtrees(CrossoverPoint crossoverPoint) {
+      IFunctionTree parent0 = crossoverPoint.Parent0;
+      IFunctionTree parent1 = crossoverPoint.Parent1;
+      int childIndex = crossoverPoint.ChildIndex;
+      IFunctionTree branch0 = crossoverPoint.Parent0.SubTrees[childIndex];
+      IFunctionTree branch1 = crossoverPoint.Parent1.SubTrees[childIndex];
+      // insert branch1 into parent0 replacing branch0
+      parent0.RemoveSubTree(childIndex);
+      parent0.InsertSubTree(childIndex, branch1);
+      // insert branch0 into parent1 replacing branch1
+      parent1.RemoveSubTree(childIndex);
+      parent1.InsertSubTree(childIndex, branch0);
+    }
+
+    private void ExchangeChildren(IFunctionTree branch0, IFunctionTree branch1) {
+      List<IFunctionTree> branch0Children = new List<IFunctionTree>(branch0.SubTrees); // lists to backup subtrees
+      List<IFunctionTree> branch1Children = new List<IFunctionTree>(branch1.SubTrees);
+
+      // remove children of branch0 and branch1
+      while (branch1.SubTrees.Count > 0) branch1.RemoveSubTree(0);
+      while (branch0.SubTrees.Count > 0) branch0.RemoveSubTree(0);
+
+      // add original children of branch0 to branch1
+      foreach (IFunctionTree subTree in branch0Children) {
+        branch1.AddSubTree(subTree);
+      }
+      // add original children of branch1 to branch0
+      foreach (IFunctionTree subTree in branch1Children) {
+        branch0.AddSubTree(subTree);
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/TrainingWindowSlider.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/TrainingWindowSlider.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/TrainingWindowSlider.cs	(revision 2222)
@@ -0,0 +1,61 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.GP.Operators {
+  public class TrainingWindowSlider : OperatorBase {
+
+    private const string TRAINING_SAMPLES_START = "TrainingSamplesStart";
+    private const string TRAINING_SAMPLES_END = "TrainingSamplesEnd";
+    private const string TRAINING_WINDOW_START = "TrainingWindowStart";
+    private const string TRAINING_WINDOW_END = "TrainingWindowEnd";
+    private const string STEP_SIZE = "SlidingStepSize";
+
+    public override string Description {
+      get { return @"Modifies variables TrainingSamplesStart and TrainingSamplesEnd to have a continually sliding window over the whole training data set."; }
+    }
+
+    public TrainingWindowSlider() {
+      AddVariableInfo(new VariableInfo(TRAINING_SAMPLES_START, "Start of whole training set", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo(TRAINING_SAMPLES_END, "End of whole training set", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo(TRAINING_WINDOW_START, "Start of training set window", typeof(IntData), VariableKind.In | VariableKind.Out));
+      AddVariableInfo(new VariableInfo(TRAINING_WINDOW_END, "End of training set window", typeof(IntData), VariableKind.In | VariableKind.Out));
+      AddVariableInfo(new VariableInfo(STEP_SIZE, "Number of samples to slide the window forward", typeof(IntData), VariableKind.In));
+    }
+
+    public override IOperation Apply(IScope scope) {
+      int trainingSamplesStart = GetVariableValue<IntData>(TRAINING_SAMPLES_START, scope, true).Data;
+      int trainingSamplesEnd = GetVariableValue<IntData>(TRAINING_SAMPLES_END, scope, true).Data;
+      IntData trainingWindowStart = GetVariableValue<IntData>(TRAINING_WINDOW_START, scope, true);
+      IntData trainingWindowEnd = GetVariableValue<IntData>(TRAINING_WINDOW_END, scope, true);
+      int stepSize = GetVariableValue<IntData>(STEP_SIZE, scope, true).Data;
+
+      if (trainingWindowEnd.Data + stepSize <= trainingSamplesEnd) {
+        trainingWindowStart.Data = trainingWindowStart.Data + stepSize;
+        trainingWindowEnd.Data = trainingWindowEnd.Data + stepSize;
+      }
+
+      return null;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.Operators/3.3/Util.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Operators/3.3/Util.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Operators/3.3/Util.cs	(revision 2222)
@@ -0,0 +1,51 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
+using HeuristicLab.Selection;
+
+namespace HeuristicLab.GP.Operators {
+  internal static class Util {
+    internal static CompositeOperation CreateInitializationOperation(ICollection<IFunctionTree> trees, IScope scope) {
+      // create a backup of sub scopes to restore after initialization
+      Scope backupScope = new Scope("backup");
+      foreach (Scope subScope in scope.SubScopes) {
+        backupScope.AddSubScope(subScope);
+      }
+
+      CompositeOperation initializationOperation = new CompositeOperation();
+      Scope tempScope = new Scope("Temp. initialization scope");
+
+      var parametricTrees = trees.Where(t => t.HasLocalParameters);
+      foreach (IFunctionTree tree in parametricTrees) {
+        initializationOperation.AddOperation(tree.CreateInitOperation(tempScope));
+      }
+      scope.AddSubScope(tempScope);
+      scope.AddSubScope(backupScope);
+      // add an operation to remove the temporary scopes        
+      initializationOperation.AddOperation(new AtomicOperation(new RightReducer(), scope));
+      return initializationOperation;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.SantaFe/3.3/AntInterpreter.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/AntInterpreter.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.SantaFe/3.3/AntInterpreter.cs	(revision 2222)
@@ -21,11 +21,5 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Core;
-using System.Xml;
-using System.Diagnostics;
+using HeuristicLab.GP.Interfaces;
 
 namespace HeuristicLab.GP.SantaFe {
Index: /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Evaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Evaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Evaluator.cs	(revision 2222)
@@ -20,11 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.DataAnalysis;
+using HeuristicLab.GP.Interfaces;
 
 namespace HeuristicLab.GP.SantaFe {
@@ -32,13 +28,13 @@
     public Evaluator()
       : base() {
-      AddVariableInfo(new VariableInfo("FunctionTree", "The function tree representing the ant", typeof(IFunctionTree), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionTree", "The function tree representing the ant", typeof(IGeneticProgrammingModel), VariableKind.In));
       AddVariableInfo(new VariableInfo("FoodEaten", "Number of food items that the ant found", typeof(DoubleData), VariableKind.New | VariableKind.Out));
     }
 
     public override IOperation Apply(IScope scope) {
-      IFunctionTree tree = GetVariableValue<IFunctionTree>("FunctionTree", scope, false);
+      IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope, false);
       AntInterpreter interpreter = new AntInterpreter();
       interpreter.MaxTimeSteps = 600;
-      interpreter.Run(tree);
+      interpreter.Run(gpModel.FunctionTree);
 
       scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("FoodEaten"), new DoubleData(interpreter.FoodEaten)));
Index: /trunk/sources/HeuristicLab.GP.SantaFe/3.3/FunctionLibraryInjector.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/FunctionLibraryInjector.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.SantaFe/3.3/FunctionLibraryInjector.cs	(revision 2222)
@@ -20,18 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Xml;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Constraints;
+using HeuristicLab.GP.Interfaces;
 
 namespace HeuristicLab.GP.SantaFe {
-  public class FunctionLibraryInjector : OperatorBase {
-    private const string OPERATORLIBRARY = "FunctionLibrary";
-
-    private GPOperatorLibrary operatorLibrary;
+  public class FunctionLibraryInjector : FunctionLibraryInjectorBase {
 
     public override string Description {
@@ -41,14 +31,8 @@
     public FunctionLibraryInjector()
       : base() {
-      AddVariableInfo(new VariableInfo(OPERATORLIBRARY, "Preconfigured default operator library", typeof(GPOperatorLibrary), VariableKind.New));
     }
 
-    public override IOperation Apply(IScope scope) {
-      InitDefaultOperatorLibrary();
-      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(OPERATORLIBRARY), operatorLibrary));
-      return null;
-    }
-
-    private void InitDefaultOperatorLibrary() {
+    protected override FunctionLibrary CreateFunctionLibrary() {
+      FunctionLibrary funLib = new FunctionLibrary();
       IfFoodAhead ifFoodAhead = new IfFoodAhead();
       Prog2 prog2 = new Prog2();
@@ -71,29 +55,11 @@
       SetAllowedSubOperators(prog3, allFunctions);
 
-      operatorLibrary = new GPOperatorLibrary();
-      operatorLibrary.GPOperatorGroup.AddOperator(ifFoodAhead);
-      operatorLibrary.GPOperatorGroup.AddOperator(prog2);
-      operatorLibrary.GPOperatorGroup.AddOperator(prog3);
-      operatorLibrary.GPOperatorGroup.AddOperator(move);
-      operatorLibrary.GPOperatorGroup.AddOperator(left);
-      operatorLibrary.GPOperatorGroup.AddOperator(right);
-    }
-
-    private void SetAllowedSubOperators(IFunction f, IFunction[] gs) {
-      foreach(IConstraint c in f.Constraints) {
-        if(c is SubOperatorTypeConstraint) {
-          SubOperatorTypeConstraint typeConstraint = c as SubOperatorTypeConstraint;
-          typeConstraint.Clear();
-          foreach(IFunction g in gs) {
-            typeConstraint.AddOperator(g);
-          }
-        } else if(c is AllSubOperatorsTypeConstraint) {
-          AllSubOperatorsTypeConstraint typeConstraint = c as AllSubOperatorsTypeConstraint;
-          typeConstraint.Clear();
-          foreach(IFunction g in gs) {
-            typeConstraint.AddOperator(g);
-          }
-        }
-      }
+      funLib.AddFunction(ifFoodAhead);
+      funLib.AddFunction(prog2);
+      funLib.AddFunction(prog3);
+      funLib.AddFunction(move);
+      funLib.AddFunction(left);
+      funLib.AddFunction(right);
+      return funLib;
     }
   }
Index: /trunk/sources/HeuristicLab.GP.SantaFe/3.3/HeuristicLab.GP.SantaFe-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/HeuristicLab.GP.SantaFe-3.3.csproj	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.SantaFe/3.3/HeuristicLab.GP.SantaFe-3.3.csproj	(revision 2222)
@@ -83,31 +83,27 @@
     <Compile Include="AntInterpreter.cs" />
     <Compile Include="FunctionLibraryInjector.cs" />
-    <Compile Include="Prog3.cs" />
-    <Compile Include="Prog2.cs" />
-    <Compile Include="IfFoodAhead.cs" />
-    <Compile Include="Right.cs" />
-    <Compile Include="Left.cs" />
-    <Compile Include="Move.cs" />
     <Compile Include="HeuristicLabGPSantaFePlugin.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Evaluator.cs" />
-    <Compile Include="SymbolTable.cs" />
+    <Compile Include="Symbols\IfFoodAhead.cs" />
+    <Compile Include="Symbols\Left.cs" />
+    <Compile Include="Symbols\Move.cs" />
+    <Compile Include="Symbols\Prog2.cs" />
+    <Compile Include="Symbols\Prog3.cs" />
+    <Compile Include="Symbols\Right.cs" />
+    <Compile Include="Symbols\SymbolTable.cs" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Constraints\3.2\HeuristicLab.Constraints-3.2.csproj">
-      <Project>{FCD62C6F-4793-4593-AE9A-0BDCA256EE99}</Project>
-      <Name>HeuristicLab.Constraints-3.2</Name>
-    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
       <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
       <Name>HeuristicLab.Core-3.2</Name>
     </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.DataAnalysis\3.2\HeuristicLab.DataAnalysis-3.2.csproj">
-      <Project>{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}</Project>
-      <Name>HeuristicLab.DataAnalysis-3.2</Name>
-    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Data\3.2\HeuristicLab.Data-3.2.csproj">
       <Project>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</Project>
       <Name>HeuristicLab.Data-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.GP.Interfaces\3.3\HeuristicLab.GP.Interfaces-3.3.csproj">
+      <Project>{924B6BEA-9A99-40FE-9334-5C01E8D540EC}</Project>
+      <Name>HeuristicLab.GP.Interfaces-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.GP\3.3\HeuristicLab.GP-3.3.csproj">
Index: /trunk/sources/HeuristicLab.GP.SantaFe/3.3/HeuristicLabGPSantaFePlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/HeuristicLabGPSantaFePlugin.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.SantaFe/3.3/HeuristicLabGPSantaFePlugin.cs	(revision 2222)
@@ -28,8 +28,8 @@
   [ClassInfo(Name = "HeuristicLab.GP.SantaFe-3.3")]
   [PluginFile(Filename = "HeuristicLab.GP.SantaFe-3.3.dll", Filetype = PluginFileType.Assembly)]
-  [Dependency(Dependency = "HeuristicLab.Constraints-3.2")]
-  [Dependency(Dependency = "HeuristicLab.GP-3.3")]
   [Dependency(Dependency = "HeuristicLab.Core-3.2")]
   [Dependency(Dependency = "HeuristicLab.Data-3.2")]
+  [Dependency(Dependency = "HeuristicLab.GP-3.3")]
+  [Dependency(Dependency = "HeuristicLab.GP.Interfaces-3.3")]
   [Dependency(Dependency = "HeuristicLab.DataAnalysis-3.2")]
   [Dependency(Dependency = "HeuristicLab.Random-3.2")]
Index: unk/sources/HeuristicLab.GP.SantaFe/3.3/IfFoodAhead.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/IfFoodAhead.cs	(revision 2221)
+++ 	(revision )
@@ -1,46 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.GP.SantaFe {
-  public sealed class IfFoodAhead : FunctionBase {
-
-    public override string Description {
-      get { return ""; }
-    }
-
-    public IfFoodAhead()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.SantaFe/3.3/Left.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Left.cs	(revision 2221)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.GP.SantaFe {
-  public sealed class Left : FunctionBase {
-
-    public override string Description {
-      get { return ""; }
-    }
-
-    public Left()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(0, 0));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.SantaFe/3.3/Move.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Move.cs	(revision 2221)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.GP.SantaFe {
-  public sealed class Move : FunctionBase {
-
-    public override string Description {
-      get { return ""; }
-    }
-
-    public Move()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(0, 0));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.SantaFe/3.3/Prog2.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Prog2.cs	(revision 2221)
+++ 	(revision )
@@ -1,46 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.GP.SantaFe {
-  public sealed class Prog2 : FunctionBase {
-
-    public override string Description {
-      get { return ""; }
-    }
-
-    public Prog2()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.SantaFe/3.3/Prog3.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Prog3.cs	(revision 2221)
+++ 	(revision )
@@ -1,47 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.GP.SantaFe {
-  public sealed class Prog3 : FunctionBase {
-
-    public override string Description {
-      get { return ""; }
-    }
-
-    public Prog3()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(3, 3)); 
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-      AddConstraint(new SubOperatorTypeConstraint(2));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.SantaFe/3.3/Right.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Right.cs	(revision 2221)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.GP.SantaFe {
-  public sealed class Right : FunctionBase {
-    public override string Description {
-      get { return ""; }
-    }
-
-    public Right()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(0, 0));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.SantaFe/3.3/SymbolTable.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/SymbolTable.cs	(revision 2221)
+++ 	(revision )
@@ -1,56 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using System.Xml;
-
-namespace HeuristicLab.GP.SantaFe {
-  class SymbolTable : StorableBase {
-    public const int IF_FOOD_AHEAD = 1;
-    public const int LEFT = 2;
-    public const int RIGHT = 3;
-    public const int MOVE = 4;
-    public const int PROG2 = 5;
-    public const int PROG3 = 6;
-    public const int UNKNOWN = 7;
-    private static Dictionary<Type, int> staticTypes = new Dictionary<Type, int>();
-
-    // needs to be public for persistence mechanism (Activator.CreateInstance needs empty constructor)
-    static SymbolTable() {
-      staticTypes = new Dictionary<Type, int>();
-      staticTypes[typeof(IfFoodAhead)] = IF_FOOD_AHEAD;
-      staticTypes[typeof(Left)] = LEFT;
-      staticTypes[typeof(Right)] = RIGHT;
-      staticTypes[typeof(Move)] = MOVE;
-      staticTypes[typeof(Prog2)] = PROG2;
-      staticTypes[typeof(Prog3)] = PROG3;
-    }
-
-    internal static int MapFunction(IFunction function) {
-      if(staticTypes.ContainsKey(function.GetType())) return staticTypes[function.GetType()];
-      else return UNKNOWN;
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/IfFoodAhead.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/IfFoodAhead.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/IfFoodAhead.cs	(revision 2222)
@@ -0,0 +1,25 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+namespace HeuristicLab.GP.SantaFe {
+  public sealed class IfFoodAhead : BinaryFunction {
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Left.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Left.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Left.cs	(revision 2222)
@@ -0,0 +1,25 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+namespace HeuristicLab.GP.SantaFe {
+  public sealed class Left : Terminal {
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Move.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Move.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Move.cs	(revision 2222)
@@ -0,0 +1,25 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+namespace HeuristicLab.GP.SantaFe {
+  public sealed class Move : Terminal {
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Prog2.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Prog2.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Prog2.cs	(revision 2222)
@@ -0,0 +1,26 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.SantaFe {
+  public sealed class Prog2 : BinaryFunction {
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Prog3.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Prog3.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Prog3.cs	(revision 2222)
@@ -0,0 +1,30 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+namespace HeuristicLab.GP.SantaFe {
+  public sealed class Prog3 : FunctionBase {
+
+    public Prog3()
+      : base() {
+      MinSubTrees = 3; MaxSubTrees = 3;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Right.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Right.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Right.cs	(revision 2222)
@@ -0,0 +1,25 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+namespace HeuristicLab.GP.SantaFe {
+  public sealed class Right : Terminal {
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/SymbolTable.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/SymbolTable.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/SymbolTable.cs	(revision 2222)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.SantaFe {
+  class SymbolTable : StorableBase {
+    public const int IF_FOOD_AHEAD = 1;
+    public const int LEFT = 2;
+    public const int RIGHT = 3;
+    public const int MOVE = 4;
+    public const int PROG2 = 5;
+    public const int PROG3 = 6;
+    public const int UNKNOWN = 7;
+    private static Dictionary<Type, int> staticTypes = new Dictionary<Type, int>();
+
+    // needs to be public for persistence mechanism (Activator.CreateInstance needs empty constructor)
+    static SymbolTable() {
+      staticTypes = new Dictionary<Type, int>();
+      staticTypes[typeof(IfFoodAhead)] = IF_FOOD_AHEAD;
+      staticTypes[typeof(Left)] = LEFT;
+      staticTypes[typeof(Right)] = RIGHT;
+      staticTypes[typeof(Move)] = MOVE;
+      staticTypes[typeof(Prog2)] = PROG2;
+      staticTypes[typeof(Prog3)] = PROG3;
+    }
+
+    internal static int MapFunction(IFunction function) {
+      if(staticTypes.ContainsKey(function.GetType())) return staticTypes[function.GetType()];
+      else return UNKNOWN;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/AccuracyEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/AccuracyEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/AccuracyEvaluator.cs	(revision 2222)
@@ -21,10 +21,6 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.GP.StructureIdentification;
 using HeuristicLab.DataAnalysis;
 
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/ClassificationMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/ClassificationMeanSquaredErrorEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/ClassificationMeanSquaredErrorEvaluator.cs	(revision 2222)
@@ -21,10 +21,6 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.GP.StructureIdentification;
 
 namespace HeuristicLab.GP.StructureIdentification.Classification {
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/ConfusionMatrixEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/ConfusionMatrixEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/ConfusionMatrixEvaluator.cs	(revision 2222)
@@ -20,11 +20,6 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.GP.StructureIdentification;
 
 namespace HeuristicLab.GP.StructureIdentification.Classification {
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/CrossValidation.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/CrossValidation.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/CrossValidation.cs	(revision 2222)
@@ -21,54 +21,47 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Xml;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.DataAnalysis;
 
-namespace HeuristicLab.GP.StructureIdentification.Classification
-{
-    public class CrossValidation : OperatorBase
-    {
+namespace HeuristicLab.GP.StructureIdentification.Classification {
+  public class CrossValidation : OperatorBase {
 
-        private const string DATASET = "Dataset";
-        private const string NFOLD = "n-Fold";
-        private const string TRAININGSAMPLESSTART = "TrainingSamplesStart";
-        private const string TRAININGSAMPLESEND = "TrainingSamplesEnd";
-        private const string VALIDATIONSAMPLESSTART = "ValidationSamplesStart";
-        private const string VALIDATIONSAMPLESEND = "ValidationSamplesEnd";
-        private const string TESTSAMPLESSTART = "TestSamplesStart";
-        private const string TESTSAMPLESEND = "TestSamplesEnd";
+    private const string DATASET = "Dataset";
+    private const string NFOLD = "n-Fold";
+    private const string TRAININGSAMPLESSTART = "TrainingSamplesStart";
+    private const string TRAININGSAMPLESEND = "TrainingSamplesEnd";
+    private const string VALIDATIONSAMPLESSTART = "ValidationSamplesStart";
+    private const string VALIDATIONSAMPLESEND = "ValidationSamplesEnd";
+    private const string TESTSAMPLESSTART = "TestSamplesStart";
+    private const string TESTSAMPLESEND = "TestSamplesEnd";
 
-        public override string Description
-        {
-            get { return @"TASK"; }
-        }
+    public override string Description {
+      get { return @"TASK"; }
+    }
 
-        public CrossValidation()
-            : base()
-        {
-            AddVariableInfo(new VariableInfo(DATASET, "The original dataset and the new datasets in the newly created subscopes", typeof(Dataset), VariableKind.In));
-            AddVariableInfo(new VariableInfo(NFOLD, "Number of folds for the cross-validation", typeof(IntData), VariableKind.In));
-            AddVariableInfo(new VariableInfo(TRAININGSAMPLESSTART, "The start of training samples in the original dataset and starts of training samples in the new datasets", typeof(IntData), VariableKind.In | VariableKind.New));
-            AddVariableInfo(new VariableInfo(TRAININGSAMPLESEND, "The end of training samples in the original dataset and ends of training samples in the new datasets", typeof(IntData), VariableKind.In | VariableKind.New));
-            AddVariableInfo(new VariableInfo(VALIDATIONSAMPLESSTART, "The start of validation samples in the original dataset and starts of validation samples in the new datasets", typeof(IntData), VariableKind.In | VariableKind.New));
-            AddVariableInfo(new VariableInfo(VALIDATIONSAMPLESEND, "The end of validation samples in the original dataset and ends of validation samples in the new datasets", typeof(IntData), VariableKind.In | VariableKind.New));
-            AddVariableInfo(new VariableInfo(TESTSAMPLESSTART, "The start of the test samples in the new datasets", typeof(IntData), VariableKind.New));
-            AddVariableInfo(new VariableInfo(TESTSAMPLESEND, "The end of the test samples in the new datasets", typeof(IntData), VariableKind.New));
-        }
+    public CrossValidation()
+      : base() {
+      AddVariableInfo(new VariableInfo(DATASET, "The original dataset and the new datasets in the newly created subscopes", typeof(Dataset), VariableKind.In));
+      AddVariableInfo(new VariableInfo(NFOLD, "Number of folds for the cross-validation", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo(TRAININGSAMPLESSTART, "The start of training samples in the original dataset and starts of training samples in the new datasets", typeof(IntData), VariableKind.In | VariableKind.New));
+      AddVariableInfo(new VariableInfo(TRAININGSAMPLESEND, "The end of training samples in the original dataset and ends of training samples in the new datasets", typeof(IntData), VariableKind.In | VariableKind.New));
+      AddVariableInfo(new VariableInfo(VALIDATIONSAMPLESSTART, "The start of validation samples in the original dataset and starts of validation samples in the new datasets", typeof(IntData), VariableKind.In | VariableKind.New));
+      AddVariableInfo(new VariableInfo(VALIDATIONSAMPLESEND, "The end of validation samples in the original dataset and ends of validation samples in the new datasets", typeof(IntData), VariableKind.In | VariableKind.New));
+      AddVariableInfo(new VariableInfo(TESTSAMPLESSTART, "The start of the test samples in the new datasets", typeof(IntData), VariableKind.New));
+      AddVariableInfo(new VariableInfo(TESTSAMPLESEND, "The end of the test samples in the new datasets", typeof(IntData), VariableKind.New));
+    }
 
-        public override IOperation Apply(IScope scope) {
+    public override IOperation Apply(IScope scope) {
       Dataset origDataset = GetVariableValue<Dataset>(DATASET, scope, true);
       int nFolds = GetVariableValue<IntData>(NFOLD, scope, true).Data;
-      if (nFolds < 2) throw new ArgumentException("The number of folds (nFolds) has to be >=2 for cross validation"); 
+      if (nFolds < 2) throw new ArgumentException("The number of folds (nFolds) has to be >=2 for cross validation");
       int origTrainingSamplesStart = GetVariableValue<IntData>(TRAININGSAMPLESSTART, scope, true).Data;
       int origTrainingSamplesEnd = GetVariableValue<IntData>(TRAININGSAMPLESEND, scope, true).Data;
       int origValidationSamplesStart = GetVariableValue<IntData>(VALIDATIONSAMPLESSTART, scope, true).Data;
       int origValidationSamplesEnd = GetVariableValue<IntData>(VALIDATIONSAMPLESEND, scope, true).Data;
-      int n=origDataset.Rows;
-      int origTrainingSamples = (origTrainingSamplesEnd-origTrainingSamplesStart);
-      int origValidationSamples = (origValidationSamplesEnd-origValidationSamplesStart);
+      int n = origDataset.Rows;
+      int origTrainingSamples = (origTrainingSamplesEnd - origTrainingSamplesStart);
+      int origValidationSamples = (origValidationSamplesEnd - origValidationSamplesStart);
 
       double percentTrainingSamples = origTrainingSamples / (double)(origValidationSamples + origTrainingSamples);
@@ -82,5 +75,5 @@
       int newTestSamplesEnd = n;
 
-      for(int i = 0; i < nFolds; i++) {
+      for (int i = 0; i < nFolds; i++) {
         Scope childScope = new Scope(i.ToString());
         Dataset rotatedSet = new Dataset();
@@ -106,10 +99,9 @@
     }
 
-        private void RotateArray(double[] samples, int p)
-        {
-            Array.Reverse(samples, 0, p);
-            Array.Reverse(samples, p, samples.Length - p);
-            Array.Reverse(samples);
-        }
+    private void RotateArray(double[] samples, int p) {
+      Array.Reverse(samples, 0, p);
+      Array.Reverse(samples, p, samples.Length - p);
+      Array.Reverse(samples);
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/GPClassificationEvaluatorBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/GPClassificationEvaluatorBase.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/GPClassificationEvaluatorBase.cs	(revision 2222)
@@ -21,10 +21,6 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.GP.StructureIdentification;
 using HeuristicLab.DataAnalysis;
 
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/HeuristicLab.GP.StructureIdentification.Classification-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/HeuristicLab.GP.StructureIdentification.Classification-3.3.csproj	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/HeuristicLab.GP.StructureIdentification.Classification-3.3.csproj	(revision 2222)
@@ -94,8 +94,4 @@
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Constraints\3.2\HeuristicLab.Constraints-3.2.csproj">
-      <Project>{FCD62C6F-4793-4593-AE9A-0BDCA256EE99}</Project>
-      <Name>HeuristicLab.Constraints-3.2</Name>
-    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
       <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
@@ -109,4 +105,8 @@
       <Project>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</Project>
       <Name>HeuristicLab.Data-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.GP.Interfaces\3.3\HeuristicLab.GP.Interfaces-3.3.csproj">
+      <Project>{924B6BEA-9A99-40FE-9334-5C01E8D540EC}</Project>
+      <Name>HeuristicLab.GP.Interfaces-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.GP.StructureIdentification\3.3\HeuristicLab.GP.StructureIdentification-3.3.csproj">
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/HeuristicLabGPClassificationPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/HeuristicLabGPClassificationPlugin.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/HeuristicLabGPClassificationPlugin.cs	(revision 2222)
@@ -28,9 +28,9 @@
   [ClassInfo(Name = "HeuristicLab.GP.StructureIdentification.Classification-3.3")]
   [PluginFile(Filename = "HeuristicLab.GP.StructureIdentification.Classification-3.3.dll", Filetype = PluginFileType.Assembly)]
-  [Dependency(Dependency = "HeuristicLab.Constraints-3.2")]
   [Dependency(Dependency = "HeuristicLab.Core-3.2")]
   [Dependency(Dependency = "HeuristicLab.Data-3.2")]
   [Dependency(Dependency = "HeuristicLab.DataAnalysis-3.2")]
   [Dependency(Dependency = "HeuristicLab.GP-3.3")]
+  [Dependency(Dependency = "HeuristicLab.GP.Interfaces-3.3")]
   [Dependency(Dependency = "HeuristicLab.GP.StructureIdentification-3.3")]
   [Dependency(Dependency = "HeuristicLab.Modeling-3.2")]
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/MulticlassModeller.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/MulticlassModeller.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/MulticlassModeller.cs	(revision 2222)
@@ -22,6 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
-using System.Xml;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/MulticlassOneVsOneAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/MulticlassOneVsOneAnalyzer.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/MulticlassOneVsOneAnalyzer.cs	(revision 2222)
@@ -21,11 +21,8 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Xml;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.DataAnalysis;
-using HeuristicLab.GP.StructureIdentification;
+using HeuristicLab.GP.Interfaces;
 
 namespace HeuristicLab.GP.StructureIdentification.Classification {
@@ -45,4 +42,5 @@
     private const string VOTES = "Votes";
     private const string ACCURACY = "Accuracy";
+    private const string TREEEVALUATOR = "TreeEvaluator";
 
     private const double EPSILON = 1E-6;
@@ -63,5 +61,6 @@
       AddVariableInfo(new VariableInfo(SAMPLESEND, "The end of samples in the original dataset", typeof(IntData), VariableKind.In));
       AddVariableInfo(new VariableInfo(BESTMODELLSCOPE, "The variable containing the scope of the model (incl. meta data)", typeof(IScope), VariableKind.In));
-      AddVariableInfo(new VariableInfo(BESTMODELL, "The variable in the scope of the model that contains the actual model", typeof(BakedFunctionTree), VariableKind.In));
+      AddVariableInfo(new VariableInfo(BESTMODELL, "The variable in the scope of the model that contains the actual model", typeof(IGeneticProgrammingModel), VariableKind.In));
+      AddVariableInfo(new VariableInfo(TREEEVALUATOR, "The evaluator to apply to the function tree", typeof(ITreeEvaluator), VariableKind.In));
       AddVariableInfo(new VariableInfo(VOTES, "Array with the votes for each instance", typeof(IntMatrixData), VariableKind.New));
       AddVariableInfo(new VariableInfo(ACCURACY, "Accuracy of the one-vs-one multi-cass classifier", typeof(DoubleData), VariableKind.New));
@@ -82,8 +81,8 @@
         double classBValue = GetVariableValue<DoubleData>(CLASSBVALUE, childScope, true).Data;
         IScope bestScope = GetVariableValue<IScope>(BESTMODELLSCOPE, childScope, true);
-        BakedFunctionTree functionTree = GetVariableValue<BakedFunctionTree>(BESTMODELL, bestScope, true);
+        IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>(BESTMODELL, bestScope, true);
 
-        BakedTreeEvaluator evaluator = new BakedTreeEvaluator();
-        evaluator.PrepareForEvaluation(dataset, targetVariable, trainingSamplesStart, trainingSamplesEnd, 1.0, functionTree);
+        ITreeEvaluator evaluator = GetVariableValue<ITreeEvaluator>(TREEEVALUATOR, bestScope, true);
+        evaluator.PrepareForEvaluation(dataset, targetVariable, trainingSamplesStart, trainingSamplesEnd, 1.0, gpModel.FunctionTree);
         for(int i = 0; i < (samplesEnd - samplesStart); i++) {
           double est = evaluator.Evaluate(i + samplesStart);
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/OffspringSelectionGP.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/OffspringSelectionGP.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/OffspringSelectionGP.cs	(revision 2222)
@@ -20,14 +20,5 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
-using System.Xml;
-using System.Diagnostics;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Random;
-using HeuristicLab.Data;
 using HeuristicLab.Modeling;
 
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/ROCAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/ROCAnalyzer.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/ROCAnalyzer.cs	(revision 2222)
@@ -20,11 +20,8 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.DataAnalysis;
 
 
@@ -89,5 +86,5 @@
       foreach (double key in classes.Keys)
         classes[key].Sort();
-  
+
       //calculate ROC Curve
       foreach (double key in classes.Keys) {
@@ -133,7 +130,7 @@
           }
         }
-          myAucValues.Add(new DoubleData(bestAUC));
-          myRocValues.Add(Convert(bestROC));
-        
+        myAucValues.Add(new DoubleData(bestAUC));
+        myRocValues.Add(Convert(bestROC));
+
       } else { //last class
         actNegatives = negatives.Where<double>(value => value > classes[positiveClassKey].Min<double>()).ToList<double>();
@@ -158,5 +155,5 @@
 
       actTP = positives.Count<double>(value => minThreshold <= value && value <= negatives.Max<double>());
-      actFP = negatives.Count<double>(value => minThreshold <= value );
+      actFP = negatives.Count<double>(value => minThreshold <= value);
       //add point (1,TPR) for AUC 'correct' calculation
       roc.Add(new KeyValuePair<double, double>(1, actTP / positives.Count));
@@ -222,5 +219,5 @@
 
         //stop calculation if truePositiveRate == 0 => straight line with y=0 & save runtime
-        if (actTP == 0 || actFP==0)
+        if (actTP == 0 || actFP == 0)
           break;
       }
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/StandardGP.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/StandardGP.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/StandardGP.cs	(revision 2222)
@@ -20,16 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
-using System.Xml;
-using System.Diagnostics;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Random;
-using HeuristicLab.Data;
+using HeuristicLab.Modeling;
 using HeuristicLab.Operators;
-using HeuristicLab.Modeling;
 
 namespace HeuristicLab.GP.StructureIdentification.Classification {
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation/3.3/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation/3.3/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation-3.3.csproj	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation/3.3/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation-3.3.csproj	(revision 2222)
@@ -104,4 +104,8 @@
       <Name>HeuristicLab.Data-3.2</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.GP.Interfaces\3.3\HeuristicLab.GP.Interfaces-3.3.csproj">
+      <Project>{924B6BEA-9A99-40FE-9334-5C01E8D540EC}</Project>
+      <Name>HeuristicLab.GP.Interfaces-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.GP.StructureIdentification\3.3\HeuristicLab.GP.StructureIdentification-3.3.csproj">
       <Project>{74223A32-C726-4978-BE78-37113A18373C}</Project>
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation/3.3/HeuristicLabGPConditionalEvaluationPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation/3.3/HeuristicLabGPConditionalEvaluationPlugin.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation/3.3/HeuristicLabGPConditionalEvaluationPlugin.cs	(revision 2222)
@@ -32,4 +32,5 @@
   [Dependency(Dependency = "HeuristicLab.DataAnalysis-3.2")]
   [Dependency(Dependency = "HeuristicLab.GP-3.3")]
+  [Dependency(Dependency = "HeuristicLab.GP.Interfaces-3.3")]
   [Dependency(Dependency = "HeuristicLab.GP.StructureIdentification-3.3")]
   [Dependency(Dependency = "HeuristicLab.Modeling-3.2")]
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/AveragePercentageChangeEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/AveragePercentageChangeEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/AveragePercentageChangeEvaluator.cs	(revision 2222)
@@ -21,10 +21,6 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.GP.StructureIdentification;
 
 namespace HeuristicLab.GP.StructureIdentification.TimeSeries {
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/HeuristicLab.GP.StructureIdentification.TimeSeries-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/HeuristicLab.GP.StructureIdentification.TimeSeries-3.3.csproj	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/HeuristicLab.GP.StructureIdentification.TimeSeries-3.3.csproj	(revision 2222)
@@ -91,8 +91,4 @@
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Constraints\3.2\HeuristicLab.Constraints-3.2.csproj">
-      <Project>{FCD62C6F-4793-4593-AE9A-0BDCA256EE99}</Project>
-      <Name>HeuristicLab.Constraints-3.2</Name>
-    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
       <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
@@ -106,4 +102,8 @@
       <Project>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</Project>
       <Name>HeuristicLab.Data-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.GP.Interfaces\3.3\HeuristicLab.GP.Interfaces-3.3.csproj">
+      <Project>{924B6BEA-9A99-40FE-9334-5C01E8D540EC}</Project>
+      <Name>HeuristicLab.GP.Interfaces-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.GP.StructureIdentification\3.3\HeuristicLab.GP.StructureIdentification-3.3.csproj">
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/HeuristicLabGPTimeSeriesPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/HeuristicLabGPTimeSeriesPlugin.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/HeuristicLabGPTimeSeriesPlugin.cs	(revision 2222)
@@ -33,7 +33,8 @@
   [Dependency(Dependency = "HeuristicLab.DataAnalysis-3.2")]
   [Dependency(Dependency = "HeuristicLab.GP-3.3")]
+  [Dependency(Dependency = "HeuristicLab.GP.Interfaces-3.3")]
   [Dependency(Dependency = "HeuristicLab.GP.StructureIdentification-3.3")]
+  [Dependency(Dependency = "HeuristicLab.Logging-3.2")]
   [Dependency(Dependency = "HeuristicLab.Modeling-3.2")]
-  [Dependency(Dependency = "HeuristicLab.Logging-3.2")]
   [Dependency(Dependency = "HeuristicLab.Operators-3.2")]
   public class HeuristicLabGPTimeSeriesPlugin : PluginBase {
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/OffspringSelectionGP.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/OffspringSelectionGP.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/OffspringSelectionGP.cs	(revision 2222)
@@ -20,16 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
-using System.Xml;
-using System.Diagnostics;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Data;
+using HeuristicLab.Modeling;
 using HeuristicLab.Operators;
-using HeuristicLab.Logging;
-using HeuristicLab.Modeling;
 
 namespace HeuristicLab.GP.StructureIdentification.TimeSeries {
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/ProfitEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/ProfitEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/ProfitEvaluator.cs	(revision 2222)
@@ -20,11 +20,6 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.GP.StructureIdentification;
 
 namespace HeuristicLab.GP.StructureIdentification.TimeSeries {
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/StandardGP.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/StandardGP.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/StandardGP.cs	(revision 2222)
@@ -20,16 +20,9 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
-using System.Xml;
-using System.Diagnostics;
-using HeuristicLab.DataAnalysis;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Logging;
 using HeuristicLab.Modeling;
+using HeuristicLab.Operators;
 
 namespace HeuristicLab.GP.StructureIdentification.TimeSeries {
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/TheilInequalityCoefficientEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/TheilInequalityCoefficientEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/TheilInequalityCoefficientEvaluator.cs	(revision 2222)
@@ -21,10 +21,6 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.GP.StructureIdentification;
 using HeuristicLab.DataAnalysis;
 
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Addition.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Addition.cs	(revision 2221)
+++ 	(revision )
@@ -1,50 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Constraints;
-using System.Linq;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Addition : FunctionBase {
-    public override string Description {
-      get {
-        return @"Returns the sum of all sub-tree results.
-    (+ 3) => 3
-    (+ 2 3) => 5
-    (+ 3 4 5) => 12";
-      }
-    }
-
-    public Addition()
-      : base() {
-      // 2 - 3 seems like an reasonable defaut (used for +,-,*,/) (discussion with swinkler and maffenze)
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-      AddConstraint(new SubOperatorTypeConstraint(2));
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs	(revision 2222)
@@ -22,18 +22,15 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Xml;
 using HeuristicLab.Core;
-using System.Xml;
-using System.Diagnostics;
+using HeuristicLab.Data;
 using HeuristicLab.DataAnalysis;
+using HeuristicLab.Evolutionary;
+using HeuristicLab.GP.Interfaces;
+using HeuristicLab.Logging;
+using HeuristicLab.Modeling;
 using HeuristicLab.Operators;
 using HeuristicLab.Random;
 using HeuristicLab.Selection;
-using HeuristicLab.Logging;
-using HeuristicLab.Data;
-using HeuristicLab.Operators.Programmable;
-using HeuristicLab.Evolutionary;
-using HeuristicLab.Modeling;
 
 namespace HeuristicLab.GP.StructureIdentification {
@@ -419,5 +416,5 @@
       Model model = new Model();
       Dataset ds = bestModelScope.GetVariableValue<Dataset>("Dataset", true);
-      model.Data = bestModelScope.GetVariableValue<IFunctionTree>("FunctionTree", false);
+      model.Data = bestModelScope.GetVariableValue<IGeneticProgrammingModel>("FunctionTree", false);
       model.Dataset = ds;
       model.TargetVariable = ds.GetVariableName(bestModelScope.GetVariableValue<IntData>("TargetVariable", true).Data);
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/And.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/And.cs	(revision 2221)
+++ 	(revision )
@@ -1,46 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Constraints;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class And : FunctionBase {
-    public override string Description {
-      get {
-        return @"Logical AND operation. Only defined for sub-tree-results 0.0 and 1.0.
-AND is a special form, sub-trees are evaluated from the first to the last. Evaluation is 
-stopped as soon as one of the sub-trees evaluates to 0.0 (false).";
-      }
-    }
-
-    public And()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-      AddConstraint(new SubOperatorTypeConstraint(2));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Average.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Average.cs	(revision 2221)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Constraints;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Average : FunctionBase {
-    public override string Description {
-      get {
-        return @"Returns the average (arithmetic mean) of all sub-tree results.";
-      }
-    }
-
-    public Average()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-      AddConstraint(new SubOperatorTypeConstraint(2));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/BakedTreeEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/BakedTreeEvaluator.cs	(revision 2221)
+++ 	(revision )
@@ -1,194 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using System.Xml;
-using System.Diagnostics;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  /// <summary>
-  /// Evaluates FunctionTrees recursively by interpretation of the function symbols in each node.
-  /// Not thread-safe!
-  /// </summary>
-  public class BakedTreeEvaluator : TreeEvaluatorBase {
-
-
-    protected override double EvaluateBakedCode() {
-      Instr currInstr = codeArr[PC++];
-      switch (currInstr.symbol) {
-        case EvaluatorSymbolTable.VARIABLE: {
-            int row = sampleIndex + currInstr.i_arg1;
-            if (row < 0 || row >= dataset.Rows) return double.NaN;
-            else return currInstr.d_arg0 * dataset.GetValue(row, currInstr.i_arg0);
-          }
-        case EvaluatorSymbolTable.CONSTANT: {
-            return currInstr.d_arg0;
-          }
-        case EvaluatorSymbolTable.DIFFERENTIAL: {
-            int row = sampleIndex + currInstr.i_arg1;
-            if (row < 0 || row >= dataset.Rows) return double.NaN;
-            else if (row < 1) return 0.0;
-            else {
-              double prevValue = dataset.GetValue(row - 1, currInstr.i_arg0);
-              if (double.IsNaN(prevValue) || double.IsInfinity(prevValue)) return 0.0;
-              else return currInstr.d_arg0 * (dataset.GetValue(row, currInstr.i_arg0) - prevValue);
-            }
-          }
-        case EvaluatorSymbolTable.MULTIPLICATION: {
-            double result = EvaluateBakedCode();
-            for (int i = 1; i < currInstr.arity; i++) {
-              result *= EvaluateBakedCode();
-            }
-            return result;
-          }
-        case EvaluatorSymbolTable.ADDITION: {
-            double sum = EvaluateBakedCode();
-            for (int i = 1; i < currInstr.arity; i++) {
-              sum += EvaluateBakedCode();
-            }
-            return sum;
-          }
-        case EvaluatorSymbolTable.SUBTRACTION: {
-            double result = EvaluateBakedCode();
-            for (int i = 1; i < currInstr.arity; i++) {
-              result -= EvaluateBakedCode();
-            }
-            return result;
-          }
-        case EvaluatorSymbolTable.DIVISION: {
-            double result;
-            result = EvaluateBakedCode();
-            for (int i = 1; i < currInstr.arity; i++) {
-              result /= EvaluateBakedCode();
-            }
-            if (double.IsInfinity(result)) return 0.0;
-            else return result;
-          }
-        case EvaluatorSymbolTable.AVERAGE: {
-            double sum = EvaluateBakedCode();
-            for (int i = 1; i < currInstr.arity; i++) {
-              sum += EvaluateBakedCode();
-            }
-            return sum / currInstr.arity;
-          }
-        case EvaluatorSymbolTable.COSINUS: {
-            return Math.Cos(EvaluateBakedCode());
-          }
-        case EvaluatorSymbolTable.SINUS: {
-            return Math.Sin(EvaluateBakedCode());
-          }
-        case EvaluatorSymbolTable.EXP: {
-            return Math.Exp(EvaluateBakedCode());
-          }
-        case EvaluatorSymbolTable.LOG: {
-            return Math.Log(EvaluateBakedCode());
-          }
-        case EvaluatorSymbolTable.POWER: {
-            double x = EvaluateBakedCode();
-            double p = EvaluateBakedCode();
-            return Math.Pow(x, p);
-          }
-        case EvaluatorSymbolTable.SIGNUM: {
-            double value = EvaluateBakedCode();
-            if (double.IsNaN(value)) return double.NaN;
-            else return Math.Sign(value);
-          }
-        case EvaluatorSymbolTable.SQRT: {
-            return Math.Sqrt(EvaluateBakedCode());
-          }
-        case EvaluatorSymbolTable.TANGENS: {
-            return Math.Tan(EvaluateBakedCode());
-          }
-        case EvaluatorSymbolTable.AND: { // only defined for inputs 1 and 0
-            double result = EvaluateBakedCode();
-            for (int i = 1; i < currInstr.arity; i++) {
-              if (result == 0.0) SkipBakedCode();
-              else {
-                result = EvaluateBakedCode();
-              }
-              Debug.Assert(result == 0.0 || result == 1.0);
-            }
-            return result;
-          }
-        case EvaluatorSymbolTable.EQU: {
-            double x = EvaluateBakedCode();
-            double y = EvaluateBakedCode();
-            if (Math.Abs(x - y) < EPSILON) return 1.0; else return 0.0;
-          }
-        case EvaluatorSymbolTable.GT: {
-            double x = EvaluateBakedCode();
-            double y = EvaluateBakedCode();
-            if (x > y) return 1.0;
-            else return 0.0;
-          }
-        case EvaluatorSymbolTable.IFTE: { // only defined for condition 0 or 1
-            double condition = EvaluateBakedCode();
-            Debug.Assert(condition == 0.0 || condition == 1.0);
-            double result;
-            if (condition == 0.0) {
-              result = EvaluateBakedCode(); SkipBakedCode();
-            } else {
-              SkipBakedCode(); result = EvaluateBakedCode();
-            }
-            return result;
-          }
-        case EvaluatorSymbolTable.LT: {
-            double x = EvaluateBakedCode();
-            double y = EvaluateBakedCode();
-            if (x < y) return 1.0;
-            else return 0.0;
-          }
-        case EvaluatorSymbolTable.NOT: { // only defined for inputs 0 or 1
-            double result = EvaluateBakedCode();
-            Debug.Assert(result == 0.0 || result == 1.0);
-            return Math.Abs(result - 1.0);
-          }
-        case EvaluatorSymbolTable.OR: { // only defined for inputs 0 or 1
-            double result = EvaluateBakedCode();
-            for (int i = 1; i < currInstr.arity; i++) {
-              if (result > 0.0) SkipBakedCode();
-              else {
-                result = EvaluateBakedCode();
-                Debug.Assert(result == 0.0 || result == 1.0);
-              }
-            }
-            return result;
-          }
-        case EvaluatorSymbolTable.XOR: { // only defined for inputs 0 or 1
-            double x = EvaluateBakedCode();
-            double y = EvaluateBakedCode();
-            return Math.Abs(x - y);
-          }
-        case EvaluatorSymbolTable.UNKNOWN: { // evaluate functions which are not statically defined directly
-            return currInstr.function.Apply();
-          }
-        default: {
-            throw new NotImplementedException();
-          }
-      }
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Constant.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Constant.cs	(revision 2221)
+++ 	(revision )
@@ -1,92 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Operators;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Constant : FunctionBase {
-    public const string VALUE = "Value";
-
-    public override string Description {
-      get { return "Returns the value of local variable 'Value'."; }
-    }
-
-    public Constant()
-      : base() {
-      AddVariableInfo(new VariableInfo(VALUE, "The constant value", typeof(DoubleData), VariableKind.None));
-      GetVariableInfo(VALUE).Local = true;
-
-      DoubleData valueData = new DoubleData();
-      // initialize a default range for the contant value
-      HeuristicLab.Core.Variable value = new HeuristicLab.Core.Variable(VALUE, valueData);
-      AddVariable(value);
-
-      SetupInitialization();
-      SetupManipulation();
-
-      // constant can't have suboperators
-      AddConstraint(new NumberOfSubOperatorsConstraint(0, 0));
-    }
-
-    private void SetupInitialization() {
-      // initialization operator
-      AddVariableInfo(new VariableInfo(INITIALIZATION, "Initialization operator-graph for constants", typeof(IOperatorGraph), VariableKind.None));
-      GetVariableInfo(INITIALIZATION).Local = false;
-      CombinedOperator combinedOp = new CombinedOperator();
-      SequentialProcessor initSeq = new SequentialProcessor();
-      UniformRandomizer randomizer = new UniformRandomizer();
-      randomizer.Min = -20.0;
-      randomizer.Max = 20.0;
-
-      combinedOp.OperatorGraph.AddOperator(initSeq);
-      combinedOp.OperatorGraph.AddOperator(randomizer);
-      combinedOp.OperatorGraph.InitialOperator = initSeq;
-      initSeq.AddSubOperator(randomizer);
-      AddVariable(new HeuristicLab.Core.Variable(INITIALIZATION, combinedOp));
-    }
-
-    private void SetupManipulation() {
-      // manipulation operator
-      AddVariableInfo(new VariableInfo(MANIPULATION, "Manipulation operator-graph for constants", typeof(IOperatorGraph), VariableKind.None));
-      GetVariableInfo(MANIPULATION).Local = false;
-      CombinedOperator combinedOp = new CombinedOperator();
-      SequentialProcessor manipulationSeq = new SequentialProcessor();
-      NormalRandomAdder valueAdder = new NormalRandomAdder();
-      valueAdder.Mu = 0.0;
-      valueAdder.Sigma = 1.0;
-
-      combinedOp.OperatorGraph.AddOperator(manipulationSeq);
-      combinedOp.OperatorGraph.AddOperator(valueAdder);
-      combinedOp.OperatorGraph.InitialOperator = manipulationSeq;
-      manipulationSeq.AddSubOperator(valueAdder);
-      AddVariable(new HeuristicLab.Core.Variable(MANIPULATION, combinedOp));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Cosinus.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Cosinus.cs	(revision 2221)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Cosinus : FunctionBase {
-    public override string Description {
-      get { return "Returns the cosinus of the first sub-tree."; }
-    }
-
-    public Cosinus()
-      : base() {
-      // must have exactly one subfunction
-      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Differential.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Differential.cs	(revision 2221)
+++ 	(revision )
@@ -1,46 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Data;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Operators;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Differential : Variable {
-
-    public override string Description {
-      get {
-        return @"Differential returns the difference between the value of a variable at t and t-1. The weight is a coefficient that is multiplied to the the difference.";
-      }
-    }
-
-    public Differential()
-      : base() {
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Division.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Division.cs	(revision 2221)
+++ 	(revision )
@@ -1,57 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Constraints;
-using System.Linq;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Division : FunctionBase {
-    private const double EPSILON = 10.0E-20; // if any divisor is < EPSILON return 0
-
-    public override string Description {
-      get {
-        return @"Protected division
-Divides the result of the first sub-tree by the results of the following sub-tree.
-In case one of the divisors is 0 returns 0.
-    (/ 3) => 1/3
-    (/ 2 3) => 2/3
-    (/ 3 4 5) => 3/20
-    (/ 2 0 4) => 0
-";
-      }
-    }
-
-    public Division()
-      : base() {
-      // 2 - 3 seems like an reasonable defaut (used for +,-,*,/) (discussion with swinkler and maffenze)
-      //MK changed to only 2 allowed suboperators to be compliant with HL2
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Equal.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Equal.cs	(revision 2221)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Equal : FunctionBase {
-    public override string Description {
-      get {
-        return @"Equal condition. Returns 1.0 if both sub-trees evaluate to the same value and 0.0 if they differ.";
-      }
-    }
-
-    public Equal()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/CoefficientOfDeterminationEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/CoefficientOfDeterminationEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/CoefficientOfDeterminationEvaluator.cs	(revision 2222)
@@ -21,10 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Modeling;
 
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/EarlyStoppingMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/EarlyStoppingMeanSquaredErrorEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/EarlyStoppingMeanSquaredErrorEvaluator.cs	(revision 2222)
@@ -20,11 +20,6 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
 
 namespace HeuristicLab.GP.StructureIdentification {
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/GPEvaluatorBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/GPEvaluatorBase.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/GPEvaluatorBase.cs	(revision 2222)
@@ -20,12 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.DataAnalysis;
+using HeuristicLab.GP.Interfaces;
 
 namespace HeuristicLab.GP.StructureIdentification {
@@ -34,6 +30,5 @@
       : base() {
       AddVariableInfo(new VariableInfo("TreeEvaluator", "The evaluator that should be used to evaluate the expression tree", typeof(ITreeEvaluator), VariableKind.In));
-      AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be evaluated", typeof(IFunctionTree), VariableKind.In));
-      AddVariableInfo(new VariableInfo("TreeSize", "Size (number of nodes) of the tree to evaluate", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be evaluated", typeof(IGeneticProgrammingModel), VariableKind.In));
       AddVariableInfo(new VariableInfo("Dataset", "Dataset with all samples on which to apply the function", typeof(Dataset), VariableKind.In));
       AddVariableInfo(new VariableInfo("TargetVariable", "Index of the column of the dataset that holds the target variable", typeof(IntData), VariableKind.In));
@@ -51,7 +46,6 @@
       int targetVariable = GetVariableValue<IntData>("TargetVariable", scope, true).Data;
       Dataset dataset = GetVariableValue<Dataset>("Dataset", scope, true);
-      IFunctionTree functionTree = GetVariableValue<IFunctionTree>("FunctionTree", scope, true);
+      IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope, true);
       double punishmentFactor = GetVariableValue<DoubleData>("PunishmentFactor", scope, true).Data;
-      int treeSize = scope.GetVariableValue<IntData>("TreeSize", true).Data;
       double totalEvaluatedNodes = scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data;
       int trainingStart = GetVariableValue<IntData>("TrainingSamplesStart", scope, true).Data;
@@ -61,5 +55,5 @@
       bool useEstimatedValues = GetVariableValue<BoolData>("UseEstimatedTargetValue", scope, true).Data;
       ITreeEvaluator evaluator = GetVariableValue<ITreeEvaluator>("TreeEvaluator", scope, true);
-      evaluator.PrepareForEvaluation(dataset, targetVariable, trainingStart, trainingEnd, punishmentFactor, functionTree);
+      evaluator.PrepareForEvaluation(dataset, targetVariable, trainingStart, trainingEnd, punishmentFactor, gpModel.FunctionTree);
 
       double[] backupValues = null;
@@ -86,5 +80,5 @@
 
       // update the value of total evaluated nodes
-      scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data = totalEvaluatedNodes + treeSize * (end - start);
+      scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data = totalEvaluatedNodes + gpModel.Size * (end - start);
       return null;
     }
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanAbsolutePercentageErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanAbsolutePercentageErrorEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanAbsolutePercentageErrorEvaluator.cs	(revision 2222)
@@ -21,12 +21,5 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Modeling;
-using HeuristicLab.DataAnalysis;
 
 namespace HeuristicLab.GP.StructureIdentification {
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanAbsolutePercentageOfRangeErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanAbsolutePercentageOfRangeErrorEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanAbsolutePercentageOfRangeErrorEvaluator.cs	(revision 2222)
@@ -21,12 +21,5 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Modeling;
-using HeuristicLab.DataAnalysis;
 
 namespace HeuristicLab.GP.StructureIdentification {
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanSquaredErrorEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanSquaredErrorEvaluator.cs	(revision 2222)
@@ -21,11 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.DataAnalysis;
 using HeuristicLab.Modeling;
 
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/SimpleEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/SimpleEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/SimpleEvaluator.cs	(revision 2222)
@@ -20,11 +20,6 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.DataAnalysis;
 
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/SimpleGPEvaluatorBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/SimpleGPEvaluatorBase.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/SimpleGPEvaluatorBase.cs	(revision 2222)
@@ -20,11 +20,6 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.DataAnalysis;
 
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/UncertainMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/UncertainMeanSquaredErrorEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/UncertainMeanSquaredErrorEvaluator.cs	(revision 2222)
@@ -21,11 +21,6 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.DataAnalysis;
 using HeuristicLab.Random;
 
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VariableEvaluationImpactCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VariableEvaluationImpactCalculator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VariableEvaluationImpactCalculator.cs	(revision 2222)
@@ -20,12 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Xml;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.DataAnalysis;
-using System.Linq;
+using HeuristicLab.GP.Interfaces;
 
 namespace HeuristicLab.GP.StructureIdentification {
@@ -35,5 +31,5 @@
       : base() {
       AddVariableInfo(new VariableInfo("TreeEvaluator", "The evaluator that should be used to evaluate the expression tree", typeof(ITreeEvaluator), VariableKind.In));
-      AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be evaluated", typeof(IFunctionTree), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be evaluated", typeof(IGeneticProgrammingModel), VariableKind.In));
       AddVariableInfo(new VariableInfo("TreeSize", "Size (number of nodes) of the tree to evaluate", typeof(IntData), VariableKind.In));
       AddVariableInfo(new VariableInfo("PunishmentFactor", "Punishment factor for invalid estimations", typeof(DoubleData), VariableKind.In));
@@ -43,7 +39,7 @@
     protected override double[] GetOutputs(IScope scope, Dataset dataset, int targetVariable, int start, int end) {
       ITreeEvaluator evaluator = GetVariableValue<ITreeEvaluator>("TreeEvaluator", scope, true);
-      IFunctionTree tree = GetVariableValue<IFunctionTree>("FunctionTree", scope, true);
+      IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope, true);
       double punishmentFactor = GetVariableValue<DoubleData>("PunishmentFactor", scope, true).Data;
-      evaluator.PrepareForEvaluation(dataset, targetVariable, start, end, punishmentFactor, tree);
+      evaluator.PrepareForEvaluation(dataset, targetVariable, start, end, punishmentFactor, gpModel.FunctionTree);
 
       double[] result = new double[end - start];
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VariableQualityImpactCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VariableQualityImpactCalculator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VariableQualityImpactCalculator.cs	(revision 2222)
@@ -21,11 +21,8 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Xml;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.DataAnalysis;
-using System.Linq;
+using HeuristicLab.GP.Interfaces;
 
 namespace HeuristicLab.GP.StructureIdentification {
@@ -35,5 +32,5 @@
       : base() {
       AddVariableInfo(new VariableInfo("TreeEvaluator", "The evaluator that should be used to evaluate the expression tree", typeof(ITreeEvaluator), VariableKind.In));
-      AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be evaluated", typeof(IFunctionTree), VariableKind.In));
+      AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be evaluated", typeof(IGeneticProgrammingModel), VariableKind.In));
       AddVariableInfo(new VariableInfo("TreeSize", "Size (number of nodes) of the tree to evaluate", typeof(IntData), VariableKind.In));
       AddVariableInfo(new VariableInfo("PunishmentFactor", "Punishment factor for invalid estimations", typeof(DoubleData), VariableKind.In));
@@ -42,7 +39,7 @@
     protected override double CalculateQuality(IScope scope, Dataset dataset, int targetVariable, int start, int end) {
       ITreeEvaluator evaluator = GetVariableValue<ITreeEvaluator>("TreeEvaluator", scope, true);
-      IFunctionTree tree = GetVariableValue<IFunctionTree>("FunctionTree", scope, true);
+      IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope, true);
       double punishmentFactor = GetVariableValue<DoubleData>("PunishmentFactor", scope, true).Data;
-      evaluator.PrepareForEvaluation(dataset, targetVariable, start, end, punishmentFactor, tree);
+      evaluator.PrepareForEvaluation(dataset, targetVariable, start, end, punishmentFactor, gpModel.FunctionTree);
 
       double[,] result = new double[end - start, 2];
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VarianceAccountedForEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VarianceAccountedForEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VarianceAccountedForEvaluator.cs	(revision 2222)
@@ -21,11 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.DataAnalysis;
 using HeuristicLab.Modeling;
 
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Exponential.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Exponential.cs	(revision 2221)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Exponential : FunctionBase {
-    public override string Description {
-      get { return "Returns returns exponential of the first sub-tree (power(e, x))."; }
-    }
-
-    public Exponential()
-      : base() {
-      // must have exactly one sub-operator
-      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/FunctionLibraryInjector.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/FunctionLibraryInjector.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/FunctionLibraryInjector.cs	(revision 2222)
@@ -20,18 +20,12 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.Text;
-using System.Xml;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Constraints;
-using StructId = HeuristicLab.GP.StructureIdentification;
+using HeuristicLab.GP.Interfaces;
+using HeuristicLab.GP.SantaFe;
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public class FunctionLibraryInjector : OperatorBase {
-    private const string FUNCTIONLIBRARY = "FunctionLibrary";
-    private const string TARGETVARIABLE = "TargetVariable";
+  public class FunctionLibraryInjector : FunctionLibraryInjectorBase {
     private const string MINTIMEOFFSET = "MinTimeOffset";
     private const string MAXTIMEOFFSET = "MaxTimeOffset";
@@ -62,4 +56,6 @@
     private const string XOR_ALLOWED = "Xor";
 
+    private int minTimeOffset;
+    private int maxTimeOffset;
 
     public override string Description {
@@ -69,8 +65,6 @@
     public FunctionLibraryInjector()
       : base() {
-      AddVariableInfo(new VariableInfo(TARGETVARIABLE, "The target variable", typeof(IntData), VariableKind.In));
       AddVariableInfo(new VariableInfo(MINTIMEOFFSET, "Minimal time offset for all features", typeof(IntData), VariableKind.In));
       AddVariableInfo(new VariableInfo(MAXTIMEOFFSET, "Maximal time offset for all feature", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo(FUNCTIONLIBRARY, "Preconfigured default operator library", typeof(GPOperatorLibrary), VariableKind.New));
 
       AddVariable(DIFFERENTIALS_ALLOWED, false);
@@ -107,68 +101,70 @@
 
     public override IOperation Apply(IScope scope) {
-      StructId.Variable variable;
-      GPOperatorLibrary operatorLibrary;
-      int targetVariable = GetVariableValue<IntData>(TARGETVARIABLE, scope, true).Data;
-
       // try to get minTimeOffset (use 0 as default if not available)
       IItem minTimeOffsetItem = GetVariableValue(MINTIMEOFFSET, scope, true, false);
-      int minTimeOffset = minTimeOffsetItem == null ? 0 : ((IntData)minTimeOffsetItem).Data;
+      minTimeOffset = minTimeOffsetItem == null ? 0 : ((IntData)minTimeOffsetItem).Data;
       // try to get maxTimeOffset (use 0 as default if not available)
       IItem maxTimeOffsetItem = GetVariableValue(MAXTIMEOFFSET, scope, true, false);
-      int maxTimeOffset = maxTimeOffsetItem == null ? 0 : ((IntData)maxTimeOffsetItem).Data;
-
-      variable = new StructId.Variable();
-      StructId.Constant constant = new StructId.Constant();
-      StructId.Differential differential = new Differential();
-      StructId.Addition addition = new StructId.Addition();
-      StructId.And and = new StructId.And();
-      StructId.Average average = new StructId.Average();
-      StructId.Cosinus cosinus = new StructId.Cosinus();
-      StructId.Division division = new StructId.Division();
-      StructId.Equal equal = new StructId.Equal();
-      StructId.Exponential exponential = new StructId.Exponential();
-      StructId.GreaterThan greaterThan = new StructId.GreaterThan();
-      StructId.IfThenElse ifThenElse = new StructId.IfThenElse();
-      StructId.LessThan lessThan = new StructId.LessThan();
-      StructId.Logarithm logarithm = new StructId.Logarithm();
-      StructId.Multiplication multiplication = new StructId.Multiplication();
-      StructId.Not not = new StructId.Not();
-      StructId.Or or = new StructId.Or();
-      StructId.Power power = new StructId.Power();
-      StructId.Signum signum = new StructId.Signum();
-      StructId.Sinus sinus = new StructId.Sinus();
-      StructId.Sqrt sqrt = new StructId.Sqrt();
-      StructId.Subtraction subtraction = new StructId.Subtraction();
-      StructId.Tangens tangens = new StructId.Tangens();
-      StructId.Xor xor = new StructId.Xor();
-
-
-      List<IOperator> booleanFunctions = new List<IOperator>();
-      ConditionalAddOperator(AND_ALLOWED, and, booleanFunctions);
-      ConditionalAddOperator(EQUAL_ALLOWED, equal, booleanFunctions);
-      ConditionalAddOperator(GREATERTHAN_ALLOWED, greaterThan, booleanFunctions);
-      ConditionalAddOperator(LESSTHAN_ALLOWED, lessThan, booleanFunctions);
-      ConditionalAddOperator(NOT_ALLOWED, not, booleanFunctions);
-      ConditionalAddOperator(OR_ALLOWED, or, booleanFunctions);
-      ConditionalAddOperator(XOR_ALLOWED, xor, booleanFunctions);
-
-      List<IOperator> doubleFunctions = new List<IOperator>();
-      ConditionalAddOperator(DIFFERENTIALS_ALLOWED, differential, doubleFunctions);
-      ConditionalAddOperator(VARIABLES_ALLOWED, variable, doubleFunctions);
-      ConditionalAddOperator(CONSTANTS_ALLOWED, constant, doubleFunctions);
-      ConditionalAddOperator(ADDITION_ALLOWED, addition, doubleFunctions);
-      ConditionalAddOperator(AVERAGE_ALLOWED, average, doubleFunctions);
-      ConditionalAddOperator(COSINUS_ALLOWED, cosinus, doubleFunctions);
-      ConditionalAddOperator(DIVISION_ALLOWED, division, doubleFunctions);
-      ConditionalAddOperator(EXPONENTIAL_ALLOWED, exponential, doubleFunctions);
-      ConditionalAddOperator(IFTHENELSE_ALLOWED, ifThenElse, doubleFunctions);
-      ConditionalAddOperator(LOGARTIHM_ALLOWED, logarithm, doubleFunctions);
-      ConditionalAddOperator(MULTIPLICATION_ALLOWED, multiplication, doubleFunctions);
-      ConditionalAddOperator(POWER_ALLOWED, power, doubleFunctions);
-      ConditionalAddOperator(SIGNUM_ALLOWED, signum, doubleFunctions);
-      ConditionalAddOperator(SINUS_ALLOWED, sinus, doubleFunctions);
-      ConditionalAddOperator(SQRT_ALLOWED, sqrt, doubleFunctions);
-      ConditionalAddOperator(SUBTRACTION_ALLOWED, subtraction, doubleFunctions);
-      ConditionalAddOperator(TANGENS_ALLOWED, tangens, doubleFunctions);
+      maxTimeOffset = maxTimeOffsetItem == null ? 0 : ((IntData)maxTimeOffsetItem).Data;
+
+      return base.Apply(scope);
+    }
+
+    protected override FunctionLibrary CreateFunctionLibrary() {
+      FunctionLibrary functionLibrary = new FunctionLibrary();
+
+      Variable variable = new Variable();
+      Constant constant = new Constant();
+      Differential differential = new Differential();
+      Addition addition = new Addition();
+      And and = new And();
+      Average average = new Average();
+      Cosinus cosinus = new Cosinus();
+      Division division = new Division();
+      Equal equal = new Equal();
+      Exponential exponential = new Exponential();
+      GreaterThan greaterThan = new GreaterThan();
+      IfThenElse ifThenElse = new IfThenElse();
+      LessThan lessThan = new LessThan();
+      Logarithm logarithm = new Logarithm();
+      Multiplication multiplication = new Multiplication();
+      Not not = new Not();
+      Or or = new Or();
+      Power power = new Power();
+      Signum signum = new Signum();
+      Sinus sinus = new Sinus();
+      Sqrt sqrt = new Sqrt();
+      Subtraction subtraction = new Subtraction();
+      Tangens tangens = new Tangens();
+      Xor xor = new Xor();
+
+
+      List<IFunction> booleanFunctions = new List<IFunction>();
+      ConditionalAddFunction(AND_ALLOWED, and, booleanFunctions);
+      ConditionalAddFunction(EQUAL_ALLOWED, equal, booleanFunctions);
+      ConditionalAddFunction(GREATERTHAN_ALLOWED, greaterThan, booleanFunctions);
+      ConditionalAddFunction(LESSTHAN_ALLOWED, lessThan, booleanFunctions);
+      ConditionalAddFunction(NOT_ALLOWED, not, booleanFunctions);
+      ConditionalAddFunction(OR_ALLOWED, or, booleanFunctions);
+      ConditionalAddFunction(XOR_ALLOWED, xor, booleanFunctions);
+
+      List<IFunction> doubleFunctions = new List<IFunction>();
+      ConditionalAddFunction(DIFFERENTIALS_ALLOWED, differential, doubleFunctions);
+      ConditionalAddFunction(VARIABLES_ALLOWED, variable, doubleFunctions);
+      ConditionalAddFunction(CONSTANTS_ALLOWED, constant, doubleFunctions);
+      ConditionalAddFunction(ADDITION_ALLOWED, addition, doubleFunctions);
+      ConditionalAddFunction(AVERAGE_ALLOWED, average, doubleFunctions);
+      ConditionalAddFunction(COSINUS_ALLOWED, cosinus, doubleFunctions);
+      ConditionalAddFunction(DIVISION_ALLOWED, division, doubleFunctions);
+      ConditionalAddFunction(EXPONENTIAL_ALLOWED, exponential, doubleFunctions);
+      ConditionalAddFunction(IFTHENELSE_ALLOWED, ifThenElse, doubleFunctions);
+      ConditionalAddFunction(LOGARTIHM_ALLOWED, logarithm, doubleFunctions);
+      ConditionalAddFunction(MULTIPLICATION_ALLOWED, multiplication, doubleFunctions);
+      ConditionalAddFunction(POWER_ALLOWED, power, doubleFunctions);
+      ConditionalAddFunction(SIGNUM_ALLOWED, signum, doubleFunctions);
+      ConditionalAddFunction(SINUS_ALLOWED, sinus, doubleFunctions);
+      ConditionalAddFunction(SQRT_ALLOWED, sqrt, doubleFunctions);
+      ConditionalAddFunction(SUBTRACTION_ALLOWED, subtraction, doubleFunctions);
+      ConditionalAddFunction(TANGENS_ALLOWED, tangens, doubleFunctions);
 
       SetAllowedSubOperators(and, booleanFunctions);
@@ -196,76 +192,41 @@
       SetAllowedSubOperators(tangens, doubleFunctions);
 
-      operatorLibrary = new GPOperatorLibrary();
-      ConditionalAddOperator(DIFFERENTIALS_ALLOWED, operatorLibrary, differential);
-      ConditionalAddOperator(VARIABLES_ALLOWED, operatorLibrary, variable);
-      ConditionalAddOperator(CONSTANTS_ALLOWED, operatorLibrary, constant);
-      ConditionalAddOperator(ADDITION_ALLOWED, operatorLibrary, addition);
-      ConditionalAddOperator(AVERAGE_ALLOWED, operatorLibrary, average);
-      ConditionalAddOperator(AND_ALLOWED, operatorLibrary, and);
-      ConditionalAddOperator(COSINUS_ALLOWED, operatorLibrary, cosinus);
-      ConditionalAddOperator(DIVISION_ALLOWED, operatorLibrary, division);
-      ConditionalAddOperator(EQUAL_ALLOWED, operatorLibrary, equal);
-      ConditionalAddOperator(EXPONENTIAL_ALLOWED, operatorLibrary, exponential);
-      ConditionalAddOperator(GREATERTHAN_ALLOWED, operatorLibrary, greaterThan);
-      ConditionalAddOperator(IFTHENELSE_ALLOWED, operatorLibrary, ifThenElse);
-      ConditionalAddOperator(LESSTHAN_ALLOWED, operatorLibrary, lessThan);
-      ConditionalAddOperator(LOGARTIHM_ALLOWED, operatorLibrary, logarithm);
-      ConditionalAddOperator(MULTIPLICATION_ALLOWED, operatorLibrary, multiplication);
-      ConditionalAddOperator(NOT_ALLOWED, operatorLibrary, not);
-      ConditionalAddOperator(POWER_ALLOWED, operatorLibrary, power);
-      ConditionalAddOperator(OR_ALLOWED, operatorLibrary, or);
-      ConditionalAddOperator(SIGNUM_ALLOWED, operatorLibrary, signum);
-      ConditionalAddOperator(SINUS_ALLOWED, operatorLibrary, sinus);
-      ConditionalAddOperator(SQRT_ALLOWED, operatorLibrary, sqrt);
-      ConditionalAddOperator(SUBTRACTION_ALLOWED, operatorLibrary, subtraction);
-      ConditionalAddOperator(TANGENS_ALLOWED, operatorLibrary, tangens);
-      ConditionalAddOperator(XOR_ALLOWED, operatorLibrary, xor);
+      ConditionalAddOperator(DIFFERENTIALS_ALLOWED, functionLibrary, differential);
+      ConditionalAddOperator(VARIABLES_ALLOWED, functionLibrary, variable);
+      ConditionalAddOperator(CONSTANTS_ALLOWED, functionLibrary, constant);
+      ConditionalAddOperator(ADDITION_ALLOWED, functionLibrary, addition);
+      ConditionalAddOperator(AVERAGE_ALLOWED, functionLibrary, average);
+      ConditionalAddOperator(AND_ALLOWED, functionLibrary, and);
+      ConditionalAddOperator(COSINUS_ALLOWED, functionLibrary, cosinus);
+      ConditionalAddOperator(DIVISION_ALLOWED, functionLibrary, division);
+      ConditionalAddOperator(EQUAL_ALLOWED, functionLibrary, equal);
+      ConditionalAddOperator(EXPONENTIAL_ALLOWED, functionLibrary, exponential);
+      ConditionalAddOperator(GREATERTHAN_ALLOWED, functionLibrary, greaterThan);
+      ConditionalAddOperator(IFTHENELSE_ALLOWED, functionLibrary, ifThenElse);
+      ConditionalAddOperator(LESSTHAN_ALLOWED, functionLibrary, lessThan);
+      ConditionalAddOperator(LOGARTIHM_ALLOWED, functionLibrary, logarithm);
+      ConditionalAddOperator(MULTIPLICATION_ALLOWED, functionLibrary, multiplication);
+      ConditionalAddOperator(NOT_ALLOWED, functionLibrary, not);
+      ConditionalAddOperator(POWER_ALLOWED, functionLibrary, power);
+      ConditionalAddOperator(OR_ALLOWED, functionLibrary, or);
+      ConditionalAddOperator(SIGNUM_ALLOWED, functionLibrary, signum);
+      ConditionalAddOperator(SINUS_ALLOWED, functionLibrary, sinus);
+      ConditionalAddOperator(SQRT_ALLOWED, functionLibrary, sqrt);
+      ConditionalAddOperator(SUBTRACTION_ALLOWED, functionLibrary, subtraction);
+      ConditionalAddOperator(TANGENS_ALLOWED, functionLibrary, tangens);
+      ConditionalAddOperator(XOR_ALLOWED, functionLibrary, xor);
 
       variable.SetConstraints(minTimeOffset, maxTimeOffset);
       differential.SetConstraints(minTimeOffset, maxTimeOffset);
 
-      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(FUNCTIONLIBRARY), operatorLibrary));
-
-      return null;
-    }
-
-    private void ConditionalAddOperator(string condName, IOperator op, List<IOperator> list) {
-      if (GetVariableValue<BoolData>(condName, null, false).Data) list.Add(op);
-    }
-
-    private void ConditionalAddOperator(string condName, GPOperatorLibrary operatorLibrary, IOperator op) {
-      if (GetVariableValue<BoolData>(condName, null, false).Data) operatorLibrary.GPOperatorGroup.AddOperator(op);
-    }
-
-    private void SetAllowedSubOperators(IFunction f, List<IOperator> gs) {
-      foreach (IConstraint c in f.Constraints) {
-        if (c is SubOperatorTypeConstraint) {
-          SubOperatorTypeConstraint typeConstraint = c as SubOperatorTypeConstraint;
-          typeConstraint.Clear();
-          foreach (IOperator g in gs) {
-            typeConstraint.AddOperator(g);
-          }
-        } else if (c is AllSubOperatorsTypeConstraint) {
-          AllSubOperatorsTypeConstraint typeConstraint = c as AllSubOperatorsTypeConstraint;
-          typeConstraint.Clear();
-          foreach (IOperator g in gs) {
-            typeConstraint.AddOperator(g);
-          }
-        }
-      }
-    }
-
-    private void SetAllowedSubOperators(IFunction f, int p, List<IOperator> gs) {
-      foreach (IConstraint c in f.Constraints) {
-        if (c is SubOperatorTypeConstraint) {
-          SubOperatorTypeConstraint typeConstraint = c as SubOperatorTypeConstraint;
-          if (typeConstraint.SubOperatorIndex.Data == p) {
-            typeConstraint.Clear();
-            foreach (IOperator g in gs) {
-              typeConstraint.AddOperator(g);
-            }
-          }
-        }
-      }
+      return functionLibrary;
+    }
+
+    private void ConditionalAddFunction(string condName, IFunction fun, List<IFunction> list) {
+      if (GetVariableValue<BoolData>(condName, null, false).Data) list.Add(fun);
+    }
+
+    private void ConditionalAddOperator(string condName, FunctionLibrary functionLib, IFunction op) {
+      if (GetVariableValue<BoolData>(condName, null, false).Data) functionLib.AddFunction(op);
     }
   }
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/GreaterThan.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/GreaterThan.cs	(revision 2221)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Constraints;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class GreaterThan : FunctionBase {
-    public override string Description {
-      get {
-        return @"Greater-than condition. Returns 1.0 if the value of the first sub-tree is greater than the value of the second sub-tree and 0.0 otherwise.";
-      }
-    }
-
-    public GreaterThan()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HL2TreeEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HL2TreeEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HL2TreeEvaluator.cs	(revision 2222)
@@ -21,11 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using System.Xml;
-using System.Diagnostics;
-using HeuristicLab.DataAnalysis;
 
 namespace HeuristicLab.GP.StructureIdentification {
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HL3TreeEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HL3TreeEvaluator.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HL3TreeEvaluator.cs	(revision 2222)
@@ -0,0 +1,185 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Diagnostics;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  /// <summary>
+  /// Evaluates FunctionTrees recursively by interpretation of the function symbols in each node.
+  /// Not thread-safe!
+  /// </summary>
+  public class HL3TreeEvaluator : TreeEvaluatorBase {
+
+
+    protected override double EvaluateBakedCode() {
+      Instr currInstr = codeArr[PC++];
+      switch (currInstr.symbol) {
+        case EvaluatorSymbolTable.VARIABLE: {
+            int row = sampleIndex + currInstr.i_arg1;
+            if (row < 0 || row >= dataset.Rows) return double.NaN;
+            else return currInstr.d_arg0 * dataset.GetValue(row, currInstr.i_arg0);
+          }
+        case EvaluatorSymbolTable.CONSTANT: {
+            return currInstr.d_arg0;
+          }
+        case EvaluatorSymbolTable.DIFFERENTIAL: {
+            int row = sampleIndex + currInstr.i_arg1;
+            if (row < 0 || row >= dataset.Rows) return double.NaN;
+            else if (row < 1) return 0.0;
+            else {
+              double prevValue = dataset.GetValue(row - 1, currInstr.i_arg0);
+              if (double.IsNaN(prevValue) || double.IsInfinity(prevValue)) return 0.0;
+              else return currInstr.d_arg0 * (dataset.GetValue(row, currInstr.i_arg0) - prevValue);
+            }
+          }
+        case EvaluatorSymbolTable.MULTIPLICATION: {
+            double result = EvaluateBakedCode();
+            for (int i = 1; i < currInstr.arity; i++) {
+              result *= EvaluateBakedCode();
+            }
+            return result;
+          }
+        case EvaluatorSymbolTable.ADDITION: {
+            double sum = EvaluateBakedCode();
+            for (int i = 1; i < currInstr.arity; i++) {
+              sum += EvaluateBakedCode();
+            }
+            return sum;
+          }
+        case EvaluatorSymbolTable.SUBTRACTION: {
+            double result = EvaluateBakedCode();
+            for (int i = 1; i < currInstr.arity; i++) {
+              result -= EvaluateBakedCode();
+            }
+            return result;
+          }
+        case EvaluatorSymbolTable.DIVISION: {
+            double result;
+            result = EvaluateBakedCode();
+            for (int i = 1; i < currInstr.arity; i++) {
+              result /= EvaluateBakedCode();
+            }
+            if (double.IsInfinity(result)) return 0.0;
+            else return result;
+          }
+        case EvaluatorSymbolTable.AVERAGE: {
+            double sum = EvaluateBakedCode();
+            for (int i = 1; i < currInstr.arity; i++) {
+              sum += EvaluateBakedCode();
+            }
+            return sum / currInstr.arity;
+          }
+        case EvaluatorSymbolTable.COSINUS: {
+            return Math.Cos(EvaluateBakedCode());
+          }
+        case EvaluatorSymbolTable.SINUS: {
+            return Math.Sin(EvaluateBakedCode());
+          }
+        case EvaluatorSymbolTable.EXP: {
+            return Math.Exp(EvaluateBakedCode());
+          }
+        case EvaluatorSymbolTable.LOG: {
+            return Math.Log(EvaluateBakedCode());
+          }
+        case EvaluatorSymbolTable.POWER: {
+            double x = EvaluateBakedCode();
+            double p = EvaluateBakedCode();
+            return Math.Pow(x, p);
+          }
+        case EvaluatorSymbolTable.SIGNUM: {
+            double value = EvaluateBakedCode();
+            if (double.IsNaN(value)) return double.NaN;
+            else return Math.Sign(value);
+          }
+        case EvaluatorSymbolTable.SQRT: {
+            return Math.Sqrt(EvaluateBakedCode());
+          }
+        case EvaluatorSymbolTable.TANGENS: {
+            return Math.Tan(EvaluateBakedCode());
+          }
+        case EvaluatorSymbolTable.AND: { // only defined for inputs 1 and 0
+            double result = EvaluateBakedCode();
+            for (int i = 1; i < currInstr.arity; i++) {
+              if (result == 0.0) SkipBakedCode();
+              else {
+                result = EvaluateBakedCode();
+              }
+              Debug.Assert(result == 0.0 || result == 1.0);
+            }
+            return result;
+          }
+        case EvaluatorSymbolTable.EQU: {
+            double x = EvaluateBakedCode();
+            double y = EvaluateBakedCode();
+            if (Math.Abs(x - y) < EPSILON) return 1.0; else return 0.0;
+          }
+        case EvaluatorSymbolTable.GT: {
+            double x = EvaluateBakedCode();
+            double y = EvaluateBakedCode();
+            if (x > y) return 1.0;
+            else return 0.0;
+          }
+        case EvaluatorSymbolTable.IFTE: { // only defined for condition 0 or 1
+            double condition = EvaluateBakedCode();
+            Debug.Assert(condition == 0.0 || condition == 1.0);
+            double result;
+            if (condition == 0.0) {
+              result = EvaluateBakedCode(); SkipBakedCode();
+            } else {
+              SkipBakedCode(); result = EvaluateBakedCode();
+            }
+            return result;
+          }
+        case EvaluatorSymbolTable.LT: {
+            double x = EvaluateBakedCode();
+            double y = EvaluateBakedCode();
+            if (x < y) return 1.0;
+            else return 0.0;
+          }
+        case EvaluatorSymbolTable.NOT: { // only defined for inputs 0 or 1
+            double result = EvaluateBakedCode();
+            Debug.Assert(result == 0.0 || result == 1.0);
+            return Math.Abs(result - 1.0);
+          }
+        case EvaluatorSymbolTable.OR: { // only defined for inputs 0 or 1
+            double result = EvaluateBakedCode();
+            for (int i = 1; i < currInstr.arity; i++) {
+              if (result > 0.0) SkipBakedCode();
+              else {
+                result = EvaluateBakedCode();
+                Debug.Assert(result == 0.0 || result == 1.0);
+              }
+            }
+            return result;
+          }
+        case EvaluatorSymbolTable.XOR: { // only defined for inputs 0 or 1
+            double x = EvaluateBakedCode();
+            double y = EvaluateBakedCode();
+            return Math.Abs(x - y);
+          }
+        default: {
+            throw new NotImplementedException();
+          }
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HeuristicLab.GP.StructureIdentification-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HeuristicLab.GP.StructureIdentification-3.3.csproj	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HeuristicLab.GP.StructureIdentification-3.3.csproj	(revision 2222)
@@ -82,11 +82,34 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Addition.cs" />
-    <Compile Include="And.cs" />
-    <Compile Include="Average.cs" />
-    <Compile Include="BakedTreeEvaluator.cs" />
-    <Compile Include="Constant.cs" />
     <Compile Include="AlgorithmBase.cs" />
     <Compile Include="Evaluators\SimpleGPEvaluatorBase.cs" />
+    <Compile Include="HL3TreeEvaluator.cs" />
+    <Compile Include="Symbols\Addition.cs" />
+    <Compile Include="Symbols\And.cs" />
+    <Compile Include="Symbols\Average.cs" />
+    <Compile Include="Symbols\Constant.cs" />
+    <Compile Include="Symbols\ConstantFunctionTree.cs" />
+    <Compile Include="Symbols\Cosinus.cs" />
+    <Compile Include="Symbols\Differential.cs" />
+    <Compile Include="Symbols\Division.cs" />
+    <Compile Include="Symbols\Equal.cs" />
+    <Compile Include="Symbols\Exponential.cs" />
+    <Compile Include="Symbols\GreaterThan.cs" />
+    <Compile Include="Symbols\IfThenElse.cs" />
+    <Compile Include="Symbols\LessThan.cs" />
+    <Compile Include="Symbols\Logarithm.cs" />
+    <Compile Include="Symbols\Multiplication.cs" />
+    <Compile Include="Symbols\Not.cs" />
+    <Compile Include="Symbols\Or.cs" />
+    <Compile Include="Symbols\Power.cs" />
+    <Compile Include="Symbols\Signum.cs" />
+    <Compile Include="Symbols\Sinus.cs" />
+    <Compile Include="Symbols\Sqrt.cs" />
+    <Compile Include="Symbols\Subtraction.cs" />
+    <Compile Include="Symbols\SymbolTable.cs" />
+    <Compile Include="Symbols\Tangens.cs" />
+    <Compile Include="Symbols\Variable.cs" />
+    <Compile Include="Symbols\VariableFunctionTree.cs" />
+    <Compile Include="Symbols\Xor.cs" />
     <Compile Include="TreeEvaluatorBase.cs" />
     <Compile Include="HL2TreeEvaluator.cs" />
@@ -108,8 +131,4 @@
     </Compile>
     <Compile Include="StandardGP.cs" />
-    <Compile Include="Cosinus.cs" />
-    <Compile Include="Differential.cs" />
-    <Compile Include="Division.cs" />
-    <Compile Include="Equal.cs" />
     <Compile Include="Evaluators\CoefficientOfDeterminationEvaluator.cs" />
     <Compile Include="Evaluators\UncertainMeanSquaredErrorEvaluator.cs" />
@@ -120,33 +139,12 @@
     <Compile Include="Evaluators\SimpleEvaluator.cs" />
     <Compile Include="Evaluators\VarianceAccountedForEvaluator.cs" />
-    <Compile Include="Exponential.cs" />
-    <Compile Include="GreaterThan.cs" />
     <Compile Include="HeuristicLabGPStructureIdentificationPlugin.cs" />
-    <Compile Include="IfThenElse.cs" />
-    <Compile Include="LessThan.cs" />
-    <Compile Include="Logarithm.cs" />
     <Compile Include="ModelAnalyzerExporter.cs" />
-    <Compile Include="Multiplication.cs" />
-    <Compile Include="Not.cs" />
-    <Compile Include="Or.cs" />
-    <Compile Include="Power.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Signum.cs" />
-    <Compile Include="Sinus.cs" />
-    <Compile Include="Sqrt.cs" />
-    <Compile Include="Subtraction.cs" />
     <Compile Include="SymbolicExpressionExporter.cs" />
-    <Compile Include="SymbolTable.cs" />
-    <Compile Include="Tangens.cs" />
-    <Compile Include="Variable.cs" />
     <Compile Include="Evaluators\VariableEvaluationImpactCalculator.cs" />
     <Compile Include="Evaluators\VariableQualityImpactCalculator.cs" />
-    <Compile Include="Xor.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Constraints\3.2\HeuristicLab.Constraints-3.2.csproj">
-      <Project>{FCD62C6F-4793-4593-AE9A-0BDCA256EE99}</Project>
-      <Name>HeuristicLab.Constraints-3.2</Name>
-    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
     <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
       <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
@@ -164,4 +162,12 @@
       <Project>{F5614C53-153C-4A37-A608-121E1C087F07}</Project>
       <Name>HeuristicLab.Evolutionary-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.GP.Interfaces\3.3\HeuristicLab.GP.Interfaces-3.3.csproj">
+      <Project>{924B6BEA-9A99-40FE-9334-5C01E8D540EC}</Project>
+      <Name>HeuristicLab.GP.Interfaces-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.GP.Operators\3.3\HeuristicLab.GP.Operators-3.3.csproj">
+      <Project>{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}</Project>
+      <Name>HeuristicLab.GP.Operators-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.GP\3.3\HeuristicLab.GP-3.3.csproj">
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HeuristicLabGPStructureIdentificationPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HeuristicLabGPStructureIdentificationPlugin.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HeuristicLabGPStructureIdentificationPlugin.cs	(revision 2222)
@@ -20,7 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
 using HeuristicLab.PluginInfrastructure;
 
@@ -28,5 +25,4 @@
   [ClassInfo(Name = "HeuristicLab.GP.StructureIdentification-3.3")]
   [PluginFile(Filename = "HeuristicLab.GP.StructureIdentification-3.3.dll", Filetype = PluginFileType.Assembly)]
-  [Dependency(Dependency = "HeuristicLab.Constraints-3.2")]
   [Dependency(Dependency = "HeuristicLab.Core-3.2")]
   [Dependency(Dependency = "HeuristicLab.Data-3.2")]
@@ -34,4 +30,6 @@
   [Dependency(Dependency = "HeuristicLab.Evolutionary-3.2")]
   [Dependency(Dependency = "HeuristicLab.GP-3.3")]
+  [Dependency(Dependency = "HeuristicLab.GP.Interfaces-3.3")]
+  [Dependency(Dependency = "HeuristicLab.GP.Operators-3.3")]
   [Dependency(Dependency = "HeuristicLab.Logging-3.2")]
   [Dependency(Dependency = "HeuristicLab.Modeling-3.2")]
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/ITreeEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/ITreeEvaluator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/ITreeEvaluator.cs	(revision 2222)
@@ -20,12 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
-using System.Xml;
-using System.Diagnostics;
 using HeuristicLab.DataAnalysis;
+using HeuristicLab.GP.Interfaces;
 
 namespace HeuristicLab.GP.StructureIdentification {
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/IfThenElse.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/IfThenElse.cs	(revision 2221)
+++ 	(revision )
@@ -1,46 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class IfThenElse : FunctionBase {
-    public override string Description {
-      get {
-        return @"Returns the result of the second sub-tree if the first sub-tree evaluates to a value < 0.5 and the result
-of the third sub-tree if the first sub-tree evaluates to >= 0.5.";
-      }
-    }
-
-    public IfThenElse()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(3, 3));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-      AddConstraint(new SubOperatorTypeConstraint(2));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/LessThan.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/LessThan.cs	(revision 2221)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class LessThan : FunctionBase {
-    public override string Description {
-      get {
-        return @"Less-than condition. Returns 1.0 if the value of the first sub-tree is less than the value of the second sub-tree and 0.0 otherwise.";
-      }
-    }
-
-    public LessThan()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Logarithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Logarithm.cs	(revision 2221)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Logarithm : FunctionBase {
-    public override string Description {
-      get { return "Returns the natural (base e) logarithm of the first sub-tree."; }
-    }
-
-    public Logarithm()
-      : base() {
-      // must have exactly 1 suboperator
-      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/ModelAnalyzerExporter.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/ModelAnalyzerExporter.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/ModelAnalyzerExporter.cs	(revision 2222)
@@ -20,12 +20,9 @@
 #endregion
 
+using HeuristicLab.GP.Interfaces;
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public class ModelAnalyzerExporter : IFunctionTreeExporter, IFunctionTreeNameGenerator {
+  public class ModelAnalyzerExporter : IFunctionTreeSerializer, IFunctionTreeNameGenerator {
     #region IFunctionTreeExporter Members
 
@@ -57,4 +54,19 @@
       if(tree.SubTrees.Count > 0) result += ")";
       return result;
+    }
+
+    public IFunctionTree Import(string tree) {
+      throw new UnknownFunctionException(tree);
+    }
+
+    public bool TryImport(string tree, out IFunctionTree importedTree) {
+      try {
+        importedTree = Import(tree);
+        return true;
+      }
+      catch (UnknownFunctionException) {
+        importedTree = null;
+        return false;
+      }
     }
 
@@ -108,4 +120,6 @@
 
     #endregion
+
+
   }
 
@@ -120,11 +134,5 @@
 
     public static string ExportToHL2(this Constant constant, IFunctionTree tree) {
-      HeuristicLab.Core.IItem constantItem = tree.GetLocalVariable(Constant.VALUE).Value;
-      double value;
-      if (constantItem is ConstrainedDoubleData) {
-        value = ((ConstrainedDoubleData)constantItem).Data;
-      } else {
-        value = ((DoubleData)constantItem).Data;
-      }
+      double value = ((ConstantFunctionTree)tree).Value;
       return "[T]Constant(" + value.ToString("r") + ";0;0)";
     }
@@ -135,15 +143,6 @@
 
     public static string ExportToHL2(this Differential differential, IFunctionTree tree) {
-      HeuristicLab.Core.IItem weightItem = tree.GetLocalVariable(Differential.WEIGHT).Value;
-      double weight;
-      if (weightItem is ConstrainedDoubleData) {
-        weight = ((ConstrainedDoubleData)weightItem).Data;
-      } else {
-        weight = ((DoubleData)weightItem).Data;
-      }
-      var index = tree.GetLocalVariable(Differential.INDEX).Value;
-      var offset = ((ConstrainedDoubleData)tree.GetLocalVariable(Differential.OFFSET).Value).Data;
-
-      return "[T]Differential(" + weight.ToString("r") + ";" + index + ";" + -offset + ")";
+      var varTree = (VariableFunctionTree)tree;
+      return "[T]Differential(" + varTree.Weight.ToString("r") + ";" + varTree.VariableName + ";" + -varTree.SampleOffset + ")";
     }
 
@@ -189,15 +188,6 @@
 
     public static string ExportToHL2(this Variable variable, IFunctionTree tree) {
-      HeuristicLab.Core.IItem weightItem = tree.GetLocalVariable(Differential.WEIGHT).Value;
-      double weight;
-      if (weightItem is ConstrainedDoubleData) {
-        weight = ((ConstrainedDoubleData)weightItem).Data;
-      } else {
-        weight = ((DoubleData)weightItem).Data;
-      }
-      string index = ((StringData)tree.GetLocalVariable(Variable.INDEX).Value).Data;
-      double offset = ((ConstrainedIntData)tree.GetLocalVariable(Variable.OFFSET).Value).Data;
-
-      return "[T]Variable(" + weight.ToString("r") + ";" + index + ";" + -offset + ")";
+      var varTree = (VariableFunctionTree)tree;
+      return "[T]Variable(" + varTree.Weight.ToString("r") + ";" + varTree.VariableName + ";" + -varTree.SampleOffset + ")";
     }
 
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Multiplication.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Multiplication.cs	(revision 2221)
+++ 	(revision )
@@ -1,51 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Constraints;
-using System.Linq;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Multiplication : FunctionBase {
-    public override string Description {
-      get {
-        return @"Returns the product of the results of all sub-tree.
-  (* 3) => 3
-  (* 2 3) => 6
-  (* 3 4 5) => 60";
-      }
-    }
-
-    public Multiplication()
-      : base() {
-      // 2 - 3 seems like an reasonable defaut (used for +,-,*,/) (discussion with swinkler and maffenze)
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-      AddConstraint(new SubOperatorTypeConstraint(2));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Not.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Not.cs	(revision 2221)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Not : FunctionBase {
-    public override string Description {
-      get {
-        return @"Logical NOT operation. Only defined for sub-tree-results 0.0 and 1.0.";
-      }
-    }
-
-    public Not()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/OffSpringSelectionGpEditor.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/OffSpringSelectionGpEditor.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/OffSpringSelectionGpEditor.cs	(revision 2222)
@@ -21,9 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.PluginInfrastructure;
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/OffspringSelectionGP.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/OffspringSelectionGP.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/OffspringSelectionGP.cs	(revision 2222)
@@ -22,18 +22,11 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
-using System.Xml;
-using System.Diagnostics;
-using HeuristicLab.DataAnalysis;
+using HeuristicLab.Data;
+using HeuristicLab.Evolutionary;
+using HeuristicLab.Logging;
 using HeuristicLab.Operators;
-using HeuristicLab.Random;
 using HeuristicLab.Selection;
-using HeuristicLab.Logging;
-using HeuristicLab.Data;
-using HeuristicLab.Operators.Programmable;
 using HeuristicLab.Selection.OffspringSelection;
-using HeuristicLab.Evolutionary;
 
 namespace HeuristicLab.GP.StructureIdentification {
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Or.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Or.cs	(revision 2221)
+++ 	(revision )
@@ -1,46 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Or : FunctionBase {
-    public override string Description {
-      get {
-        return @"Logical OR operation. Only defined for sub-tree-results 0.0 and 1.0.
-Special form, evaluation stops at first sub-tree that evaluates to 1.0 (true).";
-      }
-    }
-
-    public Or()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-      AddConstraint(new SubOperatorTypeConstraint(2));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Power.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Power.cs	(revision 2221)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Power : FunctionBase {
-    public override string Description {
-      get { return "Returns the result of the first sub-tree to the power of the second sub-tree (power(x, y))."; }
-    }
-
-    public Power()
-      : base() {
-      // must have exactly 2 suboperators base ^ exponent
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Signum.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Signum.cs	(revision 2221)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Signum : FunctionBase {
-    public override string Description {
-      get { return "Returns the signum of the first sub-tree."; }
-    }
-
-    public Signum()
-      : base() {
-      // must have exactly 1 suboperator
-      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Sinus.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Sinus.cs	(revision 2221)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Sinus : FunctionBase {
-    public override string Description {
-      get { return "Returns the sinus of the first sub-tree."; }
-    }
-
-    public Sinus()
-      : base() {
-      // must have exactly 1 suboperator
-      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Sqrt.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Sqrt.cs	(revision 2221)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Sqrt : FunctionBase {
-    public override string Description {
-      get { return "Returns the square root of the first sub-tree."; }
-    }
-
-    public Sqrt()
-      : base() {
-      // must have exactly 1 suboperator
-      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGP.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGP.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGP.cs	(revision 2222)
@@ -20,14 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
-using System.Xml;
-using System.Diagnostics;
 using HeuristicLab.DataAnalysis;
 using HeuristicLab.Operators;
-using HeuristicLab.Random;
 using HeuristicLab.Selection;
 using HeuristicLab.Logging;
@@ -35,4 +28,5 @@
 using HeuristicLab.Operators.Programmable;
 using HeuristicLab.Modeling;
+using HeuristicLab.GP.Operators;
 
 namespace HeuristicLab.GP.StructureIdentification {
@@ -159,5 +153,4 @@
       StandardCrossOver crossover = new StandardCrossOver();
       crossover.Name = "Crossover";
-      crossover.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
       return crossover;
     }
@@ -166,5 +159,4 @@
       ProbabilisticTreeCreator treeCreator = new ProbabilisticTreeCreator();
       treeCreator.Name = "Tree generator";
-      treeCreator.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
       treeCreator.GetVariableInfo("MinTreeSize").ActualName = "MinInitialTreeSize";
       return treeCreator;
@@ -183,18 +175,12 @@
       StochasticMultiBranch multibranch = new StochasticMultiBranch();
       FullTreeShaker fullTreeShaker = new FullTreeShaker();
-      fullTreeShaker.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
       fullTreeShaker.GetVariableInfo("ShakingFactor").ActualName = "FullTreeShakingFactor";
 
       OnePointShaker onepointShaker = new OnePointShaker();
-      onepointShaker.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
       onepointShaker.GetVariableInfo("ShakingFactor").ActualName = "OnePointShakingFactor";
       ChangeNodeTypeManipulation changeNodeTypeManipulation = new ChangeNodeTypeManipulation();
-      changeNodeTypeManipulation.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
       CutOutNodeManipulation cutOutNodeManipulation = new CutOutNodeManipulation();
-      cutOutNodeManipulation.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
       DeleteSubTreeManipulation deleteSubTreeManipulation = new DeleteSubTreeManipulation();
-      deleteSubTreeManipulation.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
       SubstituteSubTreeManipulation substituteSubTreeManipulation = new SubstituteSubTreeManipulation();
-      substituteSubTreeManipulation.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
 
       IOperator[] manipulators = new IOperator[] {
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGpEditor.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGpEditor.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGpEditor.cs	(revision 2222)
@@ -21,12 +21,7 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Text;
 using System.Windows.Forms;
+using HeuristicLab.Core;
 using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.GP.StructureIdentification {
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Subtraction.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Subtraction.cs	(revision 2221)
+++ 	(revision )
@@ -1,51 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Constraints;
-using System.Linq;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Subtraction : FunctionBase {
-    public override string Description {
-      get {
-        return @"Subtracts the results of sub-tree 2..n from the result of the first sub-tree.
-    (- 3) => -3
-    (- 2 3) => -1
-    (- 3 4 5) => -6";
-      }
-    }
-
-    public Subtraction()
-      : base() {
-      // 2 - 3 seems like an reasonable defaut (used for +,-,*,/) (discussion with swinkler and maffenze)
-      //MK changed to only 2 allowed suboperators to be compliant with HL2
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/SymbolTable.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/SymbolTable.cs	(revision 2221)
+++ 	(revision )
@@ -1,93 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using System.Xml;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  class EvaluatorSymbolTable : StorableBase {
-    public const byte ADDITION = 1;
-    public const byte AND = 2;
-    public const byte AVERAGE = 3;
-    public const byte CONSTANT = 4;
-    public const byte COSINUS = 5;
-    public const byte DIFFERENTIAL = 25;
-    public const byte DIVISION = 6;
-    public const byte EQU = 7;
-    public const byte EXP = 8;
-    public const byte GT = 9;
-    public const byte IFTE = 10;
-    public const byte LT = 11;
-    public const byte LOG = 12;
-    public const byte MULTIPLICATION = 13;
-    public const byte NOT = 14;
-    public const byte OR = 15;
-    public const byte POWER = 16;
-    public const byte SIGNUM = 17;
-    public const byte SINUS = 18;
-    public const byte SQRT = 19;
-    public const byte SUBTRACTION = 20;
-    public const byte TANGENS = 21;
-    public const byte VARIABLE = 22;
-    public const byte XOR = 23;
-    public const byte UNKNOWN = 24;
-
-    private static Dictionary<Type, byte> staticTypes = new Dictionary<Type, byte>();
-
-    // needs to be public for persistence mechanism (Activator.CreateInstance needs empty constructor)
-    static EvaluatorSymbolTable() {
-      staticTypes = new Dictionary<Type, byte>();
-      staticTypes[typeof(Addition)] = ADDITION;
-      staticTypes[typeof(And)] = AND;
-      staticTypes[typeof(Average)] = AVERAGE;
-      staticTypes[typeof(Constant)] = CONSTANT;
-      staticTypes[typeof(Cosinus)] = COSINUS;
-      staticTypes[typeof(Division)] = DIVISION;
-      staticTypes[typeof(Equal)] = EQU;
-      staticTypes[typeof(Exponential)] = EXP;
-      staticTypes[typeof(GreaterThan)] = GT;
-      staticTypes[typeof(IfThenElse)] = IFTE;
-      staticTypes[typeof(LessThan)] = LT;
-      staticTypes[typeof(Logarithm)] = LOG;
-      staticTypes[typeof(Multiplication)] = MULTIPLICATION;
-      staticTypes[typeof(Not)] = NOT;
-      staticTypes[typeof(Or)] = OR;
-      staticTypes[typeof(Power)] = POWER;
-      staticTypes[typeof(Signum)] = SIGNUM;
-      staticTypes[typeof(Sinus)] = SINUS;
-      staticTypes[typeof(Sqrt)] = SQRT;
-      staticTypes[typeof(Subtraction)] = SUBTRACTION;
-      staticTypes[typeof(Tangens)] = TANGENS;
-      staticTypes[typeof(Variable)] = VARIABLE;
-      staticTypes[typeof(Xor)] = XOR;
-      staticTypes[typeof(Differential)] = DIFFERENTIAL;
-    }
-
-    internal static byte MapFunction(IFunction function) {
-      if(staticTypes.ContainsKey(function.GetType())) return staticTypes[function.GetType()];
-      else return UNKNOWN;
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/SymbolicExpressionExporter.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/SymbolicExpressionExporter.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/SymbolicExpressionExporter.cs	(revision 2222)
@@ -20,12 +20,11 @@
 #endregion
 
+using System.Text;
+using HeuristicLab.GP.Interfaces;
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public class SymbolicExpressionExporter : IFunctionTreeExporter, IFunctionTreeNameGenerator {
+  public class SymbolicExpressionExporter : IFunctionTreeSerializer, IFunctionTreeNameGenerator {
     private StringBuilder builder;
     private string currentIndent;
@@ -125,5 +124,5 @@
 
     public static string ExportToScheme(this Constant constant, IFunctionTree tree) {
-      return tree.GetLocalVariable(Constant.VALUE).Value.ToString();
+      return ((ConstantFunctionTree)tree).Value.ToString("r");
     }
 
@@ -173,10 +172,12 @@
 
     public static string ExportToScheme(this Variable variable, IFunctionTree tree) {
-      return "(variable " + tree.GetLocalVariable(Variable.WEIGHT).Value + " " +
-        tree.GetLocalVariable(Variable.INDEX).Value + " " + tree.GetLocalVariable(Variable.OFFSET).Value + ")";
+      var varTree = (VariableFunctionTree)tree;
+      return "(variable " + varTree.Weight.ToString("r") + " " +
+        varTree.VariableName + " " + varTree.SampleOffset + ")";
     }
     public static string ExportToScheme(this Differential differential, IFunctionTree tree) {
-      return "(differential " + tree.GetLocalVariable(Differential.WEIGHT).Value + " " +
-        tree.GetLocalVariable(Differential.INDEX).Value + " " + tree.GetLocalVariable(Differential.OFFSET).Value + ")";
+      var varTree = (VariableFunctionTree)tree;
+      return "(differential " + varTree.Weight.ToString("r") + " " +
+        varTree.VariableName + " " + varTree.SampleOffset + ")";
     }
 
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Addition.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Addition.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Addition.cs	(revision 2222)
@@ -0,0 +1,41 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Addition : FunctionBase {
+    public override string Description {
+      get {
+        return @"Returns the sum of all sub-tree results.
+    (+ 3) => 3
+    (+ 2 3) => 5
+    (+ 3 4 5) => 12";
+      }
+    }
+
+    public Addition()
+      : base() {
+      // 2 - 3 seems like an reasonable defaut (used for +,-,*,/) (discussion with swinkler and maffenze)
+      MinSubTrees = 2;
+      MaxSubTrees = 3;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/And.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/And.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/And.cs	(revision 2222)
@@ -0,0 +1,38 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class And : FunctionBase {
+    public override string Description {
+      get {
+        return @"Logical AND operation. Only defined for sub-tree-results 0.0 and 1.0.
+AND is a special form, sub-trees are evaluated from the first to the last. Evaluation is 
+stopped as soon as one of the sub-trees evaluates to 0.0 (false).";
+      }
+    }
+
+    public And()
+      : base() {
+      MinSubTrees = 2; MaxSubTrees = 3;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Average.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Average.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Average.cs	(revision 2222)
@@ -0,0 +1,36 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Average : FunctionBase {
+    public override string Description {
+      get {
+        return @"Returns the average (arithmetic mean) of all sub-tree results.";
+      }
+    }
+
+    public Average()
+      : base() {
+      MinSubTrees = 2; MaxSubTrees = 3;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Constant.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Constant.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Constant.cs	(revision 2222)
@@ -0,0 +1,75 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using HeuristicLab.GP.Interfaces;
+using HeuristicLab.Operators;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Constant : Terminal {
+    public const string VALUE = "Value";
+
+    public override string Description {
+      get { return "Returns the value of local variable 'Value'."; }
+    }
+
+    public Constant()
+      : base() {
+      SetupInitialization();
+      SetupManipulation();
+    }
+
+    public override IFunctionTree GetTreeNode() {
+      return new ConstantFunctionTree(this);
+    }
+
+    private void SetupInitialization() {
+      // initialization operator
+      CombinedOperator combinedOp = new CombinedOperator();
+      SequentialProcessor initSeq = new SequentialProcessor();
+      UniformRandomizer randomizer = new UniformRandomizer();
+      randomizer.Min = -20.0;
+      randomizer.Max = 20.0;
+
+      combinedOp.OperatorGraph.AddOperator(initSeq);
+      combinedOp.OperatorGraph.AddOperator(randomizer);
+      combinedOp.OperatorGraph.InitialOperator = initSeq;
+      initSeq.AddSubOperator(randomizer);
+      Initializer = combinedOp;
+    }
+
+    private void SetupManipulation() {
+      // manipulation operator
+      CombinedOperator combinedOp = new CombinedOperator();
+      SequentialProcessor manipulationSeq = new SequentialProcessor();
+      NormalRandomAdder valueAdder = new NormalRandomAdder();
+      valueAdder.Mu = 0.0;
+      valueAdder.Sigma = 1.0;
+
+      combinedOp.OperatorGraph.AddOperator(manipulationSeq);
+      combinedOp.OperatorGraph.AddOperator(valueAdder);
+      combinedOp.OperatorGraph.InitialOperator = manipulationSeq;
+      manipulationSeq.AddSubOperator(valueAdder);
+      Manipulator = combinedOp;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/ConstantFunctionTree.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/ConstantFunctionTree.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/ConstantFunctionTree.cs	(revision 2222)
@@ -0,0 +1,84 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.GP.Interfaces;
+using System.Xml;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class ConstantFunctionTree : TerminalTreeNode {
+    public double Value { get; set; }
+
+    public ConstantFunctionTree(Constant constant) : base(constant){
+    }
+
+    protected ConstantFunctionTree(ConstantFunctionTree original) : base(original){
+      Value = original.Value;
+    }
+
+    public override bool HasLocalParameters {
+      get {
+        return true;
+      }
+    }
+
+    public override IOperation CreateShakingOperation(IScope scope) {
+      Scope myVariableScope = new Scope();
+      scope.AddSubScope(myVariableScope);
+      myVariableScope.AddVariable(CreateValueVariable());
+      return new AtomicOperation(Function.Manipulator, myVariableScope);
+    }
+
+    public override IOperation CreateInitOperation(IScope scope) {
+      Scope myVariableScope = new Scope();
+      scope.AddSubScope(myVariableScope);
+      myVariableScope.AddVariable(CreateValueVariable());
+      return new AtomicOperation(Function.Initializer, myVariableScope);
+    }
+
+    public override object Clone() {
+      return new ConstantFunctionTree(this);
+    }
+
+    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<System.Guid, IStorable> persistedObjects) {
+      XmlNode node = document.CreateElement(name);
+      XmlAttribute valueAttr = document.CreateAttribute("Value");
+      valueAttr.Value = XmlConvert.ToString(Value);
+      node.Attributes.Append(valueAttr);
+      return node;
+    }
+
+    public override void Populate(XmlNode node, IDictionary<System.Guid, IStorable> restoredObjects) {
+      base.Populate(node, restoredObjects);
+      Value = XmlConvert.ToDouble(node.Attributes["Value"].Value);
+    }
+
+    private IVariable CreateValueVariable() {
+      DoubleData data = new DoubleData(Value);
+      data.Changed += (sender, args) => Value = data.Data;
+      var variable = new HeuristicLab.Core.Variable(Constant.VALUE, data);
+      variable.ValueChanged += (sender, args) => Value = ((DoubleData)variable.Value).Data;
+      return variable;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Cosinus.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Cosinus.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Cosinus.cs	(revision 2222)
@@ -0,0 +1,33 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Cosinus : UnaryFunction {
+    public override string Description {
+      get { return "Returns the cosinus of the first sub-tree."; }
+    }
+
+    public Cosinus()
+      : base() {
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Differential.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Differential.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Differential.cs	(revision 2222)
@@ -0,0 +1,39 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.GP.Interfaces;
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Differential : Variable {
+
+    public override string Description {
+      get {
+        return @"Differential returns the difference between the value of a variable at t and t-1. The weight is a coefficient that is multiplied to the the difference.";
+      }
+    }
+
+    public Differential() : base() { }
+
+    public override IFunctionTree GetTreeNode() {
+      return new VariableFunctionTree(this);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Division.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Division.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Division.cs	(revision 2222)
@@ -0,0 +1,40 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Division : BinaryFunction {
+    public override string Description {
+      get {
+        return @"Protected division
+Divides the result of the first sub-tree by the results of the following sub-tree.
+In case one of the divisors is 0 returns 0.
+    (/ 3) => 1/3
+    (/ 2 3) => 2/3
+    (/ 3 4 5) => 3/20
+    (/ 2 0 4) => 0
+";
+      }
+    }
+
+    public Division() : base() { }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Equal.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Equal.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Equal.cs	(revision 2222)
@@ -0,0 +1,33 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Equal : BinaryFunction {
+    public override string Description {
+      get {
+        return @"Equal condition. Returns 1.0 if both sub-trees evaluate to the same value and 0.0 if they differ.";
+      }
+    }
+
+    public Equal() : base() { }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Exponential.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Exponential.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Exponential.cs	(revision 2222)
@@ -0,0 +1,31 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Exponential : UnaryFunction {
+    public override string Description {
+      get { return "Returns returns exponential of the first sub-tree (power(e, x))."; }
+    }
+
+    public Exponential() : base() { }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/GreaterThan.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/GreaterThan.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/GreaterThan.cs	(revision 2222)
@@ -0,0 +1,34 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class GreaterThan : BinaryFunction {
+    public override string Description {
+      get {
+        return @"Greater-than condition. Returns 1.0 if the value of the first sub-tree is greater than the value of the second sub-tree and 0.0 otherwise.";
+      }
+    }
+
+    public GreaterThan() : base() { }
+
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/IfThenElse.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/IfThenElse.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/IfThenElse.cs	(revision 2222)
@@ -0,0 +1,37 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class IfThenElse : FunctionBase {
+    public override string Description {
+      get {
+        return @"Returns the result of the second sub-tree if the first sub-tree evaluates to a value < 0.5 and the result
+of the third sub-tree if the first sub-tree evaluates to >= 0.5.";
+      }
+    }
+
+    public IfThenElse()
+      : base() {
+      MinSubTrees = 3; MaxSubTrees = 3;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/LessThan.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/LessThan.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/LessThan.cs	(revision 2222)
@@ -0,0 +1,35 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class LessThan : BinaryFunction {
+    public override string Description {
+      get {
+        return @"Less-than condition. Returns 1.0 if the value of the first sub-tree is less than the value of the second sub-tree and 0.0 otherwise.";
+      }
+    }
+
+    public LessThan()
+      : base() {
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Logarithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Logarithm.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Logarithm.cs	(revision 2222)
@@ -0,0 +1,33 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Logarithm : UnaryFunction {
+    public override string Description {
+      get { return "Returns the natural (base e) logarithm of the first sub-tree."; }
+    }
+
+    public Logarithm()
+      : base() {
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Multiplication.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Multiplication.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Multiplication.cs	(revision 2222)
@@ -0,0 +1,40 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Multiplication : FunctionBase {
+    public override string Description {
+      get {
+        return @"Returns the product of the results of all sub-tree.
+  (* 3) => 3
+  (* 2 3) => 6
+  (* 3 4 5) => 60";
+      }
+    }
+
+    public Multiplication()
+      : base() {
+      // 2 - 3 seems like an reasonable defaut (used for +,-,*,/) (discussion with swinkler and maffenze)
+      MinSubTrees = 2; MaxSubTrees = 3;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Not.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Not.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Not.cs	(revision 2222)
@@ -0,0 +1,34 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Not : UnaryFunction {
+    public override string Description {
+      get {
+        return @"Logical NOT operation. Only defined for sub-tree-results 0.0 and 1.0.";
+      }
+    }
+
+    public Not()
+      : base() {
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Or.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Or.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Or.cs	(revision 2222)
@@ -0,0 +1,36 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Or : FunctionBase {
+    public override string Description {
+      get {
+        return @"Logical OR operation. Only defined for sub-tree-results 0.0 and 1.0.";
+      }
+    }
+
+    public Or()
+      : base() {
+      MinSubTrees = 2; MaxSubTrees = 3;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Power.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Power.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Power.cs	(revision 2222)
@@ -0,0 +1,33 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Power : BinaryFunction {
+    public override string Description {
+      get { return "Returns the result of the first sub-tree to the power of the second sub-tree (power(x, y))."; }
+    }
+
+    public Power()
+      : base() {
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Signum.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Signum.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Signum.cs	(revision 2222)
@@ -0,0 +1,33 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Signum : UnaryFunction {
+    public override string Description {
+      get { return "Returns the signum of the first sub-tree."; }
+    }
+
+    public Signum()
+      : base() {
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Sinus.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Sinus.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Sinus.cs	(revision 2222)
@@ -0,0 +1,33 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Sinus : UnaryFunction {
+    public override string Description {
+      get { return "Returns the sinus of the first sub-tree."; }
+    }
+
+    public Sinus()
+      : base() {
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Sqrt.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Sqrt.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Sqrt.cs	(revision 2222)
@@ -0,0 +1,33 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Sqrt : UnaryFunction {
+    public override string Description {
+      get { return "Returns the square root of the first sub-tree."; }
+    }
+
+    public Sqrt()
+      : base() {
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Subtraction.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Subtraction.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Subtraction.cs	(revision 2222)
@@ -0,0 +1,38 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Subtraction : BinaryFunction {
+    public override string Description {
+      get {
+        return @"Subtracts the results of sub-tree 2..n from the result of the first sub-tree.
+    (- 3) => -3
+    (- 2 3) => -1
+    (- 3 4 5) => -6";
+      }
+    }
+
+    public Subtraction()
+      : base() {
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/SymbolTable.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/SymbolTable.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/SymbolTable.cs	(revision 2222)
@@ -0,0 +1,91 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  class EvaluatorSymbolTable : StorableBase {
+    public const byte ADDITION = 1;
+    public const byte AND = 2;
+    public const byte AVERAGE = 3;
+    public const byte CONSTANT = 4;
+    public const byte COSINUS = 5;
+    public const byte DIFFERENTIAL = 25;
+    public const byte DIVISION = 6;
+    public const byte EQU = 7;
+    public const byte EXP = 8;
+    public const byte GT = 9;
+    public const byte IFTE = 10;
+    public const byte LT = 11;
+    public const byte LOG = 12;
+    public const byte MULTIPLICATION = 13;
+    public const byte NOT = 14;
+    public const byte OR = 15;
+    public const byte POWER = 16;
+    public const byte SIGNUM = 17;
+    public const byte SINUS = 18;
+    public const byte SQRT = 19;
+    public const byte SUBTRACTION = 20;
+    public const byte TANGENS = 21;
+    public const byte VARIABLE = 22;
+    public const byte XOR = 23;
+    public const byte UNKNOWN = 24;
+
+    private static Dictionary<Type, byte> staticTypes = new Dictionary<Type, byte>();
+
+    // needs to be public for persistence mechanism (Activator.CreateInstance needs empty constructor)
+    static EvaluatorSymbolTable() {
+      staticTypes = new Dictionary<Type, byte>();
+      staticTypes[typeof(Addition)] = ADDITION;
+      staticTypes[typeof(And)] = AND;
+      staticTypes[typeof(Average)] = AVERAGE;
+      staticTypes[typeof(Constant)] = CONSTANT;
+      staticTypes[typeof(Cosinus)] = COSINUS;
+      staticTypes[typeof(Division)] = DIVISION;
+      staticTypes[typeof(Equal)] = EQU;
+      staticTypes[typeof(Exponential)] = EXP;
+      staticTypes[typeof(GreaterThan)] = GT;
+      staticTypes[typeof(IfThenElse)] = IFTE;
+      staticTypes[typeof(LessThan)] = LT;
+      staticTypes[typeof(Logarithm)] = LOG;
+      staticTypes[typeof(Multiplication)] = MULTIPLICATION;
+      staticTypes[typeof(Not)] = NOT;
+      staticTypes[typeof(Or)] = OR;
+      staticTypes[typeof(Power)] = POWER;
+      staticTypes[typeof(Signum)] = SIGNUM;
+      staticTypes[typeof(Sinus)] = SINUS;
+      staticTypes[typeof(Sqrt)] = SQRT;
+      staticTypes[typeof(Subtraction)] = SUBTRACTION;
+      staticTypes[typeof(Tangens)] = TANGENS;
+      staticTypes[typeof(Variable)] = VARIABLE;
+      staticTypes[typeof(Xor)] = XOR;
+      staticTypes[typeof(Differential)] = DIFFERENTIAL;
+    }
+
+    internal static byte MapFunction(IFunction function) {
+      if(staticTypes.ContainsKey(function.GetType())) return staticTypes[function.GetType()];
+      else return UNKNOWN;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Tangens.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Tangens.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Tangens.cs	(revision 2222)
@@ -0,0 +1,33 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Tangens : UnaryFunction {
+    public override string Description {
+      get { return "Returns the tangens of the first sub-tree."; }
+    }
+
+    public Tangens()
+      : base() {
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Variable.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Variable.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Variable.cs	(revision 2222)
@@ -0,0 +1,120 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.GP.Interfaces;
+using HeuristicLab.Operators;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class Variable : Terminal {    
+    public const string WEIGHT = "Weight";
+    public const string OFFSET = "SampleOffset";
+    public const string VARIABLENAME = "Variable";
+
+    private int minOffset;
+    private int maxOffset;
+
+    public override string Description {
+      get {
+        return @"Variable reads a value from a dataset, multiplies that value with a given factor and returns the result.
+The variable 'SampleOffset' can be used to read a value from previous or following rows.
+The index of the row that is actually read is SampleIndex+SampleOffset).";
+      }
+    }
+
+
+    public override IFunctionTree GetTreeNode() {
+      return new VariableFunctionTree(this);
+    }
+
+    public Variable()
+      : base() {
+      SetupInitialization();
+      SetupManipulation();
+    }
+
+    private void SetupInitialization() {
+      CombinedOperator combinedOp = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      UniformItemChooser variableRandomizer = new UniformItemChooser();
+      variableRandomizer.GetVariableInfo("Value").ActualName = VARIABLENAME;
+      variableRandomizer.GetVariableInfo("Values").ActualName = "InputVariables";
+      variableRandomizer.Name = "Variable randomizer";
+      NormalRandomizer weightRandomizer = new NormalRandomizer();
+      weightRandomizer.Mu = 0.0;
+      weightRandomizer.Sigma = 1.0;
+      weightRandomizer.GetVariableInfo("Value").ActualName = WEIGHT;
+      weightRandomizer.Name = "Weight Randomizer";
+      UniformRandomizer offsetRandomizer = new UniformRandomizer();
+      offsetRandomizer.Min = minOffset;
+      offsetRandomizer.Max = maxOffset + 1;
+      offsetRandomizer.GetVariableInfo("Value").ActualName = OFFSET;
+      offsetRandomizer.Name = "Offset Randomizer";
+
+      combinedOp.OperatorGraph.AddOperator(seq);
+      combinedOp.OperatorGraph.AddOperator(variableRandomizer);
+      combinedOp.OperatorGraph.AddOperator(weightRandomizer);
+      combinedOp.OperatorGraph.AddOperator(offsetRandomizer);
+      combinedOp.OperatorGraph.InitialOperator = seq;
+      seq.AddSubOperator(variableRandomizer);
+      seq.AddSubOperator(weightRandomizer);
+      seq.AddSubOperator(offsetRandomizer);
+      Initializer = combinedOp;
+    }
+
+    private void SetupManipulation() {
+      // manipulation operator
+      CombinedOperator combinedOp = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      UniformItemChooser variableRandomizer = new UniformItemChooser();
+      variableRandomizer.GetVariableInfo("Value").ActualName = VARIABLENAME;
+      variableRandomizer.GetVariableInfo("Values").ActualName = "InputVariables";
+      variableRandomizer.Name = "Variable randomizer";
+      NormalRandomAdder weightRandomAdder = new NormalRandomAdder();
+      weightRandomAdder.Mu = 0.0;
+      weightRandomAdder.Sigma = 1.0;
+      weightRandomAdder.GetVariableInfo("Value").ActualName = WEIGHT;
+      weightRandomAdder.Name = "Weight Adder";
+      NormalRandomAdder offsetRandomAdder = new NormalRandomAdder();
+      offsetRandomAdder.Mu = 0.0;
+      offsetRandomAdder.Sigma = 1.0;
+      offsetRandomAdder.GetVariableInfo("Value").ActualName = OFFSET;
+      offsetRandomAdder.Name = "Offset Adder";
+
+      combinedOp.OperatorGraph.AddOperator(seq);
+      combinedOp.OperatorGraph.AddOperator(variableRandomizer);
+      combinedOp.OperatorGraph.AddOperator(weightRandomAdder);
+      combinedOp.OperatorGraph.AddOperator(offsetRandomAdder);
+      combinedOp.OperatorGraph.InitialOperator = seq;
+      seq.AddSubOperator(variableRandomizer);
+      seq.AddSubOperator(weightRandomAdder);
+      seq.AddSubOperator(offsetRandomAdder);
+      Manipulator = combinedOp;
+    }
+
+    public void SetConstraints(int minSampleOffset, int maxSampleOffset) {
+      this.minOffset = minSampleOffset;
+      this.maxOffset = maxSampleOffset;
+      SetupInitialization();
+      SetupManipulation();
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/VariableFunctionTree.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/VariableFunctionTree.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/VariableFunctionTree.cs	(revision 2222)
@@ -0,0 +1,118 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.GP.Interfaces;
+using System.Xml;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class VariableFunctionTree : TerminalTreeNode {
+    public double Weight { get; set; }
+    public string VariableName { get; set; }
+    public int SampleOffset { get; set; }
+
+    public VariableFunctionTree(Variable variable)
+      : base(variable) {
+    }
+
+    protected VariableFunctionTree(VariableFunctionTree original)
+      : base(original) {
+      Weight = original.Weight;
+      VariableName = original.VariableName;
+      SampleOffset = original.SampleOffset;
+    }
+
+    public override bool HasLocalParameters {
+      get {
+        return true;
+      }
+    }
+
+    public override IOperation CreateShakingOperation(IScope scope) {
+      Scope myVariableScope = new Scope();
+      scope.AddSubScope(myVariableScope);
+      myVariableScope.AddVariable(CreateWeightVariable());
+      myVariableScope.AddVariable(CreateVariableNameVariable());
+      myVariableScope.AddVariable(CreateSampleOffsetVariable());
+      return new AtomicOperation(Function.Manipulator, myVariableScope);
+    }
+
+    public override IOperation CreateInitOperation(IScope scope) {
+      Scope myVariableScope = new Scope();
+      scope.AddSubScope(myVariableScope);
+      myVariableScope.AddVariable(CreateWeightVariable());
+      myVariableScope.AddVariable(CreateVariableNameVariable());
+      myVariableScope.AddVariable(CreateSampleOffsetVariable());
+      return new AtomicOperation(Function.Initializer, myVariableScope);
+    }
+
+    public override object Clone() {
+      return new VariableFunctionTree(this);
+    }
+
+    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<System.Guid, IStorable> persistedObjects) {
+      XmlNode node = document.CreateElement(name);
+      XmlAttribute weightAttr = document.CreateAttribute("Weight");
+      weightAttr.Value = XmlConvert.ToString(Weight);
+      XmlAttribute variableAttr = document.CreateAttribute("Variable");
+      variableAttr.Value = VariableName;
+      XmlAttribute sampleOffsetAttr = document.CreateAttribute("SampleOffset");
+      sampleOffsetAttr.Value = XmlConvert.ToString(SampleOffset);
+      node.Attributes.Append(weightAttr);
+      node.Attributes.Append(sampleOffsetAttr);
+      node.Attributes.Append(variableAttr);
+      return node;
+    }
+
+    public override void Populate(XmlNode node, IDictionary<System.Guid, IStorable> restoredObjects) {
+      base.Populate(node, restoredObjects);
+      Weight = XmlConvert.ToDouble(node.Attributes["Weight"].Value);
+      SampleOffset = XmlConvert.ToInt32(node.Attributes["SampleOffset"].Value);
+      VariableName = node.Attributes["Variable"].Value;
+    }
+
+    private IVariable CreateSampleOffsetVariable() {
+      IntData data = new IntData(SampleOffset);
+      data.Changed += (sender, args) => SampleOffset = data.Data;
+      var variable = new HeuristicLab.Core.Variable(Variable.OFFSET, data);
+      variable.ValueChanged += (sender, args) => SampleOffset = ((IntData)variable.Value).Data;
+      return variable;
+    }
+
+    private IVariable CreateVariableNameVariable() {
+      StringData data = new StringData(VariableName);
+      data.Changed += (sender, args) => VariableName = data.Data;
+      var variable = new HeuristicLab.Core.Variable(Variable.VARIABLENAME, data);
+      variable.ValueChanged += (sender, args) => VariableName = ((StringData)variable.Value).Data;
+      return variable;
+    }
+
+    private IVariable CreateWeightVariable() {
+      DoubleData data = new DoubleData(Weight);
+      data.Changed += (sender, args) => Weight = data.Data;
+      var variable = new HeuristicLab.Core.Variable(Variable.WEIGHT, data);
+      variable.ValueChanged += (sender, args) => Weight = ((DoubleData)variable.Value).Data;
+      return variable;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Xor.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Xor.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Xor.cs	(revision 2222)
@@ -0,0 +1,35 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Xor : BinaryFunction {
+    public override string Description {
+      get {
+        return @"Logical XOR operation. Only defined for sub-tree-results 0.0 and 1.0.";
+      }
+    }
+
+    public Xor()
+      : base() {
+    }
+  }
+}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Tangens.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Tangens.cs	(revision 2221)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Tangens : FunctionBase {
-    public override string Description {
-      get { return "Returns the tangens of the first sub-tree."; }
-    }
-
-    public Tangens()
-      : base() {
-      // must have exactly one suboperator
-      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/TreeEvaluatorBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/TreeEvaluatorBase.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/TreeEvaluatorBase.cs	(revision 2222)
@@ -22,10 +22,7 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
-using System.Xml;
-using System.Diagnostics;
 using HeuristicLab.DataAnalysis;
+using HeuristicLab.GP.Interfaces;
 
 namespace HeuristicLab.GP.StructureIdentification {
@@ -44,5 +41,4 @@
       public byte arity;
       public byte symbol;
-      public IFunction function;
     }
 
@@ -60,34 +56,40 @@
       minValue = mean - punishmentFactor * range;
 
-      BakedFunctionTree bakedTree = functionTree as BakedFunctionTree;
-      if (bakedTree == null) throw new ArgumentException("TreeEvaluators can only evaluate BakedFunctionTrees");
-
-      List<LightWeightFunction> linearRepresentation = bakedTree.LinearRepresentation;
-      codeArr = new Instr[linearRepresentation.Count];
+      codeArr = new Instr[functionTree.GetSize()];
       int i = 0;
-      foreach (LightWeightFunction f in linearRepresentation) {
-        codeArr[i++] = TranslateToInstr(f);
+      foreach (IFunctionTree tree in IteratePrefix(functionTree)) {
+        codeArr[i++] = TranslateToInstr(tree);
       }
     }
 
-    private Instr TranslateToInstr(LightWeightFunction f) {
+    private IEnumerable<IFunctionTree> IteratePrefix(IFunctionTree functionTree) {
+      List<IFunctionTree> prefixForm = new List<IFunctionTree>();
+      prefixForm.Add(functionTree);
+      foreach (IFunctionTree subTree in functionTree.SubTrees) {
+        prefixForm.AddRange(IteratePrefix(subTree));
+      }
+      return prefixForm;
+    }
+
+    private Instr TranslateToInstr(IFunctionTree tree) {
       Instr instr = new Instr();
-      instr.arity = f.arity;
-      instr.symbol = EvaluatorSymbolTable.MapFunction(f.functionType);
+      instr.arity = (byte)tree.SubTrees.Count;
+      instr.symbol = EvaluatorSymbolTable.MapFunction(tree.Function);
       switch (instr.symbol) {
         case EvaluatorSymbolTable.DIFFERENTIAL:
         case EvaluatorSymbolTable.VARIABLE: {
-            instr.i_arg0 = (short)dataset.GetVariableIndex((string)f.localData[0]); // var
-            instr.d_arg0 = (double)f.localData[1]; // weight
-            instr.i_arg1 = (short)(int)f.localData[2]; // sample-offset
+            VariableFunctionTree varTree = (VariableFunctionTree)tree;
+            instr.i_arg0 = (short)dataset.GetVariableIndex(varTree.VariableName);
+            instr.d_arg0 = varTree.Weight;
+            instr.i_arg1 = (short)varTree.SampleOffset;
             break;
           }
         case EvaluatorSymbolTable.CONSTANT: {
-            instr.d_arg0 = (double)f.localData[0]; // value
+            ConstantFunctionTree constTree = (ConstantFunctionTree)tree;
+            instr.d_arg0 = constTree.Value;
             break;
           }
         case EvaluatorSymbolTable.UNKNOWN: {
-            instr.function = f.functionType;
-            break;
+            throw new NotSupportedException("Unknown function symbol: " + instr.symbol);
           }
       }
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Variable.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Variable.cs	(revision 2221)
+++ 	(revision )
@@ -1,178 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Data;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Random;
-using HeuristicLab.Operators;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public class Variable : FunctionBase {
-
-    public const string WEIGHT = "Weight";
-    public const string OFFSET = "SampleOffset";
-    public const string INDEX = "Variable";
-
-    private int minOffset;
-    private int maxOffset;
-
-    public override string Description {
-      get {
-        return @"Variable reads a value from a dataset, multiplies that value with a given factor and returns the result.
-The variable 'SampleOffset' can be used to read a value from previous or following rows.
-The index of the row that is actually read is SampleIndex+SampleOffset).";
-      }
-    }
-
-    public Variable()
-      : base() {
-      AddVariableInfo(new VariableInfo(INDEX, "The variable name", typeof(StringData), VariableKind.None));
-      GetVariableInfo(INDEX).Local = true;
-      AddVariableInfo(new VariableInfo(WEIGHT, "Weight is multiplied to the feature value", typeof(DoubleData), VariableKind.None));
-      GetVariableInfo(WEIGHT).Local = true;
-      AddVariableInfo(new VariableInfo(OFFSET, "SampleOffset is added to the sample index", typeof(ConstrainedIntData), VariableKind.None));
-      GetVariableInfo(OFFSET).Local = true;
-      AddVariableInfo(new VariableInfo(INITIALIZATION, "Initialization operator for variables", typeof(CombinedOperator), VariableKind.None));
-      GetVariableInfo(INITIALIZATION).Local = false;
-      AddVariableInfo(new VariableInfo(MANIPULATION, "Manipulation operator for variables", typeof(CombinedOperator), VariableKind.None));
-      GetVariableInfo(MANIPULATION).Local = false;
-
-      DoubleData weight = new DoubleData();
-      AddVariable(new HeuristicLab.Core.Variable(WEIGHT, weight));
-
-      StringData variable = new StringData();
-      AddVariable(new HeuristicLab.Core.Variable(INDEX, variable));
-
-      ConstrainedIntData sampleOffset = new ConstrainedIntData();
-      AddVariable(new HeuristicLab.Core.Variable(OFFSET, sampleOffset));
-
-      SetupInitialization();
-      SetupManipulation();
-
-      // variable can't have suboperators
-      AddConstraint(new NumberOfSubOperatorsConstraint(0, 0));
-    }
-
-    private void SetupInitialization() {
-      CombinedOperator combinedOp = new CombinedOperator();
-      SequentialProcessor seq = new SequentialProcessor();
-      UniformItemChooser variableRandomizer = new UniformItemChooser();
-      variableRandomizer.GetVariableInfo("Value").ActualName = INDEX;
-      variableRandomizer.GetVariableInfo("Values").ActualName = "InputVariables";
-      variableRandomizer.Name = "Variable randomizer";
-      NormalRandomizer weightRandomizer = new NormalRandomizer();
-      weightRandomizer.Mu = 0.0;
-      weightRandomizer.Sigma = 1.0;
-      weightRandomizer.GetVariableInfo("Value").ActualName = WEIGHT;
-      weightRandomizer.Name = "Weight Randomizer";
-      UniformRandomizer offsetRandomizer = new UniformRandomizer();
-      offsetRandomizer.Min = minOffset;
-      offsetRandomizer.Max = maxOffset + 1;
-      offsetRandomizer.GetVariableInfo("Value").ActualName = OFFSET;
-      offsetRandomizer.Name = "Offset Randomizer";
-
-      combinedOp.OperatorGraph.AddOperator(seq);
-      combinedOp.OperatorGraph.AddOperator(variableRandomizer);
-      combinedOp.OperatorGraph.AddOperator(weightRandomizer);
-      combinedOp.OperatorGraph.AddOperator(offsetRandomizer);
-      combinedOp.OperatorGraph.InitialOperator = seq;
-      seq.AddSubOperator(variableRandomizer);
-      seq.AddSubOperator(weightRandomizer);
-      seq.AddSubOperator(offsetRandomizer);
-      HeuristicLab.Core.IVariable initOp = GetVariable(INITIALIZATION);
-      if(initOp == null) {
-        AddVariable(new HeuristicLab.Core.Variable(INITIALIZATION, combinedOp));
-      } else {
-        initOp.Value = combinedOp;
-      }
-    }
-
-    private void SetupManipulation() {
-      // manipulation operator
-      CombinedOperator combinedOp = new CombinedOperator();
-      SequentialProcessor seq = new SequentialProcessor();
-      UniformItemChooser variableRandomizer = new UniformItemChooser();
-      variableRandomizer.GetVariableInfo("Value").ActualName = INDEX;
-      variableRandomizer.GetVariableInfo("Values").ActualName = "InputVariables";
-      variableRandomizer.Name = "Variable randomizer";
-      NormalRandomAdder weightRandomAdder = new NormalRandomAdder();
-      weightRandomAdder.Mu = 0.0;
-      weightRandomAdder.Sigma = 1.0;
-      weightRandomAdder.GetVariableInfo("Value").ActualName = WEIGHT;
-      weightRandomAdder.Name = "Weight Adder";
-      NormalRandomAdder offsetRandomAdder = new NormalRandomAdder();
-      offsetRandomAdder.Mu = 0.0;
-      offsetRandomAdder.Sigma = 1.0;
-      offsetRandomAdder.GetVariableInfo("Value").ActualName = OFFSET;
-      offsetRandomAdder.Name = "Offset Adder";
-
-      combinedOp.OperatorGraph.AddOperator(seq);
-      combinedOp.OperatorGraph.AddOperator(variableRandomizer);
-      combinedOp.OperatorGraph.AddOperator(weightRandomAdder);
-      combinedOp.OperatorGraph.AddOperator(offsetRandomAdder);
-      combinedOp.OperatorGraph.InitialOperator = seq;
-      seq.AddSubOperator(variableRandomizer);
-      seq.AddSubOperator(weightRandomAdder);
-      seq.AddSubOperator(offsetRandomAdder);
-      HeuristicLab.Core.IVariable manipulationOp = GetVariable(MANIPULATION);
-      if(manipulationOp == null) {
-        AddVariable(new HeuristicLab.Core.Variable(MANIPULATION, combinedOp));
-      } else {
-        manipulationOp.Value = combinedOp;
-      }
-    }
-
-    public void SetConstraints(int minSampleOffset, int maxSampleOffset) {
-      ConstrainedIntData offset = GetVariableValue<ConstrainedIntData>(OFFSET, null, false);
-      IntBoundedConstraint offsetConstraint = new IntBoundedConstraint();
-      this.minOffset = minSampleOffset;
-      this.maxOffset = maxSampleOffset;
-      offsetConstraint.LowerBound = minSampleOffset;
-      offsetConstraint.LowerBoundEnabled = true;
-      offsetConstraint.LowerBoundIncluded = true;
-      offsetConstraint.UpperBound = maxSampleOffset;
-      offsetConstraint.UpperBoundEnabled = true;
-      offsetConstraint.UpperBoundIncluded = true;
-      offset.AddConstraint(offsetConstraint);
-
-      //ConstrainedIntData index = GetVariableValue<ConstrainedIntData>(INDEX, null, false);
-      //IntBoundedConstraint indexConstraint = new IntBoundedConstraint();
-      //minIndex = minInputIndex;
-      //maxIndex = maxInputIndex;
-      //indexConstraint.LowerBound = minInputIndex;
-      //indexConstraint.LowerBoundEnabled = true;
-      //indexConstraint.LowerBoundIncluded = true;
-      //indexConstraint.UpperBound = maxInputIndex;
-      //indexConstraint.UpperBoundEnabled = true;
-      //indexConstraint.UpperBoundIncluded = true;
-      //index.AddConstraint(indexConstraint);
-
-      SetupInitialization();
-      SetupManipulation();
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP.StructureIdentification/3.3/Xor.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Xor.cs	(revision 2221)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Constraints;
-using HeuristicLab.DataAnalysis;
-
-namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Xor : FunctionBase {
-    public override string Description {
-      get {
-        return @"Logical XOR operation. Only defined for sub-tree-results 0.0 and 1.0.";
-      }
-    }
-
-    public Xor()
-      : base() {
-      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
-      AddConstraint(new SubOperatorTypeConstraint(0));
-      AddConstraint(new SubOperatorTypeConstraint(1));
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/BakedFunctionTree.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/BakedFunctionTree.cs	(revision 2221)
+++ 	(revision )
@@ -1,364 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using System.Xml;
-using System.Globalization;
-
-namespace HeuristicLab.GP {
-
-  public class LightWeightFunction {
-    public byte arity = 0;
-    public IFunction functionType;
-    public List<object> localData = new List<object>();
-
-    public LightWeightFunction Clone() {
-      LightWeightFunction clone = new LightWeightFunction();
-      clone.arity = arity;
-      clone.functionType = functionType;
-      clone.localData.AddRange(localData);
-      return clone;
-    }
-  }
-
-  public class BakedFunctionTree : ItemBase, IFunctionTree {
-    private List<LightWeightFunction> linearRepresentation;
-    public List<LightWeightFunction> LinearRepresentation {
-      get {
-        FlattenVariables();
-        FlattenTrees();
-        return linearRepresentation;
-      }
-    }
-    private bool treesExpanded = false;
-    private List<IFunctionTree> subTrees;
-    private bool variablesExpanded = false;
-    private List<IVariable> variables;
-
-    public BakedFunctionTree() {
-      linearRepresentation = new List<LightWeightFunction>();
-    }
-
-    internal BakedFunctionTree(IFunction function)
-      : this() {
-      LightWeightFunction fun = new LightWeightFunction();
-      fun.functionType = function;
-      linearRepresentation.Add(fun);
-      treesExpanded = true;
-      subTrees = new List<IFunctionTree>();
-      variables = new List<IVariable>();
-      variablesExpanded = true;
-      foreach (IVariableInfo variableInfo in function.VariableInfos) {
-        if (variableInfo.Local) {
-          variables.Add((IVariable)function.GetVariable(variableInfo.FormalName).Clone());
-        }
-      }
-    }
-
-    internal BakedFunctionTree(IFunctionTree tree)
-      : this() {
-      LightWeightFunction fun = new LightWeightFunction();
-      fun.functionType = tree.Function;
-      linearRepresentation.Add(fun);
-      foreach (IVariable variable in tree.LocalVariables) {
-        IObjectData value = (IObjectData)variable.Value;
-        fun.localData.Add(value.Data);
-      }
-      foreach (IFunctionTree subTree in tree.SubTrees) {
-        AddSubTree(new BakedFunctionTree(subTree));
-      }
-    }
-
-    private int BranchLength(int branchRoot) {
-      int arity = linearRepresentation[branchRoot].arity;
-      int length = 1;
-      for (int i = 0; i < arity; i++) {
-        length += BranchLength(branchRoot + length);
-      }
-      return length;
-    }
-
-    private void FlattenTrees() {
-      if (treesExpanded) {
-        linearRepresentation[0].arity = (byte)subTrees.Count;
-        foreach (BakedFunctionTree subTree in subTrees) {
-          subTree.FlattenVariables();
-          subTree.FlattenTrees();
-          linearRepresentation.AddRange(subTree.linearRepresentation);
-        }
-        treesExpanded = false;
-        subTrees = null;
-      }
-    }
-
-    private void FlattenVariables() {
-      if (variablesExpanded) {
-        linearRepresentation[0].localData.Clear();
-        foreach (IVariable variable in variables) {
-          object objData = variable.Value;
-          while (objData is IObjectData) objData = ((IObjectData)objData).Data;
-          linearRepresentation[0].localData.Add(objData);
-        }
-        variablesExpanded = false;
-        variables = null;
-      }
-    }
-
-    public int Size {
-      get {
-        if (treesExpanded) {
-          int size = 1;
-          foreach (BakedFunctionTree tree in subTrees) {
-            size += tree.Size;
-          }
-          return size;
-        } else
-          return linearRepresentation.Count;
-      }
-    }
-
-    public int Height {
-      get {
-        if (treesExpanded) {
-          int height = 0;
-          foreach (IFunctionTree subTree in subTrees) {
-            int curHeight = subTree.Height;
-            if (curHeight > height) height = curHeight;
-          }
-          return height + 1;
-        } else {
-          int nextBranchStart;
-          return BranchHeight(0, out nextBranchStart);
-        }
-      }
-    }
-
-    private int BranchHeight(int branchStart, out int nextBranchStart) {
-      LightWeightFunction f = linearRepresentation[branchStart];
-      int height = 0;
-      branchStart++;
-      for (int i = 0; i < f.arity; i++) {
-        int curHeight = BranchHeight(branchStart, out nextBranchStart);
-        if (curHeight > height) height = curHeight;
-        branchStart = nextBranchStart;
-      }
-      nextBranchStart = branchStart;
-      return height + 1;
-    }
-
-    public IList<IFunctionTree> SubTrees {
-      get {
-        if (!treesExpanded) {
-          subTrees = new List<IFunctionTree>();
-          int arity = linearRepresentation[0].arity;
-          int branchIndex = 1;
-          for (int i = 0; i < arity; i++) {
-            BakedFunctionTree subTree = new BakedFunctionTree();
-            int length = BranchLength(branchIndex);
-            for (int j = branchIndex; j < branchIndex + length; j++) {
-              subTree.linearRepresentation.Add(linearRepresentation[j]);
-            }
-            branchIndex += length;
-            subTrees.Add(subTree);
-          }
-          treesExpanded = true;
-          linearRepresentation.RemoveRange(1, linearRepresentation.Count - 1);
-          linearRepresentation[0].arity = 0;
-        }
-        return subTrees;
-      }
-    }
-
-    public ICollection<IVariable> LocalVariables {
-      get {
-        if (!variablesExpanded) {
-          variables = new List<IVariable>();
-          IFunction function = Function;
-          int localVariableIndex = 0;
-          foreach (IVariableInfo variableInfo in function.VariableInfos) {
-            if (variableInfo.Local) {
-              IVariable clone = (IVariable)function.GetVariable(variableInfo.FormalName).Clone();
-              IObjectData objData = (IObjectData)clone.Value;
-              if (objData is ConstrainedDoubleData) {
-                ((ConstrainedDoubleData)objData).Data = (double)linearRepresentation[0].localData[localVariableIndex];
-              } else if (objData is ConstrainedIntData) {
-                ((ConstrainedIntData)objData).Data = (int)linearRepresentation[0].localData[localVariableIndex];
-              } else {
-                objData.Data = linearRepresentation[0].localData[localVariableIndex];
-              }
-              variables.Add(clone);
-              localVariableIndex++;
-            }
-          }
-          variablesExpanded = true;
-          linearRepresentation[0].localData.Clear();
-        }
-        return variables;
-      }
-    }
-
-    public IFunction Function {
-      get { return linearRepresentation[0].functionType; }
-    }
-
-    public IVariable GetLocalVariable(string name) {
-      foreach (IVariable var in LocalVariables) {
-        if (var.Name == name) return var;
-      }
-      return null;
-    }
-
-    public void AddVariable(IVariable variable) {
-      throw new NotSupportedException();
-    }
-
-    public void RemoveVariable(string name) {
-      throw new NotSupportedException();
-    }
-
-    public void AddSubTree(IFunctionTree tree) {
-      if (!treesExpanded) throw new InvalidOperationException();
-      subTrees.Add(tree);
-    }
-
-    public void InsertSubTree(int index, IFunctionTree tree) {
-      if (!treesExpanded) throw new InvalidOperationException();
-      subTrees.Insert(index, tree);
-    }
-
-    public void RemoveSubTree(int index) {
-      // sanity check
-      if (!treesExpanded) throw new InvalidOperationException();
-      subTrees.RemoveAt(index);
-    }
-
-    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
-      FlattenVariables();
-      FlattenTrees();
-      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
-      XmlNode linearRepresentationNode = document.CreateElement("LinearRepresentation");
-      foreach (LightWeightFunction f in linearRepresentation) {
-        XmlNode entryNode = PersistenceManager.Persist("Function", f.functionType, document, persistedObjects);
-        XmlAttribute arityAttribute = document.CreateAttribute("Arity");
-        arityAttribute.Value = XmlConvert.ToString(f.arity);
-        entryNode.Attributes.Append(arityAttribute);
-        foreach (object o in f.localData) {
-          if (f.localData.Count > 0) {
-            entryNode.AppendChild(CreateDataNode(document, o));
-          }
-        }
-        linearRepresentationNode.AppendChild(entryNode);
-      }
-
-      node.AppendChild(linearRepresentationNode);
-      return node;
-    }
-
-    private XmlNode CreateDataNode(XmlDocument doc, object o) {
-      XmlNode node = doc.CreateElement("Data");
-      XmlAttribute typeAttr = doc.CreateAttribute("Type");
-      node.Attributes.Append(typeAttr);
-      if (o is double) {
-        node.Value = XmlConvert.ToString((double)o);
-        typeAttr.Value = "d";
-      } else if (o is int) {
-        node.Value = XmlConvert.ToString((int)o);
-        typeAttr.Value = "i";
-      } else if (o is string) {
-        node.Value = (string)o;
-        typeAttr.Value = "s";
-      } else throw new ArgumentException("Invalid type for local data element: " + o);
-      return node;
-    }
-
-    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
-      base.Populate(node, restoredObjects);
-      XmlNode linearRepresentationNode = node.SelectSingleNode("LinearRepresentation");
-      foreach (XmlNode entryNode in linearRepresentationNode.ChildNodes) {
-        LightWeightFunction f = new LightWeightFunction();
-        f.arity = XmlConvert.ToByte(entryNode.Attributes["Arity"].Value);
-        foreach (XmlNode dataNode in entryNode.ChildNodes) {
-          f.localData.Add(ParseDataNode(dataNode));
-        }
-        f.functionType = (IFunction)PersistenceManager.Restore(entryNode, restoredObjects);
-        linearRepresentation.Add(f);
-      }
-      treesExpanded = false;
-      variablesExpanded = false;
-    }
-
-    private object ParseDataNode(XmlNode dataNode) {
-      string type = dataNode.Attributes["Type"].Value;
-      if (type == "d") {
-        return XmlConvert.ToDouble(dataNode.Value);
-      } else if (type == "i") {
-        return XmlConvert.ToInt32(dataNode.Value);
-      } else if (type == "s") {
-        return dataNode.Value;
-      } else throw new FormatException("Can't parse type \"" + type + "\" \"" + dataNode.Value + "\" as local data for GP trees");
-    }
-
-    //private string GetString(IEnumerable<double> xs) {
-    //  StringBuilder builder = new StringBuilder();
-    //  foreach (double x in xs) {
-    //    builder.Append(x.ToString("r", CultureInfo.InvariantCulture) + "; ");
-    //  }
-    //  if (builder.Length > 0) builder.Remove(builder.Length - 2, 2);
-    //  return builder.ToString();
-    //}
-
-    //private List<T> GetList<T>(string s, Converter<string, T> converter) {
-    //  List<T> result = new List<T>();
-    //  string[] tokens = s.Split(new char[] { ';', ' ' }, StringSplitOptions.RemoveEmptyEntries);
-    //  foreach (string token in tokens) {
-    //    T x = converter(token.Trim());
-    //    result.Add(x);
-    //  }
-    //  return result;
-    //}
-
-    public override object Clone(IDictionary<Guid, object> clonedObjects) {
-      BakedFunctionTree clone = new BakedFunctionTree();
-      // in case the user (de)serialized the tree between evaluation and selection we have to flatten the tree again.
-      if (treesExpanded) FlattenTrees();
-      if (variablesExpanded) FlattenVariables();
-      foreach (LightWeightFunction f in linearRepresentation) {
-        clone.linearRepresentation.Add(f.Clone());
-      }
-      return clone;
-    }
-
-    public override IView CreateView() {
-      return new FunctionTreeView(this);
-    }
-
-    //public override string ToString() {
-    //  SymbolicExpressionExporter exporter = new SymbolicExpressionExporter();
-    //  exporter.Visit(this);
-    //  return exporter.GetStringRepresentation();
-    //}
-  }
-}
Index: /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/BinaryFunction.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/BinaryFunction.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/BinaryFunction.cs	(revision 2222)
@@ -0,0 +1,34 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.GP {
+  public abstract class BinaryFunction : FunctionBase {
+    public BinaryFunction()
+      : base() {
+      MinSubTrees = 2; MaxSubTrees = 2;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionBase.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionBase.cs	(revision 2222)
@@ -0,0 +1,209 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Text;
+using HeuristicLab.Core;
+using System.Xml;
+using System.Diagnostics;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP {
+  public abstract class FunctionBase : ItemBase, IFunction {
+    private List<List<IFunction>> allowedSubFunctions = new List<List<IFunction>>();
+    private int minArity = -1;
+    private int maxArity = -1;
+    private double tickets = 1.0;
+    private IOperator initializer;
+    private IOperator manipulator;
+    private int minTreeHeight = -1;
+    private int minTreeSize = -1;
+
+    public virtual string Name {
+      get { return this.GetType().Name; }
+    }
+
+    public virtual string Description {
+      get { return "Description for this function is missing (TODO)"; }
+    }
+
+    public int MinSubTrees {
+      get {
+        return minArity;
+      }
+      protected set {
+        minArity = value;
+        while (minArity > allowedSubFunctions.Count) allowedSubFunctions.Add(new List<IFunction>());
+      }
+    }
+
+    public int MaxSubTrees {
+      get {
+        return maxArity;
+      }
+      protected set {
+        maxArity = value;
+        while (allowedSubFunctions.Count > maxArity) allowedSubFunctions.RemoveAt(allowedSubFunctions.Count - 1);
+        while (maxArity > allowedSubFunctions.Count) allowedSubFunctions.Add(new List<IFunction>());
+      }
+    }
+
+
+    public int MinTreeSize {
+      get {
+        if (minTreeSize <= 0) RecalculateMinimalTreeSize();
+        return minTreeSize;
+      }
+    }
+
+    public int MinTreeHeight {
+      get {
+        if (minTreeHeight <= 0) RecalculateMinimalTreeHeight();
+        return minTreeHeight;
+      }
+    }
+
+    public double Tickets {
+      get { return tickets; }
+      set {
+        if (value < 0.0) throw new ArgumentException("Number of tickets must be positive");
+        else tickets = value;
+      }
+    }
+
+    public IOperator Initializer {
+      get { return initializer; }
+      set { initializer = value; }
+    }
+
+    public IOperator Manipulator {
+      get { return manipulator; }
+      set { manipulator = value; }
+    }
+
+    public virtual IFunctionTree GetTreeNode() {
+      return new FunctionTreeBase(this);
+    }
+
+    public ICollection<IFunction> GetAllowedSubFunctions(int index) {
+      if (index < 0 || index > MaxSubTrees) throw new ArgumentException("Index outside of allowed range. index = " + index);
+      return allowedSubFunctions[index];
+    }
+
+    public void AddAllowedSubFunction(IFunction function, int index) {
+      if (index < 0 || index > MaxSubTrees) throw new ArgumentException("Index outside of allowed range. index = " + index);
+      if (allowedSubFunctions[index] == null) {
+        allowedSubFunctions[index] = new List<IFunction>();
+      }
+      if (!allowedSubFunctions[index].Contains(function)) {
+        allowedSubFunctions[index].Add(function);
+      }
+    }
+
+    public void RemoveAllowedSubFunction(IFunction function, int index) {
+      if (index < 0 || index > MaxSubTrees) throw new ArgumentException("Index outside of allowed range. index = " + index);
+      allowedSubFunctions[index].Add(function);
+    }
+
+    public bool IsAllowedSubFunction(IFunction function, int index) {
+      return GetAllowedSubFunctions(index).Contains(function);
+    }
+
+    private void RecalculateMinimalTreeSize() {
+      minTreeSize = int.MaxValue;
+      int sum = 1;
+      int minSize = int.MaxValue;
+      for (int i = 0; i < MinSubTrees; i++) {
+        foreach (IFunction subFun in GetAllowedSubFunctions(i)) {
+          minSize = Math.Min(minSize, subFun.MinTreeSize);
+        }
+        sum += minSize;
+      }
+      minTreeSize = sum;
+    }
+
+    private void RecalculateMinimalTreeHeight() {
+      minTreeHeight = int.MaxValue;
+      int height = 0;
+      int minHeight = int.MaxValue;
+      for (int i = 0; i < MinSubTrees; i++) {
+        foreach (IFunction subFun in GetAllowedSubFunctions(i)) {
+          minHeight = Math.Min(minHeight, subFun.MinTreeHeight);
+        }
+        height = Math.Max(height, minHeight);
+      }
+      minTreeHeight = height + 1;
+    }
+
+    public override object Clone(IDictionary<Guid, object> clonedObjects) {
+      FunctionBase clone = (FunctionBase)base.Clone(clonedObjects);
+      clone.initializer = (IOperator)Auxiliary.Clone(initializer, clonedObjects);
+      clone.manipulator = (IOperator)Auxiliary.Clone(manipulator, clonedObjects);
+      clone.maxArity = maxArity;
+      clone.minArity = minArity;
+      clone.minTreeHeight = minTreeHeight;
+      clone.minTreeSize = minTreeSize;
+      clone.tickets = tickets;
+      for (int i = 0; i < MaxSubTrees; i++) {
+        var allowedSubFunctionsForSlot = new List<IFunction>();
+        foreach (IFunction f in GetAllowedSubFunctions(i)) {
+          allowedSubFunctionsForSlot.Add((IFunction)Auxiliary.Clone(f, clonedObjects));
+        }
+        clone.allowedSubFunctions.Add(allowedSubFunctionsForSlot);
+      }
+      return clone;
+    }
+
+    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
+      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
+      XmlAttribute minSubTreesAttr = document.CreateAttribute("MinSubTrees");
+      minSubTreesAttr.Value = XmlConvert.ToString(MinSubTrees);
+      XmlAttribute maxSubTreesAttr = document.CreateAttribute("MaxSubTrees");
+      maxSubTreesAttr.Value = XmlConvert.ToString(MaxSubTrees);
+      node.Attributes.Append(minSubTreesAttr);
+      node.Attributes.Append(maxSubTreesAttr);
+      for (int i = 0; i < MaxSubTrees; i++) {
+        XmlNode slotNode = document.CreateElement("AllowedSubFunctions");
+        XmlAttribute slotAttr = document.CreateAttribute("Slot");
+        slotAttr.Value = XmlConvert.ToString(i);
+        slotNode.Attributes.Append(slotAttr);
+        node.AppendChild(slotNode);
+        foreach (IFunction f in GetAllowedSubFunctions(i)) {
+          slotNode.AppendChild(PersistenceManager.Persist(f, document, persistedObjects));
+        }
+      }
+      return node;
+    }
+
+    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
+      base.Populate(node, restoredObjects);
+      MinSubTrees = XmlConvert.ToInt32(node.Attributes["MinSubTrees"].Value);
+      MaxSubTrees = XmlConvert.ToInt32(node.Attributes["MaxSubTrees"].Value);
+      foreach (XmlNode allowedSubFunctionsNode in node.SelectNodes("AllowedSubFunctions")) {
+        int slot = XmlConvert.ToInt32(allowedSubFunctionsNode.Attributes["Slot"].Value);
+        foreach (XmlNode fNode in allowedSubFunctionsNode.ChildNodes) {
+          AddAllowedSubFunction((IFunction)PersistenceManager.Restore(fNode, restoredObjects), slot);
+        }
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionLibraryInjectorBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionLibraryInjectorBase.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionLibraryInjectorBase.cs	(revision 2222)
@@ -0,0 +1,62 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Text;
+using System.Xml;
+using System.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP.SantaFe {
+  public abstract class FunctionLibraryInjectorBase : OperatorBase {
+    private const string FUNCTIONLIBRARY = "FunctionLibrary";
+
+    public override string Description {
+      get { return @"Descrption is missing."; }
+    }
+
+    public FunctionLibraryInjectorBase()
+      : base() {
+      AddVariableInfo(new VariableInfo(FUNCTIONLIBRARY, "Preconfigured default function library", typeof(FunctionLibrary), VariableKind.New));
+    }
+
+    public override IOperation Apply(IScope scope) {
+      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(FUNCTIONLIBRARY), CreateFunctionLibrary()));
+      return null;
+    }
+
+    protected abstract FunctionLibrary CreateFunctionLibrary();
+
+    protected void SetAllowedSubOperators(IFunction f, IEnumerable<IFunction> gs) {
+      for (int i = 0; i < f.MaxSubTrees; i++) {
+        SetAllowedSubOperators(f, i, gs);
+      }
+    }
+
+    protected void SetAllowedSubOperators(IFunction f, int i, IEnumerable<IFunction> gs) {
+      foreach (var g in gs) {
+        f.AddAllowedSubFunction(g, i);
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionTreeBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionTreeBase.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionTreeBase.cs	(revision 2222)
@@ -0,0 +1,121 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
+using System.Xml;
+
+namespace HeuristicLab.GP {
+  public class FunctionTreeBase : IFunctionTree {
+    private List<IFunctionTree> subTrees;
+    private IFunction function;
+
+    public FunctionTreeBase() {
+    }
+
+    public FunctionTreeBase(IFunction function) {
+      subTrees = new List<IFunctionTree>();
+      this.function = function;
+    }
+
+    protected FunctionTreeBase(FunctionTreeBase original) {
+      this.function = original.Function;
+      this.subTrees = new List<IFunctionTree>(original.SubTrees.Count);
+      foreach (IFunctionTree originalSubTree in original.SubTrees) {
+        this.SubTrees.Add((IFunctionTree)originalSubTree.Clone());
+      }
+    }
+
+    #region IFunctionTree Members
+    public virtual bool HasLocalParameters {
+      get { return false; }
+    }
+
+    public virtual IList<IFunctionTree> SubTrees {
+      get { return subTrees; }
+    }
+
+    public IFunction Function {
+      get { return function; }
+      protected set { function = value; }
+    }
+
+    public int GetSize() {
+      int size = 1;
+      foreach (IFunctionTree tree in SubTrees) size += tree.GetSize();
+      return size;
+    }
+
+    public int GetHeight() {
+      int maxHeight = 0;
+      foreach (IFunctionTree tree in SubTrees) maxHeight = Math.Max(maxHeight, tree.GetHeight());
+      return maxHeight + 1;
+    }
+
+    public virtual IOperation CreateShakingOperation(IScope scope) {
+      return null;
+    }
+
+    public virtual IOperation CreateInitOperation(IScope scope) {
+      return null;
+    }
+
+    public void AddSubTree(IFunctionTree tree) {
+      SubTrees.Add(tree);
+    }
+
+    public virtual void InsertSubTree(int index, IFunctionTree tree) {
+      SubTrees.Insert(index, tree);
+    }
+
+    public virtual void RemoveSubTree(int index) {
+      SubTrees.RemoveAt(index);
+    }
+
+    #endregion
+
+    #region IStorable Members
+
+    public Guid Guid {
+      get { throw new NotSupportedException(); }
+    }
+
+    public virtual object Clone() {
+      return new FunctionTreeBase(this);
+    }
+
+    public object Clone(IDictionary<Guid, object> clonedObjects) {
+      throw new NotImplementedException();
+    }
+
+    public virtual XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
+      return null;
+    }
+
+    public virtual void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
+    }
+
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/Terminal.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/Terminal.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/Terminal.cs	(revision 2222)
@@ -0,0 +1,34 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.GP {
+  public abstract class Terminal : FunctionBase {
+    public Terminal()
+      : base() {
+      MinSubTrees = 0; MaxSubTrees = 0;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/TerminalTreeNode.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/TerminalTreeNode.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/TerminalTreeNode.cs	(revision 2222)
@@ -0,0 +1,45 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP {
+  public class TerminalTreeNode : FunctionTreeBase {
+    private static readonly IList<IFunctionTree> subTrees = new List<IFunctionTree>().AsReadOnly();
+    public TerminalTreeNode(IFunction function) {
+      Function = function;
+    }
+
+    protected TerminalTreeNode(TerminalTreeNode original) {
+      Function = original.Function;
+    }
+
+    public override IList<IFunctionTree> SubTrees {
+      get {
+        return subTrees;
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/UnaryFunction.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/UnaryFunction.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/UnaryFunction.cs	(revision 2222)
@@ -0,0 +1,34 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.GP {
+  public abstract class UnaryFunction : FunctionBase {
+    public UnaryFunction()
+      : base() {
+      MinSubTrees = 1; MaxSubTrees = 1;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP/3.3/DefaultFunctionTreeNameGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/DefaultFunctionTreeNameGenerator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP/3.3/DefaultFunctionTreeNameGenerator.cs	(revision 2222)
@@ -24,4 +24,5 @@
 using System.Text;
 using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
 
 namespace HeuristicLab.GP {
Index: unk/sources/HeuristicLab.GP/3.3/EqualiserController.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/EqualiserController.cs	(revision 2221)
+++ 	(revision )
@@ -1,60 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.GP {
-  public class EqualiserController : OperatorBase {
-    public override string Description {
-      get { return @"TODO\r\nOperator description still missing ..."; }
-    }
-
-    public EqualiserController() {
-      AddVariableInfo(new VariableInfo("EqualiserHistogram", "Histogram of the target distribution", typeof(DoubleArrayData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("AcceptanceProbabilities", "Acceptance probabilities of individuals falling into bins", typeof(DoubleArrayData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("Histogram", "The histogram of the actual distribution", typeof(IntArrayData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("Rate", "Parameter that controls the convergence rate of the population to the equalised distribution", typeof(DoubleData), VariableKind.In));
-    }
-
-    public override IOperation Apply(IScope scope) {
-      DoubleArrayData equaliserHistogram = GetVariableValue<DoubleArrayData>("EqualiserHistogram", scope, true);
-      DoubleArrayData acceptanceProbabilities = GetVariableValue<DoubleArrayData>("AcceptanceProbabilities", scope, false, false);
-      IntArrayData currentHistogram = GetVariableValue<IntArrayData>("Histogram", scope, false, false);
-      double rate = GetVariableValue<DoubleData>("Rate", scope, false, false).Data;
-
-      double sum = 0.0;
-      Array.ForEach(currentHistogram.Data, delegate(int i) { sum += i; });
-      for(int i = 0; i < acceptanceProbabilities.Data.Length; i++) {
-        double normalizedDiff = (equaliserHistogram.Data[i] - (currentHistogram.Data[i] / sum)) / equaliserHistogram.Data[i];
-        acceptanceProbabilities.Data[i] = acceptanceProbabilities.Data[i] + normalizedDiff * rate;
-        currentHistogram.Data[i] = 0;
-      }
-      currentHistogram.FireChanged();
-      acceptanceProbabilities.FireChanged();
-      return null;
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/FunctionBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/FunctionBase.cs	(revision 2221)
+++ 	(revision )
@@ -1,157 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Constraints;
-using System.Diagnostics;
-
-namespace HeuristicLab.GP {
-  /// <summary>
-  /// Functions are like operators except that they do not allow sub-operators and the normal form of evaluation
-  /// is to evaluate all children first.
-  /// </summary>
-  public abstract class FunctionBase : OperatorBase, IFunction {
-    public const string INITIALIZATION = "Initialization";
-    public const string MANIPULATION = "Manipulation";
-    private List<IFunction>[] allowedSubFunctions;
-    private int minArity = -1;
-    private int maxArity = -1;
-
-    public virtual double Apply() {
-      throw new NotImplementedException();
-    }
-
-    public virtual IFunctionTree GetTreeNode() {
-      return new BakedFunctionTree(this);
-    }
-
-    public int MinArity {
-      get {
-        if(minArity < 0) RefreshArity();
-        return minArity;
-      }
-    }
-
-    public int MaxArity {
-      get {
-        if(maxArity < 0) RefreshArity();
-        return maxArity;
-      }
-    }
-
-    private void RefreshArity() {
-      minArity = 2; maxArity = 2; // default arity is 2
-      foreach(IConstraint constraint in Constraints) {
-        NumberOfSubOperatorsConstraint theConstraint = constraint as NumberOfSubOperatorsConstraint;
-        if(theConstraint != null) {
-          minArity = theConstraint.MinOperators.Data;
-          maxArity = theConstraint.MaxOperators.Data;
-        }
-      }
-    }
-
-    public IList<IFunction> AllowedSubFunctions(int index) {
-      if(allowedSubFunctions == null) {
-        // first time: analyze the constraint and create a cached copy of the allowed sub-functions
-        allowedSubFunctions = new List<IFunction>[MaxArity];
-        for(int i = 0; i < MaxArity; i++) {
-          allowedSubFunctions[i] = GetAllowedSubFunctions(i);
-        }
-      }
-      return allowedSubFunctions[index];
-    }
-
-    private List<IFunction> GetAllowedSubFunctions(int index) {
-      List<IFunction> allowedSubFunctions = new List<IFunction>();
-      foreach(IConstraint constraint in Constraints) {
-        if(constraint is SubOperatorTypeConstraint) {
-          SubOperatorTypeConstraint subOpConstraint = constraint as SubOperatorTypeConstraint;
-          if(subOpConstraint.SubOperatorIndex.Data == index) {
-            foreach(IFunction f in subOpConstraint.AllowedSubOperators) allowedSubFunctions.Add(f);
-            subOpConstraint.Changed += new EventHandler(subOpConstraint_Changed); // register an event-handler to invalidate the cache on constraing changes
-            return allowedSubFunctions;
-          }
-        } else if(constraint is AllSubOperatorsTypeConstraint) {
-          AllSubOperatorsTypeConstraint subOpConstraint = constraint as AllSubOperatorsTypeConstraint;
-          foreach(IFunction f in subOpConstraint.AllowedSubOperators) allowedSubFunctions.Add(f);
-          subOpConstraint.Changed += new EventHandler(subOpConstraint_Changed); // register an event-handler to invalidate the cache on constraint changes
-          return allowedSubFunctions;
-        }
-      }
-      return allowedSubFunctions;
-    }
-
-    private void subOpConstraint_Changed(object sender, EventArgs e) {
-      allowedSubFunctions = null;
-    }
-
-    // operator-tree style evaluation is not supported for functions.
-    public override IOperation Apply(IScope scope) {
-      throw new NotSupportedException();
-    }
-
-    private static readonly List<IOperator> emptySubOperatorList = new List<IOperator>();
-    public override IList<IOperator> SubOperators {
-      get { return emptySubOperatorList; }
-    }
-
-    public override void AddSubOperator(IOperator subOperator) {
-      throw new NotSupportedException();
-    }
-
-    public override bool TryAddSubOperator(IOperator subOperator) {
-      throw new NotSupportedException();
-    }
-
-    public override bool TryAddSubOperator(IOperator subOperator, int index) {
-      throw new NotSupportedException();
-    }
-
-    public override bool TryAddSubOperator(IOperator subOperator, int index, out ICollection<IConstraint> violatedConstraints) {
-      throw new NotSupportedException();
-    }
-
-    public override bool TryAddSubOperator(IOperator subOperator, out ICollection<IConstraint> violatedConstraints) {
-      throw new NotSupportedException();
-    }
-
-    public override void AddSubOperator(IOperator subOperator, int index) {
-      throw new NotSupportedException();
-    }
-
-    public override void RemoveSubOperator(int index) {
-      throw new NotSupportedException();
-    }
-
-    public override bool TryRemoveSubOperator(int index) {
-      throw new NotSupportedException();
-    }
-
-    public override bool TryRemoveSubOperator(int index, out ICollection<IConstraint> violatedConstraints) {
-      throw new NotSupportedException();
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP/3.3/FunctionLibrary.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/FunctionLibrary.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/FunctionLibrary.cs	(revision 2222)
@@ -0,0 +1,87 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using System.Xml;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP {
+  public class FunctionLibrary : ItemBase, IEditable {
+    private List<IFunction> functions = new List<IFunction>();
+    public IEnumerable<IFunction> Functions {
+      get { return functions; }
+    }
+
+    public FunctionLibrary()
+      : base() {
+    }
+
+    public void AddFunction(IFunction fun) {
+      if (!functions.Contains(fun)) {
+        functions.Add(fun);
+        OnChanged();
+      }
+    }
+
+    public void RemoveFunction(IFunction fun) {
+      functions.Remove(fun);
+
+      // remove the operator from the allowed sub-functions of all functions
+      foreach (IFunction f in Functions) {
+        for (int i = 0; i < f.MaxSubTrees; i++) {
+          f.RemoveAllowedSubFunction(fun, i);
+        }
+      }
+      OnChanged();
+    }
+
+    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
+      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
+      foreach (IFunction f in functions) {
+        node.AppendChild(PersistenceManager.Persist("Function", f, document, persistedObjects));
+      }
+      return node;
+    }
+
+    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
+      base.Populate(node, restoredObjects);
+      foreach (XmlNode fNode in node.SelectNodes("Function")) {
+        AddFunction((IFunction)PersistenceManager.Restore(fNode, restoredObjects));
+      }
+    }
+
+    public override IView CreateView() {
+      return new FunctionLibraryEditor(this);
+    }
+
+    #region IEditable Members
+
+    public IEditor CreateEditor() {
+      return new FunctionLibraryEditor(this);
+    }
+
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.GP/3.3/FunctionLibraryEditor.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/FunctionLibraryEditor.Designer.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/FunctionLibraryEditor.Designer.cs	(revision 2222)
@@ -0,0 +1,267 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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
+
+namespace HeuristicLab.GP {
+  partial class FunctionLibraryEditor {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if(disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.tabControl = new System.Windows.Forms.TabControl();
+      this.functionsTabPage = new System.Windows.Forms.TabPage();
+      this.initializationTabPage = new System.Windows.Forms.TabPage();
+      this.initSplitContainer = new System.Windows.Forms.SplitContainer();
+      this.initListView = new System.Windows.Forms.ListView();
+      this.initVariableView = new HeuristicLab.Core.VariableView();
+      this.mutationTabPage = new System.Windows.Forms.TabPage();
+      this.mutationSplitContainer = new System.Windows.Forms.SplitContainer();
+      this.mutationListView = new System.Windows.Forms.ListView();
+      this.mutationVariableView = new HeuristicLab.Core.VariableView();
+      this.addButton = new System.Windows.Forms.Button();
+      this.removeButton = new System.Windows.Forms.Button();
+      this.functionsListView = new System.Windows.Forms.ListView();
+      this.tabControl.SuspendLayout();
+      this.functionsTabPage.SuspendLayout();
+      this.initializationTabPage.SuspendLayout();
+      this.initSplitContainer.Panel1.SuspendLayout();
+      this.initSplitContainer.Panel2.SuspendLayout();
+      this.initSplitContainer.SuspendLayout();
+      this.mutationTabPage.SuspendLayout();
+      this.mutationSplitContainer.Panel1.SuspendLayout();
+      this.mutationSplitContainer.Panel2.SuspendLayout();
+      this.mutationSplitContainer.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // tabControl
+      // 
+      this.tabControl.Controls.Add(this.functionsTabPage);
+      this.tabControl.Controls.Add(this.initializationTabPage);
+      this.tabControl.Controls.Add(this.mutationTabPage);
+      this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.tabControl.Location = new System.Drawing.Point(0, 0);
+      this.tabControl.Name = "tabControl";
+      this.tabControl.SelectedIndex = 0;
+      this.tabControl.Size = new System.Drawing.Size(677, 561);
+      this.tabControl.TabIndex = 1;
+      // 
+      // functionsTabPage
+      // 
+      this.functionsTabPage.Controls.Add(this.functionsListView);
+      this.functionsTabPage.Controls.Add(this.removeButton);
+      this.functionsTabPage.Controls.Add(this.addButton);
+      this.functionsTabPage.Location = new System.Drawing.Point(4, 22);
+      this.functionsTabPage.Name = "functionsTabPage";
+      this.functionsTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.functionsTabPage.Size = new System.Drawing.Size(669, 535);
+      this.functionsTabPage.TabIndex = 0;
+      this.functionsTabPage.Text = "Functions";
+      this.functionsTabPage.UseVisualStyleBackColor = true;
+      // 
+      // initializationTabPage
+      // 
+      this.initializationTabPage.Controls.Add(this.initSplitContainer);
+      this.initializationTabPage.Location = new System.Drawing.Point(4, 22);
+      this.initializationTabPage.Name = "initializationTabPage";
+      this.initializationTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.initializationTabPage.Size = new System.Drawing.Size(669, 535);
+      this.initializationTabPage.TabIndex = 1;
+      this.initializationTabPage.Text = "Initialization";
+      this.initializationTabPage.UseVisualStyleBackColor = true;
+      // 
+      // initSplitContainer
+      // 
+      this.initSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.initSplitContainer.Location = new System.Drawing.Point(3, 3);
+      this.initSplitContainer.Name = "initSplitContainer";
+      // 
+      // initSplitContainer.Panel1
+      // 
+      this.initSplitContainer.Panel1.Controls.Add(this.initListView);
+      // 
+      // initSplitContainer.Panel2
+      // 
+      this.initSplitContainer.Panel2.Controls.Add(this.initVariableView);
+      this.initSplitContainer.Size = new System.Drawing.Size(663, 529);
+      this.initSplitContainer.SplitterDistance = 221;
+      this.initSplitContainer.TabIndex = 0;
+      // 
+      // initListView
+      // 
+      this.initListView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.initListView.Location = new System.Drawing.Point(0, 0);
+      this.initListView.Name = "initListView";
+      this.initListView.Size = new System.Drawing.Size(221, 529);
+      this.initListView.TabIndex = 0;
+      this.initListView.UseCompatibleStateImageBehavior = false;
+      this.initListView.View = System.Windows.Forms.View.List;
+      this.initListView.SelectedIndexChanged += new System.EventHandler(this.initListView_SelectedIndexChanged);
+      // 
+      // initVariableView
+      // 
+      this.initVariableView.Caption = "Variable";
+      this.initVariableView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.initVariableView.Location = new System.Drawing.Point(0, 0);
+      this.initVariableView.Name = "initVariableView";
+      this.initVariableView.Size = new System.Drawing.Size(438, 529);
+      this.initVariableView.TabIndex = 0;
+      this.initVariableView.Variable = null;
+      // 
+      // mutationTabPage
+      // 
+      this.mutationTabPage.Controls.Add(this.mutationSplitContainer);
+      this.mutationTabPage.Location = new System.Drawing.Point(4, 22);
+      this.mutationTabPage.Name = "mutationTabPage";
+      this.mutationTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.mutationTabPage.Size = new System.Drawing.Size(669, 535);
+      this.mutationTabPage.TabIndex = 2;
+      this.mutationTabPage.Text = "Mutation";
+      this.mutationTabPage.UseVisualStyleBackColor = true;
+      // 
+      // mutationSplitContainer
+      // 
+      this.mutationSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.mutationSplitContainer.Location = new System.Drawing.Point(3, 3);
+      this.mutationSplitContainer.Name = "mutationSplitContainer";
+      // 
+      // mutationSplitContainer.Panel1
+      // 
+      this.mutationSplitContainer.Panel1.Controls.Add(this.mutationListView);
+      // 
+      // mutationSplitContainer.Panel2
+      // 
+      this.mutationSplitContainer.Panel2.Controls.Add(this.mutationVariableView);
+      this.mutationSplitContainer.Size = new System.Drawing.Size(663, 529);
+      this.mutationSplitContainer.SplitterDistance = 221;
+      this.mutationSplitContainer.TabIndex = 0;
+      // 
+      // mutationListView
+      // 
+      this.mutationListView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.mutationListView.Location = new System.Drawing.Point(0, 0);
+      this.mutationListView.MultiSelect = false;
+      this.mutationListView.Name = "mutationListView";
+      this.mutationListView.Size = new System.Drawing.Size(221, 529);
+      this.mutationListView.TabIndex = 0;
+      this.mutationListView.UseCompatibleStateImageBehavior = false;
+      this.mutationListView.View = System.Windows.Forms.View.List;
+      this.mutationListView.SelectedIndexChanged += new System.EventHandler(this.mutationListView_SelectedIndexChanged);
+      // 
+      // mutationVariableView
+      // 
+      this.mutationVariableView.Caption = "Variable";
+      this.mutationVariableView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.mutationVariableView.Location = new System.Drawing.Point(0, 0);
+      this.mutationVariableView.Name = "mutationVariableView";
+      this.mutationVariableView.Size = new System.Drawing.Size(438, 529);
+      this.mutationVariableView.TabIndex = 0;
+      this.mutationVariableView.Variable = null;
+      // 
+      // addButton
+      // 
+      this.addButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.addButton.Location = new System.Drawing.Point(6, 506);
+      this.addButton.Name = "addButton";
+      this.addButton.Size = new System.Drawing.Size(75, 23);
+      this.addButton.TabIndex = 1;
+      this.addButton.Text = "Add...";
+      this.addButton.UseVisualStyleBackColor = true;
+      this.addButton.Click += new System.EventHandler(this.addButton_Click);
+      // 
+      // removeButton
+      // 
+      this.removeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.removeButton.Location = new System.Drawing.Point(87, 506);
+      this.removeButton.Name = "removeButton";
+      this.removeButton.Size = new System.Drawing.Size(75, 23);
+      this.removeButton.TabIndex = 2;
+      this.removeButton.Text = "Remove";
+      this.removeButton.UseVisualStyleBackColor = true;
+      this.removeButton.Click += new System.EventHandler(this.removeButton_Click);
+      // 
+      // functionsListView
+      // 
+      this.functionsListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.functionsListView.Location = new System.Drawing.Point(3, 6);
+      this.functionsListView.Name = "functionsListView";
+      this.functionsListView.Size = new System.Drawing.Size(660, 494);
+      this.functionsListView.TabIndex = 3;
+      this.functionsListView.UseCompatibleStateImageBehavior = false;
+      this.functionsListView.SelectedIndexChanged += new System.EventHandler(this.functionsListView_SelectedIndexChanged);
+      // 
+      // FunctionLibraryEditor
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.tabControl);
+      this.Name = "FunctionLibraryEditor";
+      this.Size = new System.Drawing.Size(677, 561);
+      this.tabControl.ResumeLayout(false);
+      this.functionsTabPage.ResumeLayout(false);
+      this.initializationTabPage.ResumeLayout(false);
+      this.initSplitContainer.Panel1.ResumeLayout(false);
+      this.initSplitContainer.Panel2.ResumeLayout(false);
+      this.initSplitContainer.ResumeLayout(false);
+      this.mutationTabPage.ResumeLayout(false);
+      this.mutationSplitContainer.Panel1.ResumeLayout(false);
+      this.mutationSplitContainer.Panel2.ResumeLayout(false);
+      this.mutationSplitContainer.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.TabControl tabControl;
+    private System.Windows.Forms.TabPage functionsTabPage;
+    private System.Windows.Forms.TabPage initializationTabPage;
+    private System.Windows.Forms.TabPage mutationTabPage;
+    private System.Windows.Forms.SplitContainer initSplitContainer;
+    private System.Windows.Forms.SplitContainer mutationSplitContainer;
+    private HeuristicLab.Core.VariableView initVariableView;
+    private HeuristicLab.Core.VariableView mutationVariableView;
+    private System.Windows.Forms.ListView initListView;
+    private System.Windows.Forms.ListView mutationListView;
+    private System.Windows.Forms.Button removeButton;
+    private System.Windows.Forms.Button addButton;
+    private System.Windows.Forms.ListView functionsListView;
+  }
+}
Index: /trunk/sources/HeuristicLab.GP/3.3/FunctionLibraryEditor.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/FunctionLibraryEditor.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/FunctionLibraryEditor.cs	(revision 2222)
@@ -0,0 +1,110 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP {
+  public partial class FunctionLibraryEditor : EditorBase {
+    private ChooseItemDialog chooseFunctionDialog;
+    public FunctionLibrary FunctionLibrary {
+      get { return (FunctionLibrary)Item; }
+      set { base.Item = value; }
+    }
+
+    public FunctionLibraryEditor(FunctionLibrary library)
+      : base() {
+      InitializeComponent();
+      FunctionLibrary = library;
+    }
+
+    protected override void AddItemEvents() {
+      base.AddItemEvents();
+      base.Item.Changed += (sender, args) => UpdateControls();
+    }
+
+    protected override void UpdateControls() {
+      base.UpdateControls();
+      foreach (IFunction fun in FunctionLibrary.Functions) {
+        if (fun.Manipulator != null) {
+          mutationListView.Items.Add(CreateListViewItem(fun));
+        }
+        if (fun.Initializer != null) {
+          initListView.Items.Add(CreateListViewItem(fun));
+        }
+      }
+    }
+
+    private void mutationListView_SelectedIndexChanged(object sender, EventArgs e) {
+      if (mutationListView.SelectedItems.Count > 0 && mutationListView.SelectedItems[0].Tag != null) {
+        IOperator manipulator = ((IFunction)mutationListView.SelectedItems[0].Tag).Manipulator;
+        mutationVariableView.Enabled = true;
+        mutationVariableView.Variable = new Variable("Manipulator", manipulator);
+      } else {
+        mutationVariableView.Enabled = false;
+      }
+    }
+
+    private void initListView_SelectedIndexChanged(object sender, EventArgs e) {
+      if (initListView.SelectedItems.Count > 0 && initListView.SelectedItems[0].Tag != null) {
+        IOperator initializer = ((IFunction)initListView.SelectedItems[0].Tag).Initializer;
+        initVariableView.Enabled = true;
+        initVariableView.Variable = new Variable("Initializer", initializer);
+      } else {
+        initVariableView.Enabled = false;
+      }
+    }
+
+    private void addButton_Click(object sender, EventArgs e) {
+      if (chooseFunctionDialog == null) chooseFunctionDialog = new ChooseItemDialog(typeof(IFunction));
+      if (chooseFunctionDialog.ShowDialog(this) == DialogResult.OK) {
+        FunctionLibrary.AddFunction((IFunction)chooseFunctionDialog.Item);
+        functionsListView.Items.Add(CreateListViewItem((IFunction)chooseFunctionDialog.Item));
+        functionsListView.Sort();
+      }
+    }
+
+    private void removeButton_Click(object sender, EventArgs e) {
+      // delete from the end of the list
+      IEnumerable<int> removeIndices = functionsListView.SelectedIndices.OfType<int>().OrderBy(x => 1.0 / x);
+      foreach (int selectedIndex in removeIndices) {
+        FunctionLibrary.RemoveFunction((IFunction)functionsListView.Items[selectedIndex].Tag);
+        functionsListView.Items.RemoveAt(selectedIndex);
+      }
+    }
+
+    private void functionsListView_SelectedIndexChanged(object sender, EventArgs e) {
+      removeButton.Enabled = functionsListView.SelectedIndices.Count > 0;
+    }
+
+    private ListViewItem CreateListViewItem(IFunction function) {
+      ListViewItem item = new ListViewItem();
+      item.Name = function.Name;
+      item.Text = function.Name;
+      item.Tag = function;
+      return item;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP/3.3/FunctionLibraryEditor.resx
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/FunctionLibraryEditor.resx	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/FunctionLibraryEditor.resx	(revision 2222)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: /trunk/sources/HeuristicLab.GP/3.3/FunctionTreeView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/FunctionTreeView.Designer.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/FunctionTreeView.Designer.cs	(revision 2222)
@@ -0,0 +1,78 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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;
+namespace HeuristicLab.GP {
+  partial class FunctionTreeView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.treeNodeContextMenu = new System.Windows.Forms.ContextMenu();
+      this.funTreeView = new System.Windows.Forms.TreeView();
+      this.SuspendLayout();
+      // 
+      // funTreeView
+      // 
+      this.funTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.funTreeView.HideSelection = false;
+      this.funTreeView.Location = new System.Drawing.Point(0, 0);
+      this.funTreeView.Name = "funTreeView";
+      this.funTreeView.Size = new System.Drawing.Size(432, 514);
+      this.funTreeView.TabIndex = 0;
+      this.funTreeView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.funTreeView_MouseUp);
+      // 
+      // FunctionTreeView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.funTreeView);
+      this.Name = "FunctionTreeView";
+      this.Size = new System.Drawing.Size(432, 514);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.ContextMenu treeNodeContextMenu;
+    private System.Windows.Forms.TreeView funTreeView;
+  }
+}
Index: /trunk/sources/HeuristicLab.GP/3.3/FunctionTreeView.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/FunctionTreeView.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/FunctionTreeView.cs	(revision 2222)
@@ -0,0 +1,130 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Windows.Forms;
+using HeuristicLab.Core;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.GP.Interfaces;
+
+namespace HeuristicLab.GP {
+  public partial class FunctionTreeView : ViewBase {
+    private IFunctionTree functionTree;
+    private IFunctionTree selectedBranch;
+    private IFunctionTreeNameGenerator nameGenerator;
+    private IFunctionTreeNameGenerator[] allNameGenerators;
+    private MenuItem representationsMenu;
+
+    public FunctionTreeView() {
+      nameGenerator = new DefaultFunctionTreeNameGenerator();
+      InitializeComponent();
+
+      DiscoveryService discoveryService = new DiscoveryService();
+      allNameGenerators = discoveryService.GetInstances<IFunctionTreeNameGenerator>();
+      representationsMenu = new MenuItem();
+      representationsMenu.Text = "Tree representation";
+      representationsMenu.Name = "Tree representation";
+      foreach (IFunctionTreeNameGenerator generator in allNameGenerators) {
+        MenuItem mi = new MenuItem(generator.Name, MakeNameGeneratorDelegate(generator), Shortcut.None);
+        if (generator is DefaultFunctionTreeNameGenerator) mi.Checked = true;
+        else mi.Checked = false;
+        mi.Tag = generator;
+        representationsMenu.MenuItems.Add(mi);
+      }
+    }
+
+    public FunctionTreeView(IFunctionTree functionTree)
+      : this() {
+      this.functionTree = functionTree;
+      Refresh();
+    }
+
+    protected override void UpdateControls() {
+      funTreeView.Nodes.Clear();
+      TreeNode rootNode = new TreeNode();
+      rootNode.Name = functionTree.Function.Name;
+      rootNode.Text = nameGenerator.GetName(functionTree);
+      rootNode.Tag = functionTree;
+      treeNodeContextMenu.MenuItems.Clear();
+      treeNodeContextMenu.MenuItems.Add(representationsMenu);
+      DiscoveryService discoveryService = new DiscoveryService();
+      IFunctionTreeSerializer[] exporters = discoveryService.GetInstances<IFunctionTreeSerializer>();
+      foreach (IFunctionTreeSerializer exporter in exporters) {
+        string result;
+        // register a menu item for the exporter
+        MenuItem item = new MenuItem("Copy to clip-board (" + exporter.Name + ")",
+          MakeExporterDelegate(exporter), Shortcut.None);
+        // try to export the whole tree 
+        if (exporter.TryExport(functionTree, out result)) {
+          // if it worked enable the context-menu item
+          item.Enabled = true;
+        } else {
+          item.Enabled = false;
+        }
+        treeNodeContextMenu.MenuItems.Add(item);
+      }
+      rootNode.ContextMenu = treeNodeContextMenu;
+      funTreeView.Nodes.Add(rootNode);
+
+      foreach (IFunctionTree subTree in functionTree.SubTrees) {
+        CreateTree(rootNode, subTree);
+      }
+      funTreeView.ExpandAll();
+    }
+
+    private EventHandler MakeNameGeneratorDelegate(IFunctionTreeNameGenerator generator) {
+      return delegate(object source, EventArgs args) {
+        IFunctionTreeNameGenerator g = (IFunctionTreeNameGenerator)((MenuItem)source).Tag;
+        this.nameGenerator = g;
+        foreach (MenuItem otherMenuItem in representationsMenu.MenuItems) otherMenuItem.Checked = false;
+        ((MenuItem)source).Checked = true;
+        UpdateControls();
+      };
+    }
+
+    private EventHandler MakeExporterDelegate(IFunctionTreeSerializer exporter) {
+      return delegate(object source, EventArgs args) {
+        TreeNode node = funTreeView.SelectedNode;
+        if (node == null || node.Tag == null) return;
+        Clipboard.SetText(exporter.Export((IFunctionTree)node.Tag));
+      };
+    }
+
+    private void CreateTree(TreeNode rootNode, IFunctionTree functionTree) {
+      TreeNode node = new TreeNode();
+      node.Name = functionTree.Function.Name;
+      node.Text = nameGenerator.GetName(functionTree);
+      node.Tag = functionTree;
+      node.ContextMenu = treeNodeContextMenu;
+      rootNode.Nodes.Add(node);
+      foreach (IFunctionTree subTree in functionTree.SubTrees) {
+        CreateTree(node, subTree);
+      }
+    }
+
+    private void funTreeView_MouseUp(object sender, MouseEventArgs e) {
+      if (e.Button == MouseButtons.Right) {
+        // Select the clicked node
+        funTreeView.SelectedNode = funTreeView.GetNodeAt(e.X, e.Y);
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP/3.3/FunctionTreeView.resx
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/FunctionTreeView.resx	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/FunctionTreeView.resx	(revision 2222)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="treeNodeContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
Index: unk/sources/HeuristicLab.GP/3.3/FunctionView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/FunctionView.Designer.cs	(revision 2221)
+++ 	(revision )
@@ -1,198 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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;
-namespace HeuristicLab.GP {
-  partial class FunctionTreeView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      if(selectedVariable != null) {
-        selectedVariable.Value.Changed -= new EventHandler(selectedVariable_ValueChanged);
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();
-      this.funTreeView = new System.Windows.Forms.TreeView();
-      this.splitContainer = new System.Windows.Forms.SplitContainer();
-      this.variablesGroupBox = new System.Windows.Forms.GroupBox();
-      this.variablesSplitContainer = new System.Windows.Forms.SplitContainer();
-      this.variablesListBox = new System.Windows.Forms.ListBox();
-      this.label1 = new System.Windows.Forms.Label();
-      this.templateTextBox = new System.Windows.Forms.TextBox();
-      this.editButton = new System.Windows.Forms.Button();
-      this.treeNodeContextMenu = new System.Windows.Forms.ContextMenu();
-      this.splitContainer.Panel1.SuspendLayout();
-      this.splitContainer.Panel2.SuspendLayout();
-      this.splitContainer.SuspendLayout();
-      this.variablesGroupBox.SuspendLayout();
-      this.variablesSplitContainer.Panel1.SuspendLayout();
-      this.variablesSplitContainer.SuspendLayout();
-      this.SuspendLayout();
-      // 
-      // funTreeView
-      // 
-      this.funTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.funTreeView.HideSelection = false;
-      this.funTreeView.Location = new System.Drawing.Point(0, 0);
-      this.funTreeView.Name = "funTreeView";
-      this.funTreeView.Size = new System.Drawing.Size(182, 532);
-      this.funTreeView.TabIndex = 0;
-      this.funTreeView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.funTreeView_MouseUp);
-      this.funTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.functionTreeView_AfterSelect);
-      // 
-      // splitContainer
-      // 
-      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.splitContainer.Location = new System.Drawing.Point(0, 0);
-      this.splitContainer.Name = "splitContainer";
-      // 
-      // splitContainer.Panel1
-      // 
-      this.splitContainer.Panel1.Controls.Add(this.funTreeView);
-      // 
-      // splitContainer.Panel2
-      // 
-      this.splitContainer.Panel2.Controls.Add(this.variablesGroupBox);
-      this.splitContainer.Panel2.Controls.Add(this.label1);
-      this.splitContainer.Panel2.Controls.Add(this.templateTextBox);
-      this.splitContainer.Panel2.Controls.Add(this.editButton);
-      this.splitContainer.Size = new System.Drawing.Size(735, 532);
-      this.splitContainer.SplitterDistance = 182;
-      this.splitContainer.TabIndex = 1;
-      // 
-      // variablesGroupBox
-      // 
-      this.variablesGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.variablesGroupBox.Controls.Add(this.variablesSplitContainer);
-      this.variablesGroupBox.Location = new System.Drawing.Point(3, 31);
-      this.variablesGroupBox.Name = "variablesGroupBox";
-      this.variablesGroupBox.Size = new System.Drawing.Size(543, 498);
-      this.variablesGroupBox.TabIndex = 5;
-      this.variablesGroupBox.TabStop = false;
-      this.variablesGroupBox.Text = "Local variables";
-      // 
-      // variablesSplitContainer
-      // 
-      this.variablesSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.variablesSplitContainer.Location = new System.Drawing.Point(3, 16);
-      this.variablesSplitContainer.Name = "variablesSplitContainer";
-      // 
-      // variablesSplitContainer.Panel1
-      // 
-      this.variablesSplitContainer.Panel1.Controls.Add(this.variablesListBox);
-      this.variablesSplitContainer.Size = new System.Drawing.Size(537, 479);
-      this.variablesSplitContainer.SplitterDistance = 179;
-      this.variablesSplitContainer.TabIndex = 0;
-      // 
-      // variablesListBox
-      // 
-      this.variablesListBox.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.variablesListBox.FormattingEnabled = true;
-      this.variablesListBox.Location = new System.Drawing.Point(0, 0);
-      this.variablesListBox.Name = "variablesListBox";
-      this.variablesListBox.Size = new System.Drawing.Size(179, 472);
-      this.variablesListBox.TabIndex = 0;
-      this.variablesListBox.SelectedIndexChanged += new System.EventHandler(this.variablesListBox_SelectedIndexChanged);
-      // 
-      // label1
-      // 
-      this.label1.AutoSize = true;
-      this.label1.Location = new System.Drawing.Point(3, 10);
-      this.label1.Name = "label1";
-      this.label1.Size = new System.Drawing.Size(96, 13);
-      this.label1.TabIndex = 3;
-      this.label1.Text = "Function definition:";
-      // 
-      // templateTextBox
-      // 
-      this.templateTextBox.Location = new System.Drawing.Point(105, 7);
-      this.templateTextBox.Name = "templateTextBox";
-      this.templateTextBox.ReadOnly = true;
-      this.templateTextBox.Size = new System.Drawing.Size(190, 20);
-      this.templateTextBox.TabIndex = 2;
-      // 
-      // editButton
-      // 
-      this.editButton.Enabled = false;
-      this.editButton.Location = new System.Drawing.Point(301, 5);
-      this.editButton.Name = "editButton";
-      this.editButton.Size = new System.Drawing.Size(49, 23);
-      this.editButton.TabIndex = 1;
-      this.editButton.Text = "Edit...";
-      this.editButton.UseVisualStyleBackColor = true;
-      this.editButton.Click += new System.EventHandler(this.editButton_Click);
-      // 
-      // treeNodeContextMenu
-      // 
-      this.treeNodeContextMenu.Name = "treeNodeContextMenu";
-      // 
-      // FunctionTreeView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.splitContainer);
-      this.Name = "FunctionTreeView";
-      this.Size = new System.Drawing.Size(735, 532);
-      this.splitContainer.Panel1.ResumeLayout(false);
-      this.splitContainer.Panel2.ResumeLayout(false);
-      this.splitContainer.Panel2.PerformLayout();
-      this.splitContainer.ResumeLayout(false);
-      this.variablesGroupBox.ResumeLayout(false);
-      this.variablesSplitContainer.Panel1.ResumeLayout(false);
-      this.variablesSplitContainer.ResumeLayout(false);
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.TreeView funTreeView;
-    private System.Windows.Forms.SplitContainer splitContainer;
-    private System.Windows.Forms.TextBox templateTextBox;
-    private System.Windows.Forms.Button editButton;
-    private System.Windows.Forms.GroupBox variablesGroupBox;
-    private System.Windows.Forms.SplitContainer variablesSplitContainer;
-    private System.Windows.Forms.ListBox variablesListBox;
-    private System.Windows.Forms.Label label1;
-    private System.Windows.Forms.ContextMenu treeNodeContextMenu;
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/FunctionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/FunctionView.cs	(revision 2221)
+++ 	(revision )
@@ -1,188 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
-using HeuristicLab.Core;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Data;
-
-namespace HeuristicLab.GP {
-  public partial class FunctionTreeView : ViewBase {
-    private IFunctionTree functionTree;
-
-    private IFunctionTree selectedBranch;
-    private IVariable selectedVariable;
-    private IFunctionTreeNameGenerator nameGenerator;
-    private IFunctionTreeNameGenerator[] allNameGenerators;
-    private MenuItem representationsMenu;
-
-    public FunctionTreeView() {
-      nameGenerator = new DefaultFunctionTreeNameGenerator();
-      InitializeComponent();
-
-      DiscoveryService discoveryService = new DiscoveryService();
-      allNameGenerators = discoveryService.GetInstances<IFunctionTreeNameGenerator>();
-      representationsMenu = new MenuItem();
-      representationsMenu.Text = "Tree representation";
-      representationsMenu.Name = "Tree representation";
-      foreach (IFunctionTreeNameGenerator generator in allNameGenerators) {
-        MenuItem mi = new MenuItem(generator.Name, MakeNameGeneratorDelegate(generator), Shortcut.None);
-        if (generator is DefaultFunctionTreeNameGenerator) mi.Checked = true;
-        else mi.Checked = false;
-        mi.Tag = generator;
-        representationsMenu.MenuItems.Add(mi);
-      }
-    }
-
-    public FunctionTreeView(IFunctionTree functionTree)
-      : this() {
-      this.functionTree = functionTree;
-      Refresh();
-    }
-
-    protected override void UpdateControls() {
-      funTreeView.Nodes.Clear();
-      TreeNode rootNode = new TreeNode();
-      rootNode.Name = functionTree.Function.Name;
-      rootNode.Text = nameGenerator.GetName(functionTree);
-      rootNode.Tag = functionTree;
-      treeNodeContextMenu.MenuItems.Clear();
-      treeNodeContextMenu.MenuItems.Add(representationsMenu);
-      DiscoveryService discoveryService = new DiscoveryService();
-      IFunctionTreeExporter[] exporters = discoveryService.GetInstances<IFunctionTreeExporter>();
-      foreach (IFunctionTreeExporter exporter in exporters) {
-        string result;
-        // register a menu item for the exporter
-        MenuItem item = new MenuItem("Copy to clip-board (" + exporter.Name + ")",
-          MakeExporterDelegate(exporter), Shortcut.None);
-        // try to export the whole tree 
-        if (exporter.TryExport(functionTree, out result)) {
-          // if it worked enable the context-menu item
-          item.Enabled = true;
-        } else {
-          item.Enabled = false;
-        }
-        treeNodeContextMenu.MenuItems.Add(item);
-      }
-      rootNode.ContextMenu = treeNodeContextMenu;
-      funTreeView.Nodes.Add(rootNode);
-
-      foreach (IFunctionTree subTree in functionTree.SubTrees) {
-        CreateTree(rootNode, subTree);
-      }
-      funTreeView.ExpandAll();
-    }
-
-    private EventHandler MakeNameGeneratorDelegate(IFunctionTreeNameGenerator generator) {
-      return delegate(object source, EventArgs args) {
-        IFunctionTreeNameGenerator g = (IFunctionTreeNameGenerator)((MenuItem)source).Tag;
-        this.nameGenerator = g;
-        foreach (MenuItem otherMenuItem in representationsMenu.MenuItems) otherMenuItem.Checked = false;
-        ((MenuItem)source).Checked = true;
-        UpdateControls();
-      };
-    }
-
-    private EventHandler MakeExporterDelegate(IFunctionTreeExporter exporter) {
-      return delegate(object source, EventArgs args) {
-        TreeNode node = funTreeView.SelectedNode;
-        if (node == null || node.Tag == null) return;
-        Clipboard.SetText(exporter.Export((IFunctionTree)node.Tag));
-      };
-    }
-
-    private void CreateTree(TreeNode rootNode, IFunctionTree functionTree) {
-      TreeNode node = new TreeNode();
-      node.Name = functionTree.Function.Name;
-      node.Text = nameGenerator.GetName(functionTree);
-      node.Tag = functionTree;
-      node.ContextMenu = treeNodeContextMenu;
-      rootNode.Nodes.Add(node);
-      foreach (IFunctionTree subTree in functionTree.SubTrees) {
-        CreateTree(node, subTree);
-      }
-    }
-
-    private void functionTreeView_AfterSelect(object sender, TreeViewEventArgs e) {
-      variablesListBox.Items.Clear();
-      variablesSplitContainer.Panel2.Controls.Clear();
-      templateTextBox.Clear();
-      editButton.Enabled = false;
-      if (funTreeView.SelectedNode != null && funTreeView.SelectedNode.Tag != null) {
-        IFunctionTree selectedBranch = (IFunctionTree)funTreeView.SelectedNode.Tag;
-        UpdateVariablesList(selectedBranch);
-        templateTextBox.Text = nameGenerator.GetName(selectedBranch);
-        this.selectedBranch = selectedBranch;
-        editButton.Enabled = true;
-      }
-    }
-
-    private void UpdateVariablesList(IFunctionTree functionTree) {
-      foreach (IVariable variable in functionTree.LocalVariables) {
-        variablesListBox.Items.Add(variable.Name);
-      }
-    }
-
-    private void variablesListBox_SelectedIndexChanged(object sender, EventArgs e) {
-      // in case we had an event-handler registered for a different variable => unregister the event-handler
-      if (selectedVariable != null) {
-        selectedVariable.Value.Changed -= new EventHandler(selectedVariable_ValueChanged);
-      }
-      if (variablesListBox.SelectedItem != null) {
-        string selectedVariableName = (string)variablesListBox.SelectedItem;
-        selectedVariable = selectedBranch.GetLocalVariable(selectedVariableName);
-        variablesSplitContainer.Panel2.Controls.Clear();
-        Control editor = (Control)selectedVariable.CreateView();
-        variablesSplitContainer.Panel2.Controls.Add(editor);
-        editor.Dock = DockStyle.Fill;
-        // register an event handler that updates the treenode when the value of the variable is changed by the user
-        selectedVariable.Value.Changed += new EventHandler(selectedVariable_ValueChanged);
-      } else {
-        variablesSplitContainer.Panel2.Controls.Clear();
-      }
-    }
-
-    void selectedVariable_ValueChanged(object sender, EventArgs e) {
-      if (funTreeView.SelectedNode != null && funTreeView.SelectedNode.Tag != null) {
-        TreeNode node = funTreeView.SelectedNode;
-        node.Text = nameGenerator.GetName(functionTree);
-      }
-    }
-
-    protected virtual void editButton_Click(object sender, EventArgs e) {
-      PluginManager.ControlManager.ShowControl(selectedBranch.Function.CreateView());
-    }
-
-    private void funTreeView_MouseUp(object sender, MouseEventArgs e) {
-      if (e.Button == MouseButtons.Right) {
-        // Select the clicked node
-        funTreeView.SelectedNode = funTreeView.GetNodeAt(e.X, e.Y);
-      }
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/FunctionView.resx
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/FunctionView.resx	(revision 2221)
+++ 	(revision )
@@ -1,126 +1,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <metadata name="representationContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>180, 17</value>
-  </metadata>
-  <metadata name="treeNodeContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
-</root>
Index: unk/sources/HeuristicLab.GP/3.3/GPOperatorGroup.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/GPOperatorGroup.cs	(revision 2221)
+++ 	(revision )
@@ -1,228 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Operators;
-using HeuristicLab.Data;
-using HeuristicLab.Random;
-using HeuristicLab.Constraints;
-
-namespace HeuristicLab.GP {
-  public class GPOperatorGroup : OperatorGroup {
-    private Dictionary<IOperator, int> minTreeHeight = new Dictionary<IOperator, int>();
-    private Dictionary<IOperator, int> minTreeSize = new Dictionary<IOperator, int>();
-    private SubOperatorsConstraintAnalyser constraintAnalyser = new SubOperatorsConstraintAnalyser();
-
-    public GPOperatorGroup()
-      : base() {
-    }
-
-    public override void AddOperator(IOperator op) {
-      base.AddOperator(op);
-      var localVariableInfos = op.VariableInfos.Where(f => f.Local);
-
-      if(op.GetVariable(GPOperatorLibrary.MIN_TREE_HEIGHT) == null) {
-        op.AddVariable(new Variable(GPOperatorLibrary.MIN_TREE_HEIGHT, new IntData(-1)));
-      }
-      if(op.GetVariable(GPOperatorLibrary.MIN_TREE_SIZE) == null) {
-        op.AddVariable(new Variable(GPOperatorLibrary.MIN_TREE_SIZE, new IntData(-1)));
-      }
-      if(op.GetVariable(GPOperatorLibrary.TICKETS) == null) {
-        op.AddVariable(new Variable(GPOperatorLibrary.TICKETS, new DoubleData(1.0)));
-      }
-      foreach(IConstraint c in op.Constraints) {
-        if(c is SubOperatorTypeConstraint || c is AllSubOperatorsTypeConstraint) c.Changed += new EventHandler(UpdateTreeBounds);
-      }
-      RecalculateMinimalTreeBounds();
-      OnOperatorAdded(op);
-    }
-
-    void UpdateTreeBounds(object sender, EventArgs e) {
-      RecalculateMinimalTreeBounds();
-    }
-
-    private void RecalculateMinimalTreeBounds() {
-      minTreeHeight.Clear();
-      minTreeSize.Clear();
-      constraintAnalyser.AllPossibleOperators = Operators;
-
-      foreach(IOperator op in Operators) {
-        ((IntData)op.GetVariable(GPOperatorLibrary.MIN_TREE_HEIGHT).Value).Data = RecalculateMinimalTreeHeight(op);
-        ((IntData)op.GetVariable(GPOperatorLibrary.MIN_TREE_SIZE).Value).Data = RecalculateMinimalTreeSize(op);
-      }
-    }
-
-    private int RecalculateMinimalTreeSize(IOperator op) {
-      // check for memoized value
-      if(minTreeSize.ContainsKey(op)) {
-        return minTreeSize[op];
-      }
-
-      int minArity;
-      int maxArity;
-      GetMinMaxArity(op, out minArity, out maxArity);
-      // no suboperators possible => minimalTreeSize == 1 (the current node)
-      if(minArity == 0 && maxArity == 0) {
-        minTreeSize[op] = 1;
-        return 1;
-      }
-
-      // when suboperators are necessary we have to find the smallest possible tree (recursively)
-      // the minimal size of the parent is 1 + the sum of the minimal sizes of all subtrees
-      int subTreeSizeSum = 0;
-
-      // mark the currently processed operator to prevent infinite recursions and stack overflow
-      minTreeSize[op] = 9999;
-      for(int i = 0; i < minArity; i++) {
-        // calculate the minTreeSize of all allowed sub-operators 
-        // if the list of allowed suboperators is empty because the operator needs suboperators 
-        // but there are no valid suboperators defined in the current group then we just use an impossible 
-        // tree size here to indicate that there was a problem.
-        // usually as more operators are added to the group the problem will be corrected (by adding the missing operator).
-        // however if the missing operator is never added the high min tree size here has the effect that this operator
-        // will not be included in generated subtrees because the resulting size would always be higher than a reasonably set 
-        // maximal tree size.
-        int minSubTreeSize = constraintAnalyser.GetAllowedOperators(op, i).Select(subOp => RecalculateMinimalTreeSize(subOp))
-          .Concat(Enumerable.Repeat(9999, 1)).Min();
-        subTreeSizeSum += minSubTreeSize;
-      }
-
-      minTreeSize[op] = subTreeSizeSum + 1;
-      return subTreeSizeSum + 1;
-    }
-
-    private int RecalculateMinimalTreeHeight(IOperator op) {
-      // check for memoized value
-      if(minTreeHeight.ContainsKey(op)) {
-        return minTreeHeight[op];
-      }
-
-      int minArity;
-      int maxArity;
-      GetMinMaxArity(op, out minArity, out maxArity);
-      // no suboperators possible => minimalTreeHeight == 1
-      if(minArity == 0 && maxArity == 0) {
-        minTreeHeight[op] = 1;
-        return 1;
-      }
-
-      // when suboperators are necessary we have to find the smallest possible tree (recursively)
-      // the minimal height of the parent is 1 + the height of the largest subtree
-      int maxSubTreeHeight = 0;
-
-      // mark the currently processed operator to prevent infinite recursions leading to stack overflow
-      minTreeHeight[op] = 9999;
-      for(int i = 0; i < minArity; i++) {
-        // calculate the minTreeHeight of all possible sub-operators.
-        // use the smallest possible subTree as lower bound for the subTreeHeight.
-        // if the list of allowed suboperators is empty because the operator needs suboperators 
-        // but there are no valid suboperators defined in the current group then we use an impossible tree height
-        // to indicate that there was a problem.
-        // usually as more operators are added to the group the problem will be corrected (by adding the missing operator).
-        // however if the missing operator is never added the high min tree height here has the effect that this operator
-        // will not be included in generated subtrees because the resulting (virtual) height would always be higher than a reasonably set 
-        // maximal tree height.
-        int minSubTreeHeight = constraintAnalyser.GetAllowedOperators(op, i).Select(subOp => RecalculateMinimalTreeHeight(subOp))
-          .Concat(Enumerable.Repeat(9999, 1)).Min();
-
-        // if the smallest height of this subtree is larger than all other subtrees before we have to update the min height of the parent
-        if(minSubTreeHeight > maxSubTreeHeight) {
-          maxSubTreeHeight = minSubTreeHeight;
-        }
-      }
-
-      minTreeHeight[op] = maxSubTreeHeight + 1;
-      return maxSubTreeHeight + 1;
-    }
-
-    private void GetMinMaxArity(IOperator op, out int minArity, out int maxArity) {
-      foreach(IConstraint constraint in op.Constraints) {
-        NumberOfSubOperatorsConstraint theConstraint = constraint as NumberOfSubOperatorsConstraint;
-        if(theConstraint != null) {
-          minArity = theConstraint.MinOperators.Data;
-          maxArity = theConstraint.MaxOperators.Data;
-          return;
-        }
-      }
-      // the default arity is 2
-      minArity = 2;
-      maxArity = 2;
-    }
-
-    public override void AddSubGroup(IOperatorGroup group) {
-      throw new NotSupportedException();
-    }
-
-    public override void RemoveOperator(IOperator op) {
-      base.RemoveOperator(op);
-      op.RemoveVariable(GPOperatorLibrary.MIN_TREE_SIZE);
-      op.RemoveVariable(GPOperatorLibrary.MIN_TREE_HEIGHT);
-      op.RemoveVariable(GPOperatorLibrary.TICKETS);
-      foreach(IConstraint c in op.Constraints) {
-        if(c is SubOperatorTypeConstraint || c is AllSubOperatorsTypeConstraint) c.Changed -= new EventHandler(UpdateTreeBounds);
-      }
-
-      // remove the operator from the allowed sub-functions of the remaining operators
-      foreach(IOperator o in Operators) {
-        if(o != op) {
-          foreach(IConstraint c in o.Constraints) {
-            if(c is SubOperatorTypeConstraint) {
-              ((SubOperatorTypeConstraint)c).RemoveOperator(op);
-            } else if(c is AllSubOperatorsTypeConstraint) {
-              ((AllSubOperatorsTypeConstraint)c).RemoveOperator(op);
-            }
-          }
-        }
-      }
-      OnOperatorRemoved(op);
-    }
-
-    public override void RemoveSubGroup(IOperatorGroup group) {
-      throw new NotSupportedException();
-    }
-
-    public event EventHandler OperatorAdded;
-    public event EventHandler OperatorRemoved;
-
-    protected virtual void OnOperatorAdded(IOperator op) {
-      if(OperatorAdded != null) {
-        OperatorAdded(this, new OperatorEventArgs(op));
-      }
-    }
-    protected virtual void OnOperatorRemoved(IOperator op) {
-      if(OperatorRemoved != null) {
-        OperatorRemoved(this, new OperatorEventArgs(op));
-      }
-    }
-  }
-
-  internal class OperatorEventArgs : EventArgs {
-    public IOperator op;
-
-    public OperatorEventArgs(IOperator op) {
-      this.op = op;
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/GPOperatorLibrary.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/GPOperatorLibrary.cs	(revision 2221)
+++ 	(revision )
@@ -1,86 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using System.Xml;
-
-namespace HeuristicLab.GP {
-  public class GPOperatorLibrary : ItemBase, IOperatorLibrary, IEditable  {
-    // constants for variable names
-    internal const string MIN_TREE_HEIGHT = "MinTreeHeight";
-    internal const string MIN_TREE_SIZE = "MinTreeSize";
-    internal const string TICKETS = "Tickets";
-
-    private GPOperatorGroup group;
-
-    public GPOperatorGroup GPOperatorGroup {
-      get { return group; }
-    }
-    #region IOperatorLibrary Members
-
-    public IOperatorGroup Group {
-      get { return group; }
-    }
-
-    #endregion
-
-
-    public GPOperatorLibrary()
-      : base() {
-      group = new GPOperatorGroup();
-    }
-
-    public override IView CreateView() {
-      return new GPOperatorLibraryEditor(this);
-    }
-
-    public override object Clone(IDictionary<Guid, object> clonedObjects) {
-      GPOperatorLibrary clone = (GPOperatorLibrary)base.Clone(clonedObjects);
-      clone.group = (GPOperatorGroup)group.Clone(clonedObjects);
-      return clone;
-    }
-
-    #region persistence
-    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
-      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
-      node.AppendChild(PersistenceManager.Persist("Group", group, document, persistedObjects));
-      return node;
-    }
-
-    public override void Populate(System.Xml.XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
-      base.Populate(node, restoredObjects);
-      group = (GPOperatorGroup) PersistenceManager.Restore(node.SelectSingleNode("Group"), restoredObjects);
-    }
-    #endregion
-
-    #region IEditable Members
-
-    public IEditor CreateEditor() {
-      return new GPOperatorLibraryEditor(this);
-    }
-
-    #endregion
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/GPOperatorLibraryEditor.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/GPOperatorLibraryEditor.Designer.cs	(revision 2221)
+++ 	(revision )
@@ -1,238 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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
-
-namespace HeuristicLab.GP {
-  partial class GPOperatorLibraryEditor {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if(disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.operatorLibraryEditor = new HeuristicLab.Core.OperatorLibraryEditor();
-      this.tabControl = new System.Windows.Forms.TabControl();
-      this.operatorLibraryTabPage = new System.Windows.Forms.TabPage();
-      this.initializationTabPage = new System.Windows.Forms.TabPage();
-      this.initSplitContainer = new System.Windows.Forms.SplitContainer();
-      this.initListView = new System.Windows.Forms.ListView();
-      this.initVariableView = new HeuristicLab.Core.VariableView();
-      this.mutationTabPage = new System.Windows.Forms.TabPage();
-      this.mutationSplitContainer = new System.Windows.Forms.SplitContainer();
-      this.mutationListView = new System.Windows.Forms.ListView();
-      this.mutationVariableView = new HeuristicLab.Core.VariableView();
-      this.tabControl.SuspendLayout();
-      this.operatorLibraryTabPage.SuspendLayout();
-      this.initializationTabPage.SuspendLayout();
-      this.initSplitContainer.Panel1.SuspendLayout();
-      this.initSplitContainer.Panel2.SuspendLayout();
-      this.initSplitContainer.SuspendLayout();
-      this.mutationTabPage.SuspendLayout();
-      this.mutationSplitContainer.Panel1.SuspendLayout();
-      this.mutationSplitContainer.Panel2.SuspendLayout();
-      this.mutationSplitContainer.SuspendLayout();
-      this.SuspendLayout();
-      // 
-      // operatorLibraryEditor
-      // 
-      this.operatorLibraryEditor.Caption = "Operator Library";
-      this.operatorLibraryEditor.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.operatorLibraryEditor.Filename = null;
-      this.operatorLibraryEditor.Location = new System.Drawing.Point(3, 3);
-      this.operatorLibraryEditor.Name = "operatorLibraryEditor";
-      this.operatorLibraryEditor.OperatorLibrary = null;
-      this.operatorLibraryEditor.Size = new System.Drawing.Size(663, 529);
-      this.operatorLibraryEditor.TabIndex = 0;
-      // 
-      // tabControl
-      // 
-      this.tabControl.Controls.Add(this.operatorLibraryTabPage);
-      this.tabControl.Controls.Add(this.initializationTabPage);
-      this.tabControl.Controls.Add(this.mutationTabPage);
-      this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.tabControl.Location = new System.Drawing.Point(0, 0);
-      this.tabControl.Name = "tabControl";
-      this.tabControl.SelectedIndex = 0;
-      this.tabControl.Size = new System.Drawing.Size(677, 561);
-      this.tabControl.TabIndex = 1;
-      // 
-      // operatorLibraryTabPage
-      // 
-      this.operatorLibraryTabPage.Controls.Add(this.operatorLibraryEditor);
-      this.operatorLibraryTabPage.Location = new System.Drawing.Point(4, 22);
-      this.operatorLibraryTabPage.Name = "operatorLibraryTabPage";
-      this.operatorLibraryTabPage.Padding = new System.Windows.Forms.Padding(3);
-      this.operatorLibraryTabPage.Size = new System.Drawing.Size(669, 535);
-      this.operatorLibraryTabPage.TabIndex = 0;
-      this.operatorLibraryTabPage.Text = "Operator Library";
-      this.operatorLibraryTabPage.UseVisualStyleBackColor = true;
-      // 
-      // initializationTabPage
-      // 
-      this.initializationTabPage.Controls.Add(this.initSplitContainer);
-      this.initializationTabPage.Location = new System.Drawing.Point(4, 22);
-      this.initializationTabPage.Name = "initializationTabPage";
-      this.initializationTabPage.Padding = new System.Windows.Forms.Padding(3);
-      this.initializationTabPage.Size = new System.Drawing.Size(669, 535);
-      this.initializationTabPage.TabIndex = 1;
-      this.initializationTabPage.Text = "Initialization";
-      this.initializationTabPage.UseVisualStyleBackColor = true;
-      // 
-      // initSplitContainer
-      // 
-      this.initSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.initSplitContainer.Location = new System.Drawing.Point(3, 3);
-      this.initSplitContainer.Name = "initSplitContainer";
-      // 
-      // initSplitContainer.Panel1
-      // 
-      this.initSplitContainer.Panel1.Controls.Add(this.initListView);
-      // 
-      // initSplitContainer.Panel2
-      // 
-      this.initSplitContainer.Panel2.Controls.Add(this.initVariableView);
-      this.initSplitContainer.Size = new System.Drawing.Size(663, 529);
-      this.initSplitContainer.SplitterDistance = 221;
-      this.initSplitContainer.TabIndex = 0;
-      // 
-      // initListView
-      // 
-      this.initListView.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.initListView.Location = new System.Drawing.Point(0, 0);
-      this.initListView.Name = "initListView";
-      this.initListView.Size = new System.Drawing.Size(221, 529);
-      this.initListView.TabIndex = 0;
-      this.initListView.UseCompatibleStateImageBehavior = false;
-      this.initListView.View = System.Windows.Forms.View.List;
-      this.initListView.SelectedIndexChanged += new System.EventHandler(this.initListView_SelectedIndexChanged);
-      // 
-      // initVariableView
-      // 
-      this.initVariableView.Caption = "Variable";
-      this.initVariableView.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.initVariableView.Location = new System.Drawing.Point(0, 0);
-      this.initVariableView.Name = "initVariableView";
-      this.initVariableView.Size = new System.Drawing.Size(438, 529);
-      this.initVariableView.TabIndex = 0;
-      this.initVariableView.Variable = null;
-      // 
-      // mutationTabPage
-      // 
-      this.mutationTabPage.Controls.Add(this.mutationSplitContainer);
-      this.mutationTabPage.Location = new System.Drawing.Point(4, 22);
-      this.mutationTabPage.Name = "mutationTabPage";
-      this.mutationTabPage.Padding = new System.Windows.Forms.Padding(3);
-      this.mutationTabPage.Size = new System.Drawing.Size(669, 535);
-      this.mutationTabPage.TabIndex = 2;
-      this.mutationTabPage.Text = "Mutation";
-      this.mutationTabPage.UseVisualStyleBackColor = true;
-      // 
-      // mutationSplitContainer
-      // 
-      this.mutationSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.mutationSplitContainer.Location = new System.Drawing.Point(3, 3);
-      this.mutationSplitContainer.Name = "mutationSplitContainer";
-      // 
-      // mutationSplitContainer.Panel1
-      // 
-      this.mutationSplitContainer.Panel1.Controls.Add(this.mutationListView);
-      // 
-      // mutationSplitContainer.Panel2
-      // 
-      this.mutationSplitContainer.Panel2.Controls.Add(this.mutationVariableView);
-      this.mutationSplitContainer.Size = new System.Drawing.Size(663, 529);
-      this.mutationSplitContainer.SplitterDistance = 221;
-      this.mutationSplitContainer.TabIndex = 0;
-      // 
-      // mutationListView
-      // 
-      this.mutationListView.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.mutationListView.Location = new System.Drawing.Point(0, 0);
-      this.mutationListView.MultiSelect = false;
-      this.mutationListView.Name = "mutationListView";
-      this.mutationListView.Size = new System.Drawing.Size(221, 529);
-      this.mutationListView.TabIndex = 0;
-      this.mutationListView.UseCompatibleStateImageBehavior = false;
-      this.mutationListView.View = System.Windows.Forms.View.List;
-      this.mutationListView.SelectedIndexChanged += new System.EventHandler(this.mutationListView_SelectedIndexChanged);
-      // 
-      // mutationVariableView
-      // 
-      this.mutationVariableView.Caption = "Variable";
-      this.mutationVariableView.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.mutationVariableView.Location = new System.Drawing.Point(0, 0);
-      this.mutationVariableView.Name = "mutationVariableView";
-      this.mutationVariableView.Size = new System.Drawing.Size(438, 529);
-      this.mutationVariableView.TabIndex = 0;
-      this.mutationVariableView.Variable = null;
-      // 
-      // GPOperatorLibraryEditor
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.tabControl);
-      this.Name = "GPOperatorLibraryEditor";
-      this.Size = new System.Drawing.Size(677, 561);
-      this.tabControl.ResumeLayout(false);
-      this.operatorLibraryTabPage.ResumeLayout(false);
-      this.initializationTabPage.ResumeLayout(false);
-      this.initSplitContainer.Panel1.ResumeLayout(false);
-      this.initSplitContainer.Panel2.ResumeLayout(false);
-      this.initSplitContainer.ResumeLayout(false);
-      this.mutationTabPage.ResumeLayout(false);
-      this.mutationSplitContainer.Panel1.ResumeLayout(false);
-      this.mutationSplitContainer.Panel2.ResumeLayout(false);
-      this.mutationSplitContainer.ResumeLayout(false);
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-    private HeuristicLab.Core.OperatorLibraryEditor operatorLibraryEditor;
-    private System.Windows.Forms.TabControl tabControl;
-    private System.Windows.Forms.TabPage operatorLibraryTabPage;
-    private System.Windows.Forms.TabPage initializationTabPage;
-    private System.Windows.Forms.TabPage mutationTabPage;
-    private System.Windows.Forms.SplitContainer initSplitContainer;
-    private System.Windows.Forms.SplitContainer mutationSplitContainer;
-    private HeuristicLab.Core.VariableView initVariableView;
-    private HeuristicLab.Core.VariableView mutationVariableView;
-    private System.Windows.Forms.ListView initListView;
-    private System.Windows.Forms.ListView mutationListView;
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/GPOperatorLibraryEditor.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/GPOperatorLibraryEditor.cs	(revision 2221)
+++ 	(revision )
@@ -1,153 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
-using HeuristicLab.Core;
-using System.Diagnostics;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.GP {
-  public partial class GPOperatorLibraryEditor : EditorBase {
-    public IOperatorLibrary OperatorLibrary {
-      get { return (IOperatorLibrary)Item; }
-      set { base.Item = value; }
-    }
-
-    public GPOperatorLibraryEditor(GPOperatorLibrary library)
-      : base() {
-      InitializeComponent();
-      OperatorLibrary = library;
-      operatorLibraryEditor.OperatorLibrary = library;
-
-      library.GPOperatorGroup.OperatorAdded += new EventHandler(GPOperatorLibraryView_OperatorAdded);
-      library.GPOperatorGroup.OperatorRemoved += new EventHandler(GPOperatorGroup_OperatorRemoved);
-
-      mutationVariableView.Enabled = false;
-      initVariableView.Enabled = false;
-
-      foreach(IOperator op in library.Group.Operators) {
-        if(op.GetVariable(FunctionBase.MANIPULATION) != null) {
-          ListViewItem item = new ListViewItem();
-          item.Text = op.Name;
-          item.Name = op.Name;
-          item.Tag = op;
-          mutationListView.Items.Add(item);
-        }
-        if(op.GetVariable(FunctionBase.INITIALIZATION) != null) {
-          ListViewItem item = new ListViewItem();
-          item.Name = op.Name;
-          item.Text = op.Name;
-          item.Tag = op;
-          initListView.Items.Add(item);
-        }
-      }
-    }
-
-
-    private void GPOperatorLibraryView_OperatorAdded(object sender, EventArgs e) {
-      IOperator op = ((OperatorEventArgs)e).op;
-      if(op.GetVariable(FunctionBase.MANIPULATION) != null) {
-        ListViewItem operatorMutationItem = new ListViewItem();
-        operatorMutationItem.Name = op.Name;
-        operatorMutationItem.Text = op.Name;
-        operatorMutationItem.Tag = op;
-        mutationListView.Items.Add(operatorMutationItem);
-      }
-
-      if(op.GetVariable(FunctionBase.INITIALIZATION) != null) {
-        ListViewItem operatorInitItem = new ListViewItem();
-        operatorInitItem.Name = op.Name;
-        operatorInitItem.Text = op.Name;
-        operatorInitItem.Tag = op;
-        initListView.Items.Add(operatorInitItem);
-      }
-
-      op.NameChanged += new EventHandler(op_NameChanged);
-      Refresh();
-    }
-
-    private void op_NameChanged(object sender, EventArgs e) {
-      IOperator srcOp = (IOperator)sender;
-      foreach(ListViewItem item in mutationListView.Items) {
-        if(item.Tag == srcOp) {
-          item.Name = srcOp.Name;
-          item.Text = srcOp.Name;
-          break;
-        }
-      }
-      foreach(ListViewItem item in initListView.Items) {
-        if(item.Tag == srcOp) {
-          item.Name = srcOp.Name;
-          item.Text = srcOp.Name;
-          break;
-        }
-      }
-    }
-
-
-    private void GPOperatorGroup_OperatorRemoved(object sender, EventArgs e) {
-      IOperator op = ((OperatorEventArgs)e).op;
-
-      foreach(ListViewItem item in mutationListView.Items) {
-        if(item.Tag == op) {
-          mutationListView.Items.Remove(item);
-          break;
-        }
-      }
-
-      foreach(ListViewItem item in initListView.Items) {
-        if(item.Tag == op) {
-          initListView.Items.Remove(item);
-          break;
-        }
-      }
-    }
-
-    private void mutationListView_SelectedIndexChanged(object sender, EventArgs e) {
-      if(mutationListView.SelectedItems.Count>0 && mutationListView.SelectedItems[0].Tag != null) {
-        IVariable variable = ((IOperator)mutationListView.SelectedItems[0].Tag).GetVariable(FunctionBase.MANIPULATION);
-        mutationVariableView.Enabled = true;
-        mutationVariableView.Variable = variable;
-      } else {
-        mutationVariableView.Enabled = false;
-      }
-    }
-
-    private void initListView_SelectedIndexChanged(object sender, EventArgs e) {
-      if(initListView.SelectedItems.Count>0 && initListView.SelectedItems[0].Tag != null) {
-        IVariable variable = ((IOperator)initListView.SelectedItems[0].Tag).GetVariable(FunctionBase.INITIALIZATION);
-        initVariableView.Enabled = true;
-        initVariableView.Variable = variable;
-      } else {
-        initVariableView.Enabled = false;
-      }
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/GPOperatorLibraryEditor.resx
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/GPOperatorLibraryEditor.resx	(revision 2221)
+++ 	(revision )
@@ -1,120 +1,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>
Index: /trunk/sources/HeuristicLab.GP/3.3/GeneticProgrammingModel.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/GeneticProgrammingModel.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/GeneticProgrammingModel.cs	(revision 2222)
@@ -0,0 +1,101 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Collections.Generic;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
+using System.Xml;
+
+namespace HeuristicLab.GP {
+  public class GeneticProgrammingModel : ItemBase, IGeneticProgrammingModel {
+    private IFunctionTree functionTree;
+    public IFunctionTree FunctionTree {
+      get {
+        return functionTree;
+      }
+      set {
+        functionTree = value;
+        Size = functionTree.GetSize();
+        Height = functionTree.GetHeight();
+      }
+    }
+    public int Size { get; set; }
+    public int Height { get; set; }
+
+    public GeneticProgrammingModel()
+      : base() {
+    }
+
+    public GeneticProgrammingModel(IFunctionTree tree) : base() {
+      FunctionTree = tree;
+    }
+
+    public override object Clone(IDictionary<Guid, object> clonedObjects) {
+      GeneticProgrammingModel clone = (GeneticProgrammingModel)base.Clone(clonedObjects);
+      clone.FunctionTree = (IFunctionTree)FunctionTree.Clone();
+      return clone;
+    }
+
+    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
+      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
+      PersistTree(node, document, persistedObjects, FunctionTree);
+      return node;
+    }
+
+    private void PersistTree(XmlNode node, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects, IFunctionTree tree) {
+      XmlNode fNode = PersistenceManager.Persist(tree.Function, document, persistedObjects);
+      XmlAttribute subTreesAttr = document.CreateAttribute("Args");
+      subTreesAttr.Value = XmlConvert.ToString(tree.SubTrees.Count);
+      fNode.Attributes.Append(subTreesAttr);
+      node.AppendChild(fNode);
+      XmlNode treeNode = tree.GetXmlNode("Data", document, persistedObjects);
+      if (treeNode != null) fNode.AppendChild(treeNode);
+      foreach (IFunctionTree subTree in tree.SubTrees) {
+        PersistTree(node, document, persistedObjects, subTree);
+      }
+    }
+
+    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
+      base.Populate(node, restoredObjects);
+      int nodeIndex = 0;
+      FunctionTree = RestoreTree(node, ref nodeIndex, restoredObjects);
+    }
+
+    private IFunctionTree RestoreTree(XmlNode node, ref int nodeIndex, IDictionary<Guid, IStorable> restoredObjects) {
+      XmlNode fNode = node.ChildNodes[nodeIndex];
+      int subTrees = XmlConvert.ToInt32(fNode.Attributes["Args"].Value);
+      IFunction f = (IFunction)PersistenceManager.Restore(fNode, restoredObjects);
+      IFunctionTree tree = f.GetTreeNode();
+      if(fNode.ChildNodes.Count>0) tree.Populate(fNode.ChildNodes[0], restoredObjects);
+      nodeIndex++;
+      for (int i = 0; i < subTrees; i++) {
+        tree.AddSubTree(RestoreTree(node, ref nodeIndex, restoredObjects));
+      }
+      return tree;
+    }
+
+    public override IView CreateView() {
+      return new FunctionTreeView(this.FunctionTree);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.GP/3.3/HeuristicLab.GP-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/HeuristicLab.GP-3.3.csproj	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP/3.3/HeuristicLab.GP-3.3.csproj	(revision 2222)
@@ -82,69 +82,39 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="BakedFunctionTree.cs" />
-    <Compile Include="TrainingWindowSlider.cs" />
-    <Compile Include="DefaultFunctionTreeNameGenerator.cs" />
-    <Compile Include="EqualiserController.cs" />
-    <Compile Include="Logging\TreeArityAnalyser.cs" />
-    <Compile Include="OffspringEqualiser.cs" />
-    <Compile Include="Recombination\SizeConstrictedGPCrossoverBase.cs" />
-    <Compile Include="Recombination\GPCrossoverBase.cs" />
-    <Compile Include="Recombination\UniformCrossover.cs" />
-    <Compile Include="UnknownFunctionException.cs" />
-    <Compile Include="IFunctionTreeNameGenerator.cs" />
-    <Compile Include="IFunctionTreeExporter.cs" />
-    <Compile Include="FunctionBase.cs" />
-    <Compile Include="FunctionView.cs">
+    <Compile Include="BaseClasses\BinaryFunction.cs" />
+    <Compile Include="BaseClasses\FunctionLibraryInjectorBase.cs" />
+    <Compile Include="BaseClasses\TerminalTreeNode.cs" />
+    <Compile Include="BaseClasses\FunctionBase.cs" />
+    <Compile Include="BaseClasses\FunctionTreeBase.cs" />
+    <Compile Include="BaseClasses\Terminal.cs" />
+    <Compile Include="BaseClasses\UnaryFunction.cs" />
+    <Compile Include="FunctionLibrary.cs" />
+    <Compile Include="FunctionLibraryEditor.cs">
       <SubType>UserControl</SubType>
     </Compile>
-    <Compile Include="FunctionView.Designer.cs">
-      <DependentUpon>FunctionView.cs</DependentUpon>
+    <Compile Include="FunctionLibraryEditor.Designer.cs">
+      <DependentUpon>FunctionLibraryEditor.cs</DependentUpon>
     </Compile>
-    <Compile Include="GPOperatorGroup.cs" />
-    <Compile Include="GPOperatorLibrary.cs" />
-    <Compile Include="GPOperatorLibraryEditor.cs">
+    <Compile Include="FunctionTreeView.cs">
       <SubType>UserControl</SubType>
     </Compile>
-    <Compile Include="GPOperatorLibraryEditor.Designer.cs">
-      <DependentUpon>GPOperatorLibraryEditor.cs</DependentUpon>
+    <Compile Include="FunctionTreeView.Designer.cs">
+      <DependentUpon>FunctionTreeView.cs</DependentUpon>
     </Compile>
+    <Compile Include="GeneticProgrammingModel.cs" />
+    <Compile Include="DefaultFunctionTreeNameGenerator.cs" />
+    <Compile Include="UnknownFunctionException.cs" />
     <Compile Include="HeuristicLabGPPlugin.cs" />
-    <Compile Include="IFunction.cs" />
-    <Compile Include="IFunctionTree.cs" />
-    <Compile Include="Manipulation\ChangeNodeTypeManipulation.cs" />
-    <Compile Include="Manipulation\CutOutNodeManipulation.cs" />
-    <Compile Include="Manipulation\DeleteSubTreeManipulation.cs" />
-    <Compile Include="Manipulation\FullTreeShaker.cs" />
-    <Compile Include="Manipulation\OnePointShaker.cs" />
-    <Compile Include="Manipulation\SubstituteSubTreeManipulation.cs" />
-    <Compile Include="ProbabilisticTreeCreator.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="RampedTreeCreator.cs" />
-    <Compile Include="Recombination\LangdonHomologousCrossOver.cs" />
-    <Compile Include="Recombination\OnePointCrossOver.cs" />
-    <Compile Include="Recombination\SizeFairCrossOver.cs" />
-    <Compile Include="Recombination\StandardCrossOver.cs" />
     <Compile Include="TreeGardener.cs" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Constraints\3.2\HeuristicLab.Constraints-3.2.csproj">
-      <Project>{FCD62C6F-4793-4593-AE9A-0BDCA256EE99}</Project>
-      <Name>HeuristicLab.Constraints-3.2</Name>
-    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
       <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
       <Name>HeuristicLab.Core-3.2</Name>
     </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Data\3.2\HeuristicLab.Data-3.2.csproj">
-      <Project>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</Project>
-      <Name>HeuristicLab.Data-3.2</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Evolutionary\3.2\HeuristicLab.Evolutionary-3.2.csproj">
-      <Project>{F5614C53-153C-4A37-A608-121E1C087F07}</Project>
-      <Name>HeuristicLab.Evolutionary-3.2</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Operators\3.2\HeuristicLab.Operators-3.2.csproj">
-      <Project>{A9983BA2-B3B2-475E-8E2C-62050B71D1C5}</Project>
-      <Name>HeuristicLab.Operators-3.2</Name>
+    <ProjectReference Include="..\..\HeuristicLab.GP.Interfaces\3.3\HeuristicLab.GP.Interfaces-3.3.csproj">
+      <Project>{924B6BEA-9A99-40FE-9334-5C01E8D540EC}</Project>
+      <Name>HeuristicLab.GP.Interfaces-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
@@ -156,17 +126,11 @@
       <Name>HeuristicLab.Random-3.2</Name>
     </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Selection\3.2\HeuristicLab.Selection-3.2.csproj">
-      <Project>{F7CF0571-25CB-43D5-8443-0843A1E2861A}</Project>
-      <Name>HeuristicLab.Selection-3.2</Name>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="FunctionView.resx">
-      <DependentUpon>FunctionView.cs</DependentUpon>
-      <SubType>Designer</SubType>
+    <EmbeddedResource Include="FunctionLibraryEditor.resx">
+      <DependentUpon>FunctionLibraryEditor.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="GPOperatorLibraryEditor.resx">
-      <DependentUpon>GPOperatorLibraryEditor.cs</DependentUpon>
-      <SubType>Designer</SubType>
+    <EmbeddedResource Include="FunctionTreeView.resx">
+      <DependentUpon>FunctionTreeView.cs</DependentUpon>
     </EmbeddedResource>
   </ItemGroup>
Index: /trunk/sources/HeuristicLab.GP/3.3/HeuristicLabGPPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/HeuristicLabGPPlugin.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP/3.3/HeuristicLabGPPlugin.cs	(revision 2222)
@@ -28,11 +28,6 @@
   [ClassInfo(Name = "HeuristicLab.GP-3.3")]
   [PluginFile(Filename = "HeuristicLab.GP-3.3.dll", Filetype = PluginFileType.Assembly)]
-  [Dependency(Dependency = "HeuristicLab.Constraints-3.2")]
-  [Dependency(Dependency = "HeuristicLab.Core-3.2")]
-  [Dependency(Dependency = "HeuristicLab.Data-3.2")]
-  [Dependency(Dependency = "HeuristicLab.Evolutionary-3.2")]
-  [Dependency(Dependency = "HeuristicLab.Operators-3.2")]
+  [Dependency(Dependency = "HeuristicLab.GP.Interfaces-3.3")]
   [Dependency(Dependency = "HeuristicLab.Random-3.2")]
-  [Dependency(Dependency = "HeuristicLab.Selection-3.2")]
   public class HeuristicLabGPPlugin : PluginBase {
   }
Index: unk/sources/HeuristicLab.GP/3.3/IFunction.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/IFunction.cs	(revision 2221)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-
-namespace HeuristicLab.GP {
-  public interface IFunction : IOperator {
-    IFunctionTree GetTreeNode();
-    double Apply();
-    IList<IFunction> AllowedSubFunctions(int index);
-    int MinArity { get; }
-    int MaxArity { get; }
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/IFunctionTree.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/IFunctionTree.cs	(revision 2221)
+++ 	(revision )
@@ -1,41 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-
-namespace HeuristicLab.GP {
-  public interface IFunctionTree : IItem {
-    int Size { get; }
-    int Height { get; }
-    IList<IFunctionTree> SubTrees { get; }
-    ICollection<IVariable> LocalVariables { get; }
-    IFunction Function { get; }
-    IVariable GetLocalVariable(string name);
-    void AddVariable(IVariable variable);
-    void RemoveVariable(string name);
-    void AddSubTree(IFunctionTree tree);
-    void InsertSubTree(int index, IFunctionTree tree);
-    void RemoveSubTree(int index);
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/IFunctionTreeExporter.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/IFunctionTreeExporter.cs	(revision 2221)
+++ 	(revision )
@@ -1,33 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-
-namespace HeuristicLab.GP {
-  public interface IFunctionTreeExporter {
-    string Name { get; }
-    string Export(IFunctionTree tree);
-    bool TryExport(IFunctionTree tree, out string exported);
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/IFunctionTreeNameGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/IFunctionTreeNameGenerator.cs	(revision 2221)
+++ 	(revision )
@@ -1,32 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-
-namespace HeuristicLab.GP {
-  public interface IFunctionTreeNameGenerator {
-    string Name { get; }
-    string GetName(IFunctionTree tree);
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/OffspringEqualiser.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/OffspringEqualiser.cs	(revision 2221)
+++ 	(revision )
@@ -1,63 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.GP {
-  public class OffspringEqualiser : OperatorBase {
-    public override string Description {
-      get { return @"TODO\r\nOperator description still missing ..."; }
-    }
-
-    public OffspringEqualiser() {
-      AddVariableInfo(new VariableInfo("Random", "Pseudo random number generator", typeof(MersenneTwister), VariableKind.In));
-      AddVariableInfo(new VariableInfo("Value", "The value to equalise", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("BinSize", "Size of histogram bins", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("EqualiserHistogram", "Histogram of the target distribution", typeof(DoubleArrayData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("AcceptanceProbabilities", "Acceptance probabilities of individuals falling into bins", typeof(DoubleArrayData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("Histogram", "The histogram of the actual distribution", typeof(IntArrayData), VariableKind.In));
-    }
-
-    public override IOperation Apply(IScope scope) {
-      int binSize = GetVariableValue<IntData>("BinSize", scope, true).Data;
-      DoubleArrayData equaliserHistogram = GetVariableValue<DoubleArrayData>("EqualiserHistogram", scope, true);
-      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
-      DoubleArrayData acceptanceProbabilities = GetVariableValue<DoubleArrayData>("AcceptanceProbabilities", scope, true);
-      IntArrayData currentHistogram = GetVariableValue<IntArrayData>("Histogram", scope, true);
-
-      int value = GetVariableValue<IntData>("Value", scope, false).Data;
-      int bin = value / binSize;
-      if(bin<acceptanceProbabilities.Data.Length && random.NextDouble() < acceptanceProbabilities.Data[bin]) {
-        currentHistogram.Data[bin]++;
-        currentHistogram.FireChanged();
-        return new AtomicOperation(SubOperators[0], scope);
-      } else {
-        scope.AddVariable(new Variable(scope.TranslateName("Quality"), new DoubleData(double.NaN)));
-        return null;
-      }
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/ProbabilisticTreeCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/ProbabilisticTreeCreator.cs	(revision 2221)
+++ 	(revision )
@@ -1,83 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Linq;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using System;
-using HeuristicLab.Random;
-using System.Diagnostics;
-
-namespace HeuristicLab.GP {
-  public class ProbabilisticTreeCreator : OperatorBase {
-    private int MAX_TRIES { get { return 100; } }
-
-    public override string Description {
-      get { return @"Generates a new random operator tree."; }
-    }
-
-    public ProbabilisticTreeCreator()
-      : base() {
-      AddVariableInfo(new VariableInfo("Random", "Uniform random number generator", typeof(MersenneTwister), VariableKind.In));
-      AddVariableInfo(new VariableInfo("OperatorLibrary", "The operator library containing all available operators", typeof(GPOperatorLibrary), VariableKind.In));
-      AddVariableInfo(new VariableInfo("MinTreeSize", "The minimal allowed size of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("MaxTreeSize", "The maximal allowed size of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("FunctionTree", "The created tree", typeof(IFunctionTree), VariableKind.New | VariableKind.Out));
-      AddVariableInfo(new VariableInfo("TreeSize", "The size (number of nodes) of the tree", typeof(IntData), VariableKind.New | VariableKind.Out));
-      AddVariableInfo(new VariableInfo("TreeHeight", "The height of the tree", typeof(IntData), VariableKind.New | VariableKind.Out));
-    }
-
-    public override IOperation Apply(IScope scope) {
-      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
-      GPOperatorLibrary opLibrary = GetVariableValue<GPOperatorLibrary>("OperatorLibrary", scope, true);
-      int minTreeSize = GetVariableValue<IntData>("MinTreeSize", scope, true).Data;
-      int maxTreeSize = GetVariableValue<IntData>("MaxTreeSize", scope, true).Data;
-      int maxTreeHeight = GetVariableValue<IntData>("MaxTreeHeight", scope, true).Data;
-
-      TreeGardener gardener = new TreeGardener(random, opLibrary);
-
-      int treeSize = random.Next(minTreeSize, maxTreeSize + 1);
-
-      IFunctionTree root;
-      int actualTreeSize;
-      int actualTreeHeight;
-      int tries = 0;
-      do {
-        root = gardener.PTC2(random, treeSize, maxTreeHeight);
-        actualTreeSize = root.Size;
-        actualTreeHeight = root.Height;
-        if (tries++ >= MAX_TRIES) {
-          // try a different size
-          treeSize = random.Next(minTreeSize, maxTreeSize + 1);
-          tries = 0;
-        }
-      } while (actualTreeSize > maxTreeSize || actualTreeHeight > maxTreeHeight);
-
-      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("FunctionTree"), root));
-      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("TreeSize"), new IntData(actualTreeSize)));
-      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("TreeHeight"), new IntData(actualTreeHeight)));
-
-      return gardener.CreateInitializationOperation(gardener.GetAllSubTrees(root), scope);
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/RampedTreeCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/RampedTreeCreator.cs	(revision 2221)
+++ 	(revision )
@@ -1,77 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Linq;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using System;
-using HeuristicLab.Random;
-using System.Diagnostics;
-
-namespace HeuristicLab.GP {
-  public class RampedTreeCreator : OperatorBase {
-    public override string Description {
-      get { return @"Generates a new random operator tree."; }
-    }
-
-    public RampedTreeCreator()
-      : base() {
-      AddVariableInfo(new VariableInfo("Random", "Uniform random number generator", typeof(MersenneTwister), VariableKind.In));
-      AddVariableInfo(new VariableInfo("OperatorLibrary", "The operator library containing all available operators", typeof(GPOperatorLibrary), VariableKind.In));
-      AddVariableInfo(new VariableInfo("MinTreeHeight", "The minimal allowed height of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("BalancedTreesRate", "Determines how many trees should be balanced", typeof(DoubleData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("FunctionTree", "The created tree", typeof(IFunctionTree), VariableKind.New | VariableKind.Out));
-      AddVariableInfo(new VariableInfo("TreeSize", "The size (number of nodes) of the tree", typeof(IntData), VariableKind.New | VariableKind.Out));
-      AddVariableInfo(new VariableInfo("TreeHeight", "The height of the tree", typeof(IntData), VariableKind.New | VariableKind.Out));
-    }
-
-    public override IOperation Apply(IScope scope) {
-      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
-      GPOperatorLibrary opLibrary = GetVariableValue<GPOperatorLibrary>("OperatorLibrary", scope, true);
-      int minTreeHeight = GetVariableValue<IntData>("MinTreeHeight", scope, true).Data;
-      int maxTreeHeight = GetVariableValue<IntData>("MaxTreeHeight", scope, true).Data;
-      double balancedTreesRate = GetVariableValue<DoubleData>("BalancedTreesRate", scope, true).Data;
-
-      TreeGardener gardener = new TreeGardener(random, opLibrary);
-
-      int treeHeight = random.Next(minTreeHeight, maxTreeHeight + 1);
-      IFunctionTree root;
-      if(random.NextDouble() <= balancedTreesRate) {
-        root = gardener.CreateBalancedRandomTree(Int32.MaxValue, treeHeight);
-      } else {
-        root = gardener.CreateUnbalancedRandomTree(Int32.MaxValue, treeHeight);
-      }
-
-      int actualTreeSize = root.Size;
-      int actualTreeHeight = root.Height;
-
-      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("FunctionTree"), root));
-      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("TreeSize"), new IntData(actualTreeSize)));
-      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("TreeHeight"), new IntData(actualTreeHeight)));
-
-      Debug.Assert(gardener.IsValidTree(root) && actualTreeHeight <= maxTreeHeight);
-
-      return gardener.CreateInitializationOperation(gardener.GetAllSubTrees(root), scope);
-    }
-  }
-}
Index: unk/sources/HeuristicLab.GP/3.3/TrainingWindowSlider.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/TrainingWindowSlider.cs	(revision 2221)
+++ 	(revision )
@@ -1,65 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.GP {
-  public class TrainingWindowSlider : OperatorBase {
-
-    private const string TRAINING_SAMPLES_START = "TrainingSamplesStart";
-    private const string TRAINING_SAMPLES_END = "TrainingSamplesEnd";
-    private const string TRAINING_WINDOW_START = "TrainingWindowStart";
-    private const string TRAINING_WINDOW_END = "TrainingWindowEnd";
-    private const string STEP_SIZE = "SlidingStepSize";
-
-    public override string Description {
-      get { return @"Modifies variables TrainingSamplesStart and TrainingSamplesEnd to have a continually sliding window over the whole training data set."; }
-    }
-
-    public TrainingWindowSlider() {
-      AddVariableInfo(new VariableInfo(TRAINING_SAMPLES_START, "Start of whole training set", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo(TRAINING_SAMPLES_END, "End of whole training set", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo(TRAINING_WINDOW_START, "Start of training set window", typeof(IntData), VariableKind.In | VariableKind.Out));
-      AddVariableInfo(new VariableInfo(TRAINING_WINDOW_END, "End of training set window", typeof(IntData), VariableKind.In | VariableKind.Out));
-      AddVariableInfo(new VariableInfo(STEP_SIZE, "Number of samples to slide the window forward", typeof(IntData), VariableKind.In));
-    }
-
-    public override IOperation Apply(IScope scope) {
-      int trainingSamplesStart = GetVariableValue<IntData>(TRAINING_SAMPLES_START, scope, true).Data;
-      int trainingSamplesEnd = GetVariableValue<IntData>(TRAINING_SAMPLES_END, scope, true).Data;
-      IntData trainingWindowStart = GetVariableValue<IntData>(TRAINING_WINDOW_START, scope, true);
-      IntData trainingWindowEnd = GetVariableValue<IntData>(TRAINING_WINDOW_END, scope, true);
-      int stepSize = GetVariableValue<IntData>(STEP_SIZE, scope, true).Data;
-
-      if (trainingWindowEnd.Data + stepSize <= trainingSamplesEnd) {
-        trainingWindowStart.Data = trainingWindowStart.Data + stepSize;
-        trainingWindowEnd.Data = trainingWindowEnd.Data + stepSize;
-      }
-
-      return null;
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.GP/3.3/TreeGardener.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/TreeGardener.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.GP/3.3/TreeGardener.cs	(revision 2222)
@@ -22,33 +22,27 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
 using HeuristicLab.Core;
-using HeuristicLab.Constraints;
-using System.Diagnostics;
-using HeuristicLab.Data;
 using System.Linq;
-using HeuristicLab.Random;
-using HeuristicLab.Operators;
 using System.Collections;
-using HeuristicLab.Selection;
+using HeuristicLab.GP.Interfaces;
 
 namespace HeuristicLab.GP {
-  internal class TreeGardener {
+  public class TreeGardener {
     private IRandom random;
-    private GPOperatorLibrary funLibrary;
+    private FunctionLibrary funLibrary;
     private List<IFunction> functions;
 
     private List<IFunction> terminals;
-    internal IList<IFunction> Terminals {
+    public IList<IFunction> Terminals {
       get { return terminals; }
     }
 
     private List<IFunction> allFunctions;
-    internal IList<IFunction> AllFunctions {
+    public IList<IFunction> AllFunctions {
       get { return allFunctions; }
     }
 
     #region constructors
-    internal TreeGardener(IRandom random, GPOperatorLibrary funLibrary) {
+    public TreeGardener(IRandom random, FunctionLibrary funLibrary) {
       this.random = random;
       this.funLibrary = funLibrary;
@@ -57,6 +51,6 @@
       functions = new List<IFunction>();
       // init functions and terminals based on constraints
-      foreach(IFunction fun in funLibrary.Group.Operators) {
-        if(fun.MaxArity == 0) {
+      foreach(IFunction fun in funLibrary.Functions) {
+        if(fun.MaxSubTrees == 0) {
           terminals.Add(fun);
           allFunctions.Add(fun);
@@ -77,5 +71,5 @@
     /// <param name="maxTreeHeight">Maximal height of the tree.</param>
     /// <returns></returns>
-    internal IFunctionTree CreateBalancedRandomTree(int maxTreeSize, int maxTreeHeight) {
+    public IFunctionTree CreateBalancedRandomTree(int maxTreeSize, int maxTreeHeight) {
       IFunction rootFunction = GetRandomRoot(maxTreeSize, maxTreeHeight);
       IFunctionTree tree = MakeBalancedTree(rootFunction, maxTreeHeight - 1);
@@ -90,5 +84,5 @@
     /// <param name="maxTreeHeight">Maximal height of the tree.</param>
     /// <returns></returns>
-    internal IFunctionTree CreateUnbalancedRandomTree(int maxTreeSize, int maxTreeHeight) {
+    public IFunctionTree CreateUnbalancedRandomTree(int maxTreeSize, int maxTreeHeight) {
       IFunction rootFunction = GetRandomRoot(maxTreeSize, maxTreeHeight);
       IFunctionTree tree = MakeUnbalancedTree(rootFunction, maxTreeHeight - 1);
@@ -96,22 +90,22 @@
     }
 
-    internal IFunctionTree PTC2(IRandom random, int size, int maxDepth) {
-      return PTC2(random, GetRandomRoot(size, maxDepth), size, maxDepth);
-    }
-
-    internal IFunctionTree PTC2(IRandom random, IFunction rootF, int size, int maxDepth) {
-      IFunctionTree root = rootF.GetTreeNode();
-      if(size <= 1 || maxDepth <= 1) return root;
+    public IFunctionTree PTC2(int size, int maxDepth) {
+      return PTC2(GetRandomRoot(size, maxDepth), size, maxDepth);
+    }
+
+    private IFunctionTree PTC2(IFunction rootFunction, int size, int maxDepth) {
+      IFunctionTree root = rootFunction.GetTreeNode();
+      if (size <= 1 || maxDepth <= 1) return root;
       List<object[]> list = new List<object[]>();
       int currentSize = 1;
       int totalListMinSize = 0;
-      int minArity = root.Function.MinArity;
-      int maxArity = root.Function.MaxArity;
-      if(maxArity >= size) {
+      int minArity = root.Function.MinSubTrees;
+      int maxArity = root.Function.MaxSubTrees;
+      if (maxArity >= size) {
         maxArity = size;
       }
       int actualArity = random.Next(minArity, maxArity + 1);
-      totalListMinSize += GetMinimalTreeSize(root.Function) - 1;
-      for(int i = 0; i < actualArity; i++) {
+      totalListMinSize += root.Function.MinTreeSize - 1;
+      for (int i = 0; i < actualArity; i++) {
         // insert a dummy sub-tree and add the pending extension to the list
         root.AddSubTree(null);
@@ -119,5 +113,5 @@
       }
 
-      while(list.Count > 0 && totalListMinSize + currentSize < size) {
+      while (list.Count > 0 && totalListMinSize + currentSize < size) {
         int randomIndex = random.Next(list.Count);
         object[] nextExtension = list[randomIndex];
@@ -126,13 +120,13 @@
         int a = (int)nextExtension[1];
         int d = (int)nextExtension[2];
-        if(d == maxDepth) {
+        if (d == maxDepth) {
           parent.RemoveSubTree(a);
           IFunctionTree branch = CreateRandomTree(GetAllowedSubFunctions(parent.Function, a), 1, 1);
           parent.InsertSubTree(a, branch); // insert a smallest possible tree
-          currentSize += branch.Size;
-          totalListMinSize -= branch.Size;
+          currentSize += branch.GetSize();
+          totalListMinSize -= branch.GetSize();
         } else {
-          IFunction selectedFunction = RandomSelect(GetAllowedSubFunctions(parent.Function, a).Where(
-            f => !IsTerminal(f) && GetMinimalTreeHeight(f) + (d - 1) <= maxDepth).ToArray());
+          IFunction selectedFunction = TreeGardener.RandomSelect(random, GetAllowedSubFunctions(parent.Function, a).Where(
+            f => !TreeGardener.IsTerminal(f) && f.MinTreeHeight + (d - 1) <= maxDepth).ToArray());
           IFunctionTree newTree = selectedFunction.GetTreeNode();
           parent.RemoveSubTree(a);
@@ -141,19 +135,19 @@
           totalListMinSize--;
 
-          minArity = selectedFunction.MinArity;
-          maxArity = selectedFunction.MaxArity;
-          if(maxArity >= size) {
+          minArity = selectedFunction.MinSubTrees;
+          maxArity = selectedFunction.MaxSubTrees;
+          if (maxArity >= size) {
             maxArity = size;
           }
           actualArity = random.Next(minArity, maxArity + 1);
-          for(int i = 0; i < actualArity; i++) {
+          for (int i = 0; i < actualArity; i++) {
             // insert a dummy sub-tree and add the pending extension to the list
             newTree.AddSubTree(null);
             list.Add(new object[] { newTree, i, d + 1 });
           }
-          totalListMinSize += GetMinimalTreeSize(newTree.Function) - 1;
-        }
-      }
-      while(list.Count > 0) {
+          totalListMinSize += newTree.Function.MinTreeSize - 1;
+        }
+      }
+      while (list.Count > 0) {
         int randomIndex = random.Next(list.Count);
         object[] nextExtension = list[randomIndex];
@@ -168,5 +162,5 @@
       return root;
     }
-
+ 
     /// <summary>
     /// selects a random function from allowedFunctions and creates a random (unbalanced) tree with maximal size and height.
@@ -176,11 +170,11 @@
     /// <param name="maxTreeHeight">Maximal height of the tree.</param>
     /// <returns>New random unbalanced tree</returns>
-    internal IFunctionTree CreateRandomTree(ICollection<IFunction> allowedFunctions, int maxTreeSize, int maxTreeHeight) {
+    public IFunctionTree CreateRandomTree(ICollection<IFunction> allowedFunctions, int maxTreeSize, int maxTreeHeight) {
       // get the minimal needed height based on allowed functions and extend the max-height if necessary
-      int minTreeHeight = allowedFunctions.Select(f => GetMinimalTreeHeight(f)).Min();
+      int minTreeHeight = allowedFunctions.Select(f => f.MinTreeHeight).Min();
       if(minTreeHeight > maxTreeHeight)
         maxTreeHeight = minTreeHeight;
       // get the minimal needed size based on allowed functions and extend the max-size if necessary
-      int minTreeSize = allowedFunctions.Select(f => GetMinimalTreeSize(f)).Min();
+      int minTreeSize = allowedFunctions.Select(f => f.MinTreeSize).Min();
       if(minTreeSize > maxTreeSize)
         maxTreeSize = minTreeSize;
@@ -191,45 +185,17 @@
 
       // filter the set of allowed functions and select only from those that fit into the given maximal size and height limits
-      IFunction[] possibleFunctions = allowedFunctions.Where(f => GetMinimalTreeHeight(f) <= treeHeight &&
-        GetMinimalTreeSize(f) <= treeSize).ToArray();
+      IFunction[] possibleFunctions = allowedFunctions.Where(f => f.MinTreeHeight <= treeHeight &&
+        f.MinTreeSize <= treeSize).ToArray();
       IFunction selectedFunction = RandomSelect(possibleFunctions);
 
       // build the tree 
       IFunctionTree root;
-      root = PTC2(random, selectedFunction, maxTreeSize, maxTreeHeight);
+      root = PTC2(selectedFunction, maxTreeSize, maxTreeHeight);
       return root;
     }
-
-    internal CompositeOperation CreateInitializationOperation(ICollection<IFunctionTree> trees, IScope scope) {
-      // needed for the parameter shaking operation
-      CompositeOperation initializationOperation = new CompositeOperation();
-      Scope tempScope = new Scope("Temp. initialization scope");
-
-      var parametricTrees = trees.Where(t => t.Function.GetVariable(FunctionBase.INITIALIZATION) != null);
-      foreach(IFunctionTree tree in parametricTrees) {
-        // enqueue an initialization operation for each operator with local variables 
-        IOperator initialization = (IOperator)tree.Function.GetVariable(FunctionBase.INITIALIZATION).Value;
-        Scope initScope = new Scope();
-        // copy the local variables into a temporary scope used for initialization
-        foreach(IVariable variable in tree.LocalVariables) {
-          initScope.AddVariable(variable);
-        }
-        tempScope.AddSubScope(initScope);
-        initializationOperation.AddOperation(new AtomicOperation(initialization, initScope));
-      }
-      Scope backupScope = new Scope("backup");
-      foreach(Scope subScope in scope.SubScopes) {
-        backupScope.AddSubScope(subScope);
-      }
-      scope.AddSubScope(tempScope);
-      scope.AddSubScope(backupScope);
-      // add an operation to remove the temporary scopes        
-      initializationOperation.AddOperation(new AtomicOperation(new RightReducer(), scope));
-      return initializationOperation;
-    }
     #endregion
 
     #region tree information gathering
-    internal IFunctionTree GetRandomParentNode(IFunctionTree tree) {
+    public IFunctionTree GetRandomParentNode(IFunctionTree tree) {
       List<IFunctionTree> parentNodes = new List<IFunctionTree>();
 
@@ -246,5 +212,5 @@
     }
 
-    internal ICollection<IFunctionTree> GetAllSubTrees(IFunctionTree root) {
+    public static ICollection<IFunctionTree> GetAllSubTrees(IFunctionTree root) {
       List<IFunctionTree> allTrees = new List<IFunctionTree>();
       TreeForEach(root, t => { allTrees.Add(t); });
@@ -262,5 +228,5 @@
     /// <param name="branch">branch that is searched in the tree</param>
     /// <returns></returns>
-    internal int GetBranchLevel(IFunctionTree tree, IFunctionTree branch) {
+    public int GetBranchLevel(IFunctionTree tree, IFunctionTree branch) {
       return GetBranchLevelHelper(tree, branch, 1);
     }
@@ -278,10 +244,10 @@
     }
 
-    internal bool IsValidTree(IFunctionTree tree) {
+    public bool IsValidTree(IFunctionTree tree) {
       for(int i = 0; i < tree.SubTrees.Count; i++) {
-        if(!tree.Function.AllowedSubFunctions(i).Contains(tree.SubTrees[i].Function)) return false;
-      }
-
-      if(tree.SubTrees.Count < tree.Function.MinArity || tree.SubTrees.Count > tree.Function.MaxArity)
+        if(!tree.Function.GetAllowedSubFunctions(i).Contains(tree.SubTrees[i].Function)) return false;
+      }
+
+      if(tree.SubTrees.Count < tree.Function.MinSubTrees || tree.SubTrees.Count > tree.Function.MaxSubTrees)
         return false;
       foreach(IFunctionTree subTree in tree.SubTrees) {
@@ -292,5 +258,5 @@
 
     // returns a random branch from the specified level in the tree
-    internal IFunctionTree GetRandomBranch(IFunctionTree tree, int level) {
+    public IFunctionTree GetRandomBranch(IFunctionTree tree, int level) {
       if(level == 0) return tree;
       List<IFunctionTree> branches = new List<IFunctionTree>();
@@ -312,6 +278,6 @@
 
     private bool IsPossibleParent(IFunction f, List<IFunction> children) {
-      int minArity = f.MinArity;
-      int maxArity = f.MaxArity;
+      int minArity = f.MinSubTrees;
+      int maxArity = f.MaxSubTrees;
       // note: we can't assume that the operators in the children list have different types!
 
@@ -329,5 +295,5 @@
       // we only count those slots that can hold at least one of the children that we should combine
       for(int slot = 0; slot < nSlots; slot++) {
-        HashSet<IFunction> functionSet = new HashSet<IFunction>(f.AllowedSubFunctions(slot));
+        HashSet<IFunction> functionSet = new HashSet<IFunction>(f.GetAllowedSubFunctions(slot));
         if(functionSet.Count() > 0) {
           slotSets.Add(functionSet);
@@ -365,5 +331,5 @@
       return assignments == children.Count - 1;
     }
-    internal IList<IFunction> GetAllowedParents(IFunction child, int childIndex) {
+    public IList<IFunction> GetAllowedParents(IFunction child, int childIndex) {
       List<IFunction> parents = new List<IFunction>();
       foreach(IFunction function in functions) {
@@ -375,12 +341,12 @@
       return parents;
     }
-    internal bool IsTerminal(IFunction f) {
-      return f.MinArity == 0 && f.MaxArity == 0;
-    }
-    internal IList<IFunction> GetAllowedSubFunctions(IFunction f, int index) {
+    public static bool IsTerminal(IFunction f) {
+      return f.MinSubTrees == 0 && f.MaxSubTrees == 0;
+    }
+    public ICollection<IFunction> GetAllowedSubFunctions(IFunction f, int index) {
       if(f == null) {
         return allFunctions;
       } else {
-        return f.AllowedSubFunctions(index);
+        return f.GetAllowedSubFunctions(index);
       }
     }
@@ -388,11 +354,11 @@
 
     #region private utility methods
-    private IFunction GetRandomRoot(int maxTreeSize, int maxTreeHeight) {
+    public IFunction GetRandomRoot(int maxTreeSize, int maxTreeHeight) {
       if(maxTreeHeight == 1 || maxTreeSize == 1) {
         IFunction selectedTerminal = RandomSelect(terminals);
         return selectedTerminal;
       } else {
-        IFunction[] possibleFunctions = functions.Where(f => GetMinimalTreeHeight(f) <= maxTreeHeight &&
-          GetMinimalTreeSize(f) <= maxTreeSize).ToArray();
+        IFunction[] possibleFunctions = functions.Where(f => f.MinTreeHeight <= maxTreeHeight &&
+          f.MinTreeSize <= maxTreeSize).ToArray();
         IFunction selectedFunction = RandomSelect(possibleFunctions);
         return selectedFunction;
@@ -403,11 +369,11 @@
     private IFunctionTree MakeUnbalancedTree(IFunction parent, int maxTreeHeight) {
       if(maxTreeHeight == 0) return parent.GetTreeNode();
-      int minArity = parent.MinArity;
-      int maxArity = parent.MaxArity;
+      int minArity = parent.MinSubTrees;
+      int maxArity = parent.MaxSubTrees;
       int actualArity = random.Next(minArity, maxArity + 1);
       if(actualArity > 0) {
         IFunctionTree parentTree = parent.GetTreeNode();
         for(int i = 0; i < actualArity; i++) {
-          IFunction[] possibleFunctions = GetAllowedSubFunctions(parent, i).Where(f => GetMinimalTreeHeight(f) <= maxTreeHeight).ToArray();
+          IFunction[] possibleFunctions = GetAllowedSubFunctions(parent, i).Where(f => f.MinTreeHeight <= maxTreeHeight).ToArray();
           IFunction selectedFunction = RandomSelect(possibleFunctions);
           IFunctionTree newSubTree = MakeUnbalancedTree(selectedFunction, maxTreeHeight - 1);
@@ -424,6 +390,6 @@
     private IFunctionTree MakeBalancedTree(IFunction parent, int maxTreeHeight) {
       if(maxTreeHeight == 0) return parent.GetTreeNode();
-      int minArity = parent.MinArity;
-      int maxArity = parent.MaxArity;
+      int minArity = parent.MinSubTrees;
+      int maxArity = parent.MaxSubTrees;
       int actualArity = random.Next(minArity, maxArity + 1);
       if(actualArity > 0) {
@@ -431,5 +397,5 @@
         for(int i = 0; i < actualArity; i++) {
           // first try to find a function that fits into the maxHeight limit
-          IFunction[] possibleFunctions = GetAllowedSubFunctions(parent, i).Where(f => GetMinimalTreeHeight(f) <= maxTreeHeight &&
+          IFunction[] possibleFunctions = GetAllowedSubFunctions(parent, i).Where(f => f.MinTreeHeight <= maxTreeHeight &&
             !IsTerminal(f)).ToArray();
           // no possible function found => extend function set to terminals
@@ -450,13 +416,5 @@
     }
 
-    private int GetMinimalTreeHeight(IOperator op) {
-      return ((IntData)op.GetVariable(GPOperatorLibrary.MIN_TREE_HEIGHT).Value).Data;
-    }
-
-    private int GetMinimalTreeSize(IOperator op) {
-      return ((IntData)op.GetVariable(GPOperatorLibrary.MIN_TREE_SIZE).Value).Data;
-    }
-
-    private void TreeForEach(IFunctionTree tree, Action<IFunctionTree> action) {
+    private static void TreeForEach(IFunctionTree tree, Action<IFunctionTree> action) {
       action(tree);
       foreach(IFunctionTree subTree in tree.SubTrees) {
@@ -465,8 +423,8 @@
     }
 
-    private void GetBranchesAtLevel(IFunctionTree tree, int level, List<IFunctionTree> result) {
+    private static void GetBranchesAtLevel(IFunctionTree tree, int level, List<IFunctionTree> result) {
       if(level == 1) result.AddRange(tree.SubTrees);
       foreach(IFunctionTree subTree in tree.SubTrees) {
-        if(subTree.Height >= level - 1)
+        if(subTree.GetHeight() >= level - 1)
           GetBranchesAtLevel(subTree, level - 1, result);
       }
@@ -474,10 +432,14 @@
 
     private IFunction RandomSelect(IList<IFunction> functionSet) {
+      return RandomSelect(random, functionSet);
+    }
+
+    public static IFunction RandomSelect(IRandom random, IList<IFunction> functionSet) {
       double[] accumulatedTickets = new double[functionSet.Count];
       double ticketAccumulator = 0;
       int i = 0;
       // precalculate the slot-sizes
-      foreach(IFunction function in functionSet) {
-        ticketAccumulator += ((DoubleData)function.GetVariable(GPOperatorLibrary.TICKETS).Value).Data;
+      foreach (IFunction function in functionSet) {
+        ticketAccumulator += function.Tickets;
         accumulatedTickets[i] = ticketAccumulator;
         i++;
@@ -486,6 +448,6 @@
       double r = random.NextDouble() * ticketAccumulator;
       // find the slot that has been hit
-      for(i = 0; i < accumulatedTickets.Length; i++) {
-        if(r < accumulatedTickets[i]) return functionSet[i];
+      for (i = 0; i < accumulatedTickets.Length; i++) {
+        if (r < accumulatedTickets[i]) return functionSet[i];
       }
       // sanity check
Index: /trunk/sources/HeuristicLab.LinearRegression/3.2/HeuristicLab.LinearRegression-3.2.csproj
===================================================================
--- /trunk/sources/HeuristicLab.LinearRegression/3.2/HeuristicLab.LinearRegression-3.2.csproj	(revision 2221)
+++ /trunk/sources/HeuristicLab.LinearRegression/3.2/HeuristicLab.LinearRegression-3.2.csproj	(revision 2222)
@@ -113,4 +113,8 @@
       <Name>HeuristicLab.Data-3.2</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.GP.Interfaces\3.3\HeuristicLab.GP.Interfaces-3.3.csproj">
+      <Project>{924B6BEA-9A99-40FE-9334-5C01E8D540EC}</Project>
+      <Name>HeuristicLab.GP.Interfaces-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.GP.StructureIdentification\3.3\HeuristicLab.GP.StructureIdentification-3.3.csproj">
       <Project>{74223A32-C726-4978-BE78-37113A18373C}</Project>
Index: /trunk/sources/HeuristicLab.LinearRegression/3.2/HeuristicLabLinearRegressionPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.LinearRegression/3.2/HeuristicLabLinearRegressionPlugin.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.LinearRegression/3.2/HeuristicLabLinearRegressionPlugin.cs	(revision 2222)
@@ -32,4 +32,5 @@
   [Dependency(Dependency = "HeuristicLab.DataAnalysis-3.2")]
   [Dependency(Dependency = "HeuristicLab.GP-3.3")]
+  [Dependency(Dependency = "HeuristicLab.GP.Interfaces-3.3")]
   [Dependency(Dependency = "HeuristicLab.GP.StructureIdentification-3.3")]
   [Dependency(Dependency = "HeuristicLab.Modeling-3.2")]
Index: /trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs
===================================================================
--- /trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs	(revision 2222)
@@ -34,4 +34,5 @@
 using HeuristicLab.GP;
 using HeuristicLab.Random;
+using HeuristicLab.GP.Interfaces;
 
 namespace HeuristicLab.LinearRegression {
@@ -281,5 +282,5 @@
       model.TestVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("TestVAF", false).Data;
 
-      model.Data = bestModelScope.GetVariableValue<IFunctionTree>("LinearRegressionModel", false);
+      model.Data = bestModelScope.GetVariableValue<IGeneticProgrammingModel>("LinearRegressionModel", false);
       HeuristicLab.DataAnalysis.Dataset ds = bestModelScope.GetVariableValue<Dataset>("Dataset", true);
       model.Dataset = ds;
Index: /trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegressionOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegressionOperator.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegressionOperator.cs	(revision 2222)
@@ -28,4 +28,5 @@
 using HeuristicLab.GP;
 using HeuristicLab.GP.StructureIdentification;
+using HeuristicLab.GP.Interfaces;
 
 namespace HeuristicLab.LinearRegression {
@@ -38,7 +39,5 @@
       AddVariableInfo(new VariableInfo("SamplesStart", "Start index of samples in dataset to evaluate", typeof(IntData), VariableKind.In));
       AddVariableInfo(new VariableInfo("SamplesEnd", "End index of samples in dataset to evaluate", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("LinearRegressionModel", "Formula that was calculated by linear regression", typeof(IFunctionTree), VariableKind.Out | VariableKind.New));
-      AddVariableInfo(new VariableInfo("TreeSize", "The size (number of nodes) of the tree", typeof(IntData), VariableKind.New | VariableKind.Out));
-      AddVariableInfo(new VariableInfo("TreeHeight", "The height of the tree", typeof(IntData), VariableKind.New | VariableKind.Out));
+      AddVariableInfo(new VariableInfo("LinearRegressionModel", "Formula that was calculated by linear regression", typeof(IGeneticProgrammingModel), VariableKind.Out | VariableKind.New));
     }
 
@@ -54,9 +53,7 @@
       double[] targetVector = PrepareTargetVector(dataset, targetVariable, allowedRows);
       double[] coefficients = CalculateCoefficients(inputMatrix, targetVector);
-      IFunctionTree tree = CreateModel(coefficients, allowedColumns);
-
-      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("LinearRegressionModel"), tree));
-      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("TreeSize"), new IntData(tree.Size)));
-      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("TreeHeight"), new IntData(tree.Height)));
+      IFunctionTree tree = CreateModel(coefficients, allowedColumns.Select(i => dataset.GetVariableName(i)).ToList());
+      
+      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("LinearRegressionModel"), new GeneticProgrammingModel(tree)));
       return null;
     }
@@ -66,5 +63,5 @@
     }
 
-    private IFunctionTree CreateModel(double[] coefficients, List<int> allowedColumns) {
+    private IFunctionTree CreateModel(double[] coefficients, List<string> allowedVariables) {
       IFunctionTree root = new Addition().GetTreeNode();
       IFunctionTree actNode = root;
@@ -73,13 +70,14 @@
       GP.StructureIdentification.Variable v;
       for (int i = 0; i < coefficients.Length - 1; i++) {
-        v = new GP.StructureIdentification.Variable();
-        v.GetVariable(GP.StructureIdentification.Variable.INDEX).Value = new ConstrainedIntData(allowedColumns[i]);
-        v.GetVariable(GP.StructureIdentification.Variable.WEIGHT).Value = new ConstrainedDoubleData(coefficients[i]);
-        v.GetVariable(GP.StructureIdentification.Variable.OFFSET).Value = new ConstrainedIntData(0);
-        nodes.Enqueue(v.GetTreeNode());
+        var vNode = (VariableFunctionTree)new GP.StructureIdentification.Variable().GetTreeNode();
+        vNode.VariableName = allowedVariables[i];
+        vNode.Weight = coefficients[i];
+        vNode.SampleOffset = 0;
+        nodes.Enqueue(vNode);
       }
-      GP.StructureIdentification.Constant c = new Constant();
-      c.GetVariable(GP.StructureIdentification.Constant.VALUE).Value = new ConstrainedDoubleData(coefficients[coefficients.Length - 1]);
-      nodes.Enqueue(c.GetTreeNode());
+      var cNode = (ConstantFunctionTree)new Constant().GetTreeNode();
+
+      cNode.Value = coefficients[coefficients.Length - 1];
+      nodes.Enqueue(cNode);
 
       IFunctionTree newTree;
Index: /trunk/sources/HeuristicLab.Modeling/3.2/HeuristicLabModelingPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling/3.2/HeuristicLabModelingPlugin.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.Modeling/3.2/HeuristicLabModelingPlugin.cs	(revision 2222)
@@ -25,5 +25,5 @@
 using HeuristicLab.PluginInfrastructure;
 
-namespace HeuristicLab.GP.StructureIdentification {
+namespace HeuristicLab.GP.Modeling {
   [ClassInfo(Name = "HeuristicLab.Modeling-3.2")]
   [PluginFile(Filename = "HeuristicLab.Modeling-3.2.dll", Filetype = PluginFileType.Assembly)]
Index: /trunk/sources/HeuristicLab.Random/3.2/NormalDistributedRandom.cs
===================================================================
--- /trunk/sources/HeuristicLab.Random/3.2/NormalDistributedRandom.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.Random/3.2/NormalDistributedRandom.cs	(revision 2222)
@@ -55,5 +55,5 @@
     }
     private IRandom uniform;
-    private double[] w = new double[] {
+    private static readonly double[] w = new double[] {
       1.7290404664e-09,
       1.2680928529e-10,
@@ -185,5 +185,5 @@
       1.6030947680e-09
     };
-    private long[] k = new long[] {
+    private static readonly long[] k = new long[] {
       1991057938,
       0,
@@ -315,5 +315,5 @@
       2010539237
    };
-    private double[] f = new double[] {
+    private static readonly double[] f = new double[] {
       1.0000000000e+00,
       9.6359968185e-01,
Index: /trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs
===================================================================
--- /trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs	(revision 2221)
+++ /trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs	(revision 2222)
@@ -30,5 +30,4 @@
 using HeuristicLab.Data;
 using HeuristicLab.Operators;
-using HeuristicLab.GP.StructureIdentification;
 using HeuristicLab.Logging;
 using HeuristicLab.Operators.Programmable;
Index: /trunk/sources/HeuristicLab.sln
===================================================================
--- /trunk/sources/HeuristicLab.sln	(revision 2221)
+++ /trunk/sources/HeuristicLab.sln	(revision 2222)
@@ -235,4 +235,8 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.LinearRegression-3.2", "HeuristicLab.LinearRegression\3.2\HeuristicLab.LinearRegression-3.2.csproj", "{B9A64475-D542-47CF-9688-735F6224F055}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.GP.Interfaces-3.3", "HeuristicLab.GP.Interfaces\3.3\HeuristicLab.GP.Interfaces-3.3.csproj", "{924B6BEA-9A99-40FE-9334-5C01E8D540EC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.GP.Operators-3.3", "HeuristicLab.GP.Operators\3.3\HeuristicLab.GP.Operators-3.3.csproj", "{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}"
 EndProject
 Global
@@ -922,4 +926,5 @@
 		{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}.Modeling Debug|x64.Build.0 = Debug|x64
 		{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}.Modeling Debug|x86.ActiveCfg = Debug|x86
+		{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}.Modeling Debug|x86.Build.0 = Debug|x86
 		{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}.Release|Any CPU.Build.0 = Release|Any CPU
@@ -3736,6 +3741,8 @@
 		{B9A64475-D542-47CF-9688-735F6224F055}.CEDMA Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{B9A64475-D542-47CF-9688-735F6224F055}.CEDMA Debug|Any CPU.Build.0 = Debug|Any CPU
-		{B9A64475-D542-47CF-9688-735F6224F055}.CEDMA Debug|x64.ActiveCfg = Debug|Any CPU
-		{B9A64475-D542-47CF-9688-735F6224F055}.CEDMA Debug|x86.ActiveCfg = Debug|Any CPU
+		{B9A64475-D542-47CF-9688-735F6224F055}.CEDMA Debug|x64.ActiveCfg = Debug|x64
+		{B9A64475-D542-47CF-9688-735F6224F055}.CEDMA Debug|x64.Build.0 = Debug|x64
+		{B9A64475-D542-47CF-9688-735F6224F055}.CEDMA Debug|x86.ActiveCfg = Debug|x86
+		{B9A64475-D542-47CF-9688-735F6224F055}.CEDMA Debug|x86.Build.0 = Debug|x86
 		{B9A64475-D542-47CF-9688-735F6224F055}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{B9A64475-D542-47CF-9688-735F6224F055}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -3767,4 +3774,72 @@
 		{B9A64475-D542-47CF-9688-735F6224F055}.Visualization Debug|x86.ActiveCfg = Debug|x86
 		{B9A64475-D542-47CF-9688-735F6224F055}.Visualization Debug|x86.Build.0 = Debug|x86
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.CEDMA Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.CEDMA Debug|Any CPU.Build.0 = Debug|Any CPU
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.CEDMA Debug|x64.ActiveCfg = Debug|x64
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.CEDMA Debug|x64.Build.0 = Debug|x64
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.CEDMA Debug|x86.ActiveCfg = Debug|x86
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.CEDMA Debug|x86.Build.0 = Debug|x86
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Debug|x64.ActiveCfg = Debug|x64
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Debug|x64.Build.0 = Debug|x64
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Debug|x86.ActiveCfg = Debug|x86
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Debug|x86.Build.0 = Debug|x86
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Modeling Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Modeling Debug|Any CPU.Build.0 = Debug|Any CPU
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Modeling Debug|x64.ActiveCfg = Debug|x64
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Modeling Debug|x64.Build.0 = Debug|x64
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Modeling Debug|x86.ActiveCfg = Debug|x86
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Modeling Debug|x86.Build.0 = Debug|x86
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Release|Any CPU.Build.0 = Release|Any CPU
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Release|x64.ActiveCfg = Release|x64
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Release|x64.Build.0 = Release|x64
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Release|x86.ActiveCfg = Release|x86
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Release|x86.Build.0 = Release|x86
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.v3.2 Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.v3.2 Debug|Any CPU.Build.0 = Debug|Any CPU
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.v3.2 Debug|x64.ActiveCfg = Debug|x64
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.v3.2 Debug|x64.Build.0 = Debug|x64
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.v3.2 Debug|x86.ActiveCfg = Debug|x86
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.v3.2 Debug|x86.Build.0 = Debug|x86
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Visualization Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Visualization Debug|Any CPU.Build.0 = Debug|Any CPU
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Visualization Debug|x64.ActiveCfg = Debug|Any CPU
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.Visualization Debug|x86.ActiveCfg = Debug|Any CPU
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.CEDMA Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.CEDMA Debug|Any CPU.Build.0 = Debug|Any CPU
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.CEDMA Debug|x64.ActiveCfg = Debug|x64
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.CEDMA Debug|x64.Build.0 = Debug|x64
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.CEDMA Debug|x86.ActiveCfg = Debug|x86
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.CEDMA Debug|x86.Build.0 = Debug|x86
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Debug|x64.ActiveCfg = Debug|x64
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Debug|x64.Build.0 = Debug|x64
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Debug|x86.ActiveCfg = Debug|x86
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Debug|x86.Build.0 = Debug|x86
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Modeling Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Modeling Debug|Any CPU.Build.0 = Debug|Any CPU
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Modeling Debug|x64.ActiveCfg = Debug|x64
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Modeling Debug|x64.Build.0 = Debug|x64
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Modeling Debug|x86.ActiveCfg = Debug|x86
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Modeling Debug|x86.Build.0 = Debug|x86
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Release|x64.ActiveCfg = Release|x64
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Release|x64.Build.0 = Release|x64
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Release|x86.ActiveCfg = Release|x86
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Release|x86.Build.0 = Release|x86
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.v3.2 Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.v3.2 Debug|Any CPU.Build.0 = Debug|Any CPU
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.v3.2 Debug|x64.ActiveCfg = Debug|x64
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.v3.2 Debug|x64.Build.0 = Debug|x64
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.v3.2 Debug|x86.ActiveCfg = Debug|x86
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.v3.2 Debug|x86.Build.0 = Debug|x86
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Visualization Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Visualization Debug|Any CPU.Build.0 = Debug|Any CPU
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Visualization Debug|x64.ActiveCfg = Debug|Any CPU
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A}.Visualization Debug|x86.ActiveCfg = Debug|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
@@ -3853,4 +3928,6 @@
 		{C75532C4-765B-418E-B09B-46D36B2ABDB1} = {410732DB-725A-4824-896B-C298978343C0}
 		{B9A64475-D542-47CF-9688-735F6224F055} = {410732DB-725A-4824-896B-C298978343C0}
+		{924B6BEA-9A99-40FE-9334-5C01E8D540EC} = {410732DB-725A-4824-896B-C298978343C0}
+		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A} = {410732DB-725A-4824-896B-C298978343C0}
 		{A9E282EA-180F-4233-B809-AEDF0787545C} = {78982D7C-D63D-4A3D-AE1F-F58AC007603B}
 		{BF7D9494-A586-457B-8DF9-ED599F9E6A71} = {78982D7C-D63D-4A3D-AE1F-F58AC007603B}
Index: /trunk/sources/HeuristicLab/CopyAssemblies.cmd
===================================================================
--- /trunk/sources/HeuristicLab/CopyAssemblies.cmd	(revision 2221)
+++ /trunk/sources/HeuristicLab/CopyAssemblies.cmd	(revision 2222)
@@ -42,4 +42,6 @@
 copy "%SolutionDir%\HeuristicLab.GP\3.3\%Outdir%\HeuristicLab.GP-3.3.dll" .\plugins
 copy "%SolutionDir%\HeuristicLab.GP\3.4\%Outdir%\HeuristicLab.GP-3.4.dll" .\plugins
+copy "%SolutionDir%\HeuristicLab.GP.Interfaces\3.3\%Outdir%\HeuristicLab.GP.Interfaces-3.3.dll" .\plugins
+copy "%SolutionDir%\HeuristicLab.GP.Operators\3.3\%Outdir%\HeuristicLab.GP.Operators-3.3.dll" .\plugins
 copy "%SolutionDir%\HeuristicLab.GP.Boolean\3.3\%Outdir%\HeuristicLab.GP.Boolean-3.3.dll" .\plugins
 copy "%SolutionDir%\HeuristicLab.GP.SantaFe\3.3\%Outdir%\HeuristicLab.GP.SantaFe-3.3.dll" .\plugins
