39 return std::make_unique<std::string>(std::string{
CBMC_VERSION});
44 std::unique_ptr<goto_modelt>
model;
69 gcc_version.
get(
"gcc");
84 return message.
string.c_str();
89 return message.
level == messaget::message_levelt::M_ERROR;
99 void print(
unsigned level,
const std::string &message)
override;
133 std::make_unique<api_message_handlert>(callback, context);
137 const std::vector<std::string> &files)
const
161 if(read_opt_val.has_value())
164 std::make_unique<goto_modelt>(std::move(read_opt_val.value()));
168 log.error() <<
"Unable to read goto-binary from file " << file
231 auto results = verifier();
240 return std::make_unique<verification_resultt>(result);
247 "Model has not been loaded. Load it first using "
248 "api::load_model_from_files");
251 log.status() <<
"Performing instrumentation pass: dropping unused functions"
262 "Model has not been loaded. Load it first using "
263 "api::load_model_from_files");
266 log.status() <<
"Validating consistency of goto-model supplied to API session"
void add_failed_symbols(symbol_table_baset &symbol_table)
Create a failed-dereference symbol for all symbols in the given table that need one (i....
Goto verifier for verifying all properties that stores traces.
void cprover_c_library_factory(const std::set< irep_idt > &functions, const symbol_table_baset &symbol_table, symbol_table_baset &dest_symbol_table, message_handlert &message_handler)
std::unique_ptr< languaget > new_ansi_c_language()
const char * api_message_get_string(const api_messaget &message)
Given a api_message, this function returns that message expressed as a C language string.
bool api_message_is_error(const api_messaget &message)
void(*)(const api_messaget &message, api_call_back_contextt call_back_context) api_message_callbackt
The type of call back for feedback of status information and results.
void * api_call_back_contextt
The type of pointers to contextual data passed to the api_message_callback functions.
void report() override
Report results.
api_message_callbackt callback
api_call_back_contextt context
void print(unsigned level, const std::string &message) override
void print(unsigned level, const jsont &json) override
void flush(unsigned) override
api_message_handlert(api_message_callbackt callback, api_call_back_contextt context)
void print(unsigned level, const xmlt &xml) override
std::unique_ptr< optionst > to_engine_options() const
Globally accessible architectural configuration.
bool set(const cmdlinet &cmdline)
struct configt::ansi_ct ansi_c
void get(const std::string &executable)
const propertiest & get_properties()
Returns the properties.
Class that provides messages with a built-in verbosity 'level'.
void configure_gcc(const gcc_versiont &gcc_version)
goto_modelt initialize_goto_model(const std::vector< std::string > &files, message_handlert &message_handler, const optionst &options)
Initialize a Goto Program.
void link_to_library(goto_modelt &goto_model, message_handlert &message_handler, const std::function< void(const std::set< irep_idt > &, const symbol_tablet &, symbol_tablet &, message_handlert &)> &library)
Complete missing function definitions using the library.
void register_language(language_factoryt factory)
Register a language Note: registering a language is required for using the functions in language_util...
Goto Checker using Multi-Path Symbolic Execution.
bool process_goto_program(goto_modelt &goto_model, const optionst &options, messaget &log)
Common processing and simplification of goto_programts.
static void json(json_objectT &result, const irep_idt &property_id, const property_infot &property_info)
xmlt xml(const irep_idt &property_id, const property_infot &property_info)
bool is_goto_binary(const std::string &filename, message_handlert &message_handler)
void remove_asm(goto_functionst &goto_functions, symbol_tablet &symbol_table, message_handlert &message_handler)
Replaces inline assembly instructions in the goto program (i.e., instructions of kind OTHER with a co...
bool has_asm(const goto_functionst &goto_functions)
returns true iff the given goto functions use asm instructions
Remove 'asm' statements by compiling them into suitable standard goto program instructions.
void remove_skip(goto_programt &goto_program, goto_programt::targett begin, goto_programt::targett end)
remove unnecessary skip statements
void remove_unused_functions(goto_modelt &goto_model, message_handlert &message_handler)
void label_properties(goto_modelt &goto_model)
Set the properties to check.
#define PRECONDITION(CONDITION)
std::unique_ptr< goto_modelt > model
std::unique_ptr< optionst > options
std::unique_ptr< message_handlert > message_handler
std::unique_ptr< std::string > get_api_version() const
A simple API version information function.
std::unique_ptr< verification_resultt > run_verifier() const
Process the model by running symex and the decision procedure.
bool preprocess_model() const
Implement necessary transformations to reduce model to symex-ready-GOTO, before being fed to symex.
void load_model_from_files(const std::vector< std::string > &files) const
Load a goto_model from a given vector of filenames.
bool is_goto_binary(std::string &file) const
True if file is goto-binary.
std::unique_ptr< verification_resultt > verify_model() const
void set_message_callback(api_message_callbackt callback, api_call_back_contextt context)
void drop_unused_functions() const
Drop unused functions from the loaded goto_model simplifying it.
void validate_goto_model() const
Validate the loaded goto model.
std::unique_ptr< api_session_implementationt > implementation
void read_goto_binary(std::string &file) const
Read a goto-binary from a given filename.
preprocessort preprocessor
void set_result(resultt &result)
void set_properties(propertiest &properties)
const char * CBMC_VERSION