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 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 Details

    • UnionFOQueryEvaluator

      public UnionFOQueryEvaluator(FOQueryEvaluator<FOFormula, QD> evaluator)
      Creates a new evaluator using the given evaluator to evaluate sub-queries
      Parameters:
      evaluator - to evaluate sub-queries
  • Method Details

    • defaultInstance

      public static UnionFOQueryEvaluator 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: QueryEvaluator
      Evaluates a query against a data source.
      Specified by:
      evaluate in interface QueryEvaluator<UnionFOQuery, QD extends QueryableData>
      Parameters:
      query - query to evaluate
      queryableData - queryable data source in which atoms are stored
      variablesThatMustBeMappedToConstants - the set of variables that must be mapped to constants
      preHomomorphism - a partial homomorphism from var(query) to terms(queryable data source) to extend
      Returns:
      an Stream of Substitution over 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