/** for all var in env2 if var !in env1 && var in this : error exp1 optional exp2 */ boolean check(Bind env1, Bind env2) { for (Enumeration<String> en = env2.keys(); en.hasMoreElements(); ) { String var = en.nextElement(); if (!env1.contains(var) && this.contains(var)) { return false; } } return true; }
Bind merge(Bind b) { for (Enumeration<String> en = b.keys(); en.hasMoreElements(); ) { String var = en.nextElement(); this.put(var, var); } return this; }