cprover
|
#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, language_factoryt factory, 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, language_factoryt factory) | |
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_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_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 |
std::unique_ptr< languaget > | language |
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 110 of file dump_c_class.h.
|
protected |
Definition at line 162 of file dump_c_class.h.
|
protected |
Definition at line 169 of file dump_c_class.h.
|
protected |
Definition at line 237 of file dump_c_class.h.
|
protected |
Definition at line 185 of file dump_c_class.h.
|
protected |
Definition at line 187 of file dump_c_class.h.
|
inline |
Definition at line 113 of file dump_c_class.h.
|
inline |
Definition at line 132 of file dump_c_class.h.
|
virtualdefault |
|
protected |
Definition at line 645 of file dump_c.cpp.
|
protected |
Definition at line 1274 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 970 of file dump_c.cpp.
|
protected |
Definition at line 1418 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 694 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 707 of file dump_c.cpp.
|
protected |
Definition at line 422 of file dump_c.cpp.
|
protected |
Definition at line 371 of file dump_c.cpp.
|
protected |
declare compound types
Definition at line 339 of file dump_c.cpp.
|
protected |
Definition at line 602 of file dump_c.cpp.
|
protected |
Definition at line 1025 of file dump_c.cpp.
|
protected |
Definition at line 900 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 815 of file dump_c.cpp.
|
protected |
Definition at line 1453 of file dump_c.cpp.
|
protected |
Find all global typdefs in the symbol table and store them in typedef_types.
Definition at line 784 of file dump_c.cpp.
|
inlinestaticprotected |
Definition at line 193 of file dump_c_class.h.
|
protected |
Definition at line 1199 of file dump_c.cpp.
|
protected |
Definition at line 1233 of file dump_c.cpp.
Definition at line 198 of file dump_c_class.h.
void dump_ct::operator() | ( | std::ostream & | out | ) |
Definition at line 45 of file dump_c.cpp.
|
protected |
Definition at line 1444 of file dump_c.cpp.
|
protected |
Definition at line 163 of file dump_c_class.h.
|
protected |
Definition at line 163 of file dump_c_class.h.
|
protected |
Definition at line 163 of file dump_c_class.h.
|
protected |
Definition at line 156 of file dump_c_class.h.
|
protected |
Definition at line 170 of file dump_c_class.h.
|
protected |
Definition at line 158 of file dump_c_class.h.
|
protected |
Definition at line 155 of file dump_c_class.h.
|
protected |
Definition at line 160 of file dump_c_class.h.
|
protected |
Definition at line 159 of file dump_c_class.h.
|
protected |
Definition at line 157 of file dump_c_class.h.
|
protected |
Definition at line 165 of file dump_c_class.h.
|
protected |
Definition at line 167 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.