limit parameters in context to possible values of corresponding variables
[pet.git] / tests / conditional_assignment2.scop
blobf2f1e9e306d3e3dd93142d36f14cd71553406847
1 context: '[N, M] -> {  : N >= 0 and M >= 0 and N <= 2147483647 and M <= 2147483647
2   }'
3 arrays:
4 - context: '[M, N] -> {  : N >= 0 and M >= 0 }'
5   extent: '[N, M] -> { in1[i0, i1] : i0 >= 0 and i1 >= 0 and i0 <= -1 + N and i1 <=
6     -1 + M }'
7   element_type: int
8 - context: '{  :  }'
9   extent: '{ in2[] }'
10   value_bounds: '{ [i0] : i0 >= -1 and i0 <= 1 }'
11   element_type: int
12 - context: '[N] -> {  : N >= 0 }'
13   extent: '[N] -> { A[i0, i1] : i0 >= 0 and i1 >= 0 and i0 <= -1 + N and i1 <= 9 }'
14   element_type: int
15 - context: '[N] -> {  : N >= 0 }'
16   extent: '[N] -> { C[i0] : i0 >= 0 and i0 <= -1 + N }'
17   element_type: int
18 - context: '{  :  }'
19   extent: '{ m[] }'
20   element_type: int
21 statements:
22 - line: 21
23   domain: '[N, M] -> { S_0[] }'
24   schedule: '{ S_0[] -> [0] }'
25   body:
26     type: binary
27     operation: =
28     arguments:
29     - type: access
30       relation: '[N, M] -> { S_0[] -> in2[] }'
31       read: 0
32       write: 1
33     - type: call
34       name: g2
35 - line: 23
36   domain: '[N, M] -> { S_1[i] : i >= 0 and i <= -1 + N }'
37   schedule: '[N] -> { S_1[i] -> [1, i, 0] }'
38   body:
39     type: binary
40     operation: =
41     arguments:
42     - type: access
43       relation: '[N, M] -> { S_1[i] -> m[] }'
44       read: 0
45       write: 1
46     - type: binary
47       operation: +
48       arguments:
49       - type: access
50         relation: '[N, M] -> { S_1[i] -> [i] }'
51         read: 1
52         write: 0
53       - type: access
54         relation: '[N, M] -> { S_1[i] -> [1] }'
55         read: 1
56         write: 0
57 - line: 25
58   domain: '[N, M] -> { S_2[i, j] : j >= 0 and i >= 0 and i <= -1 + N and j <= -1 +
59     M }'
60   schedule: '[M, N] -> { S_2[i, j] -> [1, i, 1, j] }'
61   body:
62     type: binary
63     operation: =
64     arguments:
65     - type: access
66       relation: '[N, M] -> { S_2[i, j] -> m[] }'
67       read: 0
68       write: 1
69     - type: call
70       name: g
71       arguments:
72       - type: call
73         name: h
74         arguments:
75         - type: access
76           relation: '[N, M] -> { S_2[i, j] -> m[] }'
77           read: 1
78           write: 0
79       - type: access
80         relation: '[N, M] -> { S_2[i, j] -> in1[i, j] }'
81         read: 1
82         write: 0
83 - line: 26
84   domain: '[N, M] -> { S_3[i] : i >= 0 and i <= -1 + N }'
85   schedule: '[N] -> { S_3[i] -> [1, i, 2] }'
86   body:
87     type: call
88     name: compute_row
89     arguments:
90     - type: call
91       name: h
92       arguments:
93       - type: access
94         relation: '[N, M] -> { S_3[i] -> m[] }'
95         read: 1
96         write: 0
97     - type: access
98       relation: '[N, M] -> { S_3[i] -> A[i, o1] }'
99       read: 0
100       write: 1
101 - line: 28
102   domain: '[N, M] -> { S_4[] }'
103   schedule: '{ S_4[] -> [2] }'
104   body:
105     type: binary
106     operation: =
107     arguments:
108     - type: access
109       relation: '[N, M] -> { S_4[] -> A[5, 6] }'
110       read: 0
111       write: 1
112     - type: access
113       relation: '[N, M] -> { S_4[] -> [0] }'
114       read: 1
115       write: 0
116 - line: 30
117   domain: '[N, M] -> { S_5[i] : i >= 0 and i <= -1 + N }'
118   schedule: '[N] -> { S_5[i] -> [3, i] }'
119   body:
120     type: binary
121     operation: =
122     arguments:
123     - type: access
124       relation: '[N, M] -> { S_5[i] -> C[i] }'
125       read: 0
126       write: 1
127     - type: ternary
128       arguments:
129       - type: access
130         relation: '[N, M] -> { [S_5[i] -> [i1]] -> [1] : i1 <= -1 + N - i and i1 >=
131           -i; [S_5[-1 + N] -> [1]] -> [0]; [S_5[0] -> [-1]] -> [0] }'
132         read: 1
133         write: 0
134         arguments:
135         - type: access
136           relation: '[N, M] -> { S_5[i] -> in2[] }'
137           read: 1
138           write: 0
139       - type: call
140         name: f
141         arguments:
142         - type: access
143           relation: '[N, M] -> { [S_5[i] -> [i1]] -> A[i + i1, o1] : i1 <= -1 + N
144             - i and i1 >= -i }'
145           read: 1
146           write: 0
147           arguments:
148           - type: access
149             relation: '[N, M] -> { S_5[i] -> in2[] }'
150             read: 1
151             write: 0
152       - type: access
153         relation: '[N, M] -> { [S_5[-1 + N] -> [1]] -> [0]; [S_5[0] -> [-1]] -> [0]
154           }'
155         read: 1
156         write: 0
157         arguments:
158         - type: access
159           relation: '[N, M] -> { S_5[i] -> in2[] }'
160           read: 1
161           write: 0