source: trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskComparisonRule.java @ 1183

Last change on this file since 1183 was 1146, checked in by pharms, 11 years ago
  • complete refactoring of task tree model with a separation of task models and task instances
  • appropriate adaptation of task tree generation process
  • appropriate adaptation of commands and task tree visualization
  • Property svn:executable set to *
File size: 2.8 KB
Line 
1//   Copyright 2012 Georg-August-Universität Göttingen, Germany
2//
3//   Licensed under the Apache License, Version 2.0 (the "License");
4//   you may not use this file except in compliance with the License.
5//   You may obtain a copy of the License at
6//
7//       http://www.apache.org/licenses/LICENSE-2.0
8//
9//   Unless required by applicable law or agreed to in writing, software
10//   distributed under the License is distributed on an "AS IS" BASIS,
11//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//   See the License for the specific language governing permissions and
13//   limitations under the License.
14
15package de.ugoe.cs.autoquest.tasktrees.taskequality;
16
17import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
18
19/**
20 * <p>
21 * A task comparison rule is used by the {@link TaskEqualityRuleManager} to compare tasks with
22 * each other. It provides several methods to be called for a comparison.
23 * </p>
24 *
25 * @version $Revision: $ $Date: 19.02.2012$
26 * @author 2012, last modified by $Author: patrick$
27 */
28public interface TaskComparisonRule {
29
30    /**
31     * <p>
32     * checks if the rule is applicable for comparing the two provided tasks
33     * </p>
34     *
35     * @param task1 the first task to compare
36     * @param task2 the second task to compare
37     *
38     * @return true, if the rule is applicable, false else
39     */
40    public boolean isApplicable(ITask task1, ITask task2);
41
42    /**
43     * <p>
44     * checks, if the provided tasks are lexically equal
45     * </p>
46     *
47     * @param task1 the first task to compare
48     * @param task2 the second task to compare
49     *
50     * @return true, if the tasks are equal, false else
51     */
52    public boolean areLexicallyEqual(ITask task1, ITask task2);
53
54    /**
55     * <p>
56     * checks, if the provided tasks are syntactically equal
57     * </p>
58     *
59     * @param task1 the first task to compare
60     * @param task2 the second task to compare
61     *
62     * @return true, if the tasks are equal, false else
63     */
64    public boolean areSyntacticallyEqual(ITask task1, ITask task2);
65
66    /**
67     * <p>
68     * checks, if the provided tasks are semantically equal
69     * </p>
70     *
71     * @param task1 the first task to compare
72     * @param task2 the second task to compare
73     *
74     * @return true, if the tasks are equal, false else
75     */
76    public boolean areSemanticallyEqual(ITask task1, ITask task2);
77
78    /**
79     * <p>
80     * compares two tasks with each other. The result of the method is either a task equality or
81     * null. If it is null, it means, that the rule is not able to correctly compare the two given
82     * tasks
83     * </p>
84     *
85     * @param task1 the first task to compare
86     * @param task2 the second task to compare
87     *
88     * @return as described
89     */
90    public TaskEquality compare(ITask task1, ITask task2);
91
92}
Note: See TracBrowser for help on using the repository browser.