/** 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; } }
/** * Return the number of rules fired since this rule engine instance was created and initialized */ public long getNRulesFired() { return engine.getNRulesFired(); }
/** * 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(); }
/** * 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); }