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 leftsize() {
30 return ((IntegerLiteralExpr)((OpExpr)expr).right).getValue();
33 public ExprPredicate(Expr expr) {
35 throw new NullPointerException();
40 public Set getInversedRelations() {
41 return expr.getInversedRelations();
44 public int[] getRepairs(boolean negated) {
45 return expr.getRepairs(negated);
48 public Descriptor getDescriptor() {
49 return expr.getDescriptor();
52 public boolean inverted() {
53 return expr.inverted();
56 public boolean usesDescriptor(RelationDescriptor rd) {
57 return expr.usesDescriptor(rd);
60 public Set getRequiredDescriptors() {
61 return expr.getRequiredDescriptors();
64 public void generate(CodeWriter writer, VarDescriptor dest) {
65 expr.generate(writer, dest);