@@ -162,9 +162,9 @@ void dfcc_spec_functionst::generate_havoc_instructions(
162
162
if (ins_it->call_function ().id () != ID_symbol)
163
163
{
164
164
throw invalid_source_file_exceptiont (
165
- " Function pointer call '" +
165
+ " Function pointer calls are not supported in assigns clauses: '" +
166
166
from_expr (ns, function_id, ins_it->call_function ()) +
167
- " ' in function '" + id2string (function_id) + " ' is not supported " ,
167
+ " ' called in function '" + id2string (function_id) + " '" ,
168
168
ins_it->source_location ());
169
169
}
170
170
@@ -265,21 +265,25 @@ void dfcc_spec_functionst::to_spec_assigns_function(
265
265
.symbol_expr ();
266
266
267
267
to_spec_assigns_instructions (
268
- write_set_to_fill, goto_function.body , nof_targets);
268
+ write_set_to_fill,
269
+ utils.get_function_symbol (function_id).mode ,
270
+ goto_function.body ,
271
+ nof_targets);
269
272
270
273
goto_model.goto_functions .update ();
271
274
272
275
// instrument for side-effects checking
273
276
std::set<irep_idt> function_pointer_contracts;
274
277
instrument.instrument_function (function_id, function_pointer_contracts);
275
278
INVARIANT (
276
- function_pointer_contracts.size () == 0 ,
279
+ function_pointer_contracts.empty () ,
277
280
" discovered function pointer contracts unexpectedly" );
278
281
utils.set_hide (function_id, true );
279
282
}
280
283
281
284
void dfcc_spec_functionst::to_spec_assigns_instructions (
282
285
const exprt &write_set_to_fill,
286
+ const irep_idt &language_mode,
283
287
goto_programt &program,
284
288
std::size_t &nof_targets)
285
289
{
@@ -295,9 +299,9 @@ void dfcc_spec_functionst::to_spec_assigns_instructions(
295
299
if (ins_it->call_function ().id () != ID_symbol)
296
300
{
297
301
throw invalid_source_file_exceptiont (
298
- " Function pointer call '" +
299
- from_expr (ns, " " , ins_it->call_function ()) +
300
- " ' are supported in assigns clauses " ,
302
+ " Function pointer calls are not supported in assigns clauses '" +
303
+ from_expr_using_mode (ns, language_mode , ins_it->call_function ()) +
304
+ " '" ,
301
305
ins_it->source_location ());
302
306
}
303
307
@@ -350,22 +354,26 @@ void dfcc_spec_functionst::to_spec_frees_function(
350
354
.symbol_expr ();
351
355
352
356
to_spec_frees_instructions (
353
- write_set_to_fill, goto_function.body , nof_targets);
357
+ write_set_to_fill,
358
+ utils.get_function_symbol (function_id).mode ,
359
+ goto_function.body ,
360
+ nof_targets);
354
361
355
362
goto_model.goto_functions .update ();
356
363
357
364
// instrument for side-effects checking
358
365
std::set<irep_idt> function_pointer_contracts;
359
366
instrument.instrument_function (function_id, function_pointer_contracts);
360
367
INVARIANT (
361
- function_pointer_contracts.size () == 0 ,
368
+ function_pointer_contracts.empty () ,
362
369
" discovered function pointer contracts unexpectedly" );
363
370
364
371
utils.set_hide (function_id, true );
365
372
}
366
373
367
374
void dfcc_spec_functionst::to_spec_frees_instructions (
368
375
const exprt &write_set_to_fill,
376
+ const irep_idt &language_mode,
369
377
goto_programt &program,
370
378
std::size_t &nof_targets)
371
379
{
@@ -378,9 +386,9 @@ void dfcc_spec_functionst::to_spec_frees_instructions(
378
386
if (ins_it->call_function ().id () != ID_symbol)
379
387
{
380
388
throw invalid_source_file_exceptiont (
381
- " Function pointer call '" +
382
- from_expr (ns, " " , ins_it->call_function ()) +
383
- " ' are not supported in frees clauses " ,
389
+ " Function pointer calls are not supported in frees clauses: '" +
390
+ from_expr_using_mode (ns, language_mode , ins_it->call_function ()) +
391
+ " '" ,
384
392
ins_it->source_location ());
385
393
}
386
394
0 commit comments