[Soot-list] whole-program-mode is set on, but getPointsToAnalysis is still of DumbPointerAnalysis type

Zhoulai zell08v at orange.fr
Tue Mar 19 07:06:55 EDT 2013


Hello,

Thank you all.

I got a solution inspired from your answers which I summarize below. It
might be useful for those who have been bothered for the same problem.

To make Scene.v().getPointsToAnalysis() have the type PAG rather than
DumbPointsToAnalysis:

-- [a easy way] either we use 'soot.Main.main(args)' with an appropriate
'args'
-- [a hard way] or we write this magic codes,  after setting
whole-program-mode on.

     //magic codes start
        HashMap<String,String> opt = new HashMap<String,String>();
        opt.put("enabled", "true");
        opt.put("propagator","worklist");
        opt.put("on-fly-cg","true");
        opt.put("set-impl","double");
        opt.put("double-set-old","hybrid");
        opt.put("double-set-new","hybrid");
        SparkTransformer.v().transform("",opt);
   //magic codes end

EACH of the above opt.put(...) is necessary to make the code work.

Actually,  I would like to reconsider my  opinion about Eric's suggestion
about "setting Spark as the default pointer analysis".

http://www.sable.mcgill.ca/pipermail/soot-list/2012-August/004752.html

I hope to undo my superficial saying in that thread. It would be nice if
Spark can be set as the default one :)


Zell.






On Mon, Mar 18, 2013 at 12:48 PM, Rohan Padhye
<rohanpadhye at cse.iitb.ac.in>wrote:

>  Are you sure you set the options before calling soot.Main.main() and are
> retrieving Scene.v().getPointsToAnalysis() only inside a transformer? I
> tried your code and you only get DumbPointerAnalysis before soot is
> actually run. After the cg phase, it should be soot.jimple.spark.pag.PAG.
>
>
> On 03/18/2013 04:50 PM, Zhoulai wrote:
>
> Hello,
>
> I don't see why my Scene.v().getPointsToAnalysis always gets the
> DumbPointerAnalysis while I have already set whole-program-mode and the
> phase cg.spark.
> *
>         soot.options.Options.v().set_whole_program(true);
>         soot.options.Options.v().setPhaseOption("cg.spark","enabled:true");
>
>         System.out.printf("whole_program=%s, pta_type=%s \n",
>                 Options.v().whole_program(),
>                 Scene.v().getPointsToAnalysis().getClass()
>                 );*
>
> The output result is
>
>    *whole_program=true, pta_type=class
> soot.jimple.toolkits.pointer.DumbPointerAnalysis
> *
> which is unepected for 'pta_type'.
>
>  Any ideas?Thanks.
>
>
> -Zell
>
>
> _______________________________________________
> Soot-list mailing listSoot-list at sable.mcgill.cahttp://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130319/05743e9d/attachment.html 


More information about the Soot-list mailing list