12 #ifndef CPROVER_GOTO_PROGRAMS_GOTO_CONVERT_CLASS_H 13 #define CPROVER_GOTO_PROGRAMS_GOTO_CONVERT_CLASS_H 61 const std::string &suffix,
80 bool result_is_used =
true);
89 const std::string &suffix,
102 bool result_is_used);
117 bool result_is_used);
122 bool result_is_used);
126 bool result_is_used);
134 bool result_is_used);
142 bool result_is_used);
178 const exprt &
function,
202 const exprt &
function,
341 std::size_t stack_size,
346 std::size_t stack_size,
360 std::pair<goto_programt::targett, destructor_stackt>>
362 typedef std::list<std::pair<goto_programt::targett, destructor_stackt>>
366 typedef std::list<std::pair<goto_programt::targett, caset> >
casest;
367 typedef std::map<goto_programt::targett, casest::iterator>
cases_mapt;
549 const caset &case_op);
581 std::list<exprt> &dest);
655 #endif // CPROVER_GOTO_PROGRAMS_GOTO_CONVERT_CLASS_H void convert_atomic_begin(const codet &code, goto_programt &dest)
break_continue_targetst(const targetst &targets)
throw_targett(const targetst &targets)
The type of an expression, extends irept.
irep_idt get_string_constant(const exprt &expr)
void convert_skip(const codet &code, goto_programt &dest)
void do_array_equal(const exprt &lhs, const symbol_exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
codet representing a switch statement.
void convert_gcc_switch_case_range(const codet &code, goto_programt &dest, const irep_idt &mode)
std::list< goto_programt::targett > computed_gotost
void restore(targetst &targets)
void remove_function_call(side_effect_exprt &expr, goto_programt &dest, const irep_idt &mode, bool result_is_used)
void remove_malloc(side_effect_exprt &expr, goto_programt &dest, const irep_idt &mode, bool result_is_used)
void remove_pre(side_effect_exprt &expr, goto_programt &dest, bool result_is_used, const irep_idt &mode)
goto_programt::targett return_target
goto_programt::targett break_target
codet representation of a continue statement (within a for or while loop).
void convert_switch(const code_switcht &code, goto_programt &dest, const irep_idt &mode)
struct goto_convertt::targetst targets
void convert(const codet &code, goto_programt &dest, const irep_idt &mode)
converts 'code' and appends the result to 'dest'
static bool has_sideeffect(const exprt &expr)
goto_programt::targett default_target
void finish_gotos(goto_programt &dest, const irep_idt &mode)
void convert_dowhile(const code_dowhilet &code, goto_programt &dest, const irep_idt &mode)
goto_programt::targett throw_target
goto_programt::targett break_target
void convert_assert(const code_assertt &code, goto_programt &dest, const irep_idt &mode)
void generate_ifthenelse(const exprt &cond, goto_programt &true_case, goto_programt &false_case, const source_locationt &, goto_programt &dest, const irep_idt &mode)
if(guard) true_case; else false_case;
void do_printf(const exprt &lhs, const symbol_exprt &function, const exprt::operandst &arguments, goto_programt &dest)
void convert_label(const code_labelt &code, goto_programt &dest, const irep_idt &mode)
void do_atomic_begin(const exprt &lhs, const symbol_exprt &function, const exprt::operandst &arguments, goto_programt &dest)
void convert_gcc_computed_goto(const codet &code, goto_programt &dest)
void convert_atomic_end(const codet &code, goto_programt &dest)
void do_atomic_end(const exprt &lhs, const symbol_exprt &function, const exprt::operandst &arguments, goto_programt &dest)
virtual void do_function_call_symbol(const exprt &lhs, const symbol_exprt &function, const exprt::operandst &arguments, goto_programt &dest)
add function calls to function queue for later processing
void convert_assume(const code_assumet &code, goto_programt &dest, const irep_idt &mode)
The trinary if-then-else operator.
void restore(targetst &targets)
void convert_try_catch(const codet &code, goto_programt &dest, const irep_idt &mode)
codet representation of a goto statement.
void remove_temporary_object(side_effect_exprt &expr, goto_programt &dest)
void clean_expr_address_of(exprt &expr, goto_programt &dest, const irep_idt &mode)
void convert_end_thread(const codet &code, goto_programt &dest)
codet representation of an expression statement.
void set_default(goto_programt::targett _default_target)
static bool has_function_call(const exprt &expr)
std::map< goto_programt::targett, casest::iterator > cases_mapt
goto_programt::targett throw_target
void convert_return(const code_returnt &code, goto_programt &dest, const irep_idt &mode)
destructor_stackt destructor_stack
void convert_expression(const code_expressiont &code, goto_programt &dest, const irep_idt &mode)
void convert_ifthenelse(const code_ifthenelset &code, goto_programt &dest, const irep_idt &mode)
static void collect_operands(const exprt &expr, const irep_idt &id, std::list< exprt > &dest)
std::size_t continue_stack_size
void convert_block(const code_blockt &code, goto_programt &dest, const irep_idt &mode)
goto_programt::targett break_target
void convert_loop_invariant(const codet &code, goto_programt::targett loop, const irep_idt &mode)
void do_array_op(const irep_idt &id, const exprt &lhs, const symbol_exprt &function, const exprt::operandst &arguments, goto_programt &dest)
void convert_decl_type(const codet &code, goto_programt &dest)
void goto_convert(const codet &code, goto_programt &dest, const irep_idt &mode)
void do_java_new(const exprt &lhs, const side_effect_exprt &rhs, goto_programt &dest)
void convert_switch_case(const code_switch_caset &code, goto_programt &dest, const irep_idt &mode)
std::size_t leave_stack_size
void do_input(const exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
void convert_decl(const code_declt &code, goto_programt &dest, const irep_idt &mode)
void clean_expr(exprt &expr, goto_programt &dest, const irep_idt &mode, bool result_is_used=true)
virtual void do_cpp_new(const exprt &lhs, const side_effect_exprt &rhs, goto_programt &dest)
std::string tmp_symbol_prefix
instructionst::iterator targett
A codet representing the declaration of a local variable.
symbol_exprt exception_flag()
goto_programt::targett leave_target
void restore(targetst &targets)
void convert_init(const codet &code, goto_programt &dest, const irep_idt &mode)
void convert_function_call(const code_function_callt &code, goto_programt &dest, const irep_idt &mode)
goto_programt::targett default_target
exprt case_guard(const exprt &value, const caset &case_op)
void goto_convert_rec(const codet &code, goto_programt &dest, const irep_idt &mode)
goto_programt::targett leave_target
void remove_cpp_new(side_effect_exprt &expr, goto_programt &dest, bool result_is_used)
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
codet representation of a label for branch targets.
void convert_assign(const code_assignt &code, goto_programt &dest, const irep_idt &mode)
void do_output(const exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
goto_program_instruction_typet
The type of an instruction in a GOTO program.
goto_programt::targett continue_target
std::size_t throw_stack_size
codet representation of a function call statement.
void remove_cpp_delete(side_effect_exprt &expr, goto_programt &dest)
void do_create_thread(const exprt &lhs, const symbol_exprt &function, const exprt::operandst &arguments, goto_programt &dest)
void convert_CPROVER_throw(const codet &code, goto_programt &dest, const irep_idt &mode)
codet representing a while statement.
void do_prob_uniform(const exprt &lhs, const symbol_exprt &function, const exprt::operandst &arguments, goto_programt &dest)
Class that provides messages with a built-in verbosity 'level'.
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
void convert_msc_leave(const codet &code, goto_programt &dest, const irep_idt &mode)
virtual void do_function_call(const exprt &lhs, const exprt &function, const exprt::operandst &arguments, goto_programt &dest, const irep_idt &mode)
void convert_asm(const code_asmt &code, goto_programt &dest)
void do_java_new_array(const exprt &lhs, const side_effect_exprt &rhs, goto_programt &dest)
void finish_computed_gotos(goto_programt &dest)
void convert_cpp_delete(const codet &code, goto_programt &dest)
void restore(targetst &targets)
exprt get_array_argument(const exprt &src)
virtual void do_function_call_other(const exprt &lhs, const exprt &function, const exprt::operandst &arguments, goto_programt &dest)
void remove_assignment(side_effect_exprt &expr, goto_programt &dest, bool result_is_used, const irep_idt &mode)
void generate_thread_block(const code_blockt &thread_body, goto_programt &dest, const irep_idt &mode)
Generates the necessary goto-instructions to represent a thread-block.
void convert_gcc_local_label(const codet &code, goto_programt &dest)
void convert_for(const code_fort &code, goto_programt &dest, const irep_idt &mode)
std::vector< exprt > operandst
A generic container class for the GOTO intermediate representation of one function.
A non-fatal assertion, which checks a condition then permits execution to continue.
break_switch_targetst(const targetst &targets)
void remove_post(side_effect_exprt &expr, goto_programt &dest, const irep_idt &mode, bool result_is_used)
An assumption, which must hold in subsequent code.
exprt get_constant(const exprt &expr)
void set_continue(goto_programt::targett _continue_target)
void remove_statement_expression(side_effect_exprt &expr, goto_programt &dest, const irep_idt &mode, bool result_is_used)
void convert_while(const code_whilet &code, goto_programt &dest, const irep_idt &mode)
virtual void do_function_call_symbol(const symbolt &)
static bool needs_cleaning(const exprt &expr)
void cpp_new_initializer(const exprt &lhs, const side_effect_exprt &rhs, goto_programt &dest)
builds a goto program for object initialization after new
goto_programt::targett continue_target
void optimize_guarded_gotos(goto_programt &dest)
Rewrite "if(x) goto z; goto y; z:" into "if(!x) goto y;" This only works if the "goto y" is not a bra...
std::vector< codet > destructor_stackt
void remove_gcc_conditional_expression(exprt &expr, goto_programt &dest, const irep_idt &mode)
void set_break(goto_programt::targett _break_target)
void set_leave(goto_programt::targett _leave_target)
Base class for all expressions.
codet representation of a break statement (within a for or while loop).
The symbol table base class interface.
void do_prob_coin(const exprt &lhs, const symbol_exprt &function, const exprt::operandst &arguments, goto_programt &dest)
symbol_exprt make_compound_literal(const exprt &expr, goto_programt &dest, const irep_idt &mode)
computed_gotost computed_gotos
void set_throw(goto_programt::targett _throw_target)
std::size_t leave_stack_size
codet representation of a do while statement.
codet representation of an inline assembler statement.
void convert_msc_try_except(const codet &code, goto_programt &dest, const irep_idt &mode)
symbolt & new_tmp_symbol(const typet &type, const std::string &suffix, goto_programt &dest, const source_locationt &, const irep_idt &mode)
std::size_t break_stack_size
void unwind_destructor_stack(const source_locationt &, std::size_t stack_size, goto_programt &dest, const irep_idt &mode)
void convert_CPROVER_try_catch(const codet &code, goto_programt &dest, const irep_idt &mode)
std::size_t break_stack_size
symbol_table_baset & symbol_table
void convert_CPROVER_try_finally(const codet &code, goto_programt &dest, const irep_idt &mode)
goto_convertt(symbol_table_baset &_symbol_table, message_handlert &_message_handler)
std::list< std::pair< goto_programt::targett, caset > > casest
void convert_msc_try_finally(const codet &code, goto_programt &dest, const irep_idt &mode)
void convert_break(const code_breakt &code, goto_programt &dest, const irep_idt &mode)
A codet representing sequential composition of program statements.
virtual void do_function_call_if(const exprt &lhs, const if_exprt &function, const exprt::operandst &arguments, goto_programt &dest, const irep_idt &mode)
void remove_side_effect(side_effect_exprt &expr, goto_programt &dest, const irep_idt &mode, bool result_is_used)
codet representation of an if-then-else statement.
std::size_t throw_stack_size
Expression to hold a symbol (variable)
void convert_continue(const code_continuet &code, goto_programt &dest, const irep_idt &mode)
void do_scanf(const exprt &lhs, const symbol_exprt &function, const exprt::operandst &arguments, goto_programt &dest)
void copy(const codet &code, goto_program_instruction_typet type, goto_programt &dest)
codet representation of a switch-case, i.e. a case statement within a switch.
leave_targett(const targetst &targets)
Data structure for representing an arbitrary statement in a program.
codet representation of a "return from a function" statement.
void make_temp_symbol(exprt &expr, const std::string &suffix, goto_programt &, const irep_idt &mode)
codet representation of a for statement.
An expression containing a side effect.
void convert_start_thread(const codet &code, goto_programt &dest)
std::map< irep_idt, std::pair< goto_programt::targett, destructor_stackt > > labelst
void set_return(goto_programt::targett _return_target)
void rewrite_boolean(exprt &dest)
re-write boolean operators into ?:
static void replace_new_object(const exprt &object, exprt &dest)
A codet representing an assignment in the program.
void convert_goto(const code_gotot &code, goto_programt &dest)
std::list< std::pair< goto_programt::targett, destructor_stackt > > gotost
void generate_conditional_branch(const exprt &guard, goto_programt::targett target_true, goto_programt::targett target_false, const source_locationt &, goto_programt &dest, const irep_idt &mode)
if(guard) goto target_true; else goto target_false;