Index: /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/manager/TaskTreeManagerTest.java
===================================================================
--- /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/manager/TaskTreeManagerTest.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/manager/TaskTreeManagerTest.java	(revision 1294)
@@ -68,5 +68,5 @@
     public void testOneEventOnOneElement() {
         simulateEvent(new DummyInteraction("bla", 1), new DummyGUIElement("elem1"));
-        new TaskTreeChecker().assertTaskInstanceList
+        new TaskTreeChecker().assertUserSession
             ("UserSession session {" +
              "  Event bla {}" +
@@ -86,5 +86,5 @@
         simulateEvent(new DummyInteraction("ble", 1), eventTarget);
 
-        new TaskTreeChecker().assertTaskInstanceList
+        new TaskTreeChecker().assertUserSession
             ("UserSession session {" +
              "  Event bla {}" +
@@ -114,5 +114,5 @@
         simulateEvent(new DummyInteraction("blum", 1), eventTarget6);
 
-        new TaskTreeChecker(true).assertTaskInstanceList
+        new TaskTreeChecker(true).assertUserSession
             ("UserSession session {" +
              "  Event bla {}" +
@@ -152,5 +152,5 @@
         simulateEvent(new DummyInteraction("blop", 1), eventTarget6);
 
-        new TaskTreeChecker().assertTaskInstanceList
+        new TaskTreeChecker().assertUserSession
             ("UserSession session {" +
              "  Event bla {}" +
@@ -181,5 +181,5 @@
         simulateEvent(event1, eventTarget1);
         simulateEvent(event1, eventTarget1);
-        new TaskTreeChecker().assertTaskInstanceList
+        new TaskTreeChecker().assertUserSession
             ("UserSession session {" +
              "  Iteration iteration1 {" +
@@ -201,5 +201,5 @@
         }
 
-        new TaskTreeChecker().assertTaskInstanceList
+        new TaskTreeChecker().assertUserSession
             ("UserSession session {" +
              "  Iteration iteration1 {" +
@@ -240,5 +240,5 @@
         simulateEvent(event5, eventTarget1);
 
-        new TaskTreeChecker().assertTaskInstanceList
+        new TaskTreeChecker().assertUserSession
             ("UserSession session {" +
              "  Event bli {}" +
@@ -285,5 +285,5 @@
         }
 
-        new TaskTreeChecker(true).assertTaskInstanceList
+        new TaskTreeChecker(true).assertUserSession
             ("UserSession session {" +
              "  Iteration iteration2 {" +
@@ -426,5 +426,5 @@
         simulateEvent(event3, eventTarget1);
         
-        new TaskTreeChecker().assertTaskInstanceList
+        new TaskTreeChecker().assertUserSession
             ("UserSession session {" +
              "  Iteration iteration1 {" +
@@ -459,5 +459,5 @@
         }
 
-        new TaskTreeChecker().assertTaskInstanceList
+        new TaskTreeChecker().assertUserSession
             ("UserSession session {" +
              "  Iteration iteration1 {" +
@@ -540,5 +540,5 @@
         simulateEvent(event6, eventTarget1);
 
-        new TaskTreeChecker().assertTaskInstanceList
+        new TaskTreeChecker().assertUserSession
             ("UserSession session {" +
              "  Event ble {}" +
@@ -610,5 +610,5 @@
         }
 
-        new TaskTreeChecker().assertTaskInstanceList
+        new TaskTreeChecker().assertUserSession
             ("UserSession session {" +
              "  Iteration iteration3 {" +
Index: /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/AbstractComparisonRuleTest.java
===================================================================
--- /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/AbstractComparisonRuleTest.java	(revision 1294)
+++ /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/AbstractComparisonRuleTest.java	(revision 1294)
@@ -0,0 +1,293 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.tasktrees.taskequality;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import de.ugoe.cs.autoquest.eventcore.Event;
+import de.ugoe.cs.autoquest.eventcore.IEventTarget;
+import de.ugoe.cs.autoquest.eventcore.IEventType;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
+import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder;
+import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
+
+/**
+ * @author Patrick Harms
+ */
+public class AbstractComparisonRuleTest {
+
+    /** */
+    private ITaskFactory taskFactory = new TaskFactory();
+
+    /** */
+    private ITaskBuilder taskBuilder = new TaskBuilder();
+
+    /**
+     *
+     */
+    protected IEventTask createNewEventTask(IEventType eventType, IEventTarget eventTarget) {
+        IEventTask eventTask = taskFactory.createNewEventTask(eventType + " --> " + eventTarget);
+        taskFactory.createNewTaskInstance(eventTask, new Event(eventType, eventTarget));
+        return eventTask;
+    }
+
+    /**
+     *
+     */
+    protected ISequence createNewSequence() {
+        ISequence sequence = taskFactory.createNewSequence();
+        taskFactory.createNewTaskInstance(sequence);
+        return sequence;
+    }
+
+    /**
+     *
+     */
+    protected ISelection createNewSelection() {
+        ISelection selection = taskFactory.createNewSelection();
+        taskFactory.createNewTaskInstance(selection);
+        return selection;
+    }
+
+    /**
+     *
+     */
+    protected IOptional createNewOptional() {
+        IOptional optional = taskFactory.createNewOptional();
+        taskFactory.createNewTaskInstance(optional);
+        return optional;
+    }
+
+    /**
+     *
+     */
+    protected IIteration createNewIteration() {
+        IIteration iteration = taskFactory.createNewIteration();
+        taskFactory.createNewTaskInstance(iteration);
+        return iteration;
+    }
+    
+    /**
+     *
+     */
+    protected void setMarkedTask(IIteration iteration, ITask task) {
+        taskBuilder.setMarkedTask(iteration, task);
+        taskBuilder.addChild((IIterationInstance) iteration.getInstances().iterator().next(),
+                             task.getInstances().iterator().next());
+    }
+
+    /**
+     *
+     */
+    protected void addChild(ISelection selection, ITask task) {
+        taskBuilder.addChild(selection, task);
+        taskBuilder.setChild((ISelectionInstance) selection.getInstances().iterator().next(),
+                             task.getInstances().iterator().next());
+    }
+
+    /**
+     *
+     */
+    protected void addChild(ISequence sequence, ITask task) {
+        taskBuilder.addChild(sequence, task);
+        taskBuilder.addChild((ISequenceInstance) sequence.getInstances().iterator().next(),
+                             task.getInstances().iterator().next());
+    }
+
+    /**
+     *
+     */
+    protected void assertLexicallyEqual(TaskComparisonRule rule, ITask task1, ITask task2) {
+        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, task2));
+        assertTrue(rule.areLexicallyEqual(task1, task2));
+        assertTrue(rule.areSyntacticallyEqual(task1, task2));
+        assertTrue(rule.areSemanticallyEqual(task1, task2));
+
+        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task2, task1));
+        assertTrue(rule.areLexicallyEqual(task2, task1));
+        assertTrue(rule.areSyntacticallyEqual(task2, task1));
+        assertTrue(rule.areSemanticallyEqual(task2, task1));
+        
+        assertEquals(TaskEquality.LEXICALLY_EQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertTrue(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                          task2.getInstances().iterator().next()));
+        assertTrue(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                             task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.LEXICALLY_EQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertTrue(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                          task1.getInstances().iterator().next()));
+        assertTrue(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                             task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    protected void assertSyntacticallyEqual(TaskComparisonRule rule, ITask task1, ITask task2) {
+        assertEquals(TaskEquality.SYNTACTICALLY_EQUAL, rule.compare(task1, task2));
+        assertFalse(rule.areLexicallyEqual(task1, task2));
+        assertTrue(rule.areSyntacticallyEqual(task1, task2));
+        assertTrue(rule.areSemanticallyEqual(task1, task2));
+
+        assertEquals(TaskEquality.SYNTACTICALLY_EQUAL, rule.compare(task2, task1));
+        assertFalse(rule.areLexicallyEqual(task2, task1));
+        assertTrue(rule.areSyntacticallyEqual(task2, task1));
+        assertTrue(rule.areSemanticallyEqual(task2, task1));
+        
+        assertEquals(TaskEquality.SYNTACTICALLY_EQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                           task2.getInstances().iterator().next()));
+        assertTrue(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                             task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.SYNTACTICALLY_EQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                           task1.getInstances().iterator().next()));
+        assertTrue(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                             task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    protected void assertSemanticallyEqual(TaskComparisonRule rule, ITask task1, ITask task2) {
+        assertEquals(TaskEquality.SEMANTICALLY_EQUAL, rule.compare(task1, task2));
+        assertFalse(rule.areLexicallyEqual(task1, task2));
+        assertFalse(rule.areSyntacticallyEqual(task1, task2));
+        assertTrue(rule.areSemanticallyEqual(task1, task2));
+
+        assertEquals(TaskEquality.SEMANTICALLY_EQUAL, rule.compare(task2, task1));
+        assertFalse(rule.areLexicallyEqual(task2, task1));
+        assertFalse(rule.areSyntacticallyEqual(task2, task1));
+        assertTrue(rule.areSemanticallyEqual(task2, task1));
+        
+        assertEquals(TaskEquality.SEMANTICALLY_EQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                           task2.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                               task2.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                             task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.SEMANTICALLY_EQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                           task1.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                               task1.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                             task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    protected void assertUnequal(TaskComparisonRule rule, ITask task1, ITask task2) {
+        assertEquals(TaskEquality.UNEQUAL, rule.compare(task1, task2));
+        assertFalse(rule.areLexicallyEqual(task1, task2));
+        assertFalse(rule.areSyntacticallyEqual(task1, task2));
+        assertFalse(rule.areSemanticallyEqual(task1, task2));
+
+        assertEquals(TaskEquality.UNEQUAL, rule.compare(task2, task1));
+        assertFalse(rule.areLexicallyEqual(task2, task1));
+        assertFalse(rule.areSyntacticallyEqual(task2, task1));
+        assertFalse(rule.areSemanticallyEqual(task2, task1));
+        
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                           task2.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                               task2.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                           task1.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                               task1.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    protected void assertNullEquality(TaskComparisonRule rule, ITask task1, ITask task2) {
+        assertNull(rule.compare(task1, task2));
+        assertFalse(rule.areLexicallyEqual(task1, task2));
+        assertFalse(rule.areSyntacticallyEqual(task1, task2));
+        assertFalse(rule.areSemanticallyEqual(task1, task2));
+
+        assertNull(rule.compare(task2, task1));
+        assertFalse(rule.areLexicallyEqual(task2, task1));
+        assertFalse(rule.areSyntacticallyEqual(task2, task1));
+        assertFalse(rule.areSemanticallyEqual(task2, task1));
+        
+        assertNull(rule.compare(task1.getInstances().iterator().next(),
+                                task2.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                           task2.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                               task2.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+
+        assertNull(rule.compare(task2.getInstances().iterator().next(),
+                                task1.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                           task1.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                               task1.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+    }
+}
Index: /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/EventTaskComparisonRuleTest.java
===================================================================
--- /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/EventTaskComparisonRuleTest.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/EventTaskComparisonRuleTest.java	(revision 1294)
@@ -25,6 +25,4 @@
 import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -32,5 +30,5 @@
  * @author Patrick Harms
  */
-public class EventTaskComparisonRuleTest {
+public class EventTaskComparisonRuleTest extends AbstractComparisonRuleTest {
 
     /**
@@ -39,11 +37,9 @@
     @Test
     public void test_isApplicable_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         assertTrue(rule.isApplicable(task1, task1));
@@ -55,15 +51,13 @@
     @Test
     public void test_isApplicable_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new StringEventType("eventType2");
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -76,13 +70,11 @@
     @Test
     public void test_isApplicable_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
        
-        ITask selection = taskFactory.createNewSelection();
+        ITask selection = createNewSelection();
 
         assertFalse(rule.isApplicable(task1, selection));
@@ -95,13 +87,11 @@
     @Test
     public void test_isApplicable_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITask sequence = taskFactory.createNewSequence();
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask sequence = createNewSequence();
 
         assertFalse(rule.isApplicable(task1, sequence));
@@ -114,13 +104,11 @@
     @Test
     public void test_isApplicable_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITask iteration = taskFactory.createNewIteration();
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask iteration = createNewIteration();
 
         assertFalse(rule.isApplicable(task1, iteration));
@@ -133,13 +121,11 @@
     @Test
     public void test_isApplicable_06() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITask optional = taskFactory.createNewOptional();
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask optional = createNewOptional();
 
         assertFalse(rule.isApplicable(task1, optional));
@@ -151,12 +137,122 @@
      */
     @Test
+    public void test_isApplicable_07() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+   
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_08() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new StringEventType("eventType2");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_09() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask selection = createNewSelection();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      selection.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(selection.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_10() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask sequence = createNewSequence();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      sequence.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(sequence.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_11() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask iteration = createNewIteration();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      iteration.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(iteration.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_12() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask optional = createNewOptional();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      optional.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(optional.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
     public void test_compare_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, task1));
@@ -171,13 +267,11 @@
     @Test
     public void test_compare_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        ITask task2 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
         
         assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, task2));
@@ -197,14 +291,12 @@
     @Test
     public void test_compare_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new StringEventType("eventType2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
 
         assertEquals(TaskEquality.UNEQUAL, rule.compare(task1, task2));
@@ -224,14 +316,12 @@
     @Test
     public void test_compare_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType1, eventTarget2);
+        ITask task2 = createNewEventTask(eventType1, eventTarget2);
         
         assertEquals(TaskEquality.UNEQUAL, rule.compare(task1, task2));
@@ -252,15 +342,13 @@
     @Test
     public void test_compare_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new StringEventType("eventType2");
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
         
         assertEquals(TaskEquality.UNEQUAL, rule.compare(task1, task2));
@@ -275,3 +363,167 @@
     }
 
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_06() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertEquals(TaskEquality.LEXICALLY_EQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertTrue(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                          task1.getInstances().iterator().next()));
+        assertTrue(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                             task1.getInstances().iterator().next()));
+    }
+    
+    /**
+     *
+     */
+    @Test
+    public void test_compare_07() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertEquals(TaskEquality.LEXICALLY_EQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertTrue(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                          task2.getInstances().iterator().next()));
+        assertTrue(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                             task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.LEXICALLY_EQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertTrue(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                          task1.getInstances().iterator().next()));
+        assertTrue(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                             task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_08() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IEventType eventType2 = new StringEventType("eventType2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                           task2.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                               task2.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                           task1.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                               task1.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_09() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType1, eventTarget2);
+        
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                           task2.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                               task2.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                           task1.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                               task1.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+    }
+
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_10() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IEventType eventType2 = new StringEventType("eventType2");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                           task2.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                               task2.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                           task1.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                               task1.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+    }
+
 }
Index: /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRuleTest.java
===================================================================
--- /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRuleTest.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRuleTest.java	(revision 1294)
@@ -42,9 +42,5 @@
 import de.ugoe.cs.autoquest.keyboardmaps.VirtualKey;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.EventTaskComparisonRule;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.GUIEventTaskComparisonRule;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -52,5 +48,5 @@
  * @author Patrick Harms
  */
-public class GUIEventTaskComparisonRuleTest {
+public class GUIEventTaskComparisonRuleTest extends AbstractComparisonRuleTest {
 
     /**
@@ -59,11 +55,9 @@
     @Test
     public void test_isApplicable_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         assertTrue(rule.isApplicable(task1, task1));
@@ -75,15 +69,13 @@
     @Test
     public void test_isApplicable_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new StringEventType("eventType2");
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -96,15 +88,13 @@
     @Test
     public void test_isApplicable_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new KeyboardFocusChange();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new KeyboardFocusChange();
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -117,15 +107,13 @@
     @Test
     public void test_isApplicable_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new KeyPressed(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new KeyReleased(VirtualKey.LETTER_B);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -138,15 +126,13 @@
     @Test
     public void test_isApplicable_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new KeyTyped(VirtualKey.LETTER_C);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new KeyTyped(VirtualKey.LETTER_D);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -159,15 +145,13 @@
     @Test
     public void test_isApplicable_06() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 5, 6);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new MouseButtonUp(MouseButtonInteraction.Button.MIDDLE, 3, 1);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -180,15 +164,13 @@
     @Test
     public void test_isApplicable_07() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.RIGHT, 4, 7);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new MouseDoubleClick(MouseButtonInteraction.Button.X, 9, 12);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -201,15 +183,13 @@
     @Test
     public void test_isApplicable_08() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new MouseDragAndDrop(5, 6, 7, 8);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -222,15 +202,13 @@
     @Test
     public void test_isApplicable_09() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new Scroll(1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new Scroll(3, 4);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -243,6 +221,4 @@
     @Test
     public void test_isApplicable_10() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
@@ -250,9 +226,9 @@
         IEventType eventType1 = new TextInput("text1", inputEvents);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new TextInput("text2", inputEvents);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -265,15 +241,13 @@
     @Test
     public void test_isApplicable_11() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new TextSelection();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new ValueSelection<String>("value");
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -286,13 +260,11 @@
     @Test
     public void test_isApplicable_12() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITask selection = taskFactory.createNewSelection();
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask selection = createNewSelection();
 
         assertFalse(rule.isApplicable(task1, selection));
@@ -305,13 +277,11 @@
     @Test
     public void test_isApplicable_13() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITask sequence = taskFactory.createNewSequence();
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask sequence = createNewSequence();
 
         assertFalse(rule.isApplicable(task1, sequence));
@@ -324,13 +294,11 @@
     @Test
     public void test_isApplicable_14() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITask iteration = taskFactory.createNewIteration();
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask iteration = createNewIteration();
 
         assertFalse(rule.isApplicable(task1, iteration));
@@ -343,13 +311,11 @@
     @Test
     public void test_isApplicable_15() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITask optional = taskFactory.createNewOptional();
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask optional = createNewOptional();
 
         assertFalse(rule.isApplicable(task1, optional));
@@ -357,4 +323,305 @@
     }
 
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_16() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_17() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new StringEventType("eventType2");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_18() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new KeyboardFocusChange();
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new KeyboardFocusChange();
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_19() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new KeyPressed(VirtualKey.LETTER_A);
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new KeyReleased(VirtualKey.LETTER_B);
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_20() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new KeyTyped(VirtualKey.LETTER_C);
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new KeyTyped(VirtualKey.LETTER_D);
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_21() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 5, 6);
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new MouseButtonUp(MouseButtonInteraction.Button.MIDDLE, 3, 1);
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_22() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.RIGHT, 4, 7);
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new MouseDoubleClick(MouseButtonInteraction.Button.X, 9, 12);
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_23() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new MouseDragAndDrop(5, 6, 7, 8);
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_24() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new Scroll(1, 2);
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new Scroll(3, 4);
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_25() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        List<Event> inputEvents = new ArrayList<Event>();
+        IEventType eventType1 = new TextInput("text1", inputEvents);
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new TextInput("text2", inputEvents);
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(), task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(), task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_26() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new TextSelection();
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new ValueSelection<String>("value");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_27() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask selection = createNewSelection();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      selection.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(selection.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_28() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask sequence = createNewSequence();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      sequence.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(sequence.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_29() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask iteration = createNewIteration();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      iteration.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(iteration.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_30() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask optional = createNewOptional();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      optional.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(optional.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
     /**
      *
@@ -362,11 +629,9 @@
     @Test
     public void test_compare_KeyboardFocusChange_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyboardFocusChange();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -376,14 +641,12 @@
     @Test
     public void test_compare_KeyboardFocusChange_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyboardFocusChange();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new KeyboardFocusChange();
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -393,15 +656,13 @@
     @Test
     public void test_compare_KeyboardFocusChange_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyboardFocusChange();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new KeyboardFocusChange();
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -411,11 +672,9 @@
     @Test
     public void test_compare_KeyPressed_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyPressed(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -425,14 +684,12 @@
     @Test
     public void test_compare_KeyPressed_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyPressed(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyPressed(VirtualKey.LETTER_A);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -442,14 +699,12 @@
     @Test
     public void test_compare_KeyPressed_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyPressed(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyPressed(VirtualKey.LETTER_B);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -459,15 +714,13 @@
     @Test
     public void test_compare_KeyPressed_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyPressed(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyPressed(VirtualKey.LETTER_A);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -477,11 +730,9 @@
     @Test
     public void test_compare_KeyReleased_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyReleased(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -491,14 +742,12 @@
     @Test
     public void test_compare_KeyReleased_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyReleased(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyReleased(VirtualKey.LETTER_A);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -508,14 +757,12 @@
     @Test
     public void test_compare_KeyReleased_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyReleased(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyReleased(VirtualKey.LETTER_B);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -525,15 +772,13 @@
     @Test
     public void test_compare_KeyReleased_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyReleased(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyReleased(VirtualKey.LETTER_A);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -543,11 +788,9 @@
     @Test
     public void test_compare_KeyTyped_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyTyped(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -557,14 +800,12 @@
     @Test
     public void test_compare_KeyTyped_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyTyped(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyTyped(VirtualKey.LETTER_A);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -574,14 +815,12 @@
     @Test
     public void test_compare_KeyTyped_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyTyped(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyTyped(VirtualKey.LETTER_B);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -591,15 +830,13 @@
     @Test
     public void test_compare_KeyTyped_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyTyped(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyTyped(VirtualKey.LETTER_A);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -609,11 +846,9 @@
     @Test
     public void test_compare_MouseButtonDown_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -623,14 +858,12 @@
     @Test
     public void test_compare_MouseButtonDown_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -640,14 +873,12 @@
     @Test
     public void test_compare_MouseButtonDown_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 3);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -657,14 +888,12 @@
     @Test
     public void test_compare_MouseButtonDown_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 3, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -674,14 +903,12 @@
     @Test
     public void test_compare_MouseButtonDown_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonDown(MouseButtonInteraction.Button.RIGHT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -691,15 +918,13 @@
     @Test
     public void test_compare_MouseButtonDown_06() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -709,11 +934,9 @@
     @Test
     public void test_compare_MouseButtonUp_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -723,14 +946,12 @@
     @Test
     public void test_compare_MouseButtonUp_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -740,14 +961,12 @@
     @Test
     public void test_compare_MouseButtonUp_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 3);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -757,14 +976,12 @@
     @Test
     public void test_compare_MouseButtonUp_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 3, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -774,14 +991,12 @@
     @Test
     public void test_compare_MouseButtonUp_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonUp(MouseButtonInteraction.Button.RIGHT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -791,15 +1006,13 @@
     @Test
     public void test_compare_MouseButtonUp_06() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -809,11 +1022,9 @@
     @Test
     public void test_compare_MouseClick_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -823,14 +1034,12 @@
     @Test
     public void test_compare_MouseClick_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -840,14 +1049,12 @@
     @Test
     public void test_compare_MouseClick_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 3);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -857,14 +1064,12 @@
     @Test
     public void test_compare_MouseClick_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseClick(MouseButtonInteraction.Button.LEFT, 3, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -874,14 +1079,12 @@
     @Test
     public void test_compare_MouseClick_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseClick(MouseButtonInteraction.Button.RIGHT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -891,15 +1094,13 @@
     @Test
     public void test_compare_MouseClick_06() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -909,11 +1110,9 @@
     @Test
     public void test_compare_MouseDoubleClick_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -923,14 +1122,12 @@
     @Test
     public void test_compare_MouseDoubleClick_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -940,14 +1137,12 @@
     @Test
     public void test_compare_MouseDoubleClick_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 3);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -957,14 +1152,12 @@
     @Test
     public void test_compare_MouseDoubleClick_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 3, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -974,14 +1167,12 @@
     @Test
     public void test_compare_MouseDoubleClick_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDoubleClick(MouseButtonInteraction.Button.RIGHT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -991,15 +1182,13 @@
     @Test
     public void test_compare_MouseDoubleClick_06() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -1009,11 +1198,9 @@
     @Test
     public void test_compare_MouseDragAndDrop_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -1023,14 +1210,12 @@
     @Test
     public void test_compare_MouseDragAndDrop_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDragAndDrop(1, 2, 3, 4);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1040,14 +1225,12 @@
     @Test
     public void test_compare_MouseDragAndDrop_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDragAndDrop(5, 2, 3, 4);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1057,14 +1240,12 @@
     @Test
     public void test_compare_MouseDragAndDrop_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDragAndDrop(1, 5, 3, 4);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1074,14 +1255,12 @@
     @Test
     public void test_compare_MouseDragAndDrop_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDragAndDrop(1, 2, 5, 4);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1091,14 +1270,12 @@
     @Test
     public void test_compare_MouseDragAndDrop_06() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDragAndDrop(1, 2, 3, 5);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1108,15 +1285,13 @@
     @Test
     public void test_compare_MouseDragAndDrop_07() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1126,11 +1301,9 @@
     @Test
     public void test_compare_Scroll_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new Scroll(1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -1140,14 +1313,12 @@
     @Test
     public void test_compare_Scroll_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new Scroll(1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new Scroll(1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1157,14 +1328,12 @@
     @Test
     public void test_compare_Scroll_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new Scroll(1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new Scroll(3, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1174,14 +1343,12 @@
     @Test
     public void test_compare_Scroll_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new Scroll(1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new Scroll(1, 3);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1191,15 +1358,13 @@
     @Test
     public void test_compare_Scroll_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new Scroll(1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new Scroll(1, 2);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -1209,6 +1374,4 @@
     @Test
     public void test_compare_TextInput_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new StringEventType("eventType1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
@@ -1216,7 +1379,7 @@
         textInputEvents1.add(new Event(eventType1, eventTarget1));
         eventType1 = new TextInput("enteredText1", textInputEvents1);
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
     
@@ -1226,6 +1389,4 @@
     @Test
     public void test_compare_TextInput_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new StringEventType("eventType1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
@@ -1233,10 +1394,10 @@
         textInputEvents1.add(new Event(eventType1, eventTarget1));
         eventType1 = new TextInput("enteredText1", textInputEvents1);
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new TextInput("enteredText1", textInputEvents1);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -1246,6 +1407,4 @@
     @Test
     public void test_compare_TextInput_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new StringEventType("eventType1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
@@ -1253,5 +1412,5 @@
         textInputEvents1.add(new Event(eventType1, eventTarget1));
         eventType1 = new TextInput("enteredText1", textInputEvents1);
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new StringEventType("eventType2");
@@ -1259,7 +1418,7 @@
         textInputEvents2.add(new Event(eventType2, eventTarget1));
         eventType2 = new TextInput("enteredText1", textInputEvents2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-
-        assertSyntacticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+
+        assertSyntacticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -1269,6 +1428,4 @@
     @Test
     public void test_compare_TextInput_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new StringEventType("eventType1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
@@ -1276,5 +1433,5 @@
         textInputEvents1.add(new Event(eventType1, eventTarget1));
         eventType1 = new TextInput("enteredText1", textInputEvents1);
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new StringEventType("eventType2");
@@ -1282,7 +1439,7 @@
         textInputEvents2.add(new Event(eventType2, eventTarget1));
         eventType2 = new TextInput("enteredText2", textInputEvents2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -1292,6 +1449,4 @@
     @Test
     public void test_compare_TextInput_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new StringEventType("eventType1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
@@ -1299,10 +1454,10 @@
         textInputEvents1.add(new Event(eventType1, eventTarget1));
         eventType1 = new TextInput("enteredText1", textInputEvents1);
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType1, eventTarget2);
-
-        assertUnequal(task1, task2);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType1, eventTarget2);
+
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1312,11 +1467,9 @@
     @Test
     public void test_compare_TextSelection_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new TextSelection();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -1326,14 +1479,12 @@
     @Test
     public void test_compare_TextSelection_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new TextSelection();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new TextSelection();
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1343,15 +1494,13 @@
     @Test
     public void test_compare_TextSelection_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new TextSelection();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new TextSelection();
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1361,11 +1510,9 @@
     @Test
     public void test_compare_ValueSelection_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new ValueSelection<String>("value1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -1375,14 +1522,12 @@
     @Test
     public void test_compare_ValueSelection_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new ValueSelection<String>("value1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new ValueSelection<String>("value1");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1392,14 +1537,12 @@
     @Test
     public void test_compare_ValueSelection_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new ValueSelection<String>("value1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new ValueSelection<String>("value2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1409,83 +1552,13 @@
     @Test
     public void test_compare_ValueSelection_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new ValueSelection<String>("value1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new ValueSelection<String>("value1");
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
-    }
-    
-    /**
-     *
-     */
-    private void assertLexicallyEqual(ITask task1, ITask task2) {
-        GUIEventTaskComparisonRule rule = new GUIEventTaskComparisonRule();
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, task2));
-        assertTrue(rule.areLexicallyEqual(task1, task2));
-        assertTrue(rule.areSyntacticallyEqual(task1, task2));
-        assertTrue(rule.areSemanticallyEqual(task1, task2));
-
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task2, task1));
-        assertTrue(rule.areLexicallyEqual(task2, task1));
-        assertTrue(rule.areSyntacticallyEqual(task2, task1));
-        assertTrue(rule.areSemanticallyEqual(task2, task1));
-    }
-
-    /**
-     *
-     */
-    private void assertSyntacticallyEqual(ITask task1, ITask task2) {
-        GUIEventTaskComparisonRule rule = new GUIEventTaskComparisonRule();
-        
-        assertEquals(TaskEquality.SYNTACTICALLY_EQUAL, rule.compare(task1, task2));
-        assertFalse(rule.areLexicallyEqual(task1, task2));
-        assertTrue(rule.areSyntacticallyEqual(task1, task2));
-        assertTrue(rule.areSemanticallyEqual(task1, task2));
-
-        assertEquals(TaskEquality.SYNTACTICALLY_EQUAL, rule.compare(task2, task1));
-        assertFalse(rule.areLexicallyEqual(task2, task1));
-        assertTrue(rule.areSyntacticallyEqual(task2, task1));
-        assertTrue(rule.areSemanticallyEqual(task2, task1));
-    }
-
-    /**
-     *
-     */
-    private void assertSemanticallyEqual(ITask task1, ITask task2) {
-        GUIEventTaskComparisonRule rule = new GUIEventTaskComparisonRule();
-        
-        assertEquals(TaskEquality.SEMANTICALLY_EQUAL, rule.compare(task1, task2));
-        assertFalse(rule.areLexicallyEqual(task1, task2));
-        assertFalse(rule.areSyntacticallyEqual(task1, task2));
-        assertTrue(rule.areSemanticallyEqual(task1, task2));
-
-        assertEquals(TaskEquality.SEMANTICALLY_EQUAL, rule.compare(task2, task1));
-        assertFalse(rule.areLexicallyEqual(task2, task1));
-        assertFalse(rule.areSyntacticallyEqual(task2, task1));
-        assertTrue(rule.areSemanticallyEqual(task2, task1));
-    }
-
-    /**
-     *
-     */
-    private void assertUnequal(ITask task1, ITask task2) {
-        GUIEventTaskComparisonRule rule = new GUIEventTaskComparisonRule();
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(task1, task2));
-        assertFalse(rule.areLexicallyEqual(task1, task2));
-        assertFalse(rule.areSyntacticallyEqual(task1, task2));
-        assertFalse(rule.areSemanticallyEqual(task1, task2));
-
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(task2, task1));
-        assertFalse(rule.areLexicallyEqual(task2, task1));
-        assertFalse(rule.areSyntacticallyEqual(task2, task1));
-        assertFalse(rule.areSemanticallyEqual(task2, task1));
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
 }
Index: /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/IterationComparisonRuleTest.java
===================================================================
--- /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/IterationComparisonRuleTest.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/IterationComparisonRuleTest.java	(revision 1294)
@@ -23,12 +23,7 @@
 import de.ugoe.cs.autoquest.eventcore.StringEventType;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.IterationComparisonRule;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -36,14 +31,162 @@
  * @author Patrick Harms
  */
-public class IterationComparisonRuleTest {
-
-    /**
-     *
-     */
-    @Test
-    public void test() {
-        ITaskFactory taskFactory = new TaskFactory();
-        ITaskBuilder treeBuilder = new TaskBuilder();
-        
+public class IterationComparisonRuleTest extends AbstractComparisonRuleTest {
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_01() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        ITask task1 = createNewIteration();
+        
+        assertTrue(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_02() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewIteration();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_03() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewSequence();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_04() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewSelection();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_05() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_06() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_01() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IIteration iteration1 = createNewIteration();
+        
+        assertLexicallyEqual(rule, iteration1, iteration1);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_02() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IIteration iteration1 = createNewIteration();
+        IIteration iteration2 = createNewIteration();
+        
+        assertLexicallyEqual(rule, iteration1, iteration2);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_03() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        IIteration iteration2 = createNewIteration();
+        
+        setMarkedTask(iteration1, task1);
+        
+        assertUnequal(rule, iteration1, iteration2);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_04() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        IIteration iteration2 = createNewIteration();
+        
+        setMarkedTask(iteration1, task1);
+        setMarkedTask(iteration2, task1);
+        
+        assertLexicallyEqual(rule, iteration1, iteration2);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_05() {
         IterationComparisonRule rule = new IterationComparisonRule();
         
@@ -54,60 +197,95 @@
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
 
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertFalse(rule.isApplicable(task1, task2));
-        
-        IIteration iteration1 = taskFactory.createNewIteration();
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, iteration1));
-
-        IIteration iteration2 = taskFactory.createNewIteration();
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, iteration2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration2, iteration1));
-        
-        treeBuilder.setMarkedTask(iteration1, task1);
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(iteration1, iteration2));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(iteration2, iteration1));
-        
-        treeBuilder.setMarkedTask(iteration2, task1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, iteration2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration2, iteration1));
-        
-        treeBuilder.setMarkedTask(iteration1, task2);
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(iteration1, iteration2));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(iteration2, iteration1));
-        
-        treeBuilder.setMarkedTask(iteration2, task2);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, iteration2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration2, iteration1));
-        
-        ISelection selection1 = taskFactory.createNewSelection();
-        treeBuilder.addChild(selection1, task2);
-        treeBuilder.setMarkedTask(iteration1, selection1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, iteration2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration2, iteration1));
-        
-        ISelection selection2 = taskFactory.createNewSelection();
-        treeBuilder.addChild(selection2, task2);
-        treeBuilder.setMarkedTask(iteration2, selection2);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, iteration2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration2, iteration1));
-        
-        assertFalse(rule.isApplicable(iteration1, selection1));
-        assertFalse(rule.isApplicable(selection1, iteration1));
-        assertFalse(rule.isApplicable(iteration2, selection1));
-        assertFalse(rule.isApplicable(selection1, iteration2));
-
-        assertFalse(rule.isApplicable(iteration1, selection2));
-        assertFalse(rule.isApplicable(selection2, iteration1));
-        assertFalse(rule.isApplicable(iteration2, selection2));
-        assertFalse(rule.isApplicable(selection2, iteration2));
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        IIteration iteration1 = createNewIteration();
+        IIteration iteration2 = createNewIteration();
+        
+        setMarkedTask(iteration1, task1);
+        setMarkedTask(iteration1, task2);
+        
+        assertUnequal(rule, iteration1, iteration2);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_06() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        IIteration iteration2 = createNewIteration();
+        
+        ISelection selection1 = createNewSelection();
+        addChild(selection1, task1);
+        setMarkedTask(iteration1, selection1);
+        
+        setMarkedTask(iteration2, task1);
+        
+        assertLexicallyEqual(rule, iteration1, iteration2);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_07() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        IIteration iteration2 = createNewIteration();
+        
+        ISelection selection1 = createNewSelection();
+        addChild(selection1, task1);
+        setMarkedTask(iteration1, selection1);
+        
+        ISelection selection2 = createNewSelection();
+        addChild(selection2, task1);
+        setMarkedTask(iteration2, selection2);
+        
+        assertLexicallyEqual(rule, iteration1, iteration2);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_08() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        IEventType eventType2 = new StringEventType("eventType2");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        IIteration iteration1 = createNewIteration();
+        IIteration iteration2 = createNewIteration();
+        
+        ISelection selection1 = createNewSelection();
+        addChild(selection1, task1);
+        addChild(selection1, task2);
+        setMarkedTask(iteration1, selection1);
+
+        ISelection selection2 = createNewSelection();
+        addChild(selection2, task2);
+        setMarkedTask(iteration2, selection2);
+        
+        assertLexicallyEqual(rule, iteration1, iteration2);
     }
 
