*/
public SimAtom makeAtom(Sig sig) throws Err {
if (sig.builtin) throw new ErrorAPI("Cannot add an atom to a builtin sig.");
if (!(sig instanceof PrimSig)) throw new ErrorAPI("Cannot add an atom to a subset sig.");
PrimSig s = (PrimSig)sig;
if (s.isAbstract!=null && !s.children().isEmpty()) throw new ErrorAPI("Cannot add an atom to an abstract parent sig.");
String label = sig.label + "$";
if (label.startsWith("this/")) label=label.substring(5);
for(int i=0; ;i++) {
SimAtom atom = SimAtom.make(label + i);
if (hasAtom(atom)) continue;