Index: trunk/sources/HeuristicLab.Core/3.3/AtomicOperation.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/AtomicOperation.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/AtomicOperation.cs	(revision 1667)
@@ -24,4 +24,5 @@
 using System.Text;
 using System.Xml;
+using HeuristicLab.Persistence.Default.Decomposers.Storable;
 
 namespace HeuristicLab.Core {
@@ -30,4 +31,6 @@
   /// </summary>
   public class AtomicOperation : ItemBase, IOperation {
+
+    [Storable]
     private IOperator myOperator;
     /// <summary>
@@ -37,5 +40,7 @@
       get { return myOperator; }
     }
-    private IScope myScope;  
+
+    [Storable]
+    private IScope myScope;
     /// <summary>
     /// Gets the current scope as <see cref="IScope"/>.
@@ -74,39 +79,4 @@
       return clone;
     }
-
-    #region Persistence Methods
-
-    /// <summary>
-    ///  Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>Calls <see cref="HeuristicLab.Core.StorableBase.GetXmlNode"/> of base 
-    /// class <see cref="ItemBase"/>. <br/>
-    /// The operator is saved as child node having the tag name <c>Operator</c>.<br/>
-    /// The scope is also saved as a child node having the tag name <c>Scope</c>.</remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</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);
-      node.AppendChild(PersistenceManager.Persist("Operator", Operator, document, persistedObjects));
-      node.AppendChild(PersistenceManager.Persist("Scope", Scope, document, persistedObjects));
-      return node;
-    }
-    /// <summary>
-    /// Loads the persisted operation from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>Calls <see cref="HeuristicLab.Core.StorableBase.Populate"/> of base class 
-    /// <see cref="ItemBase"/>.<br/>
-    /// The operator must be saved as a child node with the tag name <c>Operator</c>, also the scope must 
-    /// be saved as a child node having the tag name <c>Scope</c> (see <see cref="GetXmlNode"/>).</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the operation is saved.</param>
-    /// <param name="restoredObjects">A 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);
-      myOperator = (IOperator)PersistenceManager.Restore(node.SelectSingleNode("Operator"), restoredObjects);
-      myScope = (IScope)PersistenceManager.Restore(node.SelectSingleNode("Scope"), restoredObjects);
-    }
-    #endregion
   }
 }
Index: trunk/sources/HeuristicLab.Core/3.3/CompositeOperation.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/CompositeOperation.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/CompositeOperation.cs	(revision 1667)
@@ -24,4 +24,5 @@
 using System.Text;
 using System.Xml;
+using HeuristicLab.Persistence.Default.Decomposers.Storable;
 
 namespace HeuristicLab.Core {
@@ -31,6 +32,7 @@
   /// </summary>
   public class CompositeOperation : ItemBase, IOperation {
+
+    [Storable]
     private bool myExecuteInParallel;
-
     /// <summary>
     /// Gets or sets the bool value, whether the operation should be executed in parallel or not.  
@@ -40,4 +42,6 @@
       set { myExecuteInParallel = value; }
     }
+
+    [Storable]
     private List<IOperation> myOperations;
     /// <summary>
@@ -88,50 +92,4 @@
       return clone;
     }
-
-    #region Persistence Methods
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>Calls <see cref="HeuristicLab.Core.StorableBase.GetXmlNode"/> of base 
-    /// class <see cref="ItemBase"/>.<br/>
-    /// The <see cref="ExecuteInParallel"/> property is saved as <see cref="XmlAttribute"/> with the
-    /// tag name <c>ExecuteInParallel</c>. A child node with tag name <c>Operations</c> is created where
-    /// all operations are saved as child nodes.</remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</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);
-      XmlAttribute parallelAttribute = document.CreateAttribute("ExecuteInParallel");
-      parallelAttribute.Value = ExecuteInParallel.ToString();
-      node.Attributes.Append(parallelAttribute);
-
-      XmlNode operationsNode = document.CreateNode(XmlNodeType.Element, "Operations", null);
-      for (int i = 0; i < Operations.Count; i++)
-        operationsNode.AppendChild(PersistenceManager.Persist(Operations[i], document, persistedObjects));
-      node.AppendChild(operationsNode);
-      return node;
-    }
-    /// <summary>
-    /// Loads the persisted operation from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>The <see cref="ExecuteInParallel"/> property must be saved as <see cref="XmlAttribute"/>
-    /// with the tag name <c>ExecuteInParallel</c>. <br/>
-    /// The single operations must be saved as child nodes of a node with tag name <c>Operations</c>, 
-    /// being a child node of the current instance. <br/>
-    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the operation is saved.</param>
-    /// <param name="restoredObjects">A 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);
-
-      myExecuteInParallel = bool.Parse(node.Attributes["ExecuteInParallel"].Value);
-
-      XmlNode operationsNode = node.SelectSingleNode("Operations");
-      for (int i = 0; i < operationsNode.ChildNodes.Count; i++)
-        AddOperation((IOperation)PersistenceManager.Restore(operationsNode.ChildNodes[i], restoredObjects));
-    }
-    #endregion
   }
 }
Index: trunk/sources/HeuristicLab.Core/3.3/ConstrainedItemBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/ConstrainedItemBase.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/ConstrainedItemBase.cs	(revision 1667)
@@ -24,4 +24,5 @@
 using System.Text;
 using System.Xml;
+using HeuristicLab.Persistence.Default.Decomposers.Storable;
 
 namespace HeuristicLab.Core {
@@ -30,4 +31,6 @@
   /// </summary>
   public abstract class ConstrainedItemBase : ItemBase, IConstrainedItem {
+
+    [Storable]
     private List<IConstraint> myConstraints;
     /// <summary>
@@ -144,46 +147,4 @@
         ConstraintRemoved(this, new ConstraintEventArgs(constraint));
     }
-
-    #region Persistence Methods  
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>. <br/>
-    /// For saving the constraints a child node is created having the tag name <c>Constraints</c>. Beyond this
-    /// child node all constraints are saved as child nodes themselves.</remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</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);
-      if (Constraints.Count > 0) {
-        XmlNode constraintsNode = document.CreateNode(XmlNodeType.Element, "Constraints", null);
-        foreach (IConstraint constraint in Constraints)
-          constraintsNode.AppendChild(PersistenceManager.Persist(constraint, document, persistedObjects));
-        node.AppendChild(constraintsNode);
-      }
-      return node;
-    }
-    /// <summary>
-    /// Loads the persisted item from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>See <see cref="GetXmlNode"/> to get information about how the constrained item must
-    /// be saved. <br/>
-    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the constrained item 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);
-      XmlNode constraintsNode = node.SelectSingleNode("Constraints");
-      if (constraintsNode != null) {
-        myConstraints.Clear();
-        foreach (XmlNode constraintNode in constraintsNode.ChildNodes)
-          AddConstraint((IConstraint)PersistenceManager.Restore(constraintNode, restoredObjects));
-      }
-    }
-    #endregion
   }
 }
