sS nlLogic_render(IfThen rule) { if (rule == null) null; ret nlLogic_render(rule.in) + " => " + nlLogic_render(rule.out); } sS nlLogic_render(Exp e) { if (e cast Func) ret e.name + "(" + nlLogic_render(e.arg) + ")"; if (e cast Sentence) ret join(e.tok); if (e cast And) ret nlLogic_render(e.a) + " && " + nlLogic_render(e.b); ret "TODO: " + className(e); }