Interface ReasoningMonitor
- All Known Implementing Classes:
DebuggingMonitor,DebuggingMonitor,DefaultReasoningMonitor,DefaultReasoningMonitor,JsonMonitor,ReasoningMonitorTimes,StatisticsCollector,SystemReasoningMonitor,TestMonitor
public interface ReasoningMonitor
Monitoring the reasoning process for reasoning actions and memory consumptions
- Author:
- angele
-
Method Summary
Modifier and TypeMethodDescriptionvoidconsiderEDBRelations(IntensionalDB idb, ExtensionalDB[] edbs) upfront determining all relevant edb relationsvoidpostBuiltinExecution(Rule rule, Literal literal, String operatorName, String receiverName, ReasoningRelation[] relationA, long numResultTuples, ReasoningRelation result, String msg) Called after a built-in has been executedvoidpostEvaluation(String query) Called immediately after evaluationvoidpostJoin(Rule rule, Literal literal, String operatorName, String receiverName, ReasoningRelation[] relationA, ReasoningRelation[] relationB, long numResultTuples, ReasoningRelation result, String joinType, String msg) Called after a join or negation is executed.voidpostRuleEvaluation(Rule rule) called after a rule has been evaluatedvoidpreBuiltinExecution(Rule rule, Literal literal, String operatorName, String receiverName, ReasoningRelation[] relationA, String msg) Called before a built-in is executed (only for aggregations or connector built-ins)voidpreEvalution(String query) Called before evaluation startsvoidpreFreeMemory(String message, long memoryInBytes) called before freeing up "memoryInBytes" memoryvoidpreJoin(Rule rule, Literal literal, String operatorName, String receiverName, ReasoningRelation[] relationA, ReasoningRelation[] relationB, String msg) Called before a join or negation is executed.voidpreMemoryAllocation(String message, long memoryInBytes) called before memory of size "memoryInBytes" will be allocatedvoidpreRuleEvaluation(Rule rule) called before a rule is evaluatedvoidsetBuiltins(BuiltinProvider builtins) Set the builtin providervoidSet the intensional db, e.g. to utilize the rule graphvoidsetReasoningSymbolTable(SymbolTable symbolTable) Set the symbol table
-
Method Details
-
preMemoryAllocation
called before memory of size "memoryInBytes" will be allocated- Parameters:
message-memoryInBytes-
-
preFreeMemory
called before freeing up "memoryInBytes" memory- Parameters:
message-memoryInBytes-
-
preRuleEvaluation
called before a rule is evaluated- Parameters:
rule- , the rule
-
postRuleEvaluation
called after a rule has been evaluated- Parameters:
rule- , the rule
-
preJoin
void preJoin(Rule rule, Literal literal, String operatorName, String receiverName, ReasoningRelation[] relationA, ReasoningRelation[] relationB, String msg) throws IOException, EDBException Called before a join or negation is executed.
NOTE All relation arguments should be considered temporary.
This means the content of these relations will change during the
reasoning process and cannot be accessed after this method returns.- Parameters:
rule- the ruleliteral- the body literaloperatorName- the operatorreceiverName- the next receiverrelationA- the left relationrelationB- the bottom relationmsg- an additional message (might benull)- Throws:
IOExceptionEDBException
-
postJoin
void postJoin(Rule rule, Literal literal, String operatorName, String receiverName, ReasoningRelation[] relationA, ReasoningRelation[] relationB, long numResultTuples, ReasoningRelation result, String joinType, String msg) throws IOException, SemReasonerException Called after a join or negation is executed.
NOTE All relation arguments should be considered temporary.
This means the content of these relations will change during the
reasoning process and cannot be accessed after this method returns.- Parameters:
rule- the ruleliteral- the body literaloperatorName- the operatorreceiverName- the next receiverrelationA- the left relationrelationB- the bottom relationnumResultTuples- the number of (new) result tuplesresult- the result relation. NOTE: This relation contains both new and existing tuples.msg- an additional message (might benull)joinType- , the type of join- Throws:
IOExceptionSemReasonerException
-
preBuiltinExecution
void preBuiltinExecution(Rule rule, Literal literal, String operatorName, String receiverName, ReasoningRelation[] relationA, String msg) throws IOException, EDBException Called before a built-in is executed (only for aggregations or connector built-ins)- Parameters:
rule-literal-operatorName-receiverName-relationA-msg-- Throws:
IOExceptionEDBException
-
postBuiltinExecution
void postBuiltinExecution(Rule rule, Literal literal, String operatorName, String receiverName, ReasoningRelation[] relationA, long numResultTuples, ReasoningRelation result, String msg) throws IOException, SemReasonerException Called after a built-in has been executed- Parameters:
rule-literal-operatorName-receiverName-relationA-numResultTuples-result-msg-- Throws:
IOExceptionSemReasonerException
-
preEvalution
Called before evaluation starts- Parameters:
query-
-
postEvaluation
Called immediately after evaluation- Parameters:
query-
-
setIntensionalDB
Set the intensional db, e.g. to utilize the rule graph- Parameters:
idb-- Throws:
SemReasonerException
-
setReasoningSymbolTable
Set the symbol table- Parameters:
symbolTable-
-
setBuiltins
Set the builtin provider- Parameters:
builtins- built-in provider
-
considerEDBRelations
upfront determining all relevant edb relations- Parameters:
idb-edbs-- Throws:
IOExceptionEDBException
-