@@ -305,7 +305,7 @@ java_string_library_preprocesst::convert_exprt_to_string_exprt(
305
305
{
306
306
PRECONDITION (implements_java_char_sequence_pointer (expr_to_process.type ()));
307
307
const refined_string_exprt string_expr =
308
- decl_string_expr (loc, symbol_table, init_code);
308
+ decl_string_expr (loc, loc. get_function (), symbol_table, init_code);
309
309
code_assign_java_string_to_string_expr (
310
310
string_expr, expr_to_process, loc, symbol_table, init_code);
311
311
return string_expr;
@@ -492,11 +492,13 @@ symbol_exprt java_string_library_preprocesst::fresh_string(
492
492
// / Add declaration of a refined string expr whose content and length are
493
493
// / fresh symbols.
494
494
// / \param loc: source location
495
+ // / \param function_name: name of the function in which the stirng is defined
495
496
// / \param symbol_table: the symbol table
496
497
// / \param code [out] : code block to which the declaration is added
497
498
// / \return refined string expr with fresh content and length symbols
498
499
refined_string_exprt java_string_library_preprocesst::decl_string_expr (
499
500
const source_locationt &loc,
501
+ const irep_idt &function_name,
500
502
symbol_table_baset &symbol_table,
501
503
code_blockt &code)
502
504
{
@@ -538,7 +540,8 @@ refined_string_exprt java_string_library_preprocesst::make_nondet_string_expr(
538
540
code_blockt &code)
539
541
{
540
542
// / \todo refactor with initialize_nonddet_string_struct
541
- const refined_string_exprt str = decl_string_expr (loc, symbol_table, code);
543
+ const refined_string_exprt str =
544
+ decl_string_expr (loc, loc.get_function (), symbol_table, code);
542
545
543
546
const side_effect_expr_nondett nondet_length (str.length ().type (), loc);
544
547
code.add (code_assignt (str.length (), nondet_length), loc);
@@ -1654,7 +1657,7 @@ codet java_string_library_preprocesst::make_copy_string_code(
1654
1657
1655
1658
// String expression that will hold the result
1656
1659
const refined_string_exprt string_expr =
1657
- decl_string_expr (loc, symbol_table, code);
1660
+ decl_string_expr (loc, loc. get_function (), symbol_table, code);
1658
1661
1659
1662
// Assign the argument to string_expr
1660
1663
const java_method_typet::parametert op = type.parameters ()[0 ];
@@ -1699,7 +1702,7 @@ codet java_string_library_preprocesst::make_copy_constructor_code(
1699
1702
1700
1703
// String expression that will hold the result
1701
1704
const refined_string_exprt string_expr =
1702
- decl_string_expr (loc, symbol_table, code);
1705
+ decl_string_expr (loc, function_id, symbol_table, code);
1703
1706
1704
1707
// Assign argument to a string_expr
1705
1708
const java_method_typet::parameterst params = type.parameters ();
0 commit comments