public abstract class ListenerAdapter extends Object implements VMListener, SearchListener, PublisherExtension
Constructor and Description |
---|
ListenerAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
choiceGeneratorAdvanced(VM vm,
ChoiceGenerator<?> currentCG)
the next choice was requested from a previously registered ChoiceGenerator
NOTE - this notification happens before the KernelState is stored, i.e.
|
void |
choiceGeneratorProcessed(VM vm,
ChoiceGenerator<?> processedCG)
a ChoiceGnerator has returned all his choices
NOTE - this notification happens before the KernelState is stored, i.e.
|
void |
choiceGeneratorRegistered(VM vm,
ChoiceGenerator<?> nextCG,
ThreadInfo currentThread,
Instruction executedInstruction)
next ChoiceGenerator was registered, which means this is the end of the current transition
the reason why we have this in addition to the choiceGeneratorSet is that listeners
can reset the registered CG and so force the current transition to continue (although the
listener in this case has to make sure the operand stack is in a consistent state for
continued execution because there might be a bottom half of an Instruction.execute() missing)
|
void |
choiceGeneratorSet(VM vm,
ChoiceGenerator<?> newCG)
a new ChoiceGenerator was set, which means we are at the beginning of a new transition.
|
void |
classLoaded(VM vm,
ClassInfo loadedClass)
new class was loaded.
|
void |
exceptionBailout(VM vm,
ThreadInfo currentThread)
exception causes top frame to be purged
|
void |
exceptionHandled(VM vm,
ThreadInfo currentThread)
exception handled by current top frame
|
void |
exceptionThrown(VM vm,
ThreadInfo currentThread,
ElementInfo thrownException)
exception was thrown
|
void |
executeInstruction(VM vm,
ThreadInfo currentThread,
Instruction instructionToExecute)
VM is about to execute the next instruction
|
void |
gcBegin(VM vm) |
void |
gcEnd(VM vm) |
void |
instructionExecuted(VM vm,
ThreadInfo currentThread,
Instruction nextInstruction,
Instruction executedInstruction)
VM has executed the next instruction
(can be used to analyze branches, monitor PUTFIELD / GETFIELD and
INVOKExx / RETURN instructions)
|
void |
loadClass(VM vm,
ClassFile cf)
a new classfile is about to be parsed.
|
void |
methodEntered(VM vm,
ThreadInfo currentThread,
MethodInfo enteredMethod)
method body was entered.
|
void |
methodExited(VM vm,
ThreadInfo currentThread,
MethodInfo exitedMethod)
method body was left.
|
void |
objectCreated(VM vm,
ThreadInfo currentThread,
ElementInfo newObject)
new object was created
|
void |
objectLocked(VM vm,
ThreadInfo currentThread,
ElementInfo lockedObject)
notify if an object lock was taken (this includes automatic
surrender during a wait())
|
void |
objectNotify(VM vm,
ThreadInfo currentThread,
ElementInfo notifyingObject)
notify if an object notifies a single waiter
|
void |
objectNotifyAll(VM vm,
ThreadInfo currentThread,
ElementInfo notifyingObject)
notify if an object notifies all waiters
|
void |
objectReleased(VM vm,
ThreadInfo currentThread,
ElementInfo releasedObject)
object was garbage collected (after potential finalization)
|
void |
objectUnlocked(VM vm,
ThreadInfo currentThread,
ElementInfo unlockedObject)
notify if an object lock was released (this includes automatic
reacquisition after a notify())
|
void |
objectWait(VM vm,
ThreadInfo currentThread,
ElementInfo waitingObject)
notify if a wait() is executed
|
void |
propertyViolated(Search search)
JPF encountered a property violation.
|
void |
publishConstraintHit(Publisher publisher) |
void |
publishFinished(Publisher publisher) |
void |
publishPropertyViolation(Publisher publisher) |
void |
publishStart(Publisher publisher) |
void |
publishTransition(Publisher publisher) |
void |
searchConstraintHit(Search search)
there was some contraint hit in the search, we back out
could have been turned into a property, but usually is an attribute of
the search, not the application
|
void |
searchFinished(Search search)
we're done, either with or without a preceeding error
|
void |
searchStarted(Search search)
we get this after we enter the search loop, but BEFORE the first forward
|
void |
stateAdvanced(Search search)
got the next state
Note - this will be notified before any potential propertyViolated, in which
case the currentError will be already set
|
void |
stateBacktracked(Search search)
state was backtracked one step
|
void |
stateProcessed(Search search)
state is fully explored
|
void |
statePurged(Search search)
some state is not going to appear in any path anymore
|
void |
stateRestored(Search search)
a previously generated state was restored
(can be on a completely different path)
|
void |
stateStored(Search search)
somebody stored the state
|
void |
threadBlocked(VM vm,
ThreadInfo blockedThread,
ElementInfo lock)
thread waits to acquire a lock
// NOTE: vm.getLastThreadInfo() does NOT have to be the running thread, as this
// notification can occur as a result of a lock operation in the current thread
|
void |
threadInterrupted(VM vm,
ThreadInfo interruptedThread)
thread got interrupted
|
void |
threadNotified(VM vm,
ThreadInfo notifiedThread)
thread got notified
|
void |
threadScheduled(VM vm,
ThreadInfo scheduledThread)
new thread was scheduled by VM
|
void |
threadStarted(VM vm,
ThreadInfo startedThread)
new Thread entered run() method
|
void |
threadTerminated(VM vm,
ThreadInfo terminatedThread)
Thread exited run() method
|
void |
threadWaiting(VM vm,
ThreadInfo waitingThread)
thread is waiting for signal
|
void |
vmInitialized(VM vm)
VM got initialized (but search is not yet running).
|
public void vmInitialized(VM vm)
VMListener
vmInitialized
in interface VMListener
public void instructionExecuted(VM vm, ThreadInfo currentThread, Instruction nextInstruction, Instruction executedInstruction)
VMListener
instructionExecuted
in interface VMListener
public void executeInstruction(VM vm, ThreadInfo currentThread, Instruction instructionToExecute)
VMListener
executeInstruction
in interface VMListener
public void threadStarted(VM vm, ThreadInfo startedThread)
VMListener
threadStarted
in interface VMListener
public void threadWaiting(VM vm, ThreadInfo waitingThread)
VMListener
threadWaiting
in interface VMListener
public void threadNotified(VM vm, ThreadInfo notifiedThread)
VMListener
threadNotified
in interface VMListener
public void threadInterrupted(VM vm, ThreadInfo interruptedThread)
VMListener
threadInterrupted
in interface VMListener
public void threadScheduled(VM vm, ThreadInfo scheduledThread)
VMListener
threadScheduled
in interface VMListener
public void threadBlocked(VM vm, ThreadInfo blockedThread, ElementInfo lock)
VMListener
threadBlocked
in interface VMListener
public void threadTerminated(VM vm, ThreadInfo terminatedThread)
VMListener
threadTerminated
in interface VMListener
public void loadClass(VM vm, ClassFile cf)
VMListener
loadClass
in interface VMListener
public void classLoaded(VM vm, ClassInfo loadedClass)
VMListener
classLoaded
in interface VMListener
public void objectCreated(VM vm, ThreadInfo currentThread, ElementInfo newObject)
VMListener
objectCreated
in interface VMListener
public void objectReleased(VM vm, ThreadInfo currentThread, ElementInfo releasedObject)
VMListener
objectReleased
in interface VMListener
public void objectLocked(VM vm, ThreadInfo currentThread, ElementInfo lockedObject)
VMListener
objectLocked
in interface VMListener
public void objectUnlocked(VM vm, ThreadInfo currentThread, ElementInfo unlockedObject)
VMListener
objectUnlocked
in interface VMListener
public void objectWait(VM vm, ThreadInfo currentThread, ElementInfo waitingObject)
VMListener
objectWait
in interface VMListener
public void objectNotify(VM vm, ThreadInfo currentThread, ElementInfo notifyingObject)
VMListener
objectNotify
in interface VMListener
public void objectNotifyAll(VM vm, ThreadInfo currentThread, ElementInfo notifyingObject)
VMListener
objectNotifyAll
in interface VMListener
public void gcBegin(VM vm)
gcBegin
in interface VMListener
public void gcEnd(VM vm)
gcEnd
in interface VMListener
public void exceptionThrown(VM vm, ThreadInfo currentThread, ElementInfo thrownException)
VMListener
exceptionThrown
in interface VMListener
public void exceptionBailout(VM vm, ThreadInfo currentThread)
VMListener
exceptionBailout
in interface VMListener
public void exceptionHandled(VM vm, ThreadInfo currentThread)
VMListener
exceptionHandled
in interface VMListener
public void choiceGeneratorRegistered(VM vm, ChoiceGenerator<?> nextCG, ThreadInfo currentThread, Instruction executedInstruction)
VMListener
choiceGeneratorRegistered
in interface VMListener
public void choiceGeneratorSet(VM vm, ChoiceGenerator<?> newCG)
VMListener
choiceGeneratorSet
in interface VMListener
public void choiceGeneratorAdvanced(VM vm, ChoiceGenerator<?> currentCG)
VMListener
choiceGeneratorAdvanced
in interface VMListener
public void choiceGeneratorProcessed(VM vm, ChoiceGenerator<?> processedCG)
VMListener
choiceGeneratorProcessed
in interface VMListener
public void methodEntered(VM vm, ThreadInfo currentThread, MethodInfo enteredMethod)
VMListener
methodEntered
in interface VMListener
public void methodExited(VM vm, ThreadInfo currentThread, MethodInfo exitedMethod)
VMListener
methodExited
in interface VMListener
public void stateAdvanced(Search search)
SearchListener
stateAdvanced
in interface SearchListener
public void stateProcessed(Search search)
SearchListener
stateProcessed
in interface SearchListener
public void stateBacktracked(Search search)
SearchListener
stateBacktracked
in interface SearchListener
public void statePurged(Search search)
SearchListener
statePurged
in interface SearchListener
public void stateStored(Search search)
SearchListener
stateStored
in interface SearchListener
public void stateRestored(Search search)
SearchListener
stateRestored
in interface SearchListener
public void propertyViolated(Search search)
SearchListener
propertyViolated
in interface SearchListener
public void searchStarted(Search search)
SearchListener
searchStarted
in interface SearchListener
public void searchConstraintHit(Search search)
SearchListener
searchConstraintHit
in interface SearchListener
public void searchFinished(Search search)
SearchListener
searchFinished
in interface SearchListener
public void publishStart(Publisher publisher)
publishStart
in interface PublisherExtension
public void publishTransition(Publisher publisher)
publishTransition
in interface PublisherExtension
public void publishPropertyViolation(Publisher publisher)
publishPropertyViolation
in interface PublisherExtension
public void publishConstraintHit(Publisher publisher)
publishConstraintHit
in interface PublisherExtension
public void publishFinished(Publisher publisher)
publishFinished
in interface PublisherExtension