Go to the documentation of this file.
39 typedef std::list<value_set_fit::entryt> entry_listt;
50 typedef std::unordered_map<irep_idt, entry_listt> entry_cachet;
51 entry_cachet entry_cache;
55 for(goto_programt::instructionst::const_iterator
62 for(goto_programt::decl_identifierst::const_iterator
68 entry_cachet::const_iterator e_it=entry_cache.find(*l_it);
70 if(e_it==entry_cache.end())
74 std::list<value_set_fit::entryt> &entries=entry_cache[*l_it];
86 std::list<value_set_fit::entryt> &dest)
93 const std::string &suffix,
95 std::list<value_set_fit::entryt> &dest)
99 if(t.
id()==ID_struct ||
105 identifier, suffix +
"." +
id2string(c.get_name()), c.type(), dest);
108 else if(t.
id()==ID_array)
122 std::list<value_set_fit::entryt> globals;
131 std::set<irep_idt> locals;
138 std::list<value_set_fit::entryt> entries;
146 std::list<value_set_fit::entryt> &dest)
151 if(symbol_pair.second.is_lvalue && symbol_pair.second.is_static_lifetime)
160 if(type.
id()==ID_pointer)
165 {
return true;
break; }
168 if(type.
id()==ID_pointer)
170 const typet *t = &type;
171 while(t->
id()==ID_pointer) t = &(t->
subtype());
173 return (t->
id()==ID_code);
182 else if(type.
id()==ID_struct ||
191 else if(type.
id()==ID_array)
193 else if(type.
id() == ID_struct_tag || type.
id() == ID_union_tag)
const componentst & components() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const typet & subtype() const
static hash_numbering< irep_idt, irep_id_hash > function_numbering
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
The type of an expression, extends irept.
void get_entries_rec(const irep_idt &identifier, const std::string &suffix, const typet &type, std::list< value_set_fit::entryt > &dest)
typet type
Type of symbol.
Base class for all expressions.
void get_decl_identifiers(decl_identifierst &decl_identifiers) const
get the variables in decl statements
unsigned from_target_index
virtual void initialize(const goto_programt &)
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
void initialize(const goto_programt &goto_program) override
const std::string & id2string(const irep_idt &d)
void get_value_set(const exprt &expr, std::list< exprt > &dest, const namespacet &ns) const
void get_globals(std::list< value_set_fit::entryt > &dest)
const irep_idt & id() const
void get_local_identifiers(const goto_functiont &goto_function, std::set< irep_idt > &dest)
Return in dest the identifiers of the local variables declared in the goto_function and the identifie...
Value Set Propagation (flow insensitive)
bool check_type(const typet &type)
@ TRACK_FUNCTION_POINTERS
instructionst instructions
The list of instructions in the goto program.
value_set_domain_fit state
A collection of goto functions.
goto_programt::const_targett locationt
const symbol_table_baset & get_symbol_table() const
Return first symbol table registered with the namespace.
const typet & follow(const typet &) const
Resolve type symbol to the type it points to.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
void get_entries(const symbolt &symbol, std::list< value_set_fit::entryt > &dest)
A generic container class for the GOTO intermediate representation of one function.
#define forall_goto_functions(it, functions)
void add_vars(const std::list< entryt > &vars)
void get_values(const irep_idt &function_id, locationt l, const exprt &expr, std::list< exprt > &dest) override
track_optionst track_options
void add_vars(const goto_functionst &goto_functions)
std::set< irep_idt > decl_identifierst
irep_idt name
The unique identifier.