cprover
language.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Abstract interface to support a programming language
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
11 
12 #include "language.h"
13 
14 #include "expr.h"
15 
16 bool languaget::final(symbol_tablet &symbol_table)
17 {
18  return false;
19 }
20 
22 {
23  return false;
24 }
25 
27  const std::string &module,
28  std::set<std::string> &modules)
29 {
30 }
31 
33  const exprt &expr,
34  std::string &code,
35  const namespacet &ns)
36 {
37  code=expr.pretty();
38  return false;
39 }
40 
42  const typet &type,
43  std::string &code,
44  const namespacet &ns)
45 {
46  code=type.pretty();
47  return false;
48 }
49 
51  const typet &type,
52  std::string &name,
53  const namespacet &ns)
54 {
55  // probably ansi-c/type2name could be used as better fallback if moved to
56  // util/
57  name=type.pretty();
58  return false;
59 }
The type of an expression.
Definition: type.h:20
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
Definition: irep.cpp:641
virtual bool type_to_name(const typet &type, std::string &name, const namespacet &ns)
Definition: language.cpp:50
virtual bool interfaces(symbol_tablet &symbol_table)
Definition: language.cpp:21
The symbol table.
Definition: symbol_table.h:52
TO_BE_DOCUMENTED.
Definition: namespace.h:62
Abstract interface to support a programming language.
virtual bool from_type(const typet &type, std::string &code, const namespacet &ns)
Definition: language.cpp:41
Base class for all expressions.
Definition: expr.h:46
virtual void dependencies(const std::string &module, std::set< std::string > &modules)
Definition: language.cpp:26
virtual bool from_expr(const exprt &expr, std::string &code, const namespacet &ns)
Definition: language.cpp:32
virtual bool final(symbol_tablet &symbol_table)
Definition: language.cpp:16