28 symbol_tablet::symbolst::const_iterator s_it=
31 if(s_it==symbol_table.
symbols.end())
41 new_symbol.base_name=id;
42 new_symbol.type=function_type;
44 symbol_table.
insert(std::move(new_symbol));
46 s_it=symbol_table.
symbols.find(
id);
47 assert(s_it!=symbol_table.
symbols.end());
52 if(s_it->second.type.id()!=ID_code ||
56 std::string error=
"function `"+
id2string(
id)+
"' has wrong signature";
97 t->make_function_call(
99 t->function=f_it->first;
128 if(i_it->is_return())
144 assert(last->is_end_function());
147 bool has_return=
false;
153 if(before_last->is_return())
irep_idt function
The function this instruction belongs to.
The type of an expression.
irep_idt name
The unique identifier.
Function Entering and Exiting.
const std::string & id2string(const irep_idt &d)
void insert_before_swap(targett target)
Insertion that preserves jumps to "target".
pointer_typet pointer_type(const typet &subtype)
targett insert_before(const_targett target)
Insertion before the given target.
const code_typet & to_code_type(const typet &type)
Cast a generic typet to a code_typet.
symbol_tablet symbol_table
Symbol table.
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
void make_function_call(const codet &_code)
This class represents an instruction in the GOTO intermediate representation.
instructionst::iterator targett
instructionst instructions
The list of instructions in the goto program.
API to expression classes.
void function_enter(goto_modelt &goto_model, const irep_idt &id)
bool has_prefix(const std::string &s, const std::string &prefix)
bitvector_typet index_type()
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
Operator to return the address of an object.
A generic container class for the GOTO intermediate representation of one function.
targett add_instruction()
Adds an instruction at the end.
const parameterst & parameters() const
#define Forall_goto_functions(it, functions)
#define Forall_goto_program_instructions(it, program)
Expression to hold a symbol (variable)
const typet & subtype() const
void function_exit(goto_modelt &goto_model, const irep_idt &id)
code_function_callt function_to_call(symbol_tablet &symbol_table, const irep_idt &id, const irep_idt &argument)
goto_functionst goto_functions
GOTO functions.
bitvector_typet char_type()
void set(const irep_namet &name, const irep_idt &value)
virtual std::pair< symbolt &, bool > insert(symbolt symbol) override
Author: Diffblue Ltd.