-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patharrays.c
354 lines (328 loc) · 8.77 KB
/
arrays.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
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
// ---------------------------------------------
// C file generated from arrays.pvs
// ---------------------------------------------
// Make sure to link GMP in compilation:
// gcc -o arrays arrays.c -lgmp
// ./arrays
// ---------------------------------------------
#include<stdio.h>
#include<gmp.h>
#include "arrays.h"
#define TRUE 1
#define FALSE 0
int main(void) {
printf("Executing arrays ...\n");
return 0;
}
void pvs_b2157(mpz_t result, int x) {
mpz_set_si(result, (long) x);
}
void pvs_d_b2158(mpz_t result, int x) {
mpz_set_si(result, (long) x);
}
mpz_t* pvs_getb2159(int a) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2164 = 0; i2164 < 10; i2164++) {
mpz_init(result[i2164]);
}
for(int i2163 = 0; i2163 < 10;;; i2163++) {
pvs_d_b2158(result[i2163], i2163);
}
return result;
}
mpz_t* pvs_d_getb2160(int a) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2164 = 0; i2164 < 10; i2164++) {
mpz_init(result[i2164]);
}
for(int i2163 = 0; i2163 < 10;;; i2163++) {
pvs_d_b2158(result[i2163], i2163);
}
return result;
}
mpz_t* pvs_id2165(mpz_t* t56181) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2170 = 0; i2170 < 10; i2170++) {
mpz_init(result[i2170]);
}
for(int i2169 = 0; i2169 < 10; i2169++) {
mpz_set(result[i2169], t56181[i2169]);
}
return result;
}
mpz_t* pvs_d_id2166(mpz_t* t56181) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2170 = 0; i2170 < 10; i2170++) {
mpz_init(result[i2170]);
}
for(int i2169 = 0; i2169 < 10; i2169++) {
mpz_set(result[i2169], t56181[i2169]);
}
return result;
}
mpz_t* pvs_id22171(mpz_t* t56181) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2176 = 0; i2176 < 10; i2176++) {
mpz_init(result[i2176]);
}
for(int i2175 = 0; i2175 < 10; i2175++) {
mpz_set(result[i2175], pvs_d_id2166(pvs_d_id2166(t56181))[i2175]);
}
return result;
}
mpz_t* pvs_d_id22172(mpz_t* t56181) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2176 = 0; i2176 < 10; i2176++) {
mpz_init(result[i2176]);
}
for(int i2175 = 0; i2175 < 10; i2175++) {
mpz_set(result[i2175], pvs_d_id2166(pvs_d_id2166(t56181))[i2175]);
}
return result;
}
mpz_t* pvs_incr2177(mpz_t* t56181) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2187 = 0; i2187 < 10; i2187++) {
mpz_init(result[i2187]);
}
L2186 = ( (int) mpz_get_si(t56181[0]) );
for(int i2185 = 0; i2185 < 10; i2185++) {
mpz_set(result[i2185], t56181[i2185]);
}
mpz_set(result[L2186], t56181[9]);
return result;
}
mpz_t* pvs_d_incr2178(mpz_t* t56181) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2187 = 0; i2187 < 10; i2187++) {
mpz_init(result[i2187]);
}
L2186 = ( (int) mpz_get_si(t56181[0]) );
for(int i2185 = 0; i2185 < 10; i2185++) {
mpz_set(result[i2185], t56181[i2185]);
}
mpz_set(result[L2186], t56181[9]);
return result;
}
mpz_t* pvs_decr2188(mpz_t* t56181) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2195 = 0; i2195 < 10; i2195++) {
mpz_init(result[i2195]);
}
L2194 = 0;
for(int i2193 = 0; i2193 < 10;;; i2193++) {
pvs_d_b2158(result[i2193], i2193);
}
mpz_set_si(result[L2194], (long) 1);
return result;
}
mpz_t* pvs_d_decr2189(mpz_t* t56181) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2195 = 0; i2195 < 10; i2195++) {
mpz_init(result[i2195]);
}
L2194 = 0;
for(int i2193 = 0; i2193 < 10;;; i2193++) {
pvs_d_b2158(result[i2193], i2193);
}
mpz_set_si(result[L2194], (long) 1);
return result;
}
mpz_t* pvs_sum2196(mpz_t* T, mpz_t* U) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2201 = 0; i2201 < 10; i2201++) {
mpz_init(result[i2201]);
}
for(int i2200 = 0; i2200 < 10;;; i2200++) {
mpz_add(result[i2200], T[i2200], U[i2200]);
}
return result;
}
mpz_t* pvs_d_sum2197(mpz_t* T, mpz_t* U) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2201 = 0; i2201 < 10; i2201++) {
mpz_init(result[i2201]);
}
for(int i2200 = 0; i2200 < 10;;; i2200++) {
mpz_add(result[i2200], T[i2200], U[i2200]);
}
return result;
}
mpz_t* pvs_foo2202(mpz_t* t56181) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2215 = 0; i2215 < 10; i2215++) {
mpz_init(result[i2215]);
}
L2213 = 0;
L2214 = ( (int) mpz_get_si(t56181[0]) );
for(int i2212 = 0; i2212 < 10; i2212++) {
mpz_set(result[i2212], t56181[i2212]);
}
mpz_add_ui(result[L2213], t56181[9], (unsigned long) 1);
mpz_add_ui(result[L2214], t56181[0], (unsigned long) 1);
return result;
}
mpz_t* pvs_d_foo2203(mpz_t* t56181) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2215 = 0; i2215 < 10; i2215++) {
mpz_init(result[i2215]);
}
L2213 = 0;
L2214 = ( (int) mpz_get_si(t56181[0]) );
for(int i2212 = 0; i2212 < 10; i2212++) {
mpz_set(result[i2212], t56181[i2212]);
}
mpz_add_ui(result[L2213], t56181[9], (unsigned long) 1);
mpz_add_ui(result[L2214], t56181[0], (unsigned long) 1);
return result;
}
int** pvs_bar2216(int** t56181) {
int** result;
result = malloc( 10 * sizeof(int*) );
for(int i2247 = 0; i2247 < 10; i2247++) {
result[i2247] = malloc( 8 * sizeof(int) );
}
L2240 = 0;
L2242 = 0;
int** aux2243;
aux2243 = malloc( 10 * sizeof(int*) );
for(int i2244 = 0; i2244 < 10; i2244++) {
aux2243[i2244] = malloc( 8 * sizeof(int) );
}
for(int i2238 = 0; i2238 < 10; i2238++) {
for(int i2239 = 0; i2239 < 8; i2239++) {
aux2243[i2238][i2239] = t56181[i2238][i2239];
}
}
int* E2241 = aux2243[L2240];
E2241[L2242] = 0;
int** a = aux2243;
for(int i2245 = 0; i2245 < 10; i2245++) {
for(int i2246 = 0; i2246 < 8; i2246++) {
result[i2245][i2246] = a[i2245][i2246];
}
}
free(aux2243);
return result;
}
int** pvs_d_bar2217(int** t56181) {
int** result;
result = malloc( 10 * sizeof(int*) );
for(int i2247 = 0; i2247 < 10; i2247++) {
result[i2247] = malloc( 8 * sizeof(int) );
}
L2240 = 0;
L2242 = 0;
int** aux2243;
aux2243 = malloc( 10 * sizeof(int*) );
for(int i2244 = 0; i2244 < 10; i2244++) {
aux2243[i2244] = malloc( 8 * sizeof(int) );
}
for(int i2238 = 0; i2238 < 10; i2238++) {
for(int i2239 = 0; i2239 < 8; i2239++) {
aux2243[i2238][i2239] = t56181[i2238][i2239];
}
}
int* E2241 = aux2243[L2240];
E2241[L2242] = 0;
int** a = aux2243;
for(int i2245 = 0; i2245 < 10; i2245++) {
for(int i2246 = 0; i2246 < 8; i2246++) {
result[i2245][i2246] = a[i2245][i2246];
}
}
free(aux2243);
return result;
}
mpz_t* pvs_test2248(mpz_t* t56181) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2261 = 0; i2261 < 10; i2261++) {
mpz_init(result[i2261]);
}
L2259 = 0;
for(int i2258 = 0; i2258 < 10; i2258++) {
mpz_set(result[i2258], t56181[i2258]);
}
mpz_t conv2260;
mpz_init(conv2260);
mpz_set_si(conv2260, (long) 8);
mpz_add_ui(result[L2259], conv2260, (unsigned long) 1);
mpz_clear(conv2260);
return result;
}
mpz_t* pvs_d_test2249(mpz_t* t56181) {
mpz_t* result;
result = malloc( 10 * sizeof(mpz_t) );
for(int i2261 = 0; i2261 < 10; i2261++) {
mpz_init(result[i2261]);
}
L2259 = 0;
for(int i2258 = 0; i2258 < 10; i2258++) {
mpz_set(result[i2258], t56181[i2258]);
}
mpz_t conv2260;
mpz_init(conv2260);
mpz_set_si(conv2260, (long) 8);
mpz_add_ui(result[L2259], conv2260, (unsigned long) 1);
mpz_clear(conv2260);
return result;
}
mpz_t** pvs_set02262(mpz_t** t56181, int x, int y) {
mpz_t** result;
result = malloc( 10 * sizeof(mpz_t*) );
for(int i2283 = 0; i2283 < 10; i2283++) {
result[i2283] = malloc( 10 * sizeof(mpz_t) );
for(int i2284 = 0; i2284 < 10; i2284++) {
mpz_init(result[i2283][i2284]);
}
}
L2280 = x;
for(int i2278 = 0; i2278 < 10; i2278++) {
for(int i2279 = 0; i2279 < 10; i2279++) {
mpz_set(result[i2278][i2279], t56181[i2278][i2279]);
}
}
L2282 = 0;
for(int i2281 = 0; i2281 < 10; i2281++) {
mpz_set(result[L2280][i2281], t56181[0][i2281]);
}
mpz_set_si(result[L2280][L2282], (long) 0);
return result;
}
mpz_t** pvs_d_set02263(mpz_t** t56181, int x, int y) {
mpz_t** result;
result = malloc( 10 * sizeof(mpz_t*) );
for(int i2283 = 0; i2283 < 10; i2283++) {
result[i2283] = malloc( 10 * sizeof(mpz_t) );
for(int i2284 = 0; i2284 < 10; i2284++) {
mpz_init(result[i2283][i2284]);
}
}
L2280 = x;
for(int i2278 = 0; i2278 < 10; i2278++) {
for(int i2279 = 0; i2279 < 10; i2279++) {
mpz_set(result[i2278][i2279], t56181[i2278][i2279]);
}
}
L2282 = 0;
for(int i2281 = 0; i2281 < 10; i2281++) {
mpz_set(result[L2280][i2281], t56181[0][i2281]);
}
mpz_set_si(result[L2280][L2282], (long) 0);
return result;
}