Interface Solver

All Known Implementing Classes:
DefaultSolver

public interface Solver
  • Method Details

    • getOptions

      AnalysisOptions getOptions()
    • getHierarchy

      ClassHierarchy getHierarchy()
    • getTypeSystem

      TypeSystem getTypeSystem()
    • getHeapModel

      HeapModel getHeapModel()
    • getCSManager

      CSManager getCSManager()
    • getContextSelector

      ContextSelector getContextSelector()
    • getCallGraph

      CallGraph<CSCallSite,CSMethod> getCallGraph()
    • getPointsToSetOf

      PointsToSet getPointsToSetOf(Pointer pointer)
      Returns the points-to set of given pointer. If the pointer has not been associated with a points-to set, this method will create a new set and associate it with the pointer.
    • makePointsToSet

      PointsToSet makePointsToSet()
      Creates a new empty points-to set.
    • setPlugin

      void setPlugin(Plugin plugin)
      Sets plugin to this solver.
    • solve

      void solve()
      Starts this solver.
    • addPointsTo

      void addPointsTo(Pointer pointer, PointsToSet pts)
    • addPointsTo

      void addPointsTo(Pointer pointer, CSObj csObj)
    • addPointsTo

      void addPointsTo(Pointer pointer, Context heapContext, Obj obj)
    • addPointsTo

      default void addPointsTo(Pointer pointer, Obj obj)
      Convenient API to add points-to relation for object with empty heap context.
    • addVarPointsTo

      void addVarPointsTo(Context context, Var var, PointsToSet pts)
    • addVarPointsTo

      void addVarPointsTo(Context context, Var var, CSObj csObj)
    • addVarPointsTo

      void addVarPointsTo(Context context, Var var, Context heapContext, Obj obj)
    • addVarPointsTo

      default void addVarPointsTo(Context context, Var var, Obj obj)
      Convenient API to add var points-to relation for object with empty heap context.
    • addPointerFilter

      void addPointerFilter(Pointer pointer, Predicate<CSObj> filter)
      Adds an object filter to given pointer. Note that the filter works only after it is added to the pointer, and it cannot filter out the objects pointed to by the pointer before it is added.
    • addPFGEdge

      default void addPFGEdge(Pointer source, Pointer target, FlowKind kind)
      Adds an edge "source -> target" to the PFG.
    • addPFGEdge

      @Deprecated default void addPFGEdge(Pointer source, Pointer target, FlowKind kind, Type type)
      Deprecated.
      Adds an edge "source -> target" to the PFG. For the objects pointed to by "source", only the ones whose types are subtypes of given type are propagated to "target".
    • addPFGEdge

      @Deprecated default void addPFGEdge(Pointer source, Pointer target, FlowKind kind, Transfer transfer)
      Deprecated.
      Adds an edge "source -> target" (with edge transfer) to the PFG.
    • addPFGEdge

      default void addPFGEdge(PointerFlowEdge edge)
      Adds a pointer flow edge to the PFG.
    • addPFGEdge

      default void addPFGEdge(PointerFlowEdge edge, Type type)
      Adds a pointer flow edge (with type filer) to the PFG. For the objects pointed to by edge.source(), only the ones whose types are subtypes of type can be propagated to edge.target().
    • addPFGEdge

      void addPFGEdge(PointerFlowEdge edge, Transfer transfer)
      Adds a pointer flow edge (with edge transfer) to the PFG.
    • addEntryPoint

      void addEntryPoint(EntryPoint entryPoint)
      Adds an entry point. Notes that the method in entry point will be set as an entry in CallGraph
    • addCallEdge

      void addCallEdge(Edge<CSCallSite,CSMethod> edge)
      Adds a call edge.
      Parameters:
      edge - the added edge.
    • addCSMethod

      void addCSMethod(CSMethod csMethod)
      Adds a context-sensitive method.
      Parameters:
      csMethod - the added context-sensitive method.
    • addStmts

      void addStmts(CSMethod csMethod, Collection<Stmt> stmts)
      Adds stmts to the analyzed program. Solver will process given stmts.
      Parameters:
      csMethod - the container method of the stmts
      stmts - the added stmts
    • addIgnoredMethod

      void addIgnoredMethod(JMethod method)
      If a plugin takes over the analysis of a method, and wants this solver to ignore the method (for precision and/or efficiency reasons), then it could call this API with the method. After that, this solver will not process the method body.

      Typically, this API should be called at the initial stage of pointer analysis, i.e., in Plugin.onStart().

      Parameters:
      method - the method to be ignored.
    • initializeClass

      void initializeClass(JClass cls)
      Analyzes the static initializer (i.e., <clinit>) of given class.
      Parameters:
      cls - the class to be initialized.
    • getResult

      Returns:
      pointer analysis result.