ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
languages.h
Go to the documentation of this file.
1#ifndef CPROVER_LANGUAGES_H
2#define CPROVER_LANGUAGES_H
3
4#include <langapi/mode.h>
6
7class languagest final
8{
9 const namespacet &ns;
10 std::unique_ptr<languaget> language;
11
12public:
14 : ns(_ns), language(new_language(lang))
15 {
16 }
17
18 // conversion of expressions
19
21 const exprt &expr,
22 std::string &code,
24 {
25 return language->from_expr(expr, code, ns, target);
26 }
27
29 const typet &type,
30 std::string &code,
32 {
33 return language->from_type(type, code, ns, target);
34 }
35};
36
37#endif
Definition expr.h:34
bool from_expr(const exprt &expr, std::string &code, presentationt target=presentationt::HUMAN)
Definition languages.h:20
languagest(const namespacet &_ns, language_idt lang)
Definition languages.h:13
bool from_type(const typet &type, std::string &code, presentationt target=presentationt::HUMAN)
Definition languages.h:28
Definition namespace.h:10
Definition type.h:9
presentationt
Definition language.h:10
@ HUMAN
Definition language.h:11
std::unique_ptr< languaget > new_language(language_idt lang)
Definition mode.cpp:129
language_idt
Definition mode.h:11