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

17
LINES

< > BotCompany Repo | #1009688 // applyRule_all - full rule application - shortened

JavaX fragment (include)

1  
static void applyRule_all(S ruleID) {
2  
  // process the rule
3  
  Lisp rule = getLispTruth(ruleID);
4  
  if (rule == null) { print("Rule not found: " + ruleID); ret; }
5  
  //print("Applying rule " + ruleID);
6  
  if (applyRule_all_debug) print_setPrefixForThread(ruleID + "> ");
7  
  try {
8  
    applyRule_all(rule, ruleID);
9  
  } finally {
10  
    if (applyRule_all_debug) print_setPrefixForThread("");
11  
  }
12  
}
13  
14  
svoid applyRule_all(Lisp rule, S ruleID) {
15  
  for (Map<S, Lisp> matches : matchConditions_all(dropLast(rule.args)))
16  
    emit(lispReplaceVars(last(rule.args), matches), ruleID);
17  
}

Author comment

Began life as a copy of #1008134

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1009688
Snippet name: applyRule_all - full rule application - shortened
Eternal ID of this version: #1009688/2
Text MD5: 9602ef1d94d311d85f9bd32c5a855ab4
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-14 02:13:21
Source code size: 581 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 603 / 541
Version history: 1 change(s)
Referenced in: [show references]