!7 set flag DynModule. sclass TestBot extends DynObjectTable { InputChooser inputChooser = new(this); S source; S inputAs = "Input:"; // "Input:" or "Fact:" bool unsafeEvals, showFailed; int maxEntries = 100; start { dm_useLocalMechListCopies(); inputChooser.delay = 1000; itemToMap = itemToMap_ExecutedRule(); } visualize { ret withMargin(northAndCenter(vstackWithSpacing( westAndCenter(dm_fieldComboBox('inputAs, ll("Input:", "Fact:")), wrap(inputChooser)), withLabel("Rules mech lists (empty for default rules&facts):", onEnter(dm_fieldTextField('source), rThread doIt)), jrightalignedline( main.onChange(dm_fieldCheckBox("Allow unsafe evals", 'unsafeEvals), rThread doIt), main.onChange(dm_fieldCheckBox("Show failed rules", 'showFailed), rThread doIt), jlabel("Show"), jLiveValueIntTextField(dm_fieldLiveValue('maxEntries)), jlabel("entries") )), super.visualize())); } void doIt { update(inputChooser.input()); } // use rst? void update { if (inputChooser.update()) update(inputChooser.input()); } void update(S input) { temp enter(); final bool inputAsFact = cic(inputAs, 'fact); NLLogicChecker_v2.staticVerbose = true; temp tempSetTL(nlLogic_processInputOrFact_steppable_allowUnsafeEvals, unsafeEvals); final MultiMap mm = treeMultiMap(); final new MultiThreadStepper stepper; final LinkedHashSet inputs = litorderedset(input); VF1 processInput = voidfunc(S input) { final VF1 processInput = this; stepper.add(nlLogic_processInputOrFact_steppable(input, inputAsFact, or2(trim(source), ""), new Collector() { bool add(ExecutedRule r) { if (!showFailed && r.isFailed()) true; mm.put(ai_executedRuleScorer().get(r), r); for (S s : unnull(r.newInput)) if (inputs.add(s)) callF(processInput, s); true; } })); }; callF(processInput, input); stepAllWithStats_multiThreaded(stepper); L l = mm.allValues(); printLength("l=", l); setData(l); } }