File tree Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -22,23 +22,24 @@ void goto_symext::do_simplify(exprt &expr)
22
22
simplify (expr, ns);
23
23
}
24
24
25
- nondet_symbol_exprt goto_symext:: build_symex_nondet (typet &type)
25
+ nondet_symbol_exprt build_symex_nondet (typet &type, unsigned &nondet_count )
26
26
{
27
27
irep_idt identifier = " symex::nondet" + std::to_string (nondet_count++);
28
28
nondet_symbol_exprt new_expr (identifier, type);
29
29
return new_expr;
30
30
}
31
31
32
- void goto_symext:: replace_nondet (exprt &expr)
32
+ void replace_nondet (exprt &expr, unsigned &nondet_count )
33
33
{
34
34
if (expr.id ()==ID_side_effect &&
35
35
expr.get (ID_statement)==ID_nondet)
36
36
{
37
- nondet_symbol_exprt new_expr = build_symex_nondet (expr.type ());
37
+ nondet_symbol_exprt new_expr =
38
+ build_symex_nondet (expr.type (), nondet_count);
38
39
new_expr.add_source_location ()=expr.source_location ();
39
40
expr.swap (new_expr);
40
41
}
41
42
else
42
43
Forall_operands (it, expr)
43
- replace_nondet (*it);
44
+ replace_nondet (*it, nondet_count );
44
45
}
Original file line number Diff line number Diff line change @@ -320,8 +320,6 @@ class goto_symext
320
320
statet &,
321
321
const goto_functionst::goto_functiont &);
322
322
323
- nondet_symbol_exprt build_symex_nondet (typet &type);
324
-
325
323
// exceptions
326
324
void symex_throw (statet &);
327
325
void symex_catch (statet &);
@@ -404,7 +402,6 @@ class goto_symext
404
402
static unsigned nondet_count;
405
403
static unsigned dynamic_counter;
406
404
407
- void replace_nondet (exprt &);
408
405
void rewrite_quantifiers (exprt &, statet &);
409
406
410
407
path_storaget &path_storage;
@@ -452,6 +449,10 @@ class goto_symext
452
449
}
453
450
};
454
451
452
+ nondet_symbol_exprt build_symex_nondet (typet &type, unsigned &nondet_count);
453
+
454
+ void replace_nondet (exprt &, unsigned &);
455
+
455
456
void symex_transition (goto_symext::statet &state);
456
457
457
458
void symex_transition (
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ void goto_symext::symex_allocate(
177
177
}
178
178
else
179
179
{
180
- const exprt nondet = build_symex_nondet (object_type);
180
+ const exprt nondet = build_symex_nondet (object_type, nondet_count );
181
181
const code_assignt assignment (value_symbol.symbol_expr (), nondet);
182
182
symex_assign (state, assignment);
183
183
}
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ void goto_symext::clean_expr(
140
140
statet &state,
141
141
const bool write)
142
142
{
143
- replace_nondet (expr);
143
+ replace_nondet (expr, nondet_count );
144
144
dereference (expr, state, write);
145
145
146
146
// make sure all remaining byte extract operations use the root
You can’t perform that action at this time.
0 commit comments