package alt-ergo-lib

  1. Overview
  2. Docs

Hashed values.

This signature defines the interface required for values to be hashconsed.

type elt

The type of hashed elements

val eq : elt -> elt -> bool

Equality predicate on values.

val hash : elt -> int

Hash function on values. Must be compatible with the equality function, i.e: equality of values imply that hashes are equal.

val set_id : int -> elt -> elt

Set an id to the given value. This id should not be considered by the equality function when comparing values. Should not mutate the given value for the hashconsing to be correct.

val initial_size : int

Initial size for the hashconsing table.

val disable_weaks : unit -> bool

Values hashconsed when this returns true are treated as always reachable by the gc and thus will not be collected.