BasicValue (BasicValue v1, BasicValue v2, Constraint constraint) { if (v1 instanceof LabeledNull) { return lNull; } else if (v2 instanceof LabeledNull) { int v2Origins = ((LabeledNull)v2).origins; int constraintOrigins = constraint.nulls; int intersect = v2Origins & constraintOrigins; return intersect == v2Origins ? v1 : lNull; } else if (v1 instanceof Calls calls1) { if (v2 instanceof Calls calls2) { int labels2 = calls2.mergedLabels; int aliveLabels2 = labels2 - (labels2 & constraint.calls); return new Calls(calls1.mergedLabels | aliveLabels2); } else { return v1; } } else if (v2 instanceof Calls) { Calls calls2 = (Calls)v2; int labels2 = calls2.mergedLabels; int aliveLabels2 = labels2 - (labels2 & constraint.calls); return new Calls(aliveLabels2); } return BasicValue.REFERENCE_VALUE; }