cprover
|
#include "ansi_c_entry_point.h"
#include <cassert>
#include <cstdlib>
#include <util/namespace.h>
#include <util/std_expr.h>
#include <util/arith_tools.h>
#include <util/std_code.h>
#include <util/config.h>
#include <util/cprover_prefix.h>
#include <util/prefix.h>
#include <util/c_types.h>
#include <ansi-c/string_constant.h>
#include <goto-programs/goto_functions.h>
#include <linking/static_lifetime_init.h>
#include "c_nondet_symbol_factory.h"
Go to the source code of this file.
Functions | |
exprt::operandst | build_function_environment (const code_typet::parameterst ¶meters, code_blockt &init_code, symbol_tablet &symbol_table, message_handlert &message_handler) |
void | record_function_outputs (const symbolt &function, code_blockt &init_code, symbol_tablet &symbol_table) |
bool | ansi_c_entry_point (symbol_tablet &symbol_table, const std::string &standard_main, message_handlert &message_handler) |
bool ansi_c_entry_point | ( | symbol_tablet & | symbol_table, |
const std::string & | standard_main, | ||
message_handlert & | message_handler | ||
) |
Definition at line 121 of file ansi_c_entry_point.cpp.
References symbol_tablet::add(), exprt::add_source_location(), configt::ansi_c, code_function_callt::arguments(), symbolt::base_name, build_function_environment(), config, exprt::copy_to_operands(), CPROVER_PREFIX, goto_functions_templatet< goto_programt >::entry_point(), messaget::eom(), messaget::error(), forall_symbol_base_map, from_integer(), code_function_callt::function(), irept::id(), id2string(), index_type(), INITIALIZE_FUNCTION, 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(), configt::main, irept::make_nil(), symbolt::mode, symbol_tablet::move(), exprt::move_to_operands(), symbolt::name, exprt::op0(), exprt::op1(), exprt::operands(), code_typet::parameters(), pointer_type(), power(), record_function_outputs(), code_typet::return_type(), irept::set(), messaget::set_message_handler(), codet::set_statement(), static_lifetime_init(), typet::subtype(), irept::swap(), symbol_tablet::symbol_base_map, symbolt::symbol_expr(), symbol_tablet::symbols, to_code_type(), to_pointer_type(), to_signedbv_type(), to_unsignedbv_type(), symbolt::type, exprt::type(), and symbolt::value.
Referenced by ansi_c_languaget::final(), cpp_languaget::final(), and compilet::link().
exprt::operandst build_function_environment | ( | const code_typet::parameterst & | parameters, |
code_blockt & | init_code, | ||
symbol_tablet & | symbol_table, | ||
message_handlert & | message_handler | ||
) |
Definition at line 30 of file ansi_c_entry_point.cpp.
References c_nondet_symbol_factory(), dstringt::empty(), code_typet::parametert::get_base_name(), exprt::source_location(), and exprt::type().
Referenced by ansi_c_entry_point().
void record_function_outputs | ( | const symbolt & | function, |
code_blockt & | init_code, | ||
symbol_tablet & | symbol_table | ||
) |
Definition at line 60 of file ansi_c_entry_point.cpp.
References exprt::add_source_location(), symbolt::base_name, from_integer(), irept::id(), index_type(), symbol_tablet::lookup(), exprt::move_to_operands(), exprt::op0(), exprt::op1(), exprt::operands(), code_typet::return_type(), symbolt::symbol_expr(), to_code_type(), and symbolt::type.
Referenced by ansi_c_entry_point().