* files.
*
* @author le01, 6.035 Staff (<tt>6.035-staff@mit.edu</tt>)
- * @version <tt>$Id: CLI.java,v 1.20 2005/11/09 16:47:42 bdemsky Exp $</tt>
+ * @version <tt>$Id: CLI.java,v 1.21 2005/11/09 21:06:29 bdemsky Exp $</tt>
*/
public class CLI {
/**
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("-removeconj constr,conj");
System.out.println("-aggressivesearch -- search for one repair per constraint");
System.out.println("-prunequantifiernodes -- prune nodes that satisfy constraint by decreasing scope");
System.out.println("-cplusplus -- properly set up c++ classes");
debug = true;
} else if (args[i].equals("-checkonly")) {
Compiler.REPAIR=false;
+ } else if (args[i].equals("-removeconj")) {
+ if ((i+1)==args.length) {
+ throw new Error("No fieldname");
+ }
+ Compiler.removeconj.add(args[i+1]);
+ i++;
} else if (args[i].equals("-exactallocation")) {
Compiler.EXACTALLOCATION=true;
} else if (args[i].equals("-omitcomp")) {
public static boolean OMITCOMP=false;
public static boolean MERGENODES=false;
public static boolean TIME=false;
+
+ public static HashSet removeconj=new HashSet();
public static boolean DEBUGGRAPH=false;
public static boolean REJECTLENGTH=false;
public static boolean PRINTREPAIRS=false;
public static boolean EXACTALLOCATION=false;
+
public static Vector debuggraphs=new Vector();
public static void main(String[] args) {
Constraint c=(Constraint)constraints.get(i);
DNFConstraint dnf=c.dnfconstraint;
for(int j=0;j<dnf.size();j++) {
+ if (Compiler.removeconj.contains(new String(i+","+j)))
+ continue;
+
TermNode tn=new TermNode(c,dnf.get(j));
GraphNode gn=new GraphNode("Conj"+i+"A"+j,
"Conj ("+i+","+j+") "+dnf.get(j).name()
}
// Construct quantifier "conjunction" nodes
for(int j=0;j<c.numQuantifiers();j++) {
+ if (Compiler.removeconj.contains(new String(i+","+(j+constraints.size()))))
+ continue;
Quantifier q=c.getQuantifier(j);
if (q instanceof SetQuantifier) {
SetQuantifier sq=(SetQuantifier)q;
dconst=dconst.not();
TermNode tn=new TermNode(c,dconst.get(0));
tn.setquantifiernode();
- GraphNode gn=new GraphNode("Conj"+i+"AQ"+j,
- "Conj ("+i+","+j+") "+dconst.get(0).name()
+ GraphNode gn=new GraphNode("Conj"+i+"AQ"+(j+constraints.size()),
+ "Conj ("+i+","+(j+constraints.size())+") "+dconst.get(0).name()
,tn);
gn.setOption(conjoption);
conjunctions.add(gn);
dconst=dconst.not();
TermNode tn=new TermNode(c,dconst.get(0));
tn.setquantifiernode();
- GraphNode gn=new GraphNode("Conj"+i+"AQ"+j,
- "Conj ("+i+","+j+") "+dconst.get(0).name()
+ GraphNode gn=new GraphNode("Conj"+i+"AQ"+(j+constraints.size()),
+ "Conj ("+i+","+(j+constraints.size())+") "+dconst.get(0).name()
,tn);
gn.setOption(conjoption);
conjunctions.add(gn);