Package com.semedy.reasoner.api.rewriter
Class RewriterProvider
java.lang.Object
com.semedy.reasoner.api.rewriter.RewriterProvider
manages a list of rule rewriters and the sequence they are applied to the intensional database
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyRewriter(IntensionalDB input, ExtensionalDB[] edbs, SymbolTable symbols, ExternalDataTypeProvider datatypes, BuiltinProvider builtins, SystemMonitor statistics, Configuration config, Properties prp) Apply rewriters of rewriterList in that sequence which is given by their indices and indicated by their enumerationiterator()Enumerate the rewriters.voidregisterRewriter(Rewriter rewriter, int index) add a rewriter at indexvoidremoveRewriter(int i) remove rewriter in rewriterList at index iMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RewriterProvider
-
-
Method Details
-
iterator
Enumerate the rewriters.
This sequence also shows the application sequence of the rewriters -
registerRewriter
add a rewriter at index- Parameters:
rewriter-index-
-
applyRewriter
public IntensionalDB applyRewriter(IntensionalDB input, ExtensionalDB[] edbs, SymbolTable symbols, ExternalDataTypeProvider datatypes, BuiltinProvider builtins, SystemMonitor statistics, Configuration config, Properties prp) throws InterruptedException, IOException, SemReasonerException Apply rewriters of rewriterList in that sequence which is given by their indices and indicated by their enumeration- Parameters:
input- , intensional databaseedbs- , extensional databases, the last one is used for snapshot transaction datasymbols- , symbol tabledatatypes- , external datatypesbuiltins- , the built-insstatistics- , collector for statisticsconfig- , the configuration- Returns:
- Throws:
InterruptedExceptionIOExceptionSemReasonerException
-
removeRewriter
public void removeRewriter(int i) remove rewriter in rewriterList at index i- Parameters:
i-
-