[Soot-list] hash function for the instancekey

Eric Bodden eric.bodden at ec-spride.de
Mon Sep 17 14:22:08 EDT 2012


>> But when I read the " Objective representatives"
>> paper, I think  the author was insisting that instancekey can almost be used
>> as run-time objects in some extent.
>
> What I wrote is nevertheless correct in the sense that also at runtime
> two different objects may have the same hash code, so also there the
> conclusion "different hash codes => different objects" does not hold.

Oups, sorry, my mistake. Of course "different hash codes => different
objects" holds at runtime. But with InstanceKey objects that's not the
case, they may or may not alias (to tell the difference, one needs an
additional must-not-alias check). That's just the result of the
three-valued logic that instance keys implement.

For details I recommend to also look at our recent TOPLAS paper (section 7.6.1):
http://www.bodden.de/pubs/blh12partially.pdf

Eric


More information about the Soot-list mailing list