daikon.diff
Class ConsequentExtractorVisitor
Object
DepthFirstVisitor
ConsequentExtractorVisitor
- All Implemented Interfaces:
- Visitor
public class ConsequentExtractorVisitor
- extends DepthFirstVisitor
ConsequentExtractorVisitor is a visitor that
takes in RootNode tree used by the other visitors in Diff
and only modifies the first inv tree out of the pair of two
inv trees (the second tree is never read or modified).
The goal is to take the right hand side of any implication
and extract it for later use. The implementation completely replaces
the previous inv tree with the a new inv tree. The new inv tree
contains only the extracted consequents of the original inv tree.
|
Method Summary |
protected boolean |
shouldPrint(Invariant inv1,
Invariant inv2)
Returns true if the pair of invariants should be printed,
depending on their type, relationship, and printability. |
void |
visit(InvNode node)
The idea is to check if the node is an Implication Invariant.If not,
immediately remove the invariant. |
void |
visit(PptNode node)
|
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConsequentExtractorVisitor
public ConsequentExtractorVisitor()
visit
public void visit(PptNode node)
- Specified by:
visit in interface Visitor- Overrides:
visit in class DepthFirstVisitor
visit
public void visit(InvNode node)
- The idea is to check if the node is an Implication Invariant.If not,
immediately remove the invariant. Otherwise, extract the Consequent,
remove the Implication, and then add the consequent to the list.
- Specified by:
visit in interface Visitor- Overrides:
visit in class DepthFirstVisitor
shouldPrint
protected boolean shouldPrint(Invariant inv1,
Invariant inv2)
- Returns true if the pair of invariants should be printed,
depending on their type, relationship, and printability.