Index: trunk/sources/HeuristicLab.Core/3.3/EngineBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/EngineBase.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/EngineBase.cs	(revision 1667)
@@ -25,4 +25,5 @@
 using System.Xml;
 using System.Threading;
+using HeuristicLab.Persistence.Default.Decomposers.Storable;
 
 namespace HeuristicLab.Core {
@@ -33,7 +34,9 @@
   /// </summary>
   public abstract class EngineBase : ItemBase, IEngine {
+
     /// <summary>
     /// Field of the current instance that represent the operator graph.
     /// </summary>
+    [Storable]
     protected IOperatorGraph myOperatorGraph;
     /// <summary>
@@ -46,4 +49,5 @@
     /// Field of the current instance that represent the global scope.
     /// </summary>
+    [Storable]
     protected IScope myGlobalScope;
     /// <summary>
@@ -54,4 +58,5 @@
     }
 
+    [Storable]
     private TimeSpan myExecutionTime;
     /// <summary>
@@ -70,4 +75,5 @@
     /// Field of the current instance that represent the execution stack.
     /// </summary>
+    [Storable]
     protected Stack<IOperation> myExecutionStack;
     /// <summary>
@@ -77,5 +83,5 @@
       get { return myExecutionStack; }
     }
-    
+
     /// <summary>
     /// Flag of the current instance whether it is currently running.
@@ -136,5 +142,4 @@
       clone.myCanceled = Canceled;
       return clone;
-      
     }
 
@@ -276,74 +281,4 @@
         Finished(this, new EventArgs());
     }
-
-    #region Persistence Methods
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>.<br/>
-    /// A quick overview how the single elements of the current instance are saved:
-    /// <list type="bullet">
-    /// <item>
-    /// <term>Operator graph: </term>
-    /// <description>Saved as a child node with the tag name <c>OperatorGraph</c>.</description>
-    /// </item>
-    /// <item>
-    /// <term>Global scope: </term>
-    /// <description>Saved as a child node with the tag name <c>GlobalScope</c>.</description> 
-    /// </item>
-    /// <item>
-    /// <term>Execution stack: </term>
-    /// <description>A child node is created with the tag name <c>ExecutionStack</c>. Beyond this child node
-    /// all operations of the execution stack are saved as child nodes.</description>
-    /// </item>
-    /// <item>
-    /// <term>Execution time: </term>
-    /// <description>Saved as a child node with the tag name <c>ExecutionTime</c>, where the execution
-    /// time is saved as string in the node's inner text.</description>
-    /// </item>
-    /// </list></remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</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);
-
-      node.AppendChild(PersistenceManager.Persist("OperatorGraph", OperatorGraph, document, persistedObjects));
-      node.AppendChild(PersistenceManager.Persist("GlobalScope", GlobalScope, document, persistedObjects));
-
-      XmlNode stackNode = document.CreateNode(XmlNodeType.Element, "ExecutionStack", null);
-      IOperation[] operations = new IOperation[ExecutionStack.Count];
-      ExecutionStack.CopyTo(operations, 0);
-      for (int i = 0; i < operations.Length; i++)
-        stackNode.AppendChild(PersistenceManager.Persist(operations[i], document, persistedObjects));
-      node.AppendChild(stackNode);
-
-      XmlNode timeNode = document.CreateNode(XmlNodeType.Element, "ExecutionTime", null);
-      timeNode.InnerText = ExecutionTime.ToString();
-      node.AppendChild(timeNode);
-      return node;
-    }
-    /// <summary>
-    ///  Loads the persisted instance from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>See <see cref="GetXmlNode"/> to get information on how the instance must be saved. <br/>
-    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the engine 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);
-      myOperatorGraph = (IOperatorGraph)PersistenceManager.Restore(node.SelectSingleNode("OperatorGraph"), restoredObjects);
-      myGlobalScope = (IScope)PersistenceManager.Restore(node.SelectSingleNode("GlobalScope"), restoredObjects);
-
-      XmlNode stackNode = node.SelectSingleNode("ExecutionStack");
-      for (int i = stackNode.ChildNodes.Count - 1; i >= 0; i--)
-        myExecutionStack.Push((IOperation)PersistenceManager.Restore(stackNode.ChildNodes[i], restoredObjects));
-
-      XmlNode timeNode = node.SelectSingleNode("ExecutionTime");
-      myExecutionTime = TimeSpan.Parse(timeNode.InnerText);
-    }
-    #endregion
   }
 }
Index: trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj	(revision 1667)
@@ -32,4 +32,5 @@
     <UseApplicationTrust>false</UseApplicationTrust>
     <BootstrapperEnabled>true</BootstrapperEnabled>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -90,4 +91,7 @@
   <ItemGroup>
     <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
     <Reference Include="System.Data" />
     <Reference Include="System.Drawing" />
@@ -268,4 +272,8 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
Index: trunk/sources/HeuristicLab.Core/3.3/HeuristicLabCorePlugin.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/HeuristicLabCorePlugin.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/HeuristicLabCorePlugin.cs	(revision 1667)
@@ -30,6 +30,7 @@
   /// Plugin class for HeuristicLab.Core plugin.
   /// </summary>
-  [ClassInfo(Name = "HeuristicLab.Core-3.2")]
-  [PluginFile(Filename = "HeuristicLab.Core-3.2.dll", Filetype = PluginFileType.Assembly)]
+  [ClassInfo(Name = "HeuristicLab.Core-3.3")]
+  [PluginFile(Filename = "HeuristicLab.Core-3.3.dll", Filetype = PluginFileType.Assembly)]
+  [Dependency(Dependency="HeuristicLab.Persistence-3.3")]
   public class HeuristicLabCorePlugin : PluginBase {
   }
