take into account that unsigned iterators may wrap
[pet.git] / tests / quasi_affine.scop
blobd7ad31d3f30bcc818977d8213ab444114cfadc8f
1 context: '[N] -> { [] : N >= 0 }'
2 arrays:
3 - context: '{ [] }'
4   extent: '{ in[] }'
5   element_type: int
6 - context: '[N] -> { [] : N >= 0 }'
7   extent: '[N] -> { A[i0] : i0 >= 0 and i0 <= -1 + N }'
8   element_type: int
9 - context: '[N] -> { [] }'
10   extent: '{ out[] }'
11   element_type: int
12 statements:
13 - line: 14
14   domain: '[N] -> { S_0[] : N >= 0 }'
15   schedule: '{ S_0[] -> [0, 0] }'
16   body:
17     type: binary
18     operation: =
19     arguments:
20     - type: access
21       relation: '{ S_0[] -> A[0] }'
22       read: 0
23       write: 1
24     - type: access
25       relation: '{ S_0[] -> in[] }'
26       read: 1
27       write: 0
28 - line: 16
29   domain: '[N] -> { S_1[i] : i <= N and i >= 1 and N >= 0 }'
30   schedule: '[N] -> { S_1[i] -> [0, 1, i, 0] }'
31   body:
32     type: binary
33     operation: =
34     arguments:
35     - type: access
36       relation: '[N] -> { S_1[i] -> A[i] }'
37       read: 0
38       write: 1
39     - type: call
40       name: f
41       arguments:
42       - type: call
43         name: g
44         arguments:
45         - type: access
46           relation: '[N] -> { S_1[i] -> A[o0] : (2o0 <= i and 2o0 >= -1 + i and i
47             >= 0) or (2o0 >= i and 2o0 <= 1 + i and i <= -1) }'
48           read: 1
49           write: 0
50 - line: 18
51   domain: '[N] -> { S_2[] : N >= 0 }'
52   schedule: '{ S_2[] -> [0, 2] }'
53   body:
54     type: binary
55     operation: =
56     arguments:
57     - type: access
58       relation: '{ S_2[] -> out[] }'
59       read: 0
60       write: 1
61     - type: call
62       name: g
63       arguments:
64       - type: access
65         relation: '[N] -> { S_2[] -> A[N] }'
66         read: 1
67         write: 0