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