set[f.var2Level(r.var())] = 1; BDD rl = r.low(); bdd_printset_rec(f, sb, rl, set); rl.free();  set[f.var2Level(r.var())] = 2; BDD rh = r.high(); bdd_printset_rec(f, sb, rh, set); rh.free();  set[f.var2Level(r.var())] = 0;
if (f.isZDD()) { if (r.low().equals(r.high())) { set[f.var2Level(r.var())] = 0; } else { BDD rl = r.low(); bdd_printset_rec(f, sb, rl, set); rl.free();  set[f.var2Level(r.var())] = 2; } BDD rl = r.high(); bdd_printset_rec(f, sb, rl, set); rl.free();  set[f.var2Level(r.var())] = 1; } else { set[f.var2Level(r.var())] = 1; BDD rl = r.low(); bdd_printset_rec(f, sb, rl, set); rl.free();  set[f.var2Level(r.var())] = 2; BDD rh = r.high(); bdd_printset_rec(f, sb, rh, set); rh.free();  set[f.var2Level(r.var())] = 0; }
    private static void bdd_printset_rec(BDDFactory f, StringBuffer sb, BDD r, int[] set) {        int n;        boolean first;        if (r.isZero())            return;        else if (r.isOne()) {            sb.append('<');            first = true;            for (n = 0; n < set.length; n++) {                if (set[n] > 0) {                    if (!first)                        sb.append(", ");                    first = false;                    sb.append(f.level2Var(n));                    sb.append(':');                    sb.append((set[n] == 2 ? 1 : 0));                }            }            sb.append('>');        } else {            set[f.var2Level(r.var())] = 1;            BDD rl = r.low();            bdd_printset_rec(f, sb, rl, set);            rl.free();            set[f.var2Level(r.var())] = 2;            BDD rh = r.high();            bdd_printset_rec(f, sb, rh, set);            rh.free();            set[f.var2Level(r.var())] = 0;        }    }