File: loop-case-switch-for-unroll.2.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 (414 lines) | stat: -rw-r--r-- 14,940 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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
[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, 74 statements reached (out of 238): 31% 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_106;
      case 1: tmp_1_unroll_106 = gen_nondet(71);
      if (tmp_1_unroll_106) goto L1_unrolling_23_loop;
      L_unrolling_18_loop: x = y;
      case 2:
      {
        int j_unroll_105;
        int i_unroll_105 = 0;
        if (! (i_unroll_105 < 4)) goto unrolling_2_loop_unrolling_24_loop;
        {
          int tmp_2_unroll_24_unroll_80;
          int tmp_3_unroll_24_unroll_80;
          int tmp_4_unroll_24_unroll_80;
          int tmp_5_unroll_24_unroll_80;
          L1_unrolling_6_loop_unrolling_19_loop:
          j_unroll_105 = gen_nondet(76);
          tmp_2_unroll_24_unroll_80 = gen_nondet(77);
          if (tmp_2_unroll_24_unroll_80 > 10) i_unroll_105 = 10;
          else i_unroll_105 = 0;
          Frama_C_show_each_i_(i_unroll_105);
          tmp_3_unroll_24_unroll_80 = gen_nondet(79);
          if (tmp_3_unroll_24_unroll_80) goto L_unrolling_18_loop;
          tmp_4_unroll_24_unroll_80 = gen_nondet(80);
          if (tmp_4_unroll_24_unroll_80) goto L0;
          tmp_5_unroll_24_unroll_80 = gen_nondet(81);
          if (tmp_5_unroll_24_unroll_80) goto L3;
        }
        i_unroll_105 ++;
        unrolling_5_loop_unrolling_20_loop: ;
        if (! (i_unroll_105 < 4)) goto unrolling_2_loop_unrolling_24_loop;
        {
          int tmp_2_unroll_12_unroll_91;
          int tmp_3_unroll_12_unroll_91;
          int tmp_4_unroll_12_unroll_91;
          int tmp_5_unroll_12_unroll_91;
          L1_unrolling_4_loop_unrolling_21_loop:
          j_unroll_105 = gen_nondet(76);
          tmp_2_unroll_12_unroll_91 = gen_nondet(77);
          if (tmp_2_unroll_12_unroll_91 > 10) i_unroll_105 = 10;
          else i_unroll_105 = 0;
          Frama_C_show_each_i_(i_unroll_105);
          tmp_3_unroll_12_unroll_91 = gen_nondet(79);
          if (tmp_3_unroll_12_unroll_91) goto L_unrolling_18_loop;
          tmp_4_unroll_12_unroll_91 = gen_nondet(80);
          if (tmp_4_unroll_12_unroll_91) goto L0;
          tmp_5_unroll_12_unroll_91 = gen_nondet(81);
          if (tmp_5_unroll_12_unroll_91) goto L3;
        }
        i_unroll_105 ++;
        unrolling_3_loop_unrolling_22_loop: ;
        /*@ loop pragma UNROLL "done", 2; */
        while (i_unroll_105 < 4) {
          {
            int tmp_2_unroll_102;
            int tmp_3_unroll_102;
            int tmp_4_unroll_102;
            int tmp_5_unroll_102;
            L1_unrolling_23_loop: j_unroll_105 = gen_nondet(76);
            tmp_2_unroll_102 = gen_nondet(77);
            if (tmp_2_unroll_102 > 10) i_unroll_105 = 10;
            else i_unroll_105 = 0;
            Frama_C_show_each_i_(i_unroll_105);
            tmp_3_unroll_102 = gen_nondet(79);
            if (tmp_3_unroll_102) goto L_unrolling_18_loop;
            tmp_4_unroll_102 = gen_nondet(80);
            if (tmp_4_unroll_102) goto L0;
            tmp_5_unroll_102 = gen_nondet(81);
            if (tmp_5_unroll_102) goto L3;
          }
          i_unroll_105 ++;
        }
        unrolling_2_loop_unrolling_24_loop: ;
      }
    }
    n --;
    if (! (n > 0)) goto unrolling_8_loop;
    unrolling_17_loop: ;
    {
      int tmp_1_unroll_64;
      tmp_1_unroll_64 = gen_nondet(71);
      if (tmp_1_unroll_64) goto L1_unrolling_15_loop;
      L_unrolling_10_loop: x = y;
      {
        int j_unroll_63;
        int i_unroll_63 = 0;
        if (! (i_unroll_63 < 4)) goto unrolling_2_loop_unrolling_16_loop;
        {
          int tmp_2_unroll_24_unroll_38;
          int tmp_3_unroll_24_unroll_38;
          int tmp_4_unroll_24_unroll_38;
          int tmp_5_unroll_24_unroll_38;
          L1_unrolling_6_loop_unrolling_11_loop:
          j_unroll_63 = gen_nondet(76);
          tmp_2_unroll_24_unroll_38 = gen_nondet(77);
          if (tmp_2_unroll_24_unroll_38 > 10) i_unroll_63 = 10;
          else i_unroll_63 = 0;
          Frama_C_show_each_i_(i_unroll_63);
          tmp_3_unroll_24_unroll_38 = gen_nondet(79);
          if (tmp_3_unroll_24_unroll_38) goto L_unrolling_10_loop;
          tmp_4_unroll_24_unroll_38 = gen_nondet(80);
          if (tmp_4_unroll_24_unroll_38) goto L0;
          tmp_5_unroll_24_unroll_38 = gen_nondet(81);
          if (tmp_5_unroll_24_unroll_38) goto L3;
        }
        i_unroll_63 ++;
        unrolling_5_loop_unrolling_12_loop: ;
        if (! (i_unroll_63 < 4)) goto unrolling_2_loop_unrolling_16_loop;
        {
          int tmp_2_unroll_12_unroll_49;
          int tmp_3_unroll_12_unroll_49;
          int tmp_4_unroll_12_unroll_49;
          int tmp_5_unroll_12_unroll_49;
          L1_unrolling_4_loop_unrolling_13_loop:
          j_unroll_63 = gen_nondet(76);
          tmp_2_unroll_12_unroll_49 = gen_nondet(77);
          if (tmp_2_unroll_12_unroll_49 > 10) i_unroll_63 = 10;
          else i_unroll_63 = 0;
          Frama_C_show_each_i_(i_unroll_63);
          tmp_3_unroll_12_unroll_49 = gen_nondet(79);
          if (tmp_3_unroll_12_unroll_49) goto L_unrolling_10_loop;
          tmp_4_unroll_12_unroll_49 = gen_nondet(80);
          if (tmp_4_unroll_12_unroll_49) goto L0;
          tmp_5_unroll_12_unroll_49 = gen_nondet(81);
          if (tmp_5_unroll_12_unroll_49) goto L3;
        }
        i_unroll_63 ++;
        unrolling_3_loop_unrolling_14_loop: ;
        /*@ loop pragma UNROLL "done", 2; */
        while (i_unroll_63 < 4) {
          {
            int tmp_2_unroll_60;
            int tmp_3_unroll_60;
            int tmp_4_unroll_60;
            int tmp_5_unroll_60;
            L1_unrolling_15_loop: j_unroll_63 = gen_nondet(76);
            tmp_2_unroll_60 = gen_nondet(77);
            if (tmp_2_unroll_60 > 10) i_unroll_63 = 10; else i_unroll_63 = 0;
            Frama_C_show_each_i_(i_unroll_63);
            tmp_3_unroll_60 = gen_nondet(79);
            if (tmp_3_unroll_60) goto L_unrolling_10_loop;
            tmp_4_unroll_60 = gen_nondet(80);
            if (tmp_4_unroll_60) goto L0;
            tmp_5_unroll_60 = gen_nondet(81);
            if (tmp_5_unroll_60) goto L3;
          }
          i_unroll_63 ++;
        }
        unrolling_2_loop_unrolling_16_loop: ;
      }
    }
    n --;
    if (! (n > 0)) goto unrolling_8_loop;
    unrolling_9_loop: ;
    /*@ loop pragma UNROLL "done", 2; */
    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_24;
            int tmp_3_unroll_24;
            int tmp_4_unroll_24;
            int tmp_5_unroll_24;
            L1_unrolling_6_loop: j = gen_nondet(76);
            tmp_2_unroll_24 = gen_nondet(77);
            if (tmp_2_unroll_24 > 10) i = 10; else i = 0;
            Frama_C_show_each_i_(i);
            tmp_3_unroll_24 = gen_nondet(79);
            if (tmp_3_unroll_24) goto L;
            tmp_4_unroll_24 = gen_nondet(80);
            if (tmp_4_unroll_24) goto L0;
            tmp_5_unroll_24 = gen_nondet(81);
            if (tmp_5_unroll_24) goto L3;
          }
          i ++;
          unrolling_5_loop: ;
          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", 2; */
          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_8_loop: ;
    Frama_C_show_each_y_(y);
    Frama_C_show_each_x_(x);
  }
  return;
}