[Soot-list] Query regarding SPARK points-to analysis

Bodden, Eric eric.bodden at sit.fraunhofer.de
Mon Nov 3 04:00:12 EST 2014


Hello Aniya.

I am a bit confused by your interpretation. Points-to sets normally contain allocation sites, not variables. Hence, all reaching* methods should normally return a set containing alloc sites, in your example in particular:

obj: {new PointPoolObject()}
arr: {new PointPoolObject[POINTS_COUNT];}
arr.<elements>: {new PointPoolObject()}

Did you try to use Spark's default options. They should give you a result like the one above...

Cheers,
Eric


On 02.11.2014, at 17:38, Aniya Aggarwal <aniya1234 at iiitd.ac.in> wrote:

> Hi All,
> I am trying to do points-to analysis using SPARK framework. For the code mentioned below, the analysis yields the following points-to sets for 'obj' and 'arr'..
> 
> arr: {obj}
> obj: empty points-to set
> 
> The analysis can detect 'obj' in the points-to set of 'arr' using reachingObjectsOfArrayElement() as the elements of the array 'arr' points-to 'obj' in the first loop. But in the second loop, even though 'obj' points to an element of the array 'arr', the latter is not detected in the points-to set of 'obj' while using reachingObjects(Local l).  
> 
> I am using SPARK with the following options.
> 
> propagator=worklist, simple-edges-bidirectional=false, on-fly-cg=true, set-impl=double, double-set-old=hybrid, double-set-new=hybrid
> 
> Please let me know if this is something that SPARK cannot handle or some option is set incorrectly. Kindly suggest an alternative to detect 'arr' in the points-to set of 'obj'.
> 
> //Test code
> private void testPool( final int POINTS_COUNT){
> PointPoolObject obj;
> PointPoolObject[] arr = new PointPoolObject[POINTS_COUNT];
> 
> for (int i = 0; i < POINTS_COUNT; i++) {
> obj = new PointPoolObject();
> arr[i] = obj;
> }
> for (int i = 0; i < POINTS_COUNT; i++) {
> obj = arr[i];
> }
> }
> 
> Thanks & Regards,
> Aniya Aggarwal
> MT-12034
> M.Tech CSE (Data Engineering)
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list

--
Prof. Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
Head of Secure Software Engineering at Fraunhofer SIT, TU Darmstadt and EC SPRIDE
Tel: +49 6151 16-75422    Fax: +49 6151 869-127
Room B5.11, Fraunhofer SIT, Rheinstraße 75, 64295 Darmstadt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20141103/81e51ef8/attachment-0001.bin 


More information about the Soot-list mailing list