Class InternalAPI
java.lang.Object
fr.inria.rules.integraal.api.internal.InternalAPI
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
Modifier and TypeMethodDescriptionstatic FactBaseDeprecated, for removal: This API element is subject to removal in a future version.Copies a fact base.static RuleBaseDeprecated, for removal: This API element is subject to removal in a future version.Copies a rule base.static UnionFOQuerycopy(UnionFOQuery query) Deprecated, for removal: This API element is subject to removal in a future version.Copies a query.static FORuleDeprecated, for removal: This API element is subject to removal in a future version.Copies a rule.static Collection<UnionFOQuery> copy(Collection<UnionFOQuery> queries) Deprecated, for removal: This API element is subject to removal in a future version.Copies a collection of queries.static Collection<FactBase> copyFBC(Collection<FactBase> factbases) Deprecated, for removal: This API element is subject to removal in a future version.Copies a fact base collection.static AnalysercreateAnalyser(RuleBase rulebase) Deprecated, for removal: This API element is subject to removal in a future version.Creates an analyser for a rule base.static CompilationResultcreateCompilation(RuleBase ruleBase, InteGraalKeywords.Algorithms.Parameters.Compilation compilation) Deprecated, for removal: This API element is subject to removal in a future version.Creates a compilation for a rule base.static CompilationResultcreateCompilation(RuleBase ruleBase, String compilationType) Deprecated, for removal: This API element is subject to removal in a future version.Creates a compilation for a rule base using a compilation type.static IntegraalEnvironmentDeprecated, for removal: This API element is subject to removal in a future version.Crée un environnement.static FactBasecreateFactBase(IntegraalEnvironment env, InputStream dlgpe) Deprecated, for removal: This API element is subject to removal in a future version.Creates a fact base from DLGPE content read from a stream.static FactBasecreateFactBase(IntegraalEnvironment env, String dlgpe) Deprecated, for removal: This API element is subject to removal in a future version.Creates a fact base from DLGPE content.static Collection<FactBase> createFactBaseCollection(IntegraalEnvironment env, String dlgpe) Deprecated, for removal: This API element is subject to removal in a future version.Creates a collection of fact bases from DLGPE content.static FactBasecreateJoinedFactBase(IntegraalEnvironment env, String dlgpe) Deprecated, for removal: This API element is subject to removal in a future version.Creates a joined fact base from DLGPE content.static UnionFOQuerycreateQuery(IntegraalEnvironment env, String dlgpe) Deprecated, for removal: This API element is subject to removal in a future version.Creates a query from DLGPE content.static Collection<UnionFOQuery> createQueryCollection(IntegraalEnvironment env, String dlgpe) Deprecated, for removal: This API element is subject to removal in a future version.Creates a query collection from DLGPE content.static FORulecreateRule(IntegraalEnvironment env, String dlgpe) Deprecated, for removal: This API element is subject to removal in a future version.Creates a rule from DLGPE content.static RuleBasecreateRuleBase(IntegraalEnvironment env, String dlgpe) Deprecated, for removal: This API element is subject to removal in a future version.Creates a rule base from DLGPE content.static RuleBasecreateRuleBaseFromRules(Collection<FORule> rules) Deprecated, for removal: This API element is subject to removal in a future version.Creates a rule base from a collection of rules.static FactBasedefaultChase(FactBase factBase, RuleBase ruleBase, IGParameter<String, String>... params) Deprecated, for removal: This API element is subject to removal in a future version.Runs the default chase on a fact base with a rule base.static Iterator<Substitution> Deprecated, for removal: This API element is subject to removal in a future version.Evaluates a query on a fact base.static Iterator<Substitution> evaluate(FactBase factBase, Query query, Substitution preHom, IGParameter<String, String>... params) Deprecated, for removal: This API element is subject to removal in a future version.Evaluates a query on a fact base with a pre-homomorphism.static StringexportFactBase(FactBase factBase) Deprecated.static StringexportPrintable(fr.inria.rules.dlgpemodel.api.sentences.IPrintable printable) Deprecated, for removal: This API element is subject to removal in a future version.Exports a printable object.static StringexportPrintable(IntegraalEnvironment env, fr.inria.rules.dlgpemodel.api.sentences.IPrintable printable) Deprecated, for removal: This API element is subject to removal in a future version.Exports a printable object using the given environment.static voidexportPrintable(IntegraalEnvironment env, fr.inria.rules.dlgpemodel.api.sentences.IPrintable printable, Appendable out) Deprecated, for removal: This API element is subject to removal in a future version.Exports a printable object to an appendable output.static StringexportQuery(UnionFOQuery query) Deprecated.static StringexportRule(FORule rule) Deprecated.formatSubstitutions(IntegraalEnvironment environment, Collection<Substitution> substitutions) Deprecated, for removal: This API element is subject to removal in a future version.Formats substitutions into string maps.static ParsingResultloadAll(IntegraalEnvironment env, String dlgpe) Deprecated, for removal: This API element is subject to removal in a future version.Loads all supported objects from DLGPE content.static ParsingResultloadAllFromFile(IntegraalEnvironment env, String path) Deprecated, for removal: This API element is subject to removal in a future version.Loads all supported objects from a file.static ParsingResultloadFromDLGPE(IntegraalEnvironment env, InputStream stream, boolean joinFacts, int minFacts, int maxFacts, int minRules, int maxRules, int minQueries, int maxQueries, boolean forgiving) Deprecated, for removal: This API element is subject to removal in a future version.Loads and parses DLGPE content from an input stream.static ParsingResultloadFromDLGPEFile(IntegraalEnvironment env, String dlgpefile, boolean joinFacts, int minFacts, int maxFacts, int minRules, int maxRules, int minQueries, int maxQueries, boolean forgiving) Deprecated, for removal: This API element is subject to removal in a future version.Loads and parses DLGPE content from a file.static ParsingResultloadFromDLGPEString(IntegraalEnvironment env, String dlgpeString, boolean joinFacts, int minFacts, int maxFacts, int minRules, int maxRules, int minQueries, int maxQueries, boolean forgiving) Deprecated, for removal: This API element is subject to removal in a future version.Loads and parses DLGPE content from a string.static ParsingResultloadFromDLGPString(String dlgp, boolean getFacts, int minRules, int maxRules, int minQueries, int maxQueries, boolean forgiving) Deprecated, for removal: This API element is subject to removal in a future version.Loads and parses DLGP content from a string.static voidDeprecated, for removal: This API element is subject to removal in a future version.Temporary entry point for manual internal testing.static voidmergeInPlace(IntegraalEnvironment env, FactBase fb, FactBase other) Deprecated, for removal: This API element is subject to removal in a future version.Merges a fact base into another one in place.static voidmergeInPlace(IntegraalEnvironment env, FactBase fb, FactBase other, Substitution subst, boolean freeze) Deprecated, for removal: This API element is subject to removal in a future version.Merges a fact base into another one in place with substitution and freezing options.static Collection<Substitution> nextAnswers(Iterator<Substitution> it, IGParameter<String, String>... params) Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the next answers from an answer iterator.parseCompilationType(String compilationType) Deprecated, for removal: This API element is subject to removal in a future version.Parses a compilation type string.static List<fr.inria.rules.dlgpemodel.api.sentences.ISentence> parseDLGPE(IntegraalEnvironment env, String dlgpe) Deprecated, for removal: This API element is subject to removal in a future version.Parses a DLGPE string in the given environment.static SubstitutionparseSubstitution(IntegraalEnvironment environment, String json) Deprecated, for removal: This API element is subject to removal in a future version.Parses a substitution from its JSON representation.static voidremoveInPlace(IntegraalEnvironment env, FactBase fb, FactBase other, Substitution subst) Deprecated, for removal: This API element is subject to removal in a future version.Removes facts from a fact base in place.static UnionFOQueryrewrite(RuleBase ruleBase, Query query, InteGraalKeywords.Algorithms.Parameters.Compilation compilation) Deprecated, for removal: This API element is subject to removal in a future version.Rewrites a query using a rule base and a compilation strategy.static UnionFOQueryDeprecated, for removal: This API element is subject to removal in a future version.Rewrites a query using a rule base and a compilation type.static UnionFOQueryrewrite(Query query, CompilationResult compiled) Deprecated, for removal: This API element is subject to removal in a future version.Rewrites a query using a precomputed compilation.
-
Method Details
-
createEnvironment
Deprecated, for removal: This API element is subject to removal in a future version.Crée un environnement. Pour l'instant pas de configuration possible, on verra plus tard.- Returns:
- un nouvel environnement Integraal
-
parseDLGPE
public static List<fr.inria.rules.dlgpemodel.api.sentences.ISentence> parseDLGPE(IntegraalEnvironment env, String dlgpe) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.Parses a DLGPE string in the given environment.- Parameters:
env- the environment used for parsing.dlgpe- the DLGPE content to parse.- Returns:
- the parsed sentences.
- Throws:
Exception- if parsing fails.
-
exportPrintable
Deprecated, for removal: This API element is subject to removal in a future version.Exports a printable object.- Parameters:
printable- the object to export.- Returns:
- the serialized representation.
-
exportPrintable
public static String exportPrintable(IntegraalEnvironment env, fr.inria.rules.dlgpemodel.api.sentences.IPrintable printable) Deprecated, for removal: This API element is subject to removal in a future version.Exports a printable object using the given environment.- Parameters:
env- the environment used for exporting.printable- the object to export.- Returns:
- the serialized representation.
-
exportPrintable
public static void exportPrintable(IntegraalEnvironment env, fr.inria.rules.dlgpemodel.api.sentences.IPrintable printable, Appendable out) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Exports a printable object to an appendable output.- Parameters:
env- the environment used for exporting.printable- the object to export.out- the destination appendable.- Throws:
IOException- if writing fails.
-
mergeInPlace
Deprecated, for removal: This API element is subject to removal in a future version.Merges a fact base into another one in place.- Parameters:
env- the environment used for the merge.fb- the target fact base.other- the source fact base.
-
mergeInPlace
public static void mergeInPlace(IntegraalEnvironment env, FactBase fb, FactBase other, Substitution subst, boolean freeze) Deprecated, for removal: This API element is subject to removal in a future version.Merges a fact base into another one in place with substitution and freezing options.- Parameters:
env- the environment used for the merge.fb- the target fact base.other- the source fact base.subst- the substitution to apply.freeze- whether merged terms should be frozen.
-
removeInPlace
public static void removeInPlace(IntegraalEnvironment env, FactBase fb, FactBase other, Substitution subst) throws EvaluationException Deprecated, for removal: This API element is subject to removal in a future version.Removes facts from a fact base in place.- Parameters:
env- the environment used for the removal.fb- the target fact base.other- the facts to remove.subst- the substitution to apply.- Throws:
EvaluationException- if evaluation fails during removal.
-
loadFromDLGPEFile
public static ParsingResult loadFromDLGPEFile(IntegraalEnvironment env, String dlgpefile, boolean joinFacts, int minFacts, int maxFacts, int minRules, int maxRules, int minQueries, int maxQueries, boolean forgiving) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.Loads and parses DLGPE content from a file.- Parameters:
env- the environment used for parsing.dlgpefile- the path to the DLGPE file.joinFacts- whether parsed fact bases should be joined.minFacts- the minimum number of fact bases expected.maxFacts- the maximum number of fact bases expected.minRules- the minimum number of rules expected.maxRules- the maximum number of rules expected.minQueries- the minimum number of queries expected.maxQueries- the maximum number of queries expected.forgiving- whether parsing should be forgiving.- Returns:
- the parsing result.
- Throws:
Exception- if parsing fails.
-
loadFromDLGPEString
public static ParsingResult loadFromDLGPEString(IntegraalEnvironment env, String dlgpeString, boolean joinFacts, int minFacts, int maxFacts, int minRules, int maxRules, int minQueries, int maxQueries, boolean forgiving) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.Loads and parses DLGPE content from a string.- Parameters:
env- the environment used for parsing.dlgpeString- the DLGPE content.joinFacts- whether parsed fact bases should be joined.minFacts- the minimum number of fact bases expected.maxFacts- the maximum number of fact bases expected.minRules- the minimum number of rules expected.maxRules- the maximum number of rules expected.minQueries- the minimum number of queries expected.maxQueries- the maximum number of queries expected.forgiving- whether parsing should be forgiving.- Returns:
- the parsing result.
- Throws:
Exception- if parsing fails.
-
loadFromDLGPE
public static ParsingResult loadFromDLGPE(IntegraalEnvironment env, InputStream stream, boolean joinFacts, int minFacts, int maxFacts, int minRules, int maxRules, int minQueries, int maxQueries, boolean forgiving) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.Loads and parses DLGPE content from an input stream.- Parameters:
env- the environment used for parsing.stream- the DLGPE input stream.joinFacts- whether parsed fact bases should be joined.minFacts- the minimum number of fact bases expected.maxFacts- the maximum number of fact bases expected.minRules- the minimum number of rules expected.maxRules- the maximum number of rules expected.minQueries- the minimum number of queries expected.maxQueries- the maximum number of queries expected.forgiving- whether parsing should be forgiving.- Returns:
- the parsing result.
- Throws:
Exception- if parsing fails.
-
loadFromDLGPString
public static ParsingResult loadFromDLGPString(String dlgp, boolean getFacts, int minRules, int maxRules, int minQueries, int maxQueries, boolean forgiving) throws ParseException Deprecated, for removal: This API element is subject to removal in a future version.Loads and parses DLGP content from a string.- Parameters:
dlgp- the DLGP content.getFacts- whether facts should be parsed.minRules- the minimum number of rules expected.maxRules- the maximum number of rules expected.minQueries- the minimum number of queries expected.maxQueries- the maximum number of queries expected.forgiving- whether parsing should be forgiving.- Returns:
- the parsing result.
- Throws:
ParseException- if parsing fails.
-
createFactBase
Deprecated, for removal: This API element is subject to removal in a future version.Creates a fact base from DLGPE content.- Parameters:
env- the environment used for parsing.dlgpe- the DLGPE content.- Returns:
- the created fact base.
- Throws:
Exception- if parsing fails.
-
createFactBase
Deprecated, for removal: This API element is subject to removal in a future version.Creates a fact base from DLGPE content read from a stream.- Parameters:
env- the environment used for parsing.dlgpe- the DLGPE input stream.- Returns:
- the created fact base.
- Throws:
Exception- if parsing fails.
-
createJoinedFactBase
public static FactBase createJoinedFactBase(IntegraalEnvironment env, String dlgpe) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.Creates a joined fact base from DLGPE content.- Parameters:
env- the environment used for parsing.dlgpe- the DLGPE content.- Returns:
- the created joined fact base.
- Throws:
Exception- if parsing fails.
-
createFactBaseCollection
public static Collection<FactBase> createFactBaseCollection(IntegraalEnvironment env, String dlgpe) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.Creates a collection of fact bases from DLGPE content.- Parameters:
env- the environment used for parsing.dlgpe- the DLGPE content.- Returns:
- the created fact base collection.
- Throws:
Exception- if parsing fails.
-
createRuleBase
Deprecated, for removal: This API element is subject to removal in a future version.Creates a rule base from DLGPE content.- Parameters:
env- the environment used for parsing.dlgpe- the DLGPE content.- Returns:
- the created rule base.
- Throws:
Exception- if parsing fails.
-
createQueryCollection
public static Collection<UnionFOQuery> createQueryCollection(IntegraalEnvironment env, String dlgpe) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.Creates a query collection from DLGPE content.- Parameters:
env- the environment used for parsing.dlgpe- the DLGPE content.- Returns:
- the created query collection.
- Throws:
Exception- if parsing fails.
-
createQuery
Deprecated, for removal: This API element is subject to removal in a future version.Creates a query from DLGPE content.- Parameters:
env- the environment used for parsing.dlgpe- the DLGPE content.- Returns:
- the created query.
- Throws:
Exception- if parsing fails.
-
createRule
Deprecated, for removal: This API element is subject to removal in a future version.Creates a rule from DLGPE content.- Parameters:
env- the environment used for parsing.dlgpe- the DLGPE content.- Returns:
- the created rule.
- Throws:
Exception- if parsing fails.
-
loadAll
Deprecated, for removal: This API element is subject to removal in a future version.Loads all supported objects from DLGPE content.- Parameters:
env- the environment used for parsing.dlgpe- the DLGPE content.- Returns:
- the parsing result.
- Throws:
Exception- if parsing fails.
-
loadAllFromFile
Deprecated, for removal: This API element is subject to removal in a future version.Loads all supported objects from a file.- Parameters:
env- the environment used for parsing.path- the file path.- Returns:
- the parsing result.
- Throws:
Exception- if parsing fails.
-
evaluate
public static Iterator<Substitution> evaluate(FactBase factBase, Query query, IGParameter<String, String>... params) throws IGParameterException, IllegalArgumentException, EvaluationExceptionDeprecated, for removal: This API element is subject to removal in a future version.Evaluates a query on a fact base.- Parameters:
factBase- the fact base to query.query- the query to evaluate.params- the evaluation parameters.- Returns:
- an iterator over matching substitutions.
- Throws:
IGParameterException- if a parameter is invalid.IllegalArgumentException- if an argument is invalid.EvaluationException- if evaluation fails.
-
evaluate
public static Iterator<Substitution> evaluate(FactBase factBase, Query query, Substitution preHom, IGParameter<String, String>... params) throws IGParameterException, IllegalArgumentException, EvaluationExceptionDeprecated, for removal: This API element is subject to removal in a future version.Evaluates a query on a fact base with a pre-homomorphism.- Parameters:
factBase- 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:
IGParameterException- if a parameter is invalid.IllegalArgumentException- if an argument is invalid.EvaluationException- if evaluation fails.
-
defaultChase
public static FactBase defaultChase(FactBase factBase, RuleBase ruleBase, IGParameter<String, String>... params) throws IGParameterExceptionDeprecated, for removal: This API element is subject to removal in a future version.Runs the default chase on a fact base with a rule base.- Parameters:
factBase- the fact base.ruleBase- the rule base.params- the chase parameters.- Returns:
- the chased fact base.
- Throws:
IGParameterException- if a parameter is invalid.
-
createRuleBaseFromRules
Deprecated, for removal: This API element is subject to removal in a future version.Creates a rule base from a collection of rules.- Parameters:
rules- the rules to include.- Returns:
- the created rule base.
-
nextAnswers
public static Collection<Substitution> nextAnswers(Iterator<Substitution> it, IGParameter<String, String>... params) throws IGParameterExceptionDeprecated, for removal: This API element is subject to removal in a future version.Retrieves the next answers from an answer iterator.- Parameters:
it- the substitutions iterator.params- the retrieval parameters.- Returns:
- the next substitutions.
- Throws:
IGParameterException- if a parameter is invalid.
-
rewrite
public static UnionFOQuery rewrite(RuleBase ruleBase, Query query, InteGraalKeywords.Algorithms.Parameters.Compilation compilation) Deprecated, for removal: This API element is subject to removal in a future version.Rewrites a query using a rule base and a compilation strategy.- Parameters:
ruleBase- the rule base used for rewriting.query- the query to rewrite.compilation- the compilation strategy.- Returns:
- the rewritten query.
-
rewrite
Deprecated, for removal: This API element is subject to removal in a future version.Rewrites a query using a rule base and a compilation type.- Parameters:
ruleBase- the rule base used for rewriting.query- the query to rewrite.compilationType- the compilation type.- Returns:
- the rewritten query.
-
rewrite
public static UnionFOQuery rewrite(Query query, CompilationResult compiled) throws IllegalArgumentException Deprecated, for removal: This API element is subject to removal in a future version.Rewrites a query using a precomputed compilation.- Parameters:
query- the query to rewrite.compiled- the precomputed compilation.- Returns:
- the rewritten query.
- Throws:
IllegalArgumentException- if the compilation is invalid.
-
createCompilation
public static CompilationResult createCompilation(RuleBase ruleBase, InteGraalKeywords.Algorithms.Parameters.Compilation compilation) Deprecated, for removal: This API element is subject to removal in a future version.Creates a compilation for a rule base.- Parameters:
ruleBase- the rule base to compile.compilation- the compilation strategy.- Returns:
- the compilation result.
-
createCompilation
Deprecated, for removal: This API element is subject to removal in a future version.Creates a compilation for a rule base using a compilation type.- Parameters:
ruleBase- the rule base to compile.compilationType- the compilation type.- Returns:
- the compilation result.
-
parseCompilationType
public static InteGraalKeywords.Algorithms.Parameters.Compilation parseCompilationType(String compilationType) Deprecated, for removal: This API element is subject to removal in a future version.Parses a compilation type string.- Parameters:
compilationType- the compilation type.- Returns:
- the parsed compilation value.
-
parseSubstitution
public static Substitution parseSubstitution(IntegraalEnvironment environment, String json) throws NoSuchMethodException, ParseException Deprecated, for removal: This API element is subject to removal in a future version.Parses a substitution from its JSON representation.- Parameters:
environment- the environment used for parsing.json- the JSON representation.- Returns:
- the parsed substitution.
- Throws:
NoSuchMethodException- if a required method cannot be found.ParseException- if parsing fails.
-
formatSubstitutions
public static List<Map<String,String>> formatSubstitutions(IntegraalEnvironment environment, Collection<Substitution> substitutions) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Formats substitutions into string maps.- Parameters:
environment- the environment used for formatting.substitutions- the substitutions to format.- Returns:
- the formatted substitutions.
- Throws:
IOException- if formatting fails.
-
copy
-
copy
-
copy
-
copy
Deprecated, for removal: This API element is subject to removal in a future version.Copies a query.- Parameters:
query- the query to copy.- Returns:
- the copied query.
-
copy
Deprecated, for removal: This API element is subject to removal in a future version.Copies a collection of queries.- Parameters:
queries- the queries to copy.- Returns:
- the copied queries.
-
copyFBC
Deprecated, for removal: This API element is subject to removal in a future version.Copies a fact base collection.- Parameters:
factbases- the fact bases to copy.- Returns:
- the copied fact base collection.
-
createAnalyser
-
exportFactBase
Deprecated.Exports a fact base using the deprecated API.- Parameters:
factBase- the fact base to export.- Returns:
- the serialized representation.
- Throws:
IOException- if exporting fails.
-
exportRule
Deprecated.Exports a rule using the deprecated API.- Parameters:
rule- the rule to export.- Returns:
- the serialized representation.
- Throws:
IOException- if exporting fails.
-
exportQuery
Deprecated.Exports a query using the deprecated API.- Parameters:
query- the query to export.- Returns:
- the serialized representation.
- Throws:
IOException- if exporting fails.
-
main
-
ModelAPI.get()instead. This class will be removed in a future release.