[PPL-devel] Hash code for PPL objects

Gianluca Amato gianluca.amato at unich.it
Wed Sep 14 18:41:13 CEST 2022


Hi Roberto.

On Wed, Sep 14, 2022 at 4:01 PM Roberto Bagnara <bagnara at cs.unipr.it> wrote:

> Hi Gianluca.
>
> I guess you already did
>
> $ git checkout devel
> Already on 'devel'
> Your branch is up to date with 'origin/devel'.
> $ git grep hash_code
>
> and you did not like what you found, correct?
>

Sorry, I did not thought about checking the source code. I looked for some
hash function in the user documentation, but couldn't find any (now I
checked the documentation for developers and I see it was there).

Actually, now that I look at the code, it is true that I don't particularly
like it. If I understand correctly, at least for polyhedron, boxes and
similar domains, the hash is computed by the space dimension. So, it is
technically compatible with equality, but not well distributed, just
slightly better than a constant function. So, at least for some
applications, I think that my question on the consistency of the string
representation is still relevant.

Ciao,
--gianluca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cs.unipr.it/pipermail/ppl-devel/attachments/20220914/c97efdf0/attachment.htm>


More information about the PPL-devel mailing list