Index: /trunk/sources/HeuristicLab.Constraints/AllSubOperatorsTypeConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/AllSubOperatorsTypeConstraint.cs	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/AllSubOperatorsTypeConstraint.cs	(revision 764)
@@ -85,8 +85,4 @@
     }
 
-    public override void Accept(IConstraintVisitor visitor) {
-      visitor.Visit(this);
-    }
-
     #region persistence
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
Index: /trunk/sources/HeuristicLab.Constraints/AndConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/AndConstraint.cs	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/AndConstraint.cs	(revision 764)
@@ -68,8 +68,4 @@
     }
 
-    public override void Accept(IConstraintVisitor visitor) {
-      visitor.Visit(this);
-    }
-
     #region persistence
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
Index: /trunk/sources/HeuristicLab.Constraints/ConstraintBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/ConstraintBase.cs	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/ConstraintBase.cs	(revision 764)
@@ -33,7 +33,4 @@
 
     public abstract bool Check(IItem data);
-
-    public virtual void Accept(IConstraintVisitor visitor) {
-    }
   }
 }
Index: unk/sources/HeuristicLab.Constraints/ConstraintVisitorBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/ConstraintVisitorBase.cs	(revision 763)
+++ 	(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;
-
-namespace HeuristicLab.Constraints {
-  public class ConstraintVisitorBase : IConstraintVisitor {
-    public virtual void Visit(AndConstraint constraint) {
-    }
-
-    public virtual void Visit(OrConstraint constraint) {
-    }
-
-    public virtual void Visit(NotConstraint constraint) {
-    }
-
-    public virtual void Visit(TrueConstraint constraint) {
-    }
-
-    public virtual void Visit(FalseConstraint constraint) {
-    }
-
-    public virtual void Visit(IsIntegerConstraint constraint) {
-    }
-
-    public virtual void Visit(DoubleBoundedConstraint constraint) {
-    }
-
-    public virtual void Visit(IntBoundedConstraint constraint) {
-    }
-
-    public virtual void Visit(NumberOfSubOperatorsConstraint constraint) {
-    }
-
-    public virtual void Visit(SubOperatorTypeConstraint constraint) {
-    }
-
-    public virtual void Visit(AllSubOperatorsTypeConstraint constraint) {
-    }
-
-    public virtual void Visit(ItemTypeConstraint constraint) {
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.Constraints/DoubleBoundedConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/DoubleBoundedConstraint.cs	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/DoubleBoundedConstraint.cs	(revision 764)
@@ -128,8 +128,4 @@
     }
 
-    public override void Accept(IConstraintVisitor visitor) {
-      visitor.Visit(this);
-    }
-
     #region persistence
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
Index: /trunk/sources/HeuristicLab.Constraints/FalseConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/FalseConstraint.cs	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/FalseConstraint.cs	(revision 764)
@@ -45,9 +45,4 @@
       return false;
     }
-
-
-    public override void Accept(IConstraintVisitor visitor) {
-      visitor.Visit(this);
-    }
   }
 }
Index: /trunk/sources/HeuristicLab.Constraints/HeuristicLab.Constraints.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/HeuristicLab.Constraints.csproj	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/HeuristicLab.Constraints.csproj	(revision 764)
@@ -76,7 +76,4 @@
     </Compile>
     <Compile Include="ConstraintBase.cs" />
-    <Compile Include="ConstraintVisitorBase.cs">
-      <SubType>Code</SubType>
-    </Compile>
     <Compile Include="DoubleBoundedConstraint.cs" />
     <Compile Include="DoubleBoundedConstraintView.cs">
@@ -86,5 +83,4 @@
       <DependentUpon>DoubleBoundedConstraintView.cs</DependentUpon>
     </Compile>
-    <Compile Include="IConstraintVisitor.cs" />
     <Compile Include="IntBoundedConstraint.cs" />
     <Compile Include="FalseConstraintView.cs">
