// -----------------------------------------------------------
  public static void main(String[] args) {
    try {
      Options.verbose = true; // DEBUG
      for (int i = 0; i < args.length; i++) {
        Automata agv = AutomataIO.loadXML(args[i]);

        long time = System.currentTimeMillis();
        BDDAutomata ba = new BDDAutomata(agv);
        DisjunctivePartitions part = new DisjunctivePartitions(ba);
        DisjunctiveSearch ds = new DisjunctiveSearch(part);

        int initial = BDDAutomataHelper.getI(ba);
        int x = ds.forward(initial);

        double states = BDDAutomataHelper.countStates(ba, x);
        part.cleanup();
        ds.cleanup();
        ba.cleanup();

        time = System.currentTimeMillis() - time;
        System.out.println("Found " + states + " states in " + args[i] + " in " + time + "ms.");
      }

    } catch (Exception exx) {
      exx.printStackTrace();
    }
  }