public VariableEffects Lub(VariableEffects other) { var lubVars = new Map <Identifier, ReadWriteDomain>(); foreach (var kv in vars) { var rw = default(ReadWriteDomain); if (other.vars.TryGetValue(kv.Key, out rw)) { lubVars.Add(kv.Key, kv.Value.Lub(rw)); } else { lubVars.Add(kv.Key, kv.Value); } } foreach (var kv in other.vars) { if (!vars.ContainsKey(kv.Key)) { lubVars.Add(kv.Key, kv.Value); } } return(new VariableEffects(lubVars)); }
public bool DisjointKeys(IImMap <K, V> other) { if (entries == null || other.Count == 0) { return(true); } foreach (var e in entries) { if (e != null) { if (other.ContainsKey(e.Key)) { return(false); } } } return(true); }