cprover
goto_convert_functionst Class Reference

#include <goto_convert_functions.h>

Inheritance diagram for goto_convert_functionst:
[legend]
Collaboration diagram for goto_convert_functionst:
[legend]

Public Member Functions

void goto_convert ()
 
void convert_function (const irep_idt &identifier)
 
 goto_convert_functionst (symbol_tablet &_symbol_table, goto_functionst &_functions, message_handlert &_message_handler)
 
virtual ~goto_convert_functionst ()
 
- Public Member Functions inherited from goto_convertt
void goto_convert (const codet &code, goto_programt &dest)
 
 goto_convertt (symbol_tablet &_symbol_table, message_handlert &_message_handler)
 
virtual ~goto_convertt ()
 
- Public Member Functions inherited from messaget
virtual void set_message_handler (message_handlert &_message_handler)
 
message_handlertget_message_handler ()
 
 messaget ()
 
 messaget (const messaget &other)
 
 messaget (message_handlert &_message_handler)
 
virtual ~messaget ()
 
mstreamtget_mstream (unsigned message_level)
 
mstreamterror ()
 
mstreamtwarning ()
 
mstreamtresult ()
 
mstreamtstatus ()
 
mstreamtstatistics ()
 
mstreamtprogress ()
 
mstreamtdebug ()
 

Protected Member Functions

void add_return (goto_functionst::goto_functiont &, const source_locationt &)
 
- Protected Member Functions inherited from goto_convertt
void goto_convert_rec (const codet &code, goto_programt &dest)
 
void new_name (symbolt &symbol)
 
const symboltlookup (const irep_idt &identifier)
 
symboltnew_tmp_symbol (const typet &type, const std::string &suffix, goto_programt &dest, const source_locationt &)
 
symbol_exprt make_compound_literal (const exprt &expr, goto_programt &dest)
 
void clean_expr (exprt &expr, goto_programt &dest, bool result_is_used=true)
 
void clean_expr_address_of (exprt &expr, goto_programt &dest)
 
void make_temp_symbol (exprt &expr, const std::string &suffix, goto_programt &)
 
void rewrite_boolean (exprt &dest)
 re-write boolean operators into ?: More...
 
void remove_side_effect (side_effect_exprt &expr, goto_programt &dest, bool result_is_used)
 
void remove_push_catch (side_effect_exprt &expr, goto_programt &dest)
 
void remove_assignment (side_effect_exprt &expr, goto_programt &dest, bool result_is_used)
 
void remove_pre (side_effect_exprt &expr, goto_programt &dest, bool result_is_used)
 
void remove_post (side_effect_exprt &expr, goto_programt &dest, bool result_is_used)
 
void remove_function_call (side_effect_exprt &expr, goto_programt &dest, bool result_is_used)
 
void remove_cpp_new (side_effect_exprt &expr, goto_programt &dest, bool result_is_used)
 
void remove_cpp_delete (side_effect_exprt &expr, goto_programt &dest, bool result_is_used)
 
void remove_malloc (side_effect_exprt &expr, goto_programt &dest, bool result_is_used)
 
void remove_temporary_object (side_effect_exprt &expr, goto_programt &dest, bool result_is_used)
 
void remove_statement_expression (side_effect_exprt &expr, goto_programt &dest, bool result_is_used)
 
void remove_gcc_conditional_expression (exprt &expr, goto_programt &dest)
 
virtual void do_cpp_new (const exprt &lhs, const side_effect_exprt &rhs, goto_programt &dest)
 
void do_java_new (const exprt &lhs, const side_effect_exprt &rhs, goto_programt &dest)
 
void do_java_new_array (const exprt &lhs, const side_effect_exprt &rhs, goto_programt &dest)
 
void cpp_new_initializer (const exprt &lhs, const side_effect_exprt &rhs, goto_programt &dest)
 builds a goto program for object initialization after new More...
 
virtual void do_function_call (const exprt &lhs, const exprt &function, const exprt::operandst &arguments, goto_programt &dest)
 
