Interface PointerAnalysisResult

All Superinterfaces:
ResultHolder
All Known Implementing Classes:
PointerAnalysisResultImpl

public interface PointerAnalysisResult extends ResultHolder
Represents results of pointer analysis. This class provides various API for querying points-to sets of different kinds of pointer-accessing expressions. For the expressions that are ignored by pointer analysis, an empty set is returned.
  • Method Details

    • getCSVars

      Collection<CSVar> getCSVars()
      Returns:
      all reachable context-sensitive variables in the program.
    • getVars

      Collection<Var> getVars()
      Returns:
      all reachable variables in the program.
    • getInstanceFields

      Collection<InstanceField> getInstanceFields()
      Returns:
      all reachable instance fields in the program.
    • getArrayIndexes

      Collection<ArrayIndex> getArrayIndexes()
      Returns:
      all reachable array indexes in the program.
    • getStaticFields

      Collection<StaticField> getStaticFields()
      Returns:
      all reachable static fields in the program.
    • getCSObjects

      Collection<CSObj> getCSObjects()
      Returns:
      all reachable context-sensitive objects in the program.
    • getObjects

      Collection<Obj> getObjects()
      Returns:
      all reachable objects in the program.
    • getObjectIndexer

      Indexer<Obj> getObjectIndexer()
      Returns:
      indexer for Obj in the program.
    • getPointsToSet

      Set<Obj> getPointsToSet(Var var)
      Returns:
      set of Obj pointed to by var.
    • getPointsToSet

      default Set<Obj> getPointsToSet(FieldAccess access)
      Returns:
      set of Obj pointed to by field access.
    • getPointsToSet

      Set<Obj> getPointsToSet(InstanceFieldAccess access)
      Returns:
      set of Obj pointed to by given instance field access, e.g., o.f.
    • getPointsToSet

      Set<Obj> getPointsToSet(Var base, JField field)
      Returns:
      set of Obj pointed to by base.field.
    • getPointsToSet

      Set<Obj> getPointsToSet(Obj base, JField field)
      Returns:
      set of Obj pointed to by in given base.field.
    • getPointsToSet

      Set<Obj> getPointsToSet(StaticFieldAccess access)
      Returns:
      set of Obj pointed to by given static field access, e.g., T.f.
    • getPointsToSet

      Set<Obj> getPointsToSet(JField field)
      Returns:
      points-to set of given field. The field is supposed to be static.
    • getPointsToSet

      Set<Obj> getPointsToSet(ArrayAccess access)
      Returns:
      set of Obj pointed to by given array access, e.g., a[i].
    • getPointsToSet

      Set<Obj> getPointsToSet(Var base, Var index)
      Returns:
      points-to set of given array index. The base is supposed to be of array type; parameter index is unused.
    • getPointsToSet

      Set<Obj> getPointsToSet(Obj array)
      Returns:
      set of Obj pointed to by given array.
    • mayAlias

      boolean mayAlias(Var v1, Var v2)
      Returns:
      true if two variables may be aliases.
    • mayAlias

      boolean mayAlias(InstanceFieldAccess if1, InstanceFieldAccess if2)
      Returns:
      true if two instance field accesses may be aliases.
    • mayAlias

      boolean mayAlias(ArrayAccess a1, ArrayAccess a2)
      Returns:
      true if two array accesses may be aliases.
    • getCSCallGraph

      CallGraph<CSCallSite,CSMethod> getCSCallGraph()
      Returns:
      the resulting context-sensitive call graph.
    • getCallGraph

      CallGraph<Invoke,JMethod> getCallGraph()
      Returns:
      the resulting call graph (without contexts).
    • getObjectFlowGraph

      ObjectFlowGraph getObjectFlowGraph()
      Returns:
      the resulting object flow graph.