Index: /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRuleTest.java
===================================================================
--- /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRuleTest.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRuleTest.java	(revision 1294)
@@ -22,13 +22,7 @@
 import de.ugoe.cs.autoquest.eventcore.IEventType;
 import de.ugoe.cs.autoquest.eventcore.StringEventType;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.SelectionComparisonRule;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -36,14 +30,161 @@
  * @author Patrick Harms
  */
-public class SelectionComparisonRuleTest {
-
-    /**
-     * 
-     */
-    @Test
-    public void test() {
-        ITaskFactory taskFactory = new TaskFactory();
-        ITaskBuilder treeBuilder = new TaskBuilder();
-        
+public class SelectionComparisonRuleTest extends AbstractComparisonRuleTest {
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_01() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+        
+        ITask task1 = createNewSelection();
+        
+        assertTrue(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_02() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewSelection();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_03() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewSequence();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_04() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewIteration();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_05() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_06() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_01() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+        
+        ISelection selection1 = createNewSelection();
+        assertLexicallyEqual(rule, selection1, selection1);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_02() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+        
+        ISelection selection1 = createNewSelection();
+        ISelection selection2 = createNewSelection();
+        
+        assertLexicallyEqual(rule, selection1, selection2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_03() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ISelection selection1 = createNewSelection();
+        ISelection selection2 = createNewSelection();
+        
+        addChild(selection1, task1);
+        
+        assertUnequal(rule, selection1, selection2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_04() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ISelection selection1 = createNewSelection();
+        ISelection selection2 = createNewSelection();
+        
+        addChild(selection1, task1);
+        addChild(selection2, task1);
+        
+        assertLexicallyEqual(rule, selection1, selection2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_05() {
         SelectionComparisonRule rule = new SelectionComparisonRule();
         
@@ -54,54 +195,44 @@
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
 
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertFalse(rule.isApplicable(task1, task2));
-        
-        ISelection selection1 = taskFactory.createNewSelection();
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection1, selection1));
-
-        ISelection selection2 = taskFactory.createNewSelection();
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection1, selection2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection2, selection1));
-        
-        treeBuilder.addChild(selection1, task1);
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(selection1, selection2));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(selection2, selection1));
-        
-        treeBuilder.addChild(selection2, task1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection1, selection2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection2, selection1));
-        
-        treeBuilder.addChild(selection1, task2);
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(selection1, selection2));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(selection2, selection1));
-        
-        treeBuilder.addChild(selection2, task2);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection1, selection2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection2, selection1));
-        
-        ISelection selection3 = taskFactory.createNewSelection();
-        treeBuilder.addChild(selection3, task2);
-        treeBuilder.addChild(selection3, task1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection1, selection3));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection3, selection1));
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection2, selection3));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection3, selection2));
-
-        ISequence sequence = taskFactory.createNewSequence();
-        assertFalse(rule.isApplicable(selection1, sequence));
-        assertFalse(rule.isApplicable(sequence, selection1));
-        assertFalse(rule.isApplicable(selection2, sequence));
-        assertFalse(rule.isApplicable(sequence, selection2));
-        assertFalse(rule.isApplicable(selection3, sequence));
-        assertFalse(rule.isApplicable(sequence, selection3));
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        ISelection selection1 = createNewSelection();
+        ISelection selection2 = createNewSelection();
+        
+        addChild(selection1, task1);
+        addChild(selection2, task2);
+        
+        assertUnequal(rule, selection1, selection2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_06() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        IEventType eventType2 = new StringEventType("eventType2");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        ISelection selection1 = createNewSelection();
+        ISelection selection2 = createNewSelection();
+        
+        addChild(selection1, task1);
+        addChild(selection2, task2);
+        
+        ISelection selection3 = createNewSelection();
+        addChild(selection3, task1);
+        assertLexicallyEqual(rule, selection1, selection3);
+        
+        addChild(selection3, task2);
+        assertLexicallyEqual(rule, selection2, selection3);
     }
 
Index: /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRuleTest.java
===================================================================
--- /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRuleTest.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRuleTest.java	(revision 1294)
@@ -22,13 +22,7 @@
 import de.ugoe.cs.autoquest.eventcore.IEventType;
 import de.ugoe.cs.autoquest.eventcore.StringEventType;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.SequenceComparisonRule;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -36,14 +30,161 @@
  * @author Patrick Harms
  */
-public class SequenceComparisonRuleTest {
-
-    /**
-     * 
-     */
-    @Test
-    public void test() {
-        ITaskFactory taskFactory = new TaskFactory();
-        ITaskBuilder treeBuilder = new TaskBuilder();
-        
+public class SequenceComparisonRuleTest extends AbstractComparisonRuleTest {
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_01() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        ITask task1 = createNewSequence();
+        
+        assertTrue(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_02() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewSequence();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_03() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewSelection();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_04() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewIteration();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_05() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_06() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_01() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        ISequence sequence1 = createNewSequence();
+        assertLexicallyEqual(rule, sequence1, sequence1);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_02() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        ISequence sequence1 = createNewSequence();
+        ISequence sequence2 = createNewSequence();
+        
+        assertLexicallyEqual(rule, sequence1, sequence2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_03() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ISequence sequence1 = createNewSequence();
+        ISequence sequence2 = createNewSequence();
+        
+        addChild(sequence1, task1);
+        
+        assertUnequal(rule, sequence1, sequence2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_04() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ISequence sequence1 = createNewSequence();
+        ISequence sequence2 = createNewSequence();
+        
+        addChild(sequence1, task1);
+        addChild(sequence2, task1);
+        
+        assertLexicallyEqual(rule, sequence1, sequence2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_05() {
         SequenceComparisonRule rule = new SequenceComparisonRule();
         
@@ -54,53 +195,72 @@
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
 
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertFalse(rule.isApplicable(task1, task2));
-        
-        ISequence sequence1 = taskFactory.createNewSequence();
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(sequence1, sequence1));
-
-        ISequence sequence2 = taskFactory.createNewSequence();
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(sequence1, sequence2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(sequence2, sequence1));
-        
-        treeBuilder.addChild(sequence1, task1);
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence1, sequence2));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence2, sequence1));
-        
-        treeBuilder.addChild(sequence2, task1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(sequence1, sequence2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(sequence2, sequence1));
-        
-        treeBuilder.addChild(sequence1, task2);
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence1, sequence2));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence2, sequence1));
-        
-        treeBuilder.addChild(sequence2, task2);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(sequence1, sequence2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(sequence2, sequence1));
-        
-        ISequence sequence3 = taskFactory.createNewSequence();
-        treeBuilder.addChild(sequence3, task2);
-        treeBuilder.addChild(sequence3, task1);
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence1, sequence3));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence3, sequence1));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence2, sequence3));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence3, sequence2));
-
-        ISelection selection = taskFactory.createNewSelection();
-        assertFalse(rule.isApplicable(sequence1, selection));
-        assertFalse(rule.isApplicable(selection, sequence1));
-        assertFalse(rule.isApplicable(sequence2, selection));
-        assertFalse(rule.isApplicable(selection, sequence2));
-        assertFalse(rule.isApplicable(sequence3, selection));
-        assertFalse(rule.isApplicable(selection, sequence3));
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        ISequence sequence1 = createNewSequence();
+        ISequence sequence2 = createNewSequence();
+        
+        addChild(sequence1, task1);
+        addChild(sequence2, task1);
+        
+        addChild(sequence1, task2);
+        
+        assertUnequal(rule, sequence1, sequence2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_06() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        IEventType eventType2 = new StringEventType("eventType2");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        ISequence sequence1 = createNewSequence();
+        ISequence sequence2 = createNewSequence();
+        
+        addChild(sequence1, task1);
+        addChild(sequence2, task1);
+        
+        addChild(sequence1, task2);
+        addChild(sequence2, task2);
+        
+        assertLexicallyEqual(rule, sequence1, sequence2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_07() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        IEventType eventType2 = new StringEventType("eventType2");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        ISequence sequence1 = createNewSequence();
+        ISequence sequence2 = createNewSequence();
+        
+        addChild(sequence1, task1);
+        addChild(sequence1, task2);
+        
+        addChild(sequence2, task2);
+        addChild(sequence2, task1);
+        
+        assertUnequal(rule, sequence1, sequence2);
     }
 
Index: /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRuleTest.java
===================================================================
--- /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRuleTest.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRuleTest.java	(revision 1294)
@@ -23,12 +23,7 @@
 import de.ugoe.cs.autoquest.eventcore.StringEventType;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskAndIterationComparisonRule;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -36,38 +31,258 @@
  * @author Patrick Harms
  */
-public class TaskAndIterationComparisonRuleTest {
-
-    /**
-     *
-     */
-    @Test
-    public void test() {
-        ITaskFactory taskFactory = new TaskFactory();
-        ITaskBuilder treeBuilder = new TaskBuilder();
-        
-        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertNull(rule.compare(task1, task1));
-        
-        IIteration iteration1 = taskFactory.createNewIteration();
-        assertNull(rule.compare(iteration1, iteration1));
-        assertNull(rule.compare(task1, iteration1));
-        assertNull(rule.compare(iteration1, task1));
-
-        treeBuilder.setMarkedTask(iteration1, task1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, task1));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, iteration1));
-        
-        ISelection selection1 = taskFactory.createNewSelection();
-        treeBuilder.addChild(selection1, task1);
-        treeBuilder.setMarkedTask(iteration1, selection1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, task1));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, iteration1));
+public class TaskAndIterationComparisonRuleTest extends AbstractComparisonRuleTest {
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_01() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        ITask task1 = createNewSequence();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_02() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        ITask task1 = createNewSelection();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_03() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        ITask task1 = createNewIteration();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_04() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        ITask task1 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_05() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_06() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewSequence();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_07() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewSelection();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_08() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewOptional();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_09() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_10() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewSelection();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_11() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_12() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSequence();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_13() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_14() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSelection();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_01() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        
+        assertNullEquality(rule, iteration1, task1);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_02() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        setMarkedTask(iteration1, task1);
+        
+        assertLexicallyEqual(rule, task1, iteration1);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_03() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        
+        ISelection selection1 = createNewSelection();
+        addChild(selection1, task1);
+        setMarkedTask(iteration1, selection1);
+        
+        assertLexicallyEqual(rule, task1, iteration1);
     }
 
Index: /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRuleTest.java
===================================================================
--- /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRuleTest.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRuleTest.java	(revision 1294)
@@ -23,11 +23,6 @@
 import de.ugoe.cs.autoquest.eventcore.StringEventType;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskAndSelectionComparisonRule;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -35,39 +30,238 @@
  * @author Patrick Harms
  */
-public class TaskAndSelectionComparisonRuleTest {
-
-    /**
-     *
-     */
-    @Test
-    public void test() {
-        ITaskFactory taskFactory = new TaskFactory();
-        ITaskBuilder treeBuilder = new TaskBuilder();
-        
-        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertNull(rule.compare(task1, task1));
-        
-        ISelection selection1 = taskFactory.createNewSelection();
-        assertNull(rule.compare(selection1, selection1));
-        assertNull(rule.compare(task1, selection1));
-        assertNull(rule.compare(selection1, task1));
-
-        treeBuilder.addChild(selection1, task1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection1, task1));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, selection1));
-        
-        selection1 = taskFactory.createNewSelection();
-        ISelection selection2 = taskFactory.createNewSelection();
-        treeBuilder.addChild(selection2, task1);
-        treeBuilder.addChild(selection1, selection2);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection1, task1));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, selection1));
+public class TaskAndSelectionComparisonRuleTest extends AbstractComparisonRuleTest {
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_01() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+        
+        ITask task1 = createNewSequence();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_02() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+        
+        ITask task1 = createNewSelection();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_03() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+        
+        ITask task1 = createNewIteration();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_04() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+        
+        ITask task1 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_05() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_06() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewSequence();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_07() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewIteration();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_08() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewOptional();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_09() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_10() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewIteration();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_11() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_12() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewSequence();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_13() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_14() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewIteration();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_01() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ISelection selection1 = createNewSelection();
+        
+        assertNullEquality(rule, task1, selection1);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_02() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ISelection selection1 = createNewSelection();
+        addChild(selection1, task1);
+        
+        assertLexicallyEqual(rule, task1, selection1);
     }
 
Index: /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/AbstractTemporalRelationshipTC.java
===================================================================
--- /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/AbstractTemporalRelationshipTC.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/AbstractTemporalRelationshipTC.java	(revision 1294)
@@ -33,4 +33,5 @@
 import de.ugoe.cs.autoquest.tasktrees.TaskTreeValidator;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
@@ -74,9 +75,9 @@
      *
      */
