From: bdemsky Date: Mon, 19 Jul 2004 04:54:18 +0000 (+0000) Subject: Remove two files that were never actually used. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=repair.git;a=commitdiff_plain;h=956b402206e64a3a6e4acad10310ec831e041be4 Remove two files that were never actually used. --- diff --git a/Repair/RepairCompiler/MCC/IR/ComparisonPredicate.java b/Repair/RepairCompiler/MCC/IR/ComparisonPredicate.java deleted file mode 100755 index 63390e9..0000000 --- a/Repair/RepairCompiler/MCC/IR/ComparisonPredicate.java +++ /dev/null @@ -1,63 +0,0 @@ -package MCC.IR; - -import java.util.*; - -public class ComparisonPredicate extends Predicate { - - VarDescriptor quantifier; - RelationDescriptor relation; - Opcode opcode; - Expr expr; - - public ComparisonPredicate(VarDescriptor quantifier, RelationDescriptor relation, Opcode opcode, Expr expr) { - if (quantifier == null || relation == null || opcode == null || expr == null) { - throw new IllegalArgumentException(); - } else if (opcode != Opcode.EQ && - opcode != Opcode.NE && - opcode != Opcode.GT && - opcode != Opcode.GE && - opcode != Opcode.LT && - opcode != Opcode.LE) { - throw new IllegalArgumentException("invalid operator type"); - } - - this.quantifier = quantifier; - this.relation = relation; - this.opcode = opcode; - this.expr = expr; - } - - public Set getRequiredDescriptors() { - assert expr != null; - Set v = expr.getRequiredDescriptors(); - v.add(relation); - return v; - } - - public int[] getRepairs(boolean negated) { - return new int[] {AbstractRepair.MODIFYRELATION}; - } - - public void generate(CodeWriter writer, VarDescriptor vd) { - // get (first) value for quantifer.relation ... then do comparison with expr... - // can this be maybe? i guess if quantifer.relation is empty - - String rv = (VarDescriptor.makeNew("relval")).getSafeSymbol(); - writer.outputline("int " + rv + " = " + relation.getSafeSymbol() + "_hash->get(" + quantifier.getSafeSymbol() + ");"); - - // #TBD# deal with maybe (catch exception?) - - VarDescriptor ev = VarDescriptor.makeNew("exprval"); - expr.generate(writer, ev); - - writer.outputline("int " + vd.getSafeSymbol() + " = " + rv + opcode.toString() + ev.getSafeSymbol() + ";"); - } - -} - - - - - - - diff --git a/Repair/RepairCompiler/MCC/IR/SizeofPredicate.java b/Repair/RepairCompiler/MCC/IR/SizeofPredicate.java deleted file mode 100755 index 4d375ac..0000000 --- a/Repair/RepairCompiler/MCC/IR/SizeofPredicate.java +++ /dev/null @@ -1,72 +0,0 @@ -package MCC.IR; - -import java.util.*; - -public class SizeofPredicate extends Predicate { - - SetExpr setexpr; - Opcode opcode; - IntegerLiteralExpr cardinality; - - public SizeofPredicate(SetExpr setexpr, Opcode opcode, IntegerLiteralExpr cardinality) { - if (setexpr == null || opcode == null || cardinality == null) { - throw new IllegalArgumentException(); - } else if (opcode != Opcode.EQ && - opcode != Opcode.GE && - opcode != Opcode.LE) { - throw new IllegalArgumentException("invalid operator type"); - } - - this.setexpr = setexpr; - this.opcode = opcode; - this.cardinality = cardinality; - } - - public int[] getRepairs(boolean negated) { - if (setexpr instanceof ImageSetExpr) { - if (opcode==Opcode.EQ) - return new int[] {AbstractRepair.ADDTORELATION, - AbstractRepair.REMOVEFROMRELATION}; - if (((opcode==Opcode.GE)&&!negated)|| - ((opcode==Opcode.LE)&&negated)) - return new int[]{AbstractRepair.ADDTORELATION}; - else - return new int[]{AbstractRepair.REMOVEFROMRELATION}; - } else { - if (opcode==Opcode.EQ) - return new int[] {AbstractRepair.ADDTOSET, - AbstractRepair.REMOVEFROMSET}; - - if (((opcode==Opcode.GE)&&!negated)|| - ((opcode==Opcode.LE)&&negated)) - return new int[] {AbstractRepair.ADDTOSET}; - else - return new int[] {AbstractRepair.REMOVEFROMSET}; - } - } - - public Set getRequiredDescriptors() { - assert setexpr != null; - Set v = setexpr.getRequiredDescriptors(); - // v.add(cardinality.getRequiredDescriptors()); // will be null - return v; - } - - public void generate(CodeWriter writer, VarDescriptor dest) { - - // #TBD#: generate the set which should generate a name (variable) which is the pointer - // to a hash table iterator that we can dereference get something blah blah blah - - VarDescriptor size = VarDescriptor.makeNew("size"); - setexpr.generate_size(writer, size); - - writer.outputline("int " + dest.getSafeSymbol() + " = " + size.getSafeSymbol() + opcode.toString() + cardinality.getValue() + ";"); - } - -} - - - - - -