Skip to content

Commit 1616ca5

Browse files
Use id_usett consistently
1 parent cef68e6 commit 1616ca5

26 files changed

+51
-52
lines changed

src/analyses/dirty.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class incremental_dirtyt
130130

131131
private:
132132
dirtyt dirty;
133-
std::unordered_set<irep_idt, irep_id_hash> dirty_processed_functions;
133+
unordered_id_sett dirty_processed_functions;
134134
};
135135

136136
#endif // CPROVER_ANALYSES_DIRTY_H

src/ansi-c/c_typecheck_type.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ void c_typecheck_baset::typecheck_compound_body(
877877
// scan for duplicate members
878878

879879
{
880-
std::unordered_set<irep_idt, irep_id_hash> members;
880+
unordered_id_sett members;
881881

882882
for(struct_union_typet::componentst::iterator
883883
it=components.begin();

src/ansi-c/expr2c_class.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ class expr2ct
6464

6565
static std::string indent_str(unsigned indent);
6666

67-
std::unordered_map<irep_idt,
68-
std::unordered_set<irep_idt, irep_id_hash>,
69-
irep_id_hash> ns_collision;
67+
std::unordered_map<irep_idt, unordered_id_sett, irep_id_hash> ns_collision;
7068
std::unordered_map<irep_idt, irep_idt, irep_id_hash> shorthands;
7169

7270
unsigned sizeof_nesting;

src/cbmc/symex_bmc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class symex_bmct: public goto_symext
147147

148148
virtual void no_body(const irep_idt &identifier);
149149

150-
std::unordered_set<irep_idt, irep_id_hash> body_warnings;
150+
unordered_id_sett body_warnings;
151151

152152
symex_coveraget symex_coverage;
153153
};

src/goto-instrument/count_eloc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Date: December 2012
2121

2222
#include <goto-programs/cfg.h>
2323

24-
typedef std::unordered_set<irep_idt, irep_id_hash> linest;
24+
typedef unordered_id_sett linest;
2525
typedef std::unordered_map<irep_idt, linest, irep_id_hash> filest;
2626
typedef std::unordered_map<irep_idt, filest, irep_id_hash> working_dirst;
2727

src/goto-instrument/dump_c.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ void dump_ct::cleanup_decl(
613613

614614
tmp.add_instruction(END_FUNCTION);
615615

616-
std::unordered_set<irep_idt, irep_id_hash> typedef_names;
616+
unordered_id_sett typedef_names;
617617
for(const auto &td : typedef_map)
618618
typedef_names.insert(td.first);
619619

@@ -640,7 +640,7 @@ void dump_ct::cleanup_decl(
640640
/// function declarations or struct definitions
641641
void dump_ct::collect_typedefs(const typet &type, bool early)
642642
{
643-
std::unordered_set<irep_idt, irep_id_hash> deps;
643+
unordered_id_sett deps;
644644
collect_typedefs_rec(type, early, deps);
645645
}
646646

@@ -654,12 +654,12 @@ void dump_ct::collect_typedefs(const typet &type, bool early)
654654
void dump_ct::collect_typedefs_rec(
655655
const typet &type,
656656
bool early,
657-
std::unordered_set<irep_idt, irep_id_hash> &dependencies)
657+
unordered_id_sett &dependencies)
658658
{
659659
if(system_symbols.is_type_internal(type, system_headers))
660660
return;
661661

662-
std::unordered_set<irep_idt, irep_id_hash> local_deps;
662+
unordered_id_sett local_deps;
663663

664664
if(type.id()==ID_code)
665665
{
@@ -986,7 +986,7 @@ void dump_ct::convert_function_declaration(
986986
code_blockt b;
987987
std::list<irep_idt> type_decls, local_static;
988988

989-
std::unordered_set<irep_idt, irep_id_hash> typedef_names;
989+
unordered_id_sett typedef_names;
990990
for(const auto &td : typedef_map)
991991
typedef_names.insert(td.first);
992992

src/goto-instrument/dump_c_class.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class dump_ct
5252
std::unique_ptr<languaget> language;
5353
const bool harness;
5454

55-
typedef std::unordered_set<irep_idt, irep_id_hash> convertedt;
55+
typedef unordered_id_sett convertedt;
5656
convertedt converted_compound, converted_global, converted_enum;
5757

5858
std::set<std::string> system_headers;
@@ -68,7 +68,7 @@ class dump_ct
6868
irep_idt typedef_name;
6969
std::string type_decl_str;
7070
bool early;
71-
std::unordered_set<irep_idt, irep_id_hash> dependencies;
71+
unordered_id_sett dependencies;
7272

7373
explicit typedef_infot(const irep_idt &name):
7474
typedef_name(name),
@@ -108,7 +108,7 @@ class dump_ct
108108
void collect_typedefs_rec(
109109
const typet &type,
110110
bool early,
111-
std::unordered_set<irep_idt, irep_id_hash> &dependencies);
111+
unordered_id_sett &dependencies);
112112
void gather_global_typedefs();
113113
void dump_typedefs(std::ostream &os) const;
114114

src/goto-programs/goto_inline_class.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,13 @@ class goto_inlinet:public messaget
193193
typedef goto_functionst::function_mapt cachet;
194194
cachet cache;
195195

196-
typedef std::unordered_set<irep_idt, irep_id_hash> finished_sett;
196+
typedef unordered_id_sett finished_sett;
197197
finished_sett finished_set;
198198

199-
typedef std::unordered_set<irep_idt, irep_id_hash> recursion_sett;
199+
typedef unordered_id_sett recursion_sett;
200200
recursion_sett recursion_set;
201201

202-
typedef std::unordered_set<irep_idt, irep_id_hash> no_body_sett;
202+
typedef unordered_id_sett no_body_sett;
203203
no_body_sett no_body_set;
204204
};
205205

src/goto-programs/lazy_goto_functions_map.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class lazy_goto_functions_mapt final
6161
/// Names of functions that are already fully available in the programt state.
6262
/// \remarks These functions do not need processing before being returned
6363
/// whenever they are requested
64-
mutable std::unordered_set<irep_idt, irep_id_hash> processed_functions;
64+
mutable unordered_id_sett processed_functions;
6565

6666
language_filest &language_files;
6767
symbol_tablet &symbol_table;

src/goto-programs/link_goto_model.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static bool link_functions(
4747
const symbol_tablet &src_symbol_table,
4848
goto_functionst &src_functions,
4949
const rename_symbolt &rename_symbol,
50-
const std::unordered_set<irep_idt, irep_id_hash> &weak_symbols,
50+
const unordered_id_sett &weak_symbols,
5151
const replace_symbolt &object_type_updates)
5252
{
5353
namespacet ns(dest_symbol_table);

src/goto-programs/set_properties.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Author: Daniel Kroening, [email protected]
1616

1717
void set_properties(
1818
goto_programt &goto_program,
19-
std::unordered_set<irep_idt, irep_id_hash> &property_set)
19+
unordered_id_sett &property_set)
2020
{
2121
for(goto_programt::instructionst::iterator
2222
it=goto_program.instructions.begin();
@@ -28,8 +28,7 @@ void set_properties(
2828

2929
irep_idt property_id=it->source_location.get_property_id();
3030

31-
std::unordered_set<irep_idt, irep_id_hash>::iterator
32-
c_it=property_set.find(property_id);
31+
unordered_id_sett::iterator c_it = property_set.find(property_id);
3332

3433
if(c_it==property_set.end())
3534
it->type=SKIP;
@@ -102,7 +101,7 @@ void set_properties(
102101
goto_functionst &goto_functions,
103102
const std::list<std::string> &properties)
104103
{
105-
std::unordered_set<irep_idt, irep_id_hash> property_set;
104+
unordered_id_sett property_set;
106105

107106
property_set.insert(properties.begin(), properties.end());
108107

src/goto-symex/partial_order_concurrency.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ partial_order_concurrencyt::~partial_order_concurrencyt()
2828
void partial_order_concurrencyt::add_init_writes(
2929
symex_target_equationt &equation)
3030
{
31-
std::unordered_set<irep_idt, irep_id_hash> init_done;
31+
unordered_id_sett init_done;
3232
bool spawn_seen=false;
3333

3434
symex_target_equationt::SSA_stepst init_steps;

src/goto-symex/postcondition.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ bool postconditiont::is_used(
175175

176176
value_setst::valuest expr_set;
177177
value_set.get_value_set(expr.op0(), expr_set, ns);
178-
std::unordered_set<irep_idt, irep_id_hash> symbols;
178+
unordered_id_sett symbols;
179179

180180
for(value_setst::valuest::const_iterator
181181
it=expr_set.begin();

src/goto-symex/precondition.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ void preconditiont::compute_rec(exprt &dest)
117117

118118
value_setst::valuest expr_set;
119119
value_sets.get_values(target, dest.op0(), expr_set);
120-
std::unordered_set<irep_idt, irep_id_hash> symbols;
120+
unordered_id_sett symbols;
121121

122122
for(value_setst::valuest::const_iterator
123123
it=expr_set.begin();

src/goto-symex/slice.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void slice(
2929

3030
// Collects "open" variables that are used but not assigned
3131

32-
typedef std::unordered_set<irep_idt, irep_id_hash> symbol_sett;
32+
typedef unordered_id_sett symbol_sett;
3333

3434
void collect_open_variables(
3535
const symex_target_equationt &equation,

src/java_bytecode/java_object_factory.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class java_object_factoryt
6767
/// non-det generator visits a type, the type is added to this set. We forbid
6868
/// the non-det initialization when we see the type for the second time in
6969
/// this set AND the tree depth becomes >= than the maximum value above.
70-
std::unordered_set<irep_idt, irep_id_hash> recursion_set;
70+
unordered_id_sett recursion_set;
7171

7272
/// Every time the non-det generator visits a type and the type is generic
7373
/// (either a struct or a pointer), the following map is used to store and
@@ -465,16 +465,15 @@ void java_object_factoryt::gen_pointer_target_init(
465465
class recursion_set_entryt
466466
{
467467
/// Recursion set to modify
468-
std::unordered_set<irep_idt, irep_id_hash> &recursion_set;
468+
unordered_id_sett &recursion_set;
469469
/// Entry to erase on destruction, if non-empty
470470
irep_idt erase_entry;
471471

472472
public:
473473
/// Initialize a recursion-set entry owner operating on a given set.
474474
/// Initially it does not own any set entry.
475475
/// \param _recursion_set: set to operate on.
476-
explicit recursion_set_entryt(
477-
std::unordered_set<irep_idt, irep_id_hash> &_recursion_set)
476+
explicit recursion_set_entryt(unordered_id_sett &_recursion_set)
478477
: recursion_set(_recursion_set)
479478
{ }
480479

src/java_bytecode/java_static_initializers.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ static itertype advance_to_next_key(itertype in, itertype end)
264264
/// when it is required.
265265
void stub_global_initializer_factoryt::create_stub_global_initializer_symbols(
266266
symbol_tablet &symbol_table,
267-
const std::unordered_set<irep_idt, irep_id_hash> &stub_globals_set,
267+
const unordered_id_sett &stub_globals_set,
268268
synthetic_methods_mapt &synthetic_methods)
269269
{
270270
// Populate map from class id -> stub globals:

src/java_bytecode/java_static_initializers.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class stub_global_initializer_factoryt
3838
public:
3939
void create_stub_global_initializer_symbols(
4040
symbol_tablet &symbol_table,
41-
const std::unordered_set<irep_idt, irep_id_hash> &stub_globals_set,
41+
const unordered_id_sett &stub_globals_set,
4242
synthetic_methods_mapt &synthetic_methods);
4343

4444
codet get_stub_initializer_body(
@@ -50,7 +50,7 @@ class stub_global_initializer_factoryt
5050

5151
void create_stub_global_initializers(
5252
symbol_tablet &symbol_table,
53-
const std::unordered_set<irep_idt, irep_id_hash> &stub_globals_set,
53+
const unordered_id_sett &stub_globals_set,
5454
const object_factory_parameterst &object_factory_parameters,
5555
const select_pointer_typet &pointer_type_selector);
5656

src/java_bytecode/java_string_library_preprocess.cpp

+8-5
Original file line numberDiff line numberDiff line change
@@ -1893,11 +1893,14 @@ bool java_string_library_preprocesst::is_known_string_type(
18931893

18941894
void java_string_library_preprocesst::initialize_known_type_table()
18951895
{
1896-
string_types=
1897-
std::unordered_set<irep_idt, irep_id_hash>{"java.lang.String",
1898-
"java.lang.StringBuilder",
1899-
"java.lang.CharSequence",
1900-
"java.lang.StringBuffer"};
1896+
string_types =
1897+
unordered_id_sett
1898+
{
1899+
"java.lang.String",
1900+
"java.lang.StringBuilder",
1901+
"java.lang.CharSequence",
1902+
"java.lang.StringBuffer"
1903+
};
19011904
}
19021905

19031906
/// fill maps with correspondence from java method names to conversion functions

src/java_bytecode/java_string_library_preprocess.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class java_string_library_preprocesst:public messaget
141141
};
142142

143143
// A set tells us what java types should be considered as string objects
144-
std::unordered_set<irep_idt, irep_id_hash> string_types;
144+
unordered_id_sett string_types;
145145

146146
codet make_equals_function_code(
147147
const code_typet &type,

src/java_bytecode/java_utils.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,11 @@ resolve_inherited_componentt::inherited_componentt get_inherited_component(
420420
/// \return true if this static field is known never to be null
421421
bool is_non_null_library_global(const irep_idt &symbolid)
422422
{
423-
static const std::unordered_set<irep_idt, irep_id_hash> non_null_globals =
424-
{
425-
"java::java.lang.System.out",
426-
"java::java.lang.System.err",
427-
"java::java.lang.System.in"
428-
};
423+
static const unordered_id_sett non_null_globals =
424+
{
425+
"java::java.lang.System.out",
426+
"java::java.lang.System.err",
427+
"java::java.lang.System.in"
428+
};
429429
return non_null_globals.count(symbolid);
430430
}

src/jsil/jsil_typecheck.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class jsil_typecheckt:public typecheckt
9494
virtual std::string to_string(const exprt &expr);
9595
virtual std::string to_string(const typet &type);
9696

97-
std::unordered_set<irep_idt, irep_id_hash> already_typechecked;
97+
unordered_id_sett already_typechecked;
9898
};
9999

100100
#endif // CPROVER_JSIL_JSIL_TYPECHECK_H

src/solvers/cvc/cvc_conv.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ void cvc_convt::set_to(const exprt &expr, bool value)
11571157

11581158
if(id.type.is_nil())
11591159
{
1160-
std::unordered_set<irep_idt, irep_id_hash> s_set;
1160+
unordered_id_sett s_set;
11611161

11621162
::find_symbols(expr.op1(), s_set);
11631163

src/util/find_macros.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Author: Daniel Kroening, [email protected]
1717
class exprt;
1818
class namespacet;
1919

20-
typedef std::unordered_set<irep_idt, irep_id_hash> find_macros_sett;
20+
typedef unordered_id_sett find_macros_sett;
2121

2222
void find_macros(
2323
const exprt &src,

src/util/find_symbols.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class exprt;
1919
class symbol_exprt;
2020
class typet;
2121

22-
typedef std::unordered_set<irep_idt, irep_id_hash> find_symbols_sett;
22+
typedef unordered_id_sett find_symbols_sett;
2323

2424
void find_symbols(
2525
const exprt &src,

src/util/journalling_symbol_table.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
class journalling_symbol_tablet : public symbol_table_baset
3535
{
3636
public:
37-
typedef std::unordered_set<irep_idt, irep_id_hash> changesett;
37+
typedef unordered_id_sett changesett;
3838

3939
private:
4040
symbol_table_baset &base_symbol_table;

0 commit comments

Comments
 (0)