File: loop-case-switch-for-unroll.1.res.oracle

package info (click to toggle)
frama-c 20220511-manganese-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 66,472 kB
  • sloc: ml: 278,832; ansic: 47,093; sh: 4,823; makefile: 3,618; javascript: 2,436; python: 1,919; perl: 897; lisp: 293; xml: 62
file content (296 lines) | stat: -rw-r--r-- 10,202 bytes parent folder | download | duplicates (2)
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
[kernel] Parsing loop-case-switch-for-unroll.c (with preprocessing)
[eva] Analyzing a complete application starting at main
[eva] Computing initial state
[eva] Initial state computed
[eva:initial-state] Values of globals at initialization
  gen_nondet_vals[0] ∈ {1}
                 [1] ∈ {42}
                 [2] ∈ {5}
                 [3] ∈ {1}
                 [4] ∈ {43}
                 [5] ∈ {11}
                 [6] ∈ {0}
                 [7] ∈ {1}
                 [8] ∈ {0}
                 [9] ∈ {44}
                 [10] ∈ {12}
                 [11..12] ∈ {0}
                 [13..14] ∈ {1}
                 [15] ∈ {45}
                 [16] ∈ {11}
                 [17..20] ∈ {0}
                 [21] ∈ {46}
                 [22] ∈ {13}
                 [23..26] ∈ {0}
                 [27] ∈ {47}
                 [28] ∈ {12}
                 [29..31] ∈ {0}
                 [32] ∈ {48}
                 [33] ∈ {15}
                 [34..36] ∈ {0}
  gen_nondet_i ∈ {-1}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {1}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {42}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {5}
[eva] loop-case-switch-for-unroll.c:78: Frama_C_show_each_i_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {1}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {43}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {11}
[eva] loop-case-switch-for-unroll.c:78: Frama_C_show_each_i_: {10}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {1}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {44}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {12}
[eva] loop-case-switch-for-unroll.c:78: Frama_C_show_each_i_: {10}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {1}
[eva] loop-case-switch-for-unroll.c:66: Frama_C_show_each_n_: {3}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {1}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {45}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {11}
[eva] loop-case-switch-for-unroll.c:78: Frama_C_show_each_i_: {10}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {46}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {13}
[eva] loop-case-switch-for-unroll.c:78: Frama_C_show_each_i_: {10}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {47}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {12}
[eva] loop-case-switch-for-unroll.c:78: Frama_C_show_each_i_: {10}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:53: Frama_C_show_each_nondet_: {0}
[eva] loop-case-switch-for-unroll.c:84: Frama_C_show_each_y_: {32}
[eva] loop-case-switch-for-unroll.c:85: Frama_C_show_each_x_: {32}
[eva] done for function main
[eva] ====== VALUES COMPUTED ======
[eva:final-states] Values at end of function gen_nondet:
  gen_nondet_i ∈ [0..31]
  __retres ∈ [0..47]
[eva:final-states] Values at end of function main:
  y ∈ {32}
  x ∈ {32}
  n ∈ {0}
  gen_nondet_i ∈ {31}
[eva:summary] ====== ANALYSIS SUMMARY ======
  ----------------------------------------------------------------------------
  2 functions analyzed (out of 2): 100% coverage.
  In these functions, 75 statements reached (out of 125): 60% coverage.
  ----------------------------------------------------------------------------
  No errors or warnings raised during the analysis.
  ----------------------------------------------------------------------------
  0 alarms generated by the analysis.
  ----------------------------------------------------------------------------
  No logical properties have been reached by the analysis.
  ----------------------------------------------------------------------------
/* Generated by Frama-C */
int gen_nondet(int line);

static int gen_nondet_vals[37] =
  {1,
   42,
   5,
   1,
   43,
   11,
   0,
   1,
   0,
   44,
   12,
   0,
   0,
   1,
   1,
   45,
   11,
   0,
   0,
   0,
   0,
   46,
   13,
   0,
   0,
   0,
   0,
   47,
   12,
   0,
   0,
   0,
   48,
   15,
   0,
   0,
   0};
static int gen_nondet_i = -1;
/*@ assigns \result;
    assigns \result \from \nothing; */
extern int ( /* missing proto */ Frama_C_show_each_nondet_)();

int gen_nondet(int line)
{
  int __retres;
  gen_nondet_i = (int)((unsigned int)(gen_nondet_i + 1) % (sizeof(gen_nondet_vals) / sizeof(int)));
  Frama_C_show_each_nondet_(gen_nondet_vals[gen_nondet_i]);
  __retres = gen_nondet_vals[gen_nondet_i];
  return __retres;
}

/*@ assigns \result;
    assigns \result \from \nothing; */
extern int ( /* missing proto */ Frama_C_show_each_n_)();

/*@ assigns \result;
    assigns \result \from \nothing; */
extern int ( /* missing proto */ Frama_C_show_each_i_)();

/*@ assigns \result;
    assigns \result \from \nothing; */
extern int ( /* missing proto */ Frama_C_show_each_y_)();

/*@ assigns \result;
    assigns \result \from \nothing; */
extern int ( /* missing proto */ Frama_C_show_each_x_)();

