Adding more restrictions in conflict analysis: not to analyze fields from the Groovy...
authorrtrimana <rtrimana@uci.edu>
Mon, 21 Oct 2019 20:51:52 +0000 (13:51 -0700)
committerrtrimana <rtrimana@uci.edu>
Mon, 21 Oct 2019 20:51:52 +0000 (13:51 -0700)
src/main/gov/nasa/jpf/listener/StateReducer.java

index 5744868f745e065339aa7c7c1560c0807e059f31..ffeca2078d316eda1abcb806dde561fdc3d28ec5 100644 (file)
@@ -363,8 +363,17 @@ public class StateReducer extends ListenerAdapter {
             !fieldClass.startsWith("sun") &&
             !fieldClass.startsWith("com") &&
             !fieldClass.startsWith("gov") &&
             !fieldClass.startsWith("sun") &&
             !fieldClass.startsWith("com") &&
             !fieldClass.startsWith("gov") &&
-            !fieldClass.startsWith("groovy")) {
-          analyzeReadWriteAccesses(executedInsn, fieldClass);
+            !fieldClass.startsWith("groovy") &&
+            // and fields generated for the Groovy library
+            !fieldClass.endsWith("stMC") &&
+            !fieldClass.endsWith("callSiteArray") &&
+            !fieldClass.endsWith("metaClass") &&
+            !fieldClass.endsWith("staticClassInfo") &&
+            !fieldClass.endsWith("__constructor__")) {
+          // Analyze only after being initialized
+          if (isInitialized) {
+            analyzeReadWriteAccesses(executedInsn, fieldClass);
+          }
         }
       }
       // Analyze conflicts from next instructions
         }
       }
       // Analyze conflicts from next instructions
@@ -376,7 +385,13 @@ public class StateReducer extends ListenerAdapter {
             !fieldClass.startsWith("sun") &&
             !fieldClass.startsWith("com") &&
             !fieldClass.startsWith("gov") &&
             !fieldClass.startsWith("sun") &&
             !fieldClass.startsWith("com") &&
             !fieldClass.startsWith("gov") &&
-            !fieldClass.startsWith("groovy")) {
+            !fieldClass.startsWith("groovy") &&
+            // and fields generated for the Groovy library
+            !fieldClass.endsWith("stMC") &&
+            !fieldClass.endsWith("callSiteArray") &&
+            !fieldClass.endsWith("metaClass") &&
+            !fieldClass.endsWith("staticClassInfo") &&
+            !fieldClass.endsWith("__constructor__")) {
           // Check for conflict (go backward from currentChoice and get the first conflict)
           // If the current event has conflicts with multiple events, then these will be detected
           // one by one as this recursively checks backward when backtrack set is revisited and executed.
           // Check for conflict (go backward from currentChoice and get the first conflict)
           // If the current event has conflicts with multiple events, then these will be detected
           // one by one as this recursively checks backward when backtrack set is revisited and executed.