[Soot-list] hash function for the instancekey

Eric Bodden eric.bodden at ec-spride.de
Tue Sep 18 02:30:15 EDT 2012


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


More information about the Soot-list mailing list