-    protected void applyRule(Class<? extends ITaskInstanceListScopeRule> ruleClass,
-                             String                                      inputSpec,
-                             String                                      expectedOutputSpec)
+    protected void applyRule(Class<? extends ITaskInstanceScopeRule> ruleClass,
+                             String                                  inputSpec,
+                             String                                  expectedOutputSpec)
     {
-        ITaskInstanceListScopeRule rule = null;
+        ITaskInstanceScopeRule rule = null;
         
         CONSTRUCTOR_ITERATION:
@@ -100,5 +101,5 @@
             
             try {
-                rule = (ITaskInstanceListScopeRule) constructor.newInstance(parameters.toArray());
+                rule = (ITaskInstanceScopeRule) constructor.newInstance(parameters.toArray());
             }
             catch (IllegalArgumentException e) {
@@ -127,7 +128,7 @@
         RuleApplicationStatus status;
         
-        ITaskInstanceList inputList = decoder.decode(inputSpec);
-        
-        Stack<ITaskInstanceList> toBeAppliedOn = new Stack<ITaskInstanceList>();
+        ITaskInstance inputList = (ITaskInstance) decoder.decode(inputSpec);
+        
+        Stack<ITaskInstance> toBeAppliedOn = new Stack<ITaskInstance>();
         toBeAppliedOn.push(inputList);
         
@@ -156,7 +157,7 @@
         while ((!toBeAppliedOn.isEmpty()) || (status == RuleApplicationStatus.FINISHED));
 
-        ITaskInstanceList expectedList = decoder.decode(expectedOutputSpec);
-        
-        new TaskTreeChecker().assertTaskInstanceListsEqual(expectedList, inputList);
+        ITaskInstance expectedList = (ITaskInstance) decoder.decode(expectedOutputSpec);
+        
+        new TaskTreeChecker().assertTaskInstancesEqual(expectedList, inputList);
     }
 
Index: /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceTrieTest.java
===================================================================
--- /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceTrieTest.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceTrieTest.java	(revision 1294)
@@ -1510,9 +1510,9 @@
         int order = 3;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(1000, 1000000, order);
-
-        long start = System.currentTimeMillis();
-        fixture.trainSessions(Arrays.asList(tester.userSession), order);
-        System.out.println("testing session with 1000000 task instances and 1000 symbols took " +
+        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(1000, 100000, order);
+
+        long start = System.currentTimeMillis();
+        fixture.trainSessions(Arrays.asList(tester.userSession), order);
+        System.out.println("testing session with 100000 task instances and 1000 symbols took " +
                            (System.currentTimeMillis() - start) + "ms");
         
Index: /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolBucketedMapTest.java
===================================================================
--- /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolBucketedMapTest.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolBucketedMapTest.java	(revision 1294)
@@ -28,5 +28,8 @@
 import org.junit.Test;
 
+import de.ugoe.cs.autoquest.eventcore.Event;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
@@ -60,6 +63,6 @@
     @Test
     public void testSymbolMap_1() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         assertNotNull(symbolMap);
@@ -69,6 +72,6 @@
     @Test
     public void testSymbolMap_2() {
-        TaskSymbolBucketedMap<String> symbolMap1 =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        TaskSymbolBucketedMap<String> symbolMap1 = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         ITaskInstance taskInstance = createTaskInstance("symbol");
@@ -89,6 +92,6 @@
     @Test
     public void testAddSymbol_1() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         ITaskInstance taskInstance = createTaskInstance("symbol");
@@ -102,6 +105,6 @@
     @Test
     public void testAddSymbol_2() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -122,6 +125,6 @@
     @Test
     public void testAddSymbol_3() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -148,6 +151,6 @@
     @Test(expected = java.lang.IllegalArgumentException.class)
     public void testAddSymbol_4() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.addSymbol(null, null);
@@ -156,6 +159,6 @@
     @Test
     public void testSize_1() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         assertEquals(0, symbolMap.size());
@@ -164,6 +167,6 @@
     @Test
     public void testSize_2() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.addSymbol(createTaskInstance("symbol1"), "value1");
@@ -174,6 +177,6 @@
     @Test
     public void testSize_3() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -188,6 +191,6 @@
     @Test
     public void testSize_4() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -207,6 +210,6 @@
     @Test
     public void testSize_5() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -225,6 +228,6 @@
     @Test
     public void testIsEmpty_1() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         assertTrue(symbolMap.isEmpty());
@@ -233,6 +236,6 @@
     @Test
     public void testIsEmpty_2() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.addSymbol(createTaskInstance("symbol1"), "value1");
@@ -243,6 +246,6 @@
     @Test
     public void testIsEmpty_3() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -257,6 +260,6 @@
     @Test
     public void testIsEmpty_4() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -276,6 +279,6 @@
     @Test
     public void testIsEmpty_5() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -294,6 +297,6 @@
     @Test
     public void testContainsSymbol_1() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         assertFalse(symbolMap.containsSymbol(createTaskInstance("symbol")));
@@ -302,6 +305,6 @@
     @Test
     public void testContainsSymbol_2() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.addSymbol(createTaskInstance("symbol1"), "value1");
@@ -312,6 +315,6 @@
     @Test
     public void testContainsSymbol_3() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -328,6 +331,6 @@
     @Test
     public void testContainsSymbol_4() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -349,6 +352,6 @@
     @Test
     public void testContainsSymbol_5() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -377,6 +380,6 @@
     @Test(expected = java.lang.IllegalArgumentException.class)
     public void testContainsSymbol_6() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.containsSymbol(null);
@@ -385,6 +388,6 @@
     @Test
     public void testGetValue_1() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         assertNull(symbolMap.getValue(createTaskInstance("symbol")));
@@ -393,6 +396,6 @@
     @Test
     public void testGetValue_2() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.addSymbol(createTaskInstance("symbol1"), "value1");
@@ -403,6 +406,6 @@
     @Test
     public void testGetValue_3() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.addSymbol(createTaskInstance("symbol1"), null);
@@ -413,6 +416,6 @@
     @Test
     public void testGetValue_4() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -429,6 +432,6 @@
     @Test
     public void testGetValue_5() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -455,6 +458,6 @@
     @Test
     public void testGetValue_6() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -483,6 +486,6 @@
     @Test(expected = java.lang.IllegalArgumentException.class)
     public void testGetValue_7() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.getValue(null);
@@ -491,6 +494,6 @@
     @Test
     public void testRemoveSymbol_1() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         assertNull(symbolMap.removeSymbol(createTaskInstance("symbol")));
@@ -499,6 +502,6 @@
     @Test
     public void testRemoveSymbol_2() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.addSymbol(createTaskInstance("symbol1"), "value1");
@@ -510,6 +513,6 @@
     @Test
     public void testRemoveSymbol_3() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.addSymbol(createTaskInstance("symbol1"), null);
@@ -521,6 +524,6 @@
     @Test
     public void testRemoveSymbol_4() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -539,6 +542,6 @@
     @Test
     public void testRemoveSymbol_5() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -567,6 +570,6 @@
     @Test
     public void testRemoveSymbol_6() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -597,6 +600,6 @@
     @Test(expected = java.lang.IllegalArgumentException.class)
     public void testRemoveSymbol_7() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.removeSymbol(null);
@@ -605,6 +608,6 @@
     @Test
     public void testGetSymbols_1() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         assertNotNull(symbolMap.getSymbols());
@@ -614,6 +617,6 @@
     @Test
     public void testGetSymbols_2() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
          
         ITaskInstance task = createTaskInstance("symbol1");
@@ -627,6 +630,6 @@
     @Test
     public void testGetSymbols_3() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         ITaskInstance task = createTaskInstance("symbol1");
@@ -640,6 +643,6 @@
     @Test
     public void testGetSymbols_4() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         Set<ITaskInstance> expectedSymbols = new HashSet<ITaskInstance>();
         
@@ -667,6 +670,6 @@
     @Test
     public void testGetSymbols_5() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         Set<ITaskInstance> expectedSymbols = new HashSet<ITaskInstance>();
         
@@ -701,6 +704,6 @@
     @Test
     public void testGetSymbols_6() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         List<ITaskInstance> expectedSymbols = new ArrayList<ITaskInstance>();
         
@@ -732,6 +735,6 @@
     @Test
     public void testGetValues_1() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         assertNotNull(symbolMap.getValues());
@@ -741,6 +744,6 @@
     @Test
     public void testGetValues_2() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.addSymbol(createTaskInstance("symbol1"), "value1");
@@ -753,6 +756,6 @@
     @Test
     public void testGetValues_3() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.addSymbol(createTaskInstance("symbol1"), null);
@@ -765,6 +768,6 @@
     @Test
     public void testGetValues_4() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         Set<String> expectedValues = new HashSet<String>();
         
@@ -791,6 +794,6 @@
     @Test
     public void testGetValues_5() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         Set<String> expectedValues = new HashSet<String>();
         
@@ -823,6 +826,6 @@
     @Test
     public void testGetValues_6() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         Set<String> expectedValues = new HashSet<String>();
         
@@ -854,6 +857,6 @@
     @Test
     public void testClear_1() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         symbolMap.clear();
@@ -863,6 +866,6 @@
     @Test
     public void testClear_2() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.addSymbol(createTaskInstance("symbol1"), "value1");
@@ -874,6 +877,6 @@
     @Test
     public void testClear_3() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap.addSymbol(createTaskInstance("symbol1"), null);
@@ -885,6 +888,6 @@
     @Test
     public void testClear_4() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -900,6 +903,6 @@
     @Test
     public void testClear_5() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -920,6 +923,6 @@
     @Test
     public void testClear_6() {
-        SymbolMap<ITaskInstance, String> symbolMap =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 2000;
@@ -939,9 +942,9 @@
     @Test
     public void testEquals_1() {
-        SymbolMap<ITaskInstance, String> symbolMap1 =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
-        
-        SymbolMap<ITaskInstance, String> symbolMap2 =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap1 = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        
+        SymbolMap<ITaskInstance, String> symbolMap2 = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         assertTrue(symbolMap1.equals(symbolMap2));
@@ -950,9 +953,9 @@
     @Test
     public void testEquals_2() {
-        SymbolMap<ITaskInstance, String> symbolMap1 =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
-            
-        SymbolMap<ITaskInstance, String> symbolMap2 =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap1 = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
+            
+        SymbolMap<ITaskInstance, String> symbolMap2 = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
             
         symbolMap1.addSymbol(createTaskInstance("symbol1"), "value1");
@@ -963,9 +966,9 @@
     @Test
     public void testEquals_3() {
-        SymbolMap<ITaskInstance, String> symbolMap1 =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
-            
-        SymbolMap<ITaskInstance, String> symbolMap2 =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap1 = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
+            
+        SymbolMap<ITaskInstance, String> symbolMap2 = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         ITaskInstance task = createTaskInstance("symbol1");
@@ -978,9 +981,9 @@
     @Test
     public void testEquals_4() {
-        SymbolMap<ITaskInstance, String> symbolMap1 =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap1 = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
                 
-        SymbolMap<ITaskInstance, String> symbolMap2 =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap2 = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 1000;
@@ -997,9 +1000,9 @@
     @Test
     public void testEquals_5() {
-        SymbolMap<ITaskInstance, String> symbolMap1 =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap1 = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
                
-        SymbolMap<ITaskInstance, String> symbolMap2 =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap2 = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 1000;
@@ -1024,9 +1027,9 @@
     @Test
     public void testEquals_6() {
-        SymbolMap<ITaskInstance, String> symbolMap1 =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap1 = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
                 
-        SymbolMap<ITaskInstance, String> symbolMap2 =
-            new TaskSymbolBucketedMap<String>(new TaskComparator(TaskEquality.SEMANTICALLY_EQUAL));
+        SymbolMap<ITaskInstance, String> symbolMap2 = new TaskSymbolBucketedMap<String>
+            (new TaskInstanceComparator(TaskEquality.SEMANTICALLY_EQUAL));
         
         int entryCount = 1000;
@@ -1052,22 +1055,21 @@
     
     /**
-     * <p>
-     * TODO: comment
-     * </p>
      *
-     * @param string
-     * @return
      */
     private ITaskInstance createTaskInstance(String id) {
         ITask task = tasks.get(id);
-        
+        Event event = null;
+       
         if (task == null) {
-            task = taskFactory.createNewEventTask
-                (new DummyInteraction(id, 0), new DummyGUIElement("default"));
-            
+            event = new Event(new DummyInteraction(id, 0), new DummyGUIElement("default"));
+            task = taskFactory.createNewEventTask(event.toString());
+           
             tasks.put(id, task);
         }
-        
-        return taskFactory.createNewTaskInstance(task);
+        else {
+            event = ((IEventTaskInstance) task.getInstances().iterator().next()).getEvent();
+        }
+       
+        return taskFactory.createNewTaskInstance((IEventTask) task, event);
     }
 
Index: /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolIdentityMapTest.java
===================================================================
--- /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolIdentityMapTest.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolIdentityMapTest.java	(revision 1294)
@@ -28,4 +28,7 @@
 import org.junit.Test;
 
+import de.ugoe.cs.autoquest.eventcore.Event;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
@@ -1054,23 +1057,23 @@
                            " took " + (System.currentTimeMillis() - start));
     }
+    
     /**
-     * <p>
-     * TODO: comment
-     * </p>
      *
-     * @param string
-     * @return
      */
     private ITaskInstance createTaskInstance(String id) {
         ITask task = tasks.get(id);
+        Event event = null;
         
         if (task == null) {
-            task = taskFactory.createNewEventTask
-                (new DummyInteraction(id, 0), new DummyGUIElement("default"));
+            event = new Event(new DummyInteraction(id, 0), new DummyGUIElement("default"));
+            task = taskFactory.createNewEventTask(event.toString());
             
             tasks.put(id, task);
         }
-        
-        return taskFactory.createNewTaskInstance(task);
+        else {
+            event = ((IEventTaskInstance) task.getInstances().iterator().next()).getEvent();
+        }
+        
+        return taskFactory.createNewTaskInstance((IEventTask) task, event);
     }
 
Index: /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskModelTest.java
===================================================================
--- /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskModelTest.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskModelTest.java	(revision 1294)
@@ -24,11 +24,17 @@
 import org.junit.Test;
 
+import de.ugoe.cs.autoquest.eventcore.Event;
 import de.ugoe.cs.autoquest.eventcore.IEventTarget;
 import de.ugoe.cs.autoquest.eventcore.IEventType;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptionalInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
@@ -45,8 +51,5 @@
 
 /**
- * TODO comment
- * 
- * @version $Revision: $ $Date: 02.04.2012$
- * @author 2012, last modified by $Author: patrick$
+ *
  */
 public class TaskModelTest {
@@ -69,5 +72,5 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task = createNewEventTask(eventType, eventTarget);
         
         assertNotNull(task);
@@ -76,6 +79,7 @@
         assertTrue(task.equals(task));
         
-        assertEquals(eventType, task.getEventType());
-        assertEquals(eventTarget, task.getEventTarget());
+        IEventTaskInstance instance = (IEventTaskInstance) task.getInstances().iterator().next();
+        assertEquals(eventType, instance.getEvent().getType());
+        assertEquals(eventTarget, instance.getEvent().getTarget());
     }
 
@@ -88,6 +92,6 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task1 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask task2 = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task1 = createNewEventTask(eventType, eventTarget);
+        IEventTask task2 = createNewEventTask(eventType, eventTarget);
         
         // the tasks will not be equal as they should have a different id
@@ -103,7 +107,7 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
-        ITaskInstance taskInstance1 = taskFactory.createNewTaskInstance(task);
-        ITaskInstance taskInstance2 = taskFactory.createNewTaskInstance(task);
+        IEventTask task = createNewEventTask(eventType, eventTarget);
+        ITaskInstance taskInstance1 = createNewTaskInstance(task);
+        ITaskInstance taskInstance2 = createNewTaskInstance(task);
         
         assertFalse(taskInstance1.equals(taskInstance2));
@@ -133,5 +137,5 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask child = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask child = createNewEventTask(eventType, eventTarget);
 
         ISequence task = taskFactory.createNewSequence();
@@ -152,9 +156,9 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask child1 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask child2 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask child3 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask child4 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask child5 = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask child1 = createNewEventTask(eventType, eventTarget);
+        IEventTask child2 = createNewEventTask(eventType, eventTarget);
+        IEventTask child3 = createNewEventTask(eventType, eventTarget);
+        IEventTask child4 = createNewEventTask(eventType, eventTarget);
+        IEventTask child5 = createNewEventTask(eventType, eventTarget);
 
         ISequence task = taskFactory.createNewSequence();
@@ -198,5 +202,5 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask child = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask child = createNewEventTask(eventType, eventTarget);
 
         ISelection task = taskFactory.createNewSelection();
@@ -217,9 +221,9 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask child1 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask child2 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask child3 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask child4 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask child5 = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask child1 = createNewEventTask(eventType, eventTarget);
+        IEventTask child2 = createNewEventTask(eventType, eventTarget);
+        IEventTask child3 = createNewEventTask(eventType, eventTarget);
+        IEventTask child4 = createNewEventTask(eventType, eventTarget);
+        IEventTask child5 = createNewEventTask(eventType, eventTarget);
 
         ISelection task = taskFactory.createNewSelection();
@@ -262,5 +266,5 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask child = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask child = createNewEventTask(eventType, eventTarget);
 
         IIteration task = taskFactory.createNewIteration();
@@ -279,6 +283,6 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask child1 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask child2 = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask child1 = createNewEventTask(eventType, eventTarget);
+        IEventTask child2 = createNewEventTask(eventType, eventTarget);
 
         IIteration task = taskFactory.createNewIteration();
@@ -312,5 +316,5 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask child = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask child = createNewEventTask(eventType, eventTarget);
 
         IOptional task = taskFactory.createNewOptional();
@@ -329,6 +333,6 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask child1 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask child2 = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask child1 = createNewEventTask(eventType, eventTarget);
+        IEventTask child2 = createNewEventTask(eventType, eventTarget);
 
         IOptional task = taskFactory.createNewOptional();
@@ -348,7 +352,7 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
-        
-        ITaskInstance taskInstance = taskFactory.createNewTaskInstance(task);
+        IEventTask task = createNewEventTask(eventType, eventTarget);
+        
+        IEventTaskInstance taskInstance = createNewTaskInstance(task);
         
         assertNotNull(taskInstance);
@@ -356,6 +360,4 @@
         assertTrue(taskInstance.equals(taskInstance));
         assertFalse(taskInstance.equals(task));
-        assertNotNull(taskInstance.getChildren());
-        assertEquals(0, taskInstance.getChildren().size());
     }
 
@@ -368,26 +370,10 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
-        
-        ITaskInstance taskInstance1 = taskFactory.createNewTaskInstance(task);
-        ITaskInstance taskInstance2 = taskFactory.createNewTaskInstance(task);
+        IEventTask task = createNewEventTask(eventType, eventTarget);
+        
+        ITaskInstance taskInstance1 = createNewTaskInstance(task);
+        ITaskInstance taskInstance2 = createNewTaskInstance(task);
         
         assertFalse(taskInstance1.equals(taskInstance2));
-    }
-
-    /**
-     *
-     */
-    @Test(expected=IllegalArgumentException.class)
-    public void test_EventTaskInstance_03() throws Exception {
-        IEventType eventType = new DummyInteraction("interaction", 1);
-        IEventTarget eventTarget = new DummyGUIElement("elem");
-        
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
-        
-        ITaskInstance taskInstance1 = taskFactory.createNewTaskInstance(task);
-        ITaskInstance taskInstance2 = taskFactory.createNewTaskInstance(task);
-        
-        taskBuilder.addChild(taskInstance1, taskInstance2);
     }
 
@@ -400,10 +386,10 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task = createNewEventTask(eventType, eventTarget);
         
         ISequence sequence = taskFactory.createNewSequence();
         
-        ITaskInstance taskInstance = taskFactory.createNewTaskInstance(task);
-        ITaskInstance sequenceInstance = taskFactory.createNewTaskInstance(sequence);
+        ITaskInstance taskInstance = createNewTaskInstance(task);
+        ISequenceInstance sequenceInstance = createNewTaskInstance(sequence);
         
         taskBuilder.addChild(sequenceInstance, taskInstance);
@@ -418,17 +404,16 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task = createNewEventTask(eventType, eventTarget);
         
         ISequence sequence = taskFactory.createNewSequence();
         taskBuilder.addChild(sequence, task);
         
-        ITaskInstance taskInstance = taskFactory.createNewTaskInstance(task);
-        ITaskInstance sequenceInstance = taskFactory.createNewTaskInstance(sequence);
+        ITaskInstance taskInstance = createNewTaskInstance(task);
+        ISequenceInstance sequenceInstance = createNewTaskInstance(sequence);
         
         taskBuilder.addChild(sequenceInstance, taskInstance);
         
-        assertNotNull(sequenceInstance.getChildren());
-        assertEquals(1, sequenceInstance.getChildren().size());
-        assertEquals(taskInstance, sequenceInstance.getChildren().get(0));
+        assertEquals(1, sequenceInstance.size());
+        assertEquals(taskInstance, sequenceInstance.get(0));
     }
 
@@ -441,9 +426,9 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task1 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask task2 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask task3 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask task4 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask task5 = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task1 = createNewEventTask(eventType, eventTarget);
+        IEventTask task2 = createNewEventTask(eventType, eventTarget);
+        IEventTask task3 = createNewEventTask(eventType, eventTarget);
+        IEventTask task4 = createNewEventTask(eventType, eventTarget);
+        IEventTask task5 = createNewEventTask(eventType, eventTarget);
         
         ISequence sequence = taskFactory.createNewSequence();
@@ -454,10 +439,10 @@
         taskBuilder.addChild(sequence, task5);
         
-        ITaskInstance taskInstance1 = taskFactory.createNewTaskInstance(task1);
-        ITaskInstance taskInstance2 = taskFactory.createNewTaskInstance(task2);
-        ITaskInstance taskInstance3 = taskFactory.createNewTaskInstance(task3);
-        ITaskInstance taskInstance4 = taskFactory.createNewTaskInstance(task4);
-        ITaskInstance taskInstance5 = taskFactory.createNewTaskInstance(task5);
-        ITaskInstance sequenceInstance = taskFactory.createNewTaskInstance(sequence);
+        ITaskInstance taskInstance1 = createNewTaskInstance(task1);
+        ITaskInstance taskInstance2 = createNewTaskInstance(task2);
+        ITaskInstance taskInstance3 = createNewTaskInstance(task3);
+        ITaskInstance taskInstance4 = createNewTaskInstance(task4);
+        ITaskInstance taskInstance5 = createNewTaskInstance(task5);
+        ISequenceInstance sequenceInstance = createNewTaskInstance(sequence);
         
         taskBuilder.addChild(sequenceInstance, taskInstance1);
@@ -467,11 +452,10 @@
         taskBuilder.addChild(sequenceInstance, taskInstance5);
         
-        assertNotNull(sequenceInstance.getChildren());
-        assertEquals(5, sequenceInstance.getChildren().size());
-        assertEquals(taskInstance1, sequenceInstance.getChildren().get(0));
-        assertEquals(taskInstance2, sequenceInstance.getChildren().get(1));
-        assertEquals(taskInstance3, sequenceInstance.getChildren().get(2));
-        assertEquals(taskInstance4, sequenceInstance.getChildren().get(3));
-        assertEquals(taskInstance5, sequenceInstance.getChildren().get(4));
+        assertEquals(5, sequenceInstance.size());
+        assertEquals(taskInstance1, sequenceInstance.get(0));
+        assertEquals(taskInstance2, sequenceInstance.get(1));
+        assertEquals(taskInstance3, sequenceInstance.get(2));
+        assertEquals(taskInstance4, sequenceInstance.get(3));
+        assertEquals(taskInstance5, sequenceInstance.get(4));
     }
 
@@ -484,12 +468,12 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task = createNewEventTask(eventType, eventTarget);
         
         ISelection selection = taskFactory.createNewSelection();
         
-        ITaskInstance taskInstance = taskFactory.createNewTaskInstance(task);
-        ITaskInstance selectionInstance = taskFactory.createNewTaskInstance(selection);
-        
-        taskBuilder.addChild(selectionInstance, taskInstance);
+        ITaskInstance taskInstance = createNewTaskInstance(task);
+        ISelectionInstance selectionInstance = createNewTaskInstance(selection);
+        
+        taskBuilder.setChild(selectionInstance, taskInstance);
     }
 
@@ -502,32 +486,31 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task = createNewEventTask(eventType, eventTarget);
         
         ISelection selection = taskFactory.createNewSelection();
         taskBuilder.addChild(selection, task);
         
-        ITaskInstance taskInstance = taskFactory.createNewTaskInstance(task);
-        ITaskInstance selectionInstance = taskFactory.createNewTaskInstance(selection);
-        
-        taskBuilder.addChild(selectionInstance, taskInstance);
-        
-        assertNotNull(selectionInstance.getChildren());
-        assertEquals(1, selectionInstance.getChildren().size());
-        assertEquals(taskInstance, selectionInstance.getChildren().get(0));
-    }
-
-    /**
-     *
-     */
-    @Test(expected=IllegalArgumentException.class)
+        ITaskInstance taskInstance = createNewTaskInstance(task);
+        ISelectionInstance selectionInstance = createNewTaskInstance(selection);
+        
+        taskBuilder.setChild(selectionInstance, taskInstance);
+        
+        assertNotNull(selectionInstance.getChild());
+        assertEquals(taskInstance, selectionInstance.getChild());
+    }
+
+    /**
+     *
+     */
+    @Test
     public void test_SelectionInstance_03() throws Exception {
         IEventType eventType = new DummyInteraction("interaction", 1);
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task1 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask task2 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask task3 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask task4 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask task5 = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task1 = createNewEventTask(eventType, eventTarget);
+        IEventTask task2 = createNewEventTask(eventType, eventTarget);
+        IEventTask task3 = createNewEventTask(eventType, eventTarget);
+        IEventTask task4 = createNewEventTask(eventType, eventTarget);
+        IEventTask task5 = createNewEventTask(eventType, eventTarget);
         
         ISelection selection = taskFactory.createNewSelection();
@@ -538,10 +521,12 @@
         taskBuilder.addChild(selection, task5);
         
-        ITaskInstance taskInstance1 = taskFactory.createNewTaskInstance(task1);
-        ITaskInstance taskInstance2 = taskFactory.createNewTaskInstance(task2);
-        ITaskInstance selectionInstance = taskFactory.createNewTaskInstance(selection);
-        
-        taskBuilder.addChild(selectionInstance, taskInstance1);
-        taskBuilder.addChild(selectionInstance, taskInstance2);
+        ITaskInstance taskInstance1 = createNewTaskInstance(task1);
+        ITaskInstance taskInstance2 = createNewTaskInstance(task2);
+        ISelectionInstance selectionInstance = createNewTaskInstance(selection);
+        
+        taskBuilder.setChild(selectionInstance, taskInstance1);
+        taskBuilder.setChild(selectionInstance, taskInstance2);
+        
+        assertEquals(taskInstance2, selectionInstance.getChild());
     }
 
@@ -554,10 +539,10 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task = createNewEventTask(eventType, eventTarget);
         
         IIteration iteration = taskFactory.createNewIteration();
         
-        ITaskInstance taskInstance = taskFactory.createNewTaskInstance(task);
-        ITaskInstance iterationInstance = taskFactory.createNewTaskInstance(iteration);
+        ITaskInstance taskInstance = createNewTaskInstance(task);
+        IIterationInstance iterationInstance = createNewTaskInstance(iteration);
         
         taskBuilder.addChild(iterationInstance, taskInstance);
@@ -572,17 +557,16 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task = createNewEventTask(eventType, eventTarget);
         
         IIteration iteration = taskFactory.createNewIteration();
         taskBuilder.setMarkedTask(iteration, task);
         
-        ITaskInstance taskInstance = taskFactory.createNewTaskInstance(task);
-        ITaskInstance iterationInstance = taskFactory.createNewTaskInstance(iteration);
+        ITaskInstance taskInstance = createNewTaskInstance(task);
+        IIterationInstance iterationInstance = createNewTaskInstance(iteration);
         
         taskBuilder.addChild(iterationInstance, taskInstance);
         
-        assertNotNull(iterationInstance.getChildren());
-        assertEquals(1, iterationInstance.getChildren().size());
-        assertEquals(taskInstance, iterationInstance.getChildren().get(0));
+        assertEquals(1, iterationInstance.size());
+        assertEquals(taskInstance, iterationInstance.get(0));
     }
 
@@ -595,6 +579,6 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task1 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask task2 = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task1 = createNewEventTask(eventType, eventTarget);
+        IEventTask task2 = createNewEventTask(eventType, eventTarget);
         
         IIteration iteration = taskFactory.createNewIteration();
@@ -602,6 +586,6 @@
         taskBuilder.setMarkedTask(iteration, task2);
         
-        ITaskInstance taskInstance1 = taskFactory.createNewTaskInstance(task1);
-        ITaskInstance iterationInstance = taskFactory.createNewTaskInstance(iteration);
+        ITaskInstance taskInstance1 = createNewTaskInstance(task1);
+        IIterationInstance iterationInstance = createNewTaskInstance(iteration);
         
         taskBuilder.addChild(iterationInstance, taskInstance1);
@@ -616,6 +600,6 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task1 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask task2 = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task1 = createNewEventTask(eventType, eventTarget);
+        IEventTask task2 = createNewEventTask(eventType, eventTarget);
         
         IIteration iteration = taskFactory.createNewIteration();
@@ -623,12 +607,11 @@
         taskBuilder.setMarkedTask(iteration, task2);
         
-        ITaskInstance taskInstance2 = taskFactory.createNewTaskInstance(task2);
-        ITaskInstance iterationInstance = taskFactory.createNewTaskInstance(iteration);
+        ITaskInstance taskInstance2 = createNewTaskInstance(task2);
+        IIterationInstance iterationInstance = createNewTaskInstance(iteration);
         
         taskBuilder.addChild(iterationInstance, taskInstance2);
         
-        assertNotNull(iterationInstance.getChildren());
-        assertEquals(1, iterationInstance.getChildren().size());
-        assertEquals(taskInstance2, iterationInstance.getChildren().get(0));
+        assertEquals(1, iterationInstance.size());
+        assertEquals(taskInstance2, iterationInstance.get(0));
     }
 
@@ -641,12 +624,12 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task = createNewEventTask(eventType, eventTarget);
         
         IOptional optional = taskFactory.createNewOptional();
         
-        ITaskInstance taskInstance = taskFactory.createNewTaskInstance(task);
-        ITaskInstance optionalInstance = taskFactory.createNewTaskInstance(optional);
-        
-        taskBuilder.addChild(optionalInstance, taskInstance);
+        ITaskInstance taskInstance = createNewTaskInstance(task);
+        IOptionalInstance optionalInstance = createNewTaskInstance(optional);
+        
+        taskBuilder.setChild(optionalInstance, taskInstance);
     }
 
@@ -659,17 +642,16 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task = createNewEventTask(eventType, eventTarget);
         
         IOptional optional = taskFactory.createNewOptional();
         taskBuilder.setMarkedTask(optional, task);
         
-        ITaskInstance taskInstance = taskFactory.createNewTaskInstance(task);
-        ITaskInstance optionalInstance = taskFactory.createNewTaskInstance(optional);
-        
-        taskBuilder.addChild(optionalInstance, taskInstance);
-        
-        assertNotNull(optionalInstance.getChildren());
-        assertEquals(1, optionalInstance.getChildren().size());
-        assertEquals(taskInstance, optionalInstance.getChildren().get(0));
+        ITaskInstance taskInstance = createNewTaskInstance(task);
+        IOptionalInstance optionalInstance = createNewTaskInstance(optional);
+        
+        taskBuilder.setChild(optionalInstance, taskInstance);
+        
+        assertNotNull(optionalInstance.getChild());
+        assertEquals(taskInstance, optionalInstance.getChild());
     }
 
@@ -682,6 +664,6 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task1 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask task2 = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task1 = createNewEventTask(eventType, eventTarget);
+        IEventTask task2 = createNewEventTask(eventType, eventTarget);
         
         IOptional optional = taskFactory.createNewOptional();
@@ -689,8 +671,8 @@
         taskBuilder.setMarkedTask(optional, task2);
         
-        ITaskInstance taskInstance1 = taskFactory.createNewTaskInstance(task1);
-        ITaskInstance optionalInstance = taskFactory.createNewTaskInstance(optional);
-        
-        taskBuilder.addChild(optionalInstance, taskInstance1);
+        ITaskInstance taskInstance1 = createNewTaskInstance(task1);
+        IOptionalInstance optionalInstance = createNewTaskInstance(optional);
+        
+        taskBuilder.setChild(optionalInstance, taskInstance1);
     }
 
@@ -703,6 +685,6 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task1 = taskFactory.createNewEventTask(eventType, eventTarget);
-        IEventTask task2 = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task1 = createNewEventTask(eventType, eventTarget);
+        IEventTask task2 = createNewEventTask(eventType, eventTarget);
         
         IOptional optional = taskFactory.createNewOptional();
@@ -710,12 +692,11 @@
         taskBuilder.setMarkedTask(optional, task2);
         
-        ITaskInstance taskInstance2 = taskFactory.createNewTaskInstance(task2);
-        ITaskInstance optionalInstance = taskFactory.createNewTaskInstance(optional);
-        
-        taskBuilder.addChild(optionalInstance, taskInstance2);
-        
-        assertNotNull(optionalInstance.getChildren());
-        assertEquals(1, optionalInstance.getChildren().size());
-        assertEquals(taskInstance2, optionalInstance.getChildren().get(0));
+        ITaskInstance taskInstance2 = createNewTaskInstance(task2);
+        IOptionalInstance optionalInstance = createNewTaskInstance(optional);
+        
+        taskBuilder.setChild(optionalInstance, taskInstance2);
+        
+        assertNotNull(optionalInstance.getChild());
+        assertEquals(taskInstance2, optionalInstance.getChild());
     }
 
@@ -740,9 +721,9 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task = createNewEventTask(eventType, eventTarget);
         
         IUserSession userSession = taskFactory.createUserSession();
         
-        ITaskInstance taskInstance = taskFactory.createNewTaskInstance(task);
+        ITaskInstance taskInstance = createNewTaskInstance(task);
         
         taskBuilder.addExecutedTask(userSession, taskInstance);
@@ -761,5 +742,5 @@
         IEventTarget eventTarget = new DummyGUIElement("elem");
         
-        IEventTask task = taskFactory.createNewEventTask(eventType, eventTarget);
+        IEventTask task = createNewEventTask(eventType, eventTarget);
         ISequence sequence = taskFactory.createNewSequence();
         ISelection selection = taskFactory.createNewSelection();
@@ -772,14 +753,14 @@
         taskBuilder.setMarkedTask(optional, task);
         
-        ITaskInstance taskInstance = taskFactory.createNewTaskInstance(task);
-        ITaskInstance sequenceInstance = taskFactory.createNewTaskInstance(sequence);
-        ITaskInstance selectionInstance = taskFactory.createNewTaskInstance(selection);
-        ITaskInstance iterationInstance = taskFactory.createNewTaskInstance(iteration);
-        ITaskInstance optionalInstance = taskFactory.createNewTaskInstance(optional);
-        
-        taskBuilder.addChild(sequenceInstance, taskFactory.createNewTaskInstance(task));
-        taskBuilder.addChild(selectionInstance, taskFactory.createNewTaskInstance(task));
-        taskBuilder.addChild(iterationInstance, taskFactory.createNewTaskInstance(task));
-        taskBuilder.addChild(optionalInstance, taskFactory.createNewTaskInstance(task));
+        ITaskInstance taskInstance = createNewTaskInstance(task);
+        ISequenceInstance sequenceInstance = createNewTaskInstance(sequence);
+        ISelectionInstance selectionInstance = createNewTaskInstance(selection);
+        IIterationInstance iterationInstance = createNewTaskInstance(iteration);
+        IOptionalInstance optionalInstance = createNewTaskInstance(optional);
+        
+        taskBuilder.addChild(sequenceInstance, createNewTaskInstance(task));
+        taskBuilder.setChild(selectionInstance, createNewTaskInstance(task));
+        taskBuilder.addChild(iterationInstance, createNewTaskInstance(task));
+        taskBuilder.setChild(optionalInstance, createNewTaskInstance(task));
         
         IUserSession userSession = taskFactory.createUserSession();
@@ -823,5 +804,6 @@
             }
             
-            ITaskInstance taskInstance = instantiateTask(task, noOfMaxChildren);
+            ISequenceInstance sequenceInstance =
+                (ISequenceInstance) instantiateTask(task, noOfMaxChildren);
             
             System.err.println("  creating user session");
@@ -829,5 +811,5 @@
             IUserSession session = taskFactory.createUserSession();
             
-            for (ITaskInstance child : taskInstance.getChildren()) {
+            for (ITaskInstance child : sequenceInstance) {
                 taskBuilder.addExecutedTask(session, child);
             }
@@ -836,11 +818,11 @@
             sessions.add(session);
             
-            ITaskModel taskTree = taskFactory.createTaskModel(sessions);
+            ITaskModel taskModel = taskFactory.createTaskModel(sessions);
 
             System.err.println("  validating task tree");
             Map<ITask, ITaskInfo> actualTaskInfos = new HashMap<ITask, ITaskInfo>();
             
-            for (ITask currentTask : taskTree.getTasks()) {
-                actualTaskInfos.put(currentTask, taskTree.getTaskInfo(currentTask));
+            for (ITask currentTask : taskModel.getTasks()) {
+                actualTaskInfos.put(currentTask, taskModel.getTaskInfo(currentTask));
             }
             
@@ -988,5 +970,5 @@
         Thread.sleep(2);
         long id = System.currentTimeMillis();
-        IEventTask task = taskFactory.createNewEventTask
+        IEventTask task = createNewEventTask
             (new DummyInteraction("interaction" + id, 1), new DummyGUIElement("elem" + id));
 
@@ -1064,5 +1046,10 @@
         
         for (int i = 0; i < noOfChildren; i++) {
-            ITask child = createTaskTree(maxNoOfChildren, maxDepth - 1, taskInfos);
+            ITask child;
+            do {
+                child = createTaskTree(maxNoOfChildren, maxDepth - 1, taskInfos);
+            }
+            while (child instanceof ISelection);
+            
             taskBuilder.addChild(selection, child);
         }
@@ -1099,5 +1086,10 @@
         IIteration iteration = taskFactory.createNewIteration();
 
-        ITask child = createTaskTree(maxNoOfChildren, maxDepth - 1, taskInfos);
+        ITask child;
+        do {
+            child = createTaskTree(maxNoOfChildren, maxDepth - 1, taskInfos);
+        }
+        while ((child instanceof IOptional) || (child instanceof IIteration));
+        
         taskBuilder.setMarkedTask(iteration, child);
 
@@ -1133,5 +1125,10 @@
         IOptional optional = taskFactory.createNewOptional();
 
-        ITask child = createTaskTree(maxNoOfChildren, maxDepth - 1, taskInfos);
+        ITask child;
+        do {
+            child = createTaskTree(maxNoOfChildren, maxDepth - 1, taskInfos);
+        }
+        while (child instanceof IOptional);
+        
         taskBuilder.setMarkedTask(optional, child);
 
@@ -1193,9 +1190,10 @@
      */
     private ITaskInstance instantiateTask(ITask task, int maxIterationCount) throws Exception {
-        ITaskInstance instance = taskFactory.createNewTaskInstance(task);
+        ITaskInstance instance = createNewTaskInstance(task);
 
         if (task instanceof ISequence) {
             for (ITask child : ((ISequence) task).getChildren()) {
-                taskBuilder.addChild(instance, instantiateTask(child, maxIterationCount));
+                taskBuilder.addChild
+                    ((ISequenceInstance) instance, instantiateTask(child, maxIterationCount));
             }
         }
@@ -1203,5 +1201,6 @@
             List<ITask> children = ((ISelection) task).getChildren();
             int index = randomize(children.size());
-            taskBuilder.addChild(instance, instantiateTask(children.get(index), maxIterationCount));
+            taskBuilder.setChild((ISelectionInstance) instance,
+                                 instantiateTask(children.get(index),maxIterationCount));
         }
         else if (task instanceof IIteration) {
@@ -1210,5 +1209,6 @@
             
             for (int i = 0; i < count; i++) {
-                taskBuilder.addChild(instance, instantiateTask(child, maxIterationCount));
+                taskBuilder.addChild
+                    ((IIterationInstance) instance, instantiateTask(child, maxIterationCount));
             }
         }
@@ -1217,5 +1217,6 @@
             
             if (randomize(1) == 0) {
-                taskBuilder.addChild(instance, instantiateTask(child, maxIterationCount));
+                taskBuilder.setChild((IOptionalInstance) instance,
+                                     instantiateTask(child, maxIterationCount));
             }
         }
@@ -1244,3 +1245,73 @@
         return value + min;
     }
