projects
/
repair.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e8e7caf
)
Add option to remove conjunctions.
author
bdemsky
<bdemsky>
Wed, 9 Nov 2005 21:07:04 +0000
(21:07 +0000)
committer
bdemsky
<bdemsky>
Wed, 9 Nov 2005 21:07:04 +0000
(21:07 +0000)
Repair/RepairCompiler/MCC/CLI.java
patch
|
blob
|
history
Repair/RepairCompiler/MCC/Compiler.java
patch
|
blob
|
history
Repair/RepairCompiler/MCC/IR/Termination.java
patch
|
blob
|
history
Repair/RepairCompiler/MCC/IR/UpdateNode.java
patch
|
blob
|
history
diff --git
a/Repair/RepairCompiler/MCC/CLI.java
b/Repair/RepairCompiler/MCC/CLI.java
index b8cce23e2c2b62857c1e25ab22ac50ac2be1c935..39b64ef3b2a6320475219f48e5aa1407fea1e1df 100755
(executable)
--- 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 (<tt>6.035-staff@mit.edu</tt>)
* files.
*
* @author le01, 6.035 Staff (<tt>6.035-staff@mit.edu</tt>)
- * @version <tt>$Id: CLI.java,v 1.2
0 2005/11/09 16:47:42
bdemsky Exp $</tt>
+ * @version <tt>$Id: CLI.java,v 1.2
1 2005/11/09 21:06:29
bdemsky Exp $</tt>
*/
public class CLI {
/**
*/
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("-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");
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;
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")) {
} 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 a53acc721a85219c8e47d309aca06170d926b2de..f0b13cd9712ebc89312fb79755479bdb998ad6ac 100755
(executable)
--- 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 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 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) {
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 8585655710d9b7362f79815640074d404bfb38f4..32facba550d7cde1abc9663b8e0021e97d22b34d 100755
(executable)
--- 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<dnf.size();j++) {
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()
TermNode tn=new TermNode(c,dnf.get(j));
GraphNode gn=new GraphNode("Conj"+i+"A"+j,
"Conj ("+i+","+j+") "+dnf.get(j).name()
@@
-186,6
+189,8
@@
public class Termination {
}
// Construct quantifier "conjunction" nodes
for(int j=0;j<c.numQuantifiers();j++) {
}
// 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;
Quantifier q=c.getQuantifier(j);
if (q instanceof SetQuantifier) {
SetQuantifier sq=(SetQuantifier)q;
@@
-195,8
+200,8
@@
public class Termination {
dconst=dconst.not();
TermNode tn=new TermNode(c,dconst.get(0));
tn.setquantifiernode();
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);
,tn);
gn.setOption(conjoption);
conjunctions.add(gn);
@@
-213,8
+218,8
@@
public class Termination {
dconst=dconst.not();
TermNode tn=new TermNode(c,dconst.get(0));
tn.setquantifiernode();
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);
,tn);
gn.setOption(conjoption);
conjunctions.add(gn);
diff --git
a/Repair/RepairCompiler/MCC/IR/UpdateNode.java
b/Repair/RepairCompiler/MCC/IR/UpdateNode.java
index 0f472875ed2f966d5c61f7abc18f3b2f6e1fb30d..9892ad2e2c17376dc1887225a4412fe5fe1a107e 100755
(executable)
--- a/
Repair/RepairCompiler/MCC/IR/UpdateNode.java
+++ b/
Repair/RepairCompiler/MCC/IR/UpdateNode.java
@@
-52,6
+52,7
@@
class UpdateNode {
return false;
if (computeordering()) /* Ordering exists */
return true;
return false;
if (computeordering()) /* Ordering exists */
return true;
+
return false;
}
return false;
}