org.deri.iris.rules.compiler
Class FirstSubgoal
java.lang.Object
org.deri.iris.rules.compiler.RuleElement
org.deri.iris.rules.compiler.FirstSubgoal
public class FirstSubgoal
- extends RuleElement
A compiled rule element representing the first literal in a rule body,
when that literal is a positive ordinary predicate.
|
Constructor Summary |
FirstSubgoal(IPredicate predicate,
IRelation relation,
ITuple viewCriteria,
IEquivalentTerms equivalentTerms,
Configuration configuration)
Constructor. |
FirstSubgoal(IPredicate predicate,
IRelation relation,
ITuple viewCriteria,
List<IVariable> variables,
boolean simple,
IEquivalentTerms equivalentTerms,
Configuration configuration)
Constructor used for iterative evaluation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FirstSubgoal
public FirstSubgoal(IPredicate predicate,
IRelation relation,
ITuple viewCriteria,
IEquivalentTerms equivalentTerms,
Configuration configuration)
- Constructor.
- Parameters:
predicate - The predicate for this literal.relation - The relation for this literal.viewCriteria - The tuple from the sub-goal in the rule.equivalentTerms - The equivalent terms.
FirstSubgoal
public FirstSubgoal(IPredicate predicate,
IRelation relation,
ITuple viewCriteria,
List<IVariable> variables,
boolean simple,
IEquivalentTerms equivalentTerms,
Configuration configuration)
- Constructor used for iterative evaluation.
- Parameters:
predicate - The predicate for this literal.relation - The relation for this literal.viewCriteria - The tuple from the sub-goal in the rule.variables - Calculated variables.simple - Indicator if the view is a simple one (only unique variables).equivalentTerms - The equivalent terms.
process
public IRelation process(IRelation leftRelation)
- 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.
getDeltaSubstitution
public RuleElement getDeltaSubstitution(IFacts deltas)
- Description copied from class:
RuleElement
- Create a substitute rule element that will use the corresponding delta if it exists.
- Overrides:
getDeltaSubstitution in class RuleElement
- Parameters:
deltas - The Deltas from the last round of iterative evaluation.
- Returns:
- A substitute rule element if possible.