[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with PAG default options
Hi!
Today I tried to create a callgraph holding only edges between application
classes. The sourcecode is approximately as follows:
--
//Scene prepared so far
Scene.v().loadNecessaryClasses();
[get some entry points]
Scene.v().setEntryPoints(entryPoints);
Transform sparkTranform = new Transform( "cg.spark", null );
PhaseOptions.v().setPhaseOption( sparkTranform, "rta:true" );
PhaseOptions.v().setPhaseOption( "cg", "verbose:true" );
PhaseOptions.v().setPhaseOption( "cg", "all-reachable:true" );
Map options = PhaseOptions.v().getPhaseOptions( sparkTranform );
PointsToAnalysis spark = new PAG( new SparkOptions( options ) );
//set aspecific main class (just for testing)
Scene.v().setMainClass(Scene.v().getSootClass("pkg.Main"));
new CallGraphBuilder().build();
--
This works fine, so far, except, that I am still getting warnings about the
incompleteness of the graph, because I am invoking CallGraphBuilder().using
the default constructor.
So I tried to use a "real" call graph builder by replacing the last line
with: (CallGraphBuilder being a special version with appOnly==true
hardwired)
CallGraphBuilder(spark).build();
This leads now - for me surprisingly - to a graph without any edges. I could
track down the problem so far, that PAG.findVarNode( Object value ) always
returns null because apparently for some reason localToNodeMap is empty.
So do you have any idea, what could go wrong?
Thank you very much,
Eric