svoid nlLogic_visit(IfThen rule, VF1 visitor) { if (rule == null) ret; callF(visitor, rule); nlLogic_visit(rule.in, visitor); nlLogic_visit(rule.out, visitor); } svoid nlLogic_visit(Exp e, VF1 visitor) { if (e == null) ret; callF(visitor, e); if (e cast And) { nlLogic_visit(e.a, visitor); nlLogic_visit(e.b, visitor); } else if (e cast ExpNot) nlLogic_visit(e.a, visitor); else if (e cast Func) nlLogic_visit(e.arg, visitor); } svoid nlLogic_visit(Collection l, VF1 visitor) { for (O o : unnull(l)) nlLogic_visit(o, visitor); } svoid nlLogic_visit(O o, VF1 visitor) { if (o cast Exp) nlLogic_visit(o, visitor); if (o cast IfThen) nlLogic_visit(o, visitor); if (o cast Collection) nlLogic_visit(o, visitor); }