[Soot-list] How can I tell if the two arrays overlap?

John Dean jdean4 at kc.rr.com
Wed Aug 1 11:57:09 EDT 2012


Quentin & Marc-Andre - Thanks!

John

-----Original Message-----
From: soot-list-bounces at sable.mcgill.ca
[mailto:soot-list-bounces at sable.mcgill.ca] On Behalf Of Marc-Andre
Laverdiere-Papineau
Sent: Wednesday, August 01, 2012 10:38 AM
To: soot-list at sable.mcgill.ca
Subject: Re: [Soot-list] How can I tell if the two arrays overlap?

On 2012-07-31 05:00, Quentin Sabah wrote:
> Hi John,
>
>> For the set of statements that I'm interested in (statements in a 
>> loop), I'll look for array references at the left of assignment 
>> statements, and for each such array reference, I'll search for 
>> definitions of the array references' bases (arr[i]'s base is arr) and 
>> follow such definitions until I reach a newarray Jimple value. During 
>> that recursive traversal process, if I run into any array bases that 
>> were found previously, then that's an indication of overlapping arrays.
>
> You can use a points-to analysis to get the set of objects that may be 
> reachable from an array's elements. Take a look at
> PointsToAnalysis.reachingObjectsOfArrayElement:
> http://www.sable.mcgill.ca/soot/doc/soot/PointsToAnalysis.html#reachin
> gObjectsOfArrayElement(soot.PointsToSet)
>
> If you only need to know if a given array $a may be referenced by the 
> 2D array $b, you may take a look at the intersection of the points-to 
> set of variable $a and the points-to set of the $b array's elements.
>
> However, their is, to my knowledge, no existing analysis that maintain 
> a points-to analysis on an array element basis. Also consider 
> fine-tuning the points-to analysis to set the correct 
> sensitivity/insensitivity to context and flow.
>
Hello,

I saw at some point a paper on collection disjointness that may be of some
kind of use for the analysis you are trying to do.
http://www.lirmm.fr/~ducour/Doc-objets/ECOOP2012/SOAP/p45-chu.pdf

--
Marc-André Laverdière-Papineau
Étudiant au doctorat - PhD Student


_______________________________________________
Soot-list mailing list
Soot-list at sable.mcgill.ca
http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list



More information about the Soot-list mailing list