Class ExceptionAnalysis

java.lang.Object
pascal.taie.analysis.pta.plugin.exception.ExceptionAnalysis
All Implemented Interfaces:
Plugin

public class ExceptionAnalysis extends Object implements Plugin
  • Constructor Details

    • ExceptionAnalysis

      public ExceptionAnalysis()
  • Method Details

    • setSolver

      public void setSolver(Solver solver)
      Description copied from interface: Plugin
      Sets pointer analysis solver which will be used later by the plugin.
      Specified by:
      setSolver in interface Plugin
    • onNewMethod

      public void onNewMethod(JMethod method)
      For the throw statements in the method, analyzes and records all the exception entries that handle the exceptions thrown by the statements.
      Specified by:
      onNewMethod in interface Plugin
      Parameters:
      method - the method that the solver meet now
    • onNewStmt

      public void onNewStmt(Stmt stmt, JMethod container)
      Establishes the map from all exception references to related throw statements.
      Specified by:
      onNewStmt in interface Plugin
      Parameters:
      stmt - new reachable stmt
      container - container method of stmt
    • onNewPointsToSet

      public void onNewPointsToSet(CSVar csVar, PointsToSet pts)
      If the csVar is an exception reference, propagate all the exception it newly throws.
      Specified by:
      onNewPointsToSet in interface Plugin
      Parameters:
      csVar - variable pointer
      pts - objects added to the csVar points to set
    • onNewCallEdge

      public void onNewCallEdge(Edge<CSCallSite,CSMethod> edge)
      For a new call edge, the exception thrown by the callee method should be propagated to its callers, and thrown by the invoke statement, then we propagate the thrown exceptions accordingly.
      Specified by:
      onNewCallEdge in interface Plugin
      Parameters:
      edge - the newly established call edge
    • onFinish

      public void onFinish()
      Description copied from interface: Plugin
      Invoked when pointer analysis finishes. Pointer analysis is supposed to have been finished at this stage, thus this call back should NOT modify pointer analysis results.
      Specified by:
      onFinish in interface Plugin