27 std::unique_ptr<languaget> language = (mode == ID_unknown)
31 language,
"could not retrieve language for mode '" +
id2string(mode) +
"'");
34 language->from_expr(expr, result, ns);
47 p->from_expr(expr, result, ns);
60 p->from_type(type, result, ns);
73 p->type_to_name(type, result, ns);
93 const std::string &src)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
irep_idt module
Name of module the symbol belongs to.
The type of an expression, extends irept.
const std::string & id2string(const irep_idt &d)
Abstract interface to support a programming language.
std::string from_expr(const namespacet &ns, const irep_idt &identifier, const exprt &expr)
exprt to_expr(const namespacet &ns, const irep_idt &identifier, const std::string &src)
std::string type_to_name(const namespacet &ns, const irep_idt &identifier, const typet &type)
std::string from_expr_using_mode(const namespacet &ns, const irep_idt &mode, const exprt &expr)
Formats an expression using the given namespace, using the given mode to retrieve the language printe...
std::string from_type(const namespacet &ns, const irep_idt &identifier, const typet &type)
std::unique_ptr< languaget > get_language_from_identifier(const namespacet &ns, const irep_idt &identifier)
Get the language corresponding to the mode of the given identifier's symbol.
std::unique_ptr< languaget > get_language_from_mode(const irep_idt &mode)
Get the language corresponding to the given mode.
std::unique_ptr< languaget > get_default_language()
Returns the default language.
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
API to expression classes.
null_message_handlert null_message_handler