[Soot-list] Fast Lookup of SootMethod/SootMethodRef

Marc-Andre Laverdiere-Papineau marc-andre.laverdiere-papineau at polymtl.ca
Thu Feb 28 11:18:07 EST 2013


Hello,

What about their numbers? Are those guaranteed to be unique? If so, then 
lookups would be very fast.

Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 13-02-28 03:30 AM, Eric Bodden wrote:
> 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
>
>
>


More information about the Soot-list mailing list