Interface Plugin

All Known Implementing Classes:
AnalysisTimer, ClassInitializer, CompositePlugin, ConstraintChecker, EntryPointHandler, ExceptionAnalysis, InvokeDynamicAnalysis, Java9StringConcatHandler, LambdaAnalysis, NativeModeller, NullHandler, NumberLiteralHandler, Profiler, ReferenceHandler, ReflectionAnalysis, ResultProcessor, TaintAnalysis, ThreadHandler

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.

  • 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 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.
  • 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.
    • 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