Index: trunk/sources/HeuristicLab.Core/3.3/Interfaces/IStorable.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Interfaces/IStorable.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/Interfaces/IStorable.cs	(revision 1667)
@@ -26,8 +26,10 @@
 
 namespace HeuristicLab.Core {
+
   /// <summary>
   /// Interface to represent objects that are de- and serializeable.
   /// </summary>
   public interface IStorable {
+
     /// <summary>
     /// Gets the objects unique identifier.
@@ -40,4 +42,5 @@
     /// <returns>The cloned object.</returns>
     object Clone();
+
     /// <summary>
     /// Clones the current instance, considering already cloned objects.
@@ -46,22 +49,4 @@
     /// <returns>The cloned object.</returns>
     object Clone(IDictionary<Guid, object> clonedObjects);
-
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the specified 
-    /// <typeparamref name="document"/>.
-    /// </summary>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
-    /// <param name="persistedObjects">The dictionary of all already persisted objects. 
-    /// (Needed to avoid cycles.)</param>
-    /// <returns>The saved <see cref="XmlNode"/>.</returns>
-    XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects);
-    /// <summary>
-    /// Loads the persisted object from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <param name="node">The <see cref="XmlNode"/> where the object is saved.</param>
-    /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid 
-    /// cycles.)</param>
-    void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects);
   }
 }
Index: trunk/sources/HeuristicLab.Core/3.3/OperatorBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/OperatorBase.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/OperatorBase.cs	(revision 1667)
@@ -24,4 +24,5 @@
 using System.Text;
 using System.Xml;
+using HeuristicLab.Persistence.Default.Decomposers.Storable;
 
 namespace HeuristicLab.Core {
@@ -30,4 +31,6 @@
   /// </summary>
   public abstract class OperatorBase : ConstrainedItemBase, IOperator {
+
+    [Storable]
     private string myName;
     /// <summary>
@@ -59,4 +62,6 @@
       get { return myCanceled; }
     }
+
+    [Storable]
     private bool myBreakpoint;
     /// <inheritdoc/>
@@ -72,4 +77,5 @@
     }
 
+    [Storable]
     private List<IOperator> mySubOperators;
     /// <summary>
@@ -80,4 +86,6 @@
       get { return mySubOperators.AsReadOnly(); }
     }
+
+    [Storable]
     private Dictionary<string, IVariableInfo> myVariableInfos;
     /// <inheritdoc/>
@@ -85,4 +93,6 @@
       get { return myVariableInfos.Values; }
     }
+
+    [Storable]
     private Dictionary<string, IVariable> myVariables;
     /// <inheritdoc/>
@@ -589,93 +599,4 @@
       }
     }
-
-    #region Persistence Methods
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>
-    /// Calls <see cref="ConstrainedItemBase.GetXmlNode"/> of base class <see cref="ConstrainedItemBase"/>.
-    /// <br/>A quick overview how the single elements of the current instance are saved:
-    /// <list type="bullet">
-    /// <item>
-    /// <term>Name: </term>
-    /// <description>Saved as an <see cref="XmlAttribute"/> with the name <c>Name</c>.</description>
-    /// </item>
-    /// <item>
-    /// <term>Breakpoint: </term>
-    /// <description>Is only saved if it set to <c>true</c>. 
-    /// Saved as an <see cref="XmlAttribute"/> with the name <c>Breakpoint</c>.</description>
-    /// </item>
-    /// <item>
-    /// <term>Sub operators: </term>
-    /// <description>Saved as child node with tag name <c>SubOperators</c>. All sub operators are themselves
-    /// saved as child nodes.</description>
-    /// </item>
-    /// <item>
-    /// <term>Variable infos: </term>
-    /// <description>Saved as child node with tag name <c>VariableInfos</c>. All variable infos are themselves
-    /// saved as child nodes.</description>
-    /// </item>
-    /// <item>
-    /// <term>Variables: </term>
-    /// <description>Saved as child node with tag name <c>Variables</c>. All variables are themselves
-    /// saved as child nodes.</description>
-    /// </item> 
-    /// </list>
-    /// </remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</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);
-      XmlAttribute nameAttribute = document.CreateAttribute("Name");
-      nameAttribute.Value = Name;
-      node.Attributes.Append(nameAttribute);
-      if (Breakpoint) {
-        XmlAttribute breakpointAttribute = document.CreateAttribute("Breakpoint");
-        breakpointAttribute.Value = Breakpoint.ToString();
-        node.Attributes.Append(breakpointAttribute);
-      }
-      XmlNode subOperatorsNode = document.CreateNode(XmlNodeType.Element, "SubOperators", null);
-      for (int i = 0; i < SubOperators.Count; i++)
-        subOperatorsNode.AppendChild(PersistenceManager.Persist(SubOperators[i], document, persistedObjects));
-      node.AppendChild(subOperatorsNode);
-      XmlNode infosNode = document.CreateNode(XmlNodeType.Element, "VariableInfos", null);
-      foreach (IVariableInfo info in myVariableInfos.Values)
-        infosNode.AppendChild(PersistenceManager.Persist(info, document, persistedObjects));
-      node.AppendChild(infosNode);
-      XmlNode variablesNode = document.CreateNode(XmlNodeType.Element, "Variables", null);
-      foreach (IVariable variable in myVariables.Values)
-        variablesNode.AppendChild(PersistenceManager.Persist(variable, document, persistedObjects));
-      node.AppendChild(variablesNode);
-      return node;
-    }
-    /// <summary>
-    /// Loads the persisted operation from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>Calls <see cref="ConstrainedItemBase.Populate"/> of base class 
-    /// <see cref="ConstrainedItemBase"/>.
-    /// For informations how the different elements must be saved please see <see cref="GetXmlNode"/>.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the operation is saved.</param>
-    /// <param name="restoredObjects">A 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);
-      myName = node.Attributes["Name"].Value;
-      if (node.Attributes["Breakpoint"] != null)
-        myBreakpoint = bool.Parse(node.Attributes["Breakpoint"].Value);
-      XmlNode subOperatorsNode = node.SelectSingleNode("SubOperators");
-      for (int i = 0; i < subOperatorsNode.ChildNodes.Count; i++)
-        AddSubOperator((IOperator)PersistenceManager.Restore(subOperatorsNode.ChildNodes[i], restoredObjects));
-      XmlNode infosNode = node.SelectSingleNode("VariableInfos");
-      myVariableInfos.Clear();
-      foreach (XmlNode infoNode in infosNode.ChildNodes)
-        AddVariableInfo((IVariableInfo)PersistenceManager.Restore(infoNode, restoredObjects));
-      XmlNode variablesNode = node.SelectSingleNode("Variables");
-      myVariables.Clear();
-      foreach (XmlNode variableNode in variablesNode.ChildNodes)
-        AddVariable((IVariable)PersistenceManager.Restore(variableNode, restoredObjects));
-    }
-    #endregion
   }
 }
