Skip to content

Commit 5ed8232

Browse files
committed
Nondet static: update the symbol table
Update the symbol table and auto-generate __CPROVER_initialize instead of hand-tweaking the function. This will ensure that any further rebuilding of __CPROVER_initialize preserves those changes.
1 parent 5ecd477 commit 5ed8232

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/goto-instrument/nondet_static.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ bool is_nondet_initializable_static(
7777
/// \param ns: Namespace for resolving type information.
7878
/// \param [out] goto_functions: Existing goto-functions to be updated.
7979
/// \param fct_name: Name of the goto-function to be updated.
80-
void nondet_static(
80+
static void nondet_static(
8181
const namespacet &ns,
8282
goto_functionst &goto_functions,
8383
const irep_idt &fct_name)
@@ -188,6 +188,10 @@ void nondet_static(
188188
{
189189
symbol.value.set(ID_C_no_nondet_initialization, 1);
190190
}
191+
else if(is_nondet_initializable_static(symbol.symbol_expr(), ns))
192+
{
193+
symbol.value = side_effect_expr_nondett(symbol.type, symbol.location);
194+
}
191195
}
192196

193197
nondet_static(ns, goto_model.goto_functions, INITIALIZE_FUNCTION);

0 commit comments

Comments
 (0)