[Soot-list] wrong result for method reachObjects(local, field) in points-to analysis

Aiwu Shi aiwu_shi at hotmail.com
Tue Mar 7 16:55:33 EST 2006


hi,

I use a simple program to test my points-to analysis.

I am not extending Soot in the recommended way, but just calling into 
Soot/Spark directly like the following:

//set the PointsToAnalysis with phase options
  options.put("enabled", "true");
  options.put("on-fly-cg", "true");
  options.put("set-impl", "hybrid");
  options.put("propagator", "worklist");
  options.put("verbose", "true"); 
  SparkTransformer.v().transform("cg.spark",options);

I want to get the PointsToSet for the field f of local variable w, that is, the PointsToSet of w.f. after my analysis, I got the PointsToSet include two AllocNode, one is AllocNode for x, the other is AllocNode for y.
in fact, we can know, the w.f should only contain the AllocNode of y. 
so, is there a bug for the method of reachObject(local, field)? please explain for me. thanks

Aiwu 



my analyzed sample class is followed:

class Sample{
 private C f;  
 
 public C f2( ){
  C x;
  C y;
  Sample w=new Sample();
  x = new C();
  y = new C();
  
  w.f=x;
  w.f=y;
  
  return x;
 }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20060307/e70e28e7/attachment.htm


More information about the Soot-list mailing list