sclass NLLogic_MultiThreadedEngine { bool unsafeEvals; MultiMap executedRules = treeMultiMap(); new MultiThreadStepper stepper; LinkedHashSet inputs = litorderedset(input); void processInput(S input) { temp tempSetTL(nlLogic_processInputOrFact_steppable_allowUnsafeEvals, unsafeEvals); stepper.add(nlLogic_processInputOrFact_steppable(input, inputAsFact, or2(trim(source), ""), new Collector() { bool add(ExecutedRule r) { if (!showFailed && r.isFailed()) true; executedRules.put(ai_executedRuleScorer().get(r), r); for (S s : unnull(r.newInput)) if (inputs.add(s)) processInput(s); true; } })); }; void seedInput(S input) { processInput(input); } void fullRun { stepAllWithStats_multiThreaded(stepper); } L executedRules() { ret executedRules.allValues(); } }