44 symbol.
name=identifier;
59 error() <<
"cpp_typecheckt::convert_parameter: symbol_table.move(\""
60 << symbol.
name <<
"\") failed" <<
eom;
75 for(code_typet::parameterst::iterator
76 it=parameters.begin();
94 error() <<
"function '" << symbol.
name <<
"' is initialized with "
181 code_typet::parameterst::const_iterator it=
184 if(it != parameters.end() && it->get_this())
186 const typet &pointer=it->type();
199 for(; it!=parameters.end(); it++)
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
symbol_table_baset & symbol_table
virtual void start_typecheck_code()
std::vector< parametert > parameterst
const parameterst & parameters() const
const typet & return_type() const
cpp_idt & put_into_scope(const symbolt &symbol, cpp_scopet &scope, bool is_friend=false)
cpp_scopet & set_scope(const irep_idt &identifier)
cpp_scopet & current_scope()
void typecheck_code(codet &) override
void convert_function(symbolt &symbol)
codet dtor(const symbolt &symb, const symbol_exprt &this_expr)
produces destructor code for a class object
std::unordered_set< irep_idt > deferred_typechecking
irep_idt function_identifier(const typet &type)
for function overloading
void convert_parameter(const irep_idt ¤t_mode, code_typet::parametert ¶meter)
void convert_parameters(const irep_idt ¤t_mode, code_typet &function_type)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
bool has_operands() const
Return true if there is at least one operand.
void copy_to_operands(const exprt &expr)
Copy the given argument to the end of exprt's operands.
typet & type()
Return the type of the expression.
bool get_bool(const irep_idt &name) const
const irep_idt & get(const irep_idt &name) const
const irep_idt & id() const
source_locationt source_location
mstreamt & result() const
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
Symbol table entry of function parameterThis is a symbol generated as part of type checking.
Expression to hold a symbol (variable)
virtual bool move(symbolt &symbol, symbolt *&new_symbol)=0
source_locationt location
Source code location of definition of symbol.
typet type
Type of symbol.
irep_idt name
The unique identifier.
irep_idt irep_idt base_name
Name of module the symbol belongs to.
exprt value
Initial value of symbol.
irep_idt mode
Language mode.
The type of an expression, extends irept.
const typet & template_subtype(const typet &type)
std::string cpp_type2name(const typet &type)
C++ Language Type Checking.
const std::string & id2string(const irep_idt &d)
bool is_reference(const typet &type)
Returns true if the type is a reference.
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
#define PRECONDITION(CONDITION)
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
const codet & to_code(const exprt &expr)
const multi_ary_exprt & to_multi_ary_expr(const exprt &expr)
Cast an exprt to a multi_ary_exprt.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.