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

16
LINES

< > BotCompany Repo | #1021684 // gazelle_stdEvalContext

JavaX fragment (include)

// rules are t3(text, comment, ruleID)
static GazelleEvalContext gazelle_stdEvalContext(L<T3<S>> rules) {
  long startTime = sysNow();
  new GazelleEvalContext ctx;
  ctx.engine = new RuleEngine2;
  ctx.engine.addRules2(rules);
  gazelle_changeInTypesForRulesWithMultipleInputs(ctx.engine);

  // gather data for predictor
  MultiMap<S> statementsByRule = ai_gazelle_indexStatementsByRule(dm_gazelle_statementsFromAppliedRules());
  ctx.dataByRule = mapValues ai_gazelle_analyzeStatementsForRule(multiMapToMap(statementsByRule));
  
  ctx.predictor = dm_gazelle_standardPredictor();
  done2(startTime, "Making engine with " + n2(rules, "rule"));
  ret ctx;
}

Author comment

Began life as a copy of #1021523

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1021684
Snippet name: gazelle_stdEvalContext
Eternal ID of this version: #1021684/6
Text MD5: 9c232011a21069230601d6aa8136d2e7
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-03 10:10:15
Source code size: 673 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 287 / 334
Version history: 5 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1021973 - gazelle_stdEvalContext_v2 - use statement multisets [LIVE]