Class QueryAnsweringComponentBuilder
java.lang.Object
fr.inria.rules.integraal.component_builder.components.QueryAnsweringComponentBuilder
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 Summary
ConstructorsConstructorDescriptionCreates a query-answering component builder. -
Method Summary
Modifier and TypeMethodDescriptionprepareAndGetCountingQueryAnsweringFrom(Collection<Query> queries, FactBase factbase, IAlgorithmParameters ap) Prepares and returns aCountingQueryEvaluatorWithMultiEvaluatorfor answering the given set of queries over the provided fact base, with optional external halting conditions to limit non-terminating algorithms.prepareAndGetQueryAnsweringFrom(Collection<Query> queries, FactBase factbase, IAlgorithmParameters ap) Prepares and returns aQueryEvaluatorWithMultiEvaluatorfor answering the given set of queries over the provided fact base, with optional external halting conditions to limit non-terminating algorithms.
-
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 aQueryEvaluatorWithMultiEvaluatorfor 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 ofQueryobjects to be evaluated over the fact base. This must not benull.factbase- theFactBasethat serves as the data source for answering the queries. This must not benull.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 eitherqueriesorfactbaseisnull.
-
prepareAndGetCountingQueryAnsweringFrom
public static CountingQueryEvaluatorWithMultiEvaluator prepareAndGetCountingQueryAnsweringFrom(Collection<Query> queries, FactBase factbase, IAlgorithmParameters ap) Prepares and returns aCountingQueryEvaluatorWithMultiEvaluatorfor answering the given set of queries over the provided fact base, with optional external halting conditions to limit non-terminating algorithms. TheCountingQueryEvaluatorWithMultiEvaluatorcounts the number of answers in addition to performing the query evaluation.- Parameters:
queries- a collection ofQueryobjects to be evaluated over the fact base. This must not benull.factbase- theFactBasethat serves as the data source for answering the queries. This must not benull.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
CountingQueryEvaluatorWithMultiEvaluatorconfigured to answer the given queries over the fact base with optional halting conditions and counting the number of answers. - Throws:
NullPointerException- if eitherqueriesorfactbaseisnull.
-