2 bug fixes to getRequiredConstraints
authorbdemsky <bdemsky>
Wed, 12 Oct 2005 17:43:10 +0000 (17:43 +0000)
committerbdemsky <bdemsky>
Wed, 12 Oct 2005 17:43:10 +0000 (17:43 +0000)
added option to reject updates that change the layout of objects.

Repair/RepairCompiler/MCC/CLI.java
Repair/RepairCompiler/MCC/Compiler.java
Repair/RepairCompiler/MCC/State.java

index 7a38d83066ff4a605133cdf2ccefcb1e78e4769c..d69310a63d41acecbc7c5832eb7e9758975ca3d7 100755 (executable)
@@ -11,7 +11,7 @@ import MCC.IR.DebugItem;
  * files.
  *
  * @author  le01, 6.035 Staff (<tt>6.035-staff@mit.edu</tt>)
- * @version <tt>$Id: CLI.java,v 1.16 2005/10/02 05:13:26 bdemsky Exp $</tt>
+ * @version <tt>$Id: CLI.java,v 1.17 2005/10/12 17:43:10 bdemsky Exp $</tt>
  */
 public class CLI {
     /**
@@ -110,6 +110,8 @@ public class CLI {
            System.out.println("-omitcomp -- omit compensation updates");
            System.out.println("-mergenodes -- omit nodes for simpler role dependence graphs");
            System.out.println("-debuggraph -- add edge labels and support to debug graph");
+           System.out.println("-rejectlengthchanges -- reject all updates which change the length of an array");
+
            System.exit(-1);
        }
 
@@ -131,6 +133,8 @@ public class CLI {
            } 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("-rejectlengthchanges")) {
+                Compiler.REJECTLENGTH=true;
            } else if (args[i].equals("-debug")) {
                 Compiler.GENERATEDEBUGHOOKS=true;
            } else if (args[i].equals("-time")) {
index 213abddf6060bf7def18410c0e532ccf8bed60e9..5fa3fca1a81ccf07b6d65b7838959ef55e645319 100755 (executable)
@@ -29,6 +29,7 @@ public class Compiler {
     public static boolean MERGENODES=false;
     public static boolean TIME=false;
     public static boolean DEBUGGRAPH=false;
+    public static boolean REJECTLENGTH=false;
 
     public static Vector debuggraphs=new Vector();
 
index d30e7cc4af074909c953d8085b7148b0a36e5e59..55a86e10578c3ee02c73d95e8088b1ed74305ce0 100755 (executable)
@@ -6,7 +6,7 @@ import MCC.IR.*;
 import java.util.*;
 
 public class State {
-    
+
     public static State currentState = null;
 
     public static boolean failed = false;
@@ -32,9 +32,10 @@ public class State {
     public Vector vRules;
 
     public Hashtable rulenodes;
-    public Hashtable constraintnodes;    
+    public Hashtable constraintnodes;
     public Hashtable implicitrule;
     public Hashtable implicitruleinv;
+    public HashSet noupdate;
 
     public SetAnalysis setanalysis;
     State() {
@@ -52,6 +53,7 @@ public class State {
         ptSpace = null;
        implicitrule=new Hashtable();
        implicitruleinv=new Hashtable();
+        noupdate=new HashSet();
     }
 
     void printall() {
@@ -64,5 +66,5 @@ public class State {
            System.out.println(c.toString());
        }
     }
-    
+
 }