initialize( expressivity );
//run the RETE once when the rules are not applied
if( !abox.ranRete && abox.rulesNotApplied ) {
// initialize and run the rete
Interpreter interp = new Interpreter( abox );
RulesToReteTranslator translator = new RulesToReteTranslator( abox );
RulesToATermTranslator atermTranslator = new RulesToATermTranslator();
for( Rule rule : abox.getKB().getRules() ) {
com.clarkparsia.pellet.rules.rete.Rule reteRule =
translator.translateRule( rule );
if( reteRule != null ) {
Set<ATermAppl> explain = abox.doExplanation()
? rule.getExplanation( atermTranslator )
: Collections.<ATermAppl>emptySet();
interp.rete.compile( reteRule, explain );
}
}
interp.rete.compileFacts( abox );
Set<Fact> inferred = interp.run();
if( log.isLoggable( Level.FINE ) )
log.fine( inferred.size() + " inferred fact(s)" );
//need to add the inferred facts back to the tableau