1 | svoid nlLogic_fillBattleSpace_collector(final NLLogicChecker_v2 c, final Collector<RuleWithParams> battleSpace, final bool debug) {
|
2 | withCancelPoint(voidfunc(final CancelPoint cp) {
|
3 | VF2<IfThen, NLLogicChecker_v2.Matching> onRuleFired = voidfunc(IfThen rule, NLLogicChecker_v2.Matching m) {
|
4 | if (battleSpace.add(new RuleWithParams(rule, m.matches))) |
5 | cancelTo(cp); |
6 | }; |
7 | VF4<IfThen, NLLogicChecker_v2.Matching, L<Exp>, Exp> onRuleFailed = voidfunc(IfThen rule, NLLogicChecker_v2.Matching m, L<Exp> satisfiedConditions, Exp remaining) {
|
8 | //print("satisfied conditions: " + satisfiedConditions);
|
9 | if (battleSpace.add(new FailedRule(rule, m.matches, cloneListOrNull(nullIfEmpty(satisfiedConditions)), remaining))) |
10 | cancelTo(cp); |
11 | }; |
12 | |
13 | print("Iterating over " + n2(c.rules, "rule"));
|
14 | applyNLLogicFacts_v4_iterate_withFailed2_verbose.set(debug); |
15 | applyNLLogicFacts_v4_iterate_withFailed2(c, onRuleFired, onRuleFailed, c.rules); |
16 | }); |
17 | } |
Began life as a copy of #1018334
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1018337 |
| Snippet name: | nlLogic_fillBattleSpace_collector - uses Collector as output |
| Eternal ID of this version: | #1018337/5 |
| Text MD5: | 0862b7bf9322134921b0df6c81efa49b |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-09-19 23:50:58 |
| Source code size: | 1001 bytes / 17 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 588 / 634 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |