Skip to content

Commit 79e7e81

Browse files
Daniel Kroeningtautschnig
authored andcommitted
convert_java_nondet passes down function identifier
We are working towards removing the "function" field from goto_programt::instructionst::instructiont, and thus need to pass the identifier of the function whenever it actually is required.
1 parent dcbda65 commit 79e7e81

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

jbmc/src/java_bytecode/convert_java_nondet.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ static goto_programt get_gen_nondet_init_instructions(
7878
/// \return The next instruction to process with this function and a boolean
7979
/// indicating whether any changes were made to the goto program.
8080
static std::pair<goto_programt::targett, bool> insert_nondet_init_code(
81+
const irep_idt &function_identifier,
8182
goto_programt &goto_program,
8283
const goto_programt::targett &target,
8384
symbol_table_baset &symbol_table,
@@ -116,7 +117,7 @@ static std::pair<goto_programt::targett, bool> insert_nondet_init_code(
116117

117118
symbolt &aux_symbol = get_fresh_aux_symbol(
118119
op.type(),
119-
id2string(goto_programt::get_function_id(goto_program)),
120+
id2string(function_identifier),
120121
"nondet_tmp",
121122
source_loc,
122123
ID_java,
@@ -169,6 +170,7 @@ static std::pair<goto_programt::targett, bool> insert_nondet_init_code(
169170
/// objects.
170171
/// \param mode: Language mode
171172
void convert_nondet(
173+
const irep_idt &function_identifier,
172174
goto_programt &goto_program,
173175
symbol_table_baset &symbol_table,
174176
message_handlert &message_handler,
@@ -181,6 +183,7 @@ void convert_nondet(
181183
while(instruction_iterator != goto_program.instructions.end())
182184
{
183185
auto ret = insert_nondet_init_code(
186+
function_identifier,
184187
goto_program,
185188
instruction_iterator,
186189
symbol_table,
@@ -206,6 +209,7 @@ void convert_nondet(
206209
java_object_factory_parameterst parameters = object_factory_parameters;
207210
parameters.function_id = function.get_function_id();
208211
convert_nondet(
212+
function.get_function_id(),
209213
function.get_goto_function().body,
210214
function.get_symbol_table(),
211215
message_handler,
@@ -232,6 +236,7 @@ void convert_nondet(
232236
java_object_factory_parameterst parameters = object_factory_parameters;
233237
parameters.function_id = f_it.first;
234238
convert_nondet(
239+
f_it.first,
235240
f_it.second.body,
236241
symbol_table,
237242
message_handler,

0 commit comments

Comments
 (0)