Class QueryAnsweringComponentBuilder

java.lang.Object
fr.inria.rules.integraal.component_builder.components.QueryAnsweringComponentBuilder

public class QueryAnsweringComponentBuilder extends Object
A builder class for preparing and creating components for query answering over fact bases. This class provides methods for setting up query evaluators with optional external halting conditions.
  • Constructor Details

    • QueryAnsweringComponentBuilder

      public QueryAnsweringComponentBuilder()
      Creates a query-answering component builder.
  • Method Details

    • prepareAndGetQueryAnsweringFrom

      public static QueryEvaluatorWithMultiEvaluator prepareAndGetQueryAnsweringFrom(Collection<Query> queries, FactBase factbase, IAlgorithmParameters ap)
      Prepares and returns a QueryEvaluatorWithMultiEvaluator for answering the given set of queries over the provided fact base, with optional external halting conditions to limit non-terminating algorithms.
      Parameters:
      queries - a collection of Query objects to be evaluated over the fact base. This must not be null.
      factbase - the FactBase that serves as the data source for answering the queries. This must not be null.
      ap - optional conditions used to limit the evaluation process, such as timeouts or maximum number of states, as well as the type of answers.
      Returns:
      a query evaluator configured for the provided fact base and queries
      Throws:
      NullPointerException - if either queries or factbase is null.
    • prepareAndGetCountingQueryAnsweringFrom

      public static CountingQueryEvaluatorWithMultiEvaluator prepareAndGetCountingQueryAnsweringFrom(Collection<Query> queries, FactBase factbase, IAlgorithmParameters ap)
      Prepares and returns a CountingQueryEvaluatorWithMultiEvaluator for answering the given set of queries over the provided fact base, with optional external halting conditions to limit non-terminating algorithms. The CountingQueryEvaluatorWithMultiEvaluator counts the number of answers in addition to performing the query evaluation.
      Parameters:
      queries - a collection of Query objects to be evaluated over the fact base. This must not be null.
      factbase - the FactBase that serves as the data source for answering the queries. This must not be null.
      ap - optional conditions used to limit the evaluation process, such as timeouts or maximum number of states, as well as the type of answers.
      Returns:
      a CountingQueryEvaluatorWithMultiEvaluator configured to answer the given queries over the fact base with optional halting conditions and counting the number of answers.
      Throws:
      NullPointerException - if either queries or factbase is null.