@@ -535,6 +535,7 @@ refined_string_exprt java_string_library_preprocesst::decl_string_expr(
535
535
// / add symbols with prefix cprover_string_length and cprover_string_data and
536
536
// / construct a string_expr from them.
537
537
// / \param loc: a location in the program
538
+ // / \param function_id: name of the function containing the string
538
539
// / \param symbol_table: symbol table
539
540
// / \param code: code block to which allocation instruction will be added
540
541
// / \return a new string_expr
@@ -648,6 +649,7 @@ codet java_string_library_preprocesst::code_return_function_application(
648
649
// / Declare a fresh symbol of type array of character with infinite size.
649
650
// / \param symbol_table: the symbol table
650
651
// / \param loc: source location
652
+ // / \param function_id: name of the function containing the array
651
653
// / \param code [out] : code block where the declaration gets added
652
654
// / \return created symbol expression
653
655
exprt make_nondet_infinite_char_array (
@@ -660,7 +662,7 @@ exprt make_nondet_infinite_char_array(
660
662
java_char_type (), infinity_exprt (java_int_type ()));
661
663
const symbolt data_sym = get_fresh_aux_symbol (
662
664
array_type,
663
- " nondet_infinite_array " ,
665
+ id2string (function_id) ,
664
666
" nondet_infinite_array" ,
665
667
loc,
666
668
ID_java,
@@ -941,6 +943,7 @@ java_string_library_preprocesst::string_literal_to_string_expr(
941
943
// / \param type: type of the function call
942
944
// / \param loc: location in the program_invocation_name
943
945
// / \param symbol_table: symbol table
946
+ // / \param function_id: unused
944
947
// / \return Code corresponding to:
945
948
// / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
946
949
// / IF arg->@class_identifier == "java.lang.String"
@@ -981,7 +984,12 @@ codet java_string_library_preprocesst::make_equals_function_code(
981
984
code_blockt instance_case;
982
985
// Check content equality
983
986
const symbolt string_equals_sym = get_fresh_aux_symbol (
984
- return_type, " string_equals" , " str_eq" , loc, ID_java, symbol_table);
987
+ return_type,
988
+ id2string (function_id),
989
+ " str_eq" ,
990
+ loc,
991
+ ID_java,
992
+ symbol_table);
985
993
const symbol_exprt string_equals = string_equals_sym.symbol_expr ();
986
994
instance_case.add (code_declt (string_equals), loc);
987
995
const exprt::operandst args =
@@ -1736,6 +1744,7 @@ codet java_string_library_preprocesst::make_copy_string_code(
1736
1744
// / object.
1737
1745
// / \param type: type of the function
1738
1746
// / \param loc: location in the source
1747
+ // / \param function_id: unused
1739
1748
// / \param symbol_table: symbol table
1740
1749
// / \return Code corresponding to:
1741
1750
// / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1749,6 +1758,8 @@ codet java_string_library_preprocesst::make_copy_constructor_code(
1749
1758
const irep_idt &function_id,
1750
1759
symbol_table_baset &symbol_table)
1751
1760
{
1761
+ (void )function_id;
1762
+
1752
1763
// Code for the output
1753
1764
code_blockt code;
1754
1765
@@ -1775,6 +1786,7 @@ codet java_string_library_preprocesst::make_copy_constructor_code(
1775
1786
// / count instead of end index
1776
1787
// / \param type: type of the function call
1777
1788
// / \param loc: location in the program_invocation_name
1789
+ // / \param function_id: unused
1778
1790
// / \param symbol_table: symbol table
1779
1791
// / \return code implementing String intitialization from a char array and
1780
1792
// / arguments offset and end.
@@ -1784,6 +1796,8 @@ codet java_string_library_preprocesst::make_init_from_array_code(
1784
1796
const irep_idt &function_id,
1785
1797
symbol_table_baset &symbol_table)
1786
1798
{
1799
+ (void )function_id;
1800
+
1787
1801
// Code for the output
1788
1802
code_blockt code;
1789
1803
@@ -1819,6 +1833,7 @@ codet java_string_library_preprocesst::make_init_from_array_code(
1819
1833
// / Generates code for the String.length method
1820
1834
// / \param type: type of the function
1821
1835
// / \param loc: location in the source
1836
+ // / \param function_id: unused
1822
1837
// / \param symbol_table: symbol table
1823
1838
// / \return Code corresponding to:
1824
1839
// / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1832,6 +1847,8 @@ codet java_string_library_preprocesst::make_string_length_code(
1832
1847
const irep_idt &function_id,
1833
1848
symbol_table_baset &symbol_table)
1834
1849
{
1850
+ (void )function_id;
1851
+
1835
1852
code_typet::parameterst params=type.parameters ();
1836
1853
symbol_exprt arg_this (params[0 ].get_identifier (), params[0 ].type ());
1837
1854
dereference_exprt deref=
0 commit comments