Go to the documentation of this file.
32 symbol_tablet::symbolst::const_iterator s_it=
35 if(s_it==symbol_table.
symbols.end())
39 p.base_type().set(ID_C_constant,
true);
45 new_symbol.base_name=id;
46 new_symbol.type=function_type;
48 symbol_table.
insert(std::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";
70 index_exprt(function_id_string, from_integer(0, c_index_type()))),
71 to_code_type(s_it->second.type).parameters()[0].type())});
88 if(gf_entry.first ==
id)
113 if(gf_entry.first ==
id)
128 if(i_it->is_set_return_value())
142 assert(last->is_end_function());
145 bool has_set_return_value =
false;
151 if(before_last->is_set_return_value())
152 has_set_return_value =
true;
155 if(!has_set_return_value)
#define Forall_goto_program_instructions(it, program)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
static instructiont make_end_function(const source_locationt &l=source_locationt::nil())
targett add(instructiont &&instruction)
Adds a given instruction at the end.
function_mapt function_map
Expression to hold a symbol (variable)
static instructiont make_function_call(const code_function_callt &_code, const source_locationt &l=source_locationt::nil())
Create a function call instruction.
goto_instruction_codet representation of a function call statement.
targett insert_before(const_targett target)
Insertion before the instruction pointed-to by the given instruction iterator target.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
bool has_prefix(const std::string &s, const std::string &prefix)
const std::string & id2string(const irep_idt &d)
code_function_callt function_to_call(symbol_tablet &symbol_table, const irep_idt &id, const irep_idt &argument)
virtual std::pair< symbolt &, bool > insert(symbolt symbol) override
Author: Diffblue Ltd.
pointer_typet pointer_type(const typet &subtype)
void function_enter(goto_modelt &goto_model, const irep_idt &id)
const parameterst & parameters() const
bitvector_typet char_type()
instructionst instructions
The list of instructions in the goto program.
goto_functionst goto_functions
GOTO functions.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
A generic container class for the GOTO intermediate representation of one function.
void function_exit(goto_modelt &goto_model, const irep_idt &id)
void insert_before_swap(targett target)
Insertion that preserves jumps to "target".
This class represents an instruction in the GOTO intermediate representation.
symbol_tablet symbol_table
Symbol table.
irep_idt name
The unique identifier.
instructionst::iterator targett