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 Details

    • preMemoryAllocation

      void preMemoryAllocation(String message, long memoryInBytes)
      called before memory of size "memoryInBytes" will be allocated
      Parameters:
      message -
      memoryInBytes -
    • preFreeMemory

      void preFreeMemory(String message, long memoryInBytes)
      called before freeing up "memoryInBytes" memory
      Parameters:
      message -
      memoryInBytes -
    • preRuleEvaluation

      void preRuleEvaluation(Rule rule)
      called before a rule is evaluated
      Parameters:
      rule - , the rule
    • postRuleEvaluation

      void postRuleEvaluation(Rule rule)
      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 rule
      literal - the body literal
      operatorName - the operator
      receiverName - the next receiver
      relationA - the left relation
      relationB - the bottom relation
      msg - an additional message (might be null)
      Throws:
      IOException
      EDBException
    • 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 rule
      literal - the body literal
      operatorName - the operator
      receiverName - the next receiver
      relationA - the left relation
      relationB - the bottom relation
      numResultTuples - the number of (new) result tuples
      result - the result relation. NOTE: This relation contains both new and existing tuples.
      msg - an additional message (might be null)
      joinType - , the type of join
      Throws:
      IOException
      SemReasonerException
    • 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:
      IOException
      EDBException
    • 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:
      IOException
      SemReasonerException
    • preEvalution

      void preEvalution(String query)
      Called before evaluation starts
      Parameters:
      query -
    • postEvaluation

      void postEvaluation(String query)
      Called immediately after evaluation
      Parameters:
      query -
    • setIntensionalDB

      void setIntensionalDB(IntensionalDB idb) throws SemReasonerException
      Set the intensional db, e.g. to utilize the rule graph
      Parameters:
      idb -
      Throws:
      SemReasonerException
    • setReasoningSymbolTable

      void setReasoningSymbolTable(SymbolTable symbolTable)
      Set the symbol table
      Parameters:
      symbolTable -
    • setBuiltins

      void setBuiltins(BuiltinProvider builtins)
      Set the builtin provider
      Parameters:
      builtins - built-in provider
    • considerEDBRelations

      void considerEDBRelations(IntensionalDB idb, ExtensionalDB[] edbs) throws IOException, EDBException
      upfront determining all relevant edb relations
      Parameters:
      idb -
      edbs -
      Throws:
      IOException
      EDBException