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 ||
106 for(struct_typet::componentst::const_iterator
113 suffix+
"."+it->get_string(ID_name),
118 else if(t.
id()==ID_array)
132 std::list<value_set_fit::entryt> globals;
141 std::set<irep_idt> locals;
148 std::list<value_set_fit::entryt> entries;
156 std::list<value_set_fit::entryt> &dest)
161 if(symbol_pair.second.is_lvalue && symbol_pair.second.is_static_lifetime)
170 if(type.
id()==ID_pointer)
175 {
return true;
break; }
178 if(type.
id()==ID_pointer)
180 const typet *t = &type;
181 while(t->
id()==ID_pointer) t = &(t->
subtype());
183 return (t->
id()==ID_code);
192 else if(type.
id()==ID_struct ||
200 for(struct_typet::componentst::const_iterator
201 it=components.begin();
202 it!=components.end();
209 else if(type.
id()==ID_array)
211 else if(type.
id()==ID_symbol)
The type of an expression.
irep_idt name
The unique identifier.
const symbol_tablet & get_symbol_table() const
void get_local_identifiers(const goto_functiont &goto_function, std::set< irep_idt > &dest)
std::vector< componentt > componentst
const componentst & components() const
void add_vars(const goto_functionst &goto_functions)
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
void get_entries(const symbolt &symbol, std::list< value_set_fit::entryt > &dest)
std::set< irep_idt > decl_identifierst
const irep_idt & id() const
bool check_type(const typet &type)
instructionst instructions
The list of instructions in the goto program.
track_optionst track_options
virtual void initialize(const goto_programt &goto_program)
const typet & follow(const typet &) const
void get_decl_identifiers(decl_identifierst &decl_identifiers) const
get the variables in decl statements
void get_entries_rec(const irep_idt &identifier, const std::string &suffix, const typet &type, std::list< value_set_fit::entryt > &dest)
A generic container class for the GOTO intermediate representation of one function.
typet type
Type of symbol.
virtual void initialize(const goto_programt &goto_program)
Base type of C structs and unions, and C++ classes.
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a generic typet to a struct_union_typet.
goto_programt & goto_program
Value Set Propagation (flow insensitive)
const typet & subtype() const
#define forall_goto_functions(it, functions)
void get_globals(std::list< value_set_fit::entryt > &dest)
void add_vars(const std::list< entryt > &vars)
value_set_domain_fit state
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See namespace_baset::lookup().