virtual void do_function_call_if (const exprt &lhs, const if_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 More...
 
virtual void do_function_call_symbol (const symbolt &symbol)
 
virtual void do_function_call_other (const exprt &lhs, const exprt &function, const exprt::operandst &arguments, goto_programt &dest)
 
void convert_block (const code_blockt &code, goto_programt &dest)
 
void convert_decl (const code_declt &code, goto_programt &dest)
 
void convert_decl_type (const codet &code, goto_programt &dest)
 
void convert_expression (const code_expressiont &code, goto_programt &dest)
 
void convert_assign (const code_assignt &code, goto_programt &dest)
 
void convert_cpp_delete (const codet &code, goto_programt &dest)
 
void convert_loop_invariant (const codet &code, goto_programt::targett loop)
 
void convert_for (const code_fort &code, goto_programt &dest)
 
void convert_while (const code_whilet &code, goto_programt &dest)
 
void convert_dowhile (const codet &code, goto_programt &dest)
 
void convert_assume (const code_assumet &code, goto_programt &dest)
 
void convert_assert (const code_assertt &code, goto_programt &dest)
 
void convert_switch (const code_switcht &code, goto_programt &dest)
 
void convert_break (const code_breakt &code, goto_programt &dest)
 
void convert_return (const code_returnt &code, goto_programt &dest)
 
void convert_continue (const code_continuet &code, goto_programt &dest)
 
void convert_ifthenelse (const code_ifthenelset &code, goto_programt &dest)
 
void convert_init (const codet &code, goto_programt &dest)
 
void convert_goto (const codet &code, goto_programt &dest)
 
void convert_gcc_computed_goto (const codet &code, goto_programt &dest)
 
void convert_skip (const codet &code, goto_programt &dest)
 
void convert_non_deterministic_goto (const codet &code, goto_programt &dest)
 
void convert_label (const code_labelt &code, goto_programt &dest)
 
void convert_gcc_local_label (const codet &code, goto_programt &dest)
 
void convert_switch_case (const code_switch_caset &code, goto_programt &dest)
 
void convert_gcc_switch_case_range (const codet &code, goto_programt &dest)
 
void convert_function_call (const code_function_callt &code, goto_programt &dest)
 
void convert_specc_notify (const codet &code, goto_programt &dest)
 
void convert_specc_wait (const codet &code, goto_programt &dest)
 
void convert_specc_par (const codet &code, goto_programt &dest)
 
void convert_specc_event (const exprt &op, std::set< irep_idt > &events)
 
void convert_start_thread (const codet &code, goto_programt &dest)
 
void convert_end_thread (const codet &code, goto_programt &dest)
 
void convert_atomic_begin (const codet &code, goto_programt &dest)
 
void convert_atomic_end (const codet &code, goto_programt &dest)
 
void convert_bp_enforce (const codet &code, goto_programt &dest)
 
void convert_bp_abortif (const codet &code, goto_programt &dest)
 
void convert_msc_try_finally (const codet &code, goto_programt &dest)
 
void convert_msc_try_except (const codet &code, goto_programt &dest)
 
void convert_msc_leave (const codet &code, goto_programt &dest)
 
void convert_try_catch (const codet &code, goto_programt &dest)
 
void convert_java_try_catch (const codet &code, goto_programt &dest)
 
void convert_CPROVER_try_catch (const codet &code, goto_programt &dest)
 
void convert_CPROVER_try_finally (const codet &code, goto_programt &dest)
 
void convert_CPROVER_throw (const codet &code, goto_programt &dest)
 
void convert_asm (const code_asmt &code, goto_programt &dest)
 
void convert (const codet &code, goto_programt &dest)
 converts 'code' and appends the result to 'dest' More...
 
void copy (const codet &code, goto_program_instruction_typet type, goto_programt &dest)
 
symbol_exprt exception_flag ()
 
void unwind_destructor_stack (const source_locationt &, std::size_t stack_size, goto_programt &dest)
 
void unwind_destructor_stack (const source_locationt &, std::size_t stack_size, goto_programt &dest, destructor_stackt &stack)
 
void finish_gotos (goto_programt &dest)
 
void finish_computed_gotos (goto_programt &dest)
 
void finish_guarded_gotos (goto_programt &dest)
 For each if(x) goto z; goto y; z: emitted, see if any destructor statements were inserted between goto z and z, and if not, simplify into if(!x) goto y;. More...
 
exprt case_guard (const exprt &value, const caset &case_op)
 
void generate_ifthenelse (const exprt &cond, goto_programt &true_case, goto_programt &false_case, const source_locationt &, goto_programt &dest)
 if(guard) true_case; else false_case; More...
 
void generate_conditional_branch (const exprt &guard, goto_programt::targett target_true, goto_programt::targett target_false, const source_locationt &, goto_programt &dest)
 if(guard) goto target_true; else goto target_false; More...
 
void generate_conditional_branch (const exprt &guard, goto_programt::targett target_true, const source_locationt &, goto_programt &dest)
 
irep_idt get_string_constant (const exprt &expr)
 
bool get_string_constant (const exprt &expr, irep_idt &)
 
exprt get_constant (const exprt &expr)
 
void do_atomic_begin (const exprt &lhs, const exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
 
void do_atomic_end (const exprt &lhs, const exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
 
void do_create_thread (const exprt &lhs, const exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
 
void do_array_set (const exprt &lhs, const exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
 
void do_array_equal (const exprt &lhs, const exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
 
void do_array_op (const irep_idt &id, const exprt &lhs, const exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
 
void do_printf (const exprt &lhs, const exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
 
void do_scanf (const exprt &lhs, const exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
 
void do_input (const exprt &lhs, const exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
 
void do_output (const exprt &lhs, const exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
 
void do_prob_coin (const exprt &lhs, const exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
 
void do_prob_uniform (const exprt &lhs, const exprt &rhs, const exprt::operandst &arguments, goto_programt &dest)
 
exprt get_array_argument (const exprt &src)
 

Static Protected Member Functions

static bool hide (const goto_programt &goto_program)
 
- Static Protected Member Functions inherited from goto_convertt
static bool needs_cleaning (const exprt &expr)
 
static bool has_sideeffect (const exprt &expr)
 
static bool has_function_call (const exprt &expr)
 
static void replace_new_object (const exprt &object, exprt &dest)
 
static void collect_operands (const exprt &expr, const irep_idt &id, std::list< exprt > &dest)
 

Protected Attributes

goto_functionstfunctions
 
- Protected Attributes inherited from goto_convertt
symbol_tabletsymbol_table
 
namespacet ns
 
unsigned temporary_counter
 
std::string tmp_symbol_prefix
 
struct goto_convertt::targetst targets
 
guarded_gotost guarded_gotos
 
- Protected Attributes inherited from messaget
message_handlertmessage_handler
 
mstreamt mstream
 

Additional Inherited Members

- Public Types inherited from messaget
enum  message_levelt {
  M_ERROR =1, M_WARNING =2, M_RESULT =4, M_STATUS =6,
  M_STATISTICS =8, M_PROGRESS =9, M_DEBUG =10
}
 
- Static Public Member Functions inherited from messaget
static mstreamteom (mstreamt &m)
 
static mstreamtendl (mstreamt &m)
 
- Protected Types inherited from goto_convertt
typedef std::vector< codetdestructor_stackt
 
typedef std::map< irep_idt, std::pair< goto_programt::targett, destructor_stackt > > labelst
 
typedef std::list< std::pair< goto_programt::targett, destructor_stackt > > gotost
 
typedef std::list< goto_programt::targettcomputed_gotost
 
typedef exprt::operandst caset
 
typedef std::list< std::pair< goto_programt::targett, caset > > casest
 
typedef std::map< goto_programt::targett, casest::iterator > cases_mapt
 
typedef std::list< guarded_gototguarded_gotost
 

Detailed Description

Definition at line 39 of file goto_convert_functions.h.

Constructor & Destructor Documentation

§ goto_convert_functionst()

goto_convert_functionst::goto_convert_functionst ( symbol_tablet _symbol_table,
goto_functionst _functions,
message_handlert _message_handler 
)

Definition at line 22 of file goto_convert_functions.cpp.

§ ~goto_convert_functionst()

goto_convert_functionst::~goto_convert_functionst ( )
virtual

Definition at line 31 of file goto_convert_functions.cpp.

Member Function Documentation

§ add_return()

void goto_convert_functionst::add_return ( goto_functionst::goto_functiont f,
const source_locationt source_location 
)
protected

Definition at line 85 of file goto_convert_functions.cpp.

Referenced by convert_function().

§ convert_function()

§ goto_convert()

§ hide()

bool goto_convert_functionst::hide ( const goto_programt goto_program)
staticprotected

Definition at line 73 of file goto_convert_functions.cpp.

References forall_goto_program_instructions.

Referenced by convert_function().

Member Data Documentation

§ functions

goto_functionst& goto_convert_functionst::functions
protected

Definition at line 53 of file goto_convert_functions.h.

Referenced by convert_function(), and goto_convert().


The documentation for this class was generated from the following files: