CBMC
|
Coverage Instrumentation. More...
#include "cover.h"
#include <util/message.h>
#include <util/cmdline.h>
#include <util/options.h>
#include <goto-programs/goto_model.h>
#include <goto-programs/remove_skip.h>
#include "cover_basic_blocks.h"
Go to the source code of this file.
Functions | |
static void | instrument_cover_goals (const irep_idt &function_id, goto_programt &goto_program, const cover_instrumenterst &instrumenters, const irep_idt &mode, message_handlert &message_handler, const cover_instrumenter_baset::assertion_factoryt &make_assertion) |
Applies instrumenters to given goto program. More... | |
coverage_criteriont | parse_coverage_criterion (const std::string &criterion_string) |
Parses a coverage criterion. More... | |
void | parse_cover_options (const cmdlinet &cmdline, optionst &options) |
Parses coverage-related command line options. More... | |
cover_configt | get_cover_config (const optionst &options, const symbol_tablet &symbol_table, message_handlert &message_handler) |
Build data structures controlling coverage from command-line options. More... | |
cover_configt | get_cover_config (const optionst &options, const irep_idt &main_function_id, const symbol_tablet &symbol_table, message_handlert &message_handler) |
Build data structures controlling coverage from command-line options. More... | |
static void | instrument_cover_goals (const cover_configt &cover_config, const symbolt &function_symbol, goto_functionst::goto_functiont &function, message_handlert &message_handler) |
Instruments a single goto program based on the given configuration. More... | |
void | instrument_cover_goals (const cover_configt &cover_config, goto_model_functiont &function, message_handlert &message_handler) |
Instruments a single goto program based on the given configuration. More... | |
bool | instrument_cover_goals (const cover_configt &cover_config, const symbol_tablet &symbol_table, goto_functionst &goto_functions, message_handlert &message_handler) |
Instruments goto functions based on given command line options. More... | |
bool | instrument_cover_goals (const cover_configt &cover_config, goto_modelt &goto_model, message_handlert &message_handler) |
Instruments a goto model based on given command line options. More... | |
Coverage Instrumentation.
Definition in file cover.cpp.
cover_configt get_cover_config | ( | const optionst & | options, |
const irep_idt & | main_function_id, | ||
const symbol_tablet & | symbol_table, | ||
message_handlert & | message_handler | ||
) |
Build data structures controlling coverage from command-line options.
Include options that depend on the main function specified by the user.
options | command-line options |
main_function_id | symbol of the user-specified main program function |
symbol_table | global symbol table |
message_handler | used to log incorrect option specifications |
cover_configt get_cover_config | ( | const optionst & | options, |
const symbol_tablet & | symbol_table, | ||
message_handlert & | message_handler | ||
) |
Build data structures controlling coverage from command-line options.
Do not include the options that depend on the main function specified by the user.
options | command-line options |
symbol_table | global symbol table |
message_handler | used to log incorrect option specifications |
bool instrument_cover_goals | ( | const cover_configt & | cover_config, |
const symbol_tablet & | symbol_table, | ||
goto_functionst & | goto_functions, | ||
message_handlert & | message_handler | ||
) |
|
static |
void instrument_cover_goals | ( | const cover_configt & | cover_config, |
goto_model_functiont & | function, | ||
message_handlert & | message_handler | ||
) |
bool instrument_cover_goals | ( | const cover_configt & | cover_config, |
goto_modelt & | goto_model, | ||
message_handlert & | message_handler | ||
) |
|
static |
Applies instrumenters to given goto program.
function_id | name of goto_program |
goto_program | the goto program |
instrumenters | the instrumenters |
mode | mode of the function to instrument (for instance ID_C or ID_java) |
message_handler | a message handler |
make_assertion | A function which takes an expression, with a source location and makes an assertion based on that expression. The expression asserted is expected to include the expression passed in, but may include other additional conditions. |
coverage_criteriont parse_coverage_criterion | ( | const std::string & | criterion_string | ) |