public class VeritestingListener
extends gov.nasa.jpf.PropertyListenerAdapter
implements gov.nasa.jpf.report.PublisherExtension
Modifier and Type | Class and Description |
---|---|
static class |
VeritestingListener.VeritestingMode |
Modifier and Type | Field and Description |
---|---|
static long |
cleanupTime |
static java.lang.String |
exclusionsFile |
static boolean |
initializeTime |
private static int |
instantiationLimit |
static java.lang.String[] |
interestingClassNames |
static boolean |
jitAnalysis |
static java.lang.String |
key |
static int |
maxStaticExplorationDepth |
private static long |
npaths |
static long |
parseTime |
static boolean |
performanceMode |
static boolean |
printRegionDigest |
static int |
recursiveDepth |
static java.lang.StringBuilder |
regionDigest |
private static java.lang.String |
regionDigestPrintName |
java.lang.String[] |
regionKeys |
static long |
regionSummaryParseTime |
static VeritestingListener.VeritestingMode |
runMode |
private long |
runStartTime |
static boolean |
simplify |
static boolean |
singlePathOptimization |
static long |
solverAllocTime |
static int |
solverCount |
private static boolean |
spfCasesHeuristicsOn |
private static long |
staticAnalysisDur |
static StatisticManager |
statisticManager |
private static int |
timeout_mins |
private static int |
timeoutReportingCounter |
static long |
totalSolverTime |
static int |
veritestingMode |
static int |
veritestRegionCount |
private static int |
veritestRegionExpectedCount |
static long |
z3Time |
Constructor and Description |
---|
VeritestingListener(gov.nasa.jpf.Config conf,
gov.nasa.jpf.JPF jpf) |
Modifier and Type | Method and Description |
---|---|
static gov.nasa.jpf.vm.Instruction |
advanceSpf(gov.nasa.jpf.vm.Instruction ins,
DynamicRegion dynRegion,
boolean earlyReturnSetup)
Steps SPF to the end of the region.
|
private static boolean |
canSetPC(gov.nasa.jpf.vm.ThreadInfo ti,
DynamicRegion dynRegion,
java.lang.Integer choice)
This method checks that the current PathCondition and after appending the summarized region is satisfiable.
|
void |
choiceGeneratorProcessed(gov.nasa.jpf.vm.VM vm,
gov.nasa.jpf.vm.ChoiceGenerator<?> processedCG) |
void |
choiceGeneratorRegistered(gov.nasa.jpf.vm.VM vm,
gov.nasa.jpf.vm.ChoiceGenerator<?> nextCG,
gov.nasa.jpf.vm.ThreadInfo currentThread,
gov.nasa.jpf.vm.Instruction executedInstruction) |
private static void |
clearStack(gov.nasa.jpf.vm.StackFrame sf,
gov.nasa.jpf.vm.Instruction ins)
This pop up operands of the if instruction that begins the region.
|
private void |
discoverRegions(gov.nasa.jpf.vm.ThreadInfo ti) |
void |
executeInstruction(gov.nasa.jpf.vm.VM vm,
gov.nasa.jpf.vm.ThreadInfo ti,
gov.nasa.jpf.vm.Instruction instructionToExecute)
Listener's main method that checks every instruction for being a potential veritesting region.
|
private java.lang.String |
getMetricsVector(long dynRunTime) |
private boolean |
isAllowedRegion(java.lang.String key) |
private boolean |
isNoVeritesting(gov.nasa.jpf.vm.StackFrame curr,
boolean noVeritestingFlag) |
private void |
isRegionEndOk(gov.nasa.jpf.vm.ThreadInfo ti,
StaticRegion staticRegion,
gov.nasa.jpf.vm.Instruction instructionToExecute) |
private java.lang.String |
keyFromInstructionToExc(gov.nasa.jpf.vm.Instruction instructionToExecute) |
gov.nasa.jpf.symbc.numeric.SymbolicInteger |
makeSymbolicInteger(java.lang.String name) |
private static void |
populateArrayOutputs(gov.nasa.jpf.vm.ThreadInfo ti,
DynamicRegion dynRegion) |
private static void |
populateFieldOutputs(gov.nasa.jpf.vm.ThreadInfo ti,
DynamicRegion dynRegion) |
private static void |
populateSlots(gov.nasa.jpf.vm.ThreadInfo ti,
DynamicRegion dynRegion)
Populates SPF stack slot with the output of the veritesting region.
|
void |
publishFinished(gov.nasa.jpf.report.Publisher publisher) |
private static void |
pushExpOnStack(DynamicRegion dynRegion,
gov.nasa.jpf.vm.StackFrame sf,
java.lang.String returnType,
za.ac.sun.cs.green.expr.Expression var) |
private static void |
pushReturnOnStack(gov.nasa.jpf.vm.StackFrame sf,
DynamicRegion dynRegion) |
private DynamicRegion |
runVeritesting(gov.nasa.jpf.vm.ThreadInfo ti,
gov.nasa.jpf.vm.Instruction instructionToExecute,
StaticRegion staticRegion,
java.lang.String key) |
private void |
runVeritestingWithSPF(gov.nasa.jpf.vm.ThreadInfo ti,
gov.nasa.jpf.vm.VM vm,
gov.nasa.jpf.vm.Instruction instructionToExecute,
StaticRegion staticRegion,
java.lang.String key) |
private void |
runVeritestingWrapper(gov.nasa.jpf.vm.ThreadInfo ti,
gov.nasa.jpf.vm.VM vm,
StaticRegion staticRegion,
gov.nasa.jpf.vm.Instruction instructionToExecute) |
static gov.nasa.jpf.vm.Instruction |
setupSPF(gov.nasa.jpf.vm.ThreadInfo ti,
gov.nasa.jpf.vm.Instruction ins,
DynamicRegion dynRegion,
java.lang.Integer choice)
This populates the Output of the summarized region to SPF.
|
void |
stateAdvanced(gov.nasa.jpf.search.Search search) |
void |
stateBacktracked(gov.nasa.jpf.search.Search search) |
void |
threadStarted(gov.nasa.jpf.vm.VM vm,
gov.nasa.jpf.vm.ThreadInfo startedThread) |
void |
threadTerminated(gov.nasa.jpf.vm.VM vm,
gov.nasa.jpf.vm.ThreadInfo terminatedThread) |
private void |
updateSkipRegions(java.lang.String message,
java.lang.String key) |
private void |
writeRegionDigest() |
check, choiceGeneratorAdvanced, choiceGeneratorSet, classLoaded, clone, exceptionBailout, exceptionHandled, exceptionThrown, gcBegin, gcEnd, instructionExecuted, loadClass, methodEntered, methodExited, objectCreated, objectExposed, objectLocked, objectNotify, objectNotifyAll, objectReleased, objectShared, objectUnlocked, objectWait, propertyViolated, publishConstraintHit, publishProbe, publishPropertyViolation, publishStart, publishTransition, reset, searchConstraintHit, searchFinished, searchProbed, searchStarted, stateProcessed, statePurged, stateRestored, stateStored, threadBlocked, threadInterrupted, threadNotified, threadScheduled, threadWaiting, vmInitialized
public static int veritestingMode
public static VeritestingListener.VeritestingMode runMode
public static long totalSolverTime
public static long z3Time
public static long parseTime
public static long regionSummaryParseTime
public static long solverAllocTime
public static long cleanupTime
public static int solverCount
public static int maxStaticExplorationDepth
public static boolean initializeTime
public static int veritestRegionCount
private static long staticAnalysisDur
public static java.lang.String key
private final long runStartTime
public static StatisticManager statisticManager
private static int veritestRegionExpectedCount
private static int instantiationLimit
public static boolean simplify
public static boolean jitAnalysis
private static int timeout_mins
private static int timeoutReportingCounter
private static long npaths
public static int recursiveDepth
public static java.lang.StringBuilder regionDigest
public static boolean printRegionDigest
public static boolean singlePathOptimization
private static java.lang.String regionDigestPrintName
private static boolean spfCasesHeuristicsOn
public static boolean performanceMode
public static java.lang.String exclusionsFile
public static java.lang.String[] interestingClassNames
public java.lang.String[] regionKeys
public VeritestingListener(gov.nasa.jpf.Config conf, gov.nasa.jpf.JPF jpf)
public gov.nasa.jpf.symbc.numeric.SymbolicInteger makeSymbolicInteger(java.lang.String name)
public void executeInstruction(gov.nasa.jpf.vm.VM vm, gov.nasa.jpf.vm.ThreadInfo ti, gov.nasa.jpf.vm.Instruction instructionToExecute)
executeInstruction
in interface gov.nasa.jpf.vm.VMListener
executeInstruction
in class gov.nasa.jpf.PropertyListenerAdapter
vm
- Virtual Machine.ti
- Current running Thread.instructionToExecute
- instruction to be executed.private void runVeritestingWrapper(gov.nasa.jpf.vm.ThreadInfo ti, gov.nasa.jpf.vm.VM vm, StaticRegion staticRegion, gov.nasa.jpf.vm.Instruction instructionToExecute) throws java.lang.Exception
java.lang.Exception
private void isRegionEndOk(gov.nasa.jpf.vm.ThreadInfo ti, StaticRegion staticRegion, gov.nasa.jpf.vm.Instruction instructionToExecute) throws StaticRegionException
StaticRegionException
private java.lang.String keyFromInstructionToExc(gov.nasa.jpf.vm.Instruction instructionToExecute)
private void discoverRegions(gov.nasa.jpf.vm.ThreadInfo ti)
private boolean isNoVeritesting(gov.nasa.jpf.vm.StackFrame curr, boolean noVeritestingFlag)
private boolean isAllowedRegion(java.lang.String key)
private void updateSkipRegions(java.lang.String message, java.lang.String key)
private void runVeritestingWithSPF(gov.nasa.jpf.vm.ThreadInfo ti, gov.nasa.jpf.vm.VM vm, gov.nasa.jpf.vm.Instruction instructionToExecute, StaticRegion staticRegion, java.lang.String key) throws java.lang.Exception
java.lang.Exception
public void threadTerminated(gov.nasa.jpf.vm.VM vm, gov.nasa.jpf.vm.ThreadInfo terminatedThread)
threadTerminated
in interface gov.nasa.jpf.vm.VMListener
threadTerminated
in class gov.nasa.jpf.PropertyListenerAdapter
public void threadStarted(gov.nasa.jpf.vm.VM vm, gov.nasa.jpf.vm.ThreadInfo startedThread)
threadStarted
in interface gov.nasa.jpf.vm.VMListener
threadStarted
in class gov.nasa.jpf.PropertyListenerAdapter
public void choiceGeneratorRegistered(gov.nasa.jpf.vm.VM vm, gov.nasa.jpf.vm.ChoiceGenerator<?> nextCG, gov.nasa.jpf.vm.ThreadInfo currentThread, gov.nasa.jpf.vm.Instruction executedInstruction)
choiceGeneratorRegistered
in interface gov.nasa.jpf.vm.VMListener
choiceGeneratorRegistered
in class gov.nasa.jpf.PropertyListenerAdapter
public void stateAdvanced(gov.nasa.jpf.search.Search search)
stateAdvanced
in interface gov.nasa.jpf.search.SearchListener
stateAdvanced
in class gov.nasa.jpf.PropertyListenerAdapter
public void stateBacktracked(gov.nasa.jpf.search.Search search)
stateBacktracked
in interface gov.nasa.jpf.search.SearchListener
stateBacktracked
in class gov.nasa.jpf.PropertyListenerAdapter
public void choiceGeneratorProcessed(gov.nasa.jpf.vm.VM vm, gov.nasa.jpf.vm.ChoiceGenerator<?> processedCG)
choiceGeneratorProcessed
in interface gov.nasa.jpf.vm.VMListener
choiceGeneratorProcessed
in class gov.nasa.jpf.PropertyListenerAdapter
private DynamicRegion runVeritesting(gov.nasa.jpf.vm.ThreadInfo ti, gov.nasa.jpf.vm.Instruction instructionToExecute, StaticRegion staticRegion, java.lang.String key) throws java.lang.Exception
java.lang.Exception
public static gov.nasa.jpf.vm.Instruction setupSPF(gov.nasa.jpf.vm.ThreadInfo ti, gov.nasa.jpf.vm.Instruction ins, DynamicRegion dynRegion, java.lang.Integer choice) throws StaticRegionException
ti
- Currently running thread.ins
- Branch instruction that indicates beginning of the region.dynRegion
- Dynamic region that has been summarized.StaticRegionException
- Exception to indicate a problem while setting SPF.private static void pushReturnOnStack(gov.nasa.jpf.vm.StackFrame sf, DynamicRegion dynRegion) throws StaticRegionException
StaticRegionException
private static void pushExpOnStack(DynamicRegion dynRegion, gov.nasa.jpf.vm.StackFrame sf, java.lang.String returnType, za.ac.sun.cs.green.expr.Expression var) throws StaticRegionException
StaticRegionException
private static boolean canSetPC(gov.nasa.jpf.vm.ThreadInfo ti, DynamicRegion dynRegion, java.lang.Integer choice) throws StaticRegionException
ti
- Currently running thread.dynRegion
- Finaly summary of the region, after all transformations has been successfully completed.StaticRegionException
- Exception to indicate a problem while checking SAT of the updated PathCondition.private static void clearStack(gov.nasa.jpf.vm.StackFrame sf, gov.nasa.jpf.vm.Instruction ins) throws StaticRegionException
sf
- Current StackFrame.ins
- Current executing instructionStaticRegionException
- Exception to indicate a problem while clearning the stack.private static void populateSlots(gov.nasa.jpf.vm.ThreadInfo ti, DynamicRegion dynRegion)
ti
- Current executing thread.dynRegion
- Dynamic region that has been successfully transformed and summarized.private static void populateFieldOutputs(gov.nasa.jpf.vm.ThreadInfo ti, DynamicRegion dynRegion) throws StaticRegionException
StaticRegionException
private static void populateArrayOutputs(gov.nasa.jpf.vm.ThreadInfo ti, DynamicRegion dynRegion) throws StaticRegionException
StaticRegionException
public static gov.nasa.jpf.vm.Instruction advanceSpf(gov.nasa.jpf.vm.Instruction ins, DynamicRegion dynRegion, boolean earlyReturnSetup)
ins
- Insturction to be executed.dynRegion
- Dynamic region that has been successfully transformed and summarized.public void publishFinished(gov.nasa.jpf.report.Publisher publisher)
publishFinished
in interface gov.nasa.jpf.report.PublisherExtension
publishFinished
in class gov.nasa.jpf.PropertyListenerAdapter
private void writeRegionDigest()
private java.lang.String getMetricsVector(long dynRunTime)