Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

17
LINES

< > BotCompany Repo | #1020039 // Partial Rule Spike 3 [dev.]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (16265L/119K).

!7

p-exp {
  L<IfThen> all = nlLogic_parseRules(mL_raw("Partial Rule Example"));
  L<IfThen> tests = nlLogic_testsOnly(all);
  L<IfThen> rules = nlLogic_withoutTests(all);
  pnlWithHeading("TESTS", tests);
  pnlWithHeading("RULES", rules);
  
  for (IfThen test : tests) {
    print();
    LS facts = allToString(nlLogic_unrollAnd(test.in));
    Set<S> newFacts = asCISet(ai_deriveFacts(rules, facts));
    for (Exp e : unnull(nlLogic_unrollAnd(test.out)))
      print (contains(newFacts, str(e)) + ": " + e);
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020039
Snippet name: Partial Rule Spike 3 [dev.]
Eternal ID of this version: #1020039/6
Text MD5: 811838464a00b6dad919169e215f440f
Transpilation MD5: a17f12864c110c24fbf6f7b3d9645db5
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-04 20:28:42
Source code size: 532 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 283 / 636
Version history: 5 change(s)
Referenced in: [show references]