Records with Rank Polymorphism
Justin Slepak Olin Shivers Panagiotis Manolios
jrslepak@ccs.neu.edu shivers@ccs.neu.edu pete@ccs.neu.edu
Northeastern University Boston, MA, USA
1
Records with Rank Polymorphism Justin Slepak Olin Shivers - - PowerPoint PPT Presentation
Records with Rank Polymorphism Justin Slepak Olin Shivers Panagiotis Manolios jrslepak@ccs.neu.edu shivers@ccs.neu.edu pete@ccs.neu.edu Northeastern University Boston, MA, USA 1 The Remora Project Remora: Higher-order rank-polymorphic
Justin Slepak Olin Shivers Panagiotis Manolios
jrslepak@ccs.neu.edu shivers@ccs.neu.edu pete@ccs.neu.edu
Northeastern University Boston, MA, USA
1
2
3
4
5
6
for (i = 0; i < 2; i++) { for (j = 0; j < 3; j++) { for (k = 0; k < 4; k++) { ... } } }
7
for (i = 0; i < 2; i++) { for (j = 0; j < 3; j++) { for (k = 0; k < 4; k++) { ... } } }
8
9
1
11
12
13
14
15
16
17
18
19
2
21
22
23
24
25
26
27
28
Atoms
29
Atoms Arrays
3
Atoms 0 1 9.25 -4+i 's' #t #f Arrays
31
Atoms 0 1 9.25 -4+i 's' #t #f Arrays 1 2 3 4 5 6
3,2
32
Atoms 0 1 9.25 -4+i 's' #t #f Arrays 1 2 3 4 5 6
3,2
4
33
Atoms 0 1 9.25 -4+i 's' #t #f Arrays 1 2 3 4 5 6
3,2
4
Atoms 0 1 9.25 -4+i 's' #t #f Arrays 1 2 3 4 5 6
3,2
4
35
Atoms 0 1 9.25 -4+i 's' #t #f Arrays 1 2 3 4 5 6
3,2
4
36
Atoms 0 1 9.25 -4+i 's' #t #f Arrays 1 2 3 4 5 6
3,2
4
37
38
Cells Individual sub-arrays a function will consume
39
Cells Individual sub-arrays a function will consume Frame Aggregate structure around cells
4
Cells Individual sub-arrays a function will consume Frame Aggregate structure around cells Rank n array can split n+1 ways
41
Cells Individual sub-arrays a function will consume Frame Aggregate structure around cells Rank n array can split n+1 ways 0 1 2 3 1 2 3 4 2 3 4 5
3,4
42
Cells Individual sub-arrays a function will consume Frame Aggregate structure around cells Rank n array can split n+1 ways 0 1 2 3 1 2 3 4 2 3 4 5
3,4
3,4
43
Cells Individual sub-arrays a function will consume Frame Aggregate structure around cells Rank n array can split n+1 ways 0 1 2 3 1 2 3 4 2 3 4 5
3,4
3,4
3,4
44
45
3,7
46
3,7
2,2,2
47
3,7
2,2,2
3,7
2,2,2
3,7
2,2,2
3,7
2,2,2
52
53
54
55
56
57
58
59
6
61
62
63
64
65
66
67
68
69
7
71
72
73
74
75
76
3,?
77
3,?
78
2,2
79
2,2
3
2
4 3
8
2,2
3
2
4 3
81
2,2
3
2
4 3
82
2,2
3
2
4 3
83
84
85
86
87
88
89
9
91
92
93
94
95
96
97
98
99
1
11
12
13
14
15
16
17
18
19
11
111
112
113
114
115
116
117
10 functions on 10 data structures." — Alan Perlis
118
119
12
121
122
123
124
125
126
127
128
129
13
131
132
133
134
135
136
137
138
139
14
141
142
143
144
145
146
147
148
149
15
151
152
153
154
155
156
157
158
159
16
161
162
163
164
165
166
167
168
169
17
171