@@ -111,7 +111,6 @@ static void check_apply_invariants(
111
111
{
112
112
goto_programt::targett a=havoc_code.add_instruction (ASSERT);
113
113
a->guard =invariant;
114
- a->function =loop_head->function ;
115
114
a->source_location =loop_head->source_location ;
116
115
a->source_location .set_comment (" Loop invariant violated before entry" );
117
116
}
@@ -123,7 +122,6 @@ static void check_apply_invariants(
123
122
{
124
123
goto_programt::targett assume=havoc_code.add_instruction (ASSUME);
125
124
assume->guard =invariant;
126
- assume->function =loop_head->function ;
127
125
assume->source_location =loop_head->source_location ;
128
126
}
129
127
@@ -134,7 +132,6 @@ static void check_apply_invariants(
134
132
jump->guard =
135
133
side_effect_expr_nondett (bool_typet (), loop_head->source_location );
136
134
jump->targets .push_back (loop_end);
137
- jump->function =loop_head->function ;
138
135
}
139
136
140
137
// Now havoc at the loop head. Use insert_swap to
@@ -145,7 +142,6 @@ static void check_apply_invariants(
145
142
{
146
143
goto_programt::instructiont a (ASSERT);
147
144
a.guard =invariant;
148
- a.function =loop_end->function ;
149
145
a.source_location =loop_end->source_location ;
150
146
a.source_location .set_comment (" Loop invariant not preserved" );
151
147
goto_function.body .insert_before_swap (loop_end, a);
@@ -215,7 +211,6 @@ void code_contractst::apply_contract(
215
211
{
216
212
goto_programt::instructiont a (ASSERT);
217
213
a.guard =requires ;
218
- a.function =target->function ;
219
214
a.source_location =target->source_location ;
220
215
221
216
goto_program.insert_before_swap (target, a);
@@ -294,7 +289,6 @@ void code_contractst::add_contract_check(
294
289
// build skip so that if(nondet) can refer to it
295
290
goto_programt tmp_skip;
296
291
goto_programt::targett skip=tmp_skip.add_instruction (SKIP);
297
- skip->function =dest.instructions .front ().function ;
298
292
skip->source_location =ensures.source_location ();
299
293
300
294
goto_programt check;
@@ -303,7 +297,6 @@ void code_contractst::add_contract_check(
303
297
goto_programt::targett g=check.add_instruction ();
304
298
g->make_goto (
305
299
skip, side_effect_expr_nondett (bool_typet (), skip->source_location ));
306
- g->function =skip->function ;
307
300
g->source_location =skip->source_location ;
308
301
309
302
// prepare function call including all declarations
@@ -314,7 +307,6 @@ void code_contractst::add_contract_check(
314
307
if (gf.type .return_type ()!=empty_typet ())
315
308
{
316
309
goto_programt::targett d=check.add_instruction (DECL);
317
- d->function =skip->function ;
318
310
d->source_location =skip->source_location ;
319
311
320
312
symbol_exprt r=
@@ -335,7 +327,6 @@ void code_contractst::add_contract_check(
335
327
++p_it)
336
328
{
337
329
goto_programt::targett d=check.add_instruction (DECL);
338
- d->function =skip->function ;
339
330
d->source_location =skip->source_location ;
340
331
341
332
symbol_exprt p=
@@ -357,7 +348,6 @@ void code_contractst::add_contract_check(
357
348
{
358
349
goto_programt::targett a=check.add_instruction ();
359
350
a->make_assumption (requires );
360
- a->function =skip->function ;
361
351
a->source_location =requires .source_location ();
362
352
363
353
// rewrite any use of parameters
@@ -367,13 +357,11 @@ void code_contractst::add_contract_check(
367
357
// ret=function(parameter1, ...)
368
358
goto_programt::targett f=check.add_instruction ();
369
359
f->make_function_call (call);
370
- f->function =skip->function ;
371
360
f->source_location =skip->source_location ;
372
361
373
362
// assert(ensures)
374
363
goto_programt::targett a=check.add_instruction ();
375
364
a->make_assertion (ensures);
376
- a->function =skip->function ;
377
365
a->source_location =ensures.source_location ();
378
366
379
367
// rewrite any use of __CPROVER_return_value
@@ -382,7 +370,6 @@ void code_contractst::add_contract_check(
382
370
// assume(false)
383
371
goto_programt::targett af=check.add_instruction ();
384
372
af->make_assumption (false_exprt ());
385
- af->function =skip->function ;
386
373
af->source_location =ensures.source_location ();
387
374
388
375
// prepend the new code to dest
0 commit comments