more new mlp stuff
[IRC.git] / Robust / src / Analysis / MLP / VarSrcTokTable.java
1 package Analysis.MLP;
2
3 import IR.*;
4 import IR.Flat.*;
5 import java.util.*;
6 import java.io.*;
7
8 public class VarSrcTokTable {
9   
10   // be able to grab the VariableSourceToken triples from the
11   // table by the sese, by the variable, or by a key that is
12   // an sese/variable pair
13   private Hashtable< FlatSESEEnterNode, Set<VariableSourceToken> > sese2vst;
14   private Hashtable< TempDescriptor,    Set<VariableSourceToken> >  var2vst;
15   private Hashtable< SVKey,             Set<VariableSourceToken> >   sv2vst;
16
17   public VarSrcTokTable() {
18     sese2vst = new Hashtable< FlatSESEEnterNode, Set<VariableSourceToken> >();
19     var2vst  = new Hashtable< TempDescriptor,    Set<VariableSourceToken> >();
20     sv2vst   = new Hashtable< SVKey,             Set<VariableSourceToken> >();
21   }
22
23
24   public void add( VariableSourceToken vst ) {
25
26   }
27
28
29   public boolean equals( Object o ) {
30     if( o == null ) {
31       return false;
32     }
33
34     if( !(o instanceof VariableSourceToken) ) {
35       return false;
36     }
37
38     VariableSourceToken vst = (VariableSourceToken) o;
39
40     return var.equals( vst.var ) &&
41            age.equals( vst.age );
42   }
43
44   public int hashCode() {
45     return (var.hashCode() << 2) ^ age.intValue();
46   }
47
48
49   public String toString() {
50     return "["+var+", "+age+"]";
51   }
52 }