Index: trunk/sources/HeuristicLab.Core/3.3/OperatorGraph.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/OperatorGraph.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/OperatorGraph.cs	(revision 1667)
@@ -24,4 +24,5 @@
 using System.Text;
 using System.Xml;
+using HeuristicLab.Persistence.Default.Decomposers.Storable;
 
 namespace HeuristicLab.Core {
@@ -30,4 +31,6 @@
   /// </summary>
   public class OperatorGraph : ItemBase, IOperatorGraph {
+
+    [Storable]
     private IDictionary<Guid, IOperator> myOperators;
     /// <summary>
@@ -37,4 +40,6 @@
       get { return myOperators.Values; }
     }
+
+    [Storable]
     private IOperator myInitialOperator;
     /// <summary>
@@ -165,51 +170,4 @@
         InitialOperatorChanged(this, new EventArgs());
     }
-
-    #region Persistence Methods
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>.<br/>
-    /// To save the operators of the current instance a child node is created with the tag name 
-    /// <c>Operators</c>. Beyond this child node all operators are saved as child nodes themselves.<br/>
-    /// The initial operator is saved as child node with the tag name <c>InitialOperator</c>.</remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</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 ops = document.CreateNode(XmlNodeType.Element, "Operators", null);
-      foreach (IOperator op in myOperators.Values)
-        ops.AppendChild(PersistenceManager.Persist(op, document, persistedObjects));
-      node.AppendChild(ops);
-      if (InitialOperator != null)
-        node.AppendChild(PersistenceManager.Persist("InitialOperator", InitialOperator, document, persistedObjects));
-      return node;
-    }
-    /// <summary>
-    /// Loads the persisted operator graph from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>See <see cref="GetXmlNode"/> to get more information about how the graph must be saved. <br/>
-    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the operator graph 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);
-
-      XmlNode ops = node.SelectSingleNode("Operators");
-      for (int i = 0; i < ops.ChildNodes.Count; i++) {
-        XmlNode opNode = ops.ChildNodes[i];
-        IOperator op = (IOperator)PersistenceManager.Restore(opNode, restoredObjects);
-        myOperators.Add(op.Guid, op);
-      }
-
-      XmlNode initial = node.SelectSingleNode("InitialOperator");
-      if (initial != null)
-        myInitialOperator = (IOperator)PersistenceManager.Restore(initial, restoredObjects);
-    }
-    #endregion
   }
 }
Index: trunk/sources/HeuristicLab.Core/3.3/OperatorGroup.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/OperatorGroup.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/OperatorGroup.cs	(revision 1667)
@@ -24,4 +24,5 @@
 using System.Text;
 using System.Xml;
+using HeuristicLab.Persistence.Default.Decomposers.Storable;
 
 namespace HeuristicLab.Core {
@@ -30,4 +31,6 @@
   /// </summary>
   public class OperatorGroup : StorableBase, IOperatorGroup {
+
+    [Storable]
     private string myName;
     /// <summary>
@@ -44,4 +47,6 @@
       }
     }
+
+    [Storable]
     private List<IOperatorGroup> mySubGroups;
     /// <summary>
@@ -52,4 +57,6 @@
       get { return mySubGroups.AsReadOnly(); }
     }
+
+    [Storable]
     private List<IOperator> myOperators;
     /// <summary>
@@ -128,66 +135,4 @@
       }
     }
-
-    #region Persistence Methods
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>.<br/>
-    /// A quick overview how the single elements of the current instance are saved:
-    /// <list type="bullet">
-    /// <item>
-    /// <term>Name: </term>
-    /// <description>Saved as an <see cref="XmlAttribute"/> with attribute name <c>Name</c>.</description>
-    /// </item>
-    /// <item>
-    /// <term>Sub groups: </term>
-    /// <description>A child node is created with tag name <c>SubGroups</c>. Beyond this child node 
-    /// all sub operator groups are saved as child nodes themselves.</description>
-    /// </item>
-    /// <item>
-    /// <term>Operators: </term>
-    /// <description>A child node is created with tag name <c>Operators</c>. Beyond this child node
-    /// all operators are saved as child nodes themselves.</description>
-    /// </item>
-    /// </list>
-    /// </remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</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);
-      XmlAttribute nameAttribute = document.CreateAttribute("Name");
-      nameAttribute.Value = Name;
-      node.Attributes.Append(nameAttribute);
-      XmlNode subGroupsNode = document.CreateNode(XmlNodeType.Element, "SubGroups", null);
-      foreach (IOperatorGroup group in SubGroups)
-        subGroupsNode.AppendChild(PersistenceManager.Persist(group, document, persistedObjects));
-      node.AppendChild(subGroupsNode);
-      XmlNode operatorsNode = document.CreateNode(XmlNodeType.Element, "Operators", null);
-      foreach (IOperator op in Operators)
-        operatorsNode.AppendChild(PersistenceManager.Persist(op, document, persistedObjects));
-      node.AppendChild(operatorsNode);
-      return node;
-    }
-    /// <summary>
-    /// Loads the persisted operator group from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>See <see cref="GetXmlNode"/> to get information about how the data must be saved. <br/>
-    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="StorableBase"/>.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the boolean value 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);
-      myName = node.Attributes["Name"].Value;
-      XmlNode subGroupsNode = node.SelectSingleNode("SubGroups");
-      foreach (XmlNode subGroupNode in subGroupsNode.ChildNodes)
-        AddSubGroup((IOperatorGroup)PersistenceManager.Restore(subGroupNode, restoredObjects));
-      XmlNode operatorsNode = node.SelectSingleNode("Operators");
-      foreach (XmlNode operatorNode in operatorsNode.ChildNodes)
-        AddOperator((IOperator)PersistenceManager.Restore(operatorNode, restoredObjects));
-    }
-    #endregion
   }
 }
