Skip to content

Construct side_effect_expr_nondett with a source location [blocks: #3800] #3938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/goto-analyzer/taint_analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ bool taint_analysist::operator()(
t->make_function_call(call);
calls.add_instruction()->make_goto(end.instructions.begin());
goto_programt::targett g=gotos.add_instruction();
g->make_goto(t, side_effect_expr_nondett(bool_typet()));
g->make_goto(
t, side_effect_expr_nondett(bool_typet(), symbol.location));
}

goto_functionst::goto_functiont &entry=
Expand Down
4 changes: 2 additions & 2 deletions src/util/nondet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ symbol_exprt generate_nondet_int(

// Assign the symbol any non deterministic integer value.
// int_type name_prefix::nondet_int = NONDET(int_type)
instructions.add(
code_assignt(nondet_symbol, side_effect_expr_nondett(int_type)));
instructions.add(code_assignt(
nondet_symbol, side_effect_expr_nondett(int_type, source_location)));

// Constrain the non deterministic integer with a lower bound of `min_value`.
// ASSUME(name_prefix::nondet_int >= min_value)
Expand Down
3 changes: 2 additions & 1 deletion unit/analyses/dependence_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ SCENARIO("dependence_graph", "[core][analyses][dependence_graph]")

code_ifthenelset if_block(
equal_exprt(
side_effect_expr_nondett(int_type), from_integer(0, int_type)),
side_effect_expr_nondett(int_type, source_locationt{}),
from_integer(0, int_type)),
code_blockt({call, assign_x}));

a_body.add(std::move(if_block));
Expand Down