20 const std::set<irep_idt> &functions,
22 const bool force_load)
24 std::ostringstream library_text;
26 library_text <<
"#line 1 \"<built-in-additions>\"\n"
34 "malloc_failure_mode_assert_then_assume "
42 "#line 1 \"<builtin-library>\"\n"
52 #include "cprover_library.inc"
57 functions, symbol_table, cprover_library, library_text.str(), force_load);
61 const std::set<irep_idt> &functions,
64 const std::string &prologue,
65 const bool force_load)
69 std::ostringstream library_text(prologue, std::ios_base::ate);
78 if(functions.find(
id)!=functions.end())
80 symbol_table_baset::symbolst::const_iterator old =
85 (old != symbol_table.
symbols.end() && old->second.value.is_nil()))
88 library_text << e->model <<
'\n';
96 return library_text.str();
100 const std::set<irep_idt> &functions,
108 std::string library_text =
111 add_library(library_text, dest_symbol_table, message_handler);
115 const std::string &src,
118 const std::set<irep_idt> &keep)
123 std::istringstream in(src);
126 ansi_c_language.
parse(in,
"", message_handler);
129 symbol_table,
"<built-in-library>", message_handler,
true, keep);
133 const std::set<irep_idt> &functions,
137 std::string library_text =
139 add_library(library_text, symbol_table, message_handler, functions);
static std::string get_cprover_library_text(const std::set< irep_idt > &functions, const symbol_table_baset &symbol_table, const bool force_load)
void add_library(const std::string &src, symbol_table_baset &symbol_table, message_handlert &message_handler, const std::set< irep_idt > &keep)
Parses and typechecks the given src and adds its contents to the symbol table.
void cprover_c_library_factory_force_load(const std::set< irep_idt > &functions, symbol_table_baset &symbol_table, message_handlert &message_handler)
Load the requested function symbols from the cprover library and add them to the symbol table regardl...
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)
bool typecheck(symbol_table_baset &symbol_table, const std::string &module, message_handlert &message_handler, const bool keep_file_local) override
typecheck without removing specified entries from the symbol table
bool parse(std::istream &instream, const std::string &path, message_handlert &message_handler) override
struct configt::ansi_ct ansi_c
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
The symbol table base class interface.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
@ malloc_failure_mode_return_null
@ malloc_failure_mode_assert_then_assume
malloc_failure_modet malloc_failure_mode