|
ESBMC
Efficient SMT-based Context-Bounded Model Checker
|
#include <irep2/irep2_content_hash.h>#include <irep2/irep2_dispatch.h>#include <util/arith/mp_arith.h>#include <irep2/expr_kinds.inc>#include <irep2/type_kinds.inc>Macros | |
| #define | IREP2_EXPR(kind, _) |
| #define | IREP2_TYPE(kind, _) |
Functions | |
| void | irep2_content_hash (const expr2tc &e, const irep2_name_mappert &rename, const irep2_symbol_mappert &rename_symbol, uint64_t &lo, uint64_t &hi) |
Structural hash of e that depends only on its content. | |
| #define IREP2_EXPR | ( | kind, | |
| _ ) |
| #define IREP2_TYPE | ( | kind, | |
| _ ) |
| void irep2_content_hash | ( | const expr2tc & | e, |
| const irep2_name_mappert & | rename, | ||
| const irep2_symbol_mappert & | rename_symbol, | ||
| uint64_t & | lo, | ||
| uint64_t & | hi ) |
Structural hash of e that depends only on its content.
Every irep_idt contributes its characters (through rename), so the result is stable across processes – unlike crc(), whose irep_idt hash is the string-pool index. Nothing is copied or rendered to text: the walk reads the expression in place and feeds the two rolling lanes, which chain across calls so a sequence of expressions accumulates into one 128-bit value.