bug fix: RBlockRelationAnalysis failed to set a non-bogus parent when sese is located...
authoryeom <yeom>
Fri, 19 Nov 2010 04:16:47 +0000 (04:16 +0000)
committeryeom <yeom>
Fri, 19 Nov 2010 04:16:47 +0000 (04:16 +0000)
Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java
Robust/src/Analysis/OoOJava/RBlockRelationAnalysis.java
Robust/src/IR/Flat/RuntimeConflictResolver.java

index 2b79fa6b876a9e248a397046e872135677f9f65c..f0fd9518df10846a6c1f3f3abc2a9c27cea38532 100644 (file)
@@ -188,9 +188,6 @@ public class OoOJavaAnalysis {
           FlatSESEEnterNode child = (FlatSESEEnterNode) iterator2.next();
           Hashtable<Taint, Set<Effect>> taint2Effects = effectsAnalysis.get(child);
           conflictGraph.addLiveIn(taint2Effects);
-          if(taint2Effects!=null)
-            System.out.println("#add ="+taint2Effects+"currentSESE="+child+" into conflictGraph="+conflictGraph);
-          
           sese2conflictGraph.put(parent, conflictGraph);
         }
       }
index 66306f9803992424f96f02900e658d27e297bb5f..9d464e20caaf1b54e48aabee87c9d7b65acc9dd3 100644 (file)
@@ -203,6 +203,10 @@ public class RBlockRelationAnalysis {
       } else {
        seseStack.peek().addChild( fsen );
        fsen.setParent( seseStack.peek() );
+       // if the top of stack is not bogus one, it should be a non-bogus parent to the current sese
+       if(!seseStack.peek().getIsCallerSESEplaceholder()){
+         fsen.addSESEParent(seseStack.peek());
+       }
       }
 
       seseStack.push( fsen );
@@ -258,7 +262,6 @@ public class RBlockRelationAnalysis {
 
 
   protected boolean hasChildrenByCall(FlatSESEEnterNode fsen) {
-    
     boolean hasChildrenByCall=false;
 
     // visit every flat node in SESE body, find method calls that
@@ -274,7 +277,7 @@ public class RBlockRelationAnalysis {
 
       flatNodesToVisit.remove(fn);
       visited.add(fn);
-
+      
       if (fn.kind() == FKind.FlatCall) {
         FlatCall fc = (FlatCall) fn;
         MethodDescriptor mdCallee = fc.getMethod();
@@ -289,25 +292,16 @@ public class RBlockRelationAnalysis {
           hasChildrenByCall = true;
 
           if (!fsen.getIsCallerSESEplaceholder()) {
-            // System.out.println("%%%mdCallee="+mdCallee+" from fsen="+fsen);
             Set reachableSESEMethodSet =
                 callGraph.getFirstReachableMethodContainingSESE(mdCallee, methodsContainingSESEs);
 
-            // if (methodsContainingSESEs.contains(mdCallee)) {
             reachableSESEMethodSet.add(mdCallee);
-            // }
-
-            // System.out.println("#");
-            // System.out.println("fsen"+fsen);
-            // System.out.println("reachableSESEMethodSet="+reachableSESEMethodSet);
 
             for (Iterator iterator = reachableSESEMethodSet.iterator(); iterator.hasNext();) {
               MethodDescriptor md = (MethodDescriptor) iterator.next();
-              // Set<FlatSESEEnterNode> seseSet = md2seseSet.get(md);
               FlatMethod fm = state.getMethodFlat(md);
               FlatSESEEnterNode fsenBogus = (FlatSESEEnterNode) fm.getNext(0);
               fsenBogus.addSESEParent(fsen);
-              // System.out.println("% "+fm+"->"+fsen);
             }
 
             reachableSESEMethodSet.retainAll(methodsContainingSESEs);
index f5827ef0f18400f410c64fcd021a69793c893a79..f2d8d9a13d3f24a3b49b90ed7d593284526ec2d7 100644 (file)
@@ -133,16 +133,8 @@ public class RuntimeConflictResolver {
       FlatSESEEnterNode parentSESE = null;
       if (fsen.getSESEParent().size() > 0) {
          parentSESE = (FlatSESEEnterNode) fsen.getSESEParent().iterator().next();
-        System.out.println("fsen getParent=" + parentSESE);
         conflictGraph = oooa.getConflictGraph(parentSESE);
         System.out.println("CG=" + conflictGraph);
-        if (conflictGraph != null)
-          System.out.println("Conflicts=" + conflictGraph.getConflictEffectSet(fsen));
-        // conflictGraph = oooa.getConflictGraph(fsen.getParent());
-        // System.out.println("CG=" + conflictGraph);
-        // if (conflictGraph != null)
-        // System.out.println("Conflicts=" +
-        // conflictGraph.getConflictEffectSet(fsen));
       }
 
 //      if (!fsen.getIsCallerSESEplaceholder() && fsen.getParent() != null