From: jihoonl Date: Tue, 23 Jun 2009 19:12:24 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=54685049443a7f8a15c4a48068a017cce4ceb4a3;p=IRC.git *** empty log message *** --- diff --git a/Robust/src/Benchmarks/SingleTM/Labyrinth/Grid.java b/Robust/src/Benchmarks/SingleTM/Labyrinth/Grid.java index 09bd64f0..35805579 100644 --- a/Robust/src/Benchmarks/SingleTM/Labyrinth/Grid.java +++ b/Robust/src/Benchmarks/SingleTM/Labyrinth/Grid.java @@ -288,7 +288,7 @@ void grid_addPath (grid_t* gridPtr, vector_t* pointVectorPtr); int i; int n = pointVectorPtr.vector_getSize(); - for(i = 1; i < (n-1); i++) { + for(i = 0; i < n; i++) { Coordinate coordinatePtr = (Coordinate)pointVectorPtr.vector_at(i); int x = coordinatePtr.x; int y = coordinatePtr.y; @@ -322,7 +322,7 @@ void grid_print (grid_t* gridPtr); for(x = 0; x < width; x++) { int y; for(y = 0; y < height; y++) { - System.out.println(points_unaligned[getPointIndex(x,y,z)]); + System.out.print(points_unaligned[getPointIndex(x,y,z)][0] + " "); } System.out.println(""); } diff --git a/Robust/src/Benchmarks/SingleTM/Labyrinth/Labyrinth.bin b/Robust/src/Benchmarks/SingleTM/Labyrinth/Labyrinth.bin deleted file mode 100755 index ffcc0b44..00000000 Binary files a/Robust/src/Benchmarks/SingleTM/Labyrinth/Labyrinth.bin and /dev/null differ diff --git a/Robust/src/Benchmarks/SingleTM/Labyrinth/Labyrinth.java b/Robust/src/Benchmarks/SingleTM/Labyrinth/Labyrinth.java index 89600961..74c21775 100644 --- a/Robust/src/Benchmarks/SingleTM/Labyrinth/Labyrinth.java +++ b/Robust/src/Benchmarks/SingleTM/Labyrinth/Labyrinth.java @@ -100,39 +100,42 @@ public class Labyrinth extends Thread{ String arg; boolean opterr = false; - setDefaultParams(); - while (i < arg.length() && argv[i].charAt(0) == '-' ) { - arg = argv[i++]; + setDefaultParams(); - // check options - if(arg.equals("-b")) { - bendCost = Integer.parseInt(argv[i++]); - } - else if(arg.equals("-x")) { - xCost = Integer.parseInt(argv[i++]); - } - else if(arg.equals("-y")) { - yCost = Integer.parseInt(argv[i++]); - } - else if(arg.equals("-z")) { - zCost = Integer.parseInt(argv[i++]); - } - else if(arg.equals("-t")) { - numThread = Integer.parseInt(argv[i++]); - } - else if(arg.equals("-i")) { - global_inputFile = argv[i++]; - } - else if(arg.equals("-p")) { - global_doPrint = true; - } - else { - System.out.println("Non-option argument: " + argv[i]); - opterr = true; + while (i < argv.length) { + + if(argv[i].charAt(0) == '-' ) { + arg = argv[i++]; + // check options + if(arg.equals("-b")) { + bendCost = Integer.parseInt(argv[i++]); + } + else if(arg.equals("-x")) { + xCost = Integer.parseInt(argv[i++]); + } + else if(arg.equals("-y")) { + yCost = Integer.parseInt(argv[i++]); + } + else if(arg.equals("-z")) { + zCost = Integer.parseInt(argv[i++]); + } + else if(arg.equals("-t")) { + numThread = Integer.parseInt(argv[i++]); + } + else if(arg.equals("-i")) { + global_inputFile = argv[i++]; + } + else if(arg.equals("-p")) { + global_doPrint = true; + } + else { + System.out.println("Non-option argument: " + argv[i]); + opterr = true; + } + } } - if(opterr) { displayUsage(); System.exit(1); diff --git a/Robust/src/Benchmarks/SingleTM/Labyrinth/Maze.java b/Robust/src/Benchmarks/SingleTM/Labyrinth/Maze.java index c2ac425b..4006484d 100644 --- a/Robust/src/Benchmarks/SingleTM/Labyrinth/Maze.java +++ b/Robust/src/Benchmarks/SingleTM/Labyrinth/Maze.java @@ -152,7 +152,7 @@ public class Maze { boolean isParseError = false; List_t workListPtr = List_t.alloc(1); // List.alloc(Coordinate.comparePair); String line; - + while((line = in.readLine()) != null) { String code; @@ -166,16 +166,16 @@ public class Maze { } code = tok.nextToken(); - + + if(code.equals("#")) { + /* comment line */ + continue; + } for(int i=0;i tmp${MAINCLASS}.java + cpp Grid.java > tmpGrid.java + cpp Router.java > tmpRouter.java + cpp Maze.java > tmpMaze.java + cpp Queue_t.java > tmpQueue_t.java + ./extractLines tmp${MAINCLASS}.java + ./extractLines tmpGrid.java + ./extractLines tmpRouter.java + ./extractLines tmpMaze.java + ./extractLines tmpQueue_t.java + ../../../buildscript ${FLAGS} -o ${MAINCLASS} ${SRC} + rm ttt*.java tmp*.java + ./Labyrinth.bin -i inputs/random-x32-y32-z3-n64.txt