forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexpr2java.h
65 lines (51 loc) · 1.82 KB
/
expr2java.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*******************************************************************\
Module:
Author: Daniel Kroening, kroening@cs.cmu.edu
\*******************************************************************/
#ifndef CPROVER_JAVA_BYTECODE_EXPR2JAVA_H
#define CPROVER_JAVA_BYTECODE_EXPR2JAVA_H
#include <string>
#include <ansi-c/expr2c_class.h>
class exprt;
class namespacet;
class typet;
class expr2javat:public expr2ct
{
public:
explicit expr2javat(const namespacet &_ns):expr2ct(_ns) { }
virtual std::string convert(const exprt &src)
{
return expr2ct::convert(src);
}
virtual std::string convert(const typet &src)
{
return expr2ct::convert(src);
}
protected:
virtual std::string convert(const exprt &src, unsigned &precedence);
virtual std::string convert_java_this(const exprt &src, unsigned precedence);
virtual std::string convert_java_instanceof(
const exprt &src,
unsigned precedence);
virtual std::string convert_java_new(const exprt &src, unsigned precedence);
virtual std::string convert_code_java_delete(
const exprt &src,
unsigned precedence);
virtual std::string convert_struct(const exprt &src, unsigned &precedence);
virtual std::string convert_code(const codet &src, unsigned indent);
virtual std::string convert_constant(
const constant_exprt &src,
unsigned &precedence);
virtual std::string convert_code_function_call(
const code_function_callt &src,
unsigned indent);
virtual std::string convert_rec(
const typet &src,
const c_qualifierst &qualifiers,
const std::string &declarator);
// length of string representation of Java Char
const std::size_t char_representation_length=14;
};
std::string expr2java(const exprt &expr, const namespacet &ns);
std::string type2java(const typet &type, const namespacet &ns);
#endif // CPROVER_JAVA_BYTECODE_EXPR2JAVA_H