Skip to content

Commit 1ea7e9e

Browse files
author
svorenova
committed
Make nondet-static replace lines in CPROVER_init
Instead of adding a new line that nondet initializes a variable after the original line that sets it, we now replace the original one
1 parent 0130eb8 commit 1ea7e9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/goto-instrument/nondet_static.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void nondet_static(
3131

3232
Forall_goto_program_instructions(i_it, init)
3333
{
34-
const goto_programt::instructiont &instruction=*i_it;
34+
const goto_programt::instructiont instruction=*i_it;
3535

3636
if(instruction.is_assign())
3737
{
@@ -54,7 +54,7 @@ void nondet_static(
5454
if(is_constant_or_has_constant_components(sym.type(), ns))
5555
continue;
5656

57-
i_it=init.insert_before(++i_it);
57+
//i_it=init.insert_before(++i_it);
5858
i_it->make_assignment();
5959
i_it->code=code_assignt(sym, side_effect_expr_nondett(sym.type()));
6060
i_it->source_location=instruction.source_location;

0 commit comments

Comments
 (0)