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#if NAMED_SUB_IS_FORWARD_LIST
59 const std::size_t named_sub_size =
60 std::distance(named_sub.begin(), named_sub.end());
62 const std::size_t named_sub_size = named_sub.size();
64 packed.reserve(1 + 1 + sub.size() + 1 + named_sub_size * 2);
68 packed.push_back(sub.size());
69 for(
const auto &sub_irep : sub)
70 packed.push_back(
number(sub_irep));
72 packed.push_back(named_sub_size);
73 for(
const auto &sub_irep : named_sub)
76 packed.push_back(
number(sub_irep.second));
81 const std::size_t non_comment_count =
86 packed.reserve(1 + 1 + sub.size() + 1 + non_comment_count * 2);
90 packed.push_back(sub.size());
91 for(
const auto &sub_irep : sub)
92 packed.push_back(
number(sub_irep));
94 packed.push_back(non_comment_count);
95 for(
const auto &sub_irep : named_sub)
99 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
static bool is_comment(const irep_idt &name)
const irep_idt & id() const
named_subt & get_named_sub()
typename dt::named_subt named_subt
dstring_hash irep_id_hash
#define hash_combine(h1, h2)
std::size_t operator()(const packedt &p) const