34 const std::vector<std::string> &files=cmdline.
args;
41 std::vector<std::string> binaries, sources;
42 binaries.reserve(files.size());
43 sources.reserve(files.size());
45 for(
const auto &
file : files)
48 binaries.push_back(
file);
50 sources.push_back(
file);
60 for(
const auto &filename : sources)
63 std::ifstream infile(
widen(filename));
65 std::ifstream infile(filename);
70 msg.
error() <<
"failed to open input file `" << filename
93 if(language.
parse(infile, filename))
111 for(
const auto &
file : binaries)
119 bool binaries_provided_start=
122 bool entry_point_generation_failed=
false;
124 if(binaries_provided_start && cmdline.
isset(
"function"))
132 entry_point_generation_failed=rebuild_existing_start();
134 else if(!binaries_provided_start)
141 bool stubs_enabled=cmdline.
isset(
"generate-opaque-stubs");
147 entry_point_generation_failed=
151 if(entry_point_generation_failed)
Goto Programs Author: Thomas Kiley, thomas@diffblue.com.
bool final(symbol_table_baset &symbol_table)
std::wstring widen(const char *s)
void goto_convert(const codet &code, symbol_table_baset &symbol_table, goto_programt &dest, message_handlert &message_handler, const irep_idt &mode)
virtual void get_language_options(const cmdlinet &)
bool is_goto_binary(const std::string &filename)
language_filet & add_file(const std::string &filename)
std::unique_ptr< languaget > get_language_from_filename(const std::string &filename)
Get the language corresponding to the registered file name extensions.
symbol_tablet symbol_table
Symbol table.
static mstreamt & eom(mstreamt &m)
std::unique_ptr< languaget > language
virtual bool isset(char option) const
Initialize a Goto Program.
source_locationt source_location
void set_file(const irep_idt &file)
Abstract interface to support a programming language.
bool typecheck(symbol_tablet &symbol_table)
virtual void set_message_handler(message_handlert &_message_handler)
void set_should_generate_opaque_method_stubs(bool stubs_enabled)
Turn on or off stub generation for all the languages.
bool has_symbol(const irep_idt &name) const
Check whether a symbol exists in the symbol table.
message_handlert & get_message_handler()
Goto Programs with Functions.
static irep_idt entry_point()
mstreamt & status() const
goto_modelt initialize_goto_model(const cmdlinet &cmdline, message_handlert &message_handler)
goto_programt coverage_criteriont message_handlert & message_handler
virtual bool parse(std::istream &instream, const std::string &path)=0
bool generate_support_functions(symbol_tablet &symbol_table)
bool read_object_and_link(const std::string &file_name, goto_modelt &dest, message_handlert &message_handler)
reads an object file
goto_functionst goto_functions
GOTO functions.
void set_object_bits_from_symbol_table(const symbol_tablet &)
Sets the number of bits used for object addresses.