X-Git-Url: http://plrg.eecs.uci.edu/git/?p=repair.git;a=blobdiff_plain;f=Repair%2FRepairCompiler%2FMCC%2FIR%2FExpr.java;h=51ae61360906a92f2568787aa8f795f8e38ec5cf;hp=cd822275145e994fe32a07b3de719569621b89e7;hb=95271a46ce6573ff5532fda46561d2936cb25393;hpb=1f69c464c78b106f89d84c1c5f3209fb1e48ed12 diff --git a/Repair/RepairCompiler/MCC/IR/Expr.java b/Repair/RepairCompiler/MCC/IR/Expr.java index cd82227..51ae613 100755 --- a/Repair/RepairCompiler/MCC/IR/Expr.java +++ b/Repair/RepairCompiler/MCC/IR/Expr.java @@ -7,6 +7,8 @@ public abstract class Expr { TypeDescriptor td = null; public Expr() {} + /* Remap this's variables using the remap mapping */ + public abstract boolean equals(Map remap, Expr e); public abstract Set getRequiredDescriptors(); @@ -17,6 +19,11 @@ public abstract class Expr { return td; } + public String name() { + System.out.println(this.getClass().getName()); + return "?"; + } + public abstract TypeDescriptor typecheck(SemanticAnalyzer sa); public abstract void prettyPrint(PrettyPrinter pp); @@ -29,4 +36,74 @@ public abstract class Expr { return new DNFRule(this); } + public Descriptor getDescriptor() { + return null; + } + + 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"); + } + + public boolean inverted() { + 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(); + } }