Fixed lot of random bugs. Added code generate strings for expr's.
[repair.git] / Repair / RepairCompiler / MCC / IR / ConcreteInterferes.java
index e6718a69eefbf4f6b975b9cd1780709ff38a9328..aeaf4c91e7aa49061a7446c072de327c2e6bd712 100755 (executable)
@@ -6,14 +6,28 @@ class ConcreteInterferes {
            UpdateNode un=mun.getUpdate(i);
            for (int j=0;j<un.numUpdates();j++) {
                Updates update=un.getUpdate(j);
+               
                DNFRule drule=r.getDNFGuardExpr();
-               for(int k=0;k<drule.size();k++) {
-                   RuleConjunction rconj=drule.get(k);
-                   for(int l=0;l<rconj.size();l++) {
-                       DNFExpr dexpr=rconj.get(l);
-                       /* See if update interfers w/ dexpr */
-                       Descriptor updatedes=update.getDescriptor();
-                       
+               if (satisfy)
+                   drule=r.getDNFNegGuardExpr();
+
+               if (!update.isAbstract()) {
+                   Descriptor updated_des=update.getDescriptor();
+                   assert updated_des!=null;
+                   if (r.getInclusion().usesDescriptor(updated_des))
+                       return true; /* Interferes with inclusion condition */
+                   
+                   for(int k=0;k<drule.size();k++) {
+                       RuleConjunction rconj=drule.get(k);
+                       for(int l=0;l<rconj.size();l++) {
+                           DNFExpr dexpr=rconj.get(l);
+                           /* See if update interfers w/ dexpr */
+                           
+                           if (!dexpr.getExpr().usesDescriptor(updated_des))
+                               continue; /* No use of the descriptor */
+                           
+                           return true;
+                       }
                    }
                }
            }