add support for structs
[pet.git] / tests / struct4.scop
blobcd8976a37e55034253bf8cf09afaec68008051df
1 start: 75
2 end: 189
3 context: '{  :  }'
4 types:
5 - name: s
6   definition: "struct s {\n    struct {\n        int a[10];\n    } f[10];\n}"
7 arrays:
8 - context: '{  :  }'
9   extent: '{ s[] }'
10   element_type: struct s
11   element_size: 400
12   element_is_record: 1
13 - context: '{  :  }'
14   extent: '{ s_f[s[] -> f[i0]] : i0 >= 0 and i0 <= 9 }'
15   element_type: <subfield>
16   element_size: 40
17   element_is_record: 1
18 - context: '{  :  }'
19   extent: '{ s_f_a[s_f[s[] -> f[i0]] -> a[i1]] : i0 >= 0 and i0 <= 9 and i1 >= 0 and
20     i1 <= 9 }'
21   element_type: int
22   element_size: 4
23 statements:
24 - line: 14
25   domain: '{ S_0[i, j] : i >= 0 and i <= 9 and j >= 0 and j <= 9 }'
26   schedule: '{ S_0[i, j] -> [0, i, j] }'
27   body:
28     type: binary
29     operation: =
30     arguments:
31     - type: access
32       relation: '{ S_0[i, j] -> s_f_a[s_f[s[] -> f[i]] -> a[j]] }'
33       index: '{ S_0[i, j] -> s_f_a[s_f[s[] -> f[(i)]] -> a[(j)]] }'
34       reference: __pet_ref_0
35       read: 0
36       write: 1
37     - type: binary
38       operation: '*'
39       arguments:
40       - type: access
41         relation: '{ S_0[i, j] -> [i] }'
42         index: '{ S_0[i, j] -> [(i)] }'
43         reference: __pet_ref_1
44         read: 1
45         write: 0
46       - type: access
47         relation: '{ S_0[i, j] -> [j] }'
48         index: '{ S_0[i, j] -> [(j)] }'
49         reference: __pet_ref_2
50         read: 1
51         write: 0