Package sootup.spark

Class Spark

java.lang.Object
sootup.spark.Spark

public class Spark extends Object
Main access point to SPARK's functionality.

Exposes the call graph (CHA up-front, or built on-the-fly when SparkOptions#isOnFlyCallGraph() is set) and a PointsToAnalysis over the resulting PAG. Lower-level components such as the solver are package-private; clients should not bypass this facade.

   Spark spark = Spark.builder()
       .view(view)
       .entryPoints(List.of(mainSig))
       .sparkOptions(SparkOptions.builder().onFlyCallGraph(true).build())
       .build();
   PointsToAnalysis pta = spark.getPointsToAnalysis();
   CallGraph cg = spark.getCallGraph();
 
  • Method Details

    • solve

      public void solve()
      Builds the pointer assignment graph and (in OTF mode) the call graph. Invoked automatically by the accessors; calling it explicitly is optional and idempotent.
    • getCallGraph

      public CallGraph getCallGraph()
      Returns the call graph. Built via class-hierarchy analysis at construction time, or grown on-the-fly during solve() when SparkOptions#isOnFlyCallGraph() is set.
    • getPointsToAnalysis

      public PointsToAnalysis getPointsToAnalysis()
      Returns a points-to analysis over the solved PAG. The result is cached.
    • getPag

      public PAG getPag()
      Returns the underlying pointer assignment graph — intended for inspection and debugging.
    • getSparkOptions

      public SparkOptions getSparkOptions()