12 #ifndef CPROVER_GOTO_INSTRUMENT_DUMP_C_CLASS_H 13 #define CPROVER_GOTO_INSTRUMENT_DUMP_C_CLASS_H 27 const bool use_system_headers,
35 use_all_headers(use_all_headers)
37 if(use_system_headers)
55 typedef std::unordered_set<irep_idt, irep_id_hash>
convertedt;
60 typedef std::unordered_map<irep_idt, std::string, irep_id_hash>
64 typedef std::unordered_map<irep_idt, irep_idt, irep_id_hash>
95 static std::string
indent(
const unsigned n)
97 return std::string(2*n,
' ');
108 assert(!d_str.empty());
109 assert(*d_str.rbegin()==
';');
111 return d_str.substr(0, d_str.size()-1);
118 std::unordered_set<irep_idt, irep_id_hash> &
dependencies);
124 std::ostream &os_body);
127 const typet &unresolved,
132 const typet &unresolved,
139 typedef std::unordered_map<irep_idt, code_declt, irep_id_hash>
149 const bool skip_main,
150 std::ostream &os_decl,
151 std::ostream &os_body,
156 const std::list<irep_idt> &local_static,
158 std::list<irep_idt> &type_decls);
162 const std::list<irep_idt> &type_decls);
168 std::list<irep_idt> &local_static,
169 std::list<irep_idt> &local_type_decls);
172 #endif // CPROVER_GOTO_INSTRUMENT_DUMP_C_CLASS_H The type of an expression.
std::unordered_set< irep_idt, irep_id_hash > convertedt
void collect_typedefs(const typet &type, bool early)
void init_system_library_map()
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)
declared_enum_constants_mapt declared_enum_constants
std::unordered_map< irep_idt, code_declt, irep_id_hash > local_static_declst
std::string type_to_string(const typet &type)
std::string expr_to_string(const exprt &expr)
void collect_typedefs_rec(const typet &type, bool early, std::unordered_set< irep_idt, irep_id_hash > &dependencies)
std::map< irep_idt, typedef_infot > typedef_mapt
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
const goto_functionst & goto_functions
convertedt converted_enum
std::unordered_set< irep_idt, irep_id_hash > dependencies
const bool use_all_headers
std::string make_decl(const irep_idt &identifier, const typet &type)
typedef_typest typedef_types
void insert_local_type_decls(code_blockt &b, const std::list< irep_idt > &type_decls)
A declaration of a local variable.
system_library_mapt system_library_map
std::string type_decl_str
void convert_compound(const typet &type, const typet &unresolved, bool recursive, std::ostream &os)
void cleanup_decl(code_declt &decl, std::list< irep_idt > &local_static, std::list< irep_idt > &local_type_decls)
dump_ct(const goto_functionst &_goto_functions, const bool use_system_headers, const bool use_all_headers, const namespacet &_ns, language_factoryt factory)
Abstract interface to support a programming language.
void gather_global_typedefs()
std::unordered_map< irep_idt, std::string, irep_id_hash > system_library_mapt
std::set< std::string > system_headers
convertedt converted_global
bool ignore(const symbolt &symbol)
void convert_compound_declaration(const symbolt &symbol, std::ostream &os_body)
declare compound types
Base type of C structs and unions, and C++ classes.
void cleanup_expr(exprt &expr)
std::unordered_map< typet, irep_idt, irep_hash > typedef_typest
Base class for all expressions.
void convert_compound_enum(const typet &type, std::ostream &os)
void operator()(std::ostream &out)
static std::string indent(const unsigned n)
Expression to hold a symbol (variable)
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 dump_typedefs(std::ostream &os) const
typedef_infot(const irep_idt &name)
convertedt converted_compound
void cleanup_type(typet &type)
symbol_tablet copied_symbol_table
void convert_global_variable(const symbolt &symbol, std::ostream &os, local_static_declst &local_static_decls)
std::unordered_map< irep_idt, irep_idt, irep_id_hash > declared_enum_constants_mapt
languaget *(* language_factoryt)()