public void calculateOutSet(Unit u, BoundedFlowSet inSet, BoundedFlowSet outSet) { // If the def set is a subset of the in set, then out = in \ impure use, else // out = (in union def) \ use BoundedFlowSet defSet = defSetMap.get(u); BoundedFlowSet inComplement = (BoundedFlowSet) inSet.clone(); inComplement.complement(); inComplement.intersection(defSet); if (inComplement.size() == 0) { inSet.copy(outSet); outSet.difference(useSetMap.get(u)); } else { inSet.union(defSet, outSet); outSet.difference(useSetMap.get(u)); } }
public BoundedFlowSet createOutSet(Unit u) { // Initial value for the out set is the universal set return (BoundedFlowSet) universalSet.clone(); }