Class TopDownSIPS
java.lang.Object
com.semedy.reasoner.rewriter.sips.TopDownSIPS
- All Implemented Interfaces:
SIPS
Arranges the sequence of the rule bodies in that way that the reasoning has
best performance Is fully based on statistics, i.e. selectivity, weights.
Does deep ordering, i.e. looks into all edb literals in all rules for these
decisions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEvaluable(Rule R, int ix, BitSet groundvars, IntensionalDB IDB, SymbolTable symbols) Is rule body beginning at index with given groundvars evaluableorderBodies(Rule rule, BitSet groundVars, long[] groundValues, IntensionalDB IDB, ExtensionalDB[] edbs, SymbolTable symbols) Arrange the bodies of a rule.
-
Constructor Details
-
TopDownSIPS
-
-
Method Details
-
orderBodies
public WeightedLiteral[] orderBodies(Rule rule, BitSet groundVars, long[] groundValues, IntensionalDB IDB, ExtensionalDB[] edbs, SymbolTable symbols) throws IOException, SemReasonerException Description copied from interface:SIPSArrange the bodies of a rule. Returnsnullif it cannot be arranged.- Specified by:
orderBodiesin interfaceSIPS- Parameters:
rule- the rulegroundVars- the topdown instantiated variables of the rulegroundValues- variable instantiationsIDB- the intensional databaseedbs- the extensional databasessymbols- the symbol table- Returns:
- the weighted literals or
nullif no reordering is possible with this SIPS - Throws:
IOExceptionRewriterException- if an error occursSymboltableExceptionSemReasonerException
-
isEvaluable
public boolean isEvaluable(Rule R, int ix, BitSet groundvars, IntensionalDB IDB, SymbolTable symbols) throws IOException, SemReasonerException Is rule body beginning at index with given groundvars evaluable- Parameters:
R-groundvars-IDB-- Returns:
- Throws:
IOExceptionSemReasonerException
-