+    
+    /**
+     *
+     */
+    protected IEventTask createNewEventTask(IEventType eventType, IEventTarget eventTarget) {
+        IEventTask eventTask = taskFactory.createNewEventTask(eventType + " --> " + eventTarget);
+        taskFactory.createNewTaskInstance(eventTask, new Event(eventType, eventTarget));
+        return eventTask;
+    }
+
+    /**
+     *
+     */
+    private ITaskInstance createNewTaskInstance(ITask task) {
+        if (task instanceof IEventTask) {
+            return createNewTaskInstance((IEventTask) task);
+        }
+        else if (task instanceof ISequence) {
+            return createNewTaskInstance((ISequence) task);
+        }
+        else if (task instanceof ISelection) {
+            return createNewTaskInstance((ISelection) task);
+        }
+        else if (task instanceof IIteration) {
+            return createNewTaskInstance((IIteration) task);
+        }
+        else if (task instanceof IOptional) {
+            return createNewTaskInstance((IOptional) task);
+        }
+        
+        throw new IllegalArgumentException("unknown type of task");
+    }
+
+    /**
+     *
+     */
+    private IEventTaskInstance createNewTaskInstance(IEventTask task) {
+        IEventTaskInstance existingInstance =
+            (IEventTaskInstance) task.getInstances().iterator().next();
+        return taskFactory.createNewTaskInstance(task, existingInstance.getEvent());
+    }
+
+    /**
+     *
+     */
+    private ISequenceInstance createNewTaskInstance(ISequence task) {
+        return taskFactory.createNewTaskInstance(task);
+    }
+
+    /**
+     *
+     */
+    private ISelectionInstance createNewTaskInstance(ISelection task) {
+        return taskFactory.createNewTaskInstance(task);
+    }
+
+    /**
+     *
+     */
+    private IIterationInstance createNewTaskInstance(IIteration task) {
+        return taskFactory.createNewTaskInstance(task);
+    }
+
+    /**
+     *
+     */
+    private IOptionalInstance createNewTaskInstance(IOptional task) {
+        return taskFactory.createNewTaskInstance(task);
+    }
+
 }
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/manager/TaskTreeManager.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/manager/TaskTreeManager.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/manager/TaskTreeManager.java	(revision 1294)
@@ -21,5 +21,5 @@
 
 import de.ugoe.cs.autoquest.eventcore.Event;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
@@ -124,6 +124,8 @@
     public void handleNewEvent(Event event) {
         assertSessionSequence();
-        ITask eventTask = taskFactory.createNewEventTask(event.getType(), event.getTarget());
-        taskBuilder.addExecutedTask(currentSession, taskFactory.createNewTaskInstance(eventTask));
+        String description = event.getType().getName() + " \u21D2 " + event.getTarget();
+        IEventTask eventTask = taskFactory.createNewEventTask(description);
+        taskBuilder.addExecutedTask
+            (currentSession, taskFactory.createNewTaskInstance(eventTask, event));
     }
 
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/EventTaskComparisonRule.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/EventTaskComparisonRule.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/EventTaskComparisonRule.java	(revision 1294)
@@ -15,6 +15,10 @@
 package de.ugoe.cs.autoquest.tasktrees.taskequality;
 
+import java.util.Collection;
+
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
 /**
@@ -29,5 +33,5 @@
     
     /* (non-Javadoc)
-     * @see NodeComparisonRule#isApplicable(ITask, ITask)
+     * @see TaskComparisonRule#isApplicable(ITask, ITask)
      */
     @Override
@@ -37,17 +41,31 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areLexicallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areLexicallyEqual(ITask, ITask)
      */
     @Override
     public boolean areLexicallyEqual(ITask task1, ITask task2) {
-        IEventTask eventTask1 = (IEventTask) task1;
-        IEventTask eventTask2 = (IEventTask) task2;
+        Collection<ITaskInstance> taskInstances1 = task1.getInstances();
+        Collection<ITaskInstance> taskInstances2 = task2.getInstances();
         
-        return (eventTask1.getEventType().equals(eventTask2.getEventType()) &&
-                eventTask1.getEventTarget().equals(eventTask2.getEventTarget()));
+        for (ITaskInstance instance1 : taskInstances1) {
+            boolean found = false;
+            
+            for (ITaskInstance instance2 : taskInstances2) {
+                if (areLexicallyEqual(instance1, instance2)) {
+                    found = true;
+                    break;
+                }
+            }
+            
+            if (!found) {
+                return false;
+            }
+        }
+        
+        return true;
     }
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSyntacticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITask, ITask)
      */
     @Override
@@ -57,5 +75,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSemanticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITask, ITask)
      */
     @Override
@@ -64,4 +82,7 @@
     }
 
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#compare(ITask, ITask)
+     */
     @Override
     public TaskEquality compare(ITask task1, ITask task2) {
@@ -74,3 +95,54 @@
     }
 
+    
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#isApplicable(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean isApplicable(ITaskInstance instance1, ITaskInstance instance2) {
+        return
+            (instance1 instanceof IEventTaskInstance) && (instance2 instanceof IEventTaskInstance);
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areLexicallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areLexicallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        IEventTaskInstance eventTask1 = (IEventTaskInstance) instance1;
+        IEventTaskInstance eventTask2 = (IEventTaskInstance) instance2;
+        
+        return (eventTask1.getEvent().getType().equals(eventTask2.getEvent().getType()) &&
+                eventTask1.getEvent().getTarget().equals(eventTask2.getEvent().getTarget()));
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areSyntacticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        return areLexicallyEqual(instance1, instance2);
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areSemanticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        return areLexicallyEqual(instance1, instance2);
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#compare(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public TaskEquality compare(ITaskInstance instance1, ITaskInstance instance2) {
+        if (areLexicallyEqual(instance1, instance2)) {
+            return TaskEquality.LEXICALLY_EQUAL;
+        }
+        else {
+            return TaskEquality.UNEQUAL;
+        }
+    }
+
 }
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRule.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRule.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRule.java	(revision 1294)
@@ -14,4 +14,6 @@
 
 package de.ugoe.cs.autoquest.tasktrees.taskequality;
+
+import java.util.Collection;
 
 import de.ugoe.cs.autoquest.eventcore.IEventTarget;
@@ -41,6 +43,7 @@
 import de.ugoe.cs.autoquest.eventcore.guimodel.IText;
 import de.ugoe.cs.autoquest.eventcore.guimodel.IToolTip;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
 /**
@@ -61,16 +64,29 @@
     
     /* (non-Javadoc)
-     * @see NodeComparisonRule#isApplicable(ITask, ITask)
+     * @see TaskComparisonRule#isApplicable(ITask, ITask)
      */
     @Override
     public boolean isApplicable(ITask task1, ITask task2) {
-        return
-            ((task1 instanceof IEventTask) && (task2 instanceof IEventTask) &&
-            (((IEventTask) task1).getEventType() instanceof IInteraction) &&
-            (((IEventTask) task2).getEventType() instanceof IInteraction));
-    }
-
-    /* (non-Javadoc)
-     * @see NodeComparisonRule#areLexicallyEqual(ITask, ITask)
+        for (ITaskInstance instance : task1.getInstances()) {
+            if ((!(instance instanceof IEventTaskInstance)) ||
+                (!(((IEventTaskInstance) instance).getEvent().getType() instanceof IInteraction)))
+            {
+                return false;
+            }
+        }
+        
+        for (ITaskInstance instance : task2.getInstances()) {
+            if ((!(instance instanceof IEventTaskInstance)) ||
+                (!(((IEventTaskInstance) instance).getEvent().getType() instanceof IInteraction)))
+            {
+                return false;
+            }
+        }
+        
+        return true;
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areLexicallyEqual(ITask, ITask)
      */
     @Override
@@ -81,5 +97,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSyntacticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITask, ITask)
      */
     @Override
@@ -90,5 +106,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSemanticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITask, ITask)
      */
     @Override
@@ -99,5 +115,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#compare(ITask, ITask)
+     * @see TaskComparisonRule#compare(ITask, ITask)
      */
     @Override
@@ -106,20 +122,115 @@
     }
 
-    /**
-     * 
-     */
-    private TaskEquality getEquality(ITask task1, ITask task2, TaskEquality requiredEqualityLevel) {
-        IEventTask eventTask1 = (IEventTask) task1;
-        IEventTask eventTask2 = (IEventTask) task2;
-        
-        if (!eventTask1.getEventTarget().equals(eventTask2.getEventTarget())) {
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.taskequality.TaskComparisonRule#isApplicable(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance)
+     */
+    @Override
+    public boolean isApplicable(ITaskInstance instance1, ITaskInstance instance2) {
+        return
+            (instance1 instanceof IEventTaskInstance) &&
+            (instance2 instanceof IEventTaskInstance) &&
+            (((IEventTaskInstance) instance1).getEvent().getType() instanceof IInteraction) &&
+            (((IEventTaskInstance) instance1).getEvent().getType() instanceof IInteraction);
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.taskequality.TaskComparisonRule#areLexicallyEqual(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance)
+     */
+    @Override
+    public boolean areLexicallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.LEXICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.LEXICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.taskequality.TaskComparisonRule#areSyntacticallyEqual(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance)
+     */
+    @Override
+    public boolean areSyntacticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.SYNTACTICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.SYNTACTICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.taskequality.TaskComparisonRule#areSemanticallyEqual(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance)
+     */
+    @Override
+    public boolean areSemanticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.SEMANTICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.SEMANTICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.taskequality.TaskComparisonRule#compare(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance)
+     */
+    @Override
+    public TaskEquality compare(ITaskInstance instance1, ITaskInstance instance2) {
+        return getEquality(instance1, instance2, null);
+    }
+
+    /**
+     * 
+     */
+    private TaskEquality getEquality(ITask         task1,
+                                     ITask         task2,
+                                     TaskEquality  requiredEqualityLevel)
+    {
+        Collection<ITaskInstance> taskInstances1 = task1.getInstances();
+        Collection<ITaskInstance> taskInstances2 = task2.getInstances();
+        
+        TaskEquality checkedEquality =
+            requiredEqualityLevel != null ? requiredEqualityLevel : TaskEquality.SEMANTICALLY_EQUAL;
+        
+        TaskEquality commonDenominator = TaskEquality.LEXICALLY_EQUAL;
+        
+        for (ITaskInstance instance1 : taskInstances1) {
+            TaskEquality mostConcreteEquality = null;
+            
+            for (ITaskInstance instance2 : taskInstances2) {
+                TaskEquality equality = getEquality(instance1, instance2, requiredEqualityLevel);
+                
+                if ((equality != null) && ((mostConcreteEquality == null) ||
+                                           (equality.isAtLeast(mostConcreteEquality))))
+                {
+                    mostConcreteEquality = equality;
+                    
+                    if (((requiredEqualityLevel != null) &&
+                         (mostConcreteEquality.isAtLeast(requiredEqualityLevel))) ||
+                        (mostConcreteEquality.isAtLeast(TaskEquality.LEXICALLY_EQUAL)))
+                    {
+                        break;
+                    }
+                }
+            }
+            
+            commonDenominator = commonDenominator.getCommonDenominator(mostConcreteEquality);
+            
+            if (!commonDenominator.isAtLeast(checkedEquality)) {
+                return TaskEquality.UNEQUAL;
+            }
+        }
+        
+        return commonDenominator;
+    }
+
+    /**
+     * 
+     */
+    private TaskEquality getEquality(ITaskInstance instance1,
+                                     ITaskInstance instance2,
+                                     TaskEquality  requiredEqualityLevel)
+    {
+        IEventTaskInstance eventTask1 = (IEventTaskInstance) instance1;
+        IEventTaskInstance eventTask2 = (IEventTaskInstance) instance2;
+        
+        if (!eventTask1.getEvent().getTarget().equals(eventTask2.getEvent().getTarget())) {
             return TaskEquality.UNEQUAL;
         }
         
-        IInteraction interaction1 = (IInteraction) eventTask1.getEventType();
-        IInteraction interaction2 = (IInteraction) eventTask2.getEventType();
+        IInteraction interaction1 = (IInteraction) eventTask1.getEvent().getType();
+        IInteraction interaction2 = (IInteraction) eventTask2.getEvent().getType();
         
         return compareInteractions
-            (interaction1, interaction2, eventTask1.getEventTarget(), requiredEqualityLevel);
+            (interaction1, interaction2, eventTask1.getEvent().getTarget(), requiredEqualityLevel);
     }
 
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/IterationComparisonRule.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/IterationComparisonRule.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/IterationComparisonRule.java	(revision 1294)
@@ -15,9 +15,9 @@
 package de.ugoe.cs.autoquest.tasktrees.taskequality;
 
-import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
 /**
@@ -82,5 +82,5 @@
     
     /* (non-Javadoc)
-     * @see NodeComparisonRule#isApplicable(ITask, ITask)
+     * @see TaskComparisonRule#isApplicable(ITask, ITask)
      */
     @Override
@@ -90,45 +90,8 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areLexicallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areLexicallyEqual(ITask, ITask)
      */
     @Override
     public boolean areLexicallyEqual(ITask task1, ITask task2) {
-        ITask child1 = ((IIteration) task1).getMarkedTask();
-        ITask child2 = ((IIteration) task2).getMarkedTask();
-        
-        if (child1 != null) {
-            if (child2 == null) {
-                return false;
-            }
-            else {
-                // iterations may have 3 different structures.
-                // 1. they have one child, which is the iterated one
-                // 2. they have a sequence of children, which is iterated
-                // 3. they have a selection of different iterated variants (usually the variants
-                //    are semantically equal)
-                // check if the type of children match. If not, return false. If they match,
-                // use the equality manager to perform further comparisons
-                
-                if (((child1 instanceof ISelection) && (child2 instanceof ISelection)) ||
-                    ((child1 instanceof ISequence) && (child2 instanceof ISequence)) ||
-                    ((child1 instanceof IEventTask) && (child2 instanceof IEventTask)))
-                {
-                    return getNodeEquality
-                        (child1, child2).isAtLeast(TaskEquality.LEXICALLY_EQUAL);
-                }
-            }
-        }
-        else if (child2 == null) {
-            return true;
-        }
-        
-        return false;
-    }
-
-    /* (non-Javadoc)
-     * @see NodeComparisonRule#areSyntacticallyEqual(ITask, ITask)
-     */
-    @Override
-    public boolean areSyntacticallyEqual(ITask task1, ITask task2) {
         ITask child1 = ((IIteration) task1).getMarkedTask();
         ITask child2 = ((IIteration) task2).getMarkedTask();
@@ -146,5 +109,5 @@
                 // ignore the type of the children but check them for equality.
                 
-                return getNodeEquality(child1, child2).isAtLeast(TaskEquality.SYNTACTICALLY_EQUAL);
+                return getNodeEquality(child1, child2).isAtLeast(TaskEquality.LEXICALLY_EQUAL);
             }
         }
@@ -157,5 +120,13 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSemanticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITask, ITask)
+     */
+    @Override
+    public boolean areSyntacticallyEqual(ITask task1, ITask task2) {
+        return areLexicallyEqual(task1, task2);
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITask, ITask)
      */
     @Override
@@ -165,5 +136,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#compare(ITask, ITask)
+     * @see TaskComparisonRule#compare(ITask, ITask)
      */
     @Override
@@ -203,4 +174,73 @@
         // all other combinations (i.e. sequence with single child and sequence with selection)
         // can not match
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#isApplicable(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean isApplicable(ITaskInstance instance1, ITaskInstance instance2) {
+        return isApplicable(instance1.getTask(), instance2.getTask());
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areLexicallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areLexicallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        IIterationInstance iteration1 = (IIterationInstance) instance1;
+        IIterationInstance iteration2 = (IIterationInstance) instance2;
+
+        // if both sequences do not have children, they are equal although this doesn't make sense
+        if ((iteration1.size() == 0) && (iteration2.size() == 0)) {
+            return true;
+        }
+
+        if (iteration1.size() != iteration2.size()) {
+            return false;
+        }
+
+        for (int i = 0; i < iteration1.size(); i++) {
+            ITaskInstance child1 = iteration1.get(i);
+            ITaskInstance child2 = iteration2.get(i);
+
+            TaskEquality taskEquality =
+                callRuleManager(child1, child2, TaskEquality.LEXICALLY_EQUAL);
+
+            if ((taskEquality == null) || (taskEquality == TaskEquality.UNEQUAL)) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areSyntacticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        return areLexicallyEqual(instance1, instance2);
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areSemanticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        return areLexicallyEqual(instance1, instance2);
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#compare(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public TaskEquality compare(ITaskInstance instance1, ITaskInstance instance2) {
+        if (areLexicallyEqual(instance1, instance2)) {
+            return TaskEquality.LEXICALLY_EQUAL;
+        }
+        else {
+            return TaskEquality.UNEQUAL;
+        }
     }
 
@@ -272,6 +312,5 @@
                   callRuleManager(task, child, commonDenominatorForAllComparisons);
 
-            if ((taskEquality == null) || (taskEquality == TaskEquality.UNEQUAL))
-            {
+            if ((taskEquality == null) || (taskEquality == TaskEquality.UNEQUAL)) {
                 return TaskEquality.UNEQUAL;
             }
@@ -314,3 +353,34 @@
         }
     }
+    
+    /**
+     * <p>
+     * used to to call the task equality rule manager for the comparison of the two provided
+     * children. If no required equality level is provided, than the most concrete equality is
+     * returned. Otherwise, the required equality is returned as long as the children are equal
+     * on that level.
+     * </p> 
+     * 
+     * @param taskInstance1         the first task instance to be compared
+     * @param taskInstance2         the second task instance to be compared
+     * @param requiredEqualityLevel the equality level to be checked for
+     * 
+     * @return the determined equality
+     */
+    private TaskEquality callRuleManager(ITaskInstance taskInstance1,
+                                         ITaskInstance taskInstance2,
+                                         TaskEquality  requiredEqualityLevel)
+    {
+        if (requiredEqualityLevel == null) {
+            return TaskEqualityRuleManager.getInstance().compare(taskInstance1, taskInstance2);
+        }
+        else if (TaskEqualityRuleManager.getInstance().areAtLeastEqual
+                     (taskInstance1, taskInstance2, requiredEqualityLevel))
+        {
+            return requiredEqualityLevel;
+        }
+        else {
+            return TaskEquality.UNEQUAL;
+        }
+    }
 }
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRule.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRule.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRule.java	(revision 1294)
@@ -18,5 +18,7 @@
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
 /**
@@ -39,5 +41,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#isApplicable(ITask, ITask)
+     * @see TaskComparisonRule#isApplicable(ITask, ITask)
      */
     @Override
@@ -47,5 +49,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areLexicallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areLexicallyEqual(ITask, ITask)
      */
     @Override
@@ -56,5 +58,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSyntacticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITask, ITask)
      */
     @Override
@@ -65,5 +67,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSemanticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITask, ITask)
      */
     @Override
@@ -74,9 +76,52 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#compare(ITask, ITask)
+     * @see TaskComparisonRule#compare(ITask, ITask)
      */
     @Override
     public TaskEquality compare(ITask task1, ITask task2) {
         return getEquality(task1, task2, null);
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#isApplicable(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean isApplicable(ITaskInstance instance1, ITaskInstance instance2) {
+        return isApplicable(instance1.getTask(), instance2.getTask());
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areLexicallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areLexicallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.LEXICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.LEXICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areSyntacticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.SYNTACTICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.SYNTACTICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areSemanticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.SEMANTICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.SEMANTICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#compare(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public TaskEquality compare(ITaskInstance instance1, ITaskInstance instance2) {
+        return getEquality(instance1, instance2, null);
     }
 
@@ -107,23 +152,12 @@
         }
 
-        TaskEquality selectionEquality;
-
         if (requiredEqualityLevel == null) {
             // calculate the common equality level for all children of both selections.
             // do it in both directions to ensure commutative comparison
-            selectionEquality = getCommonEqualityLevel(children1, children2);
-            if (selectionEquality != TaskEquality.UNEQUAL) {
-                return selectionEquality.getCommonDenominator
-                    (getCommonEqualityLevel(children2, children1));
-            }
-            else {
-                return TaskEquality.UNEQUAL;
-            }
+            return getMostConcreteEqualityLevel(children1, children2);
         }
         else {
             // we are searching for a specific equality
-            if (checkEqualityLevel(children1, children2, requiredEqualityLevel) &&
-                checkEqualityLevel(children2, children1, requiredEqualityLevel))
-            {
+            if (checkEqualityLevel(children1, children2, requiredEqualityLevel)) {
                 return requiredEqualityLevel;
             }
@@ -136,7 +170,7 @@
     /**
      * <p>
-     * determines the common equality level for all tasks in the first list compared to all
-     * tasks in the second list. If for one task in the first list, there is no equal task in the
-     * second list, the method return unequality. 
+     * determines the most concrete equality level for all tasks in the first list compared to all
+     * tasks in the second list. It is sufficient, if there is one task in one list for which there
+     * exist an equal task in the other list.
      * </p>
      *
@@ -144,10 +178,9 @@
      * @param children2 the second list to be compared
      * 
-     * @return the common task equality identified for all tasks in the first list with respect to
-     *         the second list
-     */
-    private TaskEquality getCommonEqualityLevel(List<ITask> children1, List<ITask> children2) {
-        TaskEquality listEquality = TaskEquality.LEXICALLY_EQUAL;
-        
+     * @return the most concrete task equality identified for all tasks in the first list with
+     *         respect to the second list
+     */
+    private TaskEquality getMostConcreteEqualityLevel(List<ITask> children1, List<ITask> children2)
+    {
         TaskEquality childEquality;
         TaskEquality currentEquality;
@@ -164,28 +197,20 @@
                     }
                     
-                    if (childEquality == TaskEquality.SEMANTICALLY_EQUAL) {
-                        // as we calculate only the common denominator, we can break up here for
-                        // the current child. We will not improve the denominator anymore
-                        break;
+                    if (childEquality.isAtLeast(TaskEquality.LEXICALLY_EQUAL)) {
+                        // as we calculate the most concrete equality, we can break up here
+                        return TaskEquality.LEXICALLY_EQUAL;
                     }
                 }
             }
-            
-            if (childEquality == null) {
-                // we did not find any child in the second list, that is equal to the searched
-                // child
-                return TaskEquality.UNEQUAL;
-            }
-            else {
-                listEquality = listEquality.getCommonDenominator(childEquality);
-            }
-        }
-
-        return listEquality;
-    }
-
-    /**
-     * <p>
-     * ensures for the two given lists, that for each task in the first list there is a task
+        }
+
+        // as the comparison should be commutative, we do not need to check, if in list 2 there is
+        // a child equal to one in list 1
+        return TaskEquality.UNEQUAL;
+    }
+
+    /**
+     * <p>
+     * ensures for the two given lists, that for at least one task in the first list there is a task
      * in the second list being on the given level equal to the task in the first list.
      * </p> 
@@ -195,6 +220,6 @@
      * @param requiredEqualityLevel the equality level to be checked for
      * 
-     * @return true if each task in the first list has an equal task in the second list when
-     *         considering the given equality level, false else.
+     * @return true if there is a task in the first list that has an equal task in the second list
+     *         when considering the given equality level, false else.
      */
     private boolean checkEqualityLevel(List<ITask>  children1,
@@ -202,8 +227,6 @@
                                        TaskEquality requiredEqualityLevel)
     {
-        TaskEquality childEquality;
         TaskEquality currentEquality;
         for (ITask child1 : children1) {
-            childEquality = null;
             for (ITask child2 : children2) {
                 currentEquality = callRuleManager(child1, child2, requiredEqualityLevel);
@@ -212,18 +235,10 @@
                     // we found at least one equal child with sufficient equality in the
                     // second list. So be can break up for this child.
-                    childEquality = currentEquality;
-                    break;
+                    return true;
                 }
             }
-            
-            if (childEquality == null) {
-                // we did not find any child in the second list, that is equal to the searched
-                // child
-                return false;
-            }
-        }
-
-        // for all children, we found an equality 
-        return true;
+        }
+
+        return false;
     }
 
@@ -259,3 +274,74 @@
     }
 
+    /**
+     * <p>
+     * compares two selection instances with each other checking for the provided required level of
+     * equality. If this level is ensured, the method immediately returns. The more concrete
+     * the required equality level, the more checks this method performs.
+     * </p>
+     * 
+     * @param taskInstance1         the first task instance to be compared
+     * @param taskInstance2         the second task instance to be compared
+     * @param requiredEqualityLevel the equality level to be checked for
+     * 
+     * @return the determined equality.
+     */
+    private TaskEquality getEquality(ITaskInstance taskInstance1,
+                                     ITaskInstance taskInstance2,
+                                     TaskEquality  requiredEqualityLevel)
+    {
+        ITaskInstance child1 = ((ISelectionInstance) taskInstance1).getChild();
+        ITaskInstance child2 = ((ISelectionInstance) taskInstance2).getChild();
+
+        // if both selections do not have children, they are lexically equal. If only one of them
+        // has children, they are unequal.
+        if ((child1 == null) && (child2 == null)) {
+            return TaskEquality.LEXICALLY_EQUAL;
+        }
+        else if ((child1 == null) || (child2 == null)) {
+            return TaskEquality.UNEQUAL;
+        }
+
+        TaskEquality equality = callRuleManager(child1, child2, requiredEqualityLevel);
+        
+        if (equality == TaskEquality.IDENTICAL) {
+            // two different selection instances can be at most lexically equal even if their
+            // children are identical
+            return TaskEquality.LEXICALLY_EQUAL;
+        }
+        else {
+            return equality;
+        }
+    }
+
+    /**
+     * <p>
+     * used to to call the task equality rule manager for the comparison of the two provided
+     * children. If no required equality level is provided, than the most concrete equality is
+     * returned. Otherwise, the required equality is returned as long as the children are equal
+     * on that level.
+     * </p> 
+     * 
+     * @param taskInstance1         the first task instance to be compared
+     * @param taskInstance2         the second task instance to be compared
+     * @param requiredEqualityLevel the equality level to be checked for
+     * 
+     * @return the determined equality
+     */
+    private TaskEquality callRuleManager(ITaskInstance taskInstance1,
+                                         ITaskInstance taskInstance2,
+                                         TaskEquality  requiredEqualityLevel)
+    {
+        if (requiredEqualityLevel == null) {
+            return TaskEqualityRuleManager.getInstance().compare(taskInstance1, taskInstance2);
+        }
+        else if (TaskEqualityRuleManager.getInstance().areAtLeastEqual
+                     (taskInstance1, taskInstance2, requiredEqualityLevel))
+        {
+            return requiredEqualityLevel;
+        }
+        else {
+            return TaskEquality.UNEQUAL;
+        }
+    }
 }
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/taskequality/SequenceComparisonRule.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRule.java	(revision 1294)
@@ -18,5 +18,7 @@
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
 /**
@@ -34,5 +36,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#isApplicable(ITask, ITask)
+     * @see TaskComparisonRule#isApplicable(ITask, ITask)
      */
     @Override
@@ -42,5 +44,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areLexicallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areLexicallyEqual(ITask, ITask)
      */
     @Override
@@ -51,5 +53,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSyntacticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITask, ITask)
      */
     @Override
@@ -60,5 +62,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSemanticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITask, ITask)
      */
     @Override
@@ -69,9 +71,52 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#compare(ITask, ITask)
+     * @see TaskComparisonRule#compare(ITask, ITask)
      */
     @Override
     public TaskEquality compare(ITask task1, ITask task2) {
         return getEquality(task1, task2, null);
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#isApplicable(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean isApplicable(ITaskInstance instance1, ITaskInstance instance2) {
+        return isApplicable(instance1.getTask(), instance2.getTask());
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areLexicallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areLexicallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.LEXICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.LEXICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areSyntacticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.SYNTACTICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.SYNTACTICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areSemanticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.SEMANTICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.SEMANTICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#compare(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public TaskEquality compare(ITaskInstance instance1, ITaskInstance instance2) {
+        return getEquality(instance1, instance2, null);
     }
 
@@ -149,3 +194,80 @@
         }
     }
+
+    /**
+     * <p>
+     * compares two sequence instances with each other checking for the provided required level of
+     * equality. If this level is ensured, the method immediately returns. The more concrete
+     * the required equality level, the more checks this method performs.
+     * </p>
+     * 
+     * @param taskInstance1         the first task instance to be compared
+     * @param taskInstance2         the second task instance to be compared
+     * @param requiredEqualityLevel the equality level to be checked for
+     * 
+     * @return the determined equality.
+     */
+    private TaskEquality getEquality(ITaskInstance taskInstance1,
+                                     ITaskInstance taskInstance2,
+                                     TaskEquality  requiredEqualityLevel)
+    {
+        ISequenceInstance sequence1 = (ISequenceInstance) taskInstance1;
+        ISequenceInstance sequence2 = (ISequenceInstance) taskInstance2;
+
+        // if both sequences do not have children, they are equal although this doesn't make sense
+        if ((sequence1.size() == 0) && (sequence2.size() == 0)) {
+            return TaskEquality.LEXICALLY_EQUAL;
+        }
+
+        if (sequence1.size() != sequence2.size()) {
+            return TaskEquality.UNEQUAL;
+        }
+
+        TaskEquality resultingEquality = TaskEquality.LEXICALLY_EQUAL;
+        for (int i = 0; i < sequence1.size(); i++) {
+            ITaskInstance child1 = sequence1.get(i);
+            ITaskInstance child2 = sequence2.get(i);
+
+            TaskEquality taskEquality = callRuleManager(child1, child2, requiredEqualityLevel);
+
+            if ((taskEquality == null) || (taskEquality == TaskEquality.UNEQUAL)) {
+                return TaskEquality.UNEQUAL;
+            }
+            
+            resultingEquality = resultingEquality.getCommonDenominator(taskEquality);
+        }
+
+        return resultingEquality;
+    }
+    
+    /**
+     * <p>
+     * used to to call the task equality rule manager for the comparison of the two provided
+     * children. If no required equality level is provided, than the most concrete equality is
+     * returned. Otherwise, the required equality is returned as long as the children are equal
+     * on that level.
+     * </p> 
+     * 
+     * @param taskInstance1         the first task instance to be compared
+     * @param taskInstance2         the second task instance to be compared
+     * @param requiredEqualityLevel the equality level to be checked for
+     * 
+     * @return the determined equality
+     */
+    private TaskEquality callRuleManager(ITaskInstance taskInstance1,
+                                         ITaskInstance taskInstance2,
+                                         TaskEquality  requiredEqualityLevel)
+    {
+        if (requiredEqualityLevel == null) {
+            return TaskEqualityRuleManager.getInstance().compare(taskInstance1, taskInstance2);
+        }
+        else if (TaskEqualityRuleManager.getInstance().areAtLeastEqual
+                     (taskInstance1, taskInstance2, requiredEqualityLevel))
+        {
+            return requiredEqualityLevel;
+        }
+        else {
+            return TaskEquality.UNEQUAL;
+        }
+    }
 }
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRule.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRule.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRule.java	(revision 1294)
@@ -16,5 +16,7 @@
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
 /**
@@ -33,5 +35,5 @@
     
     /* (non-Javadoc)
-     * @see NodeComparisonRule#isApplicable(ITask, ITask)
+     * @see TaskComparisonRule#isApplicable(ITask, ITask)
      */
     @Override
