Class UnionFOQueryEvaluator<QD extends QueryableData>
java.lang.Object
fr.inria.rules.integraal.query_evaluation.union.UnionFOQueryEvaluator<QD>
- Type Parameters:
QD- the queried data type
- All Implemented Interfaces:
QueryEvaluator<UnionFOQuery, QD>
public class UnionFOQueryEvaluator<QD extends QueryableData>
extends Object
implements QueryEvaluator<UnionFOQuery, QD>
Evaluates a
The intersection of two substitutions is a substitution from the variables of the two substitutions An intersection is considered correct if for each variable that appear in both substitutions, the associated terms are equals
UnionFOQuery by making the union of the results;
The intersection of two substitutions is a substitution from the variables of the two substitutions An intersection is considered correct if for each variable that appear in both substitutions, the associated terms are equals
-
Constructor Summary
ConstructorsConstructorDescriptionUnionFOQueryEvaluator(FOQueryEvaluator<FOFormula, QD> evaluator) Creates a new evaluator using the given evaluator to evaluate sub-queries -
Method Summary
Modifier and TypeMethodDescriptionstatic UnionFOQueryEvaluatorThe default instance is used to give a default behavior to the evaluator when one doesn't want to configure it.evaluate(UnionFOQuery query, QD queryableData, Collection<Variable> variablesThatMustBeMappedToConstants, Substitution preHomomorphism) Evaluates a query against a data source.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface QueryEvaluator
countAnswers, countHomomorphism, evaluate, evaluate, existAnswer, existAnswer, existHomomorphism, existHomomorphism, homomorphism, homomorphism, postprocessResult, postprocessResult, prepareQuery, prepareQuery
-
Constructor Details
-
UnionFOQueryEvaluator
Creates a new evaluator using the given evaluator to evaluate sub-queries- Parameters:
evaluator- to evaluate sub-queries
-
-
Method Details
-
defaultInstance
The default instance is used to give a default behavior to the evaluator when one doesn't want to configure it.- Returns:
- the default instance of the evaluator
-
evaluate
public Stream<Substitution> evaluate(UnionFOQuery query, QD queryableData, Collection<Variable> variablesThatMustBeMappedToConstants, Substitution preHomomorphism) throws EvaluationException Description copied from interface:QueryEvaluatorEvaluates a query against a data source.- Specified by:
evaluatein interfaceQueryEvaluator<UnionFOQuery, QD extends QueryableData>- Parameters:
query- query to evaluatequeryableData- queryable data source in which atoms are storedvariablesThatMustBeMappedToConstants- the set of variables that must be mapped to constantspreHomomorphism- a partial homomorphism from var(query) to terms(queryable data source) to extend- Returns:
- an
StreamofSubstitutionover all the answers of the given query in the given queryable data source with respect to the query answer variables. - Throws:
EvaluationException- if the evaluation cannot be completed
-