public void Join(ConstantPropagationDomain other) { if (VarCount != other.VarCount) { throw new IncompatibleConstantPropagationDomains("Not the same variable set!"); } for (int i = 0; i < varMapping.Keys.Count; i++) { var v = varMapping.Keys.ElementAt(i); if (!other.Contains(v)) { throw new IncompatibleConstantPropagationDomains("Not the same variable set! " + v.ToString()); } var ncsd = Constants(v).Clone(); ncsd.Join(other.Constants(v)); Set(v, ncsd); } if (FieldCount != other.FieldCount) { throw new IncompatibleConstantPropagationDomains("Not the same field set!"); } for (int i = 0; i < fieldMapping.Keys.Count; i++) { var f = fieldMapping.Keys.ElementAt(i); if (!other.Contains(f)) { throw new IncompatibleConstantPropagationDomains("Not the same field set! " + f.ToString()); } var ncsd = Constants(f).Clone(); ncsd.Join(other.Constants(f)); Set(f, ncsd); } }