X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=src%2Fmain%2Fgov%2Fnasa%2Fjpf%2Flistener%2FDPORStateReducerWithSummary.java;fp=src%2Fmain%2Fgov%2Fnasa%2Fjpf%2Flistener%2FDPORStateReducerWithSummary.java;h=64025773718083adcdc6917b3469a6c134cb7a70;hb=126bf671565f5669e8e42fc32995aa59e5449a1f;hp=08ae9a64c380d14c2e192bdf30a79638eab257bd;hpb=cf7ff2a3eae7f0a5b8c214259e0902d5fab646d6;p=jpf-core.git diff --git a/src/main/gov/nasa/jpf/listener/DPORStateReducerWithSummary.java b/src/main/gov/nasa/jpf/listener/DPORStateReducerWithSummary.java index 08ae9a6..6402577 100755 --- a/src/main/gov/nasa/jpf/listener/DPORStateReducerWithSummary.java +++ b/src/main/gov/nasa/jpf/listener/DPORStateReducerWithSummary.java @@ -85,7 +85,7 @@ public class DPORStateReducerWithSummary extends ListenerAdapter { // Statistics private int numOfTransitions; - private HashMap> stateToUniqueEventMap; + private HashMap> stateToUniqueTransMap; public DPORStateReducerWithSummary(Config config, JPF jpf) { verboseMode = config.getBoolean("printout_state_transition", false); @@ -111,7 +111,7 @@ public class DPORStateReducerWithSummary extends ListenerAdapter { relevantFields = new HashSet<>(); restorableStateMap = new HashMap<>(); stateToPredInfo = new HashMap<>(); - stateToUniqueEventMap = new HashMap<>(); + stateToUniqueTransMap = new HashMap<>(); initializeStatesVariables(); } @@ -267,7 +267,7 @@ public class DPORStateReducerWithSummary extends ListenerAdapter { } else { // We only count IntChoiceFromSet CGs numOfTransitions++; - countUniqueStateId(vm.getStateId(), icsCG.getNextChoice()); + countUniqueTransitions(vm.getStateId(), icsCG.getNextChoice()); } // Map state to event mapStateToEvent(icsCG.getNextChoice()); @@ -810,14 +810,14 @@ public class DPORStateReducerWithSummary extends ListenerAdapter { // --- Functions related to statistics counting // Count unique state IDs - private void countUniqueStateId(int stateId, int nextChoiceValue) { + private void countUniqueTransitions(int stateId, int nextChoiceValue) { HashSet events; // Get the set of events - if (!stateToUniqueEventMap.containsKey(stateId)) { + if (!stateToUniqueTransMap.containsKey(stateId)) { events = new HashSet<>(); - stateToUniqueEventMap.put(stateId, events); + stateToUniqueTransMap.put(stateId, events); } else { - events = stateToUniqueEventMap.get(stateId); + events = stateToUniqueTransMap.get(stateId); } // Insert the event if (!events.contains(nextChoiceValue)) { @@ -829,7 +829,7 @@ public class DPORStateReducerWithSummary extends ListenerAdapter { private int summarizeUniqueTransitions() { // Just count the set size of each of entry map and sum them up int numOfUniqueTransitions = 0; - for (Map.Entry> entry : stateToUniqueEventMap.entrySet()) { + for (Map.Entry> entry : stateToUniqueTransMap.entrySet()) { numOfUniqueTransitions = numOfUniqueTransitions + entry.getValue().size(); }