Go to the documentation of this file.
29 std::set<dereference_exprt> &dest)
32 if(e.
id() == ID_dereference)
39 const exprt &mm_io_r_value,
44 for(goto_programt::instructionst::iterator it=
45 goto_function.body.instructions.begin();
46 it!=goto_function.body.instructions.end();
49 std::set<dereference_exprt> deref_expr_w, deref_expr_r;
53 auto &a_lhs = it->assign_lhs();
54 auto &a_rhs = it->assign_rhs_nonconst();
59 if(deref_expr_r.size()==1)
81 goto_function.body.insert_before_swap(it, call);
88 if(a_lhs.id() == ID_dereference)
103 goto_function.body.insert_before_swap(it);
121 auto maybe_symbol=symbol_table.
lookup(id_r);
124 mm_io_r=maybe_symbol->symbol_expr();
130 maybe_symbol->location,
134 mm_io_r_value = value_symbol.symbol_expr();
137 maybe_symbol=symbol_table.
lookup(id_w);
142 mm_io(mm_io_r, mm_io_r_value, mm_io_w, f.second, ns);
void mm_io(const exprt &mm_io_r, const exprt &mm_io_r_value, const exprt &mm_io_w, goto_functionst::goto_functiont &goto_function, const namespacet &ns)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
static exprt conditional_cast(const exprt &expr, const typet &type)
const dereference_exprt & to_dereference_expr(const exprt &expr)
Cast an exprt to a dereference_exprt.
#define CHECK_RETURN(CONDITION)
The type of an expression, extends irept.
Operator to dereference a pointer.
The trinary if-then-else operator.
Base class for all expressions.
function_mapt function_map
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
static instructiont make_function_call(const code_function_callt &_code, const source_locationt &l=source_locationt::nil())
Create a function call instruction.
typet & type()
Return the type of the expression.
goto_instruction_codet representation of a function call statement.
void collect_deref_expr(const exprt &src, std::set< dereference_exprt > &dest)
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
const std::string & id2string(const irep_idt &d)
class symbol_exprt symbol_expr() const
Produces a symbol_exprt for a symbol.
exprt integer_address(const exprt &pointer)
const irep_idt & id() const
const parameterst & parameters() const
::goto_functiont goto_functiont
A collection of goto functions.
goto_functionst goto_functions
GOTO functions.
bool replace_expr(const exprt &what, const exprt &by, exprt &dest)
void visit_pre(std::function< void(exprt &)>)
const symbolt * lookup(const irep_idt &name) const
Find a symbol in the symbol table for read-only access.
const typet & return_type() const
optionalt< exprt > size_of_expr(const typet &type, const namespacet &ns)
Semantic type conversion.
symbol_tablet symbol_table
Symbol table.
symbolt & get_fresh_aux_symbol(const typet &type, const std::string &name_prefix, const std::string &basename_prefix, const source_locationt &source_location, const irep_idt &symbol_mode, const namespacet &ns, symbol_table_baset &symbol_table)
Installs a fresh-named symbol with respect to the given namespace ns with the requested name pattern ...