@@ -329,11 +329,13 @@ void instrument_cover_goals(
329
329
330
330
// / Instruments goto functions based on given command line options
331
331
// / \param options: the options
332
+ // / \param cover_config: configuration, produced using get_cover_config
332
333
// / \param symbol_table: the symbol table
333
334
// / \param goto_functions: the goto functions
334
335
// / \param message_handler: a message handler
335
336
bool instrument_cover_goals (
336
337
const optionst &options,
338
+ const cover_configt &cover_config,
337
339
const symbol_tablet &symbol_table,
338
340
goto_functionst &goto_functions,
339
341
message_handlert &message_handler)
@@ -342,13 +344,8 @@ bool instrument_cover_goals(
342
344
msg.status () << " Rewriting existing assertions as assumptions"
343
345
<< messaget::eom;
344
346
345
- std::unique_ptr<cover_configt> cover_config =
346
- get_cover_config (options, symbol_table, message_handler);
347
- if (!cover_config)
348
- return true ;
349
-
350
347
if (
351
- cover_config-> traces_must_terminate &&
348
+ cover_config. traces_must_terminate &&
352
349
!goto_functions.function_map .count (goto_functions.entry_point ()))
353
350
{
354
351
msg.error () << " cover-traces-must-terminate: invalid entry point ["
@@ -359,29 +356,31 @@ bool instrument_cover_goals(
359
356
Forall_goto_functions (f_it, goto_functions)
360
357
{
361
358
const symbolt function_symbol = symbol_table.lookup_ref (f_it->first );
362
- cover_config->mode = function_symbol.mode ;
363
359
instrument_cover_goals (
364
- * cover_config, function_symbol, f_it->second , message_handler);
360
+ cover_config, function_symbol, f_it->second , message_handler);
365
361
}
366
362
goto_functions.compute_location_numbers ();
367
363
368
- cover_config-> function_filters .report_anomalies ();
369
- cover_config-> goal_filters .report_anomalies ();
364
+ cover_config. function_filters .report_anomalies ();
365
+ cover_config. goal_filters .report_anomalies ();
370
366
371
367
return false ;
372
368
}
373
369
374
370
// / Instruments a goto model based on given command line options
375
371
// / \param options: the options
372
+ // / \param cover_config: configuration, produced using get_cover_config
376
373
// / \param goto_model: the goto model
377
374
// / \param message_handler: a message handler
378
375
bool instrument_cover_goals (
379
376
const optionst &options,
377
+ const cover_configt &cover_config,
380
378
goto_modelt &goto_model,
381
379
message_handlert &message_handler)
382
380
{
383
381
return instrument_cover_goals (
384
382
options,
383
+ cover_config,
385
384
goto_model.symbol_table ,
386
385
goto_model.goto_functions ,
387
386
message_handler);
0 commit comments