File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -22,23 +22,23 @@ 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 = build_symex_nondet (expr.type (), nondet_count );
38
38
new_expr.add_source_location ()=expr.source_location ();
39
39
expr.swap (new_expr);
40
40
}
41
41
else
42
42
Forall_operands (it, expr)
43
- replace_nondet (*it);
43
+ replace_nondet (*it, nondet_count );
44
44
}
Original file line number Diff line number Diff line change @@ -331,8 +331,6 @@ class goto_symext
331
331
statet &,
332
332
const goto_functionst::goto_functiont &);
333
333
334
- nondet_symbol_exprt build_symex_nondet (typet &type);
335
-
336
334
// exceptions
337
335
void symex_throw (statet &);
338
336
void symex_catch (statet &);
@@ -415,7 +413,6 @@ class goto_symext
415
413
static unsigned nondet_count;
416
414
static unsigned dynamic_counter;
417
415
418
- void replace_nondet (exprt &);
419
416
void rewrite_quantifiers (exprt &, statet &);
420
417
421
418
path_storaget &path_storage;
@@ -463,6 +460,10 @@ class goto_symext
463
460
}
464
461
};
465
462
463
+ nondet_symbol_exprt build_symex_nondet (typet &type, unsigned &nondet_count);
464
+
465
+ void replace_nondet (exprt &, unsigned &);
466
+
466
467
void symex_transition (goto_symext::statet &state);
467
468
468
469
void symex_transition (
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