public class TreeAutomatonRule
extends java.lang.Object
TreeAutomaton
.
A rule states that the automaton is to annotate with some assignedLabel
every node where
requiredChildAnnotations
pattern
Modifier and Type | Field and Description |
---|---|
static boolean |
verbose |
Constructor and Description |
---|
TreeAutomatonRule()
Class contructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getAssignedLabel()
Gets the annotation that is added to nodes to which the rule applies.
|
KahinaSimpleProperty |
getPattern()
Gets the tree node pattern required for the rule to apply.
|
java.util.Set<java.lang.Integer> |
getRequiredChildAnnotations()
Gets the set of child annotations required for the rule to apply.
|
boolean |
ruleApplies(TreeAutomaton aut,
int nodeID)
Check whether this rule applies to a tree node in an automaton at the current state.
|
void |
setAssignedLabel(int assignedLabel)
Sets the annotation to be added to nodes to which the rule applies.
|
void |
setPattern(KahinaSimpleProperty pattern)
Changes the tree node pattern required for the rule to apply.
|
void |
setRequiredChildAnnotations(java.util.Set<java.lang.Integer> requiredChildAnnotations)
Changes the set of child annotations required for the rule to apply.
|
java.lang.String |
toString() |
public TreeAutomatonRule()
public boolean ruleApplies(TreeAutomaton aut, int nodeID)
aut
- the automaton that is to be checked (monitoring some tree structure)nodeID
- the tree node to be checkedpublic java.lang.String toString()
toString
in class java.lang.Object
public void setRequiredChildAnnotations(java.util.Set<java.lang.Integer> requiredChildAnnotations)
requiredChildAnnotations
- a set of integers representing required child annotationspublic java.util.Set<java.lang.Integer> getRequiredChildAnnotations()
public void setPattern(KahinaSimpleProperty pattern)
pattern
- a tree node pattern defining when the rule is to applypublic KahinaSimpleProperty getPattern()
public void setAssignedLabel(int assignedLabel)
assignedLabel
- a stateID a matching node is to be annotated withpublic int getAssignedLabel()