bug fixes + generating PC/RETURNLOC in a flow graph
[IRC.git] / Robust / src / Analysis / SSJava / BuildLattice.java
index 79c0ce9546470ffde24539f4c7a252c219328dda..a08e01663764020bc2d4e77340bb61186a636f97 100644 (file)
@@ -204,14 +204,13 @@ public class BuildLattice {
               visited.add(outNode);
               if (endCombNodeSet.size() > 0) {
                 // follows the straight line up to another skeleton/combination node
-                // endCombNodeSet = removeTransitivelyReachToNode(desc, startNode, endCombNodeSet);
+                endCombNodeSet = removeTransitivelyReachToNode(desc, startNode, endCombNodeSet);
               } else if (endCombNodeSet.size() == 0) {
                 // the outNode is (directly/transitively) connected to the bottom node
                 // therefore, we just add a dummy bottom HNode to the endCombNodeSet.
                 endCombNodeSet.add(bottomNode);
               }
 
-              startNode = refineStartNode(desc, startNode, endCombNodeSet);
 
               recurDFSNormalNode(desc, lattice, startNode, endCombNodeSet, visited,
                   mapIntermediateLoc, 1, locSummary, outNode);
@@ -291,10 +290,9 @@ public class BuildLattice {
     // follows the straight line up to another skeleton/combination node
     if (endCombNodeSet.size() > 0) {
       System.out.println("---endCombNodeSet=" + endCombNodeSet);
-      // endCombNodeSet =
-      // removeTransitivelyReachToNode(desc, combinationNodeInSCGraph, endCombNodeSet);
+      endCombNodeSet =
+          removeTransitivelyReachToNode(desc, combinationNodeInSCGraph, endCombNodeSet);
 
-      combinationNodeInSCGraph = refineStartNode(desc, combinationNodeInSCGraph, endCombNodeSet);
 
       recurDFS(desc, lattice, combinationNodeInSCGraph, endCombNodeSet, visited,
           mapIntermediateLoc, 1, locSummary, cnode);
@@ -310,19 +308,6 @@ public class BuildLattice {
 
   }
 
-  private HNode refineStartNode(Descriptor desc, HNode startNode, Set<HNode> endNodeSet) {
-
-    HierarchyGraph scGraph = infer.getSkeletonCombinationHierarchyGraph(desc);
-
-    HNode newStartNode = getDirectlyReachableSCNodeFromEndNode(scGraph, startNode, endNodeSet);
-
-    System.out.println("---removeTransitivelyReachToNode2 startNode=" + startNode + " old="
-        + endNodeSet + "  newStartNode=" + newStartNode);
-
-    return newStartNode;
-
-  }
-
   private Set<HNode> removeTransitivelyReachToNode(Descriptor desc, HNode startNode,
       Set<HNode> endNodeSet) {