org.deri.iris.rules.compiler
Class HeadSubstituter

java.lang.Object
  extended by org.deri.iris.rules.compiler.RuleElement
      extended by org.deri.iris.rules.compiler.HeadSubstituter
Direct Known Subclasses:
RuleHeadEqualitySubstituter

public class HeadSubstituter
extends RuleElement

A compiled rule element representing the substitution of variable bindings in to the rule head.


Field Summary
protected  Configuration mConfiguration
          The knowledge-base's configuration object.
protected  ITuple mHeadTuple
          The rule head tuple.
protected  int[] mIndices
          The indices of variables in substitution order.
 
Fields inherited from class org.deri.iris.rules.compiler.RuleElement
mOutputVariables
 
Constructor Summary
HeadSubstituter(List<IVariable> variables, ITuple headTuple, Configuration configuration)
          Constructor.
 
Method Summary
 IRelation process(IRelation inputRelation)
          Called to process tuples from previous literals.
 
Methods inherited from class org.deri.iris.rules.compiler.RuleElement
getDeltaSubstitution, getOutputVariables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mHeadTuple

protected final ITuple mHeadTuple
The rule head tuple.


mIndices

protected final int[] mIndices
The indices of variables in substitution order.


mConfiguration

protected final Configuration mConfiguration
The knowledge-base's configuration object.

Constructor Detail

HeadSubstituter

public HeadSubstituter(List<IVariable> variables,
                       ITuple headTuple,
                       Configuration configuration)
                throws EvaluationException
Constructor.

Parameters:
variables - The variables from the rule body.
headTuple - The tuple from the rule head.
Throws:
EvaluationException - If unbound variables occur.
Method Detail

process

public IRelation process(IRelation inputRelation)
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.