cprover
ansi_c_entry_point.cpp File Reference
Include dependency graph for ansi_c_entry_point.cpp:

Go to the source code of this file.

Functions

exprt::operandst build_function_environment (const code_typet::parameterst &parameters, code_blockt &init_code, symbol_tablet &symbol_table)
 
void record_function_outputs (const symbolt &function, code_blockt &init_code, symbol_tablet &symbol_table)
 
bool ansi_c_entry_point (symbol_tablet &symbol_table, message_handlert &message_handler)
 
bool generate_ansi_c_start_function (const symbolt &symbol, symbol_tablet &symbol_table, message_handlert &message_handler)
 Generate a _start function for a specific function. More...
 

Function Documentation

◆ ansi_c_entry_point()

◆ build_function_environment()

◆ generate_ansi_c_start_function()

bool generate_ansi_c_start_function ( const symbolt symbol,
symbol_tablet symbol_table,
message_handlert message_handler 
)

Generate a _start function for a specific function.

Parameters
symbolThe symbol for the function that should be used as the entry point
symbol_tableThe symbol table for the program. The new _start function symbol will be added to this table
message_handlerThe message handler
Returns
Returns false if the _start method was generated correctly

Definition at line 194 of file ansi_c_entry_point.cpp.

References symbol_table_baset::add(), exprt::add_source_location(), configt::ansi_c, code_function_callt::arguments(), symbolt::base_name, build_function_environment(), config, goto_functionst::entry_point(), messaget::eom(), messaget::error(), from_integer(), code_function_callt::function(), irept::id(), index_type(), INITIALIZE_FUNCTION, symbol_tablet::insert(), configt::ansi_ct::int_width, irept::is_nil(), symbolt::is_static_lifetime, unsignedbv_typet::largest(), signedbv_typet::largest(), code_function_callt::lhs(), symbolt::location, namespacet::lookup(), irept::make_nil(), message_handler, symbolt::mode, exprt::move_to_operands(), symbolt::name, exprt::op0(), exprt::op1(), exprt::operands(), code_typet::parameters(), pointer_type(), power(), PRECONDITION, record_function_outputs(), code_typet::return_type(), irept::set(), messaget::set_message_handler(), typet::subtype(), irept::swap(), symbolt::symbol_expr(), symbol_table_baset::symbols, to_code_type(), to_pointer_type(), to_signedbv_type(), to_unsignedbv_type(), symbolt::type, exprt::type(), UNREACHABLE, and symbolt::value.

Referenced by ansi_c_entry_point().

◆ record_function_outputs()