From: bdemsky Date: Wed, 9 Nov 2005 21:07:04 +0000 (+0000) Subject: Add option to remove conjunctions. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=96c9ce9856172bd1636c70d2e05786a72fa9027e;p=repair.git Add option to remove conjunctions. --- diff --git a/Repair/RepairCompiler/MCC/CLI.java b/Repair/RepairCompiler/MCC/CLI.java index b8cce23..39b64ef 100755 --- a/Repair/RepairCompiler/MCC/CLI.java +++ b/Repair/RepairCompiler/MCC/CLI.java @@ -12,7 +12,7 @@ import MCC.IR.RepairGenerator; * files. * * @author le01, 6.035 Staff (6.035-staff@mit.edu) - * @version $Id: CLI.java,v 1.20 2005/11/09 16:47:42 bdemsky Exp $ + * @version $Id: CLI.java,v 1.21 2005/11/09 21:06:29 bdemsky Exp $ */ public class CLI { /** @@ -104,6 +104,7 @@ 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"); @@ -125,6 +126,12 @@ public class CLI { 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")) { diff --git a/Repair/RepairCompiler/MCC/Compiler.java b/Repair/RepairCompiler/MCC/Compiler.java index a53acc7..f0b13cd 100755 --- a/Repair/RepairCompiler/MCC/Compiler.java +++ b/Repair/RepairCompiler/MCC/Compiler.java @@ -28,11 +28,14 @@ public class Compiler { 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) { diff --git a/Repair/RepairCompiler/MCC/IR/Termination.java b/Repair/RepairCompiler/MCC/IR/Termination.java index 8585655..32facba 100755 --- a/Repair/RepairCompiler/MCC/IR/Termination.java +++ b/Repair/RepairCompiler/MCC/IR/Termination.java @@ -173,6 +173,9 @@ public class Termination { Constraint c=(Constraint)constraints.get(i); DNFConstraint dnf=c.dnfconstraint; for(int j=0;j