Go to the documentation of this file.
22 std::string
c2cpp(
const std::string &s)
26 result.reserve(s.size());
28 for(std::size_t i=0; i<s.size(); i++)
32 if(ch==
'_' && std::string(s, i, 5)==
"_Bool")
34 result.append(
"bool");
47 out <<
"#line 1 \"<built-in-additions>\"" <<
'\n';
50 out <<
"namespace __CPROVER { }" <<
'\n';
53 out <<
"typedef __typeof__(sizeof(int)) __CPROVER::size_t;" <<
'\n';
54 out <<
"typedef __CPROVER::size_t " CPROVER_PREFIX "size_t;" <<
'\n';
57 <<
" __CPROVER::ssize_t;" <<
'\n';
58 out <<
"typedef __CPROVER::ssize_t " CPROVER_PREFIX "ssize_t;" <<
'\n';
61 out <<
"void operator delete(void *);" <<
'\n';
62 out <<
"void *operator new(__CPROVER::size_t);" <<
'\n';
64 out <<
"extern \"C\" {" <<
'\n';
67 out <<
"const unsigned __CPROVER::constant_infinity_uint;" <<
'\n';
74 <<
CPROVER_PREFIX "threads_exited[__CPROVER::constant_infinity_uint];"
76 out <<
"unsigned long " CPROVER_PREFIX "next_thread_id = 0;" <<
'\n';
79 <<
CPROVER_PREFIX "thread_keys[__CPROVER::constant_infinity_uint];"
83 <<
CPROVER_PREFIX "thread_key_dtors[__CPROVER::constant_infinity_uint])"
84 <<
"(void *);" <<
'\n';
86 out <<
"unsigned long " CPROVER_PREFIX "next_thread_key = 0;" <<
'\n';
87 out <<
"extern unsigned char "
88 <<
CPROVER_PREFIX "memory[__CPROVER::constant_infinity_uint];" <<
'\n';
102 out <<
"void *__new(__CPROVER::size_t);" <<
'\n';
103 out <<
"void *__new_array(__CPROVER::size_t, __CPROVER::size_t);" <<
'\n';
104 out <<
"void *__placement_new(__CPROVER::size_t, void *);" <<
'\n';
105 out <<
"void *__placement_new_array("
106 <<
"__CPROVER::size_t, __CPROVER::size_t, void *);" <<
'\n';
107 out <<
"void __delete(void *);" <<
'\n';
108 out <<
"void __delete_array(void *);" <<
'\n';
117 <<
" bool widowed;\n"
118 <<
" char data[4];\n"
119 <<
" short next_avail;\n"
120 <<
" short next_unread;\n"
123 <<
"" CPROVER_PREFIX "pipes[__CPROVER::constant_infinity_uint];" <<
'\n';
160 out <<
"typedef long double __float128;" <<
'\n';
178 out <<
"typedef signed __int128 __int128_t;" <<
'\n';
179 out <<
"typedef unsigned __int128 __uint128_t;" <<
'\n';
186 out <<
"int __noop(...);" <<
'\n';
187 out <<
"int __assume(int);" <<
'\n';
199 std::string architecture_strings;
201 out <<
c2cpp(architecture_strings);
210 out <<
"class type_info;" <<
'\n';
214 out <<
"struct _GUID;" <<
'\n';
217 out <<
"namespace ATL; " <<
'\n';
218 out <<
"void ATL::AtlThrowImpl(long);" <<
'\n';
219 out <<
"void __stdcall ATL::AtlThrowLastWin32();" <<
'\n';
void cpp_internal_additions(std::ostream &out)
void ansi_c_architecture_strings(std::string &code)
ieee_floatt::rounding_modet rounding_mode
std::string c2cpp(const std::string &s)
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
struct configt::ansi_ct ansi_c
const char gcc_builtin_headers_types[]
#define INITIALIZE_FUNCTION
signedbv_typet signed_size_type()
const char cw_builtin_headers[]
irep_idt rounding_mode_identifier()
Return the identifier of the program symbol used to store the current rounding mode.
const char arm_builtin_headers[]
std::string c_type_as_string(const irep_idt &c_type)
std::size_t long_int_width