-
Notifications
You must be signed in to change notification settings - Fork 4
/
__VERIFIER32.c
116 lines (97 loc) · 2.39 KB
/
__VERIFIER32.c
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
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <assert.h>
void __VERIFIER_error() {
exit(100);
}
_Bool __VERIFIER_nondet_bool() {
_Bool x = 0;
read(0, &x, sizeof(x));
printf(" <input type=\"bool\">%d</input>\n", x);
return x;
}
char __VERIFIER_nondet_char() {
char x = 0;
read(0, &x, 1);
printf(" <input type=\"char\">%d</input>\n", x);
return x;
}
unsigned char __VERIFIER_nondet_uchar() {
unsigned char x = 0;
read(0, &x, 1);
printf(" <input type=\"unsigned char\">%u</input>\n", x);
return x;
}
short __VERIFIER_nondet_short() {
short x = 0;
read(0, &x, 2);
printf(" <input type=\"short\">%hi</input>\n", x);
return x;
}
unsigned short __VERIFIER_nondet_ushort() {
unsigned short x = 0;
read(0, &x, 2);
printf(" <input type=\"unsigned short\">%hu</input>\n", x);
return x;
}
unsigned long __VERIFIER_nondet_unsigned_long() {
unsigned long x = 0;
read(0, &x, 8);
printf(" <input type=\"unsigned long\">%lu</input>\n", x);
return x;
}
void * __VERIFIER_nondet_pointer() {
unsigned long x = 0;
read(0, &x, 4);
printf(" <input type=\"unsigned long\">%lu</input>\n", x);
return (void *) x;
}
long __VERIFIER_nondet_long() {
long x = 0;
read(0, &x, 8);
printf(" <input type=\"long\">%li</input>\n", x);
return x;
}
unsigned int __VERIFIER_nondet_uint() {
unsigned int x = 0;
read(0, &x, 4);
printf(" <input type=\"unsigned int\">%u</input>\n", x);
return x;
}
int __VERIFIER_nondet_int() {
int x = 0;
read(0, &x, 4);
printf(" <input type=\"int\">%d</input>\n", x);
return x;
}
unsigned __VERIFIER_nondet_unsigned() {
unsigned x = 0;
read(0, &x, 4);
printf(" <input type=\"unsigned\">%d</input>\n", x);
return x;
}
unsigned long __VERIFIER_nondet_ulong() {
unsigned long x = 0;
read(0, &x, 8);
printf(" <input type=\"unsigned long\">%lu</input>\n", x);
return x;
}
float __VERIFIER_nondet_float() {
float x = 0.0;
read(0, &x, 4);
printf(" <input type=\"float\">%f</input>\n", x);
return x;
}
double __VERIFIER_nondet_double() {
double x = 0.0;
read(0, &x, 8);
printf(" <input type=\"double\">%lf</input>\n", x);
return x;
}
// int __VERIFIER_nondet_const_char_pointer() {
// }
//int __VERIFIER_nondet_S8() {
// How many bytes in S8?
// return __my_read_int(8);
//}