Warning: session_start(): open(/var/lib/php/sessions/sess_fdi13v7v5i8asp0k46qlbhg77f, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
// rulesMechListName = "" => default rules & facts
static Steppable nlLogic_processInputOrFact_steppable(S input, bool inputAsFact, S rulesMechListName, Collector out) {
ret nlLogic_processInputOrFact_steppable(input, inputAsFact,
eq(rulesMechListName, "")
? ai_activeRulesAndFacts()
: pair(ai_rulesFromMechLists(tok_splitAtComma(rulesMechListName)), emptyList_asList(S)), out);
}
static new ThreadLocal nlLogic_processInputOrFact_steppable_allowUnsafeEvals;
static Steppable nlLogic_processInputOrFact_steppable(S input, bool inputAsFact, Pair, LS> rulesAndFacts, final Collector out) {
ret nlLogic_processInputOrFact_steppable(new NLLogicChecker_v2, input, inputAsFact, rulesAndFacts, out);
}
static Steppable nlLogic_processInputOrFact_steppable(NLLogicChecker_v2 c, S input, bool inputAsFact, Pair, LS> rulesAndFacts, final Collector out) {
if (!inputAsFact) c.input = input;
c.facts = reversed(rulesAndFacts.b);
if (inputAsFact) c.facts = concatLists(ll(input), c.facts);
c.rules = reversed(rulesAndFacts.a); // latest rules first!
if (!inputAsFact)
c.rules = [IfThen r : c.rules | ai_ruleAccessesInput(r)];
c.allowUnsafeEvals = isTrue(nlLogic_processInputOrFact_steppable_allowUnsafeEvals!);
print("Have " + n2(rulesAndFacts.a, "rule"));
c.useIterate = true;
//c.staticVerbose = true;
ret nlLogic_fillBattleSpace_steppable(c, ai_ruleWithParamsCollector(out, c), false);
}