CBMC
|
#include <dump_c_class.h>
Classes | |
struct | typedef_infot |
Public Member Functions | |
dump_ct (const goto_functionst &_goto_functions, const bool use_system_headers, const bool use_all_headers, const bool include_harness, const namespacet &_ns, const irep_idt &mode, const dump_c_configurationt config) | |
dump_ct (const goto_functionst &_goto_functions, const bool use_system_headers, const bool use_all_headers, const bool include_harness, const namespacet &_ns, const irep_idt &mode) | |
virtual | ~dump_ct ()=default |
void | operator() (std::ostream &out) |
Protected Types | |
typedef std::unordered_set< irep_idt > | convertedt |
typedef std::unordered_map< irep_idt, irep_idt > | declared_enum_constants_mapt |
typedef std::map< irep_idt, typedef_infot > | typedef_mapt |
typedef std::unordered_map< typet, irep_idt, irep_hash > | typedef_typest |
typedef std::unordered_map< irep_idt, code_frontend_declt > | local_static_declst |
Protected Member Functions | |
std::string | type_to_string (const typet &type) |
std::string | expr_to_string (const exprt &expr) |
std::string | make_decl (const irep_idt &identifier, const typet &type) |
void | collect_typedefs (const typet &type, bool early) |
Find any typedef names contained in the input type and store their declaration strings in typedef_map for eventual output. More... | |
void | collect_typedefs_rec (const typet &type, bool early, std::unordered_set< irep_idt > &dependencies) |
Find any typedef names contained in the input type and store their declaration strings in typedef_map for eventual output. More... | |
void | gather_global_typedefs () |
Find all global typdefs in the symbol table and store them in typedef_types. More... | |
void | dump_typedefs (std::ostream &os) const |
Print all typedefs that are not covered via typedef struct xyz { ... More... | |
void | convert_compound_declaration (const symbolt &symbol, std::ostream &os_body) |
declare compound types More... | |
void | convert_compound (const typet &type, const typet &unresolved, bool recursive, std::ostream &os) |
void | convert_compound (const struct_union_typet &type, const typet &unresolved, bool recursive, std::ostream &os) |
void | convert_compound_enum (const typet &type, std::ostream &os) |
void | convert_global_variable (const symbolt &symbol, std::ostream &os, local_static_declst &local_static_decls) |
void | convert_function_declaration (const symbolt &symbol, const bool skip_main, std::ostream &os_decl, std::ostream &os_body, local_static_declst &local_static_decls) |
void | insert_local_static_decls (code_blockt &b, const std::list< irep_idt > &local_static, local_static_declst &local_static_decls, std::list< irep_idt > &type_decls) |
void | insert_local_type_decls (code_blockt &b, const std::list< irep_idt > &type_decls) |
void | cleanup_expr (exprt &expr) |
void | cleanup_type (typet &type) |
void | cleanup_decl (code_frontend_declt &decl, std::list< irep_idt > &local_static, std::list< irep_idt > &local_type_decls) |
void | cleanup_harness (code_blockt &b) |
Replace CPROVER internal symbols in b by printable values and generate necessary declarations. More... | |
Static Protected Member Functions | |
static std::string | indent (const unsigned n) |
Protected Attributes | |
const goto_functionst & | goto_functions |
symbol_tablet | copied_symbol_table |
const namespacet | ns |
const dump_c_configurationt | dump_c_config |
const irep_idt | mode |
const bool | harness |
convertedt | converted_compound |
convertedt | converted_global |
convertedt | converted_enum |
std::set< std::string > | system_headers |
system_library_symbolst | system_symbols |
declared_enum_constants_mapt | declared_enum_constants |
typedef_mapt | typedef_map |
typedef_typest | typedef_types |
Definition at line 111 of file dump_c_class.h.
|
protected |
Definition at line 163 of file dump_c_class.h.
|
protected |
Definition at line 170 of file dump_c_class.h.
|
protected |
Definition at line 238 of file dump_c_class.h.
|
protected |
Definition at line 186 of file dump_c_class.h.
|
protected |
Definition at line 188 of file dump_c_class.h.
|
inline |
Definition at line 114 of file dump_c_class.h.
|
inline |
Definition at line 133 of file dump_c_class.h.
|
virtualdefault |
|
protected |
Definition at line 730 of file dump_c.cpp.
|
protected |
Definition at line 1350 of file dump_c.cpp.
|
protected |
Replace CPROVER internal symbols in b by printable values and generate necessary declarations.
b | Code block to be cleaned |
Definition at line 1046 of file dump_c.cpp.
|
protected |
Definition at line 1601 of file dump_c.cpp.
|
protected |
Find any typedef names contained in the input type and store their declaration strings in typedef_map for eventual output.
type | type to inspect for ID_C_typedef entry |
early | set to true to enforce that typedef is dumped before any function declarations or struct definitions |
Definition at line 774 of file dump_c.cpp.
|
protected |
Find any typedef names contained in the input type and store their declaration strings in typedef_map for eventual output.
type | type to inspect for ID_C_typedef entry | |
early | set to true to enforce that typedef is dumped before any function declarations or struct definitions | |
[out] | dependencies | typedefs used in the declaration of a given typedef |
Definition at line 787 of file dump_c.cpp.
|
protected |
Definition at line 482 of file dump_c.cpp.
|
protected |
Definition at line 427 of file dump_c.cpp.
|
protected |
declare compound types
Definition at line 395 of file dump_c.cpp.
|
protected |
Definition at line 687 of file dump_c.cpp.
|
protected |
Definition at line 1101 of file dump_c.cpp.
|
protected |
Definition at line 978 of file dump_c.cpp.
|
protected |
Print all typedefs that are not covered via typedef struct xyz { ...
} name;
[out] | os | output stream |
Definition at line 893 of file dump_c.cpp.
|
protected |
Definition at line 1654 of file dump_c.cpp.
|
protected |
Find all global typdefs in the symbol table and store them in typedef_types.
Definition at line 862 of file dump_c.cpp.
|
inlinestaticprotected |
Definition at line 194 of file dump_c_class.h.
|
protected |
Definition at line 1275 of file dump_c.cpp.
|
protected |
Definition at line 1309 of file dump_c.cpp.
Definition at line 199 of file dump_c_class.h.
void dump_ct::operator() | ( | std::ostream & | out | ) |
Definition at line 73 of file dump_c.cpp.
|
protected |
Definition at line 1640 of file dump_c.cpp.
|
protected |
Definition at line 164 of file dump_c_class.h.
|
protected |
Definition at line 164 of file dump_c_class.h.
|
protected |
Definition at line 164 of file dump_c_class.h.
|
protected |
Definition at line 157 of file dump_c_class.h.
|
protected |
Definition at line 171 of file dump_c_class.h.
|
protected |
Definition at line 159 of file dump_c_class.h.
|
protected |
Definition at line 156 of file dump_c_class.h.
|
protected |
Definition at line 161 of file dump_c_class.h.
|
protected |
Definition at line 160 of file dump_c_class.h.
|
protected |
Definition at line 158 of file dump_c_class.h.
|
protected |
Definition at line 166 of file dump_c_class.h.
|
protected |
Definition at line 168 of file dump_c_class.h.
|
protected |
Definition at line 187 of file dump_c_class.h.
|
protected |
Definition at line 189 of file dump_c_class.h.