Go to the documentation of this file.
20 std::string
c2cpp(
const std::string &s)
24 result.reserve(s.size());
26 for(std::size_t i=0; i<s.size(); i++)
30 if(ch==
'_' && std::string(s, i, 5)==
"_Bool")
32 result.append(
"bool");
45 out <<
"# 1 \"<built-in-additions>\"" <<
'\n';
48 out <<
"namespace __CPROVER { }" <<
'\n';
51 out <<
"typedef __typeof__(sizeof(int)) __CPROVER::size_t;" <<
'\n';
52 out <<
"typedef __CPROVER::size_t " CPROVER_PREFIX "size_t;" <<
'\n';
55 <<
" __CPROVER::ssize_t;" <<
'\n';
56 out <<
"typedef __CPROVER::ssize_t " CPROVER_PREFIX "ssize_t;" <<
'\n';
59 out <<
"void operator delete(void *);" <<
'\n';
60 out <<
"void *operator new(__CPROVER::size_t);" <<
'\n';
62 out <<
"extern \"C\" {" <<
'\n';
65 out <<
"const unsigned __CPROVER::constant_infinity_uint;" <<
'\n';
72 <<
CPROVER_PREFIX "threads_exited[__CPROVER::constant_infinity_uint];"
74 out <<
"unsigned long " CPROVER_PREFIX "next_thread_id = 0;" <<
'\n';
77 <<
CPROVER_PREFIX "thread_keys[__CPROVER::constant_infinity_uint];"
81 <<
CPROVER_PREFIX "thread_key_dtors[__CPROVER::constant_infinity_uint])"
82 <<
"(void *);" <<
'\n';
84 out <<
"unsigned long " CPROVER_PREFIX "next_thread_key = 0;" <<
'\n';
85 out <<
"extern unsigned char "
86 <<
CPROVER_PREFIX "memory[__CPROVER::constant_infinity_uint];" <<
'\n';
101 out <<
"void *__new(__CPROVER::size_t);" <<
'\n';
102 out <<
"void *__new_array(__CPROVER::size_t, __CPROVER::size_t);" <<
'\n';
103 out <<
"void *__placement_new(__CPROVER::size_t, void *);" <<
'\n';
104 out <<
"void *__placement_new_array("
105 <<
"__CPROVER::size_t, __CPROVER::size_t, void *);" <<
'\n';
106 out <<
"void __delete(void *);" <<
'\n';
107 out <<
"void __delete_array(void *);" <<
'\n';
116 <<
" bool widowed;\n"
117 <<
" char data[4];\n"
118 <<
" short next_avail;\n"
119 <<
" short next_unread;\n"
122 <<
"" CPROVER_PREFIX "pipes[__CPROVER::constant_infinity_uint];" <<
'\n';
159 out <<
"typedef long double __float128;" <<
'\n';
177 out <<
"typedef signed __int128 __int128_t;" <<
'\n';
178 out <<
"typedef unsigned __int128 __uint128_t;" <<
'\n';
185 out <<
"int __noop(...);" <<
'\n';
186 out <<
"int __assume(int);" <<
'\n';
198 std::string architecture_strings;
200 out <<
c2cpp(architecture_strings);
209 out <<
"class type_info;" <<
'\n';
213 out <<
"struct _GUID;" <<
'\n';
216 out <<
"namespace ATL; " <<
'\n';
217 out <<
"void ATL::AtlThrowImpl(long);" <<
'\n';
218 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[]
const char arm_builtin_headers[]
std::string c_type_as_string(const irep_idt &c_type)
std::size_t long_int_width