[Soot-list] Is there a work-around to have reachingObjects(AllocNode an, SootField f) in the PointsToAnalysis Interface?

Eric Bodden eric.bodden at ec-spride.de
Thu Feb 28 10:25:45 EST 2013


Zell, I think it's important to understand that points-to sets are
something inherently flow-insensitive. Modifying points-to sets to
gain flow sensitivity is IMHO not a good idea. A better idea would be
to combine points-to sets with a method-local flow-sensitive pointer
analysis. You can do this with object representatives (also known as
"instance keys") which Soot supports and which we describe in this
paper:

http://www.bodden.de/pubs/blh08object.pdf

Cheers,
Eric

On 28 February 2013 15:08, Richard Xiao <richardxx at cse.ust.hk> wrote:
> Hi, Zhoulai:
>
> You can implement "PointsToSet reachingObjects(AllocNode an, SootField f)"
> for Spark. It is only a matter of iteration over the points-to set of an.f:
>
> <Sample Code>:
>
> AllocDotField adf = an.dot(f);
> final PointsToSetInternal ans = getSetFactory().newSet(f.getType(), this);
>
> adf.getP2Set().forall(new P2SetVisitor() {
>      public final void visit(Node n) {
>          AllocNode obj = (AllocNode)n;
>          ans.add( obj );
>      }
>  });
>
>
>
> Cheers,
> Xiao
>
>
>
> On Thu, Feb 28, 2013 at 6:24 PM, Zhoulai <zell08v at orange.fr> wrote:
>>
>> Hello, Eric,
>>
>> Thank you for your attention.  The  Local/SootField interface should be
>> sufficiently expressive to represent pointer relations in flow-insenstive
>> points-to analysis. However, I would like to know the work around  in order
>> to deal with a more refined analysis.
>>
>> Consider a points-to relation like this:
>>
>> (x,h1), (x,h2), (z,f),  (h1, f, h3), (h2, f, h4)
>>
>> After an instruction  x.f=null, we may want to (for a flow-sensitive
>> analysis)  perform a strong update by removing (h2,f,h4), but we should not
>> remove (h1,f,h3) because it is reachable by variable 'z'.
>>
>> Any workaround? Thanks.
>>
>> Zell.
>>
>>
>> >
>> > For example, suppose that variable 'x' points to allocation sites 'h1',
>> > 'h2', and h1 points to h2 via field 'f'. How can we obtain the arc
>> > (h1,f,h2)?
>>
>>
>> On Thu, Feb 28, 2013 at 9:32 AM, Eric Bodden <eric.bodden at ec-spride.de>
>> wrote:
>>>
>>> Hi Zell.
>>>
>>> Can you explain again why the Local/SootField interface is not
>>> sufficient for you? I can see that there is a difference but I don't
>>> understand why it would matter.
>>>
>>> Eric
>>>
>>> On 28 February 2013 08:10, Zhoulai <zell08v at orange.fr> wrote:
>>> > Hello,
>>> >
>>> > In Spark, how can I get the points-to set regarding to an AllocNode and
>>> > a
>>> > SootField ? I see that the class
>>> >
>>> >  soot.jimple.spark.geom.geomPA
>>> >
>>> > offers this method:  PointsToSet GeomPointsTo.reachingObjects(AllocNode
>>> > an,
>>> > SootField f)
>>> >
>>> > This method allows the query of points-to set from an AllocNode and a
>>> > SootField. Is there some workaround to have this functionality using
>>> > Sark's
>>> > default interface PointsToAnalysis? As far as I know, the interface has
>>> > a
>>> > method to obtain the points-to set with a local variable and a
>>> > sootfield,
>>> > which is different from the above mentioned interface.
>>> >
>>> > For example, suppose that variable 'x' points to allocation sites 'h1',
>>> > 'h2', and h1 points to h2 via field 'f'. How can we obtain the arc
>>> > (h1,f,h2)?
>>> >
>>> > Thank you for your idea.
>>> >
>>> > Zell.
>>> >
>>> > _______________________________________________
>>> > Soot-list mailing list
>>> > Soot-list at sable.mcgill.ca
>>> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>> >
>>>
>>>
>>>
>>> --
>>> Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
>>> Head of Secure Software Engineering Group at EC SPRIDE
>>> Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
>>> Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt
>>
>>
>>
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>
>
>
>
> --
> Richard Xiao Xiao
> PhD Student @ CSE @ Hong Kong University of Science and Technology
> www.cse.ust.hk/~richardxx
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>



-- 
Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
Head of Secure Software Engineering Group at EC SPRIDE
Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt


More information about the Soot-list mailing list