Index: trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRule.java
===================================================================
--- trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/nodeequality/SequenceComparisonRule.java	(revision 1125)
+++ trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRule.java	(revision 1146)
@@ -13,10 +13,10 @@
 //   limitations under the License.
 
-package de.ugoe.cs.autoquest.tasktrees.nodeequality;
+package de.ugoe.cs.autoquest.tasktrees.taskequality;
 
 import java.util.List;
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 
 /**
@@ -31,18 +31,18 @@
  * @author 2012, last modified by $Author: patrick$
  */
-public class SequenceComparisonRule implements NodeComparisonRule {
+public class SequenceComparisonRule implements TaskComparisonRule {
 
-    /** the rule manager for internally comparing task tree nodes */
-    private NodeEqualityRuleManager mRuleManager;
+    /** the rule manager for internally comparing tasks */
+    private TaskEqualityRuleManager mRuleManager;
 
     /**
      * <p>
-     * simple constructor to provide the rule with the node equality rule manager to be able
-     * to perform comparisons of the children of provided task tree nodes
+     * simple constructor to provide the rule with the task equality rule manager to be able
+     * to perform comparisons of the children of provided tasks
      * </p>
      * 
-     * @param ruleManager the rule manager for comparing task tree nodes
+     * @param ruleManager the rule manager for comparing tasks
      */
-    SequenceComparisonRule(NodeEqualityRuleManager ruleManager) {
+    SequenceComparisonRule(TaskEqualityRuleManager ruleManager) {
         super();
         mRuleManager = ruleManager;
@@ -50,44 +50,44 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#isApplicable(ITaskTreeNode, ITaskTreeNode)
+     * @see NodeComparisonRule#isApplicable(ITask, ITask)
      */
     @Override
-    public boolean isApplicable(ITaskTreeNode node1, ITaskTreeNode node2) {
-        return (node1 instanceof ISequence) && (node2 instanceof ISequence);
+    public boolean isApplicable(ITask task1, ITask task2) {
+        return (task1 instanceof ISequence) && (task2 instanceof ISequence);
     }
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areLexicallyEqual(ITaskTreeNode, ITaskTreeNode)
+     * @see NodeComparisonRule#areLexicallyEqual(ITask, ITask)
      */
     @Override
-    public boolean areLexicallyEqual(ITaskTreeNode node1, ITaskTreeNode node2) {
-        NodeEquality equality = getEquality(node1, node2, NodeEquality.LEXICALLY_EQUAL);
-        return (equality != null) && (equality.isAtLeast(NodeEquality.LEXICALLY_EQUAL));
+    public boolean areLexicallyEqual(ITask task1, ITask task2) {
+        TaskEquality equality = getEquality(task1, task2, TaskEquality.LEXICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.LEXICALLY_EQUAL));
     }
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSyntacticallyEqual(ITaskTreeNode, ITaskTreeNode)
+     * @see NodeComparisonRule#areSyntacticallyEqual(ITask, ITask)
      */
     @Override
-    public boolean areSyntacticallyEqual(ITaskTreeNode node1, ITaskTreeNode node2) {
-        NodeEquality equality = getEquality(node1, node2, NodeEquality.SYNTACTICALLY_EQUAL);
-        return (equality != null) && (equality.isAtLeast(NodeEquality.SYNTACTICALLY_EQUAL));
+    public boolean areSyntacticallyEqual(ITask task1, ITask task2) {
+        TaskEquality equality = getEquality(task1, task2, TaskEquality.SYNTACTICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.SYNTACTICALLY_EQUAL));
     }
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSemanticallyEqual(ITaskTreeNode, ITaskTreeNode)
+     * @see NodeComparisonRule#areSemanticallyEqual(ITask, ITask)
      */
     @Override
-    public boolean areSemanticallyEqual(ITaskTreeNode node1, ITaskTreeNode node2) {
-        NodeEquality equality = getEquality(node1, node2, NodeEquality.SEMANTICALLY_EQUAL);
-        return (equality != null) && (equality.isAtLeast(NodeEquality.SEMANTICALLY_EQUAL));
+    public boolean areSemanticallyEqual(ITask task1, ITask task2) {
+        TaskEquality equality = getEquality(task1, task2, TaskEquality.SEMANTICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.SEMANTICALLY_EQUAL));
     }
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#compare(ITaskTreeNode, ITaskTreeNode)
+     * @see NodeComparisonRule#compare(ITask, ITask)
      */
     @Override
-    public NodeEquality compare(ITaskTreeNode node1, ITaskTreeNode node2) {
-        return getEquality(node1, node2, null);
+    public TaskEquality compare(ITask task1, ITask task2) {
+        return getEquality(task1, task2, null);
     }
 
@@ -95,32 +95,29 @@
      * 
      */
-    private NodeEquality getEquality(ITaskTreeNode node1,
-                                     ITaskTreeNode node2,
-                                     NodeEquality  requiredEqualityLevel)
-    {
-        List<ITaskTreeNode> children1 = node1.getChildren();
-        List<ITaskTreeNode> children2 = node2.getChildren();
+    private TaskEquality getEquality(ITask task1, ITask task2, TaskEquality requiredEqualityLevel) {
+        List<ITask> children1 = ((ISequence) task1).getChildren();
+        List<ITask> children2 = ((ISequence) task2).getChildren();
 
         // if both sequences do not have children, they are equal although this doesn't make sense
         if ((children1.size() == 0) && (children2.size() == 0)) {
-            return NodeEquality.LEXICALLY_EQUAL;
+            return TaskEquality.LEXICALLY_EQUAL;
         }
 
         if (children1.size() != children2.size()) {
-            return NodeEquality.UNEQUAL;
+            return TaskEquality.UNEQUAL;
         }
 
-        NodeEquality resultingEquality = NodeEquality.LEXICALLY_EQUAL;
+        TaskEquality resultingEquality = TaskEquality.LEXICALLY_EQUAL;
         for (int i = 0; i < children1.size(); i++) {
-            ITaskTreeNode child1 = children1.get(i);
-            ITaskTreeNode child2 = children2.get(i);
+            ITask child1 = children1.get(i);
+            ITask child2 = children2.get(i);
 
-            NodeEquality nodeEquality = callRuleManager(child1, child2, requiredEqualityLevel);
+            TaskEquality taskEquality = callRuleManager(child1, child2, requiredEqualityLevel);
 
-            if ((nodeEquality == null) || (nodeEquality == NodeEquality.UNEQUAL)) {
-                return NodeEquality.UNEQUAL;
+            if ((taskEquality == null) || (taskEquality == TaskEquality.UNEQUAL)) {
+                return TaskEquality.UNEQUAL;
             }
             
-            resultingEquality = resultingEquality.getCommonDenominator(nodeEquality);
+            resultingEquality = resultingEquality.getCommonDenominator(taskEquality);
         }
 
@@ -138,7 +135,7 @@
      * @return
      */
-    private NodeEquality callRuleManager(ITaskTreeNode child1,
-                                         ITaskTreeNode child2,
-                                         NodeEquality  requiredEqualityLevel)
+    private TaskEquality callRuleManager(ITask        child1,
+                                         ITask        child2,
+                                         TaskEquality requiredEqualityLevel)
     {
         if (requiredEqualityLevel == null) {
@@ -149,5 +146,5 @@
         }
         else {
-            return NodeEquality.UNEQUAL;
+            return TaskEquality.UNEQUAL;
         }
     }
