Exemplo n.º 1
0
 /** Set to true to enable derivation caching */
 @Override
 public void setDerivationLogging(boolean recordDerivations) {
   this.recordDerivations = recordDerivations;
   engine.setDerivationLogging(recordDerivations);
   if (recordDerivations) {
     derivations = new OneToManyMap<Triple, Derivation>();
   } else {
     derivations = null;
   }
 }
Exemplo n.º 2
0
 /**
  * Return the number of rules fired since this rule engine instance was created and initialized
  */
 public long getNRulesFired() {
   return engine.getNRulesFired();
 }
Exemplo n.º 3
0
 /**
  * Return true if tracing should be acted on - i.e. if traceOn is true and we are past the
  * bootstrap phase.
  */
 @Override
 public boolean shouldTrace() {
   return traceOn && engine.shouldTrace();
 }
Exemplo n.º 4
0
 /**
  * Attach a compiled rule set to this inference graph.
  *
  * @param ruleStore a compiled set of rules (i.e. the result of an FRuleEngine.compile).
  */
 public void setRuleStore(Object ruleStore) {
   engine.setRuleStore(ruleStore);
 }