3 import java.util.HashSet;
5 import Analysis.OwnershipAnalysis.ReachabilitySet;
7 public class StallSite {
9 public static final Integer READ_EFFECT = new Integer(1);
10 public static final Integer WRITE_EFFECT = new Integer(2);
12 private HashSet<Effect> effectSet;
13 private HashSet<Integer> hrnIDSet;
14 private ReachabilitySet rechabilitySet;
17 effectSet = new HashSet<Effect>();
18 hrnIDSet = new HashSet<Integer>();
19 rechabilitySet = new ReachabilitySet();
22 public StallSite(HashSet<Effect> effectSet, HashSet<Integer> hrnIDSet,
23 ReachabilitySet rechabilitySet) {
24 this.effectSet = effectSet;
25 this.hrnIDSet = hrnIDSet;
26 this.rechabilitySet = rechabilitySet;
29 public void addEffect(String type, String field, Integer effect) {
30 Effect e = new Effect(type, field, effect);
34 public HashSet<Effect> getEffectSet() {
38 public HashSet<Integer> getHRNIDSet() {
42 public ReachabilitySet getReachabilitySet() {
43 return rechabilitySet;
46 public boolean equals(Object o) {
52 if (!(o instanceof StallSite)) {
56 StallSite in = (StallSite) o;
58 if (effectSet.equals(in.getEffectSet())
59 && hrnIDSet.equals(in.getHRNIDSet())
60 && rechabilitySet.equals(in.getReachabilitySet())) {
73 private Integer effect;
75 public Effect(String type, String field, Integer effect) {
81 public String getField() {
85 public String getType() {
89 public Integer getEffect() {
93 public boolean equals(Object o) {
99 if (!(o instanceof StallSite)) {
103 Effect in = (Effect) o;
105 if (type.equals(in.getType()) && field.equals(in.getField())
106 && effect.equals(in.getEffect())) {