org.deri.iris.evaluation.topdown.sldnf
Class SLDNFEvaluationStrategy
java.lang.Object
org.deri.iris.evaluation.topdown.sldnf.SLDNFEvaluationStrategy
- All Implemented Interfaces:
- IEvaluationStrategy
public class SLDNFEvaluationStrategy
- extends Object
- implements IEvaluationStrategy
Implementation of the SLDNF evaluation strategy.
For details see 'Deduktive Datenbanken' by Cremers, Griefahn
and Hinze (ISBN 978-3528047009).
- Author:
- gigi
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mFacts
protected final IFacts mFacts
mRules
protected final List<IRule> mRules
mConfiguration
protected final Configuration mConfiguration
SLDNFEvaluationStrategy
public SLDNFEvaluationStrategy(IFacts facts,
List<IRule> rules,
Configuration configuration)
throws EvaluationException
- Constructor
- Parameters:
facts - Given facts.rules - Given rules.configuration - Configuration
- Throws:
EvaluationException
evaluateQuery
public IRelation evaluateQuery(IQuery query,
List<IVariable> outputVariables)
throws ProgramNotStratifiedException,
RuleUnsafeException,
EvaluationException
- Evaluate the query
- Specified by:
evaluateQuery in interface IEvaluationStrategy
- Parameters:
query - The query to evaluate.outputVariables - If this is not null, it will be filled with the variable bindings
of the result relation, i.e. there will be one variable instance for each term
(in one row) of the results set
- Returns:
- The relation of results.
- Throws:
ProgramNotStratifiedException - If the program (knowledge-base)can not be stratified
RuleUnsafeException - If the program (knowledge-base) contains an unsafe rule.
EvaluationException - If the evaluation fails for any other reason.