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