Index: trunk/sources/HeuristicLab.Core/3.3/OperatorLibrary.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/OperatorLibrary.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/OperatorLibrary.cs	(revision 1667)
@@ -24,4 +24,5 @@
 using System.Text;
 using System.Xml;
+using HeuristicLab.Persistence.Default.Decomposers.Storable;
 
 namespace HeuristicLab.Core {
@@ -30,4 +31,6 @@
   /// </summary>
   public class OperatorLibrary : ItemBase, IOperatorLibrary, IEditable {
+
+    [Storable]
     private IOperatorGroup myGroup;
     /// <summary>
@@ -73,34 +76,4 @@
       return clone;
     }
-
-    #region Persistence Methods
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>.<br/>
-    /// The operator group is saved as a child node with the tag name <c>OperatorGroup</c>.</remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</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);
-      node.AppendChild(PersistenceManager.Persist("OperatorGroup", Group, document, persistedObjects));
-      return node;
-    }
-    /// <summary>
-    /// Loads the persisted operator library from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.<br/>
-    /// See <see cref="GetXmlNode"/> for further information on how the data must be saved.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the operator library 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);
-      myGroup = (IOperatorGroup)PersistenceManager.Restore(node.SelectSingleNode("OperatorGroup"), restoredObjects);
-    }
-    #endregion
   }
 }
