Esempio n. 1
0
        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));
        }
Esempio n. 2
0
 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);
 }