Package com.semedy.reasoner.rewriter
Class MagicSetRewriter
java.lang.Object
com.semedy.reasoner.rewriter.MagicSetRewriter
- All Implemented Interfaces:
Rewriter
reorders rules and adorns rules that they are top-down evaluable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionget a description for the rewritergetName()
get the name of a rewriterboolean
goDown
(Literal l, BitSet boundVariables, String label, IntensionalDB oldIdb, IntensionalDB newIdb, ExtensionalDB[] edbs, SymbolTable symbols) boolean
indicates whether rewriter has to read the symbol tablerewrite
(IntensionalDB idb, ExtensionalDB[] sedbs, SymbolTable symboltable, ExternalDataTypeProvider datatypes, Configuration config) applies the rewriter to a set of rulesvoid
setBuiltinProvider
(BuiltinProvider builtins) sets the built-in provider for the rewritervoid
setProperties
(Properties prp) set propertiesvoid
setStatistics
(SystemMonitor _statistics) adds a system monitor which has run time data about rules.boolean
indicates whether rewriter modifies the symbol table
-
Constructor Details
-
MagicSetRewriter
public MagicSetRewriter()
-
-
Method Details
-
setBuiltinProvider
Description copied from interface:Rewriter
sets the built-in provider for the rewriter- Specified by:
setBuiltinProvider
in interfaceRewriter
-
goDown
public boolean goDown(Literal l, BitSet boundVariables, String label, IntensionalDB oldIdb, IntensionalDB newIdb, ExtensionalDB[] edbs, SymbolTable symbols) throws InterruptedException, IOException, SemReasonerException -
rewrite
public IntensionalDB rewrite(IntensionalDB idb, ExtensionalDB[] sedbs, SymbolTable symboltable, ExternalDataTypeProvider datatypes, Configuration config) throws InterruptedException, RewriterException, IOException Description copied from interface:Rewriter
applies the rewriter to a set of rules- Specified by:
rewrite
in interfaceRewriter
- Parameters:
idb
- , intensional databasesedbs
- , extensional databases, the last one is used for snapshot transaction datasymboltable
- , symbol tabledatatypes
- , the external datatypesconfig
- , configuration- Returns:
- Throws:
InterruptedException
RewriterException
IOException
-
getName
Description copied from interface:Rewriter
get the name of a rewriter -
getDescription
Description copied from interface:Rewriter
get a description for the rewriter- Specified by:
getDescription
in interfaceRewriter
- Returns:
-
readsSymbolTable
public boolean readsSymbolTable()Description copied from interface:Rewriter
indicates whether rewriter has to read the symbol table- Specified by:
readsSymbolTable
in interfaceRewriter
- Returns:
-
writesSymbolTable
public boolean writesSymbolTable()Description copied from interface:Rewriter
indicates whether rewriter modifies the symbol table- Specified by:
writesSymbolTable
in interfaceRewriter
- Returns:
-
setStatistics
Description copied from interface:Rewriter
adds a system monitor which has run time data about rules.- Specified by:
setStatistics
in interfaceRewriter
-
setProperties
Description copied from interface:Rewriter
set properties- Specified by:
setProperties
in interfaceRewriter
-