Go to the documentation of this file.
35 static std::unique_ptr<languaget>
40 return language_from_mode;
66 out << symbol.
name <<
" " << type_str <<
'\n';
74 out <<
'\n' <<
"Symbols:" <<
'\n' <<
'\n';
85 std::string type_str, value_str;
93 out <<
"Symbol......: " << symbol.
name <<
'\n' << std::flush;
95 out <<
"Module......: " << symbol.
module <<
'\n';
97 out <<
"Mode........: " << symbol.
mode <<
'\n';
98 out <<
"Type........: " << type_str <<
'\n';
99 out <<
"Value.......: " << value_str <<
'\n';
100 out <<
"Flags.......:";
105 out <<
" static_lifetime";
107 out <<
" thread_local";
109 out <<
" file_local";
136 out <<
"Location....: " << symbol.
location <<
'\n';
138 out <<
'\n' << std::flush;
155 for(
const auto &id_and_symbol : symbol_table.
symbols)
157 const symbolt &symbol = id_and_symbol.second;
161 std::string type_str, value_str;
217 for(
const auto &id_and_symbol : symbol_table.
symbols)
219 const symbolt &symbol = id_and_symbol.second;
223 std::string type_str, value_str;
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
void show_symbol_table_xml_ui()
typet type
Type of symbol.
std::vector< irep_idt > sorted_symbol_names() const
Build and return a lexicographically sorted vector of symbol names from all symbols stored in this sy...
std::unique_ptr< languaget > get_language_from_mode(const irep_idt &mode)
Get the language corresponding to the given mode.
irep_idt base_name
Base (non-scoped) name.
void show_symbol_table(const symbol_tablet &symbol_table, ui_message_handlert &ui)
irep_idt pretty_name
Language-specific display name.
virtual uit get_ui() const
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
static std::unique_ptr< languaget > get_show_symbol_language(const symbolt &symbol)
Gets the language which should be used for showing the type and value of the supplied symbol.
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
irep_idt mode
Language mode.
void show_symbol_table_brief(const symbol_tablet &symbol_table, ui_message_handlert &ui)
const std::string & id2string(const irep_idt &d)
virtual bool from_type(const typet &type, std::string &code, const namespacet &ns)
Formats the given type in a language-specific way.
virtual bool from_expr(const exprt &expr, std::string &code, const namespacet &ns)
Formats the given expression in a language-specific way.
json_stream_objectt & push_back_stream_object(const std::string &key)
Add a JSON object stream for a specific key.
Provides methods for streaming JSON arrays.
json_objectt convert_from_irep(const irept &) const
To convert to JSON from an irep structure by recursively generating JSON for the different sub trees.
static void show_symbol_table_brief_json_ui(const symbol_tablet &symbol_table, ui_message_handlert &message_handler)
void show_symbol_table_brief_plain(const symbol_tablet &symbol_table, std::ostream &out)
Provides methods for streaming JSON objects.
exprt value
Initial value of symbol.
source_locationt location
Source code location of definition of symbol.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
void show_symbol_table_plain(const symbol_tablet &symbol_table, std::ostream &out)
static void show_symbol_table_json_ui(const symbol_tablet &symbol_table, ui_message_handlert &message_handler)
irep_idt module
Name of module the symbol belongs to.
void push_back(const std::string &key, const jsont &json)
Push back a JSON element into the current object stream.
static jsont json_boolean(bool value)
symbol_tablet symbol_table
Symbol table.
irep_idt name
The unique identifier.
message_handlert * message_handler
std::unique_ptr< languaget > get_default_language()
Returns the default language.