- if (!outNode.isSkeleton() && !visited.contains(outNode)) {
- if (outNode.isCombinationNode()) {
- // check whether the next combination node is different from the current node
- if (combinationNodeInSCGraph.equals(getCombinationNodeInSCGraph(desc, outNode))) {
- visited.add(outNode);
- recurDFS(desc, lattice, combinationNodeInSCGraph, endNodeSet, visited,
- mapIntermediateLoc, idx + 1, locSummary, outNode);
- } else {
- expandCombinationNode(desc, lattice, visited, mapIntermediateLoc, locSummary, outNode);
+
+ Set<HNode> inNodeSetToOutNode = graph.getIncomingNodeSet(outNode);
+
+ if (visited.containsAll(inNodeSetToOutNode)) {
+ if (!outNode.isSkeleton() && !visited.contains(outNode)) {
+ if (outNode.isCombinationNode()) {
+ // check whether the next combination node is different from the current node
+ if (combinationNodeInSCGraph.equals(getCombinationNodeInSCGraph(desc, outNode))) {
+ visited.add(outNode);
+ recurDFS(desc, lattice, combinationNodeInSCGraph, endNodeSet, visited,
+ mapIntermediateLoc, idx + 1, locSummary, outNode);
+ } else {
+ expandCombinationNode(desc, lattice, visited, mapIntermediateLoc, locSummary, outNode);
+ }