Go to the documentation of this file.
139 options.
set_option(
"div-by-zero-check",
true);
141 options.
set_option(
"div-by-zero-check",
false);
145 options.
set_option(
"signed-overflow-check",
true);
147 options.
set_option(
"signed-overflow-check",
false);
151 options.
set_option(
"unsigned-overflow-check",
true);
153 options.
set_option(
"unsigned-overflow-check",
false);
157 options.
set_option(
"float-overflow-check",
true);
159 options.
set_option(
"float-overflow-check",
false);
175 options.
set_option(
"memory-leak-check",
true);
177 options.
set_option(
"memory-leak-check",
false);
197 options.
set_option(
"unwinding-assertions",
false);
200 "unwinding-assertions",
209 log.
error() <<
"--partial-loops and --unwinding-assertions"
330 log.
status() <<
"Removal of function pointers and virtual functions"
366 const auto cover_config =
398 " goto_diff [-?] [-h] [--help] show help\n"
399 " goto_diff old new goto binaries to be compared\n"
404 " --syntactic do syntactic diff (default)\n"
405 " -u | --unified output unified diff\n"
406 " --change-impact | \n"
407 " --forward-impact |\n"
409 " --backward-impact output unified diff with forward&backward/forward/backward dependencies\n"
410 " --compact-output output dependencies in compact mode\n"
412 "Program instrumentation options:\n"
414 " --cover CC create test-suite with coverage criterion CC\n"
416 " --version show version and exit\n"
417 " --json-ui use JSON-formatted output\n"
Coverage Instrumentation.
#define HELP_SHOW_GOTO_FUNCTIONS
bool process_goto_program(const optionst &options, goto_modelt &goto_model)
#define PARSE_OPTIONS_GOTO_CHECK(cmdline, options)
void output(std::ostream &os) const
ui_message_handlert ui_message_handler
void link_to_library(goto_modelt &goto_model, message_handlert &message_handler, const std::function< void(const std::set< irep_idt > &, symbol_tablet &, message_handlert &)> &library)
Complete missing function definitions using the library.
#define GOTO_DIFF_OPTIONS
virtual bool isset(char option) const
void mm_io(const exprt &mm_io_r, const exprt &mm_io_w, goto_functionst::goto_functiont &goto_function, const namespacet &ns)
mstreamt & status() const
void remove_skip(goto_programt &goto_program, goto_programt::targett begin, goto_programt::targett end)
remove unnecessary skip statements
Functions for replacing virtual function call with a static function calls in functions,...
Remove 'asm' statements by compiling them into suitable standard goto program instructions.
void change_impact(const goto_modelt &model_old, const goto_modelt &model_new, impact_modet impact_mode, bool compact_output)
void show_loop_ids(ui_message_handlert::uit ui, const goto_modelt &goto_model)
void goto_check(const irep_idt &function_identifier, goto_functionst::goto_functiont &goto_function, const namespacet &ns, const optionst &options)
void set_option(const std::string &option, const bool value)
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.
struct configt::ansi_ct ansi_c
void label_properties(goto_modelt &goto_model)
void register_languages()
virtual uit get_ui() const
virtual void usage_error()
static void remove_vector(typet &)
removes vector data type
Unified diff (using LCSS) of goto functions.
Remove the 'complex' data type by compilation into structs.
Set the properties to check.
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.
virtual void output_functions() const
Output diff result.
const char * CBMC_VERSION
Initialize a Goto Program.
std::string banner_string(const std::string &front_end, const std::string &version)
Perform Memory-mapped I/O instrumentation.
virtual void help()
display command line help
void instrument_preconditions(const goto_modelt &goto_model, goto_programt &goto_program)
std::string get_value(char option) const
void rewrite_union(exprt &expr)
We rewrite u.c for unions u into byte_extract(u, 0), and { .c = v } into byte_update(NIL,...
Abstract interface to support a programming language.
#define HELP_SHOW_PROPERTIES
static irep_idt this_operating_system()
void show_goto_functions(const namespacet &ns, ui_message_handlert &ui_message_handler, const goto_functionst &goto_functions, bool list_only)
void parse_cover_options(const cmdlinet &cmdline, optionst &options)
Parses coverage-related command line options.
GOTO-DIFF Command Line Option Processing.
void compute_loop_numbers()
#define CPROVER_EXIT_INCORRECT_TASK
The command line is correctly structured but cannot be carried out due to missing files,...
Remove the 'vector' data type by compilation into arrays.
static void remove_complex(typet &)
removes complex data type
Replace function returns by assignments to global variables.
virtual int doit()
invoke main modules
static irep_idt this_architecture()
goto_functionst goto_functions
GOTO functions.
goto_diff_parse_optionst(int argc, const char **argv)
void cprover_c_library_factory(const std::set< irep_idt > &functions, symbol_tablet &symbol_table, message_handlert &message_handler)
bool set(const cmdlinet &cmdline)
Document and give macros for the exit codes of CPROVER binaries.
bool get_bool_option(const std::string &option) const
void remove_returns(symbol_table_baset &symbol_table, goto_functionst &goto_functions)
removes returns
void remove_asm(goto_functionst &goto_functions, symbol_tablet &symbol_table)
Replaces inline assembly instructions in the goto program (i.e., instructions of kind OTHER with a co...
Data and control-dependencies of syntactic diff.
void adjust_float_expressions(exprt &expr, const exprt &rounding_mode)
Replaces arithmetic operations and typecasts involving floating point numbers with their equivalent f...
#define CPROVER_EXIT_INTERNAL_ERROR
An error has been encountered during processing the requested analysis.
goto_modelt initialize_goto_model(const std::vector< std::string > &files, message_handlert &message_handler, const optionst &options)
Goto Programs with Functions.
void get_command_line_options(optionst &options)
#define CPROVER_EXIT_SUCCESS
Success indicates the required analysis has been performed without error.
static unsigned eval_verbosity(const std::string &user_input, const message_levelt default_verbosity, message_handlert &dest)
Parse a (user-)provided string as a verbosity level and set it as the verbosity of dest.
bool remove_function_pointers(message_handlert &_message_handler, symbol_tablet &symbol_table, const goto_functionst &goto_functions, goto_programt &goto_program, const irep_idt &function_id, bool add_safety_assertion, bool only_remove_const_fps)
const std::list< std::string > & get_values(const std::string &option) const
Remove Indirect Function Calls.
symbol_tablet symbol_table
Symbol table.
std::string align_center_with_border(const std::string &text)
Utility for displaying help centered messages borderered by "* *".
void cprover_cpp_library_factory(const std::set< irep_idt > &functions, symbol_tablet &symbol_table, message_handlert &message_handler)