Ignore:
Timestamp:
03/18/13 11:54:15 (11 years ago)
Author:
pharms
Message:
  • complete refactoring of task detection
  • many performance improvements in task detection
  • improved merging of sequences using Myers diff algorithm
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TemporalRelationshipRuleManager.java

    r1113 r1127  
    157157 
    158158        treeScopeRules = new TemporalRelationshipRule[] { 
     159            new SequenceForTaskDetectionRule 
     160                (nodeEqualityRuleManager, NodeEquality.SEMANTICALLY_EQUAL, 
     161                 taskTreeNodeFactory, taskTreeBuilder), 
     162            /*new DefaultTaskSequenceDetectionRule 
     163                (nodeEqualityRuleManager, NodeEquality.SYNTACTICALLY_EQUAL, 
     164                 taskTreeNodeFactory, taskTreeBuilder), 
    159165            new DefaultTaskSequenceDetectionRule 
    160                 (nodeEqualityRuleManager, NodeEquality.SEMANTICALLY_EQUAL, 
    161                  taskTreeNodeFactory, taskTreeBuilder) 
     166                (nodeEqualityRuleManager, NodeEquality.LEXICALLY_EQUAL, 
     167                 taskTreeNodeFactory, taskTreeBuilder),*/ 
     168            /*new TreeScopeWrapperRule 
     169                (new DefaultIterationDetectionRule 
     170                    (nodeEqualityRuleManager, NodeEquality.LEXICALLY_EQUAL, 
     171                     taskTreeNodeFactory, taskTreeBuilder)), 
     172            new TreeScopeWrapperRule 
     173                (new DefaultIterationDetectionRule 
     174                    (nodeEqualityRuleManager, NodeEquality.SYNTACTICALLY_EQUAL, 
     175                     taskTreeNodeFactory, taskTreeBuilder)), 
     176            new TreeScopeWrapperRule 
     177                (new DefaultIterationDetectionRule 
     178                    (nodeEqualityRuleManager, NodeEquality.SEMANTICALLY_EQUAL, 
     179                     taskTreeNodeFactory, taskTreeBuilder))*/ 
    162180        }; 
    163181         
     
    165183 
    166184        nodeScopeRules = new TemporalRelationshipRule[] { 
    167             //new DefaultGuiElementSequenceDetectionRule(taskTreeNodeFactory, taskTreeBuilder), 
    168             //new DefaultEventTargetSequenceDetectionRule(taskTreeNodeFactory, taskTreeBuilder), 
     185            //new SequenceOnGuiElementDetectionRule(taskTreeNodeFactory, taskTreeBuilder), 
     186            //new EventSequenceOnSameTargetDetectionRule(taskTreeNodeFactory, taskTreeBuilder), 
    169187            new TrackBarSelectionDetectionRule 
    170188                (nodeEqualityRuleManager, taskTreeNodeFactory, taskTreeBuilder), 
    171189            //new DefaultGuiEventSequenceDetectionRule(taskTreeNodeFactory, taskTreeBuilder), 
    172             new DefaultIterationDetectionRule 
    173                 (nodeEqualityRuleManager, NodeEquality.LEXICALLY_EQUAL, 
    174                  taskTreeNodeFactory, taskTreeBuilder), 
    175             new DefaultIterationDetectionRule 
    176                 (nodeEqualityRuleManager, NodeEquality.SYNTACTICALLY_EQUAL, 
    177                  taskTreeNodeFactory, taskTreeBuilder), 
    178             new DefaultIterationDetectionRule 
    179                 (nodeEqualityRuleManager, NodeEquality.SEMANTICALLY_EQUAL, 
    180                  taskTreeNodeFactory, taskTreeBuilder) 
    181190        }; 
    182191 
     
    245254 
    246255                if ((result != null) && 
    247                     (result.getRuleApplicationStatus() == 
    248                      RuleApplicationStatus.RULE_APPLICATION_FINISHED)) 
     256                    (result.getRuleApplicationStatus() == RuleApplicationStatus.FINISHED)) 
    249257                { 
    250258                    Console.traceln 
     
    252260                    noOfRuleApplications++; 
    253261                     
    254                     dumpTask(parent, ""); 
     262                    //dumpTask(parent, ""); 
    255263 
    256264                    for (ITaskTreeNode newParent : result.getNewlyCreatedParentNodes()) { 
     
    261269            } 
    262270            while ((result != null) && 
    263                    (result.getRuleApplicationStatus() == 
    264                     RuleApplicationStatus.RULE_APPLICATION_FINISHED)); 
     271                   (result.getRuleApplicationStatus() == RuleApplicationStatus.FINISHED)); 
    265272 
    266273            if ((!finalize) && 
    267274                (result != null) && 
    268                 (result.getRuleApplicationStatus() == 
    269                  RuleApplicationStatus.RULE_APPLICATION_FEASIBLE)) 
     275                (result.getRuleApplicationStatus() == RuleApplicationStatus.FEASIBLE)) 
    270276            { 
    271277                // in this case, don't go on applying rules, which should not be applied yet 
     
    275281 
    276282        if (noOfRuleApplications <= 0) { 
    277             Console.traceln(Level.INFO, logIndent + "no rules applied --> no temporal " + 
     283            Console.traceln(Level.FINE, logIndent + "no rules applied --> no temporal " + 
    278284                            "relationship generated"); 
    279285        } 
Note: See TracChangeset for help on using the changeset viewer.