18 const std::set<irep_idt> &functions,
21 std::ostringstream library_text;
24 "#line 1 \"<builtin-library>\"\n"
34 #include "cprover_library.inc"
39 functions, symbol_table, cprover_library, library_text.str());
43 const std::set<irep_idt> &functions,
46 const std::string &prologue)
50 std::ostringstream library_text(prologue, std::ios_base::ate);
59 if(functions.find(
id)!=functions.end())
61 symbol_tablet::symbolst::const_iterator old=
64 if(old!=symbol_table.
symbols.end() &&
65 old->second.value.is_nil())
68 library_text << e->model <<
'\n';
76 return library_text.str();
80 const std::set<irep_idt> &functions,
87 std::string library_text;
91 add_library(library_text, symbol_table, message_handler);
95 const std::string &src,
102 std::istringstream in(src);
106 ansi_c_language.
parse(in,
"");
108 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.