pet_stmt: use pet_tree to represent statement body
[pet.git] / tests / conditional_assignment2.scop
blob36f7306fbaab60d8d7822063057f198bc0c3a836
1 start: 225
2 end: 507
3 indent: "\t"
4 context: '[M, N] -> {  : N >= 0 and M >= 0 and M <= 2147483647 and N <= 2147483647
5   }'
6 arrays:
7 - context: '[N] -> {  : N >= 0 }'
8   extent: '[M, N] -> { A[i0, i1] : i0 >= 0 and i0 <= -1 + N and i1 >= 0 and i1 <=
9     9 }'
10   element_type: int
11   element_size: 4
12 - context: '[N] -> {  : N >= 0 }'
13   extent: '[M, N] -> { C[i0] : i0 <= -1 + N and i0 >= 0 }'
14   element_type: int
15   element_size: 4
16 - context: '[M, N] -> {  : N >= 0 and M >= 0 }'
17   extent: '[M, N] -> { in1[i0, i1] : i1 <= -1 + M and i1 >= 0 and i0 <= -1 + N and
18     i0 >= 0 }'
19   element_type: int
20   element_size: 4
21 - context: '{  :  }'
22   extent: '[M, N] -> { in2[] }'
23   value_bounds: '{ [i0] : i0 >= -1 and i0 <= 1 }'
24   element_type: int
25   element_size: 4
26 - context: '{  :  }'
27   extent: '[M, N] -> { m[] }'
28   element_type: int
29   element_size: 4
30 statements:
31 - line: 21
32   domain: '[M, N] -> { S_0[] }'
33   schedule: '{ S_0[] -> [0] }'
34   body:
35     type: expression
36     expr:
37       type: op
38       operation: =
39       arguments:
40       - type: access
41         relation: '[M, N] -> { S_0[] -> in2[] }'
42         index: '[M, N] -> { S_0[] -> in2[] }'
43         reference: __pet_ref_0
44         read: 0
45         write: 1
46       - type: call
47         name: g2
48 - line: 23
49   domain: '[M, N] -> { S_1[i] : i <= -1 + N and i >= 0 }'
50   schedule: '[N] -> { S_1[i] -> [1, i, 0] }'
51   body:
52     type: expression
53     expr:
54       type: op
55       operation: =
56       arguments:
57       - type: access
58         relation: '[M, N] -> { S_1[i] -> m[] }'
59         index: '[M, N] -> { S_1[i] -> m[] }'
60         reference: __pet_ref_1
61         read: 0
62         write: 1
63       - type: op
64         operation: +
65         arguments:
66         - type: access
67           relation: '[M, N] -> { S_1[i] -> [i] }'
68           index: '[M, N] -> { S_1[i] -> [(i)] }'
69           reference: __pet_ref_2
70           read: 1
71           write: 0
72         - type: int
73           value: 1
74 - line: 25
75   domain: '[M, N] -> { S_2[i, j] : j <= -1 + M and j >= 0 and i <= -1 + N and i >=
76     0 }'
77   schedule: '[N, M] -> { S_2[i, j] -> [1, i, 1, j] }'
78   body:
79     type: expression
80     expr:
81       type: op
82       operation: =
83       arguments:
84       - type: access
85         relation: '[M, N] -> { S_2[i, j] -> m[] }'
86         index: '[M, N] -> { S_2[i, j] -> m[] }'
87         reference: __pet_ref_3
88         read: 0
89         write: 1
90       - type: call
91         name: g
92         arguments:
93         - type: call
94           name: h
95           arguments:
96           - type: access
97             relation: '[M, N] -> { S_2[i, j] -> m[] }'
98             index: '[M, N] -> { S_2[i, j] -> m[] }'
99             reference: __pet_ref_4
100             read: 1
101             write: 0
102         - type: access
103           relation: '[M, N] -> { S_2[i, j] -> in1[i, j] }'
104           index: '[M, N] -> { S_2[i, j] -> in1[(i), (j)] }'
105           reference: __pet_ref_5
106           read: 1
107           write: 0
108 - line: 26
109   domain: '[M, N] -> { S_3[i] : i <= -1 + N and i >= 0 }'
110   schedule: '[N] -> { S_3[i] -> [1, i, 2] }'
111   body:
112     type: expression
113     expr:
114       type: call
115       name: compute_row
116       arguments:
117       - type: call
118         name: h
119         arguments:
120         - type: access
121           relation: '[M, N] -> { S_3[i] -> m[] }'
122           index: '[M, N] -> { S_3[i] -> m[] }'
123           reference: __pet_ref_6
124           read: 1
125           write: 0
126       - type: access
127         relation: '[M, N] -> { S_3[i] -> A[i, o1] }'
128         index: '[M, N] -> { S_3[i] -> A[(i)] }'
129         reference: __pet_ref_7
130         read: 0
131         write: 1
132 - line: 28
133   domain: '[M, N] -> { S_4[] }'
134   schedule: '{ S_4[] -> [2] }'
135   body:
136     type: expression
137     expr:
138       type: op
139       operation: =
140       arguments:
141       - type: access
142         relation: '[M, N] -> { S_4[] -> A[5, 6] }'
143         index: '[M, N] -> { S_4[] -> A[(5), (6)] }'
144         reference: __pet_ref_8
145         read: 0
146         write: 1
147       - type: int
148         value: 0
149 - line: 30
150   domain: '[M, N] -> { S_5[i] : i <= -1 + N and i >= 0 }'
151   schedule: '[N] -> { S_5[i] -> [3, i] }'
152   body:
153     type: expression
154     expr:
155       type: op
156       operation: =
157       arguments:
158       - type: access
159         relation: '[M, N] -> { S_5[i] -> C[i] }'
160         index: '[M, N] -> { S_5[i] -> C[(i)] }'
161         reference: __pet_ref_9
162         read: 0
163         write: 1
164       - type: op
165         operation: '?:'
166         arguments:
167         - type: access
168           relation: '[M, N] -> { [S_5[i] -> [i1]] -> [1] : i1 >= -i and i1 <= -1 +
169             N - i; [S_5[-1 + N] -> [1]] -> [0]; [S_5[0] -> [-1]] -> [0] }'
170           index: '[M, N] -> { [S_5[i] -> [i1]] -> [((1) : i1 >= -i and i1 <= -1 +
171             N - i; (0) : i = -1 + N and i1 = 1; (0) : i = 0 and i1 = -1)] }'
172           reference: __pet_ref_11
173           read: 1
174           write: 0
175           arguments:
176           - type: access
177             relation: '[M, N] -> { S_5[i] -> in2[] }'
178             index: '[M, N] -> { S_5[i] -> in2[] }'
179             reference: __pet_ref_10
180             read: 1
181             write: 0
182         - type: call
183           name: f
184           arguments:
185           - type: access
186             relation: '[M, N] -> { [S_5[i] -> [i1]] -> A[i + i1, o1] : i1 >= -i and
187               i1 <= -1 + N - i }'
188             index: '[M, N] -> { [S_5[i] -> [i1]] -> A[((i + i1) : i1 >= -i)] }'
189             reference: __pet_ref_13
190             read: 1
191             write: 0
192             arguments:
193             - type: access
194               relation: '[M, N] -> { S_5[i] -> in2[] }'
195               index: '[M, N] -> { S_5[i] -> in2[] }'
196               reference: __pet_ref_12
197               read: 1
198               write: 0
199         - type: int
200           value: 0