Package com.semedy.reasoner.api.core
Class DebuggingMonitor
java.lang.Object
com.semedy.reasoner.api.core.DebuggingMonitor
- All Implemented Interfaces:
ReasoningMonitor
- Author:
- angele
-
Constructor Summary
Constructors -
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
-
Constructor Details
-
DebuggingMonitor
-
-
Method Details
-
preMemoryAllocation
Description copied from interface:ReasoningMonitorcalled before memory of size "memoryInBytes" will be allocated- Specified by:
preMemoryAllocationin interfaceReasoningMonitor
-
preFreeMemory
Description copied from interface:ReasoningMonitorcalled before freeing up "memoryInBytes" memory- Specified by:
preFreeMemoryin interfaceReasoningMonitor
-
preRuleEvaluation
Description copied from interface:ReasoningMonitorcalled before a rule is evaluated- Specified by:
preRuleEvaluationin interfaceReasoningMonitor- Parameters:
rule- , the rule
-
postRuleEvaluation
Description copied from interface:ReasoningMonitorcalled after a rule has been evaluated- Specified by:
postRuleEvaluationin interfaceReasoningMonitor- Parameters:
rule- , the rule
-
preJoin
public void preJoin(Rule rule, Literal literal, String operatorName, String receiverName, ReasoningRelation[] relationA, ReasoningRelation[] relationB, String msg) throws IOException Description copied from interface:ReasoningMonitorCalled 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.- Specified by:
preJoinin interfaceReasoningMonitor- Parameters:
rule- the ruleliteral- the body literaloperatorName- the operatorreceiverName- the next receiverrelationA- the left relationrelationB- the bottom relationmsg- an additional message (might benull)- Throws:
IOException
-
postJoin
public void postJoin(Rule rule, Literal literal, String operatorName, String receiverName, ReasoningRelation[] relationA, ReasoningRelation[] relationB, long numResultTuples, ReasoningRelation result, String joinType, String msg) throws IOException, EDBException Description copied from interface:ReasoningMonitorCalled 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.- Specified by:
postJoinin interfaceReasoningMonitor- 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.joinType- , the type of joinmsg- an additional message (might benull)- Throws:
IOExceptionEDBException
-
preBuiltinExecution
public void preBuiltinExecution(Rule rule, Literal literal, String operatorName, String receiverName, ReasoningRelation[] relationA, String msg) throws IOException Description copied from interface:ReasoningMonitorCalled before a built-in is executed (only for aggregations or connector built-ins)- Specified by:
preBuiltinExecutionin interfaceReasoningMonitor- Throws:
IOException
-
postBuiltinExecution
public void postBuiltinExecution(Rule rule, Literal literal, String operatorName, String receiverName, ReasoningRelation[] relationA, long numResultTuples, ReasoningRelation result, String msg) throws IOException, EDBException Description copied from interface:ReasoningMonitorCalled after a built-in has been executed- Specified by:
postBuiltinExecutionin interfaceReasoningMonitor- Throws:
IOExceptionEDBException
-
preEvalution
Description copied from interface:ReasoningMonitorCalled before evaluation starts- Specified by:
preEvalutionin interfaceReasoningMonitor
-
postEvaluation
Description copied from interface:ReasoningMonitorCalled immediately after evaluation- Specified by:
postEvaluationin interfaceReasoningMonitor
-
setIntensionalDB
Description copied from interface:ReasoningMonitorSet the intensional db, e.g. to utilize the rule graph- Specified by:
setIntensionalDBin interfaceReasoningMonitor
-
setReasoningSymbolTable
Description copied from interface:ReasoningMonitorSet the symbol table- Specified by:
setReasoningSymbolTablein interfaceReasoningMonitor
-
setBuiltins
Description copied from interface:ReasoningMonitorSet the builtin provider- Specified by:
setBuiltinsin interfaceReasoningMonitor- Parameters:
builtins- built-in provider
-
considerEDBRelations
public void considerEDBRelations(IntensionalDB idb, ExtensionalDB[] edbs) throws IOException, EDBException Description copied from interface:ReasoningMonitorupfront determining all relevant edb relations- Specified by:
considerEDBRelationsin interfaceReasoningMonitor- Throws:
IOExceptionEDBException
-