[Soot-list] rta callgraph incomplete ?
Ondrej Lhotak
olhotak at uwaterloo.ca
Thu Mar 5 19:44:54 EST 2009
See http://www.sable.mcgill.ca/pipermail/soot-list/2006-July/000762.html
On Thu, Mar 05, 2009 at 12:08:06PM +0100, Nicolas BARRE wrote:
> Hi,
>
> I'm currently trying the rta algorithm provided by the spark package.
> I obtain a call graph with only 15 edges while the cha algorithm gives
> more than 90000 edges...
> This result is strange because rta spends a long time to compute and the
> verbose option tells :
> Total methods: 27592
> Initially reachable methods: 15199
> Classes with at least one reachable method: 2273
>
> Here is my code :
>
> public static void main(String[] argv){
> String main_name = argv[0];
> String cp = argv[1];
> Scene.v().setSootClassPath(cp);
> Options.v().set_whole_program(true);
> Options.v().set_app(true);
>
> SootClass main_class = Scene.v().loadClass(main_name, SootClass.BODIES);
> SootMethod main_method = main_class.getMethodByName("main");
> s.setMainClass(main_class);
>
> Scene.v().loadNecessaryClasses();
>
> CallGraphBuilder cg_builder;
> CallGraph cg;
> ContextInsensitiveBuilder cg_ins_builder =
> new ContextInsensitiveBuilder();
> TreeMap<String,String> map = new TreeMap();
> map.put("enabled","true");
> map.put("verbose","true");
> map.put("rta","true");
> map.put("on-fly-cg","false");
> map.put("simulates-natives","false");
> map.put("propagator","worklist");
> map.put("set-impl","hash");
>
> SparkOptions spark_options = new SparkOptions(map);
> PAG pag = cg_ins_builder.setup(spark_options);
> cg_ins_builder.build();
>
> cg_builder = new CallGraphBuilder(pag);
> cg_builder.build();
> cg = cg_builder.getCallGraph();
> ...
> }
>
> Is there something wrong in this code ?
>
> Thanks,
> Nicolas
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
More information about the Soot-list
mailing list