@@ -289,6 +289,7 @@ exprt::operandst java_string_library_preprocesst::process_parameters(
289
289
// / sequence
290
290
// / \param loc: location in the source
291
291
// / \param symbol_table: symbol table
292
+ // / \param function_name: name of the function in which the code will be added
292
293
// / \param init_code: code block, in which declaration will be added:
293
294
// / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
294
295
// / char *cprover_string_content;
@@ -303,11 +304,12 @@ java_string_library_preprocesst::convert_exprt_to_string_exprt(
303
304
const exprt &expr_to_process,
304
305
const source_locationt &loc,
305
306
symbol_table_baset &symbol_table,
307
+ const irep_idt &function_name,
306
308
code_blockt &init_code)
307
309
{
308
310
PRECONDITION (implements_java_char_sequence_pointer (expr_to_process.type ()));
309
311
const refined_string_exprt string_expr =
310
- decl_string_expr (loc, loc. get_function () , symbol_table, init_code);
312
+ decl_string_expr (loc, function_name , symbol_table, init_code);
311
313
code_assign_java_string_to_string_expr (
312
314
string_expr, expr_to_process, loc, symbol_table, init_code);
313
315
return string_expr;
@@ -335,7 +337,8 @@ exprt::operandst java_string_library_preprocesst::process_operands(
335
337
{
336
338
if (implements_java_char_sequence_pointer (p.type ()))
337
339
ops.push_back (
338
- convert_exprt_to_string_exprt (p, loc, symbol_table, init_code));
340
+ convert_exprt_to_string_exprt (
341
+ p, loc, symbol_table, loc.get_function (), init_code));
339
342
else if (is_java_char_array_pointer_type (p.type ()))
340
343
ops.push_back (replace_char_array (p, loc, symbol_table, init_code));
341
344
else
@@ -367,14 +370,16 @@ java_string_library_preprocesst::process_equals_function_operands(
367
370
PRECONDITION (implements_java_char_sequence_pointer (op0.type ()));
368
371
369
372
ops.push_back (
370
- convert_exprt_to_string_exprt (op0, loc, symbol_table, init_code));
373
+ convert_exprt_to_string_exprt (
374
+ op0, loc, symbol_table, loc.get_function (), init_code));
371
375
372
376
// TODO: Manage the case where we have a non-String Object (this should
373
377
// probably be handled upstream. At any rate, the following code should be
374
378
// protected with assertions on the type of op1.
375
379
const typecast_exprt tcast (op1, to_pointer_type (op0.type ()));
376
380
ops.push_back (
377
- convert_exprt_to_string_exprt (tcast, loc, symbol_table, init_code));
381
+ convert_exprt_to_string_exprt (
382
+ tcast, loc, symbol_table, loc.get_function (), init_code));
378
383
return ops;
379
384
}
380
385
0 commit comments