cprover
|
#include <memory>
#include <regex>
#include <goto-programs/goto_function.h>
#include <goto-programs/goto_model.h>
#include <util/cmdline.h>
#include <util/message.h>
#include <util/std_code.h>
#include <util/std_types.h>
Go to the source code of this file.
Classes | |
class | generate_function_bodiest |
Base class for replace_function_body implementations. More... | |
Macros | |
#define | OPT_REPLACE_FUNCTION_BODY |
#define | HELP_REPLACE_FUNCTION_BODY |
Functions | |
std::unique_ptr< generate_function_bodiest > | generate_function_bodies_factory (const std::string &options, const symbol_tablet &symbol_table, message_handlert &message_handler) |
Create the type that actually generates the functions. More... | |
void | generate_function_bodies (const std::regex &functions_regex, const generate_function_bodiest &generate_function_body, goto_modelt &model, message_handlert &message_handler) |
Generate function bodies with some default behavior A list of currently accepted command line arguments. More... | |
#define HELP_REPLACE_FUNCTION_BODY |
Definition at line 76 of file generate_function_bodies.h.
#define OPT_REPLACE_FUNCTION_BODY |
Definition at line 72 of file generate_function_bodies.h.
void generate_function_bodies | ( | const std::regex & | functions_regex, |
const generate_function_bodiest & | generate_function_body, | ||
goto_modelt & | model, | ||
message_handlert & | message_handler | ||
) |
Generate function bodies with some default behavior A list of currently accepted command line arguments.
assert-false: { assert(false); }
assume-false: { assume(false); }
assert-false-assume-false: { assert(false); assume(false); }
havoc[,params:regex][,globals:regex]: Assign nondet to the targets of pointer-to-non-const parameters matching regex, and non-const globals matching regex and then return nondet for non-void functions, e.g.:
int global; const int c_global; int function(int *param, const int *const_param);
havoc,params:(?!__).*,globals:(?!__).* (where (?!__) means "not preceded by __", which is recommended to avoid overwrite internal symbols), leads to
int function(int *param, consnt int *const_param) { *param = nondet_int(); global = nondet_int(); return nondet_int(); }
nondet-return: return nondet for non-void functions
functions_regex | Specifies the functions whose body should be generated |
generate_function_body | Specifies what kind of body to generate |
model | The goto-model in which to generate the function bodies |
message_handler | Destination for status/warning messages |
Definition at line 454 of file generate_function_bodies.cpp.
std::unique_ptr<generate_function_bodiest> generate_function_bodies_factory | ( | const std::string & | options, |
const symbol_tablet & | symbol_table, | ||
message_handlert & | message_handler | ||
) |
Create the type that actually generates the functions.
Definition at line 335 of file generate_function_bodies.cpp.