26 std::map<unsigned, goto_programt::targett> loop_map;
28 for(loopt::const_iterator l_it=loop.begin();
31 loop_map[(*l_it)->location_number]=*l_it;
46 local_may_alias, t, lhs, assigns, [](
const exprt &e) {
return true; });
54 std::function<
bool(
const exprt &)> predicate)
58 if(lhs.
id() == ID_symbol || lhs.
id() == ID_index)
61 new_assigns.insert(lhs);
63 else if(lhs.
id() == ID_member)
69 if(op.id() == ID_symbol)
71 new_assigns.insert(lhs);
75 else if(op.id() == ID_dereference)
78 for(
const auto &mod : local_may_alias.
get(t, ptr.
pointer))
80 if(mod.id() == ID_unknown)
84 const exprt typed_mod =
101 new_assigns.insert(to_insert);
105 else if(lhs.
id() == ID_dereference)
109 for(
const auto &mod : local_may_alias.
get(t, ptr.
pointer))
111 if(mod.id() == ID_unknown)
115 const exprt typed_mod =
122 new_assigns.insert(std::move(to_insert));
125 else if(lhs.
id() == ID_if)
130 local_may_alias, t, if_expr.
true_case(), assigns, predicate);
132 local_may_alias, t, if_expr.
false_case(), assigns, predicate);
138 std::inserter(assigns, assigns.begin()),
148 local_may_alias, loop, assigns, [](
const exprt &e) {
return true; });
155 std::function<
bool(
const exprt &)> predicate)
157 for(loopt::const_iterator i_it = loop.begin(); i_it != loop.end(); i_it++)
Operator to dereference a pointer.
Base class for all expressions.
typet & type()
Return the type of the expression.
This class represents an instruction in the GOTO intermediate representation.
const exprt & call_lhs() const
Get the lhs of a FUNCTION_CALL (may be nil)
bool is_function_call() const
const exprt & assign_lhs() const
Get the lhs of the assignment for ASSIGN.
instructionst::iterator targett
instructionst::const_iterator const_targett
The trinary if-then-else operator.
const irep_idt & id() const
std::set< exprt > get(const goto_programt::const_targett t, const exprt &src) const
Extract member of struct or union.
const exprt & struct_op() const
irep_idt get_component_name() const
The plus expression Associativity is not specified.
static exprt conditional_cast(const exprt &expr, const typet &type)
std::set< exprt > assignst
Field-insensitive, location-sensitive may-alias analysis.
void get_assigns_lhs(const local_may_aliast &local_may_alias, goto_programt::const_targett t, const exprt &lhs, assignst &assigns)
goto_programt::targett get_loop_exit(const loopt &loop)
void get_assigns(const local_may_aliast &local_may_alias, const loopt &loop, assignst &assigns)
Helper functions for k-induction and loop invariants.
natural_loops_mutablet::natural_loopt loopt
API to expression classes for Pointers.
const dereference_exprt & to_dereference_expr(const exprt &expr)
Cast an exprt to a dereference_exprt.
#define PRECONDITION(CONDITION)
API to expression classes.
const if_exprt & to_if_expr(const exprt &expr)
Cast an exprt to an if_exprt.
const member_exprt & to_member_expr(const exprt &expr)
Cast an exprt to a member_exprt.