org.deri.iris.rules.compiler
Interface ICompiledRule

All Known Implementing Classes:
CompiledRule

public interface ICompiledRule

Interface for a compiled rule.


Method Summary
 IRelation evaluate()
          Evaluate rule with all known facts.
 IRelation evaluateIteratively(IFacts deltas)
          Evaluate the rule using deltas (see semi-naive evaluation) to more intelligently seek out tuples that have not already been computed.
 List<IVariable> getVariablesBindings()
          If this compiled rule represents a query, then return the variables bindings of the result relation.
 IPredicate headPredicate()
          If this compiled rule represents a rule, then return the head predicate.
 

Method Detail

evaluate

IRelation evaluate()
                   throws EvaluationException
Evaluate rule with all known facts.

Returns:
The result relation for this rule.
Throws:
EvaluationException

evaluateIteratively

IRelation evaluateIteratively(IFacts deltas)
                              throws EvaluationException
Evaluate the rule using deltas (see semi-naive evaluation) to more intelligently seek out tuples that have not already been computed.

Parameters:
deltas - The collection of recently discovered facts.
Returns:
The result relation for this rule.
Throws:
EvaluationException

headPredicate

IPredicate headPredicate()
If this compiled rule represents a rule, then return the head predicate.

Returns:
The head predicate.

getVariablesBindings

List<IVariable> getVariablesBindings()
If this compiled rule represents a query, then return the variables bindings of the result relation.

Returns:
The list of variables in the order in which they are bound to terms of the result relation.