org.deri.iris.rules.compiler
Class Builtin
java.lang.Object
org.deri.iris.rules.compiler.RuleElement
org.deri.iris.rules.compiler.Builtin
public class Builtin
- extends RuleElement
A compiled rule element representing a built-in predicate.
|
Method Summary |
protected ITuple |
makeResultTuple(ITuple inputTuple,
ITuple builtinOutputTuple)
Transform the input tuple (from previous rule elements) and the tuple produced by the
built-in atom in to a tuple to pass on to the next rule element. |
IRelation |
process(IRelation leftRelation)
Called to process tuples from previous literals. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Builtin
public Builtin(List<IVariable> inputVariables,
IBuiltinAtom builtinAtom,
boolean positive,
IEquivalentTerms equivalentTerms,
Configuration configuration)
throws EvaluationException
- Constructor.
- Parameters:
inputVariables - The variables from proceeding literals. Can be null if this is the first literal.builtinAtom - The built-in atom object at this position in the rule.positive - true, if the built-in is positive, false if it is negative.equivalentTerms - The equivalent terms.
- Throws:
EvaluationException - If constructed terms are used with a built-in or there are unbound variables.
process
public IRelation process(IRelation leftRelation)
throws EvaluationException
- Description copied from class:
RuleElement
- Called to process tuples from previous literals.
- Specified by:
process in class RuleElement
- Returns:
- The output relation for this literal.
- Throws:
EvaluationException
makeResultTuple
protected ITuple makeResultTuple(ITuple inputTuple,
ITuple builtinOutputTuple)
- Transform the input tuple (from previous rule elements) and the tuple produced by the
built-in atom in to a tuple to pass on to the next rule element.
- Parameters:
inputTuple - The tuple produced b previous literals.builtinOutputTuple - The output of the built-in atom.
- Returns:
- The tuple to pass on to the next rule element.