ida.pelab.prt.patternrecognitionTool
Class StructuralComparison
java.lang.Object
ida.pelab.prt.patternrecognitionTool.StructuralComparison
public class StructuralComparison
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StructuralComparison
public StructuralComparison()
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: