Newer
Older
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
[kernel] Parsing tests/basic/aggregate.cpp (external front-end)
Now output intermediate result
[eva] Analyzing a complete application starting at main
[eva] Computing initial state
[eva] Initial state computed
[eva:initial-state] Values of globals at initialization
_frama_c_rtti_name_info.name ∈ {{ "A" }}
{.base_classes; .number_of_base_classes; .pvmt} ∈
{0}
_frama_c_rtti_name_info.name ∈ {{ "B" }}
{.base_classes; .number_of_base_classes; .pvmt} ∈
{0}
a[0..1] ∈ {0}
b[0].x ∈ {7}
[0].y ∈ {0}
[1].x ∈ {14}
[1].y ∈ {0}
b1[0].x ∈ {28}
[0].y ∈ {43}
[1] ∈ {0}
[eva] done for function main
[eva] ====== VALUES COMPUTED ======
[eva:final-states] Values at end of function main:
__retres ∈ {57}
/* Generated by Frama-C */
struct _frama_c_vmt_content {
void (*method_ptr)() ;
int shift_this ;
};
struct _frama_c_rtti_name_info_node;
struct _frama_c_vmt {
struct _frama_c_vmt_content *table ;
int table_size ;
struct _frama_c_rtti_name_info_node *rtti_info ;
};
struct _frama_c_rtti_name_info_content {
struct _frama_c_rtti_name_info_node *value ;
int shift_object ;
int shift_vmt ;
};
struct _frama_c_rtti_name_info_node {
char const *name ;
struct _frama_c_rtti_name_info_content *base_classes ;
int number_of_base_classes ;
struct _frama_c_vmt *pvmt ;
};
struct A;
struct A {
int x ;
int y ;
};
struct B {
int x ;
int y ;
};
void A::Dtor(struct A const *this);
struct _frama_c_rtti_name_info_node _frama_c_rtti_name_info;
/*@ requires \valid_read(this); */
void A::Ctor(struct A const *this, int _x, int _y)
{
this->x = _x;
this->y = _y;
return;
}
/*@ requires \valid_read(this); */
void A::Dtor(struct A const *this)
{
return;
}
struct _frama_c_rtti_name_info_node _frama_c_rtti_name_info =
{.name = "A",
.base_classes = (struct _frama_c_rtti_name_info_content *)0,
.number_of_base_classes = 0,
.pvmt = (struct _frama_c_vmt *)0};
struct _frama_c_rtti_name_info_node _frama_c_rtti_name_info;
struct _frama_c_rtti_name_info_node _frama_c_rtti_name_info =
{.name = "B",
.base_classes = (struct _frama_c_rtti_name_info_content *)0,
.number_of_base_classes = 0,
.pvmt = (struct _frama_c_vmt *)0};
struct A a[2];
void __fc_init_Z1a(void) __attribute__((__constructor__));
void __fc_init_Z1a(void)
{
struct A __fc_tmp_1;
A::Ctor(& __fc_tmp_1,2,1);
struct A __fc_tmp_0;
A::Ctor(& __fc_tmp_0,4,1);
a[0] = __fc_tmp_1;
a[1] = __fc_tmp_0;
A::Dtor((struct A const *)(& __fc_tmp_0));
A::Dtor((struct A const *)(& __fc_tmp_1));
return;
}
struct B b[2] = {{.x = 7, .y = 0}, {.x = 14, .y = 0}};
struct B b1[2] = {{.x = 28, .y = 43}};
int main(void)
{
int __retres;
__retres = (a[1].x + b[1].x) + b1[0].y;
return __retres;
}