More subtle changes to config file and state reducer listener.
authorrtrimana <rtrimana@uci.edu>
Wed, 16 Oct 2019 23:40:04 +0000 (16:40 -0700)
committerrtrimana <rtrimana@uci.edu>
Wed, 16 Oct 2019 23:40:04 +0000 (16:40 -0700)
main.jpf
src/main/gov/nasa/jpf/listener/StateReducer.java

index 9ef7754c722ff9ce072b220b95113ca3bf105c30..89d4f48473ce962affae7a169ecfaf8c71a4167e 100644 (file)
--- a/main.jpf
+++ b/main.jpf
@@ -1,8 +1,10 @@
 target = main
+#target = Rand
 
 # This is the listener that can detect variable write-after-write conflicts
-#listener=gov.nasa.jpf.listener.VariableConflictTracker
-listener=gov.nasa.jpf.listener.StateReducer
+listener=gov.nasa.jpf.listener.VariableConflictTracker
+#listener=gov.nasa.jpf.listener.StateReducer
+#listener=gov.nasa.jpf.listener.StateReducerOld
 #listener=gov.nasa.jpf.listener.VariableConflictTracker,gov.nasa.jpf.listener.StateReducer
 
 # Potentially conflicting variables
@@ -40,8 +42,8 @@ activate_state_reduction=true
 # Timeout in minutes (default is 0 which means no timeout)
 timeout=30
 
-search.class = gov.nasa.jpf.search.heuristic.RandomHeuristic
-search.heuristic.beam_search=true
+#search.class = gov.nasa.jpf.search.heuristic.RandomHeuristic
+#search.heuristic.beam_search=true
 #search.class = gov.nasa.jpf.search.heuristic.UserHeuristic
 #search.class = gov.nasa.jpf.search.heuristic.BFSHeuristic
 #search.class = gov.nasa.jpf.search.heuristic.DFSHeuristic
index e594c28204e4807cdf83d56dd008aa753e06c49e..5744868f745e065339aa7c7c1560c0807e059f31 100644 (file)
@@ -389,8 +389,8 @@ public class StateReducer extends ListenerAdapter {
             // 1) Check for conflicts with Write fields for both Read and Write instructions
             // 2) Check for conflicts with Read fields for Write instructions
             if (((nextInsn instanceof WriteInstruction || nextInsn instanceof ReadInstruction) &&
-                    rwSet.writeFieldExists(fieldClass)) ||
-                    (nextInsn instanceof WriteInstruction && rwSet.readFieldExists(fieldClass)))   {
+                  rwSet.writeFieldExists(fieldClass)) ||
+                 (nextInsn instanceof WriteInstruction && rwSet.readFieldExists(fieldClass)))   {
               // We do not record and service the same backtrack pair/point twice!
               // If it has been serviced before, we just skip this
               if (recordConflictPair(choiceCounter, eventNumber)) {