Index: unk/sources/HeuristicLab.Constraints/IConstraintVisitor.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/IConstraintVisitor.cs	(revision 763)
+++ 	(revision )
@@ -1,52 +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;
-
-namespace HeuristicLab.Constraints {
-  public interface IConstraintVisitor {
-    void Visit(AndConstraint constraint);
-
-    void Visit(OrConstraint constraint);
-
-    void Visit(NotConstraint constraint);
-
-    void Visit(TrueConstraint constraint);
-
-    void Visit(FalseConstraint constraint);
-
-    void Visit(IsIntegerConstraint constraint);
-
-    void Visit(DoubleBoundedConstraint constraint);
-
-    void Visit(IntBoundedConstraint constraint);
-
-    void Visit(NumberOfSubOperatorsConstraint constraint);
-
-    void Visit(SubOperatorTypeConstraint constraint);
-
-    void Visit(AllSubOperatorsTypeConstraint constraint);
-
-    void Visit(ItemTypeConstraint constraint);
-  }
-}
Index: /trunk/sources/HeuristicLab.Constraints/IntBoundedConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/IntBoundedConstraint.cs	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/IntBoundedConstraint.cs	(revision 764)
@@ -121,9 +121,4 @@
     }
 
-    public override void Accept(IConstraintVisitor visitor) {
-      visitor.Visit(this);
-    }
-
-
     #region persistence
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
Index: /trunk/sources/HeuristicLab.Constraints/IsIntegerConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/IsIntegerConstraint.cs	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/IsIntegerConstraint.cs	(revision 764)
@@ -50,9 +50,4 @@
       return false;
     }
-
-    public override void Accept(IConstraintVisitor visitor) {
-      visitor.Visit(this);
-    }
-
   }
 }
Index: /trunk/sources/HeuristicLab.Constraints/ItemTypeConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/ItemTypeConstraint.cs	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/ItemTypeConstraint.cs	(revision 764)
@@ -67,8 +67,4 @@
     }
 
-    public override void Accept(IConstraintVisitor visitor) {
-      visitor.Visit(this);
-    }
-
     #region clone & persistence
     public override object Clone(IDictionary<Guid, object> clonedObjects) {
Index: /trunk/sources/HeuristicLab.Constraints/NotConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/NotConstraint.cs	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/NotConstraint.cs	(revision 764)
@@ -62,9 +62,4 @@
     }
 
-    public override void Accept(IConstraintVisitor visitor) {
-      visitor.Visit(this);
-    }
-
-
     #region persistence
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
Index: /trunk/sources/HeuristicLab.Constraints/NumberOfSubOperatorsConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/NumberOfSubOperatorsConstraint.cs	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/NumberOfSubOperatorsConstraint.cs	(revision 764)
@@ -73,9 +73,4 @@
     }
 
-    public override void Accept(IConstraintVisitor visitor) {
-      visitor.Visit(this);
-    }
-
-
     #region persistence
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
Index: /trunk/sources/HeuristicLab.Constraints/OrConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/OrConstraint.cs	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/OrConstraint.cs	(revision 764)
@@ -68,9 +68,4 @@
     }
 
