privately export pet_stmt_is_affine_assume
[pet.git] / tests / conditional_assignment2.scop
blob4869905372fd54f1094dc819ecc185f6625d1491
1 start: 225
2 end: 507
3 indent: "\t"
4 context: '[M, N] -> {  : 0 <= M <= 2147483647 and 0 <= N <= 2147483647 }'
5 schedule: '{ domain: "[M, N] -> { S_17[]; S_12[]; S_5[i, j] : 0 <= i < N and 0 <=
6   j < M; S_3[i] : 0 <= i < N; S_14[]; S_13[]; S_0[]; S_10[i] : 0 <= i < N; S_4[i,
7   j] : 0 <= i < N and 0 <= j < M; S_9[]; S_11[i] : 0 <= i < N; S_2[i] : 0 <= i < N;
8   S_1[]; S_15[]; S_7[i] : 0 <= i < N; S_16[]; S_6[i] : 0 <= i < N; S_8[] }", child:
9   { sequence: [ { filter: "[N, M] -> { S_0[] }" }, { filter: "[N, M] -> { S_1[] }"
10   }, { filter: "[N, M] -> { S_6[i]; S_7[i]; S_5[i, j]; S_3[i]; S_4[i, j]; S_2[i] }",
11   child: { schedule: "[N, M] -> L_0[{ S_6[i] -> [(i)]; S_7[i] -> [(i)]; S_5[i, j]
12   -> [(i)]; S_3[i] -> [(i)]; S_4[i, j] -> [(i)]; S_2[i] -> [(i)] }]", child: { sequence:
13   [ { filter: "[N, M] -> { S_2[i] }" }, { filter: "[N, M] -> { S_3[i] }" }, { filter:
14   "[N, M] -> { S_5[i, j]; S_4[i, j] }", child: { schedule: "[N, M] -> L_1[{ S_5[i,
15   j] -> [(j)]; S_4[i, j] -> [(j)] }]", child: { sequence: [ { filter: "[N, M] -> {
16   S_4[i, j] }" }, { filter: "[N, M] -> { S_5[i, j] }" } ] } } }, { filter: "[N, M]
17   -> { S_6[i] }" }, { filter: "[N, M] -> { S_7[i] }" } ] } } }, { filter: "[N, M]
18   -> { S_8[] }" }, { filter: "[N, M] -> { S_9[] }" }, { filter: "[N, M] -> { S_10[i];
19   S_11[i] }", child: { schedule: "[N] -> L_2[{ S_11[i] -> [(i)]; S_10[i] -> [(i)]
20   }]", child: { sequence: [ { filter: "[N] -> { S_10[i] }" }, { filter: "[N] -> {
21   S_11[i] }" } ] } } }, { filter: "[N, M] -> { S_17[]; S_12[]; S_16[]; S_13[]; S_14[];
22   S_15[] }", child: { set: [ { filter: "{ S_12[] }" }, { filter: "{ S_13[] }" }, {
23   filter: "{ S_14[] }" }, { filter: "{ S_15[] }" }, { filter: "{ S_16[] }" }, { filter:
24   "{ S_17[] }" } ] } } ] } }'
25 arrays:
26 - context: '[N] -> {  : N >= 0 }'
27   extent: '[M, N] -> { A[i0, i1] : 0 <= i0 < N and 0 <= i1 <= 9 }'
28   element_type: int
29   element_size: 4
30 - context: '[N] -> {  : N >= 0 }'
31   extent: '[M, N] -> { C[i0] : 0 <= i0 < N }'
32   element_type: int
33   element_size: 4
34 - context: '{  :  }'
35   extent: '[M, N] -> { i[] }'
36   element_type: int
37   element_size: 4
38 - context: '[M, N] -> {  : M >= 0 and N >= 0 }'
39   extent: '[M, N] -> { in1[i0, i1] : 0 <= i0 < N and 0 <= i1 < M }'
40   element_type: int
41   element_size: 4
42 - context: '{  :  }'
43   extent: '[M, N] -> { in2[] }'
44   value_bounds: '{ [i0] : -1 <= i0 <= 1 }'
45   element_type: int
46   element_size: 4
47 - context: '{  :  }'
48   extent: '[M, N] -> { j[] }'
49   element_type: int
50   element_size: 4
51 - context: '{  :  }'
52   extent: '[M, N] -> { m[] }'
53   element_type: int
54   element_size: 4
55 statements:
56 - line: 21
57   domain: '[M, N] -> { S_0[] }'
58   body:
59     type: expression
60     expr:
61       type: op
62       operation: =
63       arguments:
64       - type: access
65         index: '[M, N] -> { S_0[] -> in2[] }'
66         reference: __pet_ref_0
67         read: 0
68         write: 1
69       - type: call
70         name: g2
71 - line: 22
72   domain: '[M, N] -> { S_1[] }'
73   body:
74     type: expression
75     expr:
76       type: op
77       operation: =
78       arguments:
79       - type: access
80         index: '[M, N] -> { S_1[] -> i[] }'
81         reference: __pet_ref_1
82         read: 0
83         write: 1
84       - type: int
85         value: 0
86 - line: 23
87   domain: '[M, N] -> { S_2[i] : 0 <= i < N }'
88   body:
89     type: expression
90     expr:
91       type: op
92       operation: =
93       arguments:
94       - type: access
95         index: '[M, N] -> { S_2[i] -> m[] }'
96         reference: __pet_ref_2
97         read: 0
98         write: 1
99       - type: access
100         index: '[M, N] -> { S_2[i] -> [(1 + i)] }'
101         reference: __pet_ref_3
102         read: 1
103         write: 0
104 - line: 24
105   domain: '[M, N] -> { S_3[i] : 0 <= i < N }'
106   body:
107     type: expression
108     expr:
109       type: op
110       operation: =
111       arguments:
112       - type: access
113         index: '[M, N] -> { S_3[i] -> j[] }'
114         reference: __pet_ref_4
115         read: 0
116         write: 1
117       - type: int
118         value: 0
119 - line: 25
120   domain: '[M, N] -> { S_4[i, j] : 0 <= i < N and 0 <= j < M }'
121   body:
122     type: expression
123     expr:
124       type: op
125       operation: =
126       arguments:
127       - type: access
128         index: '[M, N] -> { S_4[i, j] -> m[] }'
129         reference: __pet_ref_5
130         read: 0
131         write: 1
132       - type: call
133         name: g
134         arguments:
135         - type: call
136           name: h
137           arguments:
138           - type: access
139             index: '[M, N] -> { S_4[i, j] -> m[] }'
140             reference: __pet_ref_6
141             read: 1
142             write: 0
143         - type: access
144           index: '[M, N] -> { S_4[i, j] -> in1[(i), (j)] }'
145           reference: __pet_ref_7
146           read: 1
147           write: 0
148 - line: 24
149   domain: '[M, N] -> { S_5[i, j] : 0 <= i < N and 0 <= j < M }'
150   body:
151     type: expression
152     expr:
153       type: op
154       operation: =
155       arguments:
156       - type: access
157         index: '[M, N] -> { S_5[i, j] -> j[] }'
158         reference: __pet_ref_8
159         read: 0
160         write: 1
161       - type: access
162         index: '[M, N] -> { S_5[i, j] -> [(1 + j)] }'
163         reference: __pet_ref_9
164         read: 1
165         write: 0
166 - line: 26
167   domain: '[M, N] -> { S_6[i] : 0 <= i < N }'
168   body:
169     type: expression
170     expr:
171       type: call
172       name: compute_row
173       arguments:
174       - type: call
175         name: h
176         arguments:
177         - type: access
178           index: '[M, N] -> { S_6[i] -> m[] }'
179           reference: __pet_ref_10
180           read: 1
181           write: 0
182       - type: access
183         may_read: '[M, N] -> { S_6[i] -> A[i, o1] }'
184         may_write: '[M, N] -> { S_6[i] -> A[i, o1] }'
185         must_write: '[M, N] -> {  }'
186         index: '[M, N] -> { S_6[i] -> A[(i)] }'
187         depth: 2
188         reference: __pet_ref_11
189         read: 1
190         write: 1
191 - line: 22
192   domain: '[M, N] -> { S_7[i] : 0 <= i < N }'
193   body:
194     type: expression
195     expr:
196       type: op
197       operation: =
198       arguments:
199       - type: access
200         index: '[M, N] -> { S_7[i] -> i[] }'
201         reference: __pet_ref_12
202         read: 0
203         write: 1
204       - type: access
205         index: '[M, N] -> { S_7[i] -> [(1 + i)] }'
206         reference: __pet_ref_13
207         read: 1
208         write: 0
209 - line: 28
210   domain: '[M, N] -> { S_8[] }'
211   body:
212     type: expression
213     expr:
214       type: op
215       operation: =
216       arguments:
217       - type: access
218         index: '[M, N] -> { S_8[] -> A[(5), (6)] }'
219         reference: __pet_ref_14
220         read: 0
221         write: 1
222       - type: int
223         value: 0
224 - line: 29
225   domain: '[M, N] -> { S_9[] }'
226   body:
227     type: expression
228     expr:
229       type: op
230       operation: =
231       arguments:
232       - type: access
233         index: '[M, N] -> { S_9[] -> i[] }'
234         reference: __pet_ref_15
235         read: 0
236         write: 1
237       - type: int
238         value: 0
239 - line: 30
240   domain: '[M, N] -> { S_10[i] : 0 <= i < N }'
241   body:
242     type: expression
243     expr:
244       type: op
245       operation: =
246       arguments:
247       - type: access
248         index: '[M, N] -> { S_10[i] -> C[(i)] }'
249         reference: __pet_ref_16
250         read: 0
251         write: 1
252       - type: op
253         operation: '?:'
254         arguments:
255         - type: access
256           index: '[M, N] -> { [S_10[i] -> [i1]] -> [((0) : i1 = N - i; (1) : -i <=
257             i1 < N - i; (0) : i1 = -1 - i)] }'
258           reference: __pet_ref_18
259           read: 1
260           write: 0
261           arguments:
262           - type: access
263             index: '[M, N] -> { S_10[i] -> in2[] }'
264             reference: __pet_ref_17
265             read: 1
266             write: 0
267         - type: call
268           name: f
269           arguments:
270           - type: access
271             may_read: '[M, N] -> { [S_10[i] -> [i1]] -> A[i + i1, o1] : -i <= i1 <
272               N - i }'
273             index: '[M, N] -> { [S_10[i] -> [i1]] -> A[((i + i1) : i1 >= -i)] }'
274             depth: 2
275             reference: __pet_ref_20
276             read: 1
277             write: 0
278             arguments:
279             - type: access
280               may_read: '[M, N] -> { S_10[i] -> in2[] }'
281               index: '[M, N] -> { S_10[i] -> in2[] }'
282               reference: __pet_ref_19
283               read: 1
284               write: 0
285         - type: int
286           value: 0
287 - line: 29
288   domain: '[M, N] -> { S_11[i] : 0 <= i < N }'
289   body:
290     type: expression
291     expr:
292       type: op
293       operation: =
294       arguments:
295       - type: access
296         index: '[M, N] -> { S_11[i] -> i[] }'
297         reference: __pet_ref_21
298         read: 0
299         write: 1
300       - type: access
301         index: '[M, N] -> { S_11[i] -> [(1 + i)] }'
302         reference: __pet_ref_22
303         read: 1
304         write: 0
305 - line: -1
306   domain: '[M, N] -> { S_12[] }'
307   body:
308     type: expression
309     expr:
310       type: op
311       operation: kill
312       arguments:
313       - type: access
314         killed: '[M, N] -> { S_12[] -> i[] }'
315         index: '[M, N] -> { S_12[] -> i[] }'
316         reference: __pet_ref_23
317         kill: 1
318 - line: -1
319   domain: '[M, N] -> { S_13[] }'
320   body:
321     type: expression
322     expr:
323       type: op
324       operation: kill
325       arguments:
326       - type: access
327         killed: '[M, N] -> { S_13[] -> j[] }'
328         index: '[M, N] -> { S_13[] -> j[] }'
329         reference: __pet_ref_24
330         kill: 1
331 - line: -1
332   domain: '[M, N] -> { S_14[] }'
333   body:
334     type: expression
335     expr:
336       type: op
337       operation: kill
338       arguments:
339       - type: access
340         killed: '[M, N] -> { S_14[] -> in1[o0, o1] : 0 <= o0 < N and 0 <= o1 < M }'
341         index: '[M, N] -> { S_14[] -> in1[] }'
342         depth: 2
343         reference: __pet_ref_25
344         kill: 1
345 - line: -1
346   domain: '[M, N] -> { S_15[] }'
347   body:
348     type: expression
349     expr:
350       type: op
351       operation: kill
352       arguments:
353       - type: access
354         killed: '[M, N] -> { S_15[] -> in2[] }'
355         index: '[M, N] -> { S_15[] -> in2[] }'
356         reference: __pet_ref_26
357         kill: 1
358 - line: -1
359   domain: '[M, N] -> { S_16[] }'
360   body:
361     type: expression
362     expr:
363       type: op
364       operation: kill
365       arguments:
366       - type: access
367         killed: '[M, N] -> { S_16[] -> C[o0] : 0 <= o0 < N }'
368         index: '[M, N] -> { S_16[] -> C[] }'
369         depth: 1
370         reference: __pet_ref_27
371         kill: 1
372 - line: -1
373   domain: '[M, N] -> { S_17[] }'
374   body:
375     type: expression
376     expr:
377       type: op
378       operation: kill
379       arguments:
380       - type: access
381         killed: '[M, N] -> { S_17[] -> m[] }'
382         index: '[M, N] -> { S_17[] -> m[] }'
383         reference: __pet_ref_28
384         kill: 1