[Soot-list] hash function for the instancekey

Zhoulai zell08v at orange.fr
Tue Sep 18 04:07:12 EDT 2012


Hey Eric,

I see where I was wrong. Thanks for your clarification.

I naively thought we could beneficier from java.util.HashSet: it
distinguishes elements by their hash values, and identifies elements by the
"equals()" method. But it is clearly much handy to use  your  must-not
alias analyzer.

Zell.

On Tue, Sep 18, 2012 at 8:30 AM, Eric Bodden <eric.bodden at ec-spride.de>wrote:

> Hi.
>
> > Do you think it is implementable  to  hash instance keys s.t.
> >           whenever two keys have different hashes  then the intersection
> of
> > their points-to sets is empty?
>
> In that case, would you not also want to take the must-not-alias
> analysis into account? Even if points-to sets overlap, the
> must-not-alias analysis may tell you that the two keys don't actually
> alias.
>
> > This seems  motivating because such hash function would make instance
> keys
> > still easier to use, and thus make it more popular.
>
> Can you explain to me why this would make them easier to use? You
> would probably fewer hash collisions but that should be about it,
> shouldn't it? To the best of my knowledge it would be wrong to infer
> anything else from an object's hash code.
>
> > I formalized this  naive question at the forum
> >
> http://cs.stackexchange.com/questions/3480/algorithm-that-hashes-a-collection-of-sets-following-their-disjointness-relation
>
> I actually wonder if what you are proposing can ever work, as there
> may be more sets than 32-bit integers, which means that you cannot
> find an injective function into integers. (and as I understand an
> injective function is what you are after)
>
> Eric
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20120918/e94b2cc7/attachment.html 


More information about the Soot-list mailing list