<br />
<b>Warning</b>:  session_start(): open(/var/lib/php/sessions/sess_qemoiq9c4itam8v55rka6uagaq, O_RDWR) failed: No space left on device (28) in <b>/var/www/tb-usercake/models/config.php</b> on line <b>51</b><br />
<br />
<b>Warning</b>:  session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in <b>/var/www/tb-usercake/models/config.php</b> on line <b>51</b><br />
!7

set flag DynModule.

sclass TestBot extends DynObjectTable<ExecutedRule> {
  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_steppable_allowUnsafeEvals, unsafeEvals);
    final MultiMap<Int, ExecutedRule> mm = treeMultiMap();
    Steppable steppable = nlLogic_processInputOrFact_steppable(input, inputAsFact, 
      or2(trim(source), "<default>"), new Collector<ExecutedRule>() {
        bool add(ExecutedRule r) {
          mm.put(ai_executedRuleScorer().get(r), r);
          true;
        }
      });
    stepAllWithStats_multiThreaded(steppable);
      
    L<ExecutedRule> l = mm.allValues();
    printLength("l=", l);
    setData(l);
  }
}