cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
java_bytecode_internal_additions.cpp
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module:
4
5
Author: Daniel Kroening, kroening@kroening.com
6
7
\*******************************************************************/
8
9
#include "
java_bytecode_internal_additions.h
"
10
11
// For INFLIGHT_EXCEPTION_VARIABLE_NAME
12
#include "
java_types.h
"
13
#include "
remove_exceptions.h
"
14
15
#include <
util/c_types.h
>
16
#include <
util/pointer_expr.h
>
17
#include <
util/std_types.h
>
18
#include <
util/symbol_table_base.h
>
19
20
#include <
goto-programs/adjust_float_expressions.h
>
21
22
void
java_internal_additions
(
symbol_table_baset
&dest)
23
{
24
// add __CPROVER_rounding_mode
25
26
{
27
symbolt
symbol{
rounding_mode_identifier
(),
signed_int_type
(), ID_C};
28
symbol.
base_name
= symbol.
name
;
29
symbol.
is_lvalue
=
true
;
30
symbol.
is_state_var
=
true
;
31
symbol.
is_thread_local
=
true
;
32
dest.
add
(symbol);
33
}
34
35
{
36
auxiliary_symbolt
symbol{
37
INFLIGHT_EXCEPTION_VARIABLE_NAME
,
38
pointer_type
(
java_void_type
()),
39
ID_java};
40
symbol.
base_name
=
INFLIGHT_EXCEPTION_VARIABLE_BASENAME
;
41
symbol.
type
.
set
(ID_C_no_nondet_initialization,
true
);
42
symbol.
value
=
null_pointer_exprt
(
to_pointer_type
(symbol.
type
));
43
symbol.
is_static_lifetime
=
true
;
44
dest.
add
(symbol);
45
}
46
}
rounding_mode_identifier
irep_idt rounding_mode_identifier()
Return the identifier of the program symbol used to store the current rounding mode.
Definition
adjust_float_expressions.cpp:24
adjust_float_expressions.h
Symbolic Execution.
signed_int_type
signedbv_typet signed_int_type()
Definition
c_types.cpp:22
pointer_type
pointer_typet pointer_type(const typet &subtype)
Definition
c_types.cpp:235
c_types.h
auxiliary_symbolt
Internally generated symbol table entryThis is a symbol generated as part of translation to or modifi...
Definition
symbol.h:153
irept::set
void set(const irep_idt &name, const irep_idt &value)
Definition
irep.h:412
null_pointer_exprt
The null pointer constant.
Definition
pointer_expr.h:909
symbol_table_baset
The symbol table base class interface.
Definition
symbol_table_base.h:23
symbol_table_baset::add
bool add(const symbolt &symbol)
Add a new symbol to the symbol table.
Definition
symbol_table_base.cpp:18
symbolt
Symbol table entry.
Definition
symbol.h:28
symbolt::base_name
irep_idt base_name
Base (non-scoped) name.
Definition
symbol.h:46
symbolt::is_static_lifetime
bool is_static_lifetime
Definition
symbol.h:70
symbolt::is_thread_local
bool is_thread_local
Definition
symbol.h:71
symbolt::is_state_var
bool is_state_var
Definition
symbol.h:66
symbolt::type
typet type
Type of symbol.
Definition
symbol.h:31
symbolt::name
irep_idt name
The unique identifier.
Definition
symbol.h:40
symbolt::is_lvalue
bool is_lvalue
Definition
symbol.h:72
symbolt::value
exprt value
Initial value of symbol.
Definition
symbol.h:34
java_internal_additions
void java_internal_additions(symbol_table_baset &dest)
Definition
java_bytecode_internal_additions.cpp:22
java_bytecode_internal_additions.h
java_void_type
empty_typet java_void_type()
Definition
java_types.cpp:37
java_types.h
pointer_expr.h
API to expression classes for Pointers.
to_pointer_type
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
Definition
pointer_expr.h:93
remove_exceptions.h
Remove function exceptional returns.
INFLIGHT_EXCEPTION_VARIABLE_BASENAME
#define INFLIGHT_EXCEPTION_VARIABLE_BASENAME
Definition
remove_exceptions.h:25
INFLIGHT_EXCEPTION_VARIABLE_NAME
#define INFLIGHT_EXCEPTION_VARIABLE_NAME
Definition
remove_exceptions.h:26
std_types.h
Pre-defined types.
symbol_table_base.h
Author: Diffblue Ltd.
jbmc
src
java_bytecode
java_bytecode_internal_additions.cpp
Generated by
1.17.0