Index: trunk/sources/HeuristicLab.Core/3.3/PersistenceManager.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/PersistenceManager.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/PersistenceManager.cs	(revision 1667)
@@ -27,4 +27,5 @@
 using System.IO.Compression;
 using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Persistence.Default.Xml;
 
 namespace HeuristicLab.Core {
@@ -34,72 +35,4 @@
   public static class PersistenceManager {
     /// <summary>
-    /// Creates an <see cref="XmlDocument"/> to persist an object with xml declaration.
-    /// </summary>
-    /// <returns>The created <see cref="XmlDocument"/>.</returns>
-    public static XmlDocument CreateXmlDocument() {
-      XmlDocument document = new XmlDocument();
-      document.AppendChild(document.CreateXmlDeclaration("1.0", null, null));
-      return document;
-    }
-    /// <summary>
-    /// Saves the specified <paramref name="instance"/> in the specified <paramref name="document"/>
-    /// if it has not already been serialized.
-    /// </summary>
-    /// <remarks>The tag name of the saved instance is its type name.<br/>
-    /// The guid is saved as an <see cref="XmlAttribute"/> with tag name <c>GUID</c>.</remarks>
-    /// <param name="instance">The object that should be saved.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
-    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
-    /// <returns>The saved <see cref="XmlNode"/>.</returns>
-    public static XmlNode Persist(IStorable instance, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
-      string name = instance.GetType().Name;
-      name = name.Replace('`', '_');
-      return Persist(name, instance, document, persistedObjects);
-    }
-    /// <summary>
-    /// Saves the specified <paramref name="instance"/> in the specified <paramref name="document"/>
-    /// if it has not already been serialized.
-    /// </summary>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="instance">The object that should be saved.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
-    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
-    /// <returns>The saved <see cref="XmlNode"/>.</returns>
-    public static XmlNode Persist(string name, IStorable instance, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
-      if(persistedObjects.ContainsKey(instance.Guid)) {
-        XmlNode node = document.CreateNode(XmlNodeType.Element, name, null);
-        XmlAttribute guidAttribute = document.CreateAttribute("GUID");
-        guidAttribute.Value = instance.Guid.ToString();
-        node.Attributes.Append(guidAttribute);
-        return node;
-      } else {
-        persistedObjects.Add(instance.Guid, instance);
-        XmlNode node = instance.GetXmlNode(name, document, persistedObjects);
-        return node;
-      }
-    }
-    /// <summary>
-    /// Loads a persisted object from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>The guid is saved as an attribute with tag name <c>GUID</c>. The type of the 
-    /// persisted object is saved as attribute with tag name <c>Type</c>.<br/>
-    /// Calls <c>instance.Populate</c>.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the object is saved.</param>
-    /// <param name="restoredObjects">A dictionary of all already restored objects. 
-    /// (Needed to avoid cycles.)</param>
-    /// <returns>The loaded object.</returns>
-    public static IStorable Restore(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
-      Guid guid = new Guid(node.Attributes["GUID"].Value);
-      if(restoredObjects.ContainsKey(guid)) {
-        return restoredObjects[guid];
-      } else {
-        Type type = Type.GetType(node.Attributes["Type"].Value, true);
-        IStorable instance = (IStorable)Activator.CreateInstance(type);
-        restoredObjects.Add(guid, instance);
-        instance.Populate(node, restoredObjects);
-        return instance;
-      }
-    }
-    /// <summary>
     /// Saves the specified <paramref name="instance"/> in the specified file through creating an 
     /// <see cref="XmlDocument"/>.
@@ -108,9 +41,7 @@
     /// <param name="filename">The name of the file where the <paramref name="object"/> should be saved.</param>
     public static void Save(IStorable instance, string filename) {
-      using(FileStream stream = File.Create(filename)) {
-        Save(instance, stream);
-        stream.Close();
-      }
+      XmlGenerator.Serialize(instance, filename);
     }
+
     /// <summary>
     /// Saves the specified <paramref name="instance"/> in the specified <paramref name="stream"/> 
@@ -120,29 +51,16 @@
     /// <param name="stream">The (file) stream where the object should be saved.</param>
     public static void Save(IStorable instance, Stream stream) {
-      XmlDocument document = PersistenceManager.CreateXmlDocument();
-      Dictionary<Guid, IStorable> dictionary = new Dictionary<Guid, IStorable>();
-      XmlNode rootNode = document.CreateElement("Root");
-      document.AppendChild(rootNode);
-      XmlNode necessaryPluginsNode = document.CreateElement("NecessaryPlugins");
-      rootNode.AppendChild(necessaryPluginsNode);
-      rootNode.AppendChild(Persist(instance, document, dictionary));
-      // determine the list of necessary plugins for this document
-      DiscoveryService service = new DiscoveryService();
-      List<PluginInfo> plugins = new List<PluginInfo>();
-      foreach(IStorable storeable in dictionary.Values) {
-        PluginInfo pluginInfo = service.GetDeclaringPlugin(storeable.GetType());
-        if(!plugins.Contains(pluginInfo)) plugins.Add(pluginInfo);
-      }
-      foreach(PluginInfo uniquePlugin in plugins) {
-        XmlNode necessaryPluginNode = document.CreateElement("Plugin");
-        XmlAttribute nameAttr = document.CreateAttribute("Name");
-        nameAttr.Value = uniquePlugin.Name;
-        XmlAttribute versionAttr = document.CreateAttribute("Version");
-        versionAttr.Value = uniquePlugin.Version.ToString();
-        necessaryPluginNode.Attributes.Append(nameAttr);
-        necessaryPluginNode.Attributes.Append(versionAttr);
-        necessaryPluginsNode.AppendChild(necessaryPluginNode);
-      }
-      document.Save(stream);
+      string tempfile = Path.GetTempFileName();
+      XmlGenerator.Serialize(instance, tempfile);
+      Stream reader = new FileStream(tempfile, FileMode.Open);
+      byte[] buffer = new byte[1024];
+      int bytesRead = 0;
+      do {
+        bytesRead = reader.Read(buffer, 0, buffer.Length);
+        stream.Write(buffer, 0, bytesRead);
+      } while (bytesRead > 0);
+      reader.Close();
+      stream.Close();
+      File.Delete(tempfile);
     }
     /// <summary>
@@ -154,9 +72,5 @@
     /// <returns>The loaded object.</returns>
     public static IStorable Load(string filename) {
-      using(FileStream stream = File.OpenRead(filename)) {
-        IStorable storable = Load(stream);
-        stream.Close();
-        return storable;
-      }
+      return (IStorable)XmlParser.DeSerialize(filename);
     }
     /// <summary>
@@ -168,38 +82,17 @@
     /// <returns>The loaded object.</returns>
     public static IStorable Load(Stream stream) {
-      XmlDocument doc = new XmlDocument();
-      doc.Load(stream);
-      XmlNode rootNode = doc.ChildNodes[1];
-      if(rootNode.Name == "Root" && rootNode.ChildNodes.Count == 2) {
-        // load documents that have a list of necessary plugins at the top
-        return PersistenceManager.Restore(rootNode.ChildNodes[1], new Dictionary<Guid, IStorable>());
-      } else {
-        // compatibility to load documents without list of necessary plugins 
-        return PersistenceManager.Restore(rootNode, new Dictionary<Guid, IStorable>());
-      }
-    }
-
-    /// <summary>
-    /// Loads an object from a zip file.
-    /// </summary>
-    /// <param name="serializedStorable">The zip file from where to load as byte array.</param>
-    /// <returns>The loaded object.</returns>
-    public static IStorable RestoreFromGZip(byte[] serializedStorable) {
-      GZipStream stream = new GZipStream(new MemoryStream(serializedStorable), CompressionMode.Decompress);
-      return Load(stream);
-    }
-
-    /// <summary>
-    /// Saves the specified <paramref name="storable"/> in a zip file.
-    /// </summary>
-    /// <remarks>Calls <see cref="Save(HeuristicLab.Core.IStorable, Stream)"/>.</remarks>
-    /// <param name="storable">The object to save.</param>
-    /// <returns>The zip stream as byte array.</returns>
-    public static byte[] SaveToGZip(IStorable storable) {
-      MemoryStream memStream = new MemoryStream();
-      GZipStream stream = new GZipStream(memStream, CompressionMode.Compress, true);
-      Save(storable, stream);
+      string tempfile = Path.GetTempFileName();
+      Stream writer = new FileStream(tempfile, FileMode.CreateNew);
+      byte[] buffer = new byte[1024];
+      int bytesRead = 0;
+      do {
+        bytesRead = stream.Read(buffer, 0, buffer.Length);
+        writer.Write(buffer, 0, bytesRead);
+      } while (bytesRead > 0);
       stream.Close();
-      return memStream.ToArray();
+      writer.Close();
+      object o = XmlParser.DeSerialize(tempfile);
+      File.Delete(tempfile);
+      return (IStorable)o;
     }
 
@@ -219,9 +112,9 @@
       builder.Append(type.Name);
       Type[] args = type.GetGenericArguments();
-      if(args.Length > 0) {
+      if (args.Length > 0) {
         builder.Append("[[");
         builder.Append(BuildTypeString(args[0]));
         builder.Append("]");
-        for(int i = 1; i < args.Length; i++) {
+        for (int i = 1; i < args.Length; i++) {
           builder.Append(",[");
           builder.Append(BuildTypeString(args[i]));
Index: trunk/sources/HeuristicLab.Core/3.3/Scope.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Scope.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/Scope.cs	(revision 1667)
@@ -24,4 +24,5 @@
 using System.Text;
 using System.Xml;
+using HeuristicLab.Persistence.Default.Decomposers.Storable;
 
 namespace HeuristicLab.Core {
@@ -30,7 +31,9 @@
   /// </summary>
   public class Scope : ItemBase, IScope {
+
     private IScope parent;
 
-    private string myName; 
+    [Storable]
+    private string myName;
     /// <summary>
     /// Gets the name of the current scope.
@@ -40,4 +43,5 @@
     }
 
+    [Storable]
     private IDictionary<string, IVariable> myVariables;
     /// <inheritdoc/>
@@ -45,4 +49,6 @@
       get { return myVariables.Values; }
     }
+
+    [Storable]
     private IDictionary<string, string> myAliases;
     /// <inheritdoc/>
@@ -50,4 +56,6 @@
       get { return myAliases; }
     }
+
+    [Storable]
     private List<IScope> mySubScopes;
     /// <summary>
@@ -238,5 +246,5 @@
         RemoveVariable(variableNames[j]);
 
-      KeyValuePair<string, string>[] aliases = new KeyValuePair<string,string>[myAliases.Count];
+      KeyValuePair<string, string>[] aliases = new KeyValuePair<string, string>[myAliases.Count];
       myAliases.CopyTo(aliases, 0);
       for (int j = 0; j < aliases.Length; j++)
@@ -333,103 +341,4 @@
         SubScopesReordered(this, new EventArgs());
     }
-
-    #region Persistence Methods
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the given <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>
-    /// Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>.<br/>
-    /// A quick overview how the single elements of the current instance are saved:
-    /// <list type="bullet">
-    /// <item>
-    /// <term>Name: </term>
-    /// <description>Saved as an <see cref="XmlAttribute"/> having the tag name <c>Name</c>.</description>
-    /// </item>
-    /// <item>
-    /// <term>Variables: </term>
-    /// <description>A child node is created with the tag name <c>Variables</c>. Beyond this child node,
-    /// all variables are saved as child nodes.</description>
-    /// </item>
-    /// <item>
-    /// <term>Aliases: </term>
-    /// <description>A child node is created with the tag name <c>Aliases</c>. Beyond this child node, 
-    /// all aliases are saved as child nodes with the tag name <c>Alias</c>. Each alias has an
-    /// <see cref="XmlAttribute"/> with the tag name "Alias", holding the alias, and an attribute 
-    /// with the tag name <c>Name</c>, holding the name of the alias.</description>
-    /// </item>
-    /// <item>
-    /// <term>Sub scopes: </term>
-    /// <description>A child node is created with the tag name <c>SubScopes</c>. Beyond this child node,
-    /// all sub scopes are saved as child nodes.</description>
-    /// </item>
-    /// </list>
-    /// </remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</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);
-      XmlAttribute nameAttribute = document.CreateAttribute("Name");
-      nameAttribute.Value = Name.ToString();
-      node.Attributes.Append(nameAttribute);
-
-      XmlNode variables = document.CreateNode(XmlNodeType.Element, "Variables", null);
-      foreach (IVariable variable in Variables)
-        variables.AppendChild(PersistenceManager.Persist(variable, document, persistedObjects));
-      node.AppendChild(variables);
-
-      XmlNode aliases = document.CreateNode(XmlNodeType.Element, "Aliases", null);
-      foreach (KeyValuePair<string, string> alias in myAliases) {
-        XmlNode aliasNode = document.CreateNode(XmlNodeType.Element, "Alias", null);
-        XmlAttribute keyAttribute = document.CreateAttribute("Alias");
-        keyAttribute.Value = alias.Key;
-        aliasNode.Attributes.Append(keyAttribute);
-        XmlAttribute valueAttribute = document.CreateAttribute("Name");
-        valueAttribute.Value = alias.Value;
-        aliasNode.Attributes.Append(valueAttribute);
-        aliases.AppendChild(aliasNode);
-      }
-      node.AppendChild(aliases);
-
-      XmlNode subScopes = document.CreateNode(XmlNodeType.Element, "SubScopes", null);
-      for (int i = 0; i < SubScopes.Count; i++)
-        subScopes.AppendChild(PersistenceManager.Persist(SubScopes[i], document, persistedObjects));
-      node.AppendChild(subScopes);
-
-      return node;
-    }
-    /// <summary>
-    /// Loads the persisted scope from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>See <see cref="GetXmlNode"/> to get further information on how the current instance must
-    /// be saved. <br/>
-    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the boolean value 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);
-      myName = node.Attributes["Name"].Value;
-
-      XmlNode variables = node.SelectSingleNode("Variables");
-      foreach (XmlNode variableNode in variables.ChildNodes) {
-        IVariable variable = (IVariable)PersistenceManager.Restore(variableNode, restoredObjects);
-        AddVariable(variable);
-      }
-
-      XmlNode aliases = node.SelectSingleNode("Aliases");
-      if (aliases != null) {
-        foreach (XmlNode aliasNode in aliases.ChildNodes)
-          AddAlias(aliasNode.Attributes["Alias"].Value, aliasNode.Attributes["Name"].Value);
-      }
-
-      XmlNode subScopes = node.SelectSingleNode("SubScopes");
-      for (int i = 0; i < subScopes.ChildNodes.Count; i++) {
-        IScope scope = (IScope)PersistenceManager.Restore(subScopes.ChildNodes[i], restoredObjects);
-        AddSubScope(scope);
-      }
-    }
-    #endregion
   }
 }
