5 public class ExprPredicate extends Predicate {
10 public static final int SIZE=1;
11 public static final int COMPARISON=2;
13 public String name() {
17 public int getType() {
18 if (((OpExpr)expr).left instanceof SizeofExpr)
20 else if (((OpExpr)expr).left instanceof RelationExpr)
22 else throw new Error("Unidentifiable Type");
25 public Opcode getOp() {
26 return ((OpExpr)expr).opcode;
29 public int rightSize() {
30 return OpExpr.getInt(((OpExpr)expr).right);
33 public boolean isRightInt() {
34 return OpExpr.isInt(((OpExpr)expr).right);
37 public ExprPredicate(Expr expr) {
39 throw new NullPointerException();
44 public Set getInversedRelations() {
45 return expr.getInversedRelations();
48 public int[] getRepairs(boolean negated) {
49 return expr.getRepairs(negated);
52 public Descriptor getDescriptor() {
53 return expr.getDescriptor();
56 public boolean inverted() {
57 return expr.inverted();
60 public boolean usesDescriptor(RelationDescriptor rd) {
61 return expr.usesDescriptor(rd);
64 public Set getRequiredDescriptors() {
65 return expr.getRequiredDescriptors();
68 public void generate(CodeWriter writer, VarDescriptor dest) {
69 expr.generate(writer, dest);