@@ -15,6 +15,7 @@ Author: Diffblue Ltd.
15
15
#include < util/c_types.h>
16
16
#include < util/fresh_symbol.h>
17
17
#include < util/namespace.h>
18
+ #include < util/nondet_bool.h>
18
19
#include < util/std_expr.h>
19
20
#include < util/std_types.h>
20
21
#include < util/string_constant.h>
@@ -42,15 +43,6 @@ static const symbolt &c_new_tmp_symbol(
42
43
return tmp_symbol;
43
44
}
44
45
45
- // / \param type: Desired type (C_bool or plain bool)
46
- // / \param loc: source location
47
- // / \return nondet expr of that type
48
- static exprt c_get_nondet_bool (const typet &type, const source_locationt &loc)
49
- {
50
- // We force this to 0 and 1 and won't consider other values
51
- return typecast_exprt (side_effect_expr_nondett (bool_typet (), loc), type);
52
- }
53
-
54
46
class symbol_factoryt
55
47
{
56
48
std::vector<const symbolt *> &symbols_created;
@@ -188,7 +180,7 @@ void symbol_factoryt::gen_nondet_init(
188
180
// <expr> = NONDET(_BOOL);
189
181
// Else add the following code to assignments:
190
182
// <expr> = NONDET(type);
191
- exprt rhs = type.id () == ID_c_bool ? c_get_nondet_bool (type, loc)
183
+ exprt rhs = type.id () == ID_c_bool ? get_nondet_bool (type, loc)
192
184
: side_effect_expr_nondett (type, loc);
193
185
code_assignt assign (expr, rhs);
194
186
assign.add_source_location ()=loc;
0 commit comments