private void createCFG() { for (IExplodedBasicBlock block : ecfg) { Set<CFGNode> last = lastNodesOfBB(block); Iterator<IExplodedBasicBlock> it = getSuccs(block); while (it.hasNext()) { IExplodedBasicBlock succ = it.next(); if (succ == null) { Log.warn("Basic block is null in " + Util.methodName(ecfg.getMethod())); continue; } Set<CFGNode> firstOfSucc = firstNodesOfBB(succ); for (CFGNode from : last) { for (CFGNode to : firstOfSucc) { cfg.addEdge(from, to); } } } } cfg.addEdge(entry, exit); }
public IMethod getMethod() { return ecfg.getMethod(); }