X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=Repair%2FRepairCompiler%2FMCC%2FIR%2FExpr.java;h=9eb610653591d7f8ac79a293cf916c0aadf0bef1;hb=3e4091248270631ee6dab18b323d0c441a4e4ae1;hp=4e9d283781c9b08b1b7e19fa28c38fd582335433;hpb=30816378d0198b3cdeac43ad5bf80df3b7646406;p=repair.git diff --git a/Repair/RepairCompiler/MCC/IR/Expr.java b/Repair/RepairCompiler/MCC/IR/Expr.java index 4e9d283..9eb6106 100755 --- a/Repair/RepairCompiler/MCC/IR/Expr.java +++ b/Repair/RepairCompiler/MCC/IR/Expr.java @@ -3,7 +3,7 @@ package MCC.IR; import java.util.*; public abstract class Expr { - + TypeDescriptor td = null; public Expr() {} @@ -19,7 +19,12 @@ public abstract class Expr { return td; } + public String toString() { + return name(); + } + public String name() { + System.out.println(this.getClass().getName()); return "?"; } @@ -39,7 +44,11 @@ public abstract class Expr { return null; } - public int[] getRepairs(boolean negated) { + public boolean isValue(TypeDescriptor td) { + return false; + } + + public int[] getRepairs(boolean negated, Termination t) { System.out.println(this.getClass().getName()); throw new Error("Unrecognized EXPR"); } @@ -48,9 +57,57 @@ public abstract class Expr { return false; } + public Set useDescriptor(Descriptor d) { + return new HashSet(); + } + public boolean usesDescriptor(Descriptor rd) { System.out.println(this.getClass().getName()); throw new Error("UNIMPLEMENTED"); } + public boolean isNull() { + return false; + } + public boolean isNonNull() { + return false; + } + public Set freeVars() { + return null; + } + + public void findmatch(Descriptor d, Set s) { + } + public Set getfunctions() { + return null; + } + + public SetDescriptor getSet() { + return null; /* unknown value */ + } + + public Expr stripCastExpr() { + Expr ptr=this; + while (ptr instanceof CastExpr) + ptr=((CastExpr)ptr).getExpr(); + return ptr; + } + + public boolean isSafe() { + return true; + } + + public Expr getLower() { + return null; + } + + public Expr getUpper() { + return null; + } + public boolean isInvariant(Set vars) { + return false; + } + public Set findInvariants(Set vars) { + return new HashSet(); + } }