starting implementation for access paths to improve edge mapping
[IRC.git] / Robust / src / Analysis / OwnershipAnalysis / AccessPath.java
1 package Analysis.OwnershipAnalysis;
2
3 import IR.*;
4 import IR.Flat.*;
5 import java.util.*;
6
7 // An access path is relevant in a callee method to
8 // a caller's heap.  When mapping edges from a callee
9 // into the caller, if the caller's heap does not have
10 // any matching access paths, then the edge could not
11 // exist in that context and is ignored.
12
13 public class AccessPath {
14
15   public AccessPath() {
16   }
17
18   public boolean equals( Object o ) {
19     if( o == null ) {
20       return false;
21     }
22
23     if( !(o instanceof AccessPath) ) {
24       return false;
25     }
26
27     return true;
28     /*
29     VariableSourceToken vst = (VariableSourceToken) o;
30
31     // the reference vars have no bearing on equality
32     return    sese.equals( vst.sese    ) &&
33            addrVar.equals( vst.addrVar ) &&
34            seseAge.equals( vst.seseAge );
35     */
36   }
37
38   public int hashCode() {
39     // the reference vars have no bearing on hashCode
40     return 1; //(sese.hashCode() << 3) * (addrVar.hashCode() << 4) ^ seseAge.intValue();
41   }
42
43   public String toString() {
44     return "ap";
45   }
46
47   public String toStringForDOT() {
48     /*
49     if( disjointId != null ) {
50       return "disjoint "+disjointId+"\\n"+toString()+"\\n"+getType().toPrettyString();
51     } else {
52       return                              toString()+"\\n"+getType().toPrettyString();
53     }
54     */
55     return "do";
56   }  
57 }