@@ -265,20 +265,22 @@ symbol_exprt java_string_library_preprocesst::fresh_array(
265
265
// / calls string_refine_preprocesst::process_operands with a list of parameters.
266
266
// / \param params: a list of function parameters
267
267
// / \param loc: location in the source
268
+ // / \param function_id: name of the function in which the code will be added
268
269
// / \param symbol_table: symbol table
269
270
// / \param init_code: code block, in which declaration of some arguments may be
270
271
// / added
271
272
// / \return a list of expressions
272
273
exprt::operandst java_string_library_preprocesst::process_parameters (
273
274
const java_method_typet::parameterst ¶ms,
274
275
const source_locationt &loc,
276
+ const irep_idt &function_id,
275
277
symbol_table_baset &symbol_table,
276
278
code_blockt &init_code)
277
279
{
278
280
exprt::operandst ops;
279
281
for (const auto &p : params)
280
282
ops.emplace_back (symbol_exprt (p.get_identifier (), p.type ()));
281
- return process_operands (ops, loc, symbol_table, init_code);
283
+ return process_operands (ops, loc, function_id, symbol_table, init_code);
282
284
}
283
285
284
286
// / Creates a string_exprt from the input exprt representing a char sequence
@@ -319,13 +321,15 @@ java_string_library_preprocesst::convert_exprt_to_string_exprt(
319
321
// / for char array references.
320
322
// / \param operands: a list of expressions
321
323
// / \param loc: location in the source
324
+ // / \param function_id: name of the function in which the code will be added
322
325
// / \param symbol_table: symbol table
323
326
// / \param init_code: code block, in which declaration of some arguments may be
324
327
// / added
325
328
// / \return a list of expressions
326
329
exprt::operandst java_string_library_preprocesst::process_operands (
327
330
const exprt::operandst &operands,
328
331
const source_locationt &loc,
332
+ const irep_idt &function_id,
329
333
symbol_table_baset &symbol_table,
330
334
code_blockt &init_code)
331
335
{
@@ -335,7 +339,7 @@ exprt::operandst java_string_library_preprocesst::process_operands(
335
339
if (implements_java_char_sequence_pointer (p.type ()))
336
340
ops.push_back (
337
341
convert_exprt_to_string_exprt (
338
- p, loc, symbol_table, loc. get_function () , init_code));
342
+ p, loc, symbol_table, function_id , init_code));
339
343
else if (is_java_char_array_pointer_type (p.type ()))
340
344
ops.push_back (replace_char_array (p, loc, symbol_table, init_code));
341
345
else
@@ -1113,7 +1117,7 @@ code_blockt java_string_library_preprocesst::make_init_function_from_call(
1113
1117
1114
1118
// Processing parameters
1115
1119
const exprt::operandst args =
1116
- process_parameters (params, loc, symbol_table, code);
1120
+ process_parameters (params, loc, function_id, symbol_table, code);
1117
1121
1118
1122
// string_expr <- function(arg1)
1119
1123
const refined_string_exprt string_expr =
@@ -1457,8 +1461,8 @@ code_blockt java_string_library_preprocesst::make_string_format_code(
1457
1461
{
1458
1462
PRECONDITION (type.parameters ().size ()==2 );
1459
1463
code_blockt code;
1460
- exprt::operandst args= process_parameters (
1461
- type.parameters (), loc, symbol_table, code);
1464
+ exprt::operandst args =
1465
+ process_parameters ( type.parameters (), loc, function_id , symbol_table, code);
1462
1466
INVARIANT (args.size ()==2 , " String.format should have two arguments" );
1463
1467
1464
1468
// The argument can be:
@@ -1598,7 +1602,7 @@ code_blockt java_string_library_preprocesst::make_function_from_call(
1598
1602
{
1599
1603
code_blockt code;
1600
1604
const exprt::operandst args =
1601
- process_parameters (type.parameters (), loc, symbol_table, code);
1605
+ process_parameters (type.parameters (), loc, function_id, symbol_table, code);
1602
1606
code.add (
1603
1607
code_return_function_application (
1604
1608
function_id, args, type.return_type (), symbol_table),
@@ -1631,7 +1635,7 @@ java_string_library_preprocesst::make_string_returning_function_from_call(
1631
1635
1632
1636
// Calling the function
1633
1637
const exprt::operandst arguments =
1634
- process_parameters (type.parameters (), loc, symbol_table, code);
1638
+ process_parameters (type.parameters (), loc, function_id, symbol_table, code);
1635
1639
1636
1640
// String expression that will hold the result
1637
1641
const refined_string_exprt string_expr =
0 commit comments