// Boolean states
private boolean isBooleanCGFlipped;
private boolean isEndOfExecution;
+ private boolean isNotCheckedForEventsYet;
// Statistics
private int numOfTransitions;
}
}
isBooleanCGFlipped = false;
+ isNotCheckedForEventsYet = true;
mainSummary = new MainSummary();
numOfTransitions = 0;
nonRelevantClasses = new HashSet<>();
@Override
public void choiceGeneratorRegistered(VM vm, ChoiceGenerator<?> nextCG, ThreadInfo currentThread, Instruction executedInstruction) {
+ if (isNotCheckedForEventsYet) {
+ // Check if this benchmark has no events
+ if (nextCG instanceof IntChoiceFromSet) {
+ IntChoiceFromSet icsCG = (IntChoiceFromSet) nextCG;
+ Integer[] cgChoices = icsCG.getAllChoices();
+ if (cgChoices.length == 2 && cgChoices[0] == 0 && cgChoices[1] == -1) {
+ stateReductionMode = false;
+ }
+ isNotCheckedForEventsYet = false;
+ }
+ }
if (stateReductionMode) {
// Initialize with necessary information from the CG
if (nextCG instanceof IntChoiceFromSet) {