22 #define forall_symbolptr_list(it, list) \ 23 for(symbolptr_listt::const_iterator it=(list).begin(); \ 24 it!=(list).end(); ++it) 26 #define Forall_symbolptr_list(it, list) \ 27 for(symbolptr_listt::iterator it=(list).begin(); \ 28 it!=(list).end(); ++it) 32 const std::string &module,
40 symbol_tablet::symbolst::const_iterator it2=
41 symbol_table.
symbols.find(it->second);
43 if(it2==symbol_table.
symbols.end())
51 symbolptr_list.push_back(&s);
54 if(symbolptr_list.empty())
59 else if(symbolptr_list.size()>=2)
61 message.
error() <<
"module `" << module <<
"' does not uniquely resolve:\n";
64 message.
error() <<
" " << (*it)->name <<
'\n';
72 return *symbolptr_list.front();
77 const std::string &module,
86 for(
const auto &symbol_pair : symbol_table.
symbols)
88 const symbolt &s = symbol_pair.second;
97 symbolptr_list.push_back(&s);
100 if(symbolptr_list.empty())
105 else if(symbolptr_list.size()>=2)
108 std::set<std::string> modules;
111 modules.insert(
id2string((*it)->pretty_name));
113 message.
error() <<
"multiple modules found, please select one:\n";
115 for(
const auto &s_it : modules)
116 message.
error() <<
" " << s_it <<
'\n';
124 const symbolt &symbol=*symbolptr_list.front();
const std::string & id2string(const irep_idt &d)
const symbol_base_mapt & symbol_base_map
const symbolt & get_module(const symbol_tablet &symbol_table, const std::string &module, message_handlert &message_handler)
irep_idt pretty_name
Language-specific display name.
Find module symbol using name.
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
static mstreamt & eom(mstreamt &m)
const irep_idt & id() const
const symbolt & get_module_by_name(const symbol_tablet &symbol_table, const std::string &module, message_handlert &message_handler)
#define forall_symbolptr_list(it, list)
std::list< const symbolt * > symbolptr_listt
typet type
Type of symbol.
mstreamt & status() const
#define forall_symbol_base_map(it, expr, base_name)
irep_idt base_name
Base (non-scoped) name.
goto_programt coverage_criteriont message_handlert & message_handler