*/
private void computeUpperBound(PrimSig sig) throws Err {
// Sig's upperbound is fully computed. We recursively compute the upperbound for children...
TupleSet x = ub.get(sig).clone();
// We remove atoms that MUST be in a subsig
for(PrimSig c: sig.children()) x.removeAll(lb.get(c));
// So now X is the set of atoms that MIGHT be in this sig, but MIGHT NOT be in any particular subsig.
// For each subsig that may need more atom, we say it could potentionally get any of the atom from X.
for(PrimSig c: sig.children()) {
if (sc.sig2scope(c) > lb.get(c).size()) ub.get(c).addAll(x);
computeUpperBound(c);