@@ -42,5 +44,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areLexicallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areLexicallyEqual(ITask, ITask)
      */
     @Override
@@ -51,5 +53,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSyntacticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITask, ITask)
      */
     @Override
@@ -60,5 +62,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSemanticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITask, ITask)
      */
     @Override
@@ -69,9 +71,52 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#compare(ITask, ITask)
+     * @see TaskComparisonRule#compare(ITask, ITask)
      */
     @Override
     public TaskEquality compare(ITask task1, ITask task2) {
         return getEquality(task1, task2, null);
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#isApplicable(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean isApplicable(ITaskInstance instance1, ITaskInstance instance2) {
+        return isApplicable(instance1.getTask(), instance2.getTask());
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areLexicallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areLexicallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.LEXICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.LEXICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areSyntacticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.SYNTACTICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.SYNTACTICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areSemanticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.SEMANTICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.SEMANTICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#compare(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public TaskEquality compare(ITaskInstance instance1, ITaskInstance instance2) {
+        return getEquality(instance1, instance2, null);
     }
 
@@ -167,3 +212,120 @@
         }
     }
+
+    /**
+     * <p>
+     * compares two task instances with each other checking for the provided required level of
+     * equality. One of the task instances must be a iteration, the other one not. If this is not
+     * the case, the method returns null. The returned equality level is at most lexical equality
+     * as the iteration can not be identical to something not being a iteration.
+     * </p>
+     * 
+     * @param taskInstance1         the first task instance to be compared
+     * @param taskInstance2         the second task instance to be compared
+     * @param requiredEqualityLevel the equality level to be checked for
+     * 
+     * @return the determined equality.
+     */
+    private TaskEquality getEquality(ITaskInstance taskInstance1,
+                                     ITaskInstance taskInstance2,
+                                     TaskEquality  requiredEqualityLevel)
+    {
+        IIterationInstance iteration = null;
+        ITaskInstance task = null;
+        
+        if (taskInstance1 instanceof IIterationInstance) {
+            if (taskInstance2 instanceof IIterationInstance) {
+                // the rule is not responsible for two iterations
+                return null;
+            }
+            
+            iteration = (IIterationInstance) taskInstance1;
+            task = taskInstance2;
+        }
+        else if (taskInstance2 instanceof IIterationInstance) {
+            if (taskInstance1 instanceof IIterationInstance) {
+                // the rule is not responsible for two iterations
+                return null;
+            }
+            
+            iteration = (IIterationInstance) taskInstance2;
+            task = taskInstance1;
+        }
+        else {
+            return null;
+        }
+
+        // now, that we found the iteration and the task, lets compare the children of the iteration
+        // with the task.
+        
+        if (iteration.size() < 1) {
+            return null;
+        }
+
+        TaskEquality mostConcreteNodeEquality = null;
+        
+        for (ITaskInstance child : iteration) {
+            TaskEquality taskEquality = callRuleManager(child, task, requiredEqualityLevel);
+            
+            if (taskEquality != TaskEquality.UNEQUAL) {
+                if (mostConcreteNodeEquality == null) {
+                    mostConcreteNodeEquality = taskEquality;
+                }
+                else if (mostConcreteNodeEquality.isAtLeast(taskEquality)) {
+                    mostConcreteNodeEquality = taskEquality;
+                    
+                }
+                
+                if ((requiredEqualityLevel != null) &&
+                    (mostConcreteNodeEquality.isAtLeast(requiredEqualityLevel)))
+                {
+                    // if we found one child of the selection that is as equal as required, then
+                    // we can consider the selection to be sufficiently equal to the other task.
+                    // So we break up checking further children.
+                    break;
+                }
+            }
+        }
+        
+        // although the subtask may be identical to the task, we can not return identical, as
+        // the selection is not identical to the task, but at most lexically equal
+        if (mostConcreteNodeEquality == TaskEquality.IDENTICAL) {
+            return TaskEquality.LEXICALLY_EQUAL;
+        }
+        else {
+            return mostConcreteNodeEquality;
+        }
+
+    }
+    
+    /**
+     * <p>
+     * used to to call the task equality rule manager for the comparison of the two provided
+     * children. If no required equality level is provided, than the most concrete equality is
+     * returned. Otherwise, the required equality is returned as long as the children are equal
+     * on that level.
+     * </p> 
+     * 
+     * @param taskInstance1         the first task instance to be compared
+     * @param taskInstance2         the second task instance to be compared
+     * @param requiredEqualityLevel the equality level to be checked for
+     * 
+     * @return the determined equality
+     */
+    private TaskEquality callRuleManager(ITaskInstance taskInstance1,
+                                         ITaskInstance taskInstance2,
+                                         TaskEquality  requiredEqualityLevel)
+    {
+        if (requiredEqualityLevel == null) {
+            return TaskEqualityRuleManager.getInstance().compare(taskInstance1, taskInstance2);
+        }
+        else if (TaskEqualityRuleManager.getInstance().areAtLeastEqual
+                     (taskInstance1, taskInstance2, requiredEqualityLevel))
+        {
+            return requiredEqualityLevel;
+        }
+        else {
+            return TaskEquality.UNEQUAL;
+        }
+    }
 }
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRule.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRule.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRule.java	(revision 1294)
@@ -18,5 +18,7 @@
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
 /**
@@ -34,5 +36,5 @@
     
     /* (non-Javadoc)
-     * @see NodeComparisonRule#isApplicable(ITask, ITask)
+     * @see TaskComparisonRule#isApplicable(ITask, ITask)
      */
     @Override
@@ -43,5 +45,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areLexicallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areLexicallyEqual(ITask, ITask)
      */
     @Override
@@ -52,5 +54,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSyntacticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITask, ITask)
      */
     @Override
@@ -61,5 +63,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSemanticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITask, ITask)
      */
     @Override
@@ -70,5 +72,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#compare(ITask, ITask)
+     * @see TaskComparisonRule#compare(ITask, ITask)
      */
     @Override
@@ -77,4 +79,47 @@
     }
     
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#isApplicable(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean isApplicable(ITaskInstance instance1, ITaskInstance instance2) {
+        return isApplicable(instance1.getTask(), instance2.getTask());
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areLexicallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areLexicallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.LEXICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.LEXICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areSyntacticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.SYNTACTICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.SYNTACTICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areSemanticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        TaskEquality equality = getEquality(instance1, instance2, TaskEquality.SEMANTICALLY_EQUAL);
+        return (equality != null) && (equality.isAtLeast(TaskEquality.SEMANTICALLY_EQUAL));
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#compare(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public TaskEquality compare(ITaskInstance instance1, ITaskInstance instance2) {
+        return getEquality(instance1, instance2, null);
+    }
+
     /**
      * <p>
@@ -191,3 +236,98 @@
         }
     }
+
+    /**
+     * <p>
+     * compares two task instances with each other checking for the provided required level of
+     * equality. One of the task instances must be a selection, the other one not. If this is not
+     * the case, the method returns null. The returned equality level is at most lexical equality
+     * as the selection can not be identical to something not being a selection.
+     * </p>
+     * 
+     * @param taskInstance1         the first task instance to be compared
+     * @param taskInstance2         the second task instance to be compared
+     * @param requiredEqualityLevel the equality level to be checked for
+     * 
+     * @return the determined equality.
+     */
+    private TaskEquality getEquality(ITaskInstance taskInstance1,
+                                     ITaskInstance taskInstance2,
+                                     TaskEquality  requiredEqualityLevel)
+    {
+        ISelectionInstance selection = null;
+        ITaskInstance task = null;
+        
+        if (taskInstance1 instanceof ISelectionInstance) {
+            if (taskInstance2 instanceof ISelectionInstance) {
+                // the rule is not responsible for two selections
+                return null;
+            }
+            
+            selection = (ISelectionInstance) taskInstance1;
+            task = taskInstance2;
+        }
+        else if (taskInstance2 instanceof ISelectionInstance) {
+            if (taskInstance1 instanceof ISelectionInstance) {
+                // the rule is not responsible for two selections
+                return null;
+            }
+            
+            selection = (ISelectionInstance) taskInstance2;
+            task = taskInstance1;
+        }
+        else {
+            return null;
+        }
+
+        // now, that we found the selection and the task, lets compare the child of the selection
+        // with the task.
+        ITaskInstance child = selection.getChild();
+        
+        if (child == null) {
+            return null;
+        }
+
+        TaskEquality taskEquality = callRuleManager(child, task, requiredEqualityLevel);
+
+        // although the subtask may be identical to the task, we can not return identical, as
+        // the selection is not identical to the task, but at most lexically equal
+        if (taskEquality == TaskEquality.IDENTICAL) {
+            return TaskEquality.LEXICALLY_EQUAL;
+        }
+        else {
+            return taskEquality;
+        }
+
+    }
+    
+    /**
+     * <p>
+     * used to to call the task equality rule manager for the comparison of the two provided
+     * children. If no required equality level is provided, than the most concrete equality is
+     * returned. Otherwise, the required equality is returned as long as the children are equal
+     * on that level.
+     * </p> 
+     * 
+     * @param taskInstance1         the first task instance to be compared
+     * @param taskInstance2         the second task instance to be compared
+     * @param requiredEqualityLevel the equality level to be checked for
+     * 
+     * @return the determined equality
+     */
+    private TaskEquality callRuleManager(ITaskInstance taskInstance1,
+                                         ITaskInstance taskInstance2,
+                                         TaskEquality  requiredEqualityLevel)
+    {
+        if (requiredEqualityLevel == null) {
+            return TaskEqualityRuleManager.getInstance().compare(taskInstance1, taskInstance2);
+        }
+        else if (TaskEqualityRuleManager.getInstance().areAtLeastEqual
+                     (taskInstance1, taskInstance2, requiredEqualityLevel))
+        {
+            return requiredEqualityLevel;
+        }
+        else {
+            return TaskEquality.UNEQUAL;
+        }
+    }
 }
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskComparisonRule.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskComparisonRule.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskComparisonRule.java	(revision 1294)
@@ -16,9 +16,10 @@
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
 /**
  * <p>
- * A task comparison rule is used by the {@link TaskEqualityRuleManager} to compare tasks with
- * each other. It provides several methods to be called for a comparison.
+ * A task comparison rule is used by the {@link TaskEqualityRuleManager} to compare tasks and
+ * task instances with each other. It provides several methods to be called for a comparison.
  * </p>
  * 
@@ -90,3 +91,65 @@
     public TaskEquality compare(ITask task1, ITask task2);
 
+    /**
+     * <p>
+     * checks if the rule is applicable for comparing the two provided task instances
+     * </p>
+     * 
+     * @param instance1 the first task instance to compare
+     * @param instance2 the second task instance to compare
+     * 
+     * @return true, if the rule is applicable, false else
+     */
+    public boolean isApplicable(ITaskInstance instance1, ITaskInstance instance2);
+
+    /**
+     * <p>
+     * checks, if the provided task instances are lexically equal
+     * </p>
+     * 
+     * @param instance1 the first task instance to compare
+     * @param instance2 the second task instance to compare
+     * 
+     * @return true, if the tasks are equal, false else
+     */
+    public boolean areLexicallyEqual(ITaskInstance instance1, ITaskInstance instance2);
+
+    /**
+     * <p>
+     * checks, if the provided task instances are syntactically equal
+     * </p>
+     * 
+     * @param instance1 the first task instance to compare
+     * @param instance2 the second task instance to compare
+     * 
+     * @return true, if the tasks are equal, false else
+     */
+    public boolean areSyntacticallyEqual(ITaskInstance instance1, ITaskInstance instance2);
+
+    /**
+     * <p>
+     * checks, if the provided task instances are semantically equal
+     * </p>
+     * 
+     * @param instance1 the first task instance to compare
+     * @param instance2 the second task instance to compare
+     * 
+     * @return true, if the tasks are equal, false else
+     */
+    public boolean areSemanticallyEqual(ITaskInstance instance1, ITaskInstance instance2);
+
+    /**
+     * <p>
+     * compares two task instances with each other. The result of the method is either a task
+     * instance equality or null. If it is null, it means, that the rule is not able to correctly
+     * compare the two given task instances
+     * </p>
+     * 
+     * @param instance1 the first task instance to compare
+     * @param instance2 the second task instance to compare
+     * 
+     * @return as described
+     */
+    public TaskEquality compare(ITaskInstance instance1, ITaskInstance instance2);
+
 }
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskEqualityRuleManager.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskEqualityRuleManager.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskEqualityRuleManager.java	(revision 1294)
@@ -19,15 +19,15 @@
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
 /**
  * <p>
- * The task equality rule manager is capable of comparing tasks based on its internal list
- * of comparison rules. These rules are asked for comparing the two provided tasks. If a rule
- * returns a task equality other than null, this equality is returned. Otherwise the next rule
- * is asked.
+ * The task equality rule manager is capable of comparing tasks and task instances based on its
+ * internal list of comparison rules. These rules are asked for comparing the two provided tasks or
+ * task instance. If a rule returns a task equality other than null, this equality is returned.
+ * Otherwise the next rule is asked.
  * </p>
  * 
- * @version $Revision: $ $Date: 19.02.2012$
- * @author 2012, last modified by $Author: patrick$
+ * @author Patrick Harms
  */
 public class TaskEqualityRuleManager {
@@ -269,3 +269,207 @@
     }
 
+    /**
+     * <p>
+     * this method performs a comparison of the two provided task instances. It iterates its
+     * internal comparison rules. If the first rule returns a task instance equality other than
+     * null, this equality is returned. Otherwise the next rule is tried. If no rule returns an
+     * equality <code>TaskEquality.UNEQUAL</code> is returned.
+     * </p>
+     * 
+     * @param instance1 the first task instance to be compared
+     * @param instance2 the second task instance to be compared
+     * 
+     * @return as described
+     * 
+     * @throws IllegalStateException in the case, the {@link #init()} method was not called on the
+     *                               manager before a call to this method.
+     */
+    public TaskEquality compare(ITaskInstance instance1, ITaskInstance instance2)
+        throws IllegalStateException
+    {
+        if (mRuleIndex == null) {
+            throw new IllegalStateException("not initialized");
+        }
+        
+        // LOG.info("checking for equality of " + instance1 + " and " + instance2);
+        TaskEquality instanceEquality = null;
+
+        for (TaskComparisonRule rule : mRuleIndex) {
+            if (rule.isApplicable(instance1, instance2)) {
+                instanceEquality = rule.compare(instance1, instance2);
+                if (instanceEquality != null) {
+                    // LOG.warning("used rule " + rule + " for equality check");
+                    return instanceEquality;
+                }
+            }
+        }
+
+        // LOG.warning("no rule could be applied --> handling tasks as unequal");
+
+        return TaskEquality.UNEQUAL;
+    }
+
+    /**
+     * <p>
+     * this method compares two task instances with respect to the given equality level and returns
+     * true, if this level is given.
+     * </p>
+     * 
+     * @param instance1     the first task instance to be compared
+     * @param instance2     the second task instance to be compared
+     * @param equalityLevel the level of equality to be checked for
+     * 
+     * @return as described
+     * 
+     * @throws IllegalStateException in the case, the {@link #init()} method was not called on the
+     *                               manager before a call to this method.
+     */
+    public boolean areAtLeastEqual(ITaskInstance        instance1,
+                                   ITaskInstance        instance2,
+                                   TaskEquality equalityLevel)
+    {
+        if (equalityLevel == null) {
+            throw new IllegalArgumentException("required equality level must not be null");
+        }
+        
+        switch (equalityLevel) {
+            case IDENTICAL:
+                return areIdentical(instance1, instance2);
+            case LEXICALLY_EQUAL:
+                return areLexicallyEqual(instance1, instance2);
+            case SYNTACTICALLY_EQUAL:
+                return areSyntacticallyEqual(instance1, instance2);
+            case SEMANTICALLY_EQUAL:
+                return areSemanticallyEqual(instance1, instance2);
+            case UNEQUAL:
+                return !areSemanticallyEqual(instance1, instance2);
+            default:
+                throw new IllegalArgumentException("unknown required equality: " + equalityLevel);
+        }
+    }
+
+    /**
+     * <p>
+     * this method checks if the two given task instances are identical. For this, it iterates its
+     * internal comparison rules. If the first rule returns true, than this method returns true
+     * as well. If no rule returns true, this method returns false.
+     * </p>
+     * 
+     * @param instance1 the first task instance to be compared
+     * @param instance2 the second task instance to be compared
+     * 
+     * @return as described
+     * 
+     * @throws IllegalStateException in the case, the {@link #init()} method was not called on the
+     *                               manager before a call to this method.
+     */
+    public boolean areIdentical(ITaskInstance instance1, ITaskInstance instance2) {
+        if (mRuleIndex == null) {
+            throw new IllegalStateException("not initialized");
+        }
+        
+        for (TaskComparisonRule rule : mRuleIndex) {
+            if (rule.isApplicable(instance1, instance2) &&
+                rule.areLexicallyEqual(instance1, instance2))
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * <p>
+     * this method checks if the two given task instances are lexically equal. For this, it
+     * iterates its internal comparison rules. If the first rule returns true, than this method
+     * returns true, as well. If no rule returns true, this method returns false.
+     * </p>
+     * 
+     * @param instance1 the first task instance to be compared
+     * @param instance2 the second task instance to be compared
+     * 
+     * @return as described
+     * 
+     * @throws IllegalStateException in the case, the {@link #init()} method was not called on the
+     *                               manager before a call to this method.
+     */
+    public boolean areLexicallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        if (mRuleIndex == null) {
+            throw new IllegalStateException("not initialized");
+        }
+        
+        for (TaskComparisonRule rule : mRuleIndex) {
+            if (rule.isApplicable(instance1, instance2) &&
+                rule.areLexicallyEqual(instance1, instance2))
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * <p>
+     * this method checks if the two given task instances are syntactically equal. For this, it
+     * iterates its internal comparison rules. If the first rule returns true, than this method
+     * returns true, as well. If no rule returns true, this method returns false.
+     * </p>
+     * 
+     * @param instance1 the first task instance to be compared
+     * @param instance2 the second task instance to be compared
+     * 
+     * @return as described
+     * 
+     * @throws IllegalStateException in the case, the {@link #init()} method was not called on the
+     *                               manager before a call to this method.
+     */
+    public boolean areSyntacticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        if (mRuleIndex == null) {
+            throw new IllegalStateException("not initialized");
+        }
+        
+        for (TaskComparisonRule rule : mRuleIndex) {
+            if (rule.isApplicable(instance1, instance2) &&
+                rule.areSyntacticallyEqual(instance1, instance2))
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * <p>
+     * this method checks if the two given task instances are semantically equal. For this, it
+     * iterates its internal comparison rules. If the first rule returns true, than this method
+     * returns true, as well. If no rule returns true, this method returns false.
+     * </p>
+     * 
+     * @param instance1 the first task instance to be compared
+     * @param instance2 the second task instance to be compared
+     * 
+     * @return as described
+     * 
+     * @throws IllegalStateException in the case, the {@link #init()} method was not called on the
+     *                               manager before a call to this method.
+     */
+    public boolean areSemanticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        if (mRuleIndex == null) {
+            throw new IllegalStateException("not initialized");
+        }
+        
+        for (TaskComparisonRule rule : mRuleIndex) {
+            if (rule.isApplicable(instance1, instance2) &&
+                rule.areSemanticallyEqual(instance1, instance2))
+            {
+                 return true;
+            }
+        }
+
+        return false;
+    }
+
 }
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskIdentityRule.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskIdentityRule.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskIdentityRule.java	(revision 1294)
@@ -16,10 +16,11 @@
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
 /**
  * <p>
  * This comparison rule returns <code>TaskEquality.IDENTICAL</code> if the comparison of the two
- * tasks using the <code>==</code> operator or the <code>equals</code> method return true.
- * Else it returns null to denote, that it can not compare the tasks.
+ * tasks using the <code>==</code> operator returns true. Else it returns null to denote, that
+ * it can not compare the tasks.
  * </p>
  * 
@@ -30,5 +31,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#isApplicable(ITask, ITask)
+     * @see TaskComparisonRule#isApplicable(ITask, ITask)
      */
     @Override
@@ -38,5 +39,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areLexicallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areLexicallyEqual(ITask, ITask)
      */
     @Override
@@ -46,5 +47,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSyntacticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITask, ITask)
      */
     @Override
@@ -54,5 +55,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#areSemanticallyEqual(ITask, ITask)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITask, ITask)
      */
     @Override
@@ -62,5 +63,5 @@
 
     /* (non-Javadoc)
-     * @see NodeComparisonRule#compare(ITask, ITask)
+     * @see TaskComparisonRule#compare(ITask, ITask)
      */
     @Override
@@ -74,3 +75,48 @@
     }
 
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#isApplicable(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean isApplicable(ITaskInstance instance1, ITaskInstance instance2) {
+        return (instance1.getTask() == instance2.getTask());
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areLexicallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areLexicallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        return (instance1.getTask() == instance2.getTask());
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSyntacticallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areSyntacticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        return (instance1.getTask() == instance2.getTask());
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#areSemanticallyEqual(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public boolean areSemanticallyEqual(ITaskInstance instance1, ITaskInstance instance2) {
+        return (instance1.getTask() == instance2.getTask());
+    }
+
+    /* (non-Javadoc)
+     * @see TaskComparisonRule#compare(ITaskInstance, ITaskInstance)
+     */
+    @Override
+    public TaskEquality compare(ITaskInstance instance1, ITaskInstance instance2) {
+        if (isApplicable(instance1, instance2)) {
+            return TaskEquality.IDENTICAL;
+        }
+        else {
+            return null;
+        }
+    }
+
 }
Index: unk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/ITaskInstanceListScopeRule.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/ITaskInstanceListScopeRule.java	(revision 1293)
+++ 	(revision )
@@ -1,45 +1,0 @@
-//   Copyright 2012 Georg-August-Universität Göttingen, Germany
-//
-//   Licensed under the Apache License, Version 2.0 (the "License");
-//   you may not use this file except in compliance with the License.
-//   You may obtain a copy of the License at
-//
-//       http://www.apache.org/licenses/LICENSE-2.0
-//
-//   Unless required by applicable law or agreed to in writing, software
-//   distributed under the License is distributed on an "AS IS" BASIS,
-//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//   See the License for the specific language governing permissions and
-//   limitations under the License.
-
-package de.ugoe.cs.autoquest.tasktrees.temporalrelation;
-
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList;
-
-/**
- * <p>
- * a task instance list scope rule is able to detected temporal relationships between a list of task
- * instances provided to the {@link #apply(ITaskInstanceList)} method. A rule creates temporal
- * relationships between the task instances, i.e. substructures in the task tree, if
- * it detects a temporal relationship and instantiates the temporal relationships accordingly.
- * </p>
- * 
- * @author Patrick Harms
- */
-interface ITaskInstanceListScopeRule extends ITemporalRelationshipRule {
-
-  /**
-   * <p>
-   * applies the rule to the given task instance list. The returned rule application result is null,
-   * if the rule can not be applied, i.e. it does not detect a temporal relationship. It returns a
-   * rule application result with a status {@link RuleApplicationStatus#RULE_APPLICATION_FINISHED}
-   * if the rule was applied. The result contains all newly created parent tasks and task instances.
-   * </p>
-   * 
-   * @param taskInstances the list of task instances to apply the rule on
-   *                    
-   * @return the rule application result as described.
-   */
-  RuleApplicationResult apply(ITaskInstanceList taskInstances);
-  
-}
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/ITaskInstanceScopeRule.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/ITaskInstanceScopeRule.java	(revision 1294)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/ITaskInstanceScopeRule.java	(revision 1294)
@@ -0,0 +1,45 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.tasktrees.temporalrelation;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
+
+/**
+ * <p>
+ * a task instance scope rule is able to detected temporal relationships between the children of
+ * a task instance provided to the {@link #apply(ITaskInstance)} method. A rule creates temporal
+ * relationships between the task instances, i.e. substructures in the task tree, if
+ * it detects a temporal relationship and instantiates the temporal relationships accordingly.
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+interface ITaskInstanceScopeRule extends ITemporalRelationshipRule {
+
+  /**
+   * <p>
+   * applies the rule to the given task instance. The returned rule application result is null,
+   * if the rule can not be applied, i.e. it does not detect a temporal relationship. It returns a
+   * rule application result with a status {@link RuleApplicationStatus#RULE_APPLICATION_FINISHED}
+   * if the rule was applied. The result contains all newly created parent tasks and task instances.
+   * </p>
+   * 
+   * @param taskInstance the task instances to apply the rule on
+   *                    
+   * @return the rule application result as described.
+   */
+  RuleApplicationResult apply(ITaskInstance taskInstance);
+  
+}
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/ITemporalRelationshipRule.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/ITemporalRelationshipRule.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/ITemporalRelationshipRule.java	(revision 1294)
@@ -19,5 +19,5 @@
  * a temporal relationship rule is the main interface for all rules applied for generating
  * temporal relationships in a task tree. It is just a marker interface. More important are the
- * sub interfaces {@link ISessionScopeRule} and {@link ITaskInstanceListScopeRule}.
+ * sub interfaces {@link ISessionScopeRule} and {@link ITaskInstanceScopeRule}.
  * </p>
  * 
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleUtils.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleUtils.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleUtils.java	(revision 1294)
@@ -15,5 +15,6 @@
 package de.ugoe.cs.autoquest.tasktrees.temporalrelation;
 
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
@@ -55,9 +56,9 @@
                                                int               startIndex,
                                                int               endIndex,
