29 symbol_tablet::symbolst::const_iterator s_it=
32 if(s_it==symbol_table.
symbols.end())
46 new_symbol.
type=function_type;
48 symbol_table.
move(new_symbol);
50 s_it=symbol_table.
symbols.find(
id);
51 assert(s_it!=symbol_table.
symbols.end());
56 if(s_it->second.type.id()!=ID_code ||
60 std::string error=
"function `"+
id2string(
id)+
"' has wrong signature";
102 t->make_function_call(
104 t->function=f_it->first;
134 if(i_it->is_return())
136 goto_programt::instructiont call;
137 call.function=f_it->first;
138 call.make_function_call(
150 assert(last->is_end_function());
153 bool has_return=
false;
159 if(before_last->is_return())
165 goto_programt::instructiont call;
166 call.make_function_call(
168 call.function=f_it->first;
The type of an expression.
irep_idt name
The unique identifier.
Function Entering and Exiting.
targett add_instruction()
Adds an instruction at the end.
const std::string & id2string(const irep_idt &d)
pointer_typet pointer_type(const typet &subtype)
instructionst instructions
The list of instructions in the goto program.
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
void function_exit(symbol_tablet &symbol_table, goto_functionst &goto_functions, const irep_idt &id)
API to expression classes.
bitvector_typet index_type()
Operator to return the address of an object.
bool move(symbolt &symbol, symbolt *&new_symbol)
Move a symbol into the symbol table.
bool has_prefix(const std::string &s, const std::string &prefix)
targett insert_before(const_targett target)
Insertion before the given target.
A specialization of goto_program_templatet over goto programs in which instructions have codet type...
typet type
Type of symbol.
const parameterst & parameters() const
irep_idt base_name
Base (non-scoped) name.
#define Forall_goto_functions(it, functions)
void insert_before_swap(targett target)
Insertion that preserves jumps to "target".
const code_typet & to_code_type(const typet &type)
Cast a generic typet to a code_typet.
#define Forall_goto_program_instructions(it, program)
void function_enter(symbol_tablet &symbol_table, goto_functionst &goto_functions, const irep_idt &id)
Expression to hold a symbol (variable)
const typet & subtype() const
code_function_callt function_to_call(symbol_tablet &symbol_table, const irep_idt &id, const irep_idt &argument)
bitvector_typet char_type()
const typet & return_type() const
void set(const irep_namet &name, const irep_idt &value)
instructionst::iterator targett