@@ -39,6 +39,7 @@ class java_simple_method_stubst
39
39
const typet &expected_type,
40
40
const exprt &ptr,
41
41
const source_locationt &loc,
42
+ const irep_idt &function_id,
42
43
code_blockt &parent_block,
43
44
unsigned insert_before_index,
44
45
bool is_constructor,
@@ -77,6 +78,7 @@ void java_simple_method_stubst::create_method_stub_at(
77
78
const typet &expected_type,
78
79
const exprt &ptr,
79
80
const source_locationt &loc,
81
+ const irep_idt &function_id,
80
82
code_blockt &parent_block,
81
83
const unsigned insert_before_index,
82
84
const bool is_constructor,
@@ -108,6 +110,8 @@ void java_simple_method_stubst::create_method_stub_at(
108
110
109
111
// Generate new instructions.
110
112
code_blockt new_instructions;
113
+ object_factory_parameterst parameters = object_factory_parameters;
114
+ parameters.function_id = function_id;
111
115
gen_nondet_init (
112
116
to_init,
113
117
new_instructions,
@@ -116,7 +120,7 @@ void java_simple_method_stubst::create_method_stub_at(
116
120
is_constructor,
117
121
allocation_typet::DYNAMIC,
118
122
!assume_non_null,
119
- object_factory_parameters ,
123
+ parameters ,
120
124
update_in_place ? update_in_placet::MUST_UPDATE_IN_PLACE
121
125
: update_in_placet::NO_UPDATE_IN_PLACE);
122
126
@@ -155,7 +159,7 @@ void java_simple_method_stubst::create_method_stub(symbolt &symbol)
155
159
const typet &this_type = this_argument.type ();
156
160
symbolt &init_symbol = get_fresh_aux_symbol (
157
161
this_type,
158
- " to_construct " ,
162
+ id2string (symbol. name ) ,
159
163
" to_construct" ,
160
164
synthesized_source_location,
161
165
ID_java,
@@ -169,6 +173,7 @@ void java_simple_method_stubst::create_method_stub(symbolt &symbol)
169
173
this_type,
170
174
init_symbol_expression,
171
175
synthesized_source_location,
176
+ symbol.name ,
172
177
new_instructions,
173
178
1 ,
174
179
true ,
@@ -181,14 +186,16 @@ void java_simple_method_stubst::create_method_stub(symbolt &symbol)
181
186
{
182
187
symbolt &to_return_symbol = get_fresh_aux_symbol (
183
188
required_return_type,
184
- " to_return " ,
189
+ id2string (symbol. name ) ,
185
190
" to_return" ,
186
191
synthesized_source_location,
187
192
ID_java,
188
193
symbol_table);
189
194
const exprt &to_return = to_return_symbol.symbol_expr ();
190
195
if (to_return_symbol.type .id () != ID_pointer)
191
196
{
197
+ object_factory_parameterst parameters = object_factory_parameters;
198
+ parameters.function_id = symbol.name ;
192
199
gen_nondet_init (
193
200
to_return,
194
201
new_instructions,
@@ -197,14 +204,15 @@ void java_simple_method_stubst::create_method_stub(symbolt &symbol)
197
204
false ,
198
205
allocation_typet::LOCAL, // Irrelevant as type is primitive
199
206
!assume_non_null,
200
- object_factory_parameters ,
207
+ parameters ,
201
208
update_in_placet::NO_UPDATE_IN_PLACE);
202
209
}
203
210
else
204
211
create_method_stub_at (
205
212
required_return_type,
206
213
to_return,
207
214
synthesized_source_location,
215
+ symbol.name ,
208
216
new_instructions,
209
217
0 ,
210
218
false ,
0 commit comments