Class ReasoningAPI

java.lang.Object
fr.inria.rules.integraal.api.internal.ReasoningAPI

@Deprecated(forRemoval=true) public class ReasoningAPI extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Use ModelAPI.get() instead. This class will be removed in a future release.
Defines the high-level API for accessing Integraal's reasoning algorithms.
The purpose of this API is to create various software programs that enable programmers to easily use these algorithms.
The proposed high-level functionalities enable query evaluation, performing saturation, rewriting rules, querying a knowledge base... with different options.
Author:
Pierre Bisquert, Michel Leclère, Sarah Michel, Federico Ulliana
  • Method Details

    • evaluate

      Deprecated, for removal: This API element is subject to removal in a future version.
      Evaluates a query over a fact base.
      Parameters:
      fb - the fact base to query.
      query - the query to evaluate.
      params - the evaluation parameters.
      Returns:
      an iterator over matching substitutions.
      Throws:
      IllegalArgumentException - if an argument is invalid.
      IGParameterException - if a parameter is invalid.
      EvaluationException - if evaluation fails.
    • evaluate

      Deprecated, for removal: This API element is subject to removal in a future version.
      Evaluates a query over a fact base with a pre-homomorphism.
      Parameters:
      fb - the fact base to query.
      query - the query to evaluate.
      preHom - the pre-homomorphism to apply.
      params - the evaluation parameters.
      Returns:
      an iterator over matching substitutions.
      Throws:
      IllegalArgumentException - if an argument is invalid.
      IGParameterException - if a parameter is invalid.
      EvaluationException - if evaluation fails.
    • nextAnswers

      @SafeVarargs public static Collection<Substitution> nextAnswers(Iterator<Substitution> subIt, IGParameter<InteGraalKeywords, ?>... params) throws IGParameterException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves the next answers from an iterator of substitutions.
      Parameters:
      subIt - the substitutions iterator.
      params - the retrieval parameters.
      Returns:
      the next substitutions.
      Throws:
      IGParameterException - if a parameter is invalid.
    • saturate

      public static FactBase saturate(FactBase fb, RuleBase rb, IAlgorithmParameters algoParam)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Saturates a fact base with a rule base using the given algorithm parameters.
      Parameters:
      fb - the fact base to saturate.
      rb - the rule base to apply.
      algoParam - the algorithm parameters.
      Returns:
      the saturated fact base.
    • defaultChase

      @SafeVarargs public static FactBase defaultChase(FactBase fb, RuleBase rb, IGParameter<InteGraalKeywords, ?>... params) throws IGParameterException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Runs the default chase on a fact base and a rule base.
      Parameters:
      fb - the fact base to saturate.
      rb - the rule base to apply.
      params - the chase parameters.
      Returns:
      the saturated fact base.
      Throws:
      IGParameterException - if a parameter is invalid.
    • semiObliviousChase

      @SafeVarargs public static FactBase semiObliviousChase(FactBase fb, RuleBase rb, IGParameter<InteGraalKeywords, ?>... params) throws IGParameterException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Runs the semi-oblivious chase on a fact base and a rule base.
      Parameters:
      fb - the fact base to saturate.
      rb - the rule base to apply.
      params - the chase parameters.
      Returns:
      the saturated fact base.
      Throws:
      IGParameterException - if a parameter is invalid.
    • standardChase

      @SafeVarargs public static FactBase standardChase(FactBase fb, RuleBase rb, IGParameter<InteGraalKeywords, ?>... params) throws IGParameterException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Runs the standard chase on a fact base and a rule base.
      Parameters:
      fb - the fact base to saturate.
      rb - the rule base to apply.
      params - the chase parameters.
      Returns:
      the saturated fact base.
      Throws:
      IGParameterException - if a parameter is invalid.
    • coreChase

      @SafeVarargs public static FactBase coreChase(FactBase fb, RuleBase rb, IGParameter<InteGraalKeywords, ?>... params) throws IGParameterException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Runs the core chase on a fact base and a rule base.
      Parameters:
      fb - the fact base to saturate.
      rb - the rule base to apply.
      params - the chase parameters.
      Returns:
      the saturated fact base.
      Throws:
      IGParameterException - if a parameter is invalid.
    • linearRulesChase

      @SafeVarargs public static FactBase linearRulesChase(FactBase fb, RuleBase rb, IGParameter<InteGraalKeywords, ?>... params) throws IGParameterException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Runs the linear-rules chase on a fact base and a rule base.
      Parameters:
      fb - the fact base to saturate.
      rb - the rule base to apply.
      params - the chase parameters.
      Returns:
      the saturated fact base.
      Throws:
      IGParameterException - if a parameter is invalid.
    • inMemoryDatalogChase

      @SafeVarargs public static FactBase inMemoryDatalogChase(FactBase fb, RuleBase rb, IGParameter<InteGraalKeywords, ?>... params) throws IGParameterException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Runs the in-memory datalog chase on a fact base and a rule base.
      Parameters:
      fb - the fact base to saturate.
      rb - the rule base to apply.
      params - the chase parameters.
      Returns:
      the saturated fact base.
      Throws:
      IGParameterException - if a parameter is invalid.
    • delegatedDatalogChase

      @SafeVarargs public static FactBase delegatedDatalogChase(FactBase fb, RuleBase rb, IGParameter<InteGraalKeywords, ?>... params) throws IGParameterException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Runs the delegated datalog chase on a fact base and a rule base.
      Parameters:
      fb - the fact base to saturate.
      rb - the rule base to apply.
      params - the chase parameters.
      Returns:
      the saturated fact base.
      Throws:
      IGParameterException - if a parameter is invalid.
    • rewrite

      public static UnionFOQuery rewrite(RuleBase rb, Query query, InteGraalKeywords.Algorithms.Parameters.Compilation ruleCompilationType) throws IllegalArgumentException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Rewrites a query with respect to a rule base and a compilation strategy.
      Parameters:
      rb - the rule base used for rewriting.
      query - the query to rewrite.
      ruleCompilationType - the compilation strategy.
      Returns:
      the rewritten query.
      Throws:
      IllegalArgumentException - if an argument is invalid.
    • evaluateSat

      Deprecated, for removal: This API element is subject to removal in a future version.
      Evaluates a query after saturating the fact base with a rule base.
      Parameters:
      fb - the fact base to query.
      query - the query to evaluate.
      rb - the rule base used for saturation.
      algoParam - the saturation algorithm parameters.
      Returns:
      an iterator over matching substitutions.
      Throws:
      IllegalArgumentException - if an argument is invalid.
      IGParameterException - if a parameter is invalid.
      EvaluationException - if evaluation fails.
    • evaluateRew

      Deprecated, for removal: This API element is subject to removal in a future version.
      Evaluates a query after rewriting it with a rule base.
      Parameters:
      fb - the fact base to query.
      query - the query to evaluate.
      rb - the rule base used for rewriting.
      ruleCompilationType - the compilation strategy.
      conds - the external halting conditions.
      Returns:
      an iterator over matching substitutions.
      Throws:
      IllegalArgumentException - if an argument is invalid.
      IGParameterException - if a parameter is invalid.
      EvaluationException - if evaluation fails.
    • extractCompilableRules

      public static RuleBase extractCompilableRules(RuleBase ruleBase, InteGraalKeywords.Algorithms.Parameters.Compilation ruleCompilation, ExternalHaltingCondition... conds)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Extracts the compilable rules from a rule base.
      Parameters:
      ruleBase - the source rule base.
      ruleCompilation - the compilation strategy.
      conds - the external halting conditions.
      Returns:
      the compilable rules.
    • extractNonCompilableRules

      public static RuleBase extractNonCompilableRules(RuleBase ruleBase, InteGraalKeywords.Algorithms.Parameters.Compilation ruleCompilation, ExternalHaltingCondition... conds)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Extracts the non-compilable rules from a rule base.
      Parameters:
      ruleBase - the source rule base.
      ruleCompilation - the compilation strategy.
      conds - the external halting conditions.
      Returns:
      the non-compilable rules.
    • unfold

      public static Collection<Query> unfold(RuleBase ruleBase, Collection<Query> queries, InteGraalKeywords.Algorithms.Parameters.Compilation ruleCompilation, ExternalHaltingCondition... conds)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Unfolds queries with respect to a rule base.
      Parameters:
      ruleBase - the rule base used for unfolding.
      queries - the queries to unfold.
      ruleCompilation - the compilation strategy.
      conds - the external halting conditions.
      Returns:
      the unfolded queries.
    • decompose

      public static RuleBase decompose(RuleBase ruleBase)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Decomposes a rule base.
      Parameters:
      ruleBase - the rule base to decompose.
      Returns:
      the decomposed rule base.
    • isFes

      public static Boolean isFes(RuleBase ruleBase)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks whether a rule base is FES.
      Parameters:
      ruleBase - the rule base to analyse.
      Returns:
      true if the rule base is FES, otherwise false.
    • isFus

      public static Boolean isFus(RuleBase ruleBase)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks whether a rule base is FUS.
      Parameters:
      ruleBase - the rule base to analyse.
      Returns:
      true if the rule base is FUS, otherwise false.
    • isDecidable

      public static Boolean isDecidable(RuleBase ruleBase)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks whether a rule base is decidable.
      Parameters:
      ruleBase - the rule base to analyse.
      Returns:
      true if the rule base is decidable, otherwise false.
    • isHybridable

      public static Boolean isHybridable(RuleBase ruleBase)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks whether a rule base is hybridable.
      Parameters:
      ruleBase - the rule base to analyse.
      Returns:
      true if the rule base is hybridable, otherwise false.
    • isHybrid

      public static Boolean isHybrid(RuleBase ruleBaseToSaturate, RuleBase ruleBaseToRewrite)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks whether two rule bases form a hybrid rule base.
      Parameters:
      ruleBaseToSaturate - the rule base intended for saturation.
      ruleBaseToRewrite - the rule base intended for rewriting.
      Returns:
      true if the rule bases form a hybrid rule base, otherwise false.