예제 #1
0
  public static String run(DefaultDirectedGraph<CFGHandle, DefaultEdge> graph) {
    StringBuilder result = new StringBuilder();

    result.append("digraph stronglyConnected {\n");
    for (final CFGHandle cfgh : graph.vertexSet())
      result.append('"').append(cfgh.toString()).append("\"\n");
    for (DefaultEdge edge : graph.edgeSet())
      result
          .append('"')
          .append(graph.getEdgeSource(edge))
          .append("\" -> \"")
          .append(graph.getEdgeTarget(edge))
          .append("\";\n");
    result.append('}');

    return result.toString();
  }