changes on the SJava inference
[IRC.git] / Robust / src / Analysis / SSJava / SSJavaLattice.java
1 package Analysis.SSJava;
2
3 import java.util.HashSet;
4 import java.util.Set;
5
6 import Util.Lattice;
7
8 public class SSJavaLattice<T> extends Lattice<T> {
9
10   public static final String TOP = "_top_";
11   public static final String BOTTOM = "_bottom_";
12
13   Set<T> sharedLocSet;
14
15   public SSJavaLattice(T top, T bottom) {
16     super(top, bottom);
17     sharedLocSet = new HashSet<T>();
18   }
19
20   public Set<T> getSharedLocSet() {
21     return sharedLocSet;
22   }
23
24   public void addSharedLoc(T loc) {
25     sharedLocSet.add(loc);
26   }
27
28   public boolean isSharedLoc(T loc) {
29     return sharedLocSet.contains(loc);
30   }
31
32   public boolean addRelationHigherToLower(T higher, T lower) {
33
34     System.out.println("add a relation: " + lower + "<" + higher);
35
36     return put(higher, lower);
37   }
38
39 }