LP version of the core backward chaining engine. For each parent inference
graph (whether pure backward or hybrid) there should be one LPBRuleEngine
instance. The shared instance holds any common result caching, rule store
and global state data. However, all the processing is done by instances
of the LPInterpreter - one per query.
author: Dave Reynolds version: $Revision: 1.13 $ on $Date: 2008/01/02 12:06:16 $
Inner Class :static class Count implements Comparable
Field Summary
final public static int
CYCLES_BETWEEN_COMPLETION_CHECK The number of generator cycles to wait before running a completion check.
If set to 0 then checks will be done in the generator each time.
addRule(Rule rule) Add a single rule to the store.
N.B.
public void
checkForCompletions() Check all known interpeter contexts to see if any are complete.
public void
checkSafeToUpdate() Check that there are no currently processing queries.
Could throw an exception here but often this can be caused by simply leaving
an unclosed iterator.
Check that there are no currently processing queries.
Could throw an exception here but often this can be caused by simply leaving
an unclosed iterator. So instead we try to close the iterators and assume the
rest of the context will be reset by the add call.
Should be called from within a synchronized block.
Return a generator for the given goal (assumes that the caller knows that
the goal should be tabled).
Parameters: goal - the goal whose results are to be generated Parameters: clauses - the precomputed set of code blocks used to implement the goal
Return a generator for the given goal (assumes that the caller knows that
the goal should be tabled).
Parameters: goal - the goal whose results are to be generated
Reset the profile.
Parameters: enable - it true then profiling will continue with a new empty profile table,if false profiling will stop all current data lost.