58 for(natural_loopst::loop_mapt::const_iterator
63 assert(!l_it->second.empty());
73 it=l_it->second.begin();
74 it!=l_it->second.end();
78 if((*it)->get_target()==loop_start &&
79 (*it)->location_number>loop_end->location_number)
83 if(!
loop_map.insert(std::make_pair(loop_start, loop_end)).second)
95 if(instruction.is_dead())
97 dead_map[instruction.dead_symbol().get_identifier()] =
98 instruction.location_number;
109 if(instruction.is_assign())
111 const exprt &l = instruction.get_assign().lhs();
112 const exprt &
r = instruction.get_assign().rhs();
116 r.id() == ID_side_effect &&
122 else if(l.
type().
id()==ID_pointer &&
123 l.
type().
get(ID_C_typedef)==
"va_list" &&
125 r.id()==ID_typecast &&
142 if(target->type!=
ASSERT &&
143 !target->source_location.get_comment().empty())
146 dest.
statements().back().add_source_location().set_comment(
147 target->source_location.get_comment());
151 if(target->is_target() && !target->is_goto())
157 upper_bound->location_number > loop_entry->second->location_number))
174 dest.
add(target->get_function_call());
178 dest.
add(target->get_other());
193 dest.
statements().back().add_source_location().set_comment(
194 target->source_location.get_comment());
209 dest.
statements().back().add_source_location().set_comment(
"END_THREAD");
220 dest.
add(std::move(f));
247 if(target->is_target())
249 std::stringstream label;
254 latest_block->
add(std::move(l));
259 for(goto_programt::instructiont::labelst::const_iterator
260 it=target->labels.begin();
261 it!=target->labels.end();
276 latest_block->
add(std::move(l));
281 if(latest_block!=&dest)
307 const exprt this_va_list_expr=assign.
lhs();
310 if(
r.id()==ID_constant &&
315 {this_va_list_expr});
317 dest.
add(std::move(f));
320 r.id() == ID_side_effect &&
328 dest.
add(std::move(f));
330 else if(
r.id() == ID_plus)
334 {this_va_list_expr});
348 if(next!=upper_bound &&
351 const exprt &n_r = next->get_assign().rhs();
353 n_r.
id() == ID_dereference &&
356 f.lhs() = next->get_assign().lhs();
358 type_of.arguments().push_back(f.lhs());
359 f.arguments().push_back(type_of);
361 dest.
add(std::move(f));
367 assert(
r.find(ID_C_va_arg_type).is_not_nil());
368 const typet &va_arg_type=
369 static_cast<typet const&
>(
r.find(ID_C_va_arg_type));
375 type_of.arguments().push_back(deref);
376 f.arguments().push_back(type_of);
380 dest.
add(std::move(void_f));
386 {this_va_list_expr,
r});
388 dest.
add(std::move(f));
398 if(assign.
rhs().
id()==ID_array)
423 target->return_value().id() != ID_side_effect ||
435 while(next!=upper_bound && next->is_dead() && !next->is_target())
438 if(next!=upper_bound &&
462 upper_bound->location_number > entry->second);
466 if(next!=upper_bound &&
468 !next->is_target() &&
469 (next->is_assign() || next->is_function_call()))
471 exprt lhs = next->is_assign() ? next->get_assign().lhs()
472 : next->get_function_call().lhs();
476 if(next->is_assign())
501 dest.
add(std::move(d));
513 assert(loop_end->is_goto() && loop_end->is_backwards_goto());
522 for( ; target!=loop_end; ++target)
529 dest.
add(std::move(d));
538 assert(target->is_goto());
540 assert(target->targets.size()==1);
546 upper_bound->location_number > loop_entry->second->location_number))
548 else if(!target->guard.is_true())
561 assert(loop_end->is_goto() && loop_end->is_backwards_goto());
573 if(target->get_target()==after_loop)
578 else if(target->guard.is_true())
589 for(++target; target!=loop_end; ++target)
595 if(loop_end->guard.is_false())
599 else if(!loop_end->guard.is_true())
609 if(w.body().has_operands() &&
613 w.body().operands().pop_back();
614 increment.
id(ID_side_effect);
622 else if(w.body().has_operands() &&
632 w.body().operands().pop_back();
641 dest.
add(std::move(w));
649 const exprt &switch_var,
655 std::set<goto_programt::const_targett> unique_targets;
659 cases_it!=upper_bound && cases_it!=first_target;
662 if(cases_it->is_goto() &&
663 !cases_it->is_backwards_goto() &&
664 cases_it->guard.is_true())
666 default_target=cases_it->get_target();
669 first_target->location_number > default_target->location_number)
670 first_target=default_target;
672 last_target->location_number < default_target->location_number)
673 last_target=default_target;
675 cases.push_back(
caset(
680 unique_targets.insert(default_target);
685 else if(cases_it->is_goto() &&
686 !cases_it->is_backwards_goto() &&
687 (cases_it->guard.id()==ID_equal ||
688 cases_it->guard.id()==ID_or))
691 if(cases_it->guard.id()==ID_equal)
692 eqs.push_back(cases_it->guard);
694 eqs=cases_it->guard.operands();
698 for(exprt::operandst::const_reverse_iterator
700 e_it!=(exprt::operandst::const_reverse_iterator)eqs.rend();
703 if(e_it->id()!=ID_equal ||
708 cases.push_back(
caset(
712 cases_it->get_target()));
713 assert(cases.back().value.is_not_nil());
716 first_target->location_number>
717 cases.back().case_start->location_number)
718 first_target=cases.back().case_start;
720 last_target->location_number<
721 cases.back().case_start->location_number)
722 last_target=cases.back().case_start;
724 unique_targets.insert(cases.back().case_start);
733 if(unique_targets.size()<3)
737 if(cases_it==upper_bound ||
739 upper_bound->location_number < last_target->location_number) ||
741 last_target->location_number > default_target->location_number) ||
742 target->get_target()==default_target)
752 std::set<unsigned> &processed_locations)
754 std::set<goto_programt::const_targett> targets_done;
756 for(cases_listt::iterator it=cases.begin();
762 if(!targets_done.insert(it->case_start).second)
769 case_end!=upper_bound;
772 const auto &case_end_node = dominators.
get_node(case_end);
779 if(case_end==it->case_start)
786 if(!dominators.
dominates(it->case_start, case_end_node))
789 if(!processed_locations.insert(case_end->location_number).second)
792 it->case_last=case_end;
804 for(cases_listt::const_iterator it=cases.begin();
813 cases_listt::const_iterator last=--cases.end();
814 if(last->case_start==default_target &&
829 next_case == default_target &&
830 (!it->case_last->is_goto() ||
831 (it->case_last->get_condition().is_true() &&
832 it->case_last->get_target() == default_target)))
841 if(it->case_last->is_goto() &&
842 it->case_last->guard.is_true() &&
843 it->case_last->get_target()==default_target)
847 if(!it->case_last->is_goto())
862 exprt eq_cand=target->guard;
863 if(eq_cand.
id()==ID_or)
866 if(target->is_backwards_goto() ||
867 eq_cand.
id()!=ID_equal ||
899 if(cases_start==target)
907 for(target=cases_start; target!=first_target; ++target)
910 std::set<unsigned> processed_locations;
929 for(cases_listt::const_iterator it=cases.begin();
933 it->case_last->location_number > max_target->location_number)
934 max_target=it->case_last;
936 std::map<goto_programt::const_targett, unsigned> targets_done;
941 for(cases_listt::const_iterator it=cases.begin();
947 if(it->value.is_nil())
950 csc.case_op()=it->value;
954 if(targets_done.find(it->case_start)!=targets_done.end())
956 assert(it->case_selector==orig_target ||
957 !it->case_selector->is_target());
965 csc.code().swap(cscp->
code());
972 if(it->case_selector!=orig_target)
976 target=it->case_start;
983 if(it->case_start!=(--cases.end())->case_start)
997 for( ; target!=after_last; ++target)
1002 targets_done[it->case_start]=s.
body().
operands().size();
1012 if(processed_locations.find(it->location_number)==
1013 processed_locations.end())
1022 dest.
add(std::move(s));
1035 bool has_else=
false;
1037 if(!target->is_backwards_goto())
1044 if(before_else==target)
1051 before_else->is_goto() &&
1052 before_else->get_target()->location_number > end_if->location_number &&
1053 before_else->guard.is_true() &&
1055 upper_bound->location_number>=
1056 before_else->get_target()->location_number);
1059 end_if=before_else->get_target();
1063 if(target->is_backwards_goto() ||
1065 upper_bound->location_number < end_if->location_number))
1082 for(++target; target!=before_else; ++target)
1088 for(++target; target!=end_if; ++target)
1094 for(++target; target!=end_if; ++target)
1099 dest.
add(std::move(i));
1122 if(target->get_target()==next)
1131 if(target->get_target()==loop_end &&
1142 dest.
add(std::move(i));
1156 if(target->get_target()==after_loop)
1166 dest.
add(std::move(i));
1181 if(target->get_target()==next)
1191 std::stringstream label;
1193 for(goto_programt::instructiont::labelst::const_iterator
1194 it=target->get_target()->labels.begin();
1195 it!=target->get_target()->labels.end();
1209 if(label.str().empty())
1210 label <<
CPROVER_PREFIX "DUMP_L" << target->get_target()->target_number;
1224 dest.
add(std::move(i));
1234 assert(target->is_start_thread());
1237 assert(thread_start->location_number > target->location_number);
1248 if(!next->is_goto())
1252 assert(this_end->is_end_thread());
1253 assert(thread_start->location_number > this_end->location_number);
1258 for(goto_programt::instructiont::labelst::const_iterator
1259 it=target->labels.begin();
1260 it!=target->labels.end();
1272 dest.
add(std::move(b));
1283 assert(next->is_goto() && next->guard.is_true());
1284 assert(!next->is_backwards_goto());
1285 assert(thread_start->location_number < next->get_target()->location_number);
1287 ++after_thread_start;
1291 assert(thread_start->location_number < thread_end->location_number);
1292 assert(thread_end->is_end_thread());
1295 thread_end->location_number < upper_bound->location_number);
1301 thread_start->is_function_call() &&
1302 thread_start->get_function_call().arguments().size() == 1 &&
1303 after_thread_start == thread_end)
1319 for( ; thread_start!=thread_end; ++thread_start)
1323 for(goto_programt::instructiont::labelst::const_iterator
1324 it=target->labels.begin();
1325 it!=target->labels.end();
1337 dest.
add(std::move(b));
1362 if(type.
id() == ID_struct_tag || type.
id() == ID_union_tag)
1379 else if(type.
id()==ID_c_enum_tag)
1388 assert(!identifier.
empty());
1391 else if(type.
id()==ID_pointer ||
1392 type.
id()==ID_array)
1405 code.
op1().
id()==ID_side_effect &&
1424 if(!typedef_str.
empty() &&
1437 call.
lhs().
id()==ID_typecast)
1445 if(op.id() == ID_code)
1453 if(statement==ID_label)
1458 assert(!label.
empty());
1466 else if(statement==ID_block)
1468 else if(statement==ID_ifthenelse)
1470 else if(statement==ID_dowhile)
1481 code=do_while.
body();
1486 const exprt &
function,
1489 if(
function.
id()!=ID_symbol)
1502 if(parameters.size()==arguments.size())
1504 code_typet::parameterst::const_iterator it=parameters.begin();
1505 for(
auto &argument : arguments)
1508 argument.type().id() == ID_union ||
1509 argument.type().id() == ID_union_tag)
1511 argument.type() = it->type();
1527 operands.size()>1 && i<operands.size();
1530 exprt::operandst::iterator it=operands.begin()+i;
1533 it->source_location().get_comment().
empty())
1538 bool has_decl=
false;
1548 operands.insert(operands.begin()+i+1,
1549 it->operands().begin(), it->operands().end());
1550 operands.erase(operands.begin()+i);
1560 if(operands.empty() && parent_stmt!=ID_nil)
1562 else if(operands.size()==1 &&
1563 parent_stmt!=ID_nil &&
1574 type.
remove(ID_C_constant);
1576 if(type.
id() == ID_struct_tag || type.
id() == ID_union_tag)
1585 "Symbol "+
id2string(identifier)+
" should be a type");
1589 else if(type.
id()==ID_array)
1591 else if(type.
id()==ID_struct ||
1592 type.
id()==ID_union)
1597 for(struct_union_typet::componentst::iterator
1603 else if(type.
id() == ID_c_bit_field)
1621 if(expr.
is_nil() ||
to_code(expr).get_statement() != ID_block)
1627 block.
statements().back().get_statement() != ID_label)
1708 code =
code_blockt({i_t_e, then_label, else_label});
1741 (expr.
id()==ID_address_of || expr.
id()==ID_member))
1746 else if(!no_typecast &&
1747 (expr.
id()==ID_union || expr.
id()==ID_struct ||
1748 expr.
id()==ID_array || expr.
id()==ID_vector))
1761 expr.
id() == ID_union && expr.
type().
id() != ID_union &&
1762 expr.
type().
id() != ID_union_tag)
1768 if(expr.
id()==ID_typecast &&
1772 if(expr.
id()==ID_union ||
1773 expr.
id()==ID_struct)
1779 expr.
type().
id() == ID_struct_tag || expr.
type().
id() == ID_union_tag,
1780 "union/struct expressions should have a tag type");
1788 if(!typedef_str.
empty() &&
1792 else if(expr.
id()==ID_array ||
1793 expr.
id()==ID_vector)
1796 expr.
get_bool(ID_C_string_constant))
1805 if(!typedef_str.
empty() &&
1809 else if(expr.
id()==ID_side_effect)
1813 if(statement==ID_nondet)
1820 for(symbol_tablet::symbolst::const_iterator
1825 if(it->second.type.id()!=ID_code)
1847 suffix=expr.
type().
get(ID_C_c_type);
1854 if(base_name.
empty())
1865 symbol.
name=base_name;
1883 else if(expr.
id()==ID_isnan ||
1886 else if(expr.
id()==ID_constant)
1888 if(expr.
type().
id()==ID_floatbv)
1894 else if(expr.
type().
id()==ID_pointer)
1897 const irept &c_sizeof_type=expr.
find(ID_C_c_sizeof_type);
1902 else if(expr.
id()==ID_typecast)
1904 if(expr.
type().
id() == ID_c_bit_field)
1911 if(!typedef_str.
empty() &&
1915 assert(expr.
type().
id()!=ID_union &&
1916 expr.
type().
id()!=ID_struct);
1919 else if(expr.
id()==ID_symbol)
1921 if(expr.
type().
id()!=ID_code)
1927 symbol.
type.
id()!=ID_code &&
1948 if(src->code.source_location().is_not_nil())
1950 else if(src->source_location.is_not_nil())
bitvector_typet index_type()
unsignedbv_typet size_type()
pointer_typet pointer_type(const typet &subtype)
const exprt & size() const
bool dominates(T lhs, const nodet &rhs_node) const
Returns true if the program point corresponding to rhs_node is dominated by program point lhs.
bool program_point_reachable(const nodet &program_point_node) const
Returns true if the program point for program_point_node is reachable from the entry point.
const cfgt::nodet & get_node(const T &program_point) const
Get the graph node (which gives dominators, predecessors and successors) for program_point.
A non-fatal assertion, which checks a condition then permits execution to continue.
A codet representing an assignment in the program.
An assumption, which must hold in subsequent code.
A codet representing sequential composition of program statements.
void add(const codet &code)
code_operandst & statements()
codet representation of a break statement (within a for or while loop).
codet representation of a continue statement (within a for or while loop).
A codet representing the declaration of a local variable.
void set_initial_value(optionalt< exprt > initial_value)
Sets the value to which this declaration initializes the declared variable.
codet representation of a do while statement.
const exprt & cond() const
const codet & body() const
codet representation of an expression statement.
codet representation of a for statement.
codet representation of a function call statement.
exprt::operandst argumentst
codet representation of a goto statement.
codet representation of an if-then-else statement.
const codet & then_case() const
const exprt & cond() const
const codet & else_case() const
codet representation of a label for branch targets.
const irep_idt & get_label() const
codet representation of a "return from a function" statement.
const exprt & return_value() const
A codet representing a skip statement.
codet representation of a switch-case, i.e. a case statement within a switch.
codet representing a switch statement.
const exprt & value() const
const codet & body() const
std::vector< parametert > parameterst
const typet & return_type() const
const parameterst & parameters() const
codet representing a while statement.
Data structure for representing an arbitrary statement in a program.
void set_statement(const irep_idt &statement)
const irep_idt & get_statement() const
Operator to dereference a pointer.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
std::vector< exprt > operandst
bool has_operands() const
Return true if there is at least one operand.
bool is_true() const
Return whether the expression is a constant representing true.
void copy_to_operands(const exprt &expr)
Copy the given argument to the end of exprt's operands.
source_locationt & add_source_location()
const source_locationt & source_location() const
bool is_false() const
Return whether the expression is a constant representing false.
void reserve_operands(operandst::size_type n)
typet & type()
Return the type of the expression.
bool is_constant() const
Return whether the expression is a constant.
The Boolean constant false.
goto_programt::const_targett convert_goto_switch(goto_programt::const_targett target, goto_programt::const_targett upper_bound, code_blockt &dest)
goto_programt::const_targett convert_assign_varargs(goto_programt::const_targett target, goto_programt::const_targett upper_bound, code_blockt &dest)
std::unordered_set< irep_idt > local_static_set
std::unordered_set< irep_idt > type_names_set
goto_programt::const_targett convert_goto_break_continue(goto_programt::const_targett target, goto_programt::const_targett upper_bound, code_blockt &dest)
void cleanup_code_ifthenelse(codet &code, const irep_idt parent_stmt)
loop_last_stackt loop_last_stack
void convert_labels(goto_programt::const_targett target, code_blockt &dest)
goto_programt::const_targett convert_decl(goto_programt::const_targett target, goto_programt::const_targett upper_bound, code_blockt &dest)
symbol_tablet & symbol_table
goto_programt::const_targett convert_do_while(goto_programt::const_targett target, goto_programt::const_targett loop_end, code_blockt &dest)
goto_programt::const_targett convert_goto_goto(goto_programt::const_targett target, code_blockt &dest)
const goto_programt & goto_program
goto_programt::const_targett convert_start_thread(goto_programt::const_targett target, goto_programt::const_targett upper_bound, code_blockt &dest)
goto_programt::const_targett get_cases(goto_programt::const_targett target, goto_programt::const_targett upper_bound, const exprt &switch_var, cases_listt &cases, goto_programt::const_targett &first_target, goto_programt::const_targett &default_target)
void cleanup_code_block(codet &code, const irep_idt parent_stmt)
std::list< caset > cases_listt
void copy_source_location(goto_programt::const_targett, codet &dst)
bool remove_default(const cfg_dominatorst &dominators, const cases_listt &cases, goto_programt::const_targett default_target)
goto_programt::const_targett convert_throw(goto_programt::const_targett target, code_blockt &dest)
std::unordered_set< irep_idt > const_removed
goto_programt::const_targett convert_catch(goto_programt::const_targett target, goto_programt::const_targett upper_bound, code_blockt &dest)
void remove_const(typet &type)
std::unordered_set< exprt, irep_hash > va_list_expr
goto_programt::const_targett convert_goto(goto_programt::const_targett target, goto_programt::const_targett upper_bound, code_blockt &dest)
void add_local_types(const typet &type)
void cleanup_expr(exprt &expr, bool no_typecast)
void cleanup_code(codet &code, const irep_idt parent_stmt)
void cleanup_function_call(const exprt &function, code_function_callt::argumentst &arguments)
goto_programt::const_targett convert_assign(goto_programt::const_targett target, goto_programt::const_targett upper_bound, code_blockt &dest)
goto_programt::const_targett convert_instruction(goto_programt::const_targett target, goto_programt::const_targett upper_bound, code_blockt &dest)
void convert_assign_rec(const code_assignt &assign, code_blockt &dest)
std::unordered_set< irep_idt > labels_in_use
goto_programt::const_targett convert_goto_while(goto_programt::const_targett target, goto_programt::const_targett loop_end, code_blockt &dest)
goto_programt::const_targett convert_return(goto_programt::const_targett target, goto_programt::const_targett upper_bound, code_blockt &dest)
goto_programt::const_targett convert_goto_if(goto_programt::const_targett target, goto_programt::const_targett upper_bound, code_blockt &dest)
std::set< std::string > & system_headers
code_blockt & toplevel_block
const std::unordered_set< irep_idt > & typedef_names
bool set_block_end_points(goto_programt::const_targett upper_bound, const cfg_dominatorst &dominators, cases_listt &cases, std::set< unsigned > &processed_locations)
This class represents an instruction in the GOTO intermediate representation.
exprt guard
Guard for gotos, assume, assert Use get_condition() to read, and set_condition(c) to write.
A generic container class for the GOTO intermediate representation of one function.
instructionst instructions
The list of instructions in the goto program.
void insert_before_swap(targett target)
Insertion that preserves jumps to "target".
instructionst::const_iterator const_targett
targett insert_before(const_targett target)
Insertion before the instruction pointed-to by the given instruction iterator target.
There are a large number of kinds of tree structured or tree-like data in CPROVER.
bool get_bool(const irep_namet &name) const
const irept & find(const irep_namet &name) const
const irep_idt & id() const
void remove(const irep_namet &name)
const irep_idt & get(const irep_namet &name) const
loop_instructionst::const_iterator const_iterator
const typet & follow(const typet &) const
Resolve type symbol to the type it points to.
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
const cfg_dominators_templatet< P, T, false > & get_dominator_info() const
The null pointer constant.
A side_effect_exprt representation of a function call side effect.
exprt::operandst & arguments()
const irep_idt & get_statement() const
const irep_idt & get_function() const
Base type for structs and unions.
const componentst & components() const
std::vector< componentt > componentst
Expression to hold a symbol (variable)
const irep_idt & get_identifier() const
symbolt & get_writeable_ref(const irep_idt &name)
Find a symbol in the symbol table for read-write access.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
virtual std::pair< symbolt &, bool > insert(symbolt symbol) override
Author: Diffblue Ltd.
irep_idt base_name
Base (non-scoped) name.
source_locationt location
Source code location of definition of symbol.
typet type
Type of symbol.
irep_idt name
The unique identifier.
exprt value
Initial value of symbol.
const irep_idt & get_identifier() const
The Boolean constant true.
Semantic type conversion.
The type of an expression, extends irept.
const typet & subtype() const
bool has_prefix(const std::string &s, const std::string &prefix)
#define forall_operands(it, expr)
#define Forall_operands(it, expr)
const exprt & skip_typecast(const exprt &expr)
find the expression nested inside typecasts, if any
Deprecated expression utility functions.
static bool has_labels(const codet &code)
static bool move_label_ifthenelse(exprt &expr, exprt &label_dest)
Dump Goto-Program as C/C++ Source.
#define forall_goto_program_instructions(it, program)
const std::string & id2string(const irep_idt &d)
bool is_true(const literalt &l)
API to expression classes for Pointers.
const dereference_exprt & to_dereference_expr(const exprt &expr)
Cast an exprt to a dereference_exprt.
const address_of_exprt & to_address_of_expr(const exprt &expr)
Cast an exprt to an address_of_exprt.
bool simplify(exprt &expr, const namespacet &ns)
exprt simplify_expr(exprt src, const namespacet &ns)
#define UNREACHABLE
This should be used to mark dead code.
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
const code_ifthenelset & to_code_ifthenelse(const codet &code)
side_effect_exprt & to_side_effect_expr(exprt &expr)
const code_switch_caset & to_code_switch_case(const codet &code)
const code_labelt & to_code_label(const codet &code)
side_effect_expr_function_callt & to_side_effect_expr_function_call(exprt &expr)
const codet & to_code(const exprt &expr)
const code_dowhilet & to_code_dowhile(const codet &code)
const code_blockt & to_code_block(const codet &code)
const code_function_callt & to_code_function_call(const codet &code)
const or_exprt & to_or_expr(const exprt &expr)
Cast an exprt to a or_exprt.
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
const union_exprt & to_union_expr(const exprt &expr)
Cast an exprt to a union_exprt.
const equal_exprt & to_equal_expr(const exprt &expr)
Cast an exprt to an equal_exprt.
const unary_exprt & to_unary_expr(const exprt &expr)
Cast an exprt to a unary_exprt.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
bool is_constant(const typet &type)
This method tests, if the given typet is a constant.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
const c_bit_field_typet & to_c_bit_field_type(const typet &type)
Cast a typet to a c_bit_field_typet.
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
const c_enum_tag_typet & to_c_enum_tag_type(const typet &type)
Cast a typet to a c_enum_tag_typet.
const tag_typet & to_tag_type(const typet &type)
Cast a typet to a tag_typet.
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.