X-Git-Url: http://plrg.eecs.uci.edu/git/?p=repair.git;a=blobdiff_plain;f=Repair%2FRepairCompiler%2FMCC%2FCLI.java;h=7da685b666a37c0b92afc3af0c80d3ae1ba853f6;hp=11f479a8a47382afd1346d35d0a4af1e69164a64;hb=726db8dc825fb7f33f64f0aca6a4f63b0ba43313;hpb=860ccbdf9cd6f96c6bba58641372b6776987a080
diff --git a/Repair/RepairCompiler/MCC/CLI.java b/Repair/RepairCompiler/MCC/CLI.java
index 11f479a..7da685b 100755
--- a/Repair/RepairCompiler/MCC/CLI.java
+++ b/Repair/RepairCompiler/MCC/CLI.java
@@ -1,7 +1,7 @@
package MCC;
-import java.util.Vector;
-import java.util.StringTokenizer;
+import java.util.*;
+import MCC.IR.DebugItem;
/**
* A generic command-line interface for 6.035 compilers. This class
@@ -11,7 +11,7 @@ import java.util.StringTokenizer;
* files.
*
* @author le01, 6.035 Staff (6.035-staff@mit.edu)
- * @version $Id: CLI.java,v 1.5 2004/05/11 21:14:24 bdemsky Exp $
+ * @version $Id: CLI.java,v 1.13 2005/02/04 20:14:52 bdemsky Exp $
*/
public class CLI {
/**
@@ -98,16 +98,45 @@ public class CLI {
opts = new boolean[optnames.length];
+ if (args.length==0) {
+ System.out.println("-debugcompiler -- print out debug messages");
+ System.out.println("-depth depthnum constraintnum -- generate dependency graph from constraintnum with depth of depthnum");
+ System.out.println("-depthconj depthnum constraintnum conjunctionnum -- generate dependency graph from constraintnum with depth of depthnum");
+ System.out.println("-instrument -- generate instrumentation code");
+ System.out.println("-aggressivesearch");
+ System.out.println("-prunequantifiernodes");
+ System.out.println("-cplusplus");
+ System.out.println("-time");
+ System.out.println("-omitcomp");
+ System.exit(-1);
+ }
+
for (int i = 0; i < args.length; i++) {
- if (args[i].equals("-debug")) {
+ if (args[i].equals("-debugcompiler")) {
context = 0;
debug = true;
} else if (args[i].equals("-checkonly")) {
Compiler.REPAIR=false;
+ } else if (args[i].equals("-omitcomp")) {
+ Compiler.OMITCOMP=true;
+ } else if (args[i].equals("-depth")) {
+ Compiler.debuggraphs.add(new DebugItem(Integer.parseInt(args[i+1]),Integer.parseInt(args[i+2])));
+ i+=2;
+ } else if (args[i].equals("-depthconj")) {
+ Compiler.debuggraphs.add(new DebugItem(Integer.parseInt(args[i+1]),Integer.parseInt(args[i+2]),Integer.parseInt(args[i+3])));
+ i+=3;
+ } else if (args[i].equals("-debug")) {
+ Compiler.GENERATEDEBUGHOOKS=true;
+ } else if (args[i].equals("-time")) {
+ Compiler.TIME=true;
+ } else if (args[i].equals("-instrument")) {
+ Compiler.GENERATEINSTRUMENT=true;
} else if (args[i].equals("-aggressivesearch")) {
Compiler.AGGRESSIVESEARCH=true;
} else if (args[i].equals("-prunequantifiernodes")) {
Compiler.PRUNEQUANTIFIERS=true;
+ } else if (args[i].equals("-cplusplus")) {
+ Compiler.ALLOCATECPLUSPLUS=true;
} else if (args[i].equals("-verbose") || args[i].equals("-v")) {
context = 0;
verbose++;