[Soot-list] Fast Lookup of SootMethod/SootMethodRef

Eric Bodden eric.bodden at ec-spride.de
Thu Feb 28 03:30:17 EST 2013


I think the reason for the current behavior is that there are some
algorithms in Soot which really like to keep multiple "equal" method
refs apart, even when they are stored in structures like hash sets.
But if you wrap them into EquivalentValue wrappers then this should
actually work. This wrapper dispatches equals/hashCode to special
"equivTo" methods.

Eric

On 27 February 2013 20:03, Marc-Andre Laverdiere-Papineau
<marc-andre.laverdiere-papineau at polymtl.ca> wrote:
> Hello,
>
> I want to check against a whitelist of methods, and I stored
> SootMethodRef instances in a big HashSet.
>
> Weirdly enough, using set.contains(), I kept on getting false.
>
> I looked into the implementation, and it seems like equals and hashcode
> are not implemented.
>
> Is this something that was left out voluntarily?
>
> Should I use a set or bit set with getNumber()? Are those numbers
> guaranteed to have no collisions?
>
> Otherwise, what is the fast way to do such lookups?
>
> Regards,
>
> --
> Marc-André Laverdière-Papineau
> Doctorant - PhD Candidate
> _______________________________________________
> 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