|
ESBMC
Efficient SMT-based Context-Bounded Model Checker
|
Persistent set with O(1) copy, the value-less analogue of persistent_map. More...
#include <persistent_map.h>
Public Types | |
| using | const_iterator = typename set_t::iterator |
Public Member Functions | |
| persistent_set ()=default | |
| std::size_t | size () const |
| bool | empty () const |
| std::size_t | count (const K &k) const |
| void | insert (const K &k) |
| bool | erase (const K &k) |
| const_iterator | begin () const |
| const_iterator | end () const |
| template<class Added, class Removed> | |
| void | diff (const persistent_set &other, Added &&added, Removed &&removed) const |
Persistent set with O(1) copy, the value-less analogue of persistent_map.
framet::local_variables and declaration_history hold the frame's L1 name records. local_variables is copied into every per-branch merge_statet and union-merged at each join (merge_locality); with a std::unordered_set that is O(N) per branch, so a method holding N locals across N joins is O(N^2). Backing it with immer::set makes the snapshot O(1) and the union O(|diff|) — see the diff() note below and persistent_map's header.
| using persistent_set< K, Hash >::const_iterator = typename set_t::iterator |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |