randoop.experiments
Class CovWitnessHelperVisitor

Object
  extended by CovWitnessHelperVisitor
All Implemented Interfaces:
ExecutionVisitor

public class CovWitnessHelperVisitor
extends Object
implements ExecutionVisitor

This class is only used by the branch-directed generation research project. Records the branches covered after executing all-but-last method call in a sequence. ASSUMPTIONS: 1. Coverage has been cleared before executing the sequence. 2. The statements in a sequence are all executed and visited from beginning to end. This visitor will not work properly with the naive generator that backtracks during execution.


Constructor Summary
Constructor and Description
CovWitnessHelperVisitor(CodeCoverageTracker tracker)
           
 
Method Summary
Modifier and Type Method and Description
 void initialize(ExecutableSequence executableSequence)
          Called before execution of a sequence, to allow the visitor to perform any initialization steps required before execution.
 void visitAfter(ExecutableSequence sequence, int idx)
          Invoked by ExecutableSequence.execute after the i-th statement executes.
 void visitBefore(ExecutableSequence sequence, int i)
          Invoked by ExecutableSequence.execute before the i-th statement executes.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CovWitnessHelperVisitor

public CovWitnessHelperVisitor(CodeCoverageTracker tracker)
Parameters:
tracker - the classes that are coverage-instrumented.
Method Detail

initialize

public void initialize(ExecutableSequence executableSequence)
Description copied from interface: ExecutionVisitor
Called before execution of a sequence, to allow the visitor to perform any initialization steps required before execution.

Specified by:
initialize in interface ExecutionVisitor

visitAfter

public void visitAfter(ExecutableSequence sequence,
                       int idx)
Description copied from interface: ExecutionVisitor
Invoked by ExecutableSequence.execute after the i-th statement executes. Precondition: statements 0..i have been executed.

Specified by:
visitAfter in interface ExecutionVisitor

visitBefore

public void visitBefore(ExecutableSequence sequence,
                        int i)
Description copied from interface: ExecutionVisitor
Invoked by ExecutableSequence.execute before the i-th statement executes. Precondition: statements 0..i-1 have been executed.

Specified by:
visitBefore in interface ExecutionVisitor