static int nlLogic_failureLevel_calc(ExecutedRule r) { if (!(r.rule instanceof FailedRule)) ret 0; FailedRule fr = cast r.rule; Exp e = fr.rule.in, lookingFor = fr.remainingCondition; int n = l(nlLogic_unrollAnd(e))-l(nlLogic_unrollAnd(lookingFor))+1; // TODO ret n <= 0 ? -1 : n; }