4 public class InvariantValue {
8 public InvariantValue() {
9 maybevalue=new Hashtable();
10 value=new Hashtable();
13 void assignPair(Expr e, VarDescriptor val, VarDescriptor maybe) {
15 maybevalue.put(e,maybe);
18 VarDescriptor getValue(Expr e) {
19 if (value.containsKey(e))
20 return (VarDescriptor)value.get(e);
21 throw new Error("No Value");
24 VarDescriptor getMaybe(Expr e) {
25 if (maybevalue.containsKey(e))
26 return (VarDescriptor)maybevalue.get(e);
27 throw new Error("No Value");
30 boolean isInvariant(Expr e) {
31 return maybevalue.containsKey(e);