allow nested accesses in loop upper bounds
[pet.git] / tests / dynamic_bound.scop
blob55b43aeda4e16fa110ad113826946f1d48b28d8c
1 context: '{  :  }'
2 arrays:
3 - context: '{  :  }'
4   extent: '{ N[] }'
5   value_bounds: '{ [i0] : i0 >= 0 and i0 <= 100 }'
6   element_type: int
7 - context: '{  :  }'
8   extent: '{ M[] }'
9   value_bounds: '{ [i0] : i0 >= 0 and i0 <= 100 }'
10   element_type: int
11 - context: '{  :  }'
12   extent: '{ a[i0, i1] : i0 >= 0 and i1 >= 0 and i0 <= 99 and i1 <= 99 }'
13   element_type: int
14 statements:
15 - line: 13
16   domain: '{ S_0[] }'
17   schedule: '{ S_0[] -> [0] }'
18   body:
19     type: binary
20     operation: =
21     arguments:
22     - type: access
23       relation: '{ S_0[] -> N[] }'
24       read: 0
25       write: 1
26     - type: call
27       name: f
28 - line: 14
29   domain: '{ S_1[] }'
30   schedule: '{ S_1[] -> [1] }'
31   body:
32     type: binary
33     operation: =
34     arguments:
35     - type: access
36       relation: '{ S_1[] -> M[] }'
37       read: 0
38       write: 1
39     - type: call
40       name: g
41 - line: 17
42   domain: '{ [S_2[i, j] -> [M, N]] : i >= 0 and N >= 1 + i and j >= 0 and M >= 1 +
43     j }'
44   schedule: '{ S_2[i, j] -> [2, i, j] }'
45   body:
46     type: binary
47     operation: =
48     arguments:
49     - type: access
50       relation: '{ S_2[i, j] -> a[i, j] }'
51       read: 0
52       write: 1
53     - type: binary
54       operation: +
55       arguments:
56       - type: access
57         relation: '{ S_2[i, j] -> [i] }'
58         read: 1
59         write: 0
60       - type: access
61         relation: '{ S_2[i, j] -> [j] }'
62         read: 1
63         write: 0
64   arguments:
65   - type: access
66     relation: '{ S_2[i, j] -> M[] : j >= 0 }'
67     read: 1
68     write: 0
69   - type: access
70     relation: '{ S_2[i, j] -> N[] : i >= 0 and j >= 0 }'
71     read: 1
72     write: 0
73 - line: 20
74   domain: '{ [S_3[i, j] -> [M, N]] : i >= 0 and N >= 1 + i and j >= 0 and M >= 1 +
75     j }'
76   schedule: '{ S_3[i, j] -> [3, i, j] }'
77   body:
78     type: call
79     name: h
80     arguments:
81     - type: access
82       relation: '{ S_3[i, j] -> [i] }'
83       read: 1
84       write: 0
85     - type: access
86       relation: '{ S_3[i, j] -> [j] }'
87       read: 1
88       write: 0
89     - type: access
90       relation: '{ S_3[i, j] -> a[i, j] }'
91       read: 1
92       write: 0
93   arguments:
94   - type: access
95     relation: '{ S_3[i, j] -> M[] : j >= 0 }'
96     read: 1
97     write: 0
98   - type: access
99     relation: '{ S_3[i, j] -> N[] : i >= 0 and j >= 0 }'
100     read: 1
101     write: 0