Examples of HavlakLoopFinder


Examples of com.google.havlak.shared.havlakloopfinder.HavlakLoopFinder

        int found = 0;

        result += "15000 dummy loops<br>";
        serverResponseLabel.setHTML(result);
        for (int dummyloop = 0; dummyloop < 1; dummyloop++) {
          HavlakLoopFinder finder = new HavlakLoopFinder(app.cfg, app.lsg);
          finder.findLoops();
        }

        result += "Constructing CFG...<br>";
        serverResponseLabel.setHTML(result);
        int n = 2;

        for (int parlooptrees = 0; parlooptrees < 10; parlooptrees++) {
          app.cfg.createNode(n + 1);
          app.buildConnect(2, n + 1);
          n = n + 1;

          for (int i = 0; i < 2; i++) {
            int top = n;
            n = app.buildStraight(n, 1);
            for (int j = 0; j < 25; j++) {
              n = app.buildBaseLoop(n);
            }
            int bottom = app.buildStraight(n, 1);
            app.buildConnect(n, top);
            n = bottom;
          }
          app.buildConnect(n, 1);
        }

        result += "Performing Loop Recognition\n1 Iteration<br>";
        HavlakLoopFinder finder = new HavlakLoopFinder(app.cfg, app.lsg);
        finder.findLoops();
        long t = System.currentTimeMillis() - start;
        result += "Found: " + app.lsg.getNumLoops() + " in " +
            t + " [ms]";

        result += "Another 100 iterations...<br>";
        for (int i = 0; i < 100; i++) {
          HavlakLoopFinder finder2 = new HavlakLoopFinder(app.cfg, new LSG());
          finder2.findLoops();
        }
        t = System.currentTimeMillis() - start;
        result += "<br>Found: " + app.lsg.getNumLoops() + " in " +
            t + " [ms]";
View Full Code Here

Examples of com.google.havlak.shared.havlakloopfinder.HavlakLoopFinder

        int found = 0;

        result += "15000 dummy loops<br>";
        serverResponseLabel.setHTML(result);
        for (int dummyloop = 0; dummyloop < 1; dummyloop++) {
          HavlakLoopFinder finder = new HavlakLoopFinder(app.cfg, app.lsg);
          finder.findLoops();
        }

        result += "Constructing CFG...<br>";
        serverResponseLabel.setHTML(result);
        int n = 2;

        for (int parlooptrees = 0; parlooptrees < 10; parlooptrees++) {
          app.cfg.createNode(n + 1);
          app.buildConnect(2, n + 1);
          n = n + 1;

          for (int i = 0; i < 2; i++) {
            int top = n;
            n = app.buildStraight(n, 1);
            for (int j = 0; j < 25; j++) {
              n = app.buildBaseLoop(n);
            }
            int bottom = app.buildStraight(n, 1);
            app.buildConnect(n, top);
            n = bottom;
          }
          app.buildConnect(n, 1);
        }

        result += "Performing Loop Recognition\n1 Iteration<br>";
        HavlakLoopFinder finder = new HavlakLoopFinder(app.cfg, app.lsg);
        finder.findLoops();
        long t = System.currentTimeMillis() - start;
        result += "Found: " + app.lsg.getNumLoops() + " in " +
            t + " [ms]";

        result += "Another 100 iterations...<br>";
        for (int i = 0; i < 100; i++) {
          HavlakLoopFinder finder2 = new HavlakLoopFinder(app.cfg, new LSG());
          finder2.findLoops();
        }
        t = System.currentTimeMillis() - start;
        result += "<br>Found: " + app.lsg.getNumLoops() + " in " +
            t + " [ms]";
View Full Code Here

Examples of havlakloopfinder.HavlakLoopFinder

    app.cfg.createNode(1);
    new BasicBlockEdge(app.cfg, 0, 2);

    System.out.println("15000 dummy loops");
    for (int dummyloop = 0; dummyloop < 15000; dummyloop++) {
      HavlakLoopFinder finder = new HavlakLoopFinder(app.cfg, app.lsg);
      finder.findLoops();
    }

    System.out.println("Constructing CFG...");
    int n = 2;

    for (int parlooptrees = 0; parlooptrees < 10; parlooptrees++) {
      app.cfg.createNode(n + 1);
      app.buildConnect(2, n + 1);
      n = n + 1;

      for (int i = 0; i < 100; i++) {
        int top = n;
        n = app.buildStraight(n, 1);
        for (int j = 0; j < 25; j++) {
          n = app.buildBaseLoop(n);
        }
        int bottom = app.buildStraight(n, 1);
        app.buildConnect(n, top);
        n = bottom;
      }
      app.buildConnect(n, 1);
    }

    app.getMem();
    System.out.format("Performing Loop Recognition\n1 Iteration\n");
    HavlakLoopFinder finder = new HavlakLoopFinder(app.cfg, app.lsg);
    finder.findLoops();
    app.getMem();

    System.out.println("Another 50 iterations...");
    for (int i = 0; i < 50; i++) {
      System.out.format(".");
      HavlakLoopFinder finder2 = new HavlakLoopFinder(app.cfg, new LSG());
      finder2.findLoops();
    }

    System.out.println("");
    app.getMem();
    System.out.println("# of loops: " + app.lsg.getNumLoops() +
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.