source: CIVL/mods/dev.civl.abc/examples/svcomp/cs_fib_false-unreach-call.i

main
Last change on this file was aad342c, checked in by Stephen Siegel <siegel@…>, 3 years ago

Performing huge refactor to incorporate ABC, GMC, and SARL into CIVL repo and use Java modules.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5664 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 33.4 KB
Line 
1extern void __VERIFIER_error() __attribute__ ((__noreturn__));
2
3extern void __VERIFIER_assume(int);
4typedef long unsigned int size_t;
5typedef int wchar_t;
6
7union wait
8 {
9 int w_status;
10 struct
11 {
12 unsigned int __w_termsig:7;
13 unsigned int __w_coredump:1;
14 unsigned int __w_retcode:8;
15 unsigned int:16;
16 } __wait_terminated;
17 struct
18 {
19 unsigned int __w_stopval:8;
20 unsigned int __w_stopsig:8;
21 unsigned int:16;
22 } __wait_stopped;
23 };
24typedef union
25 {
26 union wait *__uptr;
27 int *__iptr;
28 } __WAIT_STATUS __attribute__ ((__transparent_union__));
29
30typedef struct
31 {
32 int quot;
33 int rem;
34 } div_t;
35typedef struct
36 {
37 long int quot;
38 long int rem;
39 } ldiv_t;
40
41
42__extension__ typedef struct
43 {
44 long long int quot;
45 long long int rem;
46 } lldiv_t;
47
48extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) ;
49
50extern double atof (__const char *__nptr)
51 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
52extern int atoi (__const char *__nptr)
53 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
54extern long int atol (__const char *__nptr)
55 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
56
57
58__extension__ extern long long int atoll (__const char *__nptr)
59 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
60
61
62extern double strtod (__const char *__restrict __nptr,
63 char **__restrict __endptr)
64 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
65
66
67extern float strtof (__const char *__restrict __nptr,
68 char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
69extern long double strtold (__const char *__restrict __nptr,
70 char **__restrict __endptr)
71 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
72
73
74extern long int strtol (__const char *__restrict __nptr,
75 char **__restrict __endptr, int __base)
76 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
77extern unsigned long int strtoul (__const char *__restrict __nptr,
78 char **__restrict __endptr, int __base)
79 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
80
81__extension__
82extern long long int strtoq (__const char *__restrict __nptr,
83 char **__restrict __endptr, int __base)
84 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
85__extension__
86extern unsigned long long int strtouq (__const char *__restrict __nptr,
87 char **__restrict __endptr, int __base)
88 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
89
90__extension__
91extern long long int strtoll (__const char *__restrict __nptr,
92 char **__restrict __endptr, int __base)
93 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
94__extension__
95extern unsigned long long int strtoull (__const char *__restrict __nptr,
96 char **__restrict __endptr, int __base)
97 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
98
99extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) ;
100extern long int a64l (__const char *__s)
101 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
102
103typedef unsigned char __u_char;
104typedef unsigned short int __u_short;
105typedef unsigned int __u_int;
106typedef unsigned long int __u_long;
107typedef signed char __int8_t;
108typedef unsigned char __uint8_t;
109typedef signed short int __int16_t;
110typedef unsigned short int __uint16_t;
111typedef signed int __int32_t;
112typedef unsigned int __uint32_t;
113typedef signed long int __int64_t;
114typedef unsigned long int __uint64_t;
115typedef long int __quad_t;
116typedef unsigned long int __u_quad_t;
117typedef unsigned long int __dev_t;
118typedef unsigned int __uid_t;
119typedef unsigned int __gid_t;
120typedef unsigned long int __ino_t;
121typedef unsigned long int __ino64_t;
122typedef unsigned int __mode_t;
123typedef unsigned long int __nlink_t;
124typedef long int __off_t;
125typedef long int __off64_t;
126typedef int __pid_t;
127typedef struct { int __val[2]; } __fsid_t;
128typedef long int __clock_t;
129typedef unsigned long int __rlim_t;
130typedef unsigned long int __rlim64_t;
131typedef unsigned int __id_t;
132typedef long int __time_t;
133typedef unsigned int __useconds_t;
134typedef long int __suseconds_t;
135typedef int __daddr_t;
136typedef long int __swblk_t;
137typedef int __key_t;
138typedef int __clockid_t;
139typedef void * __timer_t;
140typedef long int __blksize_t;
141typedef long int __blkcnt_t;
142typedef long int __blkcnt64_t;
143typedef unsigned long int __fsblkcnt_t;
144typedef unsigned long int __fsblkcnt64_t;
145typedef unsigned long int __fsfilcnt_t;
146typedef unsigned long int __fsfilcnt64_t;
147typedef long int __ssize_t;
148typedef __off64_t __loff_t;
149typedef __quad_t *__qaddr_t;
150typedef char *__caddr_t;
151typedef long int __intptr_t;
152typedef unsigned int __socklen_t;
153typedef __u_char u_char;
154typedef __u_short u_short;
155typedef __u_int u_int;
156typedef __u_long u_long;
157typedef __quad_t quad_t;
158typedef __u_quad_t u_quad_t;
159typedef __fsid_t fsid_t;
160typedef __loff_t loff_t;
161typedef __ino_t ino_t;
162typedef __dev_t dev_t;
163typedef __gid_t gid_t;
164typedef __mode_t mode_t;
165typedef __nlink_t nlink_t;
166typedef __uid_t uid_t;
167typedef __off_t off_t;
168typedef __pid_t pid_t;
169typedef __id_t id_t;
170typedef __ssize_t ssize_t;
171typedef __daddr_t daddr_t;
172typedef __caddr_t caddr_t;
173typedef __key_t key_t;
174
175typedef __clock_t clock_t;
176
177
178
179typedef __time_t time_t;
180
181
182typedef __clockid_t clockid_t;
183typedef __timer_t timer_t;
184typedef unsigned long int ulong;
185typedef unsigned short int ushort;
186typedef unsigned int uint;
187typedef int int8_t __attribute__ ((__mode__ (__QI__)));
188typedef int int16_t __attribute__ ((__mode__ (__HI__)));
189typedef int int32_t __attribute__ ((__mode__ (__SI__)));
190typedef int int64_t __attribute__ ((__mode__ (__DI__)));
191typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
192typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
193typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
194typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
195typedef int register_t __attribute__ ((__mode__ (__word__)));
196typedef int __sig_atomic_t;
197typedef struct
198 {
199 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
200 } __sigset_t;
201typedef __sigset_t sigset_t;
202struct timespec
203 {
204 __time_t tv_sec;
205 long int tv_nsec;
206 };
207struct timeval
208 {
209 __time_t tv_sec;
210 __suseconds_t tv_usec;
211 };
212typedef __suseconds_t suseconds_t;
213typedef long int __fd_mask;
214typedef struct
215 {
216 __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
217 } fd_set;
218typedef __fd_mask fd_mask;
219
220extern int select (int __nfds, fd_set *__restrict __readfds,
221 fd_set *__restrict __writefds,
222 fd_set *__restrict __exceptfds,
223 struct timeval *__restrict __timeout);
224extern int pselect (int __nfds, fd_set *__restrict __readfds,
225 fd_set *__restrict __writefds,
226 fd_set *__restrict __exceptfds,
227 const struct timespec *__restrict __timeout,
228 const __sigset_t *__restrict __sigmask);
229
230
231__extension__
232extern unsigned int gnu_dev_major (unsigned long long int __dev)
233 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
234__extension__
235extern unsigned int gnu_dev_minor (unsigned long long int __dev)
236 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
237__extension__
238extern unsigned long long int gnu_dev_makedev (unsigned int __major,
239 unsigned int __minor)
240 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
241
242typedef __blksize_t blksize_t;
243typedef __blkcnt_t blkcnt_t;
244typedef __fsblkcnt_t fsblkcnt_t;
245
246
247typedef __fsfilcnt_t fsfilcnt_t;
248typedef unsigned long int pthread_t;
249typedef union
250{
251 char __size[56];
252 long int __align;
253} pthread_attr_t;
254typedef struct __pthread_internal_list
255{
256 struct __pthread_internal_list *__prev;
257 struct __pthread_internal_list *__next;
258} __pthread_list_t;
259typedef union
260{
261 struct __pthread_mutex_s
262 {
263 int __lock;
264 unsigned int __count;
265 int __owner;
266 unsigned int __nusers;
267 int __kind;
268 int __spins;
269 __pthread_list_t __list;
270 } __data;
271 char __size[40];
272 long int __align;
273} pthread_mutex_t;
274typedef union
275{
276 char __size[4];
277 int __align;
278} pthread_mutexattr_t;
279typedef union
280{
281 struct
282 {
283 int __lock;
284 unsigned int __futex;
285 __extension__ unsigned long long int __total_seq;
286 __extension__ unsigned long long int __wakeup_seq;
287 __extension__ unsigned long long int __woken_seq;
288 void *__mutex;
289 unsigned int __nwaiters;
290 unsigned int __broadcast_seq;
291 } __data;
292 char __size[48];
293 __extension__ long long int __align;
294} pthread_cond_t;
295typedef union
296{
297 char __size[4];
298 int __align;
299} pthread_condattr_t;
300typedef unsigned int pthread_key_t;
301typedef int pthread_once_t;
302typedef union
303{
304 struct
305 {
306 int __lock;
307 unsigned int __nr_readers;
308 unsigned int __readers_wakeup;
309 unsigned int __writer_wakeup;
310 unsigned int __nr_readers_queued;
311 unsigned int __nr_writers_queued;
312 int __writer;
313 int __shared;
314 unsigned long int __pad1;
315 unsigned long int __pad2;
316 unsigned int __flags;
317 } __data;
318 char __size[56];
319 long int __align;
320} pthread_rwlock_t;
321typedef union
322{
323 char __size[8];
324 long int __align;
325} pthread_rwlockattr_t;
326typedef volatile int pthread_spinlock_t;
327typedef union
328{
329 char __size[32];
330 long int __align;
331} pthread_barrier_t;
332typedef union
333{
334 char __size[4];
335 int __align;
336} pthread_barrierattr_t;
337
338extern long int random (void) __attribute__ ((__nothrow__ , __leaf__));
339extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
340extern char *initstate (unsigned int __seed, char *__statebuf,
341 size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
342
343
344extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
345
346
347
348
349
350
351
352struct random_data
353 {
354 int32_t *fptr;
355 int32_t *rptr;
356 int32_t *state;
357 int rand_type;
358 int rand_deg;
359 int rand_sep;
360 int32_t *end_ptr;
361 };
362
363extern int random_r (struct random_data *__restrict __buf,
364 int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
365
366extern int srandom_r (unsigned int __seed, struct random_data *__buf)
367 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
368
369extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
370 size_t __statelen,
371 struct random_data *__restrict __buf)
372 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
373
374extern int setstate_r (char *__restrict __statebuf,
375 struct random_data *__restrict __buf)
376 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
377
378
379
380
381
382
383extern int rand (void) __attribute__ ((__nothrow__ , __leaf__));
384
385extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
386
387
388
389
390extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__));
391
392
393
394
395
396
397
398extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__));
399extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
400
401
402extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
403extern long int nrand48 (unsigned short int __xsubi[3])
404 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
405
406
407extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
408extern long int jrand48 (unsigned short int __xsubi[3])
409 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
410
411
412extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__));
413extern unsigned short int *seed48 (unsigned short int __seed16v[3])
414 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
415extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
416
417
418
419
420
421struct drand48_data
422 {
423 unsigned short int __x[3];
424 unsigned short int __old_x[3];
425 unsigned short int __c;
426 unsigned short int __init;
427 unsigned long long int __a;
428 };
429
430
431extern int drand48_r (struct drand48_data *__restrict __buffer,
432 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
433extern int erand48_r (unsigned short int __xsubi[3],
434 struct drand48_data *__restrict __buffer,
435 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
436
437
438extern int lrand48_r (struct drand48_data *__restrict __buffer,
439 long int *__restrict __result)
440 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
441extern int nrand48_r (unsigned short int __xsubi[3],
442 struct drand48_data *__restrict __buffer,
443 long int *__restrict __result)
444 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
445
446
447extern int mrand48_r (struct drand48_data *__restrict __buffer,
448 long int *__restrict __result)
449 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
450extern int jrand48_r (unsigned short int __xsubi[3],
451 struct drand48_data *__restrict __buffer,
452 long int *__restrict __result)
453 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
454
455
456extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
457 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
458
459extern int seed48_r (unsigned short int __seed16v[3],
460 struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
461
462extern int lcong48_r (unsigned short int __param[7],
463 struct drand48_data *__buffer)
464 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
465
466
467
468
469
470
471
472
473
474extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
475
476extern void *calloc (size_t __nmemb, size_t __size)
477 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
478
479
480
481
482
483
484
485
486
487
488extern void *realloc (void *__ptr, size_t __size)
489 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
490
491extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
492
493
494
495
496extern void cfree (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
497
498extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
499
500
501
502
503
504
505
506extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
507
508
509
510
511extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
512 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
513
514
515
516
517extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
518
519
520
521extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
522
523extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
524 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
525
526extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
527
528
529extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
530
531
532extern char *getenv (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
533
534extern char *__secure_getenv (__const char *__name)
535 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
536extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
537extern int setenv (__const char *__name, __const char *__value, int __replace)
538 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
539extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
540extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__));
541extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
542extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
543extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
544extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
545
546extern int system (__const char *__command) ;
547
548extern char *realpath (__const char *__restrict __name,
549 char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) ;
550typedef int (*__compar_fn_t) (__const void *, __const void *);
551
552extern void *bsearch (__const void *__key, __const void *__base,
553 size_t __nmemb, size_t __size, __compar_fn_t __compar)
554 __attribute__ ((__nonnull__ (1, 2, 5))) ;
555extern void qsort (void *__base, size_t __nmemb, size_t __size,
556 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
557extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
558extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
559
560__extension__ extern long long int llabs (long long int __x)
561 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
562
563extern div_t div (int __numer, int __denom)
564 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
565extern ldiv_t ldiv (long int __numer, long int __denom)
566 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
567
568
569__extension__ extern lldiv_t lldiv (long long int __numer,
570 long long int __denom)
571 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
572
573extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
574 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
575extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
576 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
577extern char *gcvt (double __value, int __ndigit, char *__buf)
578 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) ;
579extern char *qecvt (long double __value, int __ndigit,
580 int *__restrict __decpt, int *__restrict __sign)
581 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
582extern char *qfcvt (long double __value, int __ndigit,
583 int *__restrict __decpt, int *__restrict __sign)
584 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
585extern char *qgcvt (long double __value, int __ndigit, char *__buf)
586 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) ;
587extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
588 int *__restrict __sign, char *__restrict __buf,
589 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
590extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
591 int *__restrict __sign, char *__restrict __buf,
592 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
593extern int qecvt_r (long double __value, int __ndigit,
594 int *__restrict __decpt, int *__restrict __sign,
595 char *__restrict __buf, size_t __len)
596 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
597extern int qfcvt_r (long double __value, int __ndigit,
598 int *__restrict __decpt, int *__restrict __sign,
599 char *__restrict __buf, size_t __len)
600 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
601
602extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) ;
603extern int mbtowc (wchar_t *__restrict __pwc,
604 __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) ;
605extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__)) ;
606extern size_t mbstowcs (wchar_t *__restrict __pwcs,
607 __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
608extern size_t wcstombs (char *__restrict __s,
609 __const wchar_t *__restrict __pwcs, size_t __n)
610 __attribute__ ((__nothrow__ , __leaf__));
611
612extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
613extern int getsubopt (char **__restrict __optionp,
614 char *__const *__restrict __tokens,
615 char **__restrict __valuep)
616 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) ;
617extern int getloadavg (double __loadavg[], int __nelem)
618 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
619
620
621extern void __assert_fail (__const char *__assertion, __const char *__file,
622 unsigned int __line, __const char *__function)
623 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
624extern void __assert_perror_fail (int __errnum, __const char *__file,
625 unsigned int __line,
626 __const char *__function)
627 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
628extern void __assert (const char *__assertion, const char *__file, int __line)
629 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
630
631void __VERIFIER_assert(int cond) {
632 if (!(cond)) {
633 ERROR: __VERIFIER_error();
634 }
635 return;
636}
637
638unsigned char __CS_round = 0;
639unsigned char __CS_ret = 0;
640const unsigned char __CS_ret_PREEMPTED = 0x01;
641const unsigned char __CS_ret_ERROR = 0x02;
642const unsigned char __CS_ret_FINISHED = 0x04;
643unsigned char __CS_error = 0;
644unsigned char __CS_error_detail = 0;
645const unsigned char __ERR_MAXTHREADS_REACHED = 0x01;
646const unsigned char __ERR_ERROR_LABEL_REACHED = 0x02;
647const unsigned char __ERR_ASSERT_FAILURE = 0x04;
648const unsigned char __ERR_UNLOCK_ATTEMPT = 0x08;
649const unsigned char __ERR_JOIN_FAILED_WRONG_THREAD_ID = 0x10;
650const unsigned char __ERR_JOIN_FAILED_THREAD_NOT_CREATED = 0x20;
651const unsigned char __ERR_COND_WAIT_MUTEX_NOT_OWNED = 0x30;
652const unsigned char __ERR_MUTEX_DESTROY = 0x40;
653const unsigned char __ERR_MUTEX_NOT_OWNED = 0x80;
654unsigned char __CS_thread_index;
655unsigned char __CS_thread_allocated[2 +1];
656unsigned char __CS_thread_born_round[2 +1];
657void *(*__CS_thread[2 +1])(void *);
658unsigned char __CS_thread_status[6][2 +1];
659const unsigned char __THREAD_UNUSED = 0x00;
660const unsigned char __THREAD_RUNNING = 0x01;
661const unsigned char __THREAD_FINISHED = 0x02;
662unsigned char *__CS_thread_lockedon[6][2 +1];
663int nondet_int();
664void __CS_cs(void)
665{
666 unsigned char k;
667 __VERIFIER_assume(__CS_round+k < 6);
668 __CS_round += k;
669 __CS_ret = (nondet_int() && __CS_round == 6 -1)?__CS_ret_PREEMPTED:__CS_ret;
670}
671int __CS_pthread_mutex_init(unsigned char *mutex, void *attr)
672{
673 return 0;
674}
675int __CS_pthread_mutex_destroy(unsigned char *lock)
676{
677 if (*lock != __CS_thread_index && *lock != 0) {
678 __CS_error = 1;
679 __CS_ret = __CS_ret_ERROR;
680 __CS_error_detail = __ERR_MUTEX_DESTROY;
681 }
682 else *lock = 0;
683 return 0;
684}
685int __CS_pthread_mutex_lock(unsigned char *lock)
686{
687 if (*lock == 0) *lock = (__CS_thread_index+1);
688 else { __CS_ret = __CS_ret_PREEMPTED; return 1; }
689 return 0;
690}
691int __CS_pthread_mutex_unlock(unsigned char *lock)
692{
693 if (*lock != (__CS_thread_index+1)) {
694 __CS_error = 1;
695 __CS_ret = __CS_ret_ERROR;
696 __CS_error_detail = __ERR_UNLOCK_ATTEMPT;
697 return 1;
698 } else *lock = 0;
699 return 0;
700}
701int __CS_pthread_cond_init(unsigned char *cond, void *attr)
702{
703 return 0;
704}
705int __CS_pthread_cond_signal(unsigned char *cond)
706{
707 int j;
708 for (j=0; j<=2; j++)
709 if (__CS_thread_lockedon[__CS_round][j] == cond)
710 __CS_thread_lockedon[__CS_round][j] = 0;
711 return 0;
712}
713int __CS_pthread_cond_broadcast(unsigned char *cond)
714{
715 int j;
716 for (j=0; j<=2; j++)
717 if (__CS_thread_lockedon[__CS_round][j] == cond)
718 __CS_thread_lockedon[__CS_round][j] = 0;
719 return 0;
720}
721int __CS_pthread_cond_wait(unsigned char *cond, unsigned char *lock)
722{
723 if (*lock != (__CS_thread_index+1)) {
724 __CS_error = 1;
725 __CS_ret = __CS_ret_ERROR;
726 __CS_error_detail = __ERR_COND_WAIT_MUTEX_NOT_OWNED;
727 return 1;
728 }
729 else *lock = 0;
730 __CS_thread_lockedon[__CS_round][__CS_thread_index] = cond;
731 __CS_ret = __CS_ret_PREEMPTED;
732 if (*lock == 0) *lock = __CS_thread_index+1;
733 else { __CS_ret = __CS_ret_PREEMPTED; return 1; }
734 return 0;
735}
736void __CS_assert(int expr)
737{
738 if (!expr) {
739 __CS_error = 1;
740 __CS_error_detail = __ERR_ASSERT_FAILURE;
741 __CS_ret = __CS_ret_ERROR;
742 }
743}
744void __CS_assume(int expr)
745{
746 if (!expr) __CS_ret = __CS_ret_PREEMPTED;
747}
748int __CS_pthread_join(unsigned char thread, void **value_ptr)
749{
750 if (thread != 123 && thread > 2 +1)
751 {
752 __CS_error = 1;
753 __CS_error_detail = __ERR_JOIN_FAILED_WRONG_THREAD_ID;
754 __CS_ret = __CS_ret_ERROR;
755 return 0;
756 }
757 if ( thread == 123 || __CS_thread_status[__CS_round][thread] == __THREAD_RUNNING )
758 {
759 __CS_ret = __CS_ret_PREEMPTED;
760 return 0;
761 }
762 if (__CS_thread_status[__CS_round][thread] == __THREAD_UNUSED)
763 {
764 __CS_error = 1;
765 __CS_error_detail = __ERR_JOIN_FAILED_THREAD_NOT_CREATED;
766 __CS_ret = __CS_ret_ERROR;
767 return 0;
768 }
769 __VERIFIER_assume( __CS_thread_status[__CS_round][thread] == __THREAD_FINISHED );
770 return 0;
771}
772int __CS_pthread_create(unsigned char *id1, void *attr, void *(*t1)(void*), void *arg)
773{
774 if (__CS_thread_index == 2) {
775 *id1 = 123;
776 return -1;
777 }
778 __CS_thread_index++;
779 __CS_thread_allocated[__CS_thread_index] = 1;
780 __CS_thread_born_round[__CS_thread_index] = __CS_round;
781 __CS_thread[__CS_thread_index] = t1;
782 __CS_thread_status[__CS_round][__CS_thread_index] = __THREAD_RUNNING;
783 *id1 = __CS_thread_index;
784 return __CS_thread_index;
785}
786int i[6] = {1};
787int j[6] = {1};
788union __CS__u {
789 int i[6];
790 int j[6];
791};
792union __CS__u __CS_u;
793void *t1(void *arg)
794{
795 int k = 0;
796 __CS_cs(); if (__CS_ret != 0) return 0;
797 for (k = 0; k < 5; k++)
798 {
799 __CS_cs(); if (__CS_ret != 0) return 0;
800 __CS_u.i[__CS_round] = i[__CS_round];
801 i[__CS_round] += j[__CS_round];
802 if (__CS_ret) i[__CS_round]= __CS_u.i[__CS_round];
803 }
804 __CS_cs(); if (__CS_ret != 0) return 0;
805 ;
806 __CS_cs(); if (__CS_ret != 0) return 0;
807}
808void *t2(void *arg)
809{
810 int k = 0;
811 __CS_cs(); if (__CS_ret != 0) return 0;
812 for (k = 0; k < 5; k++)
813 {
814 __CS_cs(); if (__CS_ret != 0) return 0;
815 __CS_u.j[__CS_round] = j[__CS_round];
816 j[__CS_round] += i[__CS_round];
817 if (__CS_ret) j[__CS_round]= __CS_u.j[__CS_round];
818 }
819 __CS_cs(); if (__CS_ret != 0) return 0;
820 ;
821 __CS_cs(); if (__CS_ret != 0) return 0;
822}
823void *main_thread(void *arg)
824{
825 int __CS_main_arg_argc;
826 char **argv;
827 unsigned char id1;
828 unsigned char id2;
829 __CS_cs(); if (__CS_ret != 0) return 0;
830 __CS_pthread_create(&id1, 0, t1, 0);
831 __CS_cs(); if (__CS_ret != 0) return 0;
832 __CS_pthread_create(&id2, 0, t2, 0);
833 __CS_cs(); if (__CS_ret != 0) return 0;
834 if ((i[__CS_round] >= 144) || (j[__CS_round] >= 144))
835 {
836 __CS_cs(); if (__CS_ret != 0) return 0;
837 goto __CS_ERROR;
838 __CS_cs(); if (__CS_ret != 0) return 0;
839 __CS_ERROR: __CS_error = 1; __CS_ret = __CS_ret_ERROR; __CS_error_detail = __ERR_ERROR_LABEL_REACHED; return 0;
840 __CS_cs(); if (__CS_ret != 0) return 0;
841 ;
842 __CS_cs(); if (__CS_ret != 0) return 0;
843 }
844 __CS_cs(); if (__CS_ret != 0) return 0;
845 }
846int main(int argc, char **argv)
847{
848 unsigned char __CS_cp___CS_thread_status[6][2 +1];
849 unsigned char *__CS_cp___CS_thread_lockedon[6][2 +1];
850 int __CS_cp_i[6];
851 int __CS_cp_j[6];
852 __CS_thread_status[1][0] = __CS_cp___CS_thread_status[1][0];
853 __CS_thread_status[2][0] = __CS_cp___CS_thread_status[2][0];
854 __CS_thread_status[3][0] = __CS_cp___CS_thread_status[3][0];
855 __CS_thread_status[4][0] = __CS_cp___CS_thread_status[4][0];
856 __CS_thread_status[5][0] = __CS_cp___CS_thread_status[5][0];
857 __CS_thread_status[1][1] = __CS_cp___CS_thread_status[1][1];
858 __CS_thread_status[2][1] = __CS_cp___CS_thread_status[2][1];
859 __CS_thread_status[3][1] = __CS_cp___CS_thread_status[3][1];
860 __CS_thread_status[4][1] = __CS_cp___CS_thread_status[4][1];
861 __CS_thread_status[5][1] = __CS_cp___CS_thread_status[5][1];
862 __CS_thread_status[1][2] = __CS_cp___CS_thread_status[1][2];
863 __CS_thread_status[2][2] = __CS_cp___CS_thread_status[2][2];
864 __CS_thread_status[3][2] = __CS_cp___CS_thread_status[3][2];
865 __CS_thread_status[4][2] = __CS_cp___CS_thread_status[4][2];
866 __CS_thread_status[5][2] = __CS_cp___CS_thread_status[5][2];
867 __CS_thread_lockedon[1][0] = __CS_cp___CS_thread_lockedon[1][0];
868 __CS_thread_lockedon[2][0] = __CS_cp___CS_thread_lockedon[2][0];
869 __CS_thread_lockedon[3][0] = __CS_cp___CS_thread_lockedon[3][0];
870 __CS_thread_lockedon[4][0] = __CS_cp___CS_thread_lockedon[4][0];
871 __CS_thread_lockedon[5][0] = __CS_cp___CS_thread_lockedon[5][0];
872 __CS_thread_lockedon[1][1] = __CS_cp___CS_thread_lockedon[1][1];
873 __CS_thread_lockedon[2][1] = __CS_cp___CS_thread_lockedon[2][1];
874 __CS_thread_lockedon[3][1] = __CS_cp___CS_thread_lockedon[3][1];
875 __CS_thread_lockedon[4][1] = __CS_cp___CS_thread_lockedon[4][1];
876 __CS_thread_lockedon[5][1] = __CS_cp___CS_thread_lockedon[5][1];
877 __CS_thread_lockedon[1][2] = __CS_cp___CS_thread_lockedon[1][2];
878 __CS_thread_lockedon[2][2] = __CS_cp___CS_thread_lockedon[2][2];
879 __CS_thread_lockedon[3][2] = __CS_cp___CS_thread_lockedon[3][2];
880 __CS_thread_lockedon[4][2] = __CS_cp___CS_thread_lockedon[4][2];
881 __CS_thread_lockedon[5][2] = __CS_cp___CS_thread_lockedon[5][2];
882 i[1] = __CS_cp_i[1];
883 i[2] = __CS_cp_i[2];
884 i[3] = __CS_cp_i[3];
885 i[4] = __CS_cp_i[4];
886 i[5] = __CS_cp_i[5];
887 j[1] = __CS_cp_j[1];
888 j[2] = __CS_cp_j[2];
889 j[3] = __CS_cp_j[3];
890 j[4] = __CS_cp_j[4];
891 j[5] = __CS_cp_j[5];
892 __CS_round = 0;
893 __CS_thread_index = 0;
894 __CS_thread_born_round[0] = __CS_round;
895 __CS_thread_status[0][0] = __THREAD_RUNNING;
896 __CS_thread[0] = main_thread;
897 __CS_thread_allocated[0] = 1;
898 if (__CS_thread_allocated[0] == 1) {
899 __CS_round = __CS_thread_born_round[0];
900 __CS_ret = 0;
901 __CS_thread[0](0);
902 if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][0] = __THREAD_FINISHED;
903 }
904 if (__CS_thread_allocated[1] == 1) {
905 __CS_round = __CS_thread_born_round[1];
906 __CS_ret = 0;
907 __CS_thread[1](0);
908 if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][1] = __THREAD_FINISHED;
909 }
910 if (__CS_thread_allocated[2] == 1) {
911 __CS_round = __CS_thread_born_round[2];
912 __CS_ret = 0;
913 __CS_thread[2](0);
914 if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][2] = __THREAD_FINISHED;
915 }
916 __VERIFIER_assume(__CS_thread_status[0][0] == __CS_cp___CS_thread_status[1][0]);
917 __VERIFIER_assume(__CS_thread_status[1][0] == __CS_cp___CS_thread_status[2][0]);
918 __VERIFIER_assume(__CS_thread_status[2][0] == __CS_cp___CS_thread_status[3][0]);
919 __VERIFIER_assume(__CS_thread_status[3][0] == __CS_cp___CS_thread_status[4][0]);
920 __VERIFIER_assume(__CS_thread_status[4][0] == __CS_cp___CS_thread_status[5][0]);
921 __VERIFIER_assume(__CS_thread_status[0][1] == __CS_cp___CS_thread_status[1][1]);
922 __VERIFIER_assume(__CS_thread_status[1][1] == __CS_cp___CS_thread_status[2][1]);
923 __VERIFIER_assume(__CS_thread_status[2][1] == __CS_cp___CS_thread_status[3][1]);
924 __VERIFIER_assume(__CS_thread_status[3][1] == __CS_cp___CS_thread_status[4][1]);
925 __VERIFIER_assume(__CS_thread_status[4][1] == __CS_cp___CS_thread_status[5][1]);
926 __VERIFIER_assume(__CS_thread_status[0][2] == __CS_cp___CS_thread_status[1][2]);
927 __VERIFIER_assume(__CS_thread_status[1][2] == __CS_cp___CS_thread_status[2][2]);
928 __VERIFIER_assume(__CS_thread_status[2][2] == __CS_cp___CS_thread_status[3][2]);
929 __VERIFIER_assume(__CS_thread_status[3][2] == __CS_cp___CS_thread_status[4][2]);
930 __VERIFIER_assume(__CS_thread_status[4][2] == __CS_cp___CS_thread_status[5][2]);
931 __VERIFIER_assume(__CS_thread_lockedon[0][0] == __CS_cp___CS_thread_lockedon[1][0]);
932 __VERIFIER_assume(__CS_thread_lockedon[1][0] == __CS_cp___CS_thread_lockedon[2][0]);
933 __VERIFIER_assume(__CS_thread_lockedon[2][0] == __CS_cp___CS_thread_lockedon[3][0]);
934 __VERIFIER_assume(__CS_thread_lockedon[3][0] == __CS_cp___CS_thread_lockedon[4][0]);
935 __VERIFIER_assume(__CS_thread_lockedon[4][0] == __CS_cp___CS_thread_lockedon[5][0]);
936 __VERIFIER_assume(__CS_thread_lockedon[0][1] == __CS_cp___CS_thread_lockedon[1][1]);
937 __VERIFIER_assume(__CS_thread_lockedon[1][1] == __CS_cp___CS_thread_lockedon[2][1]);
938 __VERIFIER_assume(__CS_thread_lockedon[2][1] == __CS_cp___CS_thread_lockedon[3][1]);
939 __VERIFIER_assume(__CS_thread_lockedon[3][1] == __CS_cp___CS_thread_lockedon[4][1]);
940 __VERIFIER_assume(__CS_thread_lockedon[4][1] == __CS_cp___CS_thread_lockedon[5][1]);
941 __VERIFIER_assume(__CS_thread_lockedon[0][2] == __CS_cp___CS_thread_lockedon[1][2]);
942 __VERIFIER_assume(__CS_thread_lockedon[1][2] == __CS_cp___CS_thread_lockedon[2][2]);
943 __VERIFIER_assume(__CS_thread_lockedon[2][2] == __CS_cp___CS_thread_lockedon[3][2]);
944 __VERIFIER_assume(__CS_thread_lockedon[3][2] == __CS_cp___CS_thread_lockedon[4][2]);
945 __VERIFIER_assume(__CS_thread_lockedon[4][2] == __CS_cp___CS_thread_lockedon[5][2]);
946 __VERIFIER_assume(i[0] == __CS_cp_i[1]);
947 __VERIFIER_assume(i[1] == __CS_cp_i[2]);
948 __VERIFIER_assume(i[2] == __CS_cp_i[3]);
949 __VERIFIER_assume(i[3] == __CS_cp_i[4]);
950 __VERIFIER_assume(i[4] == __CS_cp_i[5]);
951 __VERIFIER_assume(j[0] == __CS_cp_j[1]);
952 __VERIFIER_assume(j[1] == __CS_cp_j[2]);
953 __VERIFIER_assume(j[2] == __CS_cp_j[3]);
954 __VERIFIER_assume(j[3] == __CS_cp_j[4]);
955 __VERIFIER_assume(j[4] == __CS_cp_j[5]);
956 __VERIFIER_assert(__CS_error_detail != __ERR_MAXTHREADS_REACHED);
957 __VERIFIER_assert(__CS_error_detail != __ERR_ASSERT_FAILURE);
958 __VERIFIER_assert(__CS_error_detail != __ERR_ERROR_LABEL_REACHED);
959 __VERIFIER_assert(__CS_error_detail != __ERR_UNLOCK_ATTEMPT);
960 __VERIFIER_assert(__CS_error_detail != __ERR_JOIN_FAILED_WRONG_THREAD_ID);
961 __VERIFIER_assert(__CS_error_detail != __ERR_JOIN_FAILED_THREAD_NOT_CREATED);
962 __VERIFIER_assert(__CS_error != 1);
963}
Note: See TracBrowser for help on using the repository browser.