CBMC
language_util.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Daniel Kroening, kroening@cs.cmu.edu
6 
7 \*******************************************************************/
8 
9 
10 #ifndef CPROVER_LANGAPI_LANGUAGE_UTIL_H
11 #define CPROVER_LANGAPI_LANGUAGE_UTIL_H
12 
13 #include <util/irep.h>
14 
15 class exprt;
16 class namespacet;
17 class typet;
18 
21 std::string from_expr_using_mode(
22  const namespacet &ns,
23  const irep_idt &mode,
24  const exprt &expr);
25 
26 std::string from_expr(
27  const namespacet &ns,
28  const irep_idt &identifier,
29  const exprt &expr);
30 
31 std::string from_expr(const exprt &expr);
32 
33 std::string from_type(
34  const namespacet &ns,
35  const irep_idt &identifier,
36  const typet &type);
37 
38 std::string from_type(const typet &type);
39 
41  const namespacet &ns,
42  const irep_idt &identifier,
43  const std::string &src);
44 
45 std::string type_to_name(
46  const namespacet &ns,
47  const irep_idt &identifier,
48  const typet &type);
49 
50 std::string type_to_name(const typet &type);
51 
52 #endif // CPROVER_LANGAPI_LANGUAGE_UTIL_H
dstringt
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:36
typet
The type of an expression, extends irept.
Definition: type.h:28
type_to_name
std::string type_to_name(const namespacet &ns, const irep_idt &identifier, const typet &type)
Definition: language_util.cpp:64
exprt
Base class for all expressions.
Definition: expr.h:55
from_expr_using_mode
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...
Definition: language_util.cpp:21
namespacet
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition: namespace.h:90
from_type
std::string from_type(const namespacet &ns, const irep_idt &identifier, const typet &type)
Definition: language_util.cpp:51
from_expr
std::string from_expr(const namespacet &ns, const irep_idt &identifier, const exprt &expr)
Definition: language_util.cpp:38
to_expr
exprt to_expr(const namespacet &ns, const irep_idt &identifier, const std::string &src)
Definition: language_util.cpp:89
irep.h