Exemplo n.º 1
0
  public static void main(String[] args) throws Exception {
    // explicit configuration
    for (int i = 0; i < PDGs.pdgs.length; i++) {
      String file = PDGs.pdgs[i];
      /* 1 */
      g = SDG.readFrom(file);
      ThreadInstance ti = g.getThreadsInfo().iterator().next();
      LinkedList<ThreadInstance> l = new LinkedList<ThreadInstance>();
      l.add(ti);
      ThreadsInformation info = new ThreadsInformation(l);
      g.setThreadsInfo(info);
      int[] threads = new int[] {0};
      for (SDGNode n : g.vertexSet()) {
        n.setThreadNumbers(threads);
      }

      System.out.println("initializing the slicers");
      LinkedList<Slicer> array = new LinkedList<Slicer>();

      array.addLast(new SummarySlicerBackward(g));
      array.addLast(new Phase1SlicerBackward(g));

      System.out.println(file);
      System.out.println("criteria: " + g.vertexSet().size());

      String str = compare(array, g.vertexSet());

      System.out.println(str);
    }
  }