-                                               ITask             model,
+                                               ISequence         model,
                                                ITaskFactory      taskFactory,
                                                ITaskBuilder      taskBuilder)
     {
-        ITaskInstance subsequence = taskFactory.createNewTaskInstance(model);
+        ISequenceInstance subsequence = taskFactory.createNewTaskInstance(model);
 
         for (int i = startIndex; i <= endIndex; i++) {
@@ -83,12 +84,12 @@
      * @return the replacement for the range
      */
-    static ITaskInstance createNewSubSequenceInRange(ITaskInstanceList parent,
-                                                     int               startIndex,
-                                                     int               endIndex,
-                                                     ITask             model,
-                                                     ITaskFactory      taskFactory,
-                                                     ITaskBuilder      taskBuilder)
+    static ISequenceInstance createNewSubSequenceInRange(ITaskInstanceList parent,
+                                                         int               startIndex,
+                                                         int               endIndex,
+                                                         ISequence         model,
+                                                         ITaskFactory      taskFactory,
+                                                         ITaskBuilder      taskBuilder)
     {
-        ITaskInstance subsequence = taskFactory.createNewTaskInstance(model);
+        ISequenceInstance subsequence = taskFactory.createNewTaskInstance(model);
 
         for (int i = startIndex; i <= endIndex; i++) {
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRule.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRule.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRule.java	(revision 1294)
@@ -26,6 +26,9 @@
 import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
@@ -159,5 +162,5 @@
         SymbolMap<ITaskInstance, ITask> uniqueTasks =
             preparationTaskHandlingStrategy.createSymbolMap();
-        TaskComparator comparator = preparationTaskHandlingStrategy.getTaskComparator();
+        TaskInstanceComparator comparator = preparationTaskHandlingStrategy.getTaskComparator();
         
         int unifiedTasks = 0;
@@ -235,14 +238,14 @@
     {
         Map<ITask, IIteration> iterations = new HashMap<ITask, IIteration>();
-        Map<IIteration, List<ITaskInstance>> iterationInstances =
-                new HashMap<IIteration, List<ITaskInstance>>();
+        Map<IIteration, List<IIterationInstance>> iterationInstances =
+                new HashMap<IIteration, List<IIterationInstance>>();
             
         for (ITask iteratedTask : iteratedTasks) {
             IIteration iteration = taskFactory.createNewIteration();
             iterations.put(iteratedTask, iteration);
-            iterationInstances.put(iteration, new LinkedList<ITaskInstance>());
-        }
-        
-        ITaskInstance iterationInstance = null;
+            iterationInstances.put(iteration, new LinkedList<IIterationInstance>());
+        }
+        
+        IIterationInstance iterationInstance = null;
         
         for (IUserSession session : sessions) {
@@ -275,5 +278,6 @@
         }
         
-        for (Map.Entry<IIteration, List<ITaskInstance>> entry : iterationInstances.entrySet()) {
+        for (Map.Entry<IIteration, List<IIterationInstance>> entry : iterationInstances.entrySet())
+        {
             harmonizeIterationInstancesModel(entry.getKey(), entry.getValue());
         }
@@ -283,12 +287,12 @@
      *
      */
-    private void harmonizeIterationInstancesModel(IIteration          iteration,
-                                                  List<ITaskInstance> iterationInstances)
+    private void harmonizeIterationInstancesModel(IIteration               iteration,
+                                                  List<IIterationInstance> iterationInstances)
     {
         List<ITask> iteratedTaskVariants = new LinkedList<ITask>();
-        TaskComparator comparator = preparationTaskHandlingStrategy.getTaskComparator();
+        TaskInstanceComparator comparator = preparationTaskHandlingStrategy.getTaskComparator();
         
         // merge the lexically different variants of iterated task to a unique list 
-        for (ITaskInstance iterationInstance : iterationInstances) {
+        for (IIterationInstance iterationInstance : iterationInstances) {
             for (ITaskInstance executionVariant : iterationInstance) {
                 ITask candidate = executionVariant.getTask();
@@ -323,8 +327,9 @@
             taskBuilder.setMarkedTask(iteration, selection);
             
-            for (ITaskInstance instance : iterationInstances) {
+            for (IIterationInstance instance : iterationInstances) {
                 for (int i = 0; i < instance.size(); i++) {
-                    ITaskInstance selectionInstance = taskFactory.createNewTaskInstance(selection);
-                    taskBuilder.addChild(selectionInstance, instance.get(i));
+                    ISelectionInstance selectionInstance =
+                        taskFactory.createNewTaskInstance(selection);
+                    taskBuilder.setChild(selectionInstance, instance.get(i));
                     taskBuilder.setTaskInstance(instance, i, selectionInstance);
                 }
@@ -490,5 +495,5 @@
                 Console.traceln(Level.FINEST, "replacing " + sequence.getId() + ": " + task);
 
-                List<ITaskInstance> sequenceInstances =
+                List<ISequenceInstance> sequenceInstances =
                     replaceTaskOccurrences(task, appData.getSessions(), sequence);
                 
@@ -510,9 +515,9 @@
      *
      */
-    private void harmonizeSequenceInstancesModel(ISequence           sequence,
-                                                 List<ITaskInstance> sequenceInstances,
-                                                 int                 sequenceLength)
+    private void harmonizeSequenceInstancesModel(ISequence               sequence,
+                                                 List<ISequenceInstance> sequenceInstances,
+                                                 int                     sequenceLength)
     {
-        TaskComparator comparator = preparationTaskHandlingStrategy.getTaskComparator();
+        TaskInstanceComparator comparator = preparationTaskHandlingStrategy.getTaskComparator();
         
         // ensure for each subtask that lexically different variants are preserved
@@ -520,5 +525,5 @@
             List<ITask> subTaskVariants = new LinkedList<ITask>();
             
-            for (ITaskInstance sequenceInstance : sequenceInstances) {
+            for (ISequenceInstance sequenceInstance : sequenceInstances) {
                 ITask candidate = sequenceInstance.get(subTaskIndex).getTask();
                 
@@ -556,8 +561,8 @@
                 taskBuilder.addChild(sequence, selection);
                 
-                for (ITaskInstance instance : sequenceInstances) {
-                    ITaskInstance selectionInstance =
+                for (ISequenceInstance instance : sequenceInstances) {
+                    ISelectionInstance selectionInstance =
                         taskFactory.createNewTaskInstance(selection);
-                    taskBuilder.addChild(selectionInstance, instance.get(subTaskIndex));
+                    taskBuilder.setChild(selectionInstance, instance.get(subTaskIndex));
                     taskBuilder.setTaskInstance(instance, subTaskIndex, selectionInstance);
                 }
@@ -572,9 +577,9 @@
      * @param tree
      */
-    private List<ITaskInstance> replaceTaskOccurrences(List<ITaskInstance> task,
-                                                       List<IUserSession>  sessions,
-                                                       ISequence           temporalTaskModel)
+    private List<ISequenceInstance> replaceTaskOccurrences(List<ITaskInstance> task,
+                                                           List<IUserSession>  sessions,
+                                                           ISequence           temporalTaskModel)
     {
-        List<ITaskInstance> sequenceInstances = new LinkedList<ITaskInstance>();
+        List<ISequenceInstance> sequenceInstances = new LinkedList<ISequenceInstance>();
         
         for (IUserSession session : sessions) {
Index: unk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskComparator.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskComparator.java	(revision 1293)
+++ 	(revision )
@@ -1,254 +1,0 @@
-//   Copyright 2012 Georg-August-Universität Göttingen, Germany
-//
-//   Licensed under the Apache License, Version 2.0 (the "License");
-//   you may not use this file except in compliance with the License.
-//   You may obtain a copy of the License at
-//
-//       http://www.apache.org/licenses/LICENSE-2.0
-//
-//   Unless required by applicable law or agreed to in writing, software
-//   distributed under the License is distributed on an "AS IS" BASIS,
-//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//   See the License for the specific language governing permissions and
-//   limitations under the License.
-
-package de.ugoe.cs.autoquest.tasktrees.temporalrelation;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.util.HashMap;
-
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEqualityRuleManager;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
-import de.ugoe.cs.autoquest.usageprofiles.SymbolComparator;
-
-/**
- * TODO comment
- */
-class TaskComparator implements SymbolComparator<ITaskInstance> {
-    
-    /**  */
-    private static final long serialVersionUID = 1L;
-    
-    /** */
-    private static final int MAX_BUFFER_SIZE = 2 * 1024 * 1024;
-
-    /** */
-    private TaskEquality minimalNodeEquality;
-
-    /** */
-    private transient Comparer comparer;
-
-    /** */
-    private transient Comparer lexicalComparer;
-
-    /** */
-    private transient HashMap<Long, Boolean> equalityBuffer = new HashMap<Long, Boolean>();
-
-    /** */
-    private transient HashMap<Long, Boolean> lexicalEqualityBuffer;
-
-    /**
-     *
-     */
-    public TaskComparator(TaskEquality minimalNodeEquality) {
-        this.minimalNodeEquality = minimalNodeEquality;
-        init();
-    }
-
-    /* (non-Javadoc)
-     * @see SymbolComparator#equals(Object, Object)
-     */
-    @Override
-    public boolean equals(ITaskInstance taskInstance1, ITaskInstance taskInstance2) {
-        return equals(taskInstance1.getTask(), taskInstance2.getTask());
-    }        
-
-    /**
-     * 
-     */
-    public boolean equals(ITask task1, ITask task2) {
-        Boolean result;
-        
-        if (task1 != task2) {
-            //if ((task1 instanceof IEventTask) && (task2 instanceof IEventTask)) {
-                long key = ((long) System.identityHashCode(task1)) << 32;
-                key += System.identityHashCode(task2);
-            
-                result = equalityBuffer.get(key);
-            
-                if (result == null) {
-                    result = comparer.compare(task1, task2);
-                    
-                    if (equalityBuffer.size() < MAX_BUFFER_SIZE) {
-                        equalityBuffer.put(key, result);
-                    }
-                }
-            /*}
-            else {
-                result = false;
-            }*/
-        }
-        else {
-            result = true;
-        }
-        
-        return result;
-    }
-
-    /**
-     *
-     */
-    public boolean areLexicallyEqual(ITask task1, ITask task2) {
-        Boolean result;
-        
-        if (task1 != task2) {
-            long key = ((long) System.identityHashCode(task1)) << 32;
-            key += System.identityHashCode(task2);
-            
-            result = lexicalEqualityBuffer.get(key);
-            
-            if (result == null) {
-                result = lexicalComparer.compare(task1, task2);
-                if (equalityBuffer.size() < MAX_BUFFER_SIZE) {
-                    lexicalEqualityBuffer.put(key, result);
-                }
-            }
-        }
-        else {
-            result = true;
-        }
-        
-        return result;
-    }
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     */
-    void clearBuffers() {
-        equalityBuffer.clear();
-        init();
-    }
-    
-    /**
-     * 
-     */
-    private void init() {
-        if (minimalNodeEquality == TaskEquality.LEXICALLY_EQUAL) {
-            comparer = new LexicalComparer();
-        }
-        else if (minimalNodeEquality == TaskEquality.SYNTACTICALLY_EQUAL) {
-            comparer = new SyntacticalComparer();
-        }
-        else if (minimalNodeEquality == TaskEquality.SEMANTICALLY_EQUAL) {
-            comparer = new SemanticalComparer();
-        }
-        else {
-            comparer = new DefaultComparer(this.minimalNodeEquality);
-        }
-        
-        if (minimalNodeEquality == TaskEquality.LEXICALLY_EQUAL) {
-            lexicalComparer = comparer;
-            lexicalEqualityBuffer = equalityBuffer;
-        }
-        else {
-            lexicalComparer = new LexicalComparer();
-            lexicalEqualityBuffer = new HashMap<Long, Boolean>();
-        }
-    }
-    
-    /**
-     * <p>
-     * deserialize this object and reinitialize the buffers
-     * </p>
-     */
-    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
-        in.defaultReadObject();
-        init();
-    }
-
-
-    /**
-     * 
-     */
-    private static interface Comparer {
-        
-        /**
-         * 
-         */
-        boolean compare(ITask task1, ITask task2);
-    }
-
-    /**
-     * 
-     */
-    private static class LexicalComparer implements Comparer {
-        
-        /**
-         * 
-         */
-        public boolean compare(ITask task1, ITask task2) {
-            return TaskEqualityRuleManager.getInstance().areLexicallyEqual(task1, task2);
-        }
-    }
-
-    /**
-     * 
-     */
-    private static class SyntacticalComparer implements Comparer {
-        
-        /**
-         * 
-         */
-        public boolean compare(ITask task1, ITask task2) {
-            return TaskEqualityRuleManager.getInstance().areSyntacticallyEqual(task1, task2);
-        }
-    }
-
-    /**
-     * 
-     */
-    private static class SemanticalComparer implements Comparer {
-        
-        /**
-         * 
-         */
-        public boolean compare(ITask task1, ITask task2) {
-            return TaskEqualityRuleManager.getInstance().areSemanticallyEqual(task1, task2);
-        }
-    }
-
-    /**
-     * 
-     */
-    private static class DefaultComparer implements Comparer {
-        
-        /**
-         * <p>
-         * the minimal task equality two identified sublists need to have to consider them as equal
-         * </p>
-         */
-        private TaskEquality minimalNodeEquality;
-        
-        /**
-         *
-         */
-        public DefaultComparer(TaskEquality minimalNodeEquality) {
-           this.minimalNodeEquality = minimalNodeEquality;
-        }
-        
-        /**
-         * 
-         */
-        public boolean compare(ITask task1, ITask task2) {
-            return TaskEqualityRuleManager.getInstance().areAtLeastEqual
-                (task1, task2, minimalNodeEquality);
-        }
-    }
-
-}
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskHandlingStrategy.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskHandlingStrategy.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskHandlingStrategy.java	(revision 1294)
@@ -42,5 +42,5 @@
      * 
      */
-    private TaskComparator comparator;
+    private TaskInstanceComparator comparator;
 
     /**
@@ -58,5 +58,5 @@
         }
         else {
-            comparator = new TaskComparator(this.consideredEquality);
+            comparator = new TaskInstanceComparator(this.consideredEquality);
         }
     }
@@ -77,5 +77,5 @@
      * @return
      */
-    public TaskComparator getTaskComparator() {
+    public TaskInstanceComparator getTaskComparator() {
         return comparator;
     }
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskIdentityComparator.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskIdentityComparator.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskIdentityComparator.java	(revision 1294)
@@ -21,5 +21,5 @@
  * TODO comment
  */
-class TaskIdentityComparator extends TaskComparator {
+class TaskIdentityComparator extends TaskInstanceComparator {
 
     /**  */
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceComparator.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceComparator.java	(revision 1294)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceComparator.java	(revision 1294)
@@ -0,0 +1,254 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.tasktrees.temporalrelation;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.util.HashMap;
+
+import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
+import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEqualityRuleManager;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
+import de.ugoe.cs.autoquest.usageprofiles.SymbolComparator;
+
+/**
+ * TODO comment
+ */
+class TaskInstanceComparator implements SymbolComparator<ITaskInstance> {
+    
+    /**  */
+    private static final long serialVersionUID = 1L;
+    
+    /** */
+    private static final int MAX_BUFFER_SIZE = 2 * 1024 * 1024;
+
+    /** */
+    private TaskEquality minimalNodeEquality;
+
+    /** */
+    private transient Comparer comparer;
+
+    /** */
+    private transient Comparer lexicalComparer;
+
+    /** */
+    private transient HashMap<Long, Boolean> equalityBuffer = new HashMap<Long, Boolean>();
+
+    /** */
+    private transient HashMap<Long, Boolean> lexicalEqualityBuffer;
+
+    /**
+     *
+     */
+    public TaskInstanceComparator(TaskEquality minimalNodeEquality) {
+        this.minimalNodeEquality = minimalNodeEquality;
+        init();
+    }
+
+    /* (non-Javadoc)
+     * @see SymbolComparator#equals(Object, Object)
+     */
+    @Override
+    public boolean equals(ITaskInstance taskInstance1, ITaskInstance taskInstance2) {
+        return equals(taskInstance1.getTask(), taskInstance2.getTask());
+    }        
+
+    /**
+     * 
+     */
+    public boolean equals(ITask task1, ITask task2) {
+        Boolean result;
+        
+        if (task1 != task2) {
+            //if ((task1 instanceof IEventTask) && (task2 instanceof IEventTask)) {
+                long key = ((long) System.identityHashCode(task1)) << 32;
+                key += System.identityHashCode(task2);
+            
+                result = equalityBuffer.get(key);
+            
+                if (result == null) {
+                    result = comparer.compare(task1, task2);
+                    
+                    if (equalityBuffer.size() < MAX_BUFFER_SIZE) {
+                        equalityBuffer.put(key, result);
+                    }
+                }
+            /*}
+            else {
+                result = false;
+            }*/
+        }
+        else {
+            result = true;
+        }
+        
+        return result;
+    }
+
+    /**
+     *
+     */
+    public boolean areLexicallyEqual(ITask task1, ITask task2) {
+        Boolean result;
+        
+        if (task1 != task2) {
+            long key = ((long) System.identityHashCode(task1)) << 32;
+            key += System.identityHashCode(task2);
+            
+            result = lexicalEqualityBuffer.get(key);
+            
+            if (result == null) {
+                result = lexicalComparer.compare(task1, task2);
+                if (equalityBuffer.size() < MAX_BUFFER_SIZE) {
+                    lexicalEqualityBuffer.put(key, result);
+                }
+            }
+        }
+        else {
+            result = true;
+        }
+        
+        return result;
+    }
+    
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     */
+    void clearBuffers() {
+        equalityBuffer.clear();
+        init();
+    }
+    
+    /**
+     * 
+     */
+    private void init() {
+        if (minimalNodeEquality == TaskEquality.LEXICALLY_EQUAL) {
+            comparer = new LexicalComparer();
+        }
+        else if (minimalNodeEquality == TaskEquality.SYNTACTICALLY_EQUAL) {
+            comparer = new SyntacticalComparer();
+        }
+        else if (minimalNodeEquality == TaskEquality.SEMANTICALLY_EQUAL) {
+            comparer = new SemanticalComparer();
+        }
+        else {
+            comparer = new DefaultComparer(this.minimalNodeEquality);
+        }
+        
+        if (minimalNodeEquality == TaskEquality.LEXICALLY_EQUAL) {
+            lexicalComparer = comparer;
+            lexicalEqualityBuffer = equalityBuffer;
+        }
+        else {
+            lexicalComparer = new LexicalComparer();
+            lexicalEqualityBuffer = new HashMap<Long, Boolean>();
+        }
+    }
+    
+    /**
+     * <p>
+     * deserialize this object and reinitialize the buffers
+     * </p>
+     */
+    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
+        in.defaultReadObject();
+        init();
+    }
+
+
+    /**
+     * 
+     */
+    private static interface Comparer {
+        
+        /**
+         * 
+         */
+        boolean compare(ITask task1, ITask task2);
+    }
+
+    /**
+     * 
+     */
+    private static class LexicalComparer implements Comparer {
+        
+        /**
+         * 
+         */
+        public boolean compare(ITask task1, ITask task2) {
+            return TaskEqualityRuleManager.getInstance().areLexicallyEqual(task1, task2);
+        }
+    }
+
+    /**
+     * 
+     */
+    private static class SyntacticalComparer implements Comparer {
+        
+        /**
+         * 
+         */
+        public boolean compare(ITask task1, ITask task2) {
+            return TaskEqualityRuleManager.getInstance().areSyntacticallyEqual(task1, task2);
+        }
+    }
+
+    /**
+     * 
+     */
+    private static class SemanticalComparer implements Comparer {
+        
+        /**
+         * 
+         */
+        public boolean compare(ITask task1, ITask task2) {
+            return TaskEqualityRuleManager.getInstance().areSemanticallyEqual(task1, task2);
+        }
+    }
+
+    /**
+     * 
+     */
+    private static class DefaultComparer implements Comparer {
+        
+        /**
+         * <p>
+         * the minimal task equality two identified sublists need to have to consider them as equal
+         * </p>
+         */
+        private TaskEquality minimalNodeEquality;
+        
+        /**
+         *
+         */
+        public DefaultComparer(TaskEquality minimalNodeEquality) {
+           this.minimalNodeEquality = minimalNodeEquality;
+        }
+        
+        /**
+         * 
+         */
+        public boolean compare(ITask task1, ITask task2) {
+            return TaskEqualityRuleManager.getInstance().areAtLeastEqual
+                (task1, task2, minimalNodeEquality);
+        }
+    }
+
+}
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolBucketedMap.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolBucketedMap.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolBucketedMap.java	(revision 1294)
@@ -27,9 +27,8 @@
 
 import de.ugoe.cs.autoquest.eventcore.IEventType;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 import de.ugoe.cs.autoquest.usageprofiles.SymbolMap;
@@ -81,5 +80,5 @@
      * </p>
      */
-    private TaskComparator comparator;
+    private TaskInstanceComparator comparator;
 
     /**
@@ -117,5 +116,5 @@
      * @throws IllegalArgumentException if the provided comparator is null
      */
-    public TaskSymbolBucketedMap(TaskComparator comparator) {
+    public TaskSymbolBucketedMap(TaskInstanceComparator comparator) {
         if (comparator == null) {
             throw new IllegalArgumentException("comparator must not be null");
@@ -400,20 +399,18 @@
         // other = hashCode of name of event type
         
-        ITask task = taskInstance.getTask();
-        
-        if (task instanceof IEventTask) {
+        if (taskInstance instanceof IEventTaskInstance) {
             // event tasks are most likely equal to those of the event type with the same name,
             // Afterwards, they may be equal to iterations, optionals, other event tasks,
             // selections, and finally the rest.
-            IEventType eventType = ((IEventTask) task).getEventType();
+            IEventType eventType = ((IEventTaskInstance) taskInstance).getEvent().getType();
             return new int[] { eventType.getName().hashCode(), 2, 3, 4, 1 };                       
         }
-        else if (task instanceof ISequence) {
+        else if (taskInstance instanceof ISequenceInstance) {
             return new int[] { 0, 2, 3, 1 };                       
         }
-        else if (task instanceof ISelection) {
+        else if (taskInstance instanceof ISelectionInstance) {
             return new int[] { 1, 4, 2, 3 };                       
         }
-        else if (task instanceof IIteration) {
+        else if (taskInstance instanceof IIterationInstance) {
             return new int[] { 2, 1, 4 };                       
         }
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TemporalRelationshipRuleManager.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TemporalRelationshipRuleManager.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TemporalRelationshipRuleManager.java	(revision 1294)
@@ -26,5 +26,4 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession;
 import de.ugoe.cs.util.console.Console;
@@ -38,9 +37,9 @@
  * between tasks which are not only a major sequence. I.e. through the application of the
  * rules iterations and selections of tasks are detected. Which kind of temporal relations
- * between tasks are detected depends on the {@link ITaskInstanceListScopeRule}s known to
+ * between tasks are detected depends on the {@link ITaskInstanceScopeRule}s known to
  * this class.
  * </p>
- * <p>The class holds references to the appropriate {@link ITaskInstanceListScopeRule}s and calls
- * their {@link ITaskInstanceListScopeRule#apply(ITask, ITaskBuilder, ITaskFactory, boolean)}
+ * <p>The class holds references to the appropriate {@link ITaskInstanceScopeRule}s and calls
+ * their {@link ITaskInstanceScopeRule#apply(ITask, ITaskBuilder, ITaskFactory, boolean)}
  * method for each task in the task tree it is needed for. The general behavior of this class is
  * the following:
@@ -56,5 +55,5 @@
  *   <li>
  *     the class iterates its internal list of rules and calls their
- *     {@link ITaskInstanceListScopeRule#apply(ITask, ITaskBuilder, ITaskFactory, boolean)}
+ *     {@link ITaskInstanceScopeRule#apply(ITask, ITaskBuilder, ITaskFactory, boolean)}
  *     method.
  *   </li>
@@ -115,5 +114,5 @@
      * </p>
      */
-    private ITaskInstanceListScopeRule[] taskScopeRules;
+    private ITaskInstanceScopeRule[] taskScopeRules;
 
     /**
@@ -166,5 +165,5 @@
         //treeScopeRules.add(new DefaultGuiElementSequenceDetectionRule(frameFilter));
 
-        taskScopeRules = new ITaskInstanceListScopeRule[] {
+        taskScopeRules = new ITaskInstanceScopeRule[] {
             //new SequenceOnGuiElementDetectionRule(taskFactory, taskTreeBuilder),
             //new EventSequenceOnSameTargetDetectionRule(taskFactory, taskTreeBuilder),
@@ -262,19 +261,18 @@
      *                     on the recursion depth of calling this method.
      */
-    private int applyRules(ITaskInstanceListScopeRule[] rules,
-                           ITaskInstanceList            taskInstances,
+    private int applyRules(ITaskInstanceScopeRule[] rules,
+                           ITaskInstance                taskInstance,
                            String                       logIndent)
     {
-        Console.traceln(Level.FINER, logIndent + "applying rules for " + taskInstances.size() +
-                        " task instances");
+        Console.traceln(Level.FINER, logIndent + "applying rules on " + taskInstance);
 
         int noOfRuleApplications = 0;
 
-        for (ITaskInstanceListScopeRule rule : rules) {
+        for (ITaskInstanceScopeRule rule : rules) {
             RuleApplicationResult result;
             do {
                 Console.traceln
-                    (Level.FINER, logIndent + "trying rule " + rule + " on " + taskInstances);
-                result = rule.apply(taskInstances);
+                    (Level.FINER, logIndent + "trying rule " + rule + " on " + taskInstance);
+                result = rule.apply(taskInstance);
 
                 if ((result != null) &&
@@ -282,5 +280,5 @@
                 {
                     Console.traceln
-                        (Level.FINE, logIndent + "applied rule " + rule + " on " + taskInstances);
+                        (Level.FINE, logIndent + "applied rule " + rule + " on " + taskInstance);
                     noOfRuleApplications++;
                     
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IEventTask.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IEventTask.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IEventTask.java	(revision 1294)
@@ -15,12 +15,11 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
-import de.ugoe.cs.autoquest.eventcore.IEventTarget;
-import de.ugoe.cs.autoquest.eventcore.IEventType;
-
 /**
  * <p>
  * Event tasks represent single events. They have no children and are therefore the leaf nodes of
- * a task model. They provide information about the event they represent. This includes the event
- * type and the target.
+ * a task model. They provide information about the event they represent as a String description.
+ * They do not refer to events, as they may represented several semantically equal but lexically
+ * different events. Their description carries as much information as required to show the
+ * level of distinction.
  * </p>
  * 
@@ -29,22 +28,4 @@
 public interface IEventTask extends ITask {
     
-    /**
-     * <p>
-     * return the type of the event represented by this task
-     * </p>
-     * 
-     * @return as described
-     */
-    public IEventType getEventType();
-
-    /**
-     * <p>
-     * return the target of the event represented by this task
-     * </p>
-     * 
-     * @return as described
-     */
-    public IEventTarget getEventTarget();
-
     /**
      * <p>
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IEventTaskInstance.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IEventTaskInstance.java	(revision 1294)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IEventTaskInstance.java	(revision 1294)
@@ -0,0 +1,56 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.tasktrees.treeifc;
+
+import de.ugoe.cs.autoquest.eventcore.Event;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+public interface IEventTaskInstance extends ITaskInstance {
+
+    /**
+     * <p>
+     * returns the event represented by this event task instance
+     * </p>
+     * 
+     * @return as described
+     */
+    public Event getEvent();
+
+    /**
+     * <p>
+     * returns the task related to the instance, i.e. the event task.
+     * </p>
+     * 
+     * @return as described
+     */
+    public IEventTask getEventTask();
+
+    /**
+     * <p>
+     * clones this task instance by creating exact clones of itself. The referred task and event
+     * stay untouched
+     * </p>
+     * 
+     * @return a clone of the task instance
+     */
+    public IEventTaskInstance clone();
+    
+}
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IIterationInstance.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IIterationInstance.java	(revision 1294)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IIterationInstance.java	(revision 1294)
@@ -0,0 +1,45 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.tasktrees.treeifc;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+public interface IIterationInstance extends ITaskInstance, ITaskInstanceList {
+
+    /**
+     * <p>
+     * returns the task related to the instance, i.e. the iteration.
+     * </p>
+     * 
+     * @return as described
+     */
+    public IIteration getIteration();
+
+    /**
+     * <p>
+     * clones this task instance by creating exact clones of each contained instance in their
+     * order
+     * </p>
+     * 
+     * @return a clone of the task instance list
+     */
+    public IIterationInstance clone();
+
+}
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IOptionalInstance.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IOptionalInstance.java	(revision 1294)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IOptionalInstance.java	(revision 1294)
@@ -0,0 +1,53 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.tasktrees.treeifc;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+public interface IOptionalInstance extends ITaskInstance {
+
+    /**
+     * <p>
+     * returns the child of the optional
+     * </p>
+     * 
+     * @return as described
+     */
+    public ITaskInstance getChild();
+
+    /**
+     * <p>
+     * returns the task related to the instance, i.e. the optional.
+     * </p>
+     * 
+     * @return as described
+     */
+    public IOptional getOptional();
+
+    /**
+     * <p>
+     * clones this task instance by creating exact clones of each contained instance
+     * </p>
+     * 
+     * @return a clone of the task instance
+     */
+    public IOptionalInstance clone();
+
+}
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISelectionInstance.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISelectionInstance.java	(revision 1294)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISelectionInstance.java	(revision 1294)
@@ -0,0 +1,53 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.tasktrees.treeifc;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+public interface ISelectionInstance extends ITaskInstance {
+
+    /**
+     * <p>
+     * returns the selected child of the selection
+     * </p>
+     * 
+     * @return as described
+     */
+    public ITaskInstance getChild();
+
+    /**
+     * <p>
+     * returns the task related to the instance, i.e. the selection.
+     * </p>
+     * 
+     * @return as described
+     */
+    public ISelection getSelection();
+
+    /**
+     * <p>
+     * clones this task instance by creating exact clones of the contained instance
+     * </p>
+     * 
+     * @return a clone of the task instance
+     */
+    public ISelectionInstance clone();
+
+}
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISequenceInstance.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISequenceInstance.java	(revision 1294)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISequenceInstance.java	(revision 1294)
@@ -0,0 +1,45 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.tasktrees.treeifc;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+public interface ISequenceInstance extends ITaskInstance, ITaskInstanceList {
+
+    /**
+     * <p>
+     * returns the task related to the instance, i.e. the sequence.
+     * </p>
+     * 
+     * @return as described
+     */
+    public ISequence getSequence();
+
+    /**
+     * <p>
+     * clones this task instance by creating exact clones of each contained instance in their
+     * order
+     * </p>
+     * 
+     * @return a clone of the task instance
+     */
+    public ISequenceInstance clone();
+  
+}
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITask.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITask.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITask.java	(revision 1294)
@@ -16,4 +16,5 @@
 
 import java.io.Serializable;
+import java.util.Collection;
 
 /**
@@ -49,4 +50,13 @@
      */
     public String getDescription();
+
+    /**
+     * <p>
+     * returns a collection of all observed instances of this task
+     * </p>
+     * 
+     * @return as described
+     */
+    public Collection<ITaskInstance> getInstances();
 
     /**
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskBuilder.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskBuilder.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskBuilder.java	(revision 1294)
@@ -26,14 +26,56 @@
     /**
      * <p>
-     * adds a child to a task instance. May ensure, that the child is a valid child considering
+     * adds a child to a sequence instance. May ensure, that the child is a valid child considering
      * the task model of the parent. In that case, an IllegalArgumentException is thrown.
      * </p>
      * 
-     * @param taskInstance the instance of add the child to
-     * @param child        the child to be added
-     * 
-     * @throws IllegalArgumentException as described
-     */
-    void addChild(ITaskInstance taskInstance, ITaskInstance child) throws IllegalArgumentException;
+     * @param instance the instance of add the child to
+     * @param child    the child to be added
+     * 
+     * @throws IllegalArgumentException as described
+     */
+    void addChild(ISequenceInstance instance, ITaskInstance child) throws IllegalArgumentException;
+
+    /**
+     * <p>
+     * adds a child to an iteration instance. May ensure, that the child is a valid child
+     * considering the task model of the parent. In that case, an IllegalArgumentException is
+     * thrown.
+     * </p>
+     * 
+     * @param instance the instance of add the child to
+     * @param child    the child to be added
+     * 
+     * @throws IllegalArgumentException as described
+     */
+    void addChild(IIterationInstance instance, ITaskInstance child) throws IllegalArgumentException;
+
+    /**
+     * <p>
+     * sets the child of a selection instance. May ensure, that the child is a valid child
+     * considering the task model of the parent. In that case, an IllegalArgumentException is
+     * thrown.
+     * </p>
+     * 
+     * @param instance the instance of add the child to
+     * @param child    the child to be added
+     * 
+     * @throws IllegalArgumentException as described
+     */
+    void setChild(ISelectionInstance instance, ITaskInstance child) throws IllegalArgumentException;
+
+    /**
+     * <p>
+     * sets the child of an optional instance. May ensure, that the child is a valid child
+     * considering the task model of the parent. In that case, an IllegalArgumentException is
+     * thrown.
+     * </p>
+     * 
+     * @param instance the instance of add the child to
+     * @param child    the child to be added
+     * 
+     * @throws IllegalArgumentException as described
+     */
+    void setChild(IOptionalInstance instance, ITaskInstance child) throws IllegalArgumentException;
 
     /**
@@ -215,13 +257,3 @@
     void replaceChild(ISelection parent, ITask oldChild, ITask newChild);
 
-    /**
-     * <p>
-     * sets the description of a task
-     * </p>
-     * 
-     * @param task        the task to set the description of
-     * @param description the new description of the task
-     */
-    void setDescription(ITask task, String description);
-
 }
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskFactory.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskFactory.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskFactory.java	(revision 1294)
@@ -17,6 +17,5 @@
 import java.util.List;
 
-import de.ugoe.cs.autoquest.eventcore.IEventTarget;
-import de.ugoe.cs.autoquest.eventcore.IEventType;
+import de.ugoe.cs.autoquest.eventcore.Event;
 
 /**
@@ -31,13 +30,12 @@
     /**
      * <p>
-     * creates a new event task with the given type and target
+     * creates a new event task with the given description
      * </p>
      * 
-     * @param eventType   the type of the event represented by the task
-     * @param eventTarget the target of the event represented by the task
+     * @param description the description for the represented events
      * 
      * @return the event task
      */
-    IEventTask createNewEventTask(IEventType eventType, IEventTarget eventTarget);
+    IEventTask createNewEventTask(String description);
 
     /**
@@ -79,21 +77,57 @@
     /**
      * <p>
-     * creates a new task instance with the given task as its model
+     * creates a new task instance with the given task as its model representing the provided event
      * </p>
      * 
-     * @param task the model of the task instance to be created
+     * @param task  the model of the task instance to be created
+     * @param event the event represented by the task instance
      * 
      * @return the task instance
      */
-    ITaskInstance createNewTaskInstance(ITask task);
+    IEventTaskInstance createNewTaskInstance(IEventTask task, Event event);
 
     /**
      * <p>
-     * creates a new empty task instance list
+     * creates a new task instance with the given sequence as its model
      * </p>
      * 
-     * @return the task instance list
+     * @param sequence the model of the task instance to be created
+     * 
+     * @return the task instance
      */
-    ITaskInstanceList createNewTaskInstanceList();
+    ISequenceInstance createNewTaskInstance(ISequence sequence);
+
+    /**
+     * <p>
+     * creates a new task instance with the given iteration as its model
+     * </p>
+     * 
+     * @param iteration the model of the task instance to be created
+     * 
+     * @return the task instance
+     */
+    IIterationInstance createNewTaskInstance(IIteration iteration);
+
+    /**
+     * <p>
+     * creates a new task instance with the given optional as its model
+     * </p>
+     * 
+     * @param optional the model of the task instance to be created
+     * 
+     * @return the task instance
+     */
+    IOptionalInstance createNewTaskInstance(IOptional optional);
+
+    /**
+     * <p>
+     * creates a new task instance with the given selection as its model
+     * </p>
+     * 
+     * @param selection the model of the task instance to be created
+     * 
+     * @return the task instance
+     */
+    ISelectionInstance createNewTaskInstance(ISelection selection);
 
     /**
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstance.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstance.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstance.java	(revision 1294)
@@ -15,36 +15,15 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
-import java.util.List;
+import java.io.Serializable;
 
 /**
  * <p>
  * a task instance represents the execution of a specific task within a user session. A task
- * instance is always related to the task that was executed. A task instance may have children
- * but only if its related task allows to have children. For example, if the represented task is
- * a sequence then task instance has children and these are instances of the tasks being the
- * children of the related sequence.
- * </p>
- * <p>
- * An instance of a sequence has the same number of children as the related sequence. An instance
- * of a selection has only one child which is an instance of exactly one variant contained in the
- * related selection. An instance of an iteration has zero or more instances of the same task
- * as children where the task is the child of the related iteration. An instance of an optional
- * has zero or one child where the task related to child is the child of the optional. A task
- * instance related to an event task does not have children.
+ * instance is always related to the task that was executed.
  * </p>
  * 
  * @author Patrick Harms
  */
-public interface ITaskInstance extends ITaskInstanceList {
-
-    /**
-     * <p>
-     * returns the children of the task instance if any. See class description for how many
-     * children can be expected. May return null.
-     * </p>
-     * 
-     * @return as described
-     */
-    public List<ITaskInstance> getChildren();
+public interface ITaskInstance extends Serializable, Cloneable {
 
     /**
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstanceList.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstanceList.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstanceList.java	(revision 1294)
@@ -19,5 +19,5 @@
 /**
  * <p>
- * represents a serializable, clonable, iterable representation of a read only list of task
+ * represents a serializable and iterable representation of a read only list of task
  * instances. The list is ordered. It does not provide methods for changing it.
  * </p>
@@ -25,5 +25,5 @@
  * @author Patrick Harms
  */
-public interface ITaskInstanceList extends Serializable, Cloneable, Iterable<ITaskInstance> {
+public interface ITaskInstanceList extends Serializable, Iterable<ITaskInstance> {
 
     /**
@@ -48,13 +48,3 @@
     public int size();
 
-    /**
-     * <p>
-     * clones a task instance list by creating exact clones of each contained instance in their
-     * order
-     * </p>
-     * 
-     * @return a clone of the task instance list
-     */
-    public ITaskInstanceList clone();
-  
 }
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/EventTask.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/EventTask.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/EventTask.java	(revision 1294)
@@ -15,6 +15,4 @@
 package de.ugoe.cs.autoquest.tasktrees.treeimpl;
 
-import de.ugoe.cs.autoquest.eventcore.IEventTarget;
-import de.ugoe.cs.autoquest.eventcore.IEventType;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor;
@@ -39,44 +37,11 @@
     /**
      * <p>
-     * the type of the represented event
-     * </p> 
-     */
-    private IEventType eventType;
-
-    /**
-     * <p>
-     * the target of the represented event
-     * </p> 
-     */
-    private IEventTarget eventTarget;
-
-    /**
-     * <p>
-     * simple constructor initializing this task with an event type and an event target
+     * simple constructor initializing this task with a description for the represented events
      * </p>
      * 
-     * @param eventType   the type of the represented event
-     * @param eventTarget the target of the represented event
+     * @param description a description for the represented events
      */
-    EventTask(IEventType eventType, IEventTarget eventTarget) {
-        super.setDescription(eventType.toString() + " \u21D2 " + eventTarget);
-        this.eventType = eventType;
-        this.eventTarget = eventTarget;
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask#getEventType()
-     */
-    @Override
-    public IEventType getEventType() {
-        return eventType;
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask#getEventTarget()
-     */
-    @Override
-    public IEventTarget getEventTarget() {
-        return eventTarget;
+    EventTask(String description) {
+        super.setDescription(description);
     }
 
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/EventTaskInstance.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/EventTaskInstance.java	(revision 1294)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/EventTaskInstance.java	(revision 1294)
@@ -0,0 +1,81 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.tasktrees.treeimpl;
+
+import de.ugoe.cs.autoquest.eventcore.Event;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+class EventTaskInstance extends TaskInstance implements IEventTaskInstance {
+
+    /**
+     * <p>
+     * default serial version UID
+     * </p>
+     */
+    private static final long serialVersionUID = 1L;
+    
+    /**
+     * <p>
+     * the event represented by this instance
+     * </p>
+     */
+    private Event event;
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param task
+     * @param event
+     */
+    EventTaskInstance(IEventTask task, Event event) {
+        super(task);
+        this.event = event;
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance#getEvent()
+     */
+    @Override
+    public Event getEvent() {
+        return event;
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance#getEventTask()
+     */
+    @Override
+    public IEventTask getEventTask() {
+        return (IEventTask) super.getTask();
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeimpl.IEventTaskInstance#clone()
+     */
+    @Override
+    public synchronized IEventTaskInstance clone() {
+        return (IEventTaskInstance) super.clone();
+    }
+
+}
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/IterationInstance.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/IterationInstance.java	(revision 1294)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/IterationInstance.java	(revision 1294)
@@ -0,0 +1,181 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.tasktrees.treeimpl;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+class IterationInstance extends TaskInstance implements IIterationInstance {
+
+    /**
+     * <p>
+     * default serial version UID
+     * </p>
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * <p>
+     * the children of this task instance which are task instances, as well
+     * </p>
+     */
+    private List<ITaskInstance> children;
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param task
+     */
+    IterationInstance(IIteration task) {
+        super(task);
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance#getChildren()
+     */
+    public synchronized List<ITaskInstance> getChildren() {
+        if (children == null) {
+            children = new LinkedList<ITaskInstance>();
+        }
+
+        return Collections.unmodifiableList(children);
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList#get(int)
+     */
+    @Override
+    public ITaskInstance get(int index) {
+        if (children == null) {
+            throw new IndexOutOfBoundsException(Integer.toString(index));
+        }
+        else {
+            return children.get(index);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList#size()
+     */
+    @Override
+    public int size() {
+        if (children == null) {
+            return 0;
+        }
+        else {
+            return children.size();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Iterable#iterator()
+     */
+    @Override
+    public Iterator<ITaskInstance> iterator() {
+        return getChildren().iterator();
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance#getIteration()
+     */
+    @Override
+    public IIteration getIteration() {
+        return (IIteration) super.getTask();
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeimpl.IIterationInstance#clone()
+     */
+    @Override
+    public synchronized IIterationInstance clone() {
+        IterationInstance clone = (IterationInstance) super.clone();
+
+        if (children != null) {
+            clone.children = new LinkedList<ITaskInstance>();
+
+            for (ITaskInstance child : children) {
+                clone.children.add(child.clone());
+            }
+        }
+
+        return clone;
+    }
+
+    /**
+     * <p>
+     * used to add a child to this task instance
+     * </p>
+     * 
+     * @param child the new child of this instance
+     */
+    synchronized void addChild(ITaskInstance child) {
+        if (children == null) {
+            children = new LinkedList<ITaskInstance>();
+        }
+
+        children.add(child);
+    }
+
+    /**
+     * <p>
+     * used to add a child to this task instance at a specific position
+     * </p>
+     * 
+     * @param index the position of the new child in the list of children
+     * @param child the new child of this instance
+     */
+    synchronized void addChild(int index, ITaskInstance child) {
+        if (children == null) {
+            children = new LinkedList<ITaskInstance>();
+        }
+
+        children.add(index, child);
+    }
+
+    /**
+     * <p>
+     * removes a child from this task instance at a specific position
+     * </p>
+     * 
+     * @param index the position of the child to be removed
+     * 
+     * @return the child remove from the children of this instance
+     */
+    synchronized ITaskInstance removeChild(int index) {
+        if (children != null) {
+            return children.remove(index);
+        }
+        else {
+            throw new IllegalArgumentException
+                ("this task instance does not have children that can be removed");
+        }
+    }
+
+}
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/OptionalInstance.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/OptionalInstance.java	(revision 1294)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/OptionalInstance.java	(revision 1294)
@@ -0,0 +1,101 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.tasktrees.treeimpl;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptionalInstance;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+class OptionalInstance extends TaskInstance implements IOptionalInstance {
+
+    /**
+     * <p>
+     * default serial version UID
+     * </p>
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * <p>
+     * the child of this task instance
+     * </p>
+     */
+    private ITaskInstance child;
+    
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param task
+     */
+    OptionalInstance(ITask task) {
+        super(task);
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.IOptionalInstance#getChild()
+     */
+    @Override
+    public ITaskInstance getChild() {
+        return child;
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.IOptionalInstance#getOptional()
+     */
+    @Override
+    public IOptional getOptional() {
+        return (IOptional) super.getTask();
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeimpl.ISequenceInstance#clone()
+     */
+    @Override
+    public synchronized IOptionalInstance clone() {
+        OptionalInstance clone = (OptionalInstance) super.clone();
+
+        if (child != null) {
+            clone.child = child.clone();
+        }
+
+        return clone;
+    }
+
+    /**
+     * <p>
+     * used to set the child of this task instance
+     * </p>
+     * 
+     * @param child the new child of this instance
+     */
+    void setChild(ITaskInstance child) {
+        if (child instanceof IOptionalInstance) {
+            throw new IllegalArgumentException("the child of an optional can not be an optional");
+        }
+        
+        this.child = child;
+    }
+
+}
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/SelectionInstance.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/SelectionInstance.java	(revision 1294)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/SelectionInstance.java	(revision 1294)
@@ -0,0 +1,101 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.tasktrees.treeimpl;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+class SelectionInstance extends TaskInstance implements ISelectionInstance {
+
+    /**
+     * <p>
+     * default serial version UID
+     * </p>
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * <p>
+     * the child of this task instance
+     * </p>
+     */
+    private ITaskInstance child;
+    
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param task
+     */
+    SelectionInstance(ITask task) {
+        super(task);
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance#getChild()
+     */
+    @Override
+    public ITaskInstance getChild() {
+        return child;
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance#getSelection()
+     */
+    @Override
+    public ISelection getSelection() {
+        return (ISelection) super.getTask();
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeimpl.ISequenceInstance#clone()
+     */
+    @Override
+    public synchronized ISelectionInstance clone() {
+        SelectionInstance clone = (SelectionInstance) super.clone();
+
+        if (child != null) {
+            clone.child = child.clone();
+        }
+
+        return clone;
+    }
+
+    /**
+     * <p>
+     * used to set the child of this task instance
+     * </p>
+     * 
+     * @param child the new child of this instance
+     */
+    void setChild(ITaskInstance child) {
+        if (child instanceof ISelectionInstance) {
+            throw new IllegalArgumentException("the child of a selection can not be a selection");
+        }
+        
+        this.child = child;
+    }
+
+}
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/SequenceInstance.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/SequenceInstance.java	(revision 1294)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/SequenceInstance.java	(revision 1294)
@@ -0,0 +1,181 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.tasktrees.treeimpl;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+class SequenceInstance extends TaskInstance implements ISequenceInstance {
+
+    /**
+     * <p>
+     * default serial version UID
+     * </p>
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * <p>
+     * the children of this task instance which are task instances, as well
+     * </p>
+     */
+    private List<ITaskInstance> children;
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param task
+     */
+    SequenceInstance(ISequence task) {
+        super(task);
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance#getChildren()
+     */
+    public synchronized List<ITaskInstance> getChildren() {
+        if (children == null) {
+            children = new LinkedList<ITaskInstance>();
+        }
+
+        return Collections.unmodifiableList(children);
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList#get(int)
+     */
+    @Override
+    public ITaskInstance get(int index) {
+        if (children == null) {
+            throw new IndexOutOfBoundsException(Integer.toString(index));
+        }
+        else {
+            return children.get(index);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList#size()
+     */
+    @Override
+    public int size() {
+        if (children == null) {
+            return 0;
+        }
+        else {
+            return children.size();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Iterable#iterator()
+     */
+    @Override
+    public Iterator<ITaskInstance> iterator() {
+        return getChildren().iterator();
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance#getSequence()
+     */
+    @Override
+    public ISequence getSequence() {
+        return (ISequence) super.getTask();
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeimpl.ISequenceInstance#clone()
+     */
+    @Override
+    public synchronized ISequenceInstance clone() {
+        SequenceInstance clone = (SequenceInstance) super.clone();
+
+        if (children != null) {
+            clone.children = new LinkedList<ITaskInstance>();
+
+            for (ITaskInstance child : children) {
+                clone.children.add(child.clone());
+            }
+        }
+
+        return clone;
+    }
+
+    /**
+     * <p>
+     * used to add a child to this task instance
+     * </p>
+     * 
+     * @param child the new child of this instance
+     */
+    synchronized void addChild(ITaskInstance child) {
+        if (children == null) {
+            children = new LinkedList<ITaskInstance>();
+        }
+
+        children.add(child);
+    }
+
+    /**
+     * <p>
+     * used to add a child to this task instance at a specific position
+     * </p>
+     * 
+     * @param index the position of the new child in the list of children
+     * @param child the new child of this instance
+     */
+    synchronized void addChild(int index, ITaskInstance child) {
+        if (children == null) {
+            children = new LinkedList<ITaskInstance>();
+        }
+
+        children.add(index, child);
+    }
+
+    /**
+     * <p>
+     * removes a child from this task instance at a specific position
+     * </p>
+     * 
+     * @param index the position of the child to be removed
+     * 
+     * @return the child remove from the children of this instance
+     */
+    synchronized ITaskInstance removeChild(int index) {
+        if (children != null) {
+            return children.remove(index);
+        }
+        else {
+            throw new IllegalArgumentException
+                ("this task instance does not have children that can be removed");
+        }
+    }
+
+}
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Task.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Task.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Task.java	(revision 1294)
@@ -15,5 +15,10 @@
 package de.ugoe.cs.autoquest.tasktrees.treeimpl;
 
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor;
 
@@ -56,4 +61,11 @@
      */
     private String description;
+    
+    /**
+     * <p>
+     * the instances of this task
+     * </p>
+     */
+    private Collection<ITaskInstance> instances = new HashSet<ITaskInstance>();
 
     /**
@@ -97,4 +109,12 @@
     public String getDescription() {
         return description;
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITask#getInstances()
+     */
+    @Override
+    public Collection<ITaskInstance> getInstances() {
+        return Collections.unmodifiableCollection(instances);
     }
 
@@ -163,4 +183,15 @@
     }
 
+    /**
+     * <p>
+     * internally used to add an instance to this task
+     * </p>
+     * 
+     * @param instance the instance belonging to this task
+     */
+    void addInstance(ITaskInstance instance) {
+        this.instances.add(instance);
+    }
+    
     /* (non-Javadoc)
      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITask#accept(ITaskVisitor)
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskBuilder.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskBuilder.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskBuilder.java	(revision 1294)
@@ -17,9 +17,12 @@
 import java.util.List;
 
-import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptionalInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
@@ -41,68 +44,30 @@
 
     /* (non-Javadoc)
-     * @see ITaskBuilder#addChild(ITaskInstance,ITaskInstance)
-     */
-    @Override
-    public void addChild(ITaskInstance parent, ITaskInstance child) throws IllegalArgumentException
-    {
-        if (!(parent instanceof TaskInstance)) {
-            throw new IllegalArgumentException
-                ("illegal type of task instance provided: " + parent.getClass());
+     * @see ITaskBuilder#addChild(ISequenceInstance, ITaskInstance)
+     */
+    @Override
+    public void addChild(ISequenceInstance instance, ITaskInstance child)
+        throws IllegalArgumentException
+    {
+        if (!(instance instanceof SequenceInstance)) {
+            throw new IllegalArgumentException
+                ("illegal type of sequence instance provided: " + instance.getClass());
         }
 
         if (!(child instanceof TaskInstance)) {
             throw new IllegalArgumentException
-                ("illegal type of task instance provided: " + parent.getClass());
-        }
-        
-        // check, that the correct number of children for the distinct types are added
-        ITask task = parent.getTask();
-        
-        if (task instanceof IEventTask) {
-            throw new IllegalArgumentException
-                ("can not add children to a task instance of an event task");
-        }
-        else if (task instanceof ISelection) {
-            if (parent.getChildren().size() > 0) {
-                throw new IllegalArgumentException
-                    ("the instance of a selection must have at most one child");
+                ("illegal type of task instance provided: " + child.getClass());
+        }
+        
+        /*IStructuringTemporalRelationship parentTask =
+            (IStructuringTemporalRelationship) parent.getTask();
+        
+        for (ITask parentTaskChild : parentTask.getChildren()) {
+            if (parentTaskChild.equals(child.getTask())) {
+                foundChildTask = true;
+                break;
             }
         }
-        else if (task instanceof IOptional) {
-            if (parent.getChildren().size() > 1) {
-                throw new IllegalArgumentException
-                    ("the instance of an optional must have at most one child");
-            }
-        }
-        /*else if (task instanceof IIteration) {
-            for (ITaskInstance childInstance : parent.getChildren()) {
-                if (!childInstance.getTask().equals(child.getTask())) {
-                    throw new IllegalArgumentException
-                        ("all children of an instance of an iteration must have exactly the " +
-                         "same type");
-                }
-            }
-        }
-        
-        boolean foundChildTask = false;
-        if (parent.getTask() instanceof IStructuringTemporalRelationship) {
-            IStructuringTemporalRelationship parentTask =
-                (IStructuringTemporalRelationship) parent.getTask();
-        
-            for (ITask parentTaskChild : parentTask.getChildren()) {
-                if (parentTaskChild.equals(child.getTask())) {
-                    foundChildTask = true;
-                    break;
-                }
-            }
-        }
-        else if (parent.getTask() instanceof IMarkingTemporalRelationship) {
-            IMarkingTemporalRelationship parentTask =
-                (IMarkingTemporalRelationship) parent.getTask();
-            
-            foundChildTask = parentTask.getMarkedTask() != null ?
-                parentTask.getMarkedTask().equals(child.getTask()) : false;
-        }
-        
+            
         if (!foundChildTask) {
             throw new IllegalArgumentException
@@ -111,6 +76,180 @@
         }*/
 
-        // finally, after all checks are positive, add the child
-        ((TaskInstance) parent).addChild(child);
+        ((SequenceInstance) instance).addChild(child);
+    }
+
+    /* (non-Javadoc)
+     * @see ITaskBuilder#addChild(ISequenceInstance, int, ITaskInstance)
+     */
+    public void addChild(ISequenceInstance instance, int index, ITaskInstance child)
+        throws IllegalArgumentException
+    {
+        if (!(instance instanceof SequenceInstance)) {
+            throw new IllegalArgumentException
+                ("illegal type of sequence instance provided: " + instance.getClass());
+        }
+
+        if (!(child instanceof TaskInstance)) {
+            throw new IllegalArgumentException
+                ("illegal type of task instance provided: " + child.getClass());
+        }
+        
+        /*IStructuringTemporalRelationship parentTask =
+            (IStructuringTemporalRelationship) parent.getTask();
+        
+        for (ITask parentTaskChild : parentTask.getChildren()) {
+            if (parentTaskChild.equals(child.getTask())) {
+                foundChildTask = true;
+                break;
+            }
+        }
+            
+        if (!foundChildTask) {
+            throw new IllegalArgumentException
+                ("the task of the child instance to be added does not belong to the children " +
+                 "of the task of the parent instance");
+        }*/
+
+        ((SequenceInstance) instance).addChild(index, child);
+    }
+
+    /* (non-Javadoc)
+     * @see ITaskBuilder#addChild(IIterationInstance, ITaskInstance)
+     */
+    @Override
+    public void addChild(IIterationInstance instance, ITaskInstance child)
+        throws IllegalArgumentException
+    {
+        if (!(instance instanceof IterationInstance)) {
+            throw new IllegalArgumentException
+                ("illegal type of iteration instance provided: " + instance.getClass());
+        }
+
+        if (!(child instanceof TaskInstance)) {
+            throw new IllegalArgumentException
+                ("illegal type of task instance provided: " + child.getClass());
+        }
+        
+        /*IStructuringTemporalRelationship parentTask =
+            (IStructuringTemporalRelationship) parent.getTask();
+        
+        IMarkingTemporalRelationship parentTask =
+            (IMarkingTemporalRelationship) parent.getTask();
+            
+        foundChildTask = parentTask.getMarkedTask() != null ?
+            parentTask.getMarkedTask().equals(child.getTask()) : false;
+            
+        if (!foundChildTask) {
+            throw new IllegalArgumentException
+                ("the task of the child instance to be added does not belong to the children " +
+                 "of the task of the parent instance");
+        }*/
+
+        ((IterationInstance) instance).addChild(child);
+    }
+
+    /* (non-Javadoc)
+     * @see ITaskBuilder#addChild(IIterationInstance, int, ITaskInstance)
+     */
+    public void addChild(IIterationInstance instance, int index, ITaskInstance child)
+        throws IllegalArgumentException
+    {
+        if (!(instance instanceof IterationInstance)) {
+            throw new IllegalArgumentException
+                ("illegal type of iteration instance provided: " + instance.getClass());
+        }
+
+        if (!(child instanceof TaskInstance)) {
+            throw new IllegalArgumentException
+                ("illegal type of task instance provided: " + child.getClass());
+        }
+        
+        /*IStructuringTemporalRelationship parentTask =
+            (IStructuringTemporalRelationship) parent.getTask();
+        
+        IMarkingTemporalRelationship parentTask =
+            (IMarkingTemporalRelationship) parent.getTask();
+            
+        foundChildTask = parentTask.getMarkedTask() != null ?
+            parentTask.getMarkedTask().equals(child.getTask()) : false;
+            
+        if (!foundChildTask) {
+            throw new IllegalArgumentException
+                ("the task of the child instance to be added does not belong to the children " +
+                 "of the task of the parent instance");
+        }*/
+
+        ((IterationInstance) instance).addChild(index, child);
+    }
+
+    /* (non-Javadoc)
+     * @see ITaskBuilder#setChild(ISelectionInstance, ITaskInstance)
+     */
+    @Override
+    public void setChild(ISelectionInstance instance, ITaskInstance child)
+        throws IllegalArgumentException
+    {
+        if (!(instance instanceof SelectionInstance)) {
+            throw new IllegalArgumentException
+                ("illegal type of sequence instance provided: " + instance.getClass());
+        }
+
+        if (!(child instanceof TaskInstance)) {
+            throw new IllegalArgumentException
+                ("illegal type of task instance provided: " + child.getClass());
+        }
+        
+        /*IStructuringTemporalRelationship parentTask =
+            (IStructuringTemporalRelationship) parent.getTask();
+        
+        for (ITask parentTaskChild : parentTask.getChildren()) {
+            if (parentTaskChild.equals(child.getTask())) {
+                foundChildTask = true;
+                break;
+            }
+        }
+            
+        if (!foundChildTask) {
+            throw new IllegalArgumentException
+                ("the task of the child instance to be added does not belong to the children " +
+                 "of the task of the parent instance");
+        }*/
+
+        ((SelectionInstance) instance).setChild(child);
+    }
+
+    /* (non-Javadoc)
+     * @see ITaskBuilder#setChild(IOptionalInstance, ITaskInstance)
+     */
+    @Override
+    public void setChild(IOptionalInstance instance, ITaskInstance child)
+        throws IllegalArgumentException
+    {
+        if (!(instance instanceof OptionalInstance)) {
+            throw new IllegalArgumentException
+                ("illegal type of optional instance provided: " + instance.getClass());
+        }
+
+        if (!(child instanceof TaskInstance)) {
+            throw new IllegalArgumentException
+                ("illegal type of task instance provided: " + child.getClass());
+        }
+        
+        /*IStructuringTemporalRelationship parentTask =
+            (IStructuringTemporalRelationship) parent.getTask();
+        
+        IMarkingTemporalRelationship parentTask =
+            (IMarkingTemporalRelationship) parent.getTask();
+            
+        foundChildTask = parentTask.getMarkedTask() != null ?
+            parentTask.getMarkedTask().equals(child.getTask()) : false;
+            
+        if (!foundChildTask) {
+            throw new IllegalArgumentException
+                ("the task of the child instance to be added does not belong to the children " +
+                 "of the task of the parent instance");
+        }*/
+
+        ((OptionalInstance) instance).setChild(child);
     }
 
@@ -134,13 +273,33 @@
 
     /* (non-Javadoc)
+     * @see ITaskBuilder#addExecutedTask(IUserSession, int, ITaskInstance)
+     */
+    public void addExecutedTask(IUserSession session, int index, ITaskInstance taskInstance) {
+        if (!(session instanceof UserSession)) {
+            throw new IllegalArgumentException
+                ("illegal type of session provided: " + session.getClass());
+        }
+
+        if (!(taskInstance instanceof TaskInstance)) {
+            throw new IllegalArgumentException
+                ("illegal type of task instance provided: " + taskInstance.getClass());
+        }
+        
+        ((UserSession) session).addExecutedTask(index, taskInstance);
+    }
+
+    /* (non-Javadoc)
      * @see ITaskBuilder#addTaskInstance(ITaskInstanceList, ITaskInstance)
      */
     @Override
     public void addTaskInstance(ITaskInstanceList taskInstanceList, ITaskInstance taskInstance) {
-        if (taskInstanceList instanceof TaskInstance) {
-            ((TaskInstance) taskInstanceList).addChild(taskInstance);
+        if (taskInstanceList instanceof SequenceInstance) {
+            addChild((SequenceInstance) taskInstanceList, taskInstance);
+        }
+        else if (taskInstanceList instanceof IterationInstance) {
+            addChild((IterationInstance) taskInstanceList, taskInstance);
         }
         else if (taskInstanceList instanceof UserSession) {
-            ((UserSession) taskInstanceList).addExecutedTask(taskInstance);
+            addExecutedTask((UserSession) taskInstanceList, taskInstance);
         }
         else {
@@ -158,9 +317,12 @@
                                 ITaskInstance     taskInstance)
     {
-        if (taskInstanceList instanceof TaskInstance) {
-            ((TaskInstance) taskInstanceList).addChild(index, taskInstance);
+        if (taskInstanceList instanceof SequenceInstance) {
+            addChild((SequenceInstance) taskInstanceList, index, taskInstance);
+        }
+        else if (taskInstanceList instanceof IterationInstance) {
+            addChild((IterationInstance) taskInstanceList, index, taskInstance);
         }
         else if (taskInstanceList instanceof UserSession) {
-            ((UserSession) taskInstanceList).addExecutedTask(index, taskInstance);
+            addExecutedTask((UserSession) taskInstanceList, index, taskInstance);
         }
         else {
@@ -178,16 +340,6 @@
                                 ITaskInstance     taskInstance)
     {
-        if (taskInstanceList instanceof TaskInstance) {
-            ((TaskInstance) taskInstanceList).removeChild(index);
-            ((TaskInstance) taskInstanceList).addChild(index, taskInstance);
-        }
-        else if (taskInstanceList instanceof UserSession) {
-            ((UserSession) taskInstanceList).removeExecutedTask(index);
-            ((UserSession) taskInstanceList).addExecutedTask(index, taskInstance);
-        }
-        else {
-            throw new IllegalArgumentException
-                ("illegal type of task instance list provided: " + taskInstanceList.getClass());
-        }
+        removeTaskInstance(taskInstanceList, index);
+        addTaskInstance(taskInstanceList, index, taskInstance);
     }
 
@@ -334,6 +486,9 @@
     @Override
     public void removeTaskInstance(ITaskInstanceList taskInstanceList, int index) {
-        if (taskInstanceList instanceof TaskInstance) {
-            ((TaskInstance) taskInstanceList).removeChild(index);
+        if (taskInstanceList instanceof SequenceInstance) {
+            ((SequenceInstance) taskInstanceList).removeChild(index);
+        }
+        else if (taskInstanceList instanceof IterationInstance) {
+            ((IterationInstance) taskInstanceList).removeChild(index);
         }
         else if (taskInstanceList instanceof UserSession) {
@@ -369,17 +524,4 @@
     }
 
-    /* (non-Javadoc)
-     * @see ITaskBuilder#setDescription(ITask, java.lang.String)
-     */
-    @Override
-    public void setDescription(ITask parent, String description) {
-        if (!(parent instanceof Task)) {
-            throw new IllegalArgumentException
-                ("illegal type of task provided: " + parent.getClass());
-        }
-
-        ((Task) parent).setDescription(description);
-    }
-
     /**
      * <p>
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskFactory.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskFactory.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskFactory.java	(revision 1294)
@@ -17,14 +17,15 @@
 import java.util.List;
 
-import de.ugoe.cs.autoquest.eventcore.IEventTarget;
-import de.ugoe.cs.autoquest.eventcore.IEventType;
+import de.ugoe.cs.autoquest.eventcore.Event;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptionalInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
@@ -43,9 +44,9 @@
 
     /* (non-Javadoc)
-     * @see ITaskFactory#createNewEventTask(IEventType, IEventTarget)
+     * @see ITaskFactory#createNewEventTask(String)
      */
     @Override
-    public IEventTask createNewEventTask(IEventType eventType, IEventTarget eventTarget) {
-        return new EventTask(eventType, eventTarget);
+    public IEventTask createNewEventTask(String description) {
+        return new EventTask(description);
     }
 
@@ -83,17 +84,81 @@
 
     /* (non-Javadoc)
-     * @see ITaskFactory#createNewTaskInstance(ITask)
+     * @see ITaskFactory#createNewTaskInstance(IEventTask, Event)
      */
     @Override
-    public ITaskInstance createNewTaskInstance(ITask task) {
-        return new TaskInstance(task);
+    public IEventTaskInstance createNewTaskInstance(IEventTask task, Event event) {
+        if (!(task instanceof EventTask)) {
+            throw new IllegalArgumentException
+                ("illegal type of event task provided: " + task.getClass());
+        }
+        
+        EventTaskInstance instance = new EventTaskInstance(task, event);
+        ((EventTask) task).addInstance(instance);
+        
+        return instance;
     }
 
     /* (non-Javadoc)
-     * @see ITaskFactory#createNewTaskInstanceList()
+     * @see ITaskFactory#createNewTaskInstance(ISequence)
      */
     @Override
-    public ITaskInstanceList createNewTaskInstanceList() {
-        return new TaskInstance(new Sequence());
+    public ISequenceInstance createNewTaskInstance(ISequence sequence) {
+        if (!(sequence instanceof Sequence)) {
+            throw new IllegalArgumentException
+                ("illegal type of sequence provided: " + sequence.getClass());
+        }
+        
+        SequenceInstance instance = new SequenceInstance(sequence);
+        ((Sequence) sequence).addInstance(instance);
+        
+        return instance;
+    }
+
+    /* (non-Javadoc)
+     * @see ITaskFactory#createNewTaskInstance(IIteration)
+     */
+    @Override
+    public IIterationInstance createNewTaskInstance(IIteration iteration) {
+        if (!(iteration instanceof Iteration)) {
+            throw new IllegalArgumentException
+                ("illegal type of iteration provided: " + iteration.getClass());
+        }
+        
+        IterationInstance instance = new IterationInstance(iteration);
+        ((Iteration) iteration).addInstance(instance);
+        
+        return instance;
+    }
+
+    /* (non-Javadoc)
+     * @see ITaskFactory#createNewTaskInstance(IOptional)
+     */
+    @Override
+    public IOptionalInstance createNewTaskInstance(IOptional optional) {
+        if (!(optional instanceof Optional)) {
+            throw new IllegalArgumentException
+                ("illegal type of optional provided: " + optional.getClass());
+        }
+        
+        OptionalInstance instance = new OptionalInstance(optional);
+        ((Optional) optional).addInstance(instance);
+        
+        return instance;
+    }
+
+    /* (non-Javadoc)
+     * @see ITaskFactory#createNewTaskInstance(ISelection)
+     */
+    @Override
+    public ISelectionInstance createNewTaskInstance(ISelection selection) {
+        if (!(selection instanceof Selection)) {
+            throw new IllegalArgumentException
+                ("illegal type of optional provided: " + selection.getClass());
+        }
+        
+        SelectionInstance instance = new SelectionInstance(selection);
+        ((Selection) selection).addInstance(instance);
+        
+        return instance;
     }
 
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInstance.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInstance.java	(revision 1293)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInstance.java	(revision 1294)
@@ -14,9 +14,4 @@
 
 package de.ugoe.cs.autoquest.tasktrees.treeimpl;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
@@ -64,11 +59,4 @@
     /**
      * <p>
-     * the children of this task instance which are task instances, as well
-     * </p>
-     */
-    private List<ITaskInstance> children;
-
-    /**
-     * <p>
      * instantiated the task instance with the task that is instantiated by the instance. It also
      * assigns a unique id to the instance using {@link #getNewId()}.
@@ -102,49 +90,4 @@
     public ITask getTask() {
         return task;
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance#getChildren()
-     */
-    public synchronized List<ITaskInstance> getChildren() {
-        if (children == null) {
-            children = new LinkedList<ITaskInstance>();
-        }
-
-        return Collections.unmodifiableList(children);
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList#get(int)
-     */
-    @Override
-    public ITaskInstance get(int index) {
-        if (children == null) {
-            throw new IndexOutOfBoundsException(Integer.toString(index));
-        }
-        else {
-            return children.get(index);
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList#size()
-     */
-    @Override
-    public int size() {
-        if (children == null) {
-            return 0;
-        }
-        else {
-            return children.size();
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see java.lang.Iterable#iterator()
-     */
-    @Override
-    public Iterator<ITaskInstance> iterator() {
-        return getChildren().iterator();
     }
 
@@ -203,13 +146,4 @@
         try {
             clone = (TaskInstance) super.clone();
-
-            if (children != null) {
-                clone.children = new LinkedList<ITaskInstance>();
-
-                for (ITaskInstance child : children) {
-                    clone.children.add(child.clone());
-                }
-            }
-
         }
         catch (CloneNotSupportedException e) {
@@ -219,54 +153,4 @@
 
         return clone;
-    }
-
-    /**
-     * <p>
-     * used to add a child to this task instance
-     * </p>
-     * 
-     * @param child the new child of this instance
-     */
-    synchronized void addChild(ITaskInstance child) {
-        if (children == null) {
-            children = new LinkedList<ITaskInstance>();
-        }
-
-        children.add(child);
-    }
-
-    /**
-     * <p>
-     * used to add a child to this task instance at a specific position
-     * </p>
-     * 
-     * @param index the position of the new child in the list of children
-     * @param child the new child of this instance
-     */
-    synchronized void addChild(int index, ITaskInstance child) {
-        if (children == null) {
-            children = new LinkedList<ITaskInstance>();
-        }
-
-        children.add(index, child);
-    }
-
-    /**
-     * <p>
-     * removes a child from this task instance at a specific position
-     * </p>
-     * 
-     * @param index the position of the child to be removed
-     * 
-     * @return the child remove from the children of this instance
-     */
-    synchronized ITaskInstance removeChild(int index) {
-        if (children != null) {
-            return children.remove(index);
-        }
-        else {
-            throw new IllegalArgumentException
-                ("this task instance does not have children that can be removed");
-        }
     }
 
Index: /trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/tasktrees/TaskTreeChecker.java
===================================================================
--- /trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/tasktrees/TaskTreeChecker.java	(revision 1293)
+++ /trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/tasktrees/TaskTreeChecker.java	(revision 1294)
@@ -20,4 +20,5 @@
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
@@ -27,6 +28,9 @@
 import de.ugoe.cs.autoquest.eventcore.gui.TextInput;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptionalInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
@@ -70,7 +74,7 @@
      *
      */
-    public void assertTaskInstanceList(String userSessionSpec, ITaskInstanceList taskInstances) {
+    public void assertUserSession(String userSessionSpec, IUserSession session) {
         if (doTrace) {
-            new TaskTreeEncoder().encode(taskInstances, System.err);
+            new TaskTreeEncoder().encode(session, System.err);
         }
 
@@ -86,5 +90,29 @@
             
             if (taskInstanceSpec != null) {
-                assertTaskInstanceList(taskInstanceSpec, taskInstances, tasks);
+                assertUserSession(taskInstanceSpec, session, tasks);
+            }
+        }
+    }
+
+    /**
+     *
+     */
+    public void assertTaskInstance(String userSessionSpec, ITaskInstance taskInstance) {
+        if (doTrace) {
+            new TaskTreeEncoder().encode(taskInstance, System.err);
+        }
+
+        TaskSpec taskInstanceSpec = null;
+
+        Matcher taskMatcher = taskPattern.matcher(userSessionSpec);
+        
+        Map<String, ITask> tasks = new HashMap<String, ITask>();
+
+        while (taskMatcher.find()) {
+
+            taskInstanceSpec = parseTaskInstance(taskMatcher);
+            
+            if (taskInstanceSpec != null) {
+                assertTaskInstance(taskInstanceSpec, taskInstance, tasks);
             }
         }
@@ -154,6 +182,6 @@
             }
             
-            List<ITaskInstance> expectedChildren = expected.getChildren();
-            List<ITaskInstance> checkedChildren = checked.getChildren();
+            List<ITaskInstance> expectedChildren = getChildren(expected);
+            List<ITaskInstance> checkedChildren = getChildren(checked);
             
             if ((expectedChildren != null) && (expectedChildren.size() > 0)) {
@@ -241,28 +269,53 @@
      * @param taskMapCopy
      */
-    private void assertTaskInstanceList(TaskSpec           taskSpec,
-                                        ITaskInstanceList  taskInstances,
-                                        Map<String, ITask> tasks)
+    private void assertUserSession(TaskSpec           taskSpec,
+                                   IUserSession       session,
+                                   Map<String, ITask> tasks)
     {
         if (doTrace) {
-            System.err.println("\ncomparing " + taskSpec.type + " with " + taskInstances + "\n");
-        }
-
-        if ((taskInstances instanceof IUserSession) && (!"UserSession".equals(taskSpec.type))) {
+            System.err.println("\ncomparing " + taskSpec.type + " with " + session + "\n");
+        }
+
+        if (!"UserSession".equals(taskSpec.type)) {
             fail("can not compare a task instance with a user session");
         }
-        else if ((!(taskInstances instanceof IUserSession)) &&
-                 (!"TaskInstances".equals(taskSpec.type)))
-        {
+        
+        List<ITaskInstance> children = session.getExecutedTasks();
+        
+        if (taskSpec.children.length != children.size()) {
+            fail("number of task instances in task instance list does not match");
+        }
+        
+        for (int i = 0; i < children.size(); i++) {
+            TaskSpec childSpec = taskSpec.children[i];
+            assertTrue(taskSpecEqualsTaskInstance(childSpec, children.get(i), tasks));
+        }
+    }
+
+    /**
+     * @param task
+     * @param taskMapCopy
+     */
+    private void assertTaskInstance(TaskSpec           taskSpec,
+                                    ITaskInstance      taskInstance,
+                                    Map<String, ITask> tasks)
+    {
+        if (doTrace) {
+            System.err.println("\ncomparing " + taskSpec.type + " with " + taskInstance + "\n");
+        }
+
+        if (!"TaskInstances".equals(taskSpec.type)) {
             fail("can not compare a task instance with a task instance list");
         }
         
-        if (taskSpec.children.length != taskInstances.size()) {
+        List<ITaskInstance> children = getChildren(taskInstance);
+        
+        if (taskSpec.children.length != children.size()) {
             fail("number of task instances in task instance list does not match");
         }
         
-        for (int i = 0; i < taskInstances.size(); i++) {
+        for (int i = 0; i < children.size(); i++) {
             TaskSpec childSpec = taskSpec.children[i];
-            assertTrue(taskSpecEqualsTaskInstance(childSpec, taskInstances.get(i), tasks));
+            assertTrue(taskSpecEqualsTaskInstance(childSpec, children.get(i), tasks));
         }
     }
@@ -284,6 +337,6 @@
         if (("Event".equals(taskSpec.type) && (!(task instanceof IEventTask))) ||
             ("TextInputEvent".equals(taskSpec.type) &&
-             ((!(task instanceof IEventTask)) ||
-              (!(((IEventTask) task).getEventType() instanceof TextInput)))) ||
+             ((!(taskInstance instanceof IEventTaskInstance)) ||
+              (!(((IEventTaskInstance) taskInstance).getEvent().getType() instanceof TextInput)))) ||
             ("Sequence".equals(taskSpec.type) && (!(task instanceof ISequence))) ||
             ("Selection".equals(taskSpec.type) && (!(task instanceof ISelection))) ||
@@ -306,5 +359,7 @@
 
         if ("TextInputEvent".equals(taskSpec.type)) {
-            TextInput eventType = (TextInput) ((IEventTask) task).getEventType();
+            TextInput eventType = (TextInput)
+                ((IEventTaskInstance) taskInstance).getEvent().getType();
+            
             if ((taskSpec.additionalInfo != null) &&
                 !"".equals(taskSpec.additionalInfo) &&
@@ -319,6 +374,7 @@
             }
         }
-        else if ((task instanceof IEventTask) && (((IEventTask) task).getEventType() != null) &&
-                 (!taskSpec.name.equals(((IEventTask) task).getEventType().getName())))
+        else if ((task instanceof IEventTask) &&
+                 (((IEventTaskInstance) taskInstance).getEvent().getType() != null) &&
+                 (!taskSpec.name.equals(((IEventTaskInstance) taskInstance).getEvent().getType().getName())))
         {
             // simple event names do not match. But what about the event name in
@@ -328,8 +384,9 @@
                     (!"".equals(taskSpec.additionalInfo) ? " " + taskSpec.additionalInfo : "");
 
-            if (!complexName.equals(((IEventTask) task).getEventType().getName())) {
+            if (!complexName.equals(((IEventTaskInstance) taskInstance).getEvent().getType().getName())) {
                 if (doTrace) {
-                    System.err.println("event names do not match: " + taskSpec.name + " != " +
-                                       ((IEventTask) task).getEventType().getName() + "\n");
+                    System.err.println
+                        ("event names do not match: " + taskSpec.name + " != " +
+                         ((IEventTaskInstance) taskInstance).getEvent().getType().getName() + "\n");
                 }
                 return false;
@@ -358,7 +415,9 @@
         }
 
-        if (((taskSpec.children == null) && (taskInstance.getChildren().size() > 0)) ||
+        List<ITaskInstance> children = getChildren(taskInstance);
+        
+        if (((taskSpec.children == null) && (children.size() > 0)) ||
             ((taskSpec.children != null) &&
-             (taskSpec.children.length != taskInstance.getChildren().size())))
+             (taskSpec.children.length != children.size())))
         {
             if (doTrace) {
@@ -366,14 +425,13 @@
                     ("numbers of children do not match: " +
                      (taskSpec.children == null ? "0" : taskSpec.children.length) + " != " +
-                     (taskInstance.getChildren() == null ? "0" :
-                          taskInstance.getChildren().size()) + "\n");
+                     (children == null ? "0" : children.size()) + "\n");
             }
             return false;
         }
 
-        Iterator<ITaskInstance> children = taskInstance.getChildren().iterator();
+        Iterator<ITaskInstance> childrenIterator = children.iterator();
         if (taskSpec.children != null) {
             for (TaskSpec child : taskSpec.children) {
-                if (!taskSpecEqualsTaskInstance(child, children.next(), tasks)) {
+                if (!taskSpecEqualsTaskInstance(child, childrenIterator.next(), tasks)) {
                     if (doTrace) {
                         System.err.println("one of the children does not match\n");
@@ -384,5 +442,5 @@
         }
 
-        if (!children.hasNext()) {
+        if (!childrenIterator.hasNext()) {
             if (doTrace) {
                 System.err.println("nodes match\n");
@@ -398,4 +456,30 @@
     }
     
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param taskInstance
+     * @return
+     */
+    private List<ITaskInstance> getChildren(ITaskInstance taskInstance) {
+        List<ITaskInstance> result = new LinkedList<ITaskInstance>();
+        
+        if (taskInstance instanceof ITaskInstanceList) {
+            for (ITaskInstance child : (ITaskInstanceList) taskInstance) {
+                result.add(child);
+            }
+        }
+        else if (taskInstance instanceof ISelectionInstance) {
+            result.add(((ISelectionInstance) taskInstance).getChild());
+        }
+        else if (taskInstance instanceof IOptionalInstance) {
+            result.add(((IOptionalInstance) taskInstance).getChild());
+        }
+        
+        return result;
+    }
+
     /**
      *
Index: /trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/tasktrees/TaskTreeDecoder.java
===================================================================
--- /trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/tasktrees/TaskTreeDecoder.java	(revision 1293)
+++ /trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/tasktrees/TaskTreeDecoder.java	(revision 1294)
@@ -26,8 +26,14 @@
 import de.ugoe.cs.autoquest.eventcore.StringEventType;
 import de.ugoe.cs.autoquest.eventcore.gui.TextInput;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptionalInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
@@ -173,14 +179,28 @@
             }
             else {
-            	task = createUserInteractionTask(matcher);
+            	task = createUserInteractionTaskInstance(matcher).getTask();
             }  
             tasks.put(id, task);
         }
         
-        if ((matcher.group(5) != null) && (!"".equals(matcher.group(5).trim()))) {
-            taskBuilder.setDescription(task, matcher.group(5).trim());
-        }
-
-        ITaskInstance instance = taskFactory.createNewTaskInstance(task);
+        ITaskInstance instance;
+        
+        if (task instanceof ISequence) {
+            instance = taskFactory.createNewTaskInstance((ISequence) task);
+        }
+        else if (task instanceof ISelection) {
+            instance = taskFactory.createNewTaskInstance((ISelection) task);
+        }
+        else if (task instanceof IIteration) {
+            instance = taskFactory.createNewTaskInstance((IIteration) task);
+        }
+        else if (task instanceof IOptional) {
+            instance = taskFactory.createNewTaskInstance((IOptional) task);
+        }
+        else {
+            instance = taskFactory.createNewTaskInstance
+                 ((IEventTask) task,
+                  ((IEventTaskInstance) task.getInstances().iterator().next()).getEvent());
+        }  
         
         while (taskMatcher.find() && !"}".equals(taskMatcher.group(0))) {
@@ -216,5 +236,16 @@
             }
             
-            taskBuilder.addChild(instance, childInstance);
+            if (instance instanceof ISequenceInstance) {
+                taskBuilder.addChild((ISequenceInstance) instance, childInstance);
+            }
+            else if (instance instanceof ISelectionInstance) {
+                taskBuilder.setChild((ISelectionInstance) instance, childInstance);
+            }
+            else if (instance instanceof IIterationInstance) {
+                taskBuilder.addChild((IIterationInstance) instance, childInstance);
+            }
+            else if (instance instanceof IOptionalInstance) {
+                taskBuilder.setChild((IOptionalInstance) instance, childInstance);
+            }
         }
 
@@ -229,14 +260,16 @@
      * @return
      */
-    private ITask createUserInteractionTask(Matcher matcher) {
+    private ITaskInstance createUserInteractionTaskInstance(Matcher matcher) {
         String evenType = matcher.group(1);
         String id = matcher.group(2);
-        IEventTarget evenTarget = targets.get(id);
-        if (evenTarget == null) {
-            evenTarget = determineTarget(evenType, id, matcher.group(4));
-            targets.put(id, evenTarget);
+        IEventTarget eventTarget = targets.get(id);
+        if (eventTarget == null) {
+            eventTarget = determineTarget(evenType, id, matcher.group(4));
+            targets.put(id, eventTarget);
         }
         IEventType eventType = determineType(evenType, matcher.group(4));
-        return taskFactory.createNewEventTask(eventType, evenTarget);
+        IEventTask task = taskFactory.createNewEventTask(eventType + " --> " + eventTarget);
+        
+        return taskFactory.createNewTaskInstance(task, new Event(eventType, eventTarget));
     }
 
Index: /trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/tasktrees/TaskTreeEncoder.java
===================================================================
--- /trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/tasktrees/TaskTreeEncoder.java	(revision 1293)
+++ /trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/tasktrees/TaskTreeEncoder.java	(revision 1294)
@@ -24,9 +24,13 @@
 import java.util.Map;
 
+import de.ugoe.cs.autoquest.eventcore.Event;
 import de.ugoe.cs.autoquest.eventcore.gui.TextInput;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptionalInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
@@ -141,11 +145,5 @@
         else if (task instanceof IEventTask) {
             out.print(indent);
-            out.print(((IEventTask) task).getEventType());
-            out.print(" ");
-            out.print(((IEventTask) task).getEventTarget().getStringIdentifier());
-//            if (((IEventTask) node).getEventTarget() instanceof IGUIElement) {
-//              out.print(" ");
-//              out.print(((IGUIElement) ((IEventTask) node).getEventTarget()).getSpecification());
-//            }
+            out.print(task);
         }
         else {
@@ -154,6 +152,15 @@
 
         int i = 0;
-        for (ITaskInstance child : taskInstance.getChildren()) {
-            encode(child, out, indent + "  ", i++);
+        
+        if (taskInstance instanceof ITaskInstanceList) {
+            for (ITaskInstance child : (ITaskInstanceList) taskInstance) {
+                encode(child, out, indent + "  ", i++);
+            }
+        }
+        else if (taskInstance instanceof ISelectionInstance) {
+            encode(((ISelectionInstance) taskInstance).getChild(), out, indent + "  ", i++);
+        }
+        else if (taskInstance instanceof IOptionalInstance) {
+            encode(((IOptionalInstance) taskInstance).getChild(), out, indent + "  ", i++);
         }
 
@@ -221,5 +228,6 @@
         }
         else if (task instanceof IEventTask) {
-            if (((IEventTask) task).getEventType() instanceof TextInput) {
+            Event event = ((IEventTaskInstance) taskInstance).getEvent();
+            if (event.getType() instanceof TextInput) {
                 if (id == null) {
                     id = "textInput" + typeCounters[3]++;
@@ -229,5 +237,5 @@
                 System.out.print(id);
                 System.out.print(" \"");
-                System.out.print(((TextInput) ((IEventTask) task).getEventType()).getEnteredText());
+                System.out.print(((TextInput) event.getType()).getEnteredText());
                 System.out.print("\"");
             }
@@ -240,5 +248,5 @@
                 System.out.print(id);
                 System.out.print(' ');
-                System.out.print(((IEventTask) task).getEventType().getName());
+                System.out.print(event.getType().getName());
             }
             System.out.print(" {}\" +");
@@ -250,6 +258,16 @@
         taskIds.put(task, id);
         
-        for (ITaskInstance child : taskInstance.getChildren()) {
-            dumpTaskInstanceAsCheckString(child, typeCounters, taskIds, indent + "  ");
+        if (taskInstance instanceof ITaskInstanceList) {
+            for (ITaskInstance child : (ITaskInstanceList) taskInstance) {
+                dumpTaskInstanceAsCheckString(child, typeCounters, taskIds, indent + "  ");
+            }
+        }
+        else if (taskInstance instanceof ISelectionInstance) {
+            dumpTaskInstanceAsCheckString
+                (((ISelectionInstance) taskInstance).getChild(), typeCounters, taskIds, indent + "  ");
+        }
+        else if (taskInstance instanceof IOptionalInstance) {
+            dumpTaskInstanceAsCheckString
+                (((IOptionalInstance) taskInstance).getChild(), typeCounters, taskIds, indent + "  ");
         }
 
Index: /trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/tasktrees/TaskTreeValidator.java
===================================================================
--- /trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/tasktrees/TaskTreeValidator.java	(revision 1293)
+++ /trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/tasktrees/TaskTreeValidator.java	(revision 1294)
@@ -20,8 +20,13 @@
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptionalInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
@@ -66,9 +71,10 @@
             
             assertEquals("number of children of sequence instance must match sequence model",
-                         taskInstance.size(), task.getChildren().size());
+                         ((ISequenceInstance) taskInstance).size(), task.getChildren().size());
             
-            for (int i = 0; i < taskInstance.size(); i++) {
-                assertNotNull("sequence instance child " + i + " was null", taskInstance.get(i));
-                ITask childTask = taskInstance.get(i).getTask();
+            for (int i = 0; i < ((ISequenceInstance) taskInstance).size(); i++) {
+                assertNotNull("sequence instance child " + i + " was null",
+                              ((ISequenceInstance) taskInstance).get(i));
+                ITask childTask = ((ISequenceInstance) taskInstance).get(i).getTask();
                 assertSame("task of sequence child " + i + " does not match sequence model",
                            childTask, task.getChildren().get(i));
@@ -78,6 +84,6 @@
             ISelection task = (ISelection) taskInstance.getTask();
             
-            assertEquals
-                ("number of children of selection instance must be 1", 1, taskInstance.size());
+            assertNotNull("number of children of selection instance must be 1",
+                          ((ISelectionInstance) taskInstance).getChild());
             assertTrue
                 ("number of children of selection must be larger 0", task.getChildren().size() > 0);
@@ -90,5 +96,5 @@
                 assertFalse("child of selection model must not be an optional",
                             childTask instanceof IOptional);
-                if (childTask.equals(taskInstance.get(0).getTask())) {
+                if (childTask.equals(((ISelectionInstance) taskInstance).getChild().getTask())) {
                     found = true;
                     break;
@@ -107,8 +113,9 @@
                         childTask instanceof IOptional);
             
-            for (int i = 0; i < taskInstance.size(); i++) {
-                assertNotNull("iteration instance child " + i + " was null", taskInstance.get(i));
+            for (int i = 0; i < ((IIterationInstance) taskInstance).size(); i++) {
+                assertNotNull("iteration instance child " + i + " was null",
+                              ((IIterationInstance) taskInstance).get(i));
                 assertSame("task of iteration child " + i + " does not match iteration model",
-                           childTask, taskInstance.get(i).getTask());
+                           childTask, ((IIterationInstance) taskInstance).get(i).getTask());
             }
         }
@@ -119,18 +126,15 @@
                         childTask instanceof IOptional);
             
-            assertEquals
-                ("number of children of optional instance must be 1", 1, taskInstance.size());
+            assertNotNull("number of children of optional instance must be 1",
+                          ((IOptionalInstance) taskInstance).getChild());
             
             assertEquals("task of optional child does not match optional model",
-                         childTask, taskInstance.get(0).getTask());
+                         childTask, ((IOptionalInstance) taskInstance).getChild().getTask());
         }
         else if (taskInstance.getTask() instanceof IEventTask) {
             IEventTask task = (IEventTask) taskInstance.getTask();
             assertNotNull("event task model must not be null", task);
-            assertNotNull("event type of event task model must not be null", task.getEventType());
-            assertNotNull
-                ("event target of event task model must not be null", task.getEventTarget());
-
-            assertEquals("event task instance must not have children", 0, taskInstance.size());
+            assertNotNull("event of event task instance must not be null",
+                          ((IEventTaskInstance) taskInstance).getEvent());
         }
         else {
@@ -138,6 +142,14 @@
         }
         
-        for (ITaskInstance child : taskInstance) {
-            validate(child);
+        if (taskInstance instanceof ITaskInstanceList) {
+            for (ITaskInstance child : (ITaskInstanceList) taskInstance) {
+                validate(child);
+            }
+        }
+        else if (taskInstance instanceof ISelectionInstance) {
+            validate(((ISelectionInstance) taskInstance).getChild());
+        }
+        else if (taskInstance instanceof IOptionalInstance) {
+            validate(((IOptionalInstance) taskInstance).getChild());
         }
     }
Index: /trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt/ShowTaskTreeDialog.java
===================================================================
--- /trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt/ShowTaskTreeDialog.java	(revision 1293)
+++ /trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt/ShowTaskTreeDialog.java	(revision 1294)
@@ -18,8 +18,6 @@
 import java.util.Collections;
 import java.util.Comparator;
-import java.util.HashSet;
 import java.util.LinkedList;
 import java.util.List;
-import java.util.Set;
 
 import org.eclipse.swt.SWT;
@@ -39,4 +37,6 @@
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IMarkingTemporalRelationship;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptionalInstance;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IStructuringTemporalRelationship;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
@@ -173,11 +173,32 @@
      * convenience method for creating the display of the instances
      */
-    private void buildInstanceTree(TreeItem currentParent, ITaskInstanceList taskInstanceList) {
+    private void buildInstanceTree(TreeItem currentParent, IUserSession session) {
         TreeItem child = new TreeItem(currentParent, SWT.NULL);
-        child.setText(taskInstanceList.toString());
-        child.setData(taskInstanceList);
-        
-        for (ITaskInstanceList childTask : taskInstanceList) {
-            buildInstanceTree(child, childTask);
+        child.setText(session.toString());
+        child.setData(session);
+        
+        for (ITaskInstance childInstance : session) {
+            buildInstanceTree(child, childInstance);
+        }
+    }
+
+    /**
+     * convenience method for creating the display of the instances
+     */
+    private void buildInstanceTree(TreeItem currentParent, ITaskInstance taskInstance) {
+        TreeItem child = new TreeItem(currentParent, SWT.NULL);
+        child.setText(taskInstance.toString());
+        child.setData(taskInstance);
+        
+        if (taskInstance instanceof ITaskInstanceList) {
+            for (ITaskInstance childInstance : (ITaskInstanceList) taskInstance) {
+                buildInstanceTree(child, childInstance);
+            }
+        }
+        else if (taskInstance instanceof ISelectionInstance) {
+            buildInstanceTree(child, ((ISelectionInstance) taskInstance).getChild());
+        }
+        else if (taskInstance instanceof IOptionalInstance) {
+            buildInstanceTree(child, ((IOptionalInstance) taskInstance).getChild());
         }
     }
@@ -229,23 +250,23 @@
 
     /**
-     * reduces the list of tasks in a model so that it only contains root nodes and that it is 
-     * sorted starting with the most complex task first 
+     * sort the list of tasks so that it contain those occurring most often first
      */
     private List<ITask> createSortedTaskList(Collection<ITask> tasks) {
-        Set<ITask> resultSet = new HashSet<ITask>(tasks);
+        /*Set<ITask> resultSet = new HashSet<ITask>(tasks);
         
         for (ITask task : tasks) {
             removeChildren(task, resultSet);
-        }
-        
-        List<ITask> result = new LinkedList<ITask>(resultSet);
+        }*/
+        
+        List<ITask> result = new LinkedList<ITask>(tasks);
         
         Collections.sort(result, new Comparator<ITask>() {
             @Override
             public int compare(ITask task1, ITask task2) {
-                return depth(task2) - depth(task1);
-            }
-
-            private int depth(ITask task) {
+                return taskModel.getTaskInfo(task2).getCount() -
+                    taskModel.getTaskInfo(task1).getCount();
+            }
+
+            /*private int depth(ITask task) {
                 int maxChildDepth = 0;
                 if (task instanceof IStructuringTemporalRelationship) {
@@ -259,5 +280,5 @@
                 }
                 return maxChildDepth + 1;
-            }
+            }*/
         });
         
@@ -268,5 +289,5 @@
      * convenience method for removed all non root tasks of the provided list
      */
-    private void removeChildren(ITask task, Set<ITask> result) {
+    /*private void removeChildren(ITask task, Set<ITask> result) {
         if (task instanceof IStructuringTemporalRelationship) {
             for (ITask child : ((IStructuringTemporalRelationship) task).getChildren()) {
@@ -277,5 +298,5 @@
             result.remove(((IMarkingTemporalRelationship) task).getMarkedTask());
         }
-    }
+    }*/
 
     /**
@@ -338,5 +359,5 @@
     private void createTreeItemFor(ITask task, TreeItem parent) {
         TreeItem item = new TreeItem(parent, SWT.NULL);
-        item.setText(task.toString());
+        item.setText(task.toString() + " (" + taskModel.getTaskInfo(task).getCount() + ")");
         item.setData(task);
         