void main(void)
{
  int x;
  int y = 32;
  int n = 3;
  L0:
  switch (1) {
    int tmp;
    int tmp_0;
    L3: case 0: Frama_C_show_each_n_(n);
    tmp = gen_nondet(67);
    if (tmp) goto L;
    tmp_0 = gen_nondet(68);
    if (tmp_0) goto L1;
    {
      int tmp_1_unroll_41;
      case 1: tmp_1_unroll_41 = gen_nondet(71);
      if (tmp_1_unroll_41) goto L1_unrolling_11_loop;
      L_unrolling_8_loop: x = y;
      case 2:
      {
        int j_unroll_40;
        int i_unroll_40 = 0;
        if (! (i_unroll_40 < 4)) goto unrolling_2_loop_unrolling_12_loop;
        {
          int tmp_2_unroll_12_unroll_26;
          int tmp_3_unroll_12_unroll_26;
          int tmp_4_unroll_12_unroll_26;
          int tmp_5_unroll_12_unroll_26;
          L1_unrolling_4_loop_unrolling_9_loop: j_unroll_40 = gen_nondet(76);
          tmp_2_unroll_12_unroll_26 = gen_nondet(77);
          if (tmp_2_unroll_12_unroll_26 > 10) i_unroll_40 = 10;
          else i_unroll_40 = 0;
          Frama_C_show_each_i_(i_unroll_40);
          tmp_3_unroll_12_unroll_26 = gen_nondet(79);
          if (tmp_3_unroll_12_unroll_26) goto L_unrolling_8_loop;
          tmp_4_unroll_12_unroll_26 = gen_nondet(80);
          if (tmp_4_unroll_12_unroll_26) goto L0;
          tmp_5_unroll_12_unroll_26 = gen_nondet(81);
          if (tmp_5_unroll_12_unroll_26) goto L3;
        }
        i_unroll_40 ++;
        unrolling_3_loop_unrolling_10_loop: ;
        /*@ loop pragma UNROLL "done", 1; */
        while (i_unroll_40 < 4) {
          {
            int tmp_2_unroll_37;
            int tmp_3_unroll_37;
            int tmp_4_unroll_37;
            int tmp_5_unroll_37;
            L1_unrolling_11_loop: j_unroll_40 = gen_nondet(76);
            tmp_2_unroll_37 = gen_nondet(77);
            if (tmp_2_unroll_37 > 10) i_unroll_40 = 10; else i_unroll_40 = 0;
            Frama_C_show_each_i_(i_unroll_40);
            tmp_3_unroll_37 = gen_nondet(79);
            if (tmp_3_unroll_37) goto L_unrolling_8_loop;
            tmp_4_unroll_37 = gen_nondet(80);
            if (tmp_4_unroll_37) goto L0;
            tmp_5_unroll_37 = gen_nondet(81);
            if (tmp_5_unroll_37) goto L3;
          }
          i_unroll_40 ++;
        }
        unrolling_2_loop_unrolling_12_loop: ;
      }
    }
    n --;
    if (! (n > 0)) goto unrolling_6_loop;
    unrolling_7_loop: ;
    /*@ loop pragma UNROLL "done", 1; */
    while (1) {
      {
        int tmp_1;
        tmp_1 = gen_nondet(71);
        if (tmp_1) goto L1;
        L: x = y;
        {
          int j;
          int i = 0;
          if (! (i < 4)) goto unrolling_2_loop;
          {
            int tmp_2_unroll_12;
            int tmp_3_unroll_12;
            int tmp_4_unroll_12;
            int tmp_5_unroll_12;
            L1_unrolling_4_loop: j = gen_nondet(76);
            tmp_2_unroll_12 = gen_nondet(77);
            if (tmp_2_unroll_12 > 10) i = 10; else i = 0;
            Frama_C_show_each_i_(i);
            tmp_3_unroll_12 = gen_nondet(79);
            if (tmp_3_unroll_12) goto L;
            tmp_4_unroll_12 = gen_nondet(80);
            if (tmp_4_unroll_12) goto L0;
            tmp_5_unroll_12 = gen_nondet(81);
            if (tmp_5_unroll_12) goto L3;
          }
          i ++;
          unrolling_3_loop: ;
          /*@ loop pragma UNROLL "done", 1; */
          while (i < 4) {
            {
              int tmp_2;
              int tmp_3;
              int tmp_4;
              int tmp_5;
              L1: j = gen_nondet(76);
              tmp_2 = gen_nondet(77);
              if (tmp_2 > 10) i = 10; else i = 0;
              Frama_C_show_each_i_(i);
              tmp_3 = gen_nondet(79);
              if (tmp_3) goto L;
              tmp_4 = gen_nondet(80);
              if (tmp_4) goto L0;
              tmp_5 = gen_nondet(81);
              if (tmp_5) goto L3;
            }
            i ++;
          }
          unrolling_2_loop: ;
        }
      }
      n --;
      if (! (n > 0)) break;
    }
    unrolling_6_loop: ;
    Frama_C_show_each_y_(y);
    Frama_C_show_each_x_(x);
  }
  return;
}