39 typedef std::list<value_set_fit::entryt> entry_listt;
50 typedef std::unordered_map<irep_idt, entry_listt, irep_id_hash> 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)
160 if(it->second.is_lvalue &&
161 it->second.is_static_lifetime)
167 if(type.
id()==ID_pointer)
172 {
return true;
break; }
175 if(type.
id()==ID_pointer)
177 const typet *t = &type;
178 while(t->
id()==ID_pointer) t = &(t->
subtype());
180 return (t->
id()==ID_code);
189 else if(type.
id()==ID_struct ||
197 for(struct_typet::componentst::const_iterator
198 it=components.begin();
199 it!=components.end();
206 else if(type.
id()==ID_array)
208 else if(type.
id()==ID_symbol)
The type of an expression.
irep_idt name
The unique identifier.
const typet & follow(const typet &src) const
virtual bool lookup(const irep_idt &name, const symbolt *&symbol) const
#define forall_symbols(it, expr)
const symbol_tablet & get_symbol_table() const
instructionst instructions
The list of instructions in the goto program.
void get_local_identifiers(const goto_function_templatet< goto_programt > &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...
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a generic typet to a struct_union_typet.
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)
track_optionst track_options
virtual void initialize(const goto_programt &goto_program)
void get_decl_identifiers(decl_identifierst &decl_identifiers) const
void get_entries_rec(const irep_idt &identifier, const std::string &suffix, const typet &type, std::list< value_set_fit::entryt > &dest)
A specialization of goto_program_templatet over goto programs in which instructions have codet type...
typet type
Type of symbol.
virtual void initialize(const goto_programt &goto_program)
Base type of C structs and unions, and C++ classes.
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