24 std::set<dereference_exprt> &dest)
26 if(src.
id()==ID_dereference)
29 for(
const auto & op : src.
operands())
39 for(goto_programt::instructionst::iterator it=
40 goto_function.body.instructions.begin();
41 it!=goto_function.body.instructions.end();
44 std::set<dereference_exprt> deref_expr_w, deref_expr_r;
53 if(deref_expr_r.size()==1)
72 goto_function.body.insert_before_swap(it);
73 it->make_function_call(fc);
75 it->function=
function;
82 if(a.lhs().id()==ID_dereference)
97 goto_function.body.insert_before_swap(it);
98 it->make_function_call(fc);
100 it->function=
function;
118 auto maybe_symbol=symbol_table.
lookup(id_r);
120 mm_io_r=maybe_symbol->symbol_expr();
122 maybe_symbol=symbol_table.
lookup(id_w);
127 mm_io(mm_io_r, mm_io_w, f.second, ns);
The type of an expression, extends irept.
exprt size_of_expr(const typet &type, const namespacet &ns)
Semantic type conversion.
const std::string & id2string(const irep_idt &d)
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 irep_idt & get_identifier() const
The trinary if-then-else operator.
function_mapt function_map
typet & type()
Return the type of the expression.
symbol_tablet symbol_table
Symbol table.
const dereference_exprt & to_dereference_expr(const exprt &expr)
Cast an exprt to a dereference_exprt.
const code_assignt & to_code_assign(const codet &code)
Perform Memory-mapped I/O instrumentation.
const irep_idt & id() const
bool replace_expr(const exprt &what, const exprt &by, exprt &dest)
class symbol_exprt symbol_expr() const
Produces a symbol_exprt for a symbol.
Operator to dereference a pointer.
exprt integer_address(const exprt &pointer)
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
::goto_functiont goto_functiont
codet representation of a function call statement.
A collection of goto functions.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
Various predicates over pointers in programs.
Base class for all expressions.
const parameterst & parameters() const
const source_locationt & source_location() const
Expression to hold a symbol (variable)
#define RETURN_VALUE_SUFFIX
const symbolt * lookup(const irep_idt &name) const
Find a symbol in the symbol table for read-only access.
void mm_io(const exprt &mm_io_r, const exprt &mm_io_w, goto_functionst::goto_functiont &goto_function, const namespacet &ns)
goto_functionst goto_functions
GOTO functions.
const typet & return_type() const