19 const std::set<irep_idt> &functions,
22 std::ostringstream library_text;
24 library_text <<
"#line 1 \"<built-in-additions>\"\n"
32 "malloc_failure_mode_assert_then_assume "
40 "#line 1 \"<builtin-library>\"\n"
50#include "cprover_library.inc"
55 functions, symbol_table, cprover_library, library_text.str());
59 const std::set<irep_idt> &functions,
62 const std::string &prologue)
66 std::ostringstream library_text(prologue, std::ios_base::ate);
75 if(functions.find(
id)!=functions.end())
77 symbol_tablet::symbolst::const_iterator old=
80 if(old!=symbol_table.
symbols.end() &&
81 old->second.value.is_nil())
84 library_text << e->model <<
'\n';
92 return library_text.str();
96 const std::set<irep_idt> &functions,
103 std::string library_text;
107 add_library(library_text, symbol_table, message_handler);
111 const std::string &src,
118 std::istringstream in(src);
122 ansi_c_language.
parse(in,
"");
124 ansi_c_language.
typecheck(symbol_table,
"<built-in-library>");
void cprover_c_library_factory(const std::set< irep_idt > &functions, symbol_tablet &symbol_table, message_handlert &message_handler)
void add_library(const std::string &src, symbol_tablet &symbol_table, message_handlert &message_handler)
static std::string get_cprover_library_text(const std::set< irep_idt > &functions, const symbol_tablet &symbol_table)
bool typecheck(symbol_tablet &symbol_table, const std::string &module, const bool keep_file_local) override
typecheck without removing specified entries from the symbol table
bool parse(std::istream &instream, const std::string &path) 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.
virtual void set_message_handler(message_handlert &_message_handler)
const symbolst & symbols
Read-only field, used to look up symbols given their names.
@ malloc_failure_mode_return_null
@ malloc_failure_mode_assert_then_assume
malloc_failure_modet malloc_failure_mode