Go to the documentation of this file.
21 const std::set<irep_idt> &alias_set)
23 if(lhs.
id()==ID_symbol)
29 for(
const auto &alias : alias_set)
43 std::set<irep_idt> &alias_set)
45 if(rhs.
id()==ID_symbol)
48 alias_set.insert(identifier);
50 for(
const auto &alias : alias_set)
52 alias_set.insert(alias);
54 else if(rhs.
id()==ID_if)
59 else if(rhs.
id()==ID_typecast)
63 else if(rhs.
id()==ID_address_of)
76 std::set<irep_idt> &alias_set)
78 if(rhs.
id()==ID_symbol)
81 alias_set.insert(
"&"+
id2string(identifier));
83 else if(rhs.
id()==ID_if)
88 else if(rhs.
id()==ID_dereference)
106 switch(instruction.
type)
112 std::set<irep_idt> rhs_aliases;
137 DATA_INVARIANT(
false,
"Exceptions must be removed before analysis");
153 DATA_INVARIANT(
false,
"Unclear what is a safe over-approximation of OTHER");
157 DATA_INVARIANT(
false,
"Only complete instructions can be analyzed");
188 out <<
"Aliases: " << *a_it1;
191 out <<
' ' << *a_it2;
226 if(cleanup_map.find(*it)==cleanup_map.end())
void assign_lhs_aliases(const exprt &, const std::set< irep_idt > &)
Populate list of aliases for a given identifier in a context in which an object is being written to.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
void isolate(typename numbering< T >::const_iterator it)
const code_declt & to_code_decl(const codet &code)
const if_exprt & to_if_expr(const exprt &expr)
Cast an exprt to an if_exprt.
goto_program_instruction_typet type
What kind of instruction?
A codet representing the declaration of a local variable.
Base class for all expressions.
bool merge(const global_may_alias_domaint &b, locationt from, locationt to)
Abstract Interpretation domain merge function.
const irep_idt & get_identifier() const
const T & find(typename numbering< T >::const_iterator it) const
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
const address_of_exprt & to_address_of_expr(const exprt &expr)
Cast an exprt to an address_of_exprt.
const std::string & id2string(const irep_idt &d)
codet code
Do not read or modify directly – use get_X() instead.
const code_deadt & to_code_dead(const codet &code)
const irep_idt & get_identifier() const
bool same_set(const T &a, const T &b) const
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const irep_idt & id() const
const char * to_string() const
A codet representing the removal of a local variable going out of scope.
bool is_root(const T &a) const
numbering_typet::const_iterator const_iterator
goto_programt::const_targett locationt
bool make_union(const T &a, const T &b)
const code_assignt & to_code_assign(const codet &code)
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
This is the basic interface of the abstract interpreter with default implementations of the core func...
const irep_idt & get_identifier() const
Field-insensitive, location-sensitive, over-approximative escape analysis.
void get_rhs_aliases_address_of(const exprt &, std::set< irep_idt > &)
Specialisation of global_may_alias_domaint::get_rhs_aliases to deal with address_of expressions.
A codet representing an assignment in the program.
This class represents an instruction in the GOTO intermediate representation.
void output(std::ostream &out, const ai_baset &ai, const namespacet &ns) const final override
Abstract Interpretation domain output function.
void transform(const irep_idt &function_from, locationt from, const irep_idt &function_to, locationt to, ai_baset &ai, const namespacet &ns) final override
Abstract Interpretation domain transform function.
void get_rhs_aliases(const exprt &, std::set< irep_idt > &)
Populate list of aliases for a given identifier in a context in which is an object is being read.