Go to the documentation of this file.
30 post_process_functiont post_process_function,
31 post_process_functionst post_process_functions,
32 can_generate_function_bodyt driver_program_can_generate_function_body,
33 generate_function_bodyt driver_program_generate_function_body,
36 symbol_table(goto_model->symbol_table),
38 goto_model->goto_functions.function_map,
46 journalling_symbol_table,
47 goto_model->goto_functions,
52 driver_program_can_generate_function_body,
53 driver_program_generate_function_body,
55 post_process_function(post_process_function),
56 post_process_functions(post_process_functions),
57 driver_program_can_generate_function_body(
58 driver_program_can_generate_function_body),
59 driver_program_generate_function_body(
60 driver_program_generate_function_body),
61 message_handler(message_handler)
63 language_files.set_message_handler(message_handler);
67 : goto_model(std::move(other.goto_model)),
68 symbol_table(goto_model->symbol_table),
70 goto_model->goto_functions.function_map,
78 journalling_symbol_table,
79 goto_model->goto_functions,
84 other.driver_program_can_generate_function_body,
85 other.driver_program_generate_function_body,
86 other.message_handler),
87 language_files(std::move(other.language_files)),
88 post_process_function(other.post_process_function),
89 post_process_functions(other.post_process_functions),
90 message_handler(other.message_handler)
115 const std::vector<std::string> &files,
123 "no program provided",
125 "one or more paths to a goto binary or a source file in a supported "
129 std::list<std::string> binaries, sources;
131 for(
const auto &file : files)
134 binaries.push_back(file);
136 sources.push_back(file);
142 const std::string filename =
"";
194 table_size = new_table_size;
197 std::vector<irep_idt> fn_ids_to_convert;
200 if(named_symbol.second.is_function())
201 fn_ids_to_convert.push_back(named_symbol.first);
204 for(
const irep_idt &symbol_name : fn_ids_to_convert)
211 }
while(new_table_size != table_size);
213 goto_model->goto_functions.compute_location_numbers();
Class that provides messages with a built-in verbosity 'level'.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
bool can_produce_function(const key_type &name) const
Determines if this lazy GOTO functions map can produce a body for the given function.
symbol_tablet & symbol_table
Reference to symbol_table in the internal goto_model.
const symbolt & lookup_ref(const irep_idt &name) const
Find a symbol in the symbol table for read-only access.
static journalling_symbol_tablet wrap(symbol_table_baset &base_symbol_table)
const post_process_functiont post_process_function
#define CHECK_RETURN(CONDITION)
bool typecheck(symbol_tablet &symbol_table, const bool keep_file_local=false)
const lazy_goto_functions_mapt goto_functions
mstreamt & status() const
language_filet & add_language_file(const std::string &filename)
language_filest language_files
std::unique_ptr< languaget > get_language_from_mode(const irep_idt &mode)
Get the language corresponding to the given mode.
const changesett & get_updated() const
void unload(const key_type &name) const
bool can_produce_function(const irep_idt &id) const override
Determines if this model can produce a body for the given function.
message_handlert & message_handler
Logging helper field.
virtual void set_language_options(const optionst &)
Set language-specific options.
Thrown when a goto program that's being processed is in an invalid format, for example passing the wr...
void initialize_from_source_files(const std::list< std::string > &sources, const optionst &options, language_filest &language_files, symbol_tablet &symbol_table, message_handlert &message_handler)
Populate symbol_table from sources by parsing and type checking via language_files.
bool read_objects_and_link(const std::list< std::string > &file_names, goto_modelt &dest, message_handlert &message_handler)
Reads object files and updates the config if any files were read.
A GOTO model that produces function bodies on demand.
virtual void set_message_handler(message_handlert &_message_handler)
std::unique_ptr< goto_modelt > goto_model
A goto function, consisting of function body (see body) and parameter identifiers (see parameter_iden...
void initialize(const std::vector< std::string > &files, const optionst &options)
Performs initial symbol table and language_filest initialization from a given commandline and parsed ...
std::unique_ptr< languaget > language
const post_process_functionst post_process_functions
bool final(symbol_table_baset &symbol_table)
A collection of goto functions.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
void ensure_function_loaded(const key_type &name) const
struct configt::javat java
bool is_goto_binary(const std::string &filename, message_handlert &message_handler)
void load_all_functions() const
Eagerly loads all functions from the symbol table.
unsignedbv_typet size_type()
Thrown when users pass incorrect command line arguments, for example passing no files to analysis or ...
void set_object_bits_from_symbol_table(const symbol_tablet &)
Sets the number of bits used for object addresses.
A symbol table wrapper that records which entries have been updated/removed.
Interface providing access to a single function in a GOTO model, plus its associated symbol table.
void set_up_custom_entry_point(language_filest &language_files, symbol_tablet &symbol_table, const std::function< void(const irep_idt &)> &unload, const optionst &options, bool try_mode_lookup, message_handlert &message_handler)
Process the "function" option in options to prepare a custom entry point to replace __CPROVER_start.
lazy_goto_modelt(post_process_functiont post_process_function, post_process_functionst post_process_functions, can_generate_function_bodyt driver_program_can_generate_function_body, generate_function_bodyt driver_program_generate_function_body, message_handlert &message_handler)
Construct a lazy GOTO model, supplying callbacks that customise its behaviour.