[Soot-list] Spark Points-to analysis

Eric Bodden eric.bodden at mail.mcgill.ca
Wed Jul 18 17:41:57 EDT 2007


I think you never call soot.Main.main(args); - do you? Also, you might
want to use the -w option.

Eric

On 18/07/07, Armand Navabi <anavabi at purdue.edu> wrote:
> I am trying to use Soot's points-to analysis. I figured the best place
> to go is the survivor's guide Points-to Analysis chapter
> (http://www.brics.dk/~mis/soot.pdf).  There they have an example that I
> have implemented.  In the example verbose option is set to true.  I
> think this is what makes it print out information as the analysis goes
> along, except that when I run mine nothing prints out.  Below is the
> code.  I am running the program like this:
> java -Xmx512m -Xss256m analysis.pointsto.SparkExample
> Perhaps I need extra command line arguments to Soot?
>
> public class SparkExample
> {
>   private static SootClass loadClass(String name, boolean main) {
>     SootClass c = Scene.v().loadClassAndSupport(name);
>     c.setApplicationClass();
>     if(main) Scene.v().setMainClass(c);
>     return c;
>   }
>
>   public static void main(String[] args)
>   {
>     loadClass("analysis.pointsto.Item", false);
>     loadClass("analysis.pointsto.Container", false);
>     SootClass c = loadClass("analysis.pointsto.SparkExample", true);
>
>     Map options = new HashMap();
>     options.put("verbose", "true");
>     options.put("propagator", "worklist");
>     options.put("simple-edges-bidirectional", "false");
>     options.put("on-fly-cg", "true");
>     options.put("set-impl", "hybrid");
>     options.put("double-set-old", "hybrid");
>     options.put("double-set-new", "hybrid");
>
>     SparkTransformer.v().transform("",options);
>   }
>
>   public void go() {
>     Container c1 = new Container();
>     Item i1 = new Item();
>     c1.setItem(i1);
>     Container c2 = new Container();
>     Item i2 = new Item();
>     c2.setItem(i2);
>     Container c3 = c2;
>   }
> }
>
> class Container {
>   private Item item = new Item();
>   void setItem(Item item) {
>     this.item = item;
>   }
>   Item getItem() {
>     return this.item;
>   }
> }
> class Item { Object data; }
>
> Thanks,
> Armand
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>


-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list