Go to the documentation of this file.
36 std::stringstream func_decl_stream;
37 std::stringstream compound_body_stream;
38 std::stringstream global_var_stream;
39 std::stringstream global_decl_stream;
40 std::stringstream func_body_stream;
48 const symbolt &symbol=named_symbol.second;
50 if(symbol.
type.
id()!=ID_code)
57 for(code_typet::parameterst::iterator
58 it2=parameters.begin();
59 it2!=parameters.end();
62 typet &type=it2->type();
64 if(type.
id() == ID_symbol_type && type.
get_bool(ID_C_transparent_union))
70 new_type_sym.
type.
set(ID_C_transparent_union,
true);
73 symbols_transparent.
add(new_type_sym);
76 type.
remove(ID_C_transparent_union);
80 for(
const auto &symbol_pair : symbols_transparent.
symbols)
85 typedef std::unordered_map<irep_idt, unsigned> unique_tagst;
86 unique_tagst unique_tags;
90 std::set<std::string> symbols_sorted;
99 if((symbol.
type.
id()==ID_union || symbol.
type.
id()==ID_struct) &&
103 symbol.
type.
set(ID_tag, ID_anonymous);
106 else if(symbol.
type.
id()==ID_c_enum &&
110 symbol.
type.
add(ID_tag).
set(ID_C_base_name, ID_anonymous);
114 const std::string name_str=
id2string(named_symbol.first);
116 (symbol.
type.
id()==ID_union ||
117 symbol.
type.
id()==ID_struct ||
118 symbol.
type.
id()==ID_c_enum))
120 std::string new_tag=symbol.
type.
id()==ID_c_enum?
125 if(tag_pos!=std::string::npos)
126 new_tag.erase(0, tag_pos+4);
127 const std::string new_tag_base=new_tag;
129 for(std::pair<unique_tagst::iterator, bool>
130 unique_entry=unique_tags.insert(std::make_pair(new_tag, 0));
131 !unique_entry.second;
132 unique_entry=unique_tags.insert(std::make_pair(new_tag, 0)))
134 new_tag=new_tag_base+
"$"+
136 ++(unique_entry.first->second);
139 if(symbol.
type.
id()==ID_c_enum)
141 symbol.
type.
add(ID_tag).
set(ID_C_base_name, new_tag);
145 symbol.
type.
set(ID_tag, new_tag);
150 if((!tag_added || symbol.
is_type) &&
155 bool inserted=symbols_sorted.insert(name_str).second;
162 bool skip_function_main=
false;
163 for(std::set<std::string>::const_iterator
164 it=symbols_sorted.begin();
165 it!=symbols_sorted.end();
173 (type_id==ID_struct ||
174 type_id==ID_incomplete_struct ||
176 type_id==ID_incomplete_union ||
181 global_decl_stream <<
"// " << symbol.
name <<
'\n';
182 global_decl_stream <<
"// " << symbol.
location <<
'\n';
184 if(type_id==ID_c_enum)
196 else if(symbol.
type.
id()==ID_code)
198 goto_functionst::function_mapt::const_iterator func_entry=
203 func_entry->second.body_available() &&
204 (symbol.
name==ID_main ||
206 skip_function_main=
true;
211 for(std::set<std::string>::const_iterator
212 it=symbols_sorted.begin();
213 it!=symbols_sorted.end();
218 if(symbol.
type.
id()!=ID_code ||
231 for(std::set<std::string>::const_iterator
232 it=symbols_sorted.begin();
233 it!=symbols_sorted.end();
239 (symbol.
type.
id()==ID_struct ||
240 symbol.
type.
id()==ID_incomplete_struct ||
241 symbol.
type.
id()==ID_union ||
242 symbol.
type.
id()==ID_incomplete_union))
245 compound_body_stream);
250 for(std::set<std::string>::const_iterator
254 os <<
"#include <" << *it <<
">\n";
258 if(global_var_stream.str().find(
"NULL")!=std::string::npos ||
259 func_body_stream.str().find(
"NULL")!=std::string::npos)
261 os <<
"#ifndef NULL\n"
262 <<
"#define NULL ((void*)0)\n"
265 if(func_body_stream.str().find(
"FENCE")!=std::string::npos)
267 os <<
"#ifndef FENCE\n"
268 <<
"#define FENCE(x) ((void)0)\n"
271 if(func_body_stream.str().find(
"IEEE_FLOAT_")!=std::string::npos)
273 os <<
"#ifndef IEEE_FLOAT_EQUAL\n"
274 <<
"#define IEEE_FLOAT_EQUAL(x,y) ((x)==(y))\n"
276 <<
"#ifndef IEEE_FLOAT_NOTEQUAL\n"
277 <<
"#define IEEE_FLOAT_NOTEQUAL(x,y) ((x)!=(y))\n"
281 if(!global_decl_stream.str().empty())
282 os << global_decl_stream.str() <<
'\n';
286 if(!func_decl_stream.str().empty())
287 os << func_decl_stream.str() <<
'\n';
288 if(!compound_body_stream.str().empty())
289 os << compound_body_stream.str() <<
'\n';
290 if(!global_var_stream.str().empty())
291 os << global_var_stream.str() <<
'\n';
292 os << func_body_stream.str();
298 std::ostream &os_body)
304 if(symbol.
type.
id()==ID_struct ||
305 symbol.
type.
id()==ID_union ||
306 symbol.
type.
id()==ID_c_enum)
312 const typet &unresolved,
316 if(type.
id() == ID_symbol_type)
326 type.
id() == ID_c_enum_tag || type.
id() == ID_struct_tag ||
327 type.
id() == ID_union_tag)
335 else if(type.
id()==ID_array || type.
id()==ID_pointer)
343 if(type.
id()==ID_array)
348 for(find_symbols_sett::const_iterator
358 else if(type.
id()==ID_struct || type.
id()==ID_union)
360 else if(type.
id()==ID_c_enum)
366 const typet &unresolved,
378 const irept &bases = type.
find(ID_bases);
379 std::stringstream base_decls;
417 std::stringstream struct_body;
423 if(comp_type.
id()==ID_code ||
424 comp.get_bool(ID_from_base) ||
425 comp.get_is_padding())
429 while(non_array_type->
id()==ID_array)
434 if(non_array_type->
id()!=ID_pointer)
442 struct_body <<
indent(1) <<
"// " << comp_name <<
'\n';
447 std::string fake_unique_name=
"NO/SUCH/NS::"+
id2string(comp_name);
448 std::string s=
make_decl(fake_unique_name, comp.type());
451 if(comp_type.
id()==ID_c_bit_field &&
462 else if(comp_type.
id()==ID_signedbv)
466 struct_body <<
"long long int " << comp_name
469 struct_body <<
"__signedbv<" << t.
get_width() <<
"> "
474 else if(comp_type.
id()==ID_unsignedbv)
478 struct_body <<
"unsigned long long " << comp_name
481 struct_body <<
"__unsignedbv<" << t.
get_width() <<
"> "
489 struct_body <<
";\n";
492 typet unresolved_clean=unresolved;
493 typedef_typest::const_iterator td_entry=
498 unresolved_clean.
remove(ID_C_typedef);
499 typedef_str=td_entry->second;
500 std::pair<typedef_mapt::iterator, bool> td_map_entry=
503 if(!td_map_entry.first->second.early)
504 td_map_entry.first->second.type_decl_str=
"";
509 if(!base_decls.str().empty())
512 os <<
": " << base_decls.str();
516 os << struct_body.str();
531 if(type.
get_bool(ID_C_transparent_union))
532 os <<
" __attribute__ ((__transparent_union__))";
534 os <<
" __attribute__ ((__packed__))";
535 if(!typedef_str.
empty())
536 os <<
" " << typedef_str;
547 const irep_idt &name=tag.get(ID_C_base_name);
556 for(c_enum_typet::memberst::iterator
561 const irep_idt bn=it->get_base_name();
568 it->set_base_name(new_bn);
572 std::make_pair(bn, it->get_base_name()));
578 os <<
" __attribute__ ((__packed__))";
585 std::list<irep_idt> &local_static,
586 std::list<irep_idt> &local_type_decls)
608 std::unordered_set<irep_idt> typedef_names;
610 typedef_names.insert(td.first);
635 std::unordered_set<irep_idt> deps;
649 std::unordered_set<irep_idt> &dependencies)
654 std::unordered_set<irep_idt> local_deps;
656 if(type.
id()==ID_code)
661 for(
const auto ¶m : code_type.
parameters())
664 else if(type.
id()==ID_pointer || type.
id()==ID_array)
668 else if(type.
id() == ID_symbol_type)
675 type.
id() == ID_c_enum_tag || type.
id() == ID_struct_tag ||
676 type.
id() == ID_union_tag)
682 const irep_idt &typedef_str=type.
get(ID_C_typedef);
684 if(!typedef_str.
empty())
686 std::pair<typedef_mapt::iterator, bool> entry=
690 (early && entry.first->second.type_decl_str.empty()))
692 if(typedef_str==
"__gnuc_va_list" || typedef_str ==
"va_list")
702 std::ostringstream oss;
703 oss <<
"typedef " <<
make_decl(typedef_str, t) <<
';';
705 entry.first->second.type_decl_str=oss.str();
706 entry.first->second.dependencies=local_deps;
712 entry.first->second.early=
true;
714 for(
const auto &d : local_deps)
718 td_entry->second.early=
true;
722 dependencies.insert(typedef_str);
725 dependencies.insert(local_deps.begin(), local_deps.end());
735 std::map<std::string, symbolt> symbols_sorted;
737 symbols_sorted.insert(
738 {
id2string(symbol_entry.first), symbol_entry.second});
740 for(
const auto &symbol_entry : symbols_sorted)
742 const symbolt &symbol=symbol_entry.second;
751 typedef_map.insert({typedef_str, typedef_infot(typedef_str)});
764 std::vector<typedef_infot> typedefs_sorted;
769 std::map<std::string, typedef_infot> to_insert;
771 std::unordered_set<irep_idt> typedefs_done;
772 std::unordered_map<irep_idt, std::unordered_set<irep_idt>> forward_deps,
776 if(!td.second.type_decl_str.empty())
778 if(td.second.dependencies.empty())
780 to_insert.insert({id2string(td.first), td.second});
784 forward_deps.insert({td.first, td.second.dependencies});
785 for(
const auto &d : td.second.dependencies)
786 reverse_deps[d].insert(td.first);
790 while(!to_insert.empty())
795 to_insert.erase(to_insert.begin());
797 typedefs_sorted.push_back(t);
802 if(r_it==reverse_deps.end())
806 std::unordered_set<irep_idt> &r_deps = r_it->second;
807 for(std::unordered_set<irep_idt>::iterator it = r_deps.begin();
810 auto f_it=forward_deps.find(*it);
811 if(f_it==forward_deps.end())
818 std::unordered_set<irep_idt> &f_deps = f_it->second;
827 to_insert.insert({
id2string(*it), td_entry->second});
828 forward_deps.erase(*it);
838 for(
const auto &td : typedefs_sorted)
839 os << td.type_decl_str <<
'\n';
841 if(!typedefs_sorted.empty())
866 os <<
"// " << symbol.
name <<
'\n';
867 os <<
"// " << symbol.
location <<
'\n';
873 std::set<std::string> symbols_sorted;
874 for(find_symbols_sett::const_iterator
879 bool inserted=symbols_sorted.insert(
id2string(*it)).second;
883 for(std::set<std::string>::const_iterator
884 it=symbols_sorted.begin();
885 it!=symbols_sorted.end();
893 d.copy_to_operands(symbol.
value);
898 local_static_decls.emplace(symbol.
name, d);
902 os <<
"// " << symbol.
name <<
'\n';
903 os <<
"// " << symbol.
location <<
'\n';
905 std::list<irep_idt> empty_static, empty_types;
920 const symbolt *argc_sym=
nullptr;
928 const symbolt *argv_sym=
nullptr;
939 const symbolt *return_sym=
nullptr;
940 if(!
ns.
lookup(
"return'", return_sym))
950 if(code.get_statement()==ID_function_call)
953 if(func.
id()==ID_symbol)
972 const bool skip_main,
973 std::ostream &os_decl,
974 std::ostream &os_body,
983 goto_functionst::function_mapt::const_iterator func_entry=
986 func_entry->second.body_available())
989 std::list<irep_idt> type_decls, local_static;
991 std::unordered_set<irep_idt> typedef_names;
993 typedef_names.insert(td.first);
997 func_entry->second.body,
1028 os_body <<
"// " << symbol.
name <<
'\n';
1029 os_body <<
"// " << symbol.
location <<
'\n';
1046 symbol.
name!=ID_main)
1048 os_decl <<
"// " << symbol.
name <<
'\n';
1049 os_decl <<
"// " << symbol.
location <<
'\n';
1054 os_decl <<
"// " << symbol.
name <<
'\n';
1055 os_decl <<
"// " << symbol.
location <<
'\n';
1069 exprt::operandst::iterator &before)
1077 exprt::operandst::iterator first_found=operands.end();
1084 if(it->id()==ID_code &&
1096 found=syms.find(identifier)!=syms.end();
1117 if(first_found==operands.end())
1134 if(first_found!=operands.end())
1146 const std::list<irep_idt> &local_static,
1148 std::list<irep_idt> &type_decls)
1152 for(std::list<irep_idt>::const_reverse_iterator
1153 it=local_static.rbegin();
1154 it!=local_static.rend();
1157 local_static_declst::const_iterator d_it=
1158 local_static_decls.find(*it);
1162 std::list<irep_idt> redundant;
1166 exprt::operandst::iterator before=b.
operands().end();
1173 dest_ptr->
operands().insert(before, d);
1180 const std::list<irep_idt> &type_decls)
1184 for(std::list<irep_idt>::const_reverse_iterator
1185 it=type_decls.rbegin();
1186 it!=type_decls.rend();
1192 std::ostringstream os_body;
1193 os_body << *it <<
" */\n";
1203 exprt::operandst::iterator before=b.
operands().end();
1210 dest_ptr->
operands().insert(before, skip);
1222 if(expr.
id()==ID_struct)
1234 exprt::operandst::iterator o_it=old_ops.begin();
1235 for(
const auto &old_comp : old_components)
1237 const bool is_zero_bit_field =
1238 old_comp.type().id() == ID_c_bit_field &&
1241 if(!old_comp.get_is_padding() && !is_zero_bit_field)
1250 else if(expr.
id()==ID_union)
1256 !u_type_f.
get_bool(ID_C_transparent_union))
1263 else if(u.
op().
id()==ID_constant &&
1284 else if(expr.
id()==ID_typecast &&
1285 expr.
op0().
id()==ID_typecast &&
1291 else if(expr.
id()==ID_code &&
1307 if(parameters.size()==arguments.size())
1309 code_typet::parameterst::const_iterator it=parameters.begin();
1313 if(type.
id()==ID_union &&
1314 type.
get_bool(ID_C_transparent_union))
1316 if(it2->id()==ID_typecast &&
1321 if(it2->id()==ID_constant &&
1324 const typet &comp_type=
1327 if(comp_type.
id()==ID_pointer)
1337 else if(expr.
id()==ID_constant &&
1338 expr.
type().
id()==ID_signedbv)
1343 if(!cformat.
empty())
1345 declared_enum_constants_mapt::const_iterator entry=
1349 entry->first!=entry->second)
1350 expr.
set(ID_C_cformat, entry->second);
1353 expr.
remove(ID_C_cformat);
1364 if(type.
id()==ID_code)
1370 for(code_typet::parameterst::iterator
1377 if(type.
id()==ID_array)
1381 (type.
id()!=ID_union && type.
id()!=ID_struct) ||
1405 const bool use_system_headers,
1406 const bool use_all_headers,
1407 const bool include_harness,
1423 const bool use_system_headers,
1424 const bool use_all_headers,
1425 const bool include_harness,
std::unordered_map< irep_idt, irep_idt > declared_enum_constants_mapt
const componentst & components() const
bool has_symbol(const irep_idt &name) const
Check whether a symbol exists in the symbol table.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const irep_idt & get_function() const
A codet representing sequential composition of program statements.
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...
#define Forall_expr(it, expr)
#define PRECONDITION(CONDITION)
void move_to_operands(exprt &expr)
Move the given argument to the end of exprt's operands.
const typet & subtype() const
static std::string indent(const unsigned n)
const goto_functionst & goto_functions
void set_comment(const irep_idt &comment)
void find_type_and_expr_symbols(const exprt &src, find_symbols_sett &dest)
#define Forall_operands(it, expr)
const componentt & get_component(const irep_idt &component_name) const
Get the reference to a component with given name.
const struct_typet & to_struct_type(const typet &type)
Cast a typet to a struct_typet.
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
const c_enum_typet & to_c_enum_type(const typet &type)
Cast a typet to a c_enum_typet.
The type of an expression, extends irept.
std::vector< parametert > parameterst
Base type for structs and unions.
typet type
Type of symbol.
void find_non_pointer_type_symbols(const exprt &src, find_symbols_sett &dest)
void set_identifier(const irep_idt &identifier)
std::vector< c_enum_membert > memberst
irept & add(const irep_namet &name)
const irept & find(const irep_namet &name) const
void replace(const union_find_replacet &replace_map, string_not_contains_constraintt &constraint)
A codet representing the declaration of a local variable.
Union constructor from single element.
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)
system_library_symbolst system_symbols
Base class for all expressions.
std::vector< componentt > componentst
const union_exprt & to_union_expr(const exprt &expr)
Cast an exprt to a union_exprt.
irep_idt base_name
Base (non-scoped) name.
std::unique_ptr< languaget > language
void convert_compound(const typet &type, const typet &unresolved, bool recursive, std::ostream &os)
struct configt::ansi_ct ansi_c
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
static bool find_block_position_rec(const irep_idt &identifier, codet &root, code_blockt *&dest, exprt::operandst::iterator &before)
function_mapt function_map
Expression to hold a symbol (variable)
#define UNREACHABLE
This should be used to mark dead code.
void insert_local_type_decls(code_blockt &b, const std::list< irep_idt > &type_decls)
std::string expr_to_string(const exprt &expr)
convertedt converted_compound
Fixed-width bit-vector with unsigned binary interpretation.
std::set< std::string > system_headers
const codet & to_code(const exprt &expr)
std::unique_ptr< languaget > new_cpp_language()
std::string make_decl(const irep_idt &identifier, const typet &type)
Struct constructor from list of elements.
void dump_typedefs(std::ostream &os) const
Print all typedefs that are not covered via typedef struct xyz { ...
const exprt & size() const
code_operandst & statements()
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
targett add_instruction()
Adds an instruction at the end.
typet & type()
Return the type of the expression.
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
declared_enum_constants_mapt declared_enum_constants
codet representation of a function call statement.
bool get_bool(const irep_namet &name) const
std::ostream & operator<<(std::ostream &out, dump_ct &src)
convertedt converted_global
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
void find_symbols(const exprt &src, find_symbols_sett &dest)
void cleanup_type(typet &type)
const tag_typet & to_tag_type(const typet &type)
Cast a typet to a tag_typet.
const unsignedbv_typet & to_unsignedbv_type(const typet &type)
Cast a typet to an unsignedbv_typet.
bool has_operands() const
Return true if there is at least one operand.
symbolt & get_writeable_ref(const irep_idt &name)
Find a symbol in the symbol table for read-write access.
const std::string & id2string(const irep_idt &d)
bool is_type_internal(const typet &type, std::set< std::string > &out_system_headers) const
Helper function to call is_symbol_internal_symbol on a nameless fake symbol with the given type,...
void convert_compound_enum(const typet &type, std::ostream &os)
void cleanup_expr(exprt &expr)
std::unordered_map< irep_idt, code_declt > local_static_declst
void dump_c(const goto_functionst &src, const bool use_system_headers, const bool use_all_headers, const bool include_harness, const namespacet &ns, std::ostream &out)
bool base_type_eq(const typet &type1, const typet &type2, const namespacet &ns)
Check types for equality across all levels of hierarchy.
const irep_idt & get_identifier() const
Fixed-width bit-vector with two's complement interpretation.
std::unordered_set< irep_idt > convertedt
const c_bit_field_typet & to_c_bit_field_type(const typet &type)
Cast a typet to a c_bit_field_typet.
class symbol_exprt symbol_expr() const
Produces a symbol_exprt for a symbol.
#define Forall_subtypes(it, type)
#define INITIALIZE_FUNCTION
#define POSTCONDITION(CONDITION)
void cleanup_decl(code_declt &decl, std::list< irep_idt > &local_static, std::list< irep_idt > &local_type_decls)
std::size_t long_long_int_width
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const irep_idt & id() const
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 remove(const irep_namet &name)
const code_function_callt & to_code_function_call(const codet &code)
std::vector< exprt > operandst
exprt::operandst argumentst
void operator()(std::ostream &out)
void add(const codet &code)
const parameterst & parameters() const
const symbol_typet & to_symbol_type(const typet &type)
Cast a typet to a symbol_typet.
std::size_t get_width() const
irep_idt get_component_name() const
bool is_zero() const
Return whether the expression is a constant representing 0.
bool add(const symbolt &symbol)
Add a new symbol to the symbol table.
virtual symbolt * get_writeable(const irep_idt &name) override
Find a symbol in the symbol table for read-write access.
const std::string & get_string(const irep_namet &name) const
A collection of goto functions.
exprt value
Initial value of symbol.
#define forall_irep(it, irep)
Structure type, corresponds to C style structs.
A codet representing a skip statement.
std::unordered_set< irep_idt > find_symbols_sett
const typet & follow(const typet &) const
Resolve type symbol to the type it points to.
const irep_idt & get(const irep_namet &name) const
source_locationt location
Source code location of definition of symbol.
void set(const irep_namet &name, const irep_idt &value)
symbol_tablet copied_symbol_table
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
typedef_typest typedef_types
void cleanup_harness(code_blockt &b)
Replace CPROVER internal symbols in b by printable values and generate necessary declarations.
const signedbv_typet & to_signedbv_type(const typet &type)
Cast a typet to a signedbv_typet.
std::unique_ptr< languaget > new_ansi_c_language()
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
A generic container class for the GOTO intermediate representation of one function.
void convert_compound_declaration(const symbolt &symbol, std::ostream &os_body)
declare compound types
bool is_symbol_internal_symbol(const symbolt &symbol, std::set< std::string > &out_system_headers) const
To find out if a symbol is an internal symbol.
const typet & return_type() const
const code_blockt & to_code_block(const codet &code)
Base class for tree-like data structures with sharing.
A reference into the symbol table.
void convert_global_variable(const symbolt &symbol, std::ostream &os, local_static_declst &local_static_decls)
static irep_idt entry_point()
Get the identifier of the entry point to a goto model.
const union_typet & to_union_type(const typet &type)
Cast a typet to a union_typet.
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...
source_locationt & add_source_location()
Semantic type conversion.
unsignedbv_typet size_type()
A codet representing an assignment in the program.
const irep_idt & get_statement() const
const irep_idt & get_value() const
void set_identifier(const irep_idt &identifier)
irep_idt name
The unique identifier.
void dump_cpp(const goto_functionst &src, const bool use_system_headers, const bool use_all_headers, const bool include_harness, const namespacet &ns, std::ostream &out)
std::string type_to_string(const typet &type)
instructionst::iterator targett
convertedt converted_enum
void gather_global_typedefs()
Find all global typdefs in the symbol table and store them in typedef_types.
Replace expression or type symbols by an expression or type, respectively.
Data structure for representing an arbitrary statement in a program.
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.
#define CHECK_RETURN(CONDITION)