19 const std::set<irep_idt> &functions,
22 std::ostringstream library_text;
25 "#line 1 \"<builtin-library>\"\n"
35 #include "cprover_library.inc"
40 functions, symbol_table, cprover_library, library_text.str());
44 const std::set<irep_idt> &functions,
47 const std::string &prologue)
51 std::ostringstream library_text(prologue, std::ios_base::ate);
60 if(functions.find(
id)!=functions.end())
62 symbol_tablet::symbolst::const_iterator old=
65 if(old!=symbol_table.
symbols.end() &&
66 old->second.value.is_nil())
69 library_text << e->model <<
'\n';
77 return library_text.str();
81 const std::set<irep_idt> &functions,
88 std::string library_text;
92 add_library(library_text, symbol_table, message_handler);
96 const std::string &src,
103 std::istringstream in(src);
107 ansi_c_language.
parse(in,
"");
109 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.