Go to the documentation of this file.
26 for(entriest::const_iterator it=
r_entries.begin();
30 out << it->second.object <<
" if "
31 <<
from_expr(
ns, it->second.object, it->second.guard) <<
'\n';
37 for(entriest::const_iterator it=
w_entries.begin();
41 out << it->second.object <<
" if "
42 <<
from_expr(
ns, it->second.object, it->second.guard) <<
'\n';
52 else if(
target->is_goto() ||
58 else if(
target->is_function_call())
63 for(code_function_callt::argumentst::const_iterator it =
64 target->call_arguments().begin();
65 it !=
target->call_arguments().end();
69 if(
target->call_lhs().is_not_nil())
84 const std::string &suffix,
87 if(expr.
id()==ID_symbol)
109 else if(expr.
id()==ID_member)
112 const std::string &component_name =
113 id2string(member_expr.get_component_name());
115 member_expr.compound(),
118 "." + component_name + suffix,
121 else if(expr.
id()==ID_index)
125 read_write_rec(index_expr.array(),
r, w,
"[]" + suffix, guard_conjuncts);
126 read(index_expr.index(), guard_conjuncts);
128 else if(expr.
id()==ID_dereference)
135 const std::set<exprt> aliases=local_may.
get(
target, expr);
136 for(std::set<exprt>::const_iterator it=aliases.begin();
140 #ifndef LOCAL_MAY_SOUND
141 if(it->id()==ID_unknown)
166 else if(expr.
id()==ID_typecast)
170 else if(expr.
id()==ID_address_of)
174 else if(expr.
id()==ID_if)
177 read(if_expr.cond(), guard_conjuncts);
180 true_guard.push_back(if_expr.cond());
184 false_guard.push_back(
not_exprt(if_expr.cond()));
196 if(
function.
id()==ID_symbol)
200 goto_functionst::function_mapt::const_iterator f_it =
210 for(goto_functionst::function_mapt::const_iterator
213 local_may(g_it->second);
232 else if(
function.
id()==ID_if)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const goto_functionst & goto_functions
exprt conjunction(const exprt::operandst &op)
1) generates a conjunction for two or more operands 2) for one operand, returns the operand 3) return...
const dereference_exprt & to_dereference_expr(const exprt &expr)
Cast an exprt to a dereference_exprt.
const index_exprt & to_index_expr(const exprt &expr)
Cast an exprt to an index_exprt.
const if_exprt & to_if_expr(const exprt &expr)
Cast an exprt to an if_exprt.
void assign(const exprt &lhs, const exprt &rhs)
const goto_programt::const_targett target
Base class for all expressions.
void compute_rec(const exprt &function)
void read(const exprt &expr)
function_mapt function_map
Expression to hold a symbol (variable)
virtual void reset_track_deref()
const irep_idt & get(const irep_idt &name) const
const irep_idt function_id
const std::string & id2string(const irep_idt &d)
#define forall_operands(it, expr)
const irep_idt & get_identifier() const
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const irep_idt & id() const
std::vector< exprt > operandst
virtual void track_deref(const entryt &, bool read)
void read_write_rec(const exprt &expr, bool r, bool w, const std::string &suffix, const exprt::operandst &guard_conjuncts)
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
void write(const exprt &expr)
A generic container class for the GOTO intermediate representation of one function.
const member_exprt & to_member_expr(const exprt &expr)
Cast an exprt to a member_exprt.
void dereference(const irep_idt &function_id, goto_programt::const_targett target, exprt &expr, const namespacet &ns, value_setst &value_sets)
Remove dereferences in expr using value_sets to determine to what objects the pointers may be pointin...
std::string from_expr(const namespacet &ns, const irep_idt &identifier, const exprt &expr)
void output(std::ostream &out) const
#define forall_goto_program_instructions(it, program)
virtual void set_track_deref()