public abstract class Search
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Config |
config |
protected Error |
currentError
error encountered during last transition, null otherwise
|
protected int |
depth |
protected int |
depthLimit |
protected boolean |
doBacktrack |
protected boolean |
done |
protected java.util.ArrayList<Error> |
errors |
protected boolean |
getAllErrors |
protected java.lang.String |
lastSearchConstraint |
protected SearchListener[] |
listeners
search listeners.
|
protected static JPFLogger |
log |
protected boolean |
matchDepth |
protected long |
minFreeMemory |
protected java.util.concurrent.atomic.AtomicBoolean |
notifyProbeListeners |
protected java.util.ArrayList<Property> |
properties |
protected Reporter |
reporter
this is a special SearchListener that is always notified last, so that
PublisherExtensions can be sure the notification has been processed by all listeners
|
protected IntVector |
stateDepth
storage to keep track of state depths
|
protected VM |
vm |
Modifier | Constructor and Description |
---|---|
protected |
Search(Config config,
VM vm) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(SearchListener newListener) |
void |
addProperty(Property newProperty) |
protected boolean |
backtrack() |
protected boolean |
checkAndResetBacktrackRequest() |
void |
checkAndResetProbeRequest()
this does the actual notification and resets the request, hence this call
should only happen from within JPFs main thread
|
protected boolean |
checkPropertyViolation() |
boolean |
checkStateSpaceLimit()
check if we have a minimum amount of free memory left.
|
void |
cleanUp()
called after the JPF run is finished.
|
void |
error(Property property) |
void |
error(Property property,
Path path,
ThreadList threadList) |
protected boolean |
forward() |
Config |
getConfig() |
Error |
getCurrentError() |
int |
getDepth() |
int |
getDepthLimit() |
java.util.List<Error> |
getErrors() |
Error |
getLastError() |
java.lang.String |
getLastSearchConstraint() |
<T> T |
getNextListenerOfType(java.lang.Class<T> type,
T prev) |
int |
getNumberOfErrors() |
protected java.util.ArrayList<Property> |
getProperties(Config config)
return set of configured properties
note there is a name clash here - JPF 'properties' have nothing to do with
Java properties (java.util.Properties)
|
int |
getPurgedStateId() |
java.lang.String |
getSearchConstraint() |
protected SearchState |
getSearchState() |
int |
getStateDepth(int stateId) |
int |
getStateId() |
Transition |
getTransition() |
VM |
getVM() |
boolean |
hasErrors() |
boolean |
hasListenerOfType(java.lang.Class<?> listenerCls) |
boolean |
hasNextState() |
protected boolean |
hasPropertyTermination() |
protected void |
initialize(Config conf) |
boolean |
isDone() |
boolean |
isEndState() |
boolean |
isErrorState() |
boolean |
isIgnoredState() |
boolean |
isNewState() |
boolean |
isProcessedState() |
boolean |
isVisitedState() |
protected void |
notifyPropertyViolated() |
void |
notifySearchConstraintHit(java.lang.String details) |
protected void |
notifySearchFinished() |
void |
notifySearchProbed() |
protected void |
notifySearchStarted() |
protected void |
notifyStateAdvanced() |
protected void |
notifyStateBacktracked() |
protected void |
notifyStateProcessed() |
protected void |
notifyStatePurged() |
protected void |
notifyStateRestored() |
protected void |
notifyStateStored() |
void |
probeSearch()
request a probe
This does not do the actual listener notification, it only stores
the request, which is then processed from within JPFs inner execution loop.
|
void |
removeListener(SearchListener removeListener) |
void |
removeProperty(Property oldProperty) |
boolean |
requestBacktrack()
this is somewhat redundant to SystemState.setIgnored(), but we don't
want to mix the case of overriding state matching with backtracking when
searching for multiple errors
|
void |
resetProperties() |
protected void |
restoreState(State state) |
abstract void |
search() |
void |
setDepthLimit(int limit) |
void |
setIgnoredState(boolean cond) |
void |
setReporter(Reporter reporter) |
protected void |
setStateDepth(int stateId,
int depth) |
boolean |
supportsBacktrack() |
boolean |
supportsRestoreState() |
void |
terminate()
this can be used by listeners to terminate the search
|
boolean |
transitionOccurred() |
protected static JPFLogger log
protected Error currentError
protected java.util.ArrayList<Error> errors
protected int depth
protected VM vm
protected java.util.ArrayList<Property> properties
protected boolean matchDepth
protected long minFreeMemory
protected int depthLimit
protected boolean getAllErrors
protected java.lang.String lastSearchConstraint
protected boolean done
protected boolean doBacktrack
protected java.util.concurrent.atomic.AtomicBoolean notifyProbeListeners
protected SearchListener[] listeners
protected Reporter reporter
protected final Config config
protected final IntVector stateDepth
protected void initialize(Config conf)
public void cleanUp()
public Config getConfig()
public abstract void search()
public void setReporter(Reporter reporter)
public void addListener(SearchListener newListener)
public boolean hasListenerOfType(java.lang.Class<?> listenerCls)
public <T> T getNextListenerOfType(java.lang.Class<T> type, T prev)
public void removeListener(SearchListener removeListener)
public void addProperty(Property newProperty)
public void removeProperty(Property oldProperty)
protected java.util.ArrayList<Property> getProperties(Config config)
protected boolean hasPropertyTermination()
protected boolean checkPropertyViolation()
public java.util.List<Error> getErrors()
public int getNumberOfErrors()
public java.lang.String getLastSearchConstraint()
public void probeSearch()
public void checkAndResetProbeRequest()
public Error getCurrentError()
public Error getLastError()
public boolean hasErrors()
public VM getVM()
public boolean isEndState()
public boolean isErrorState()
public boolean hasNextState()
public boolean transitionOccurred()
public boolean isNewState()
public boolean isVisitedState()
public boolean isIgnoredState()
public boolean isProcessedState()
public boolean isDone()
public int getDepth()
public java.lang.String getSearchConstraint()
public Transition getTransition()
public int getStateId()
public int getPurgedStateId()
public boolean requestBacktrack()
protected boolean checkAndResetBacktrackRequest()
public boolean supportsBacktrack()
public boolean supportsRestoreState()
public int getDepthLimit()
public void setDepthLimit(int limit)
protected SearchState getSearchState()
public void error(Property property)
public void error(Property property, Path path, ThreadList threadList)
public void resetProperties()
protected void notifyStateAdvanced()
protected void notifyStateProcessed()
protected void notifyStateStored()
protected void notifyStateRestored()
protected void notifyStateBacktracked()
protected void notifyStatePurged()
public void notifySearchProbed()
protected void notifyPropertyViolated()
protected void notifySearchStarted()
public void notifySearchConstraintHit(java.lang.String details)
protected void notifySearchFinished()
protected boolean forward()
protected boolean backtrack()
public void setIgnoredState(boolean cond)
protected void restoreState(State state)
public void terminate()
protected void setStateDepth(int stateId, int depth)
public int getStateDepth(int stateId)
public boolean checkStateSpaceLimit()