[Soot-list] pointsTo analysis - spark

Cristina Basescu cristina.basescu at gmail.com
Thu Jun 25 08:11:14 EDT 2009


f is reachable from the program's entry point, i.e. it's called from main.
I've also tested that the PointsToSet for a local variable from f is not
empty.

Any other suggestions on what might be the problem?

Best regards,
Cristina

On Thu, Jun 25, 2009 at 3:21 AM, Patrick Lam <plam at sable.mcgill.ca> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Points-to sets are going to be empty unless the code you're trying to
> analyze is reachable from the program's entry point.
>
> pat
>
> Cristina Basescu wrote:
> > I analyzed more in-depth the API and I thought obtaining the
> > FieldRefNode for the non-static field and calling makeP2Set() should do
> > the trick:
> >
> > soot.PointsToAnalysis pta = Scene.v().getPointsToAnalysis();
> > if(value instanceof SootField) {
> >   if(((SootField)value).isStatic() == false) {
> >         // sc is the SootClass value is from
> >         FieldRefNode frn =
> > ((PAG)pta).findGlobalFieldRefNode(getBase(sc), (SootField)value);
> >         if(frn == null) {
> >               frn = ((PAG)pta).findLocalFieldRefNode(getBase(sc),
> > (SootField)value);
> >               if(frn != null) {
> >                    PointsToSet r = frn.makeP2Set();
> >                }
> >          }
> >    }
> > }
> >
> > frn is not null (so I believe I shouldn't alloc a new node), however the
> > PointsToSet r is empty.
> >
> > Another attempt was to use doAddStoreEdge for statements instance of
> > DefinitionStmt, where the left op is a non-static field and the right op
> > is something different from a non-static field. I expected this to cause
> > makeP2Set to return for the left value at least the PointsToSet the
> > right value has, however it still returns an empty PointsToSet.
> >
> > Any ideas what I am doing wrong? The code I tested this on is:
> >
> > public class B {
> >     Object obj;
> >     void f(Object l1, Object l2, Object l3) {
> >         obj = l1;
> >    }
> > ...
> > }
> >
> > Thank you!
> >
> > Best regards,
> > Cristina
> >
> > On Tue, Jun 23, 2009 at 4:00 PM, Hamid 2C <hamid2c at gmail.com
> > <mailto:hamid2c at gmail.com>> wrote:
> >
> >     > Hello!
> >     >
> >     > I'm trying to implement an alias analysis using the Spark
> >     framework. My
> >     > question is, is there possible to get the set of objects pointed
> >     to by a
> >     > SootField that is not static?
> >
> >     Yes, Spark analysis is field-sensitive by default. See concrete field
> >     nodes (AllocDotField node in the code) for more information.
> >
> >     Hamid
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at sable.mcgill.ca
> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkpCww0ACgkQNTVxnNGEyOhpVACfS7zHM3r++yrWyBH4UTvzl0xB
> BUEAmwTbdhgds3K2/DCiDTWL/POAeG73
> =XvYo
> -----END PGP SIGNATURE-----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20090625/9e448e07/attachment.html 


More information about the Soot-list mailing list