Index: trunk/sources/HeuristicLab.Core/3.3/StorableBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/StorableBase.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/StorableBase.cs	(revision 1667)
@@ -24,4 +24,5 @@
 using System.Text;
 using System.Xml;
+using HeuristicLab.Persistence.Default.Decomposers.Storable;
 
 namespace HeuristicLab.Core {
@@ -30,4 +31,6 @@
   /// </summary>
   public abstract class StorableBase : IStorable {
+
+    [Storable]
     private Guid myGuid;
     /// <summary>
@@ -64,34 +67,4 @@
       return clone;
     }
-
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>The type of the current instance is saved as <see cref="XmlAttribute"/> with tag name
-    /// <c>Type</c>, the guid is also saved as an attribute with the tag name <c>GUID</c>.</remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
-    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
-    /// <returns>The saved <see cref="XmlNode"/>.</returns>
-    public virtual XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
-      XmlNode node = document.CreateNode(XmlNodeType.Element, name, null);
-      XmlAttribute typeAttribute = document.CreateAttribute("Type");
-      typeAttribute.Value = PersistenceManager.BuildTypeString(this.GetType());
-      node.Attributes.Append(typeAttribute);
-      XmlAttribute guidAttribute = document.CreateAttribute("GUID");
-      guidAttribute.Value = Guid.ToString();
-      node.Attributes.Append(guidAttribute);
-      return node;
-    }
-    /// <summary>
-    /// Loads the persisted object from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>Loads only guid; type,... already loaded by the <see cref="PersistenceManager"/>.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the object is saved.</param>
-    /// <param name="restoredObjects">The dictionary of all already restored objects. 
-    /// (Needed to avoid cycles.)</param>
-    public virtual void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
-      myGuid = new Guid(node.Attributes["GUID"].Value);
-    }
   }
 }
Index: trunk/sources/HeuristicLab.Core/3.3/Variable.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Variable.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/Variable.cs	(revision 1667)
@@ -24,4 +24,5 @@
 using System.Text;
 using System.Xml;
+using HeuristicLab.Persistence.Default.Decomposers.Storable;
 
 namespace HeuristicLab.Core {
@@ -30,4 +31,6 @@
   /// </summary>
   public class Variable : ItemBase, IVariable {
+
+    [Storable]
     private string myName;
     /// <inheritdoc/>
@@ -47,4 +50,6 @@
       }
     }
