Go to the documentation of this file.
40 std::unique_ptr<languaget> ptr;
56 out << symbol.
name <<
" " << type_str <<
'\n';
64 out <<
'\n' <<
"Symbols:" <<
'\n' <<
'\n';
73 std::unique_ptr<languaget> ptr;
87 std::string type_str, value_str;
95 out <<
"Symbol......: " << symbol.
name <<
'\n' << std::flush;
96 out <<
"Pretty name.: " << symbol.
pretty_name <<
'\n';
97 out <<
"Module......: " << symbol.
module <<
'\n';
98 out <<
"Base name...: " << symbol.
base_name <<
'\n';
99 out <<
"Mode........: " << symbol.
mode <<
'\n';
100 out <<
"Type........: " << type_str <<
'\n';
101 out <<
"Value.......: " << value_str <<
'\n';
102 out <<
"Flags.......:";
107 out <<
" static_lifetime";
109 out <<
" thread_local";
111 out <<
" file_local";
138 out <<
"Location....: " << symbol.
location <<
'\n';
140 out <<
'\n' << std::flush;
157 for(
const auto &id_and_symbol : symbol_table.
symbols)
159 const symbolt &symbol = id_and_symbol.second;
161 std::unique_ptr<languaget> ptr;
175 std::string type_str, value_str;
231 for(
const auto &id_and_symbol : symbol_table.
symbols)
233 const symbolt &symbol = id_and_symbol.second;
235 std::unique_ptr<languaget> ptr;
249 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...
virtual json_stream_arrayt & get_json_stream()
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.
Abstract interface to support a programming language.
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)
json_stream_objectt & push_back_stream_object()
Add a JSON object child stream.
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.
std::unique_ptr< languaget > get_default_language()
Returns the default language.