Interface Plugin

All Known Implementing Classes:
AnalysisModelPlugin, AnalysisTimer, ArrayModel, AssertionChecker, ClassInitializer, CompositePlugin, ConstraintChecker, DoPriviledgedModel, EntryPointHandler, ExceptionAnalysis, InvokeDynamicAnalysis, IRModelPlugin, Java9StringConcatHandler, LambdaAnalysis, LookupModel, MethodTypeModel, NativeModeller, NullHandler, NumberLiteralHandler, OthersModel, Profiler, ReferenceHandler, ReflectionAnalysis, ReflectiveActionModel, ResultProcessor, SolarModel, StringBasedModel, TaintAnalysis, ThreadHandler, UnsafeModel

public interface Plugin
Analysis plugin interface.

This interface contains callbacks for pointer analysis events. It is supposed to provide a mechanism for extending functionalities of the analysis, so its implementations may have side effects on pointer analysis.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Plugin
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Invoked when pointer analysis finishes.
    default void
    Invoked when a new call graph edge is discovered.
    default void
    Invoked when a new reachable context-sensitive method is discovered.
    default void
    Invoked when a new reachable method is discovered.
    default void
    Invoked when set of new objects flow to a context-sensitive variable.
    default void
    onNewStmt(Stmt stmt, JMethod container)
    Invoked when a new reachable stmt is discovered.
    default void
    Invoked when pointer analysis has processed all entries in the work list.
    default void
    Invoked when pointer analysis starts.
    default void
    onUnresolvedCall(CSObj recv, Context context, Invoke invoke)
    Invoked when pointer analysis failed to resolve callee (i.e., resolve to null) on a receiver object.
    default void
    setSolver(Solver solver)
    Sets pointer analysis solver which will be used later by the plugin.
  • Field Details

    • DUMMY

      static final Plugin DUMMY
  • Method Details

    • setSolver

      default void setSolver(Solver solver)
      Sets pointer analysis solver which will be used later by the plugin.
    • onStart

      default void onStart()
      Invoked when pointer analysis starts.
    • onPhaseFinish

      default void onPhaseFinish()
      Invoked when pointer analysis has processed all entries in the work list. Some plugins need to perform certain computation at this stage (so that it can collect enough points-to information in the program), and may further add entries to the work list to "restart" the pointer analysis.
    • onFinish

      default void onFinish()
      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.
    • onNewPointsToSet

      default void onNewPointsToSet(CSVar csVar, PointsToSet pts)
      Invoked when set of new objects flow to a context-sensitive variable.
      Parameters:
      csVar - variable whose points-to set changes
      pts - set of new objects
    • onNewCallEdge

      default void onNewCallEdge(Edge<CSCallSite,CSMethod> edge)
      Invoked when a new call graph edge is discovered.
      Parameters:
      edge - new call graph edge
    • onNewMethod

      default void onNewMethod(JMethod method)
      Invoked when a new reachable method is discovered.
      Parameters:
      method - new reachable method
    • onNewStmt

      default void onNewStmt(Stmt stmt, JMethod container)
      Invoked when a new reachable stmt is discovered.
      Parameters:
      stmt - new reachable stmt
      container - container method of stmt
    • onNewCSMethod

      default void onNewCSMethod(CSMethod csMethod)
      Invoked when a new reachable context-sensitive method is discovered.
      Parameters:
      csMethod - new reachable context-sensitive method
    • onUnresolvedCall

      default void onUnresolvedCall(CSObj recv, Context context, Invoke invoke)
      Invoked when pointer analysis failed to resolve callee (i.e., resolve to null) on a receiver object. Some plugins take over such cases to do their analyses.
      Parameters:
      recv - the receiver object
      context - the context of the invocation
      invoke - the invocation site