+
+    [Storable]
     private IItem myValue;
     /// <inheritdoc/>
@@ -59,5 +64,5 @@
       }
     }
-    
+
     /// <summary>
     /// Initializes a new instance of <see cref="Variable"/> with name <c>Anonymous</c> 
@@ -145,41 +150,4 @@
       OnChanged();
     }
-
-    #region Persistence Methods
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>.<br/>
-    /// The name of the current instance is saved as an <see cref="XmlAttribute"/> with the 
-    /// tag name <c>Name</c>, the value is saved as child node with the tag name <c>Value</c>.</remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</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);
-      XmlAttribute nameAttribute = document.CreateAttribute("Name");
-      nameAttribute.Value = Name;
-      node.Attributes.Append(nameAttribute);
-      if (Value != null)
-        node.AppendChild(PersistenceManager.Persist("Value", Value, document, persistedObjects));
-      return node;
-    }
-    /// <summary>
-    /// Loads the persisted variable from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>See <see cref="GetXmlNode"/> to get information on how the variable must be saved.<br/>
-    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the variable 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);
-      myName = node.Attributes["Name"].Value;
-      XmlNode valueNode = node.SelectSingleNode("Value");
-      if (valueNode != null)
-        myValue = (IItem)PersistenceManager.Restore(valueNode, restoredObjects);
-    }
-    #endregion
   }
 }
Index: trunk/sources/HeuristicLab.Core/3.3/VariableInfo.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/VariableInfo.cs	(revision 1663)
+++ trunk/sources/HeuristicLab.Core/3.3/VariableInfo.cs	(revision 1667)
@@ -24,4 +24,5 @@
 using System.Text;
 using System.Xml;
+using HeuristicLab.Persistence.Default.Decomposers.Storable;
 
 namespace HeuristicLab.Core {
@@ -30,4 +31,6 @@
   /// </summary>
   public class VariableInfo : ItemBase, IVariableInfo {
+
+    [Storable]
     private string myActualName;
     /// <summary>
@@ -44,4 +47,6 @@
       }
     }
+
+    [Storable]
     private string myFormalName;
     /// <summary>
@@ -51,4 +56,6 @@
       get { return myFormalName; }
     }
+
+    [Storable]
     private string myDescription;
     /// <summary>
@@ -58,4 +65,6 @@
       get { return myDescription; }
     }
+
+    [Storable]
     private Type myDataType;
     /// <summary>
@@ -65,4 +74,6 @@
       get { return myDataType; }
     }
+
+    [Storable]
     private VariableKind myKind;
     /// <summary>
@@ -72,4 +83,6 @@
       get { return myKind; }
     }
+
+    [Storable]
     private bool myLocal;
     /// <summary>
@@ -162,87 +175,4 @@
         LocalChanged(this, new EventArgs());
     }
-
-    #region Persistence Methods
-    /// <summary>
-    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
-    /// </summary>
-    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>. <br/>
-    /// A quick overview how the single elements of the current instance are saved:
-    /// <list type="bullet">
-    /// <item>
-    /// <term>Actual name: </term>
-    /// <description>Saved as <see cref="XmlAttribute"/> with tag name <c>ActualName</c>.</description>
-    /// </item>
-    /// <item>
-    /// <term>Formal name: </term>
-    /// <description>Saves as <see cref="XmlAttribute"/> with tag name <c>FormalName</c>.</description>
-    /// </item> 
-    /// <item>
-    /// <term>Description: </term>
-    /// <description>Saved as <see cref="XmlAttribute"/> with tag name <c>Description</c>.</description>
-    /// </item>
-    /// <item><term>Data type: </term>
-    /// <description>Saved as <see cref="XmlAttribute"/> with tag name <c>DataType</c>.</description>
-    /// </item>
-    /// <item>
-    /// <term>Kind: </term>
-    /// <description>Saved as <see cref="XmlAttribute"/> with tag name <c>Kind</c>.</description>
-    /// </item>
-    /// <item>
-    /// <term>Local: </term>
-    /// <description>Saved as <see cref="XmlAttribute"/> with tag name <c>Local</c>.</description>
-    /// </item>
-    /// </list></remarks>
-    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
-    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</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);
-      XmlAttribute actualNameAttribute = document.CreateAttribute("ActualName");
-      actualNameAttribute.Value = ActualName;
-      node.Attributes.Append(actualNameAttribute);
-
-      XmlAttribute formalNameAttribute = document.CreateAttribute("FormalName");
-      formalNameAttribute.Value = FormalName;
-      node.Attributes.Append(formalNameAttribute);
-
-      XmlAttribute descriptionAttribute = document.CreateAttribute("Description");
-      descriptionAttribute.Value = Description;
-      node.Attributes.Append(descriptionAttribute);
-
-      XmlAttribute dataTypeAttribute = document.CreateAttribute("DataType");
-      dataTypeAttribute.Value = PersistenceManager.BuildTypeString(DataType);
-      node.Attributes.Append(dataTypeAttribute);
-
-      XmlAttribute kindAttribute = document.CreateAttribute("Kind");
-      kindAttribute.Value = Kind.ToString();
-      node.Attributes.Append(kindAttribute);
-
-      XmlAttribute localAttribute = document.CreateAttribute("Local");
-      localAttribute.Value = Local.ToString();
-      node.Attributes.Append(localAttribute);
-
-      return node;
-    }
-    /// <summary>
-    /// Loads the persisted variable info from the specified <paramref name="node"/>.
-    /// </summary>
-    /// <remarks>See <see cref="GetXmlNode"/> for further information on how the variable info must be 
-    /// saved. <br/>
-    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks>
-    /// <param name="node">The <see cref="XmlNode"/> where the variable info 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);
-      myActualName = node.Attributes["ActualName"].Value;
-      myFormalName = node.Attributes["FormalName"].Value;
-      myDescription = node.Attributes["Description"].Value;
-      myDataType = Type.GetType(node.Attributes["DataType"].Value, true);
-      myKind = (VariableKind)Enum.Parse(typeof(VariableKind), node.Attributes["Kind"].Value);
-      myLocal = bool.Parse(node.Attributes["Local"].Value);
-    }
-    #endregion
   }
 }
