!7 set flag DynModule. sclass TestBot extends DynObjectTable { InputChooser inputChooser = new(this); S source; S inputAs = "Input:"; // "Input:" or "Fact:" bool unsafeEvals; 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))), super.visualize())); } void doIt { update(inputChooser.input()); } void update { if (inputChooser.update()) update(inputChooser.input()); } void update(S input) { temp enter(); bool inputAsFact = cic(inputAs, 'fact); NLLogicChecker_v2.staticVerbose = true; temp tempSetTL(nlLogic_processInputOrFact_withFailed_allowUnsafeEvals, unsafeEvals); L l = nlLogic_processInputOrFact_withFailed(input, inputAsFact, or2(trim(source), "")); // Successful rules first sortInPlaceByCalculatedField(l, func(ExecutedRule r) -> Int { int n = r.failureLevel(); ret n == 0 ? 0 : n < 0 ? 1 : Int.MAX_VALUE-n; }); printLength("l=", l); setData(l); } }