@@ -954,6 +954,7 @@ code_blockt java_string_library_preprocesst::make_float_to_string_code(
954
954
// Getting the argument
955
955
java_method_typet::parameterst params = type.parameters ();
956
956
PRECONDITION (params.size ()==1 );
957
+ PRECONDITION (!params[0 ].get_identifier ().empty ());
957
958
const symbol_exprt arg (params[0 ].get_identifier (), params[0 ].type ());
958
959
959
960
// Holder for output code
@@ -1097,6 +1098,7 @@ code_blockt java_string_library_preprocesst::make_init_function_from_call(
1097
1098
1098
1099
// The first parameter is the object to be initialized
1099
1100
PRECONDITION (!params.empty ());
1101
+ PRECONDITION (!params[0 ].get_identifier ().empty ());
1100
1102
const symbol_exprt arg_this (params[0 ].get_identifier (), params[0 ].type ());
1101
1103
if (is_constructor)
1102
1104
params.erase (params.begin ());
@@ -1137,6 +1139,7 @@ java_string_library_preprocesst::make_assign_and_return_function_from_call(
1137
1139
// This is similar to assign functions except we return a pointer to `this`
1138
1140
java_method_typet::parameterst params = type.parameters ();
1139
1141
PRECONDITION (!params.empty ());
1142
+ PRECONDITION (!params[0 ].get_identifier ().empty ());
1140
1143
code_blockt code;
1141
1144
code.add (
1142
1145
make_assign_function_from_call (function_name, type, loc, symbol_table),
@@ -1507,6 +1510,8 @@ code_blockt java_string_library_preprocesst::make_object_get_class_code(
1507
1510
symbol_table_baset &symbol_table)
1508
1511
{
1509
1512
java_method_typet::parameterst params = type.parameters ();
1513
+ PRECONDITION (!params.empty ());
1514
+ PRECONDITION (!params[0 ].get_identifier ().empty ());
1510
1515
const symbol_exprt this_obj (params[0 ].get_identifier (), params[0 ].type ());
1511
1516
1512
1517
// Code to be returned
@@ -1668,6 +1673,7 @@ code_blockt java_string_library_preprocesst::make_copy_string_code(
1668
1673
1669
1674
// Assign the argument to string_expr
1670
1675
java_method_typet::parametert op = type.parameters ()[0 ];
1676
+ PRECONDITION (!op.get_identifier ().empty ());
1671
1677
symbol_exprt arg0 (op.get_identifier (), op.type ());
1672
1678
code_assign_java_string_to_string_expr (
1673
1679
string_expr, arg0, loc, symbol_table, code);
@@ -1713,6 +1719,8 @@ code_blockt java_string_library_preprocesst::make_copy_constructor_code(
1713
1719
1714
1720
// Assign argument to a string_expr
1715
1721
java_method_typet::parameterst params = type.parameters ();
1722
+ PRECONDITION (!params[0 ].get_identifier ().empty ());
1723
+ PRECONDITION (!params[1 ].get_identifier ().empty ());
1716
1724
symbol_exprt arg1 (params[1 ].get_identifier (), params[1 ].type ());
1717
1725
code_assign_java_string_to_string_expr (
1718
1726
string_expr, arg1, loc, symbol_table, code);
@@ -1747,6 +1755,7 @@ code_returnt java_string_library_preprocesst::make_string_length_code(
1747
1755
(void )function_id;
1748
1756
1749
1757
java_method_typet::parameterst params = type.parameters ();
1758
+ PRECONDITION (!params[0 ].get_identifier ().empty ());
1750
1759
symbol_exprt arg_this (params[0 ].get_identifier (), params[0 ].type ());
1751
1760
dereference_exprt deref =
1752
1761
checked_dereference (arg_this, arg_this.type ().subtype ());
0 commit comments