source: CIVL/mods/dev.civl.abc/examples/svcomp/sll_to_dll_rev_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: 23.2 KB
Line 
1extern void __VERIFIER_error() __attribute__ ((__noreturn__));
2
3typedef long unsigned int size_t;
4typedef int wchar_t;
5
6union wait
7 {
8 int w_status;
9 struct
10 {
11 unsigned int __w_termsig:7;
12 unsigned int __w_coredump:1;
13 unsigned int __w_retcode:8;
14 unsigned int:16;
15 } __wait_terminated;
16 struct
17 {
18 unsigned int __w_stopval:8;
19 unsigned int __w_stopsig:8;
20 unsigned int:16;
21 } __wait_stopped;
22 };
23typedef union
24 {
25 union wait *__uptr;
26 int *__iptr;
27 } __WAIT_STATUS __attribute__ ((__transparent_union__));
28
29typedef struct
30 {
31 int quot;
32 int rem;
33 } div_t;
34typedef struct
35 {
36 long int quot;
37 long int rem;
38 } ldiv_t;
39
40
41__extension__ typedef struct
42 {
43 long long int quot;
44 long long int rem;
45 } lldiv_t;
46
47extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) ;
48
49extern double atof (__const char *__nptr)
50 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
51extern int atoi (__const char *__nptr)
52 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
53extern long int atol (__const char *__nptr)
54 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
55
56
57__extension__ extern long long int atoll (__const char *__nptr)
58 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
59
60
61extern double strtod (__const char *__restrict __nptr,
62 char **__restrict __endptr)
63 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
64
65
66extern float strtof (__const char *__restrict __nptr,
67 char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
68extern long double strtold (__const char *__restrict __nptr,
69 char **__restrict __endptr)
70 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
71
72
73extern long int strtol (__const char *__restrict __nptr,
74 char **__restrict __endptr, int __base)
75 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
76extern unsigned long int strtoul (__const char *__restrict __nptr,
77 char **__restrict __endptr, int __base)
78 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
79
80__extension__
81extern long long int strtoq (__const char *__restrict __nptr,
82 char **__restrict __endptr, int __base)
83 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
84__extension__
85extern unsigned long long int strtouq (__const char *__restrict __nptr,
86 char **__restrict __endptr, int __base)
87 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
88
89__extension__
90extern long long int strtoll (__const char *__restrict __nptr,
91 char **__restrict __endptr, int __base)
92 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
93__extension__
94extern unsigned long long int strtoull (__const char *__restrict __nptr,
95 char **__restrict __endptr, int __base)
96 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
97
98extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) ;
99extern long int a64l (__const char *__s)
100 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
101
102typedef unsigned char __u_char;
103typedef unsigned short int __u_short;
104typedef unsigned int __u_int;
105typedef unsigned long int __u_long;
106typedef signed char __int8_t;
107typedef unsigned char __uint8_t;
108typedef signed short int __int16_t;
109typedef unsigned short int __uint16_t;
110typedef signed int __int32_t;
111typedef unsigned int __uint32_t;
112typedef signed long int __int64_t;
113typedef unsigned long int __uint64_t;
114typedef long int __quad_t;
115typedef unsigned long int __u_quad_t;
116typedef unsigned long int __dev_t;
117typedef unsigned int __uid_t;
118typedef unsigned int __gid_t;
119typedef unsigned long int __ino_t;
120typedef unsigned long int __ino64_t;
121typedef unsigned int __mode_t;
122typedef unsigned long int __nlink_t;
123typedef long int __off_t;
124typedef long int __off64_t;
125typedef int __pid_t;
126typedef struct { int __val[2]; } __fsid_t;
127typedef long int __clock_t;
128typedef unsigned long int __rlim_t;
129typedef unsigned long int __rlim64_t;
130typedef unsigned int __id_t;
131typedef long int __time_t;
132typedef unsigned int __useconds_t;
133typedef long int __suseconds_t;
134typedef int __daddr_t;
135typedef long int __swblk_t;
136typedef int __key_t;
137typedef int __clockid_t;
138typedef void * __timer_t;
139typedef long int __blksize_t;
140typedef long int __blkcnt_t;
141typedef long int __blkcnt64_t;
142typedef unsigned long int __fsblkcnt_t;
143typedef unsigned long int __fsblkcnt64_t;
144typedef unsigned long int __fsfilcnt_t;
145typedef unsigned long int __fsfilcnt64_t;
146typedef long int __ssize_t;
147typedef __off64_t __loff_t;
148typedef __quad_t *__qaddr_t;
149typedef char *__caddr_t;
150typedef long int __intptr_t;
151typedef unsigned int __socklen_t;
152typedef __u_char u_char;
153typedef __u_short u_short;
154typedef __u_int u_int;
155typedef __u_long u_long;
156typedef __quad_t quad_t;
157typedef __u_quad_t u_quad_t;
158typedef __fsid_t fsid_t;
159typedef __loff_t loff_t;
160typedef __ino_t ino_t;
161typedef __dev_t dev_t;
162typedef __gid_t gid_t;
163typedef __mode_t mode_t;
164typedef __nlink_t nlink_t;
165typedef __uid_t uid_t;
166typedef __off_t off_t;
167typedef __pid_t pid_t;
168typedef __id_t id_t;
169typedef __ssize_t ssize_t;
170typedef __daddr_t daddr_t;
171typedef __caddr_t caddr_t;
172typedef __key_t key_t;
173
174typedef __clock_t clock_t;
175
176
177
178typedef __time_t time_t;
179
180
181typedef __clockid_t clockid_t;
182typedef __timer_t timer_t;
183typedef unsigned long int ulong;
184typedef unsigned short int ushort;
185typedef unsigned int uint;
186typedef int int8_t __attribute__ ((__mode__ (__QI__)));
187typedef int int16_t __attribute__ ((__mode__ (__HI__)));
188typedef int int32_t __attribute__ ((__mode__ (__SI__)));
189typedef int int64_t __attribute__ ((__mode__ (__DI__)));
190typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
191typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
192typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
193typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
194typedef int register_t __attribute__ ((__mode__ (__word__)));
195typedef int __sig_atomic_t;
196typedef struct
197 {
198 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
199 } __sigset_t;
200typedef __sigset_t sigset_t;
201struct timespec
202 {
203 __time_t tv_sec;
204 long int tv_nsec;
205 };
206struct timeval
207 {
208 __time_t tv_sec;
209 __suseconds_t tv_usec;
210 };
211typedef __suseconds_t suseconds_t;
212typedef long int __fd_mask;
213typedef struct
214 {
215 __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
216 } fd_set;
217typedef __fd_mask fd_mask;
218
219extern int select (int __nfds, fd_set *__restrict __readfds,
220 fd_set *__restrict __writefds,
221 fd_set *__restrict __exceptfds,
222 struct timeval *__restrict __timeout);
223extern int pselect (int __nfds, fd_set *__restrict __readfds,
224 fd_set *__restrict __writefds,
225 fd_set *__restrict __exceptfds,
226 const struct timespec *__restrict __timeout,
227 const __sigset_t *__restrict __sigmask);
228
229
230__extension__
231extern unsigned int gnu_dev_major (unsigned long long int __dev)
232 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
233__extension__
234extern unsigned int gnu_dev_minor (unsigned long long int __dev)
235 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
236__extension__
237extern unsigned long long int gnu_dev_makedev (unsigned int __major,
238 unsigned int __minor)
239 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
240
241typedef __blksize_t blksize_t;
242typedef __blkcnt_t blkcnt_t;
243typedef __fsblkcnt_t fsblkcnt_t;
244
245
246typedef __fsfilcnt_t fsfilcnt_t;
247typedef unsigned long int pthread_t;
248typedef union
249{
250 char __size[56];
251 long int __align;
252} pthread_attr_t;
253typedef struct __pthread_internal_list
254{
255 struct __pthread_internal_list *__prev;
256 struct __pthread_internal_list *__next;
257} __pthread_list_t;
258typedef union
259{
260 struct __pthread_mutex_s
261 {
262 int __lock;
263 unsigned int __count;
264 int __owner;
265 unsigned int __nusers;
266 int __kind;
267 int __spins;
268 __pthread_list_t __list;
269 } __data;
270 char __size[40];
271 long int __align;
272} pthread_mutex_t;
273typedef union
274{
275 char __size[4];
276 int __align;
277} pthread_mutexattr_t;
278typedef union
279{
280 struct
281 {
282 int __lock;
283 unsigned int __futex;
284 __extension__ unsigned long long int __total_seq;
285 __extension__ unsigned long long int __wakeup_seq;
286 __extension__ unsigned long long int __woken_seq;
287 void *__mutex;
288 unsigned int __nwaiters;
289 unsigned int __broadcast_seq;
290 } __data;
291 char __size[48];
292 __extension__ long long int __align;
293} pthread_cond_t;
294typedef union
295{
296 char __size[4];
297 int __align;
298} pthread_condattr_t;
299typedef unsigned int pthread_key_t;
300typedef int pthread_once_t;
301typedef union
302{
303 struct
304 {
305 int __lock;
306 unsigned int __nr_readers;
307 unsigned int __readers_wakeup;
308 unsigned int __writer_wakeup;
309 unsigned int __nr_readers_queued;
310 unsigned int __nr_writers_queued;
311 int __writer;
312 int __shared;
313 unsigned long int __pad1;
314 unsigned long int __pad2;
315 unsigned int __flags;
316 } __data;
317 char __size[56];
318 long int __align;
319} pthread_rwlock_t;
320typedef union
321{
322 char __size[8];
323 long int __align;
324} pthread_rwlockattr_t;
325typedef volatile int pthread_spinlock_t;
326typedef union
327{
328 char __size[32];
329 long int __align;
330} pthread_barrier_t;
331typedef union
332{
333 char __size[4];
334 int __align;
335} pthread_barrierattr_t;
336
337extern long int random (void) __attribute__ ((__nothrow__ , __leaf__));
338extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
339extern char *initstate (unsigned int __seed, char *__statebuf,
340 size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
341
342
343extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
344
345
346
347
348
349
350
351struct random_data
352 {
353 int32_t *fptr;
354 int32_t *rptr;
355 int32_t *state;
356 int rand_type;
357 int rand_deg;
358 int rand_sep;
359 int32_t *end_ptr;
360 };
361
362extern int random_r (struct random_data *__restrict __buf,
363 int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
364
365extern int srandom_r (unsigned int __seed, struct random_data *__buf)
366 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
367
368extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
369 size_t __statelen,
370 struct random_data *__restrict __buf)
371 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
372
373extern int setstate_r (char *__restrict __statebuf,
374 struct random_data *__restrict __buf)
375 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
376
377
378
379
380
381
382extern int rand (void) __attribute__ ((__nothrow__ , __leaf__));
383
384extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
385
386
387
388
389extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__));
390
391
392
393
394
395
396
397extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__));
398extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
399
400
401extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
402extern long int nrand48 (unsigned short int __xsubi[3])
403 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
404
405
406extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
407extern long int jrand48 (unsigned short int __xsubi[3])
408 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
409
410
411extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__));
412extern unsigned short int *seed48 (unsigned short int __seed16v[3])
413 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
414extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
415
416
417
418
419
420struct drand48_data
421 {
422 unsigned short int __x[3];
423 unsigned short int __old_x[3];
424 unsigned short int __c;
425 unsigned short int __init;
426 unsigned long long int __a;
427 };
428
429
430extern int drand48_r (struct drand48_data *__restrict __buffer,
431 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
432extern int erand48_r (unsigned short int __xsubi[3],
433 struct drand48_data *__restrict __buffer,
434 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
435
436
437extern int lrand48_r (struct drand48_data *__restrict __buffer,
438 long int *__restrict __result)
439 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
440extern int nrand48_r (unsigned short int __xsubi[3],
441 struct drand48_data *__restrict __buffer,
442 long int *__restrict __result)
443 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
444
445
446extern int mrand48_r (struct drand48_data *__restrict __buffer,
447 long int *__restrict __result)
448 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
449extern int jrand48_r (unsigned short int __xsubi[3],
450 struct drand48_data *__restrict __buffer,
451 long int *__restrict __result)
452 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
453
454
455extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
456 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
457
458extern int seed48_r (unsigned short int __seed16v[3],
459 struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
460
461extern int lcong48_r (unsigned short int __param[7],
462 struct drand48_data *__buffer)
463 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
464
465
466
467
468
469
470
471
472
473extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
474
475extern void *calloc (size_t __nmemb, size_t __size)
476 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
477
478
479
480
481
482
483
484
485
486
487extern void *realloc (void *__ptr, size_t __size)
488 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
489
490extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
491
492
493
494
495extern void cfree (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
496
497extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
498
499
500
501
502
503
504
505extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
506
507
508
509
510extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
511 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
512
513
514
515
516extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
517
518
519
520extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
521
522extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
523 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
524
525extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
526
527
528extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
529
530
531extern char *getenv (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
532
533extern char *__secure_getenv (__const char *__name)
534 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
535extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
536extern int setenv (__const char *__name, __const char *__value, int __replace)
537 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
538extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
539extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__));
540extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
541extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
542extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
543extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
544
545extern int system (__const char *__command) ;
546
547extern char *realpath (__const char *__restrict __name,
548 char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) ;
549typedef int (*__compar_fn_t) (__const void *, __const void *);
550
551extern void *bsearch (__const void *__key, __const void *__base,
552 size_t __nmemb, size_t __size, __compar_fn_t __compar)
553 __attribute__ ((__nonnull__ (1, 2, 5))) ;
554extern void qsort (void *__base, size_t __nmemb, size_t __size,
555 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
556extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
557extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
558
559__extension__ extern long long int llabs (long long int __x)
560 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
561
562extern div_t div (int __numer, int __denom)
563 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
564extern ldiv_t ldiv (long int __numer, long int __denom)
565 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
566
567
568__extension__ extern lldiv_t lldiv (long long int __numer,
569 long long int __denom)
570 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
571
572extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
573 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
574extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
575 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
576extern char *gcvt (double __value, int __ndigit, char *__buf)
577 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) ;
578extern char *qecvt (long double __value, int __ndigit,
579 int *__restrict __decpt, int *__restrict __sign)
580 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
581extern char *qfcvt (long double __value, int __ndigit,
582 int *__restrict __decpt, int *__restrict __sign)
583 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
584extern char *qgcvt (long double __value, int __ndigit, char *__buf)
585 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) ;
586extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
587 int *__restrict __sign, char *__restrict __buf,
588 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
589extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
590 int *__restrict __sign, char *__restrict __buf,
591 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
592extern int qecvt_r (long double __value, int __ndigit,
593 int *__restrict __decpt, int *__restrict __sign,
594 char *__restrict __buf, size_t __len)
595 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
596extern int qfcvt_r (long double __value, int __ndigit,
597 int *__restrict __decpt, int *__restrict __sign,
598 char *__restrict __buf, size_t __len)
599 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
600
601extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) ;
602extern int mbtowc (wchar_t *__restrict __pwc,
603 __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) ;
604extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__)) ;
605extern size_t mbstowcs (wchar_t *__restrict __pwcs,
606 __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
607extern size_t wcstombs (char *__restrict __s,
608 __const wchar_t *__restrict __pwcs, size_t __n)
609 __attribute__ ((__nothrow__ , __leaf__));
610
611extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
612extern int getsubopt (char **__restrict __optionp,
613 char *__const *__restrict __tokens,
614 char **__restrict __valuep)
615 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) ;
616extern int getloadavg (double __loadavg[], int __nelem)
617 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
618
619extern int __VERIFIER_nondet_int(void);
620static void fail(void) {
621ERROR: __VERIFIER_error();
622}
623struct node {
624 struct node *next;
625 struct node *prev;
626};
627static struct node* alloc_node(void)
628{
629 struct node *ptr = malloc(sizeof *ptr);
630 if (!ptr)
631 abort();
632 ptr->next = ((void *)0);
633 ptr->prev = ((void *)0);
634 return ptr;
635}
636static void chain_node(struct node **ppnode)
637{
638 struct node *node = alloc_node();
639 node->next = *ppnode;
640 *ppnode = node;
641}
642static struct node* create_sll(const struct node **pp1, const struct node **pp2)
643{
644 struct node *list = ((void *)0);
645 do
646 chain_node(&list);
647 while (__VERIFIER_nondet_int());
648 *pp2 = list;
649 while (__VERIFIER_nondet_int())
650 chain_node(&list);
651 *pp1 = list;
652 do
653 chain_node(&list);
654 while (__VERIFIER_nondet_int());
655 return list;
656}
657void init_back_link(struct node *list) {
658 for (;;) {
659 struct node *next = list->next;
660 if (!next)
661 return;
662 next->prev = list;
663 list = next;
664 }
665}
666void reverse_dll(struct node *list) {
667 while (list) {
668 struct node *next = list->next;
669 list->next = list->prev;
670 list->prev = next;
671 list = next;
672 }
673}
674void remove_fw_link(struct node *list) {
675 while (list) {
676 struct node *next = list->next;
677 list->next = ((void *)0);
678 list = next;
679 }
680}
681void check_seq_next(const struct node *beg, const struct node *const end) {
682 do { if (!(beg)) fail(); } while (0);
683 do { if (!(end)) fail(); } while (0);
684 for (beg = beg->next; end != beg; beg = beg->next)
685 do { if (!(beg)) fail(); } while (0);
686}
687void check_seq_prev(const struct node *beg, const struct node *const end) {
688 do { if (!(beg)) fail(); } while (0);
689 do { if (!(end)) fail(); } while (0);
690 for (beg = beg->prev; end != beg; beg = beg->prev)
691 do { if (!(beg)) fail(); } while (0);
692}
693int main()
694{
695 const struct node *p1, *p2;
696 struct node *list = create_sll(&p1, &p2);
697 do { } while (0);
698 check_seq_next(p1, p2);
699 do { if (!(!p1->prev)) fail(); } while (0);
700 do { if (!(!p2->prev)) fail(); } while (0);
701 init_back_link(list);
702 do { } while (0);
703 check_seq_next(p1, p2);
704 check_seq_prev(p2, p1);
705 reverse_dll(list);
706 do { } while (0);
707 check_seq_prev(p1, p2);
708 check_seq_next(p2, p1);
709 remove_fw_link(list);
710 do { } while (0);
711 check_seq_prev(p1, p2);
712 while (list) {
713 struct node *prev = list->prev;
714 free(list);
715 list = prev;
716 }
717 return 0;
718}
Note: See TracBrowser for help on using the repository browser.