daikon.diff
Class MatchCountVisitor2
Object
DepthFirstVisitor
PrintAllVisitor
MatchCountVisitor2
- All Implemented Interfaces:
- Visitor
public class MatchCountVisitor2
- extends PrintAllVisitor
MatchCountVisitor is a visitor that almost does the opposite of
PrintDifferingInvariantsVisitor. MatchCount prints invariant pairs
if they are the same, and only if they are a part of a conditional ppt.
The visitor also accumulates some state during its traversal for statistics,
and can report the match precision.
|
Method Summary |
double |
calcPrecision()
|
double |
calcRecall()
|
void |
printFinal()
Prints the results of the correct set in a human-readable format |
protected boolean |
shouldPrint(Invariant inv1,
Invariant inv2)
Returns true if the pair of invariants should be printed |
void |
visit(InvNode node)
Anytime a consequent matches a target, we should score it as correct |
void |
visit(PptNode node)
Prints the pair of program points, and all the invariants
contained within them. |
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MatchCountVisitor2
public MatchCountVisitor2(PrintStream ps,
boolean verbose,
boolean printEmptyPpts)
visit
public void visit(PptNode node)
- Description copied from class:
PrintAllVisitor
- Prints the pair of program points, and all the invariants
contained within them.
- Specified by:
visit in interface Visitor- Overrides:
visit in class PrintAllVisitor
visit
public void visit(InvNode node)
- Anytime a consequent matches a target, we should score it as correct
- Specified by:
visit in interface Visitor- Overrides:
visit in class PrintAllVisitor
shouldPrint
protected boolean shouldPrint(Invariant inv1,
Invariant inv2)
- Returns true if the pair of invariants should be printed
calcRecall
public double calcRecall()
calcPrecision
public double calcPrecision()
printFinal
public void printFinal()
- Prints the results of the correct set in a human-readable format