@@ -39,6 +39,7 @@ class java_simple_method_stubst
3939 const typet &expected_type,
4040 const exprt &ptr,
4141 const source_locationt &loc,
42+ const irep_idt &function_id,
4243 code_blockt &parent_block,
4344 unsigned insert_before_index,
4445 bool is_constructor,
@@ -77,6 +78,7 @@ void java_simple_method_stubst::create_method_stub_at(
7778 const typet &expected_type,
7879 const exprt &ptr,
7980 const source_locationt &loc,
81+ const irep_idt &function_id,
8082 code_blockt &parent_block,
8183 const unsigned insert_before_index,
8284 const bool is_constructor,
@@ -108,6 +110,8 @@ void java_simple_method_stubst::create_method_stub_at(
108110
109111 // Generate new instructions.
110112 code_blockt new_instructions;
113+ object_factory_parameterst parameters = object_factory_parameters;
114+ parameters.function_id = function_id;
111115 gen_nondet_init (
112116 to_init,
113117 new_instructions,
@@ -116,7 +120,7 @@ void java_simple_method_stubst::create_method_stub_at(
116120 is_constructor,
117121 allocation_typet::DYNAMIC,
118122 !assume_non_null,
119- object_factory_parameters ,
123+ parameters ,
120124 update_in_place ? update_in_placet::MUST_UPDATE_IN_PLACE
121125 : update_in_placet::NO_UPDATE_IN_PLACE);
122126
@@ -155,7 +159,7 @@ void java_simple_method_stubst::create_method_stub(symbolt &symbol)
155159 const typet &this_type = this_argument.type ();
156160 symbolt &init_symbol = get_fresh_aux_symbol (
157161 this_type,
158- " to_construct " ,
162+ id2string (symbol. name ) ,
159163 " to_construct" ,
160164 synthesized_source_location,
161165 ID_java,
@@ -169,6 +173,7 @@ void java_simple_method_stubst::create_method_stub(symbolt &symbol)
169173 this_type,
170174 init_symbol_expression,
171175 synthesized_source_location,
176+ symbol.name ,
172177 new_instructions,
173178 1 ,
174179 true ,
@@ -181,14 +186,16 @@ void java_simple_method_stubst::create_method_stub(symbolt &symbol)
181186 {
182187 symbolt &to_return_symbol = get_fresh_aux_symbol (
183188 required_return_type,
184- " to_return " ,
189+ id2string (symbol. name ) ,
185190 " to_return" ,
186191 synthesized_source_location,
187192 ID_java,
188193 symbol_table);
189194 const exprt &to_return = to_return_symbol.symbol_expr ();
190195 if (to_return_symbol.type .id () != ID_pointer)
191196 {
197+ object_factory_parameterst parameters = object_factory_parameters;
198+ parameters.function_id = symbol.name ;
192199 gen_nondet_init (
193200 to_return,
194201 new_instructions,
@@ -197,14 +204,15 @@ void java_simple_method_stubst::create_method_stub(symbolt &symbol)
197204 false ,
198205 allocation_typet::LOCAL, // Irrelevant as type is primitive
199206 !assume_non_null,
200- object_factory_parameters ,
207+ parameters ,
201208 update_in_placet::NO_UPDATE_IN_PLACE);
202209 }
203210 else
204211 create_method_stub_at (
205212 required_return_type,
206213 to_return,
207214 synthesized_source_location,
215+ symbol.name ,
208216 new_instructions,
209217 0 ,
210218 false ,
0 commit comments