Improved termination analysis so that daikon generated specifications won't have...
[repair.git] / Repair / RepairCompiler / MCC / IR / Constraint.java
index a506b037010d54e585135594b2620fb707490d61..c15d7494a3692d45df44d41706a66ea9beab919e 100755 (executable)
@@ -3,13 +3,13 @@ package MCC.IR;
 import java.util.*;
 
 public class Constraint implements Quantifiers {
-    
+
     private static int count = 1;
 
     String label = null;
     boolean crash = false;
     SymbolTable st = new SymbolTable();
-    Vector quantifiers = new Vector(); 
+    Vector quantifiers = new Vector();
     LogicStatement logicstatement = null;
     DNFConstraint dnfconstraint;
     int num;
@@ -19,6 +19,10 @@ public class Constraint implements Quantifiers {
         label = new String("c" + count++);
     }
 
+    public DNFConstraint getDNFConstraint() {
+        return dnfconstraint;
+    }
+
     public String toString() {
        String name="";
        for(int i=0;i<numQuantifiers();i++) {
@@ -61,7 +65,7 @@ public class Constraint implements Quantifiers {
     public LogicStatement getLogicStatement() {
         return logicstatement;
     }
-    
+
     public void setCrash(boolean crash) {
         this.crash = crash;
     }
@@ -74,7 +78,7 @@ public class Constraint implements Quantifiers {
 
         HashSet topdescriptors = new HashSet();
 
-        for (int i = 0; i < quantifiers.size(); i++) {            
+        for (int i = 0; i < quantifiers.size(); i++) {
             Quantifier q = (Quantifier) quantifiers.elementAt(i);
             topdescriptors.addAll(q.getRequiredDescriptors());
         }
@@ -83,18 +87,17 @@ public class Constraint implements Quantifiers {
     }
 
     public Set getRequiredDescriptorsFromLogicStatement() {
-        
+
         HashSet topdescriptors = new HashSet();
 
         topdescriptors.addAll(logicstatement.getRequiredDescriptors());
 
         return SetDescriptor.expand(topdescriptors);
     }
-   
+
     public Set getRequiredDescriptors() {
         Set set = getRequiredDescriptorsFromQuantifiers();
         set.addAll(getRequiredDescriptorsFromLogicStatement());
         return set;
     }
 }
-