29 out <<
"+uninitialized";
31 out <<
"+uses_offset";
33 out <<
"+dynamic_local";
35 out <<
"+dynamic_heap";
39 out <<
"+static_lifetime";
41 out <<
"+integer_address";
48 std::size_t max_index=
51 for(std::size_t i=0; i<max_index; i++)
65 it->second.type().id()!=ID_pointer ||
78 if(lhs.
id()==ID_symbol)
84 unsigned dest_pointer=
pointers.number(identifier);
86 loc_info_dest[dest_pointer]=rhs_flags;
89 else if(lhs.
id()==ID_dereference)
92 else if(lhs.
id()==ID_index)
96 else if(lhs.
id()==ID_member)
99 to_member_expr(lhs).struct_op(), rhs, loc_info_src, loc_info_dest);
101 else if(lhs.
id()==ID_typecast)
105 else if(lhs.
id()==ID_if)
116 local_cfgt::loc_mapt::const_iterator loc_it=
cfg.
loc_map.find(t);
127 if(rhs.
id()==ID_constant)
134 else if(rhs.
id()==ID_symbol)
139 unsigned src_pointer=
pointers.number(identifier);
140 return loc_info_src[src_pointer];
145 else if(rhs.
id()==ID_address_of)
149 if(
object.
id()==ID_symbol)
156 else if(
object.
id()==ID_index)
159 if(index_expr.
array().
id()==ID_symbol)
173 else if(rhs.
id()==ID_typecast)
177 else if(rhs.
id()==ID_uninitialized)
181 else if(rhs.
id()==ID_plus)
185 assert(rhs.
op0().
type().
id()==ID_pointer);
197 else if(rhs.
op1().
type().
id()==ID_pointer)
208 else if(rhs.
id()==ID_minus)
218 else if(rhs.
id()==ID_member)
222 else if(rhs.
id()==ID_index)
226 else if(rhs.
id()==ID_dereference)
230 else if(rhs.
id()==ID_side_effect)
235 if(statement==ID_allocate)
261 while(!work_queue.empty())
263 unsigned loc_nr=work_queue.top();
271 switch(instruction.
type)
277 code_assign.
lhs(), code_assign.
rhs(), loc_info_src, loc_info_dest);
286 exprt(ID_uninitialized),
297 exprt(ID_uninitialized),
309 code_function_call.
lhs(),
nil_exprt(), loc_info_src, loc_info_dest);
322 work_queue.push(succ);
336 out <<
"**** " << i_it->source_location <<
"\n";
341 p_it=loc_info.begin();
342 p_it!=loc_info.end();
345 out <<
" " <<
pointers[p_it-loc_info.begin()]
const if_exprt & to_if_expr(const exprt &expr)
Cast a generic exprt to an if_exprt.
const code_declt & to_code_decl(const codet &code)
static flagst mk_unknown()
bool is_uninitialized() const
bool is_dynamic_heap() const
bool is_static_lifetime() const
const code_deadt & to_code_dead(const codet &code)
goto_program_instruction_typet type
What kind of instruction?
void print(std::ostream &) const
bool is_tracked(const irep_idt &identifier)
Deprecated expression utility functions.
const irep_idt & get_identifier() const
flagst get_rec(const exprt &rhs, points_tot &loc_info_src)
static flagst mk_static_lifetime()
Field-insensitive, location-sensitive bitvector analysis.
const address_of_exprt & to_address_of_expr(const exprt &expr)
Cast a generic exprt to an address_of_exprt.
side_effect_exprt & to_side_effect_expr(exprt &expr)
This class represents an instruction in the GOTO intermediate representation.
static flagst mk_integer_address()
bool is_local(const irep_idt &identifier) const
const code_assignt & to_code_assign(const codet &code)
const irep_idt & id() const
A declaration of a local variable.
bool is_integer_address() const
static flagst mk_dynamic_local()
API to expression classes.
instructionst::const_iterator const_targett
bool is_dynamic_local() const
const member_exprt & to_member_expr(const exprt &expr)
Cast a generic exprt to a member_exprt.
data_typet::const_iterator const_iterator
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast a generic exprt to a symbol_exprt.
void output(std::ostream &out, const goto_functiont &goto_function, const namespacet &ns) const
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
static bool merge(points_tot &a, points_tot &b)
goto_programt::const_targett t
void assign_lhs(const exprt &lhs, const exprt &rhs, points_tot &loc_info_src, points_tot &loc_info_dest)
flagst get(const goto_programt::const_targett t, const exprt &src)
bool is_uses_offset() const
std::ostream & output_instruction(const namespacet &ns, const irep_idt &identifier, std::ostream &out, const instructionst::value_type &it) const
Output a single instruction.
numbering< irep_idt > pointers
Base class for all expressions.
static flagst mk_uses_offset()
static flagst mk_dynamic_heap()
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast a generic exprt to a typecast_exprt.
A removal of a local variable.
static flagst mk_uninitialized()
An expression containing a side effect.
std::stack< unsigned > work_queuet
#define forall_goto_program_instructions(it, program)
const index_exprt & to_index_expr(const exprt &expr)
Cast a generic exprt to an index_exprt.
const irep_idt & get_statement() const
const code_function_callt & to_code_function_call(const codet &code)