ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
cache_defs.h
Go to the documentation of this file.
1#pragma once
2#include <irep2/irep2.h>
3
4// This header will prevent the dependency hell
5// between irep2, message and config
6
7using assert_pair = std::pair<expr2tc, expr2tc>;
8using assert_db = std::unordered_set<assert_pair>;
9
10namespace std
11{
12template <>
13struct hash<assert_pair>
14{
15 auto operator()(const assert_pair &p) const -> size_t
16 {
17 // crc() is irep2's cached structural hash (a size_t). The previous code
18 // built two full SHA-1s only to fold each down to a size_t via
19 // to_size_t() — same width, so crc() is lossless here and skips the
20 // per-byte SHA walk.
21 return p.first->crc() ^ p.second->crc();
22 }
23};
24} // namespace std
std::pair< expr2tc, expr2tc > assert_pair
Definition cache_defs.h:7
std::unordered_set< assert_pair > assert_db
Definition cache_defs.h:8
Classes and definitions for non-stringy internal representation.
Definition exception.cpp:51
auto operator()(const assert_pair &p) const -> size_t
Definition cache_defs.h:15