Exemplo n.º 1
0
  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);
  }
Exemplo n.º 2
0
 public IMethod getMethod() {
   return ecfg.getMethod();
 }