1 package Analysis.Disjoint;
3 // a CanonicalOperation defines an operation on
4 // Canonical objects. The Canonical class maps
5 // an op to its result, so when you ask the
6 // Canonical static methods to do an op that is
7 // non-trivial, it will generate one of these
8 // first and do a result look-up
9 public class CanonicalOp {
11 public static final int REACHSTATE_ATTACH_EXISTPREDSET = 0x8358;
12 public static final int REACHSTATE_UNION_REACHSTATE = 0x5678;
13 public static final int REACHSTATE_ADD_REACHTUPLE = 0x32b6;
14 public static final int REACHSTATE_UNIONUPARITY_REACHSTATE = 0x9152;
15 public static final int REACHSTATE_REMOVE_REACHTUPLE = 0x8173;
16 public static final int REACHSTATE_AGETUPLESFROM_ALLOCSITE = 0x4f65;
17 public static final int REACHSET_UNIONORPREDS_REACHSET = 0x2131;
18 public static final int REACHSET_INTERSECTION_REACHSET = 0x3361;
19 public static final int REACHSET_REMOVE_REACHSTATE = 0x9391;
20 public static final int REACHSET_APPLY_CHANGESET = 0x1d55;
21 public static final int REACHSET_UNIONTOCHANGESET_REACHSET = 0x46a9;
22 public static final int REACHSET_AGETUPLESFROM_ALLOCSITE = 0x22bb;
23 public static final int REACHSET_PRUNEBY_REACHSET = 0xd774;
24 public static final int CHANGESET_UNION_CHANGESET = 0x53b3;
25 public static final int CHANGESET_UNION_CHANGETUPLE = 0x9ee4;
26 public static final int EXISTPREDSET_JOIN_EXISTPREDSET = 0x8a21;
27 public static final int EXISTPREDSET_ADD_EXISTPRED = 0xba5f;
28 public static final int PRIM_OP_UNUSED = 0xef01;
29 public static final int REACHSET_TOCALLEECONTEXT_ALLOCSITE = 0x56f6;
30 public static final int REACHSTATE_TOCALLEECONTEXT_ALLOCSITE = 0x7faf;
31 public static final int REACHSET_TOCALLERCONTEXT_ALLOCSITE = 0x2f6a;
32 public static final int REACHSTATE_TOCALLERCONTEXT_ALLOCSITE = 0xb2b1;
33 public static final int REACHSET_UNSHADOW_ALLOCSITE = 0x1049;
34 public static final int REACHSTATE_UNSHADOW_ALLOCSITE = 0x08ef;
37 protected Canonical operand1;
38 protected Canonical operand2;
39 protected int operand3;
41 public CanonicalOp( int opc,
44 this( opc, op1, op2, PRIM_OP_UNUSED );
47 public CanonicalOp( int opc,
51 assert op1.isCanonical();
52 assert op2.isCanonical();
59 public int hashCode() {
61 (operand1.getCanonicalValue() << 2) ^
62 (operand2.getCanonicalValue() << 1) ^
66 public boolean equals( Object o ) {
71 CanonicalOp co = (CanonicalOp) o;
72 return opCode == co.opCode &&
73 (operand1.getCanonicalValue() == co.operand1.getCanonicalValue()) &&
74 (operand2.getCanonicalValue() == co.operand2.getCanonicalValue()) &&
75 operand3 == co.operand3;