5 public class ExprPredicate extends Predicate {
10 public static final int SIZE=1;
11 public static final int COMPARISON=2;
13 public int getType() {
14 if (((OpExpr)expr).left instanceof SizeofExpr)
16 else if (((OpExpr)expr).left instanceof RelationExpr)
18 else throw new Error("Unidentifiable Type");
21 public Opcode getOp() {
22 return ((OpExpr)expr).opcode;
25 public int leftsize() {
26 return ((IntegerLiteralExpr)((OpExpr)expr).right).getValue();
29 public ExprPredicate(Expr expr) {
31 throw new NullPointerException();
36 public Set getInversedRelations() {
37 return expr.getInversedRelations();
40 public int[] getRepairs(boolean negated) {
41 return expr.getRepairs(negated);
44 public Descriptor getDescriptor() {
45 return expr.getDescriptor();
48 public boolean inverted() {
49 return expr.inverted();
52 public boolean usesDescriptor(RelationDescriptor rd) {
53 return expr.usesDescriptor(rd);
56 public Set getRequiredDescriptors() {
57 return expr.getRequiredDescriptors();
60 public void generate(CodeWriter writer, VarDescriptor dest) {
61 expr.generate(writer, dest);