ida.pelab.prt.patternrecognitionTool
Class StructuralComparison

java.lang.Object
  extended by ida.pelab.prt.patternrecognitionTool.StructuralComparison

public class StructuralComparison
extends java.lang.Object


Constructor Summary
StructuralComparison()
           
 
Method Summary
static boolean compare(PatternStructure pattern, cetus.hir.Traversable subtreeRoot, java.util.ArrayList<MatchedInstance> patternList)
          compares the constraints of the pattern against the structure of the candidate sub-tree.
static boolean compareHorizontalStructure(PatternStructure pattern, cetus.hir.Traversable subtreeRoot, java.util.ArrayList<MatchedInstance> patternList)
          Checks a certain sub-tree against all the horizontal patterns.
static java.util.ArrayList<PatternInstanceParameter> mapAllParameterInstance(PatternStructure pattern, java.lang.String referenceString, java.util.ArrayList<MatchedInstance> patternList)
           
static cetus.hir.Traversable mapParameter(java.lang.String referenceString, java.util.ArrayList<MatchedInstance> patternList)
           
static PatternInstanceParameter mapParameterInstance(PatternStructure pattern, java.lang.String referenceString, java.util.ArrayList<MatchedInstance> patternList)
           
static RuleParameterType mapType(cetus.hir.Traversable node)
          maps the type of a Traversable class node to one of the defined types in the RuleParameterType enumeration.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StructuralComparison

public StructuralComparison()
Method Detail

compare

public static boolean compare(PatternStructure pattern,
                              cetus.hir.Traversable subtreeRoot,
                              java.util.ArrayList<MatchedInstance> patternList)
compares the constraints of the pattern against the structure of the candidate sub-tree.

Parameters:
pattern -
subtreeRoot -
patternList -
Returns:

mapParameter

public static cetus.hir.Traversable mapParameter(java.lang.String referenceString,
                                                 java.util.ArrayList<MatchedInstance> patternList)

mapParameterInstance

public static PatternInstanceParameter mapParameterInstance(PatternStructure pattern,
                                                            java.lang.String referenceString,
                                                            java.util.ArrayList<MatchedInstance> patternList)

mapAllParameterInstance

public static java.util.ArrayList<PatternInstanceParameter> mapAllParameterInstance(PatternStructure pattern,
                                                                                    java.lang.String referenceString,
                                                                                    java.util.ArrayList<MatchedInstance> patternList)

mapType

public static RuleParameterType mapType(cetus.hir.Traversable node)
maps the type of a Traversable class node to one of the defined types in the RuleParameterType enumeration.

Parameters:
node -
Returns:

compareHorizontalStructure

public static boolean compareHorizontalStructure(PatternStructure pattern,
                                                 cetus.hir.Traversable subtreeRoot,
                                                 java.util.ArrayList<MatchedInstance> patternList)
Checks a certain sub-tree against all the horizontal patterns.

Parameters:
pattern -
subtreeRoot -
patternList -
Returns: