21 ptr_hasht::const_iterator it=
ptr_hash.find(&irep.
read());
24 return it->second.number;
31 std::piecewise_construct,
32 std::forward_as_tuple(&irep.
read()),
33 std::forward_as_tuple(
id, irep));
41 size_t result=p.size();
58 const std::size_t named_sub_size = named_sub.size();
59 packed.reserve(1 + 1 + sub.size() + 1 + named_sub_size * 2);
63 packed.push_back(sub.size());
64 for(
const auto &sub_irep : sub)
65 packed.push_back(
number(sub_irep));
67 packed.push_back(named_sub_size);
68 for(
const auto &sub_irep : named_sub)
71 packed.push_back(
number(sub_irep.second));
76 const std::size_t non_comment_count =
81 packed.reserve(1 + 1 + sub.size() + 1 + non_comment_count * 2);
85 packed.push_back(sub.size());
86 for(
const auto &sub_irep : sub)
87 packed.push_back(
number(sub_irep));
89 packed.push_back(non_comment_count);
90 for(
const auto &sub_irep : named_sub)
94 packed.push_back(
number(sub_irep.second));
std::vector< std::size_t > packedt
numberingt< packedt, vector_hasht > numbering
void pack(const irept &irep, packedt &)
std::size_t number(const irept &irep)
There are a large number of kinds of tree structured or tree-like data in CPROVER.
static std::size_t number_of_non_comments(const named_subt &)
count the number of named_sub elements that are not comments
named_subt & get_named_sub()
const irep_idt & id() const
static bool is_comment(const irep_idt &name)
typename dt::named_subt named_subt
dstring_hash irep_id_hash
#define hash_combine(h1, h2)
std::size_t operator()(const packedt &p) const