org.deri.iris.rules.compiler
Class RuleHeadEqualitySubstituter

java.lang.Object
  extended by org.deri.iris.rules.compiler.RuleElement
      extended by org.deri.iris.rules.compiler.HeadSubstituter
          extended by org.deri.iris.rules.compiler.RuleHeadEqualitySubstituter

public class RuleHeadEqualitySubstituter
extends HeadSubstituter

A compiled rule element representing the substitution of variable bindings in to the rule head for rules with rule head equality. This substituter sets all pairs that are substituted into the head as equivalent in the specified term equivalence relation. It then adds all possible combinations of the two terms and its equivalent terms to the relation.

Author:
Adrian Marte

Field Summary
 
Fields inherited from class org.deri.iris.rules.compiler.HeadSubstituter
mConfiguration, mHeadTuple, mIndices
 
Fields inherited from class org.deri.iris.rules.compiler.RuleElement
mOutputVariables
 
Constructor Summary
RuleHeadEqualitySubstituter(List<IVariable> variables, ITuple headTuple, IEquivalentTerms equivalentTerms, 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
 

Constructor Detail

RuleHeadEqualitySubstituter

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

Parameters:
variables - The variables from the rule body.
headTuple - The tuple from the rule head.
equivalentTerms - The equivalent terms.
configuration - The configuration.
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.

Overrides:
process in class HeadSubstituter
Returns:
The output relation for this literal.