-    public override void Accept(IConstraintVisitor visitor) {
-      visitor.Visit(this);
-    }
-
-
     #region persistence
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
Index: /trunk/sources/HeuristicLab.Constraints/SubOperatorsConstraintAnalyser.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/SubOperatorsConstraintAnalyser.cs	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/SubOperatorsConstraintAnalyser.cs	(revision 764)
@@ -38,11 +38,24 @@
     public IList<IOperator> GetAllowedOperators(IOperator op, int childIndex) {
       AndConstraint andConstraint = new AndConstraint();
-      foreach(IConstraint constraint in op.Constraints) {
+      foreach (IConstraint constraint in op.Constraints) {
         andConstraint.Clauses.Add(constraint);
       }
-      
-      GetAllowedOperatorsVisitor visitor = new GetAllowedOperatorsVisitor(allPossibleOperators, childIndex);
-      andConstraint.Accept(visitor);
-      return visitor.AllowedOperators;
+
+      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
     }
 
@@ -51,5 +64,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) {
+      if (a.Count > b.Count) {
         return Intersect(b, a);
       }
@@ -57,6 +70,6 @@
       List<IOperator> intersection = new List<IOperator>(a.Count);
 
-      foreach(IOperator element in a) {
-        if(InSet(element, b)) {
+      foreach (IOperator element in a) {
+        if (InSet(element, b)) {
           intersection.Add(element);
         }
@@ -67,6 +80,6 @@
     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)) {
+      foreach (IOperator candidateElement in b) {
+        if (!InSet(candidateElement, union)) {
           union.Add(candidateElement);
         }
@@ -78,6 +91,6 @@
     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)) {
+      foreach (IOperator element in minuend) {
+        if (!InSet(element, subtrahend)) {
           difference.Add(element);
         }
@@ -88,6 +101,6 @@
 
     private static bool InSet(IOperator op, ICollection<IOperator> set) {
-      foreach(IOperator element in set) {
-        if(element == op)
+      foreach (IOperator element in set) {
+        if (element == op)
           return true;
       }
@@ -96,71 +109,36 @@
     #endregion
 
-    #region visitor
-    /// <summary>
-    /// The visitor builds a set of allowed operators based on a tree of constraints.
-    /// </summary>
-    private class GetAllowedOperatorsVisitor : ConstraintVisitorBase {
-      private IList<IOperator> allowedOperators;
+    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;
+    }
 
-      public IList<IOperator> AllowedOperators {
-        get { return allowedOperators; }
+    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));
       }
-      private ICollection<IOperator> possibleOperators;
-      private int childIndex;
+      return allowedOperators;
+    }
 
-      public GetAllowedOperatorsVisitor(ICollection<IOperator> possibleOperators, int childIndex) {
-        // default is that all possible operators are allowed
-        allowedOperators = new List<IOperator>(possibleOperators);
-        this.possibleOperators = possibleOperators;
-        this.childIndex = childIndex;
-      }
+    public IList<IOperator> GetAllowedOperators(NotConstraint constraint, int childIndex) {
+      return Substract(allPossibleOperators, GetAllowedOperators(constraint.SubConstraint, childIndex));
+    }
 
-      public override void Visit(AndConstraint constraint) {
-        base.Visit(constraint);
+    public IList<IOperator> GetAllowedOperators(AllSubOperatorsTypeConstraint constraint, int childIndex) {
+      return Intersect(allPossibleOperators, constraint.AllowedSubOperators);
+    }
 
-        // keep only the intersection of all subconstraints
-        foreach(ConstraintBase clause in constraint.Clauses) {
-          GetAllowedOperatorsVisitor visitor = new GetAllowedOperatorsVisitor(possibleOperators, childIndex);
-          clause.Accept(visitor);
-          allowedOperators = Intersect(allowedOperators, visitor.allowedOperators);
-        }
-      }
-
-      public override void Visit(OrConstraint constraint) {
-        base.Visit(constraint);
-
-        // allowed operators is the union of all allowed operators as defined by the subconstraints
-        allowedOperators.Clear();
-
-        foreach(ConstraintBase clause in constraint.Clauses) {
-          GetAllowedOperatorsVisitor visitor = new GetAllowedOperatorsVisitor(possibleOperators, childIndex);
-          clause.Accept(visitor);
-          allowedOperators = Union(allowedOperators, visitor.allowedOperators);
-        }
-      }
-
-      public override void Visit(NotConstraint constraint) {
-        base.Visit(constraint);
-        GetAllowedOperatorsVisitor visitor = new GetAllowedOperatorsVisitor(possibleOperators, childIndex);
-        constraint.SubConstraint.Accept(visitor);
-
-        allowedOperators = Substract(possibleOperators, visitor.allowedOperators);
-      }
-
-      public override void Visit(AllSubOperatorsTypeConstraint constraint) {
-        base.Visit(constraint);
-
-        allowedOperators = Intersect(possibleOperators, constraint.AllowedSubOperators);
-      }
-
-      public override void Visit(SubOperatorTypeConstraint constraint) {
-        if(childIndex != constraint.SubOperatorIndex.Data) {
-          allowedOperators = new List<IOperator>(possibleOperators);
-        } else {
-          allowedOperators = Intersect(possibleOperators, constraint.AllowedSubOperators);
-        }
+    public IList<IOperator> GetAllowedOperators(SubOperatorTypeConstraint constraint, int childIndex) {
+      if (childIndex != constraint.SubOperatorIndex.Data) {
+        return new List<IOperator>(allPossibleOperators);
+      } else {
+        return Intersect(allPossibleOperators, constraint.AllowedSubOperators);
       }
     }
-    #endregion
   }
 }
Index: /trunk/sources/HeuristicLab.Constraints/SubOperatorsTypeConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/SubOperatorsTypeConstraint.cs	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/SubOperatorsTypeConstraint.cs	(revision 764)
@@ -99,9 +99,4 @@
     }
 
-    public override void Accept(IConstraintVisitor visitor) {
-      visitor.Visit(this);
-    }
-
-
     #region persistence
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
Index: /trunk/sources/HeuristicLab.Constraints/TrueConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Constraints/TrueConstraint.cs	(revision 763)
+++ /trunk/sources/HeuristicLab.Constraints/TrueConstraint.cs	(revision 764)
@@ -42,9 +42,4 @@
     }
 
-    public override void Accept(IConstraintVisitor visitor) {
-      visitor.Visit(this);
-    }
-
-
     public override bool Check(IItem data) {
       return true;
