Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /branches/charisee/src/compiler/low-il/low-il.sml
ViewVC logotype

Annotation of /branches/charisee/src/compiler/low-il/low-il.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2525 - (view) (download)

1 : jhr 458 (* low-il.in
2 :     *
3 :     * COPYRIGHT (c) 2010 The Diderot Project (http://diderot-language.cs.uchicago.edu)
4 :     * All rights reserved.
5 :     *
6 :     * Lower-level version of the Diderot IL input file.
7 :     *
8 :     *)
9 :    
10 :     structure LowOps =
11 :     struct
12 :    
13 : jhr 1640 (* required helper functions for types *)
14 : jhr 458 type ty = LowILTypes.ty
15 :     val samety = LowILTypes.same
16 :     val hashty = LowILTypes.hash
17 :     val tyToString = LowILTypes.toString
18 :    
19 : jhr 1640 (* required helper functions for type lists *)
20 :     type tys = ty list
21 :     fun sametys (tys1, tys2) = ListPair.allEq samety (tys1, tys2)
22 :     fun hashtys tys = List.foldl (fn (ty, s) => hashty ty + 0w3 * s) 0w0 tys
23 :     fun tysToString tys = String.concat["[", String.concatWith "," (List.map tyToString tys), "]" ]
24 :    
25 :     (* required helper functions for the int type *)
26 : jhr 458 fun sameint (i1 : int, i2) = (i1 = i2)
27 :     fun hashint i = Word.fromInt i
28 :     fun intToString i = Int.toString i
29 :    
30 : jhr 1640 (* required helper functions for the string type *)
31 : jhr 458 fun samestring (s1 : string, s2) = (s1 = s2)
32 :     val hashstring = HashString.hashString
33 :     fun stringToString s = String.concat["\"", s, "\""]
34 :    
35 :     datatype rator
36 : cchiw 2523 = IAdd
37 :     | ISub
38 :     | IMul
39 :     | IDiv
40 :     | INeg
41 : jhr 1116 | Abs of ty
42 : jhr 458 | LT of ty
43 :     | LTE of ty
44 :     | EQ of ty
45 :     | NEQ of ty
46 :     | GT of ty
47 :     | GTE of ty
48 :     | Not
49 :     | Max
50 :     | Min
51 : cchiw 2523 | C of int
52 : cchiw 2525 | V of int * int * ty * ty
53 :     | S of int * ty * ty
54 : cchiw 2523 | addSca
55 :     | subSca
56 :     | prodSca
57 :     | divSca
58 :     | cons of ty
59 : cchiw 2525 | img of int * ty * int
60 :     | addVec of int
61 :     | subVec of int
62 :     | prodVec of int
63 :     | prodScaV of int
64 :     | sumVec of int
65 : jhr 1295 | Clamp of ty
66 : jhr 1116 | Lerp of ty
67 :     | Norm of ty
68 :     | Normalize of int
69 : jhr 458 | PrincipleEvec of ty
70 : jhr 1640 | EigenVecs2x2
71 :     | EigenVecs3x3
72 :     | EigenVals2x2
73 :     | EigenVals3x3
74 : jhr 1116 | Zero of ty
75 : jhr 1640 | Select of ty * int
76 :     | Index of ty * int
77 : jhr 458 | Subscript of ty
78 : cchiw 2400 | MkDynamic of ty * int
79 :     | Append of ty
80 :     | Prepend of ty
81 :     | Concat of ty
82 :     | Length of ty
83 : jhr 1116 | Ceiling of int
84 : jhr 458 | Floor of int
85 : jhr 1116 | Round of int
86 :     | Trunc of int
87 : jhr 458 | IntToReal
88 : jhr 1116 | RealToInt of int
89 : cchiw 2523 | Transform of ImageInfo.info
90 :     | Translate of ImageInfo.info
91 : cchiw 2525 | Kernel of Kernel.kernel * int
92 : jhr 511 | ImageAddress of ImageInfo.info
93 : jhr 1116 | LoadVoxels of ImageInfo.info * int
94 :     | Inside of ImageInfo.info * int
95 : cchiw 2400 | LoadSeq of ty * string
96 : cchiw 2525 | LoadImage of ImageInfo.info
97 :     | Input of ty * string * string
98 :     | InputWithDefault of ty * string * string
99 : jhr 1640 | Print of tys
100 : jhr 458
101 : cchiw 2523 fun resultArity IAdd = 1
102 :     | resultArity ISub = 1
103 :     | resultArity IMul = 1
104 :     | resultArity IDiv = 1
105 :     | resultArity INeg = 1
106 : jhr 1640 | resultArity (Abs _) = 1
107 :     | resultArity (LT _) = 1
108 :     | resultArity (LTE _) = 1
109 :     | resultArity (EQ _) = 1
110 :     | resultArity (NEQ _) = 1
111 :     | resultArity (GT _) = 1
112 :     | resultArity (GTE _) = 1
113 :     | resultArity Not = 1
114 :     | resultArity Max = 1
115 :     | resultArity Min = 1
116 : cchiw 2523 | resultArity (C _) = 1
117 :     | resultArity (V _) = 1
118 :     | resultArity (S _) = 1
119 :     | resultArity addSca = 1
120 :     | resultArity subSca = 1
121 :     | resultArity prodSca = 1
122 :     | resultArity divSca = 1
123 :     | resultArity (cons _) = 1
124 :     | resultArity (img _) = 1
125 : cchiw 2525 | resultArity (addVec _) = 1
126 :     | resultArity (subVec _) = 1
127 :     | resultArity (prodVec _) = 1
128 :     | resultArity (prodScaV _) = 1
129 :     | resultArity (sumVec _) = 1
130 : jhr 1640 | resultArity (Clamp _) = 1
131 :     | resultArity (Lerp _) = 1
132 :     | resultArity (Norm _) = 1
133 :     | resultArity (Normalize _) = 1
134 :     | resultArity (PrincipleEvec _) = 1
135 :     | resultArity EigenVecs2x2 = 1
136 :     | resultArity EigenVecs3x3 = 1
137 :     | resultArity EigenVals2x2 = 1
138 :     | resultArity EigenVals3x3 = 1
139 :     | resultArity (Zero _) = 1
140 :     | resultArity (Select _) = 1
141 :     | resultArity (Index _) = 1
142 :     | resultArity (Subscript _) = 1
143 : cchiw 2400 | resultArity (MkDynamic _) = 1
144 :     | resultArity (Append _) = 2
145 :     | resultArity (Prepend _) = 2
146 :     | resultArity (Concat _) = 2
147 :     | resultArity (Length _) = 1
148 : jhr 1640 | resultArity (Ceiling _) = 1
149 :     | resultArity (Floor _) = 1
150 :     | resultArity (Round _) = 1
151 :     | resultArity (Trunc _) = 1
152 :     | resultArity IntToReal = 1
153 :     | resultArity (RealToInt _) = 1
154 : cchiw 2523 | resultArity (Transform _) = 1
155 :     | resultArity (Translate _) = 1
156 : cchiw 2525 | resultArity (Kernel _) = 1
157 : jhr 1640 | resultArity (ImageAddress _) = 1
158 :     | resultArity (LoadVoxels _) = 1
159 : cchiw 2400 | resultArity (Inside _) = 1
160 :     | resultArity (LoadSeq _) = 1
161 : jhr 1640 | resultArity (LoadImage _) = 1
162 : cchiw 2525 | resultArity (Input _) = 1
163 :     | resultArity (InputWithDefault _) = 1
164 : jhr 1640 | resultArity (Print _) = 0
165 :    
166 : cchiw 2523 fun arity IAdd = 2
167 :     | arity ISub = 2
168 :     | arity IMul = 2
169 :     | arity IDiv = 2
170 :     | arity INeg = 1
171 : jhr 1116 | arity (Abs _) = 1
172 : jhr 458 | arity (LT _) = 2
173 :     | arity (LTE _) = 2
174 :     | arity (EQ _) = 2
175 :     | arity (NEQ _) = 2
176 :     | arity (GT _) = 2
177 :     | arity (GTE _) = 2
178 :     | arity Not = 1
179 :     | arity Max = 2
180 :     | arity Min = 2
181 : cchiw 2523 | arity (C _) = 2
182 :     | arity (V _) = 2
183 :     | arity (S _) = 2
184 :     | arity addSca = 2
185 :     | arity subSca = 2
186 :     | arity prodSca = 2
187 :     | arity divSca = 2
188 :     | arity (cons _) = 2
189 :     | arity (img _) = 2
190 : cchiw 2525 | arity (addVec _) = 2
191 :     | arity (subVec _) = 2
192 :     | arity (prodVec _) = 2
193 :     | arity (prodScaV _) = 2
194 :     | arity (sumVec _) = 2
195 : jhr 1295 | arity (Clamp _) = 3
196 : jhr 1116 | arity (Lerp _) = 3
197 : jhr 458 | arity (Norm _) = 1
198 : jhr 1116 | arity (Normalize _) = 1
199 : jhr 458 | arity (PrincipleEvec _) = 2
200 : jhr 1640 | arity EigenVecs2x2 = 1
201 :     | arity EigenVecs3x3 = 1
202 :     | arity EigenVals2x2 = 1
203 :     | arity EigenVals3x3 = 1
204 : jhr 1116 | arity (Zero _) = 0
205 : jhr 1640 | arity (Select _) = 1
206 :     | arity (Index _) = 1
207 : jhr 458 | arity (Subscript _) = 2
208 : cchiw 2400 | arity (MkDynamic _) = 1
209 :     | arity (Append _) = 1
210 :     | arity (Prepend _) = 1
211 :     | arity (Concat _) = 1
212 :     | arity (Length _) = 1
213 : jhr 1116 | arity (Ceiling _) = 1
214 : jhr 458 | arity (Floor _) = 1
215 : jhr 1116 | arity (Round _) = 1
216 :     | arity (Trunc _) = 1
217 : jhr 458 | arity IntToReal = 1
218 : jhr 1116 | arity (RealToInt _) = 1
219 : cchiw 2523 | arity (Transform _) = 2
220 :     | arity (Translate _) = 2
221 : cchiw 2525 | arity (Kernel _) = 0
222 : jhr 1116 | arity (ImageAddress _) = 1
223 : jhr 458 | arity (LoadVoxels _) = 1
224 : jhr 1116 | arity (Inside _) = 2
225 : cchiw 2400 | arity (LoadSeq _) = 0
226 :     | arity (LoadImage _) = 0
227 : cchiw 2525 | arity (Input _) = 0
228 :     | arity (InputWithDefault _) = 1
229 : jhr 1640 | arity (Print _) = ~1
230 : jhr 458
231 : cchiw 2400 fun isPure (MkDynamic _) = false
232 :     | isPure (Append _) = false
233 :     | isPure (Prepend _) = false
234 :     | isPure (Concat _) = false
235 :     | isPure (Print _) = false
236 : jhr 2356 | isPure _ = true
237 :    
238 : cchiw 2522 fun same (IAdd, IAdd) = true
239 :     | same (ISub, ISub) = true
240 :     | same (IMul, IMul) = true
241 :     | same (IDiv, IDiv) = true
242 :     | same (INeg, INeg) = true
243 : jhr 1116 | same (Abs(a0), Abs(b0)) = samety(a0, b0)
244 : jhr 458 | same (LT(a0), LT(b0)) = samety(a0, b0)
245 :     | same (LTE(a0), LTE(b0)) = samety(a0, b0)
246 :     | same (EQ(a0), EQ(b0)) = samety(a0, b0)
247 :     | same (NEQ(a0), NEQ(b0)) = samety(a0, b0)
248 :     | same (GT(a0), GT(b0)) = samety(a0, b0)
249 :     | same (GTE(a0), GTE(b0)) = samety(a0, b0)
250 :     | same (Not, Not) = true
251 :     | same (Max, Max) = true
252 :     | same (Min, Min) = true
253 : cchiw 2523 | same (C(a0), C(b0)) = sameint(a0, b0)
254 : cchiw 2525 | same (V(a0,a1,a2,a3), V(b0,b1,b2,b3)) = sameint(a0, b0) andalso sameint(a1, b1) andalso samety(a2, b2) andalso samety(a3, b3)
255 :     | same (S(a0,a1,a2), S(b0,b1,b2)) = sameint(a0, b0) andalso samety(a1, b1) andalso samety(a2, b2)
256 : cchiw 2523 | same (addSca, addSca) = true
257 :     | same (subSca, subSca) = true
258 :     | same (prodSca, prodSca) = true
259 :     | same (divSca, divSca) = true
260 :     | same (cons(a0), cons(b0)) = samety(a0, b0)
261 : cchiw 2525 | same (img(a0,a1,a2), img(b0,b1,b2)) = sameint(a0, b0) andalso samety(a1, b1) andalso sameint(a2, b2)
262 :     | same (addVec(a0), addVec(b0)) = sameint(a0, b0)
263 :     | same (subVec(a0), subVec(b0)) = sameint(a0, b0)
264 :     | same (prodVec(a0), prodVec(b0)) = sameint(a0, b0)
265 :     | same (prodScaV(a0), prodScaV(b0)) = sameint(a0, b0)
266 :     | same (sumVec(a0), sumVec(b0)) = sameint(a0, b0)
267 : jhr 1295 | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)
268 : jhr 1116 | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)
269 :     | same (Norm(a0), Norm(b0)) = samety(a0, b0)
270 :     | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)
271 : jhr 458 | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)
272 : jhr 1640 | same (EigenVecs2x2, EigenVecs2x2) = true
273 :     | same (EigenVecs3x3, EigenVecs3x3) = true
274 :     | same (EigenVals2x2, EigenVals2x2) = true
275 :     | same (EigenVals3x3, EigenVals3x3) = true
276 : jhr 1116 | same (Zero(a0), Zero(b0)) = samety(a0, b0)
277 : jhr 1640 | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
278 :     | same (Index(a0,a1), Index(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
279 : jhr 458 | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)
280 : cchiw 2400 | same (MkDynamic(a0,a1), MkDynamic(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
281 :     | same (Append(a0), Append(b0)) = samety(a0, b0)
282 :     | same (Prepend(a0), Prepend(b0)) = samety(a0, b0)
283 :     | same (Concat(a0), Concat(b0)) = samety(a0, b0)
284 :     | same (Length(a0), Length(b0)) = samety(a0, b0)
285 : jhr 1116 | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)
286 : jhr 458 | same (Floor(a0), Floor(b0)) = sameint(a0, b0)
287 : jhr 1116 | same (Round(a0), Round(b0)) = sameint(a0, b0)
288 :     | same (Trunc(a0), Trunc(b0)) = sameint(a0, b0)
289 : jhr 458 | same (IntToReal, IntToReal) = true
290 : jhr 1116 | same (RealToInt(a0), RealToInt(b0)) = sameint(a0, b0)
291 : cchiw 2523 | same (Transform(a0), Transform(b0)) = ImageInfo.same(a0, b0)
292 :     | same (Translate(a0), Translate(b0)) = ImageInfo.same(a0, b0)
293 : cchiw 2525 | same (Kernel(a0,a1), Kernel(b0,b1)) = Kernel.same(a0, b0) andalso sameint(a1, b1)
294 : jhr 511 | same (ImageAddress(a0), ImageAddress(b0)) = ImageInfo.same(a0, b0)
295 : jhr 1116 | same (LoadVoxels(a0,a1), LoadVoxels(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
296 :     | same (Inside(a0,a1), Inside(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
297 : cchiw 2400 | same (LoadSeq(a0,a1), LoadSeq(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)
298 : cchiw 2525 | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)
299 :     | same (Input(a0,a1,a2), Input(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
300 :     | same (InputWithDefault(a0,a1,a2), InputWithDefault(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
301 : jhr 1640 | same (Print(a0), Print(b0)) = sametys(a0, b0)
302 : jhr 458 | same _ = false
303 :    
304 : cchiw 2523 fun hash IAdd = 0w3
305 :     | hash ISub = 0w5
306 :     | hash IMul = 0w7
307 :     | hash IDiv = 0w11
308 :     | hash INeg = 0w13
309 : jhr 1116 | hash (Abs(a0)) = 0w17 + hashty a0
310 :     | hash (LT(a0)) = 0w19 + hashty a0
311 :     | hash (LTE(a0)) = 0w23 + hashty a0
312 :     | hash (EQ(a0)) = 0w29 + hashty a0
313 :     | hash (NEQ(a0)) = 0w31 + hashty a0
314 :     | hash (GT(a0)) = 0w37 + hashty a0
315 :     | hash (GTE(a0)) = 0w41 + hashty a0
316 :     | hash Not = 0w43
317 :     | hash Max = 0w47
318 :     | hash Min = 0w53
319 : cchiw 2523 | hash (C(a0)) = 0w59 + hashint a0
320 : cchiw 2525 | hash (V(a0,a1,a2,a3)) = 0w61 + hashint a0 + hashint a1 + hashty a2 + hashty a3
321 :     | hash (S(a0,a1,a2)) = 0w67 + hashint a0 + hashty a1 + hashty a2
322 :     | hash addSca = 0w71
323 :     | hash subSca = 0w73
324 :     | hash prodSca = 0w79
325 :     | hash divSca = 0w83
326 :     | hash (cons(a0)) = 0w89 + hashty a0
327 :     | hash (img(a0,a1,a2)) = 0w97 + hashint a0 + hashty a1 + hashint a2
328 :     | hash (addVec(a0)) = 0w101 + hashint a0
329 :     | hash (subVec(a0)) = 0w103 + hashint a0
330 :     | hash (prodVec(a0)) = 0w107 + hashint a0
331 :     | hash (prodScaV(a0)) = 0w109 + hashint a0
332 :     | hash (sumVec(a0)) = 0w113 + hashint a0
333 :     | hash (Clamp(a0)) = 0w127 + hashty a0
334 :     | hash (Lerp(a0)) = 0w131 + hashty a0
335 :     | hash (Norm(a0)) = 0w137 + hashty a0
336 :     | hash (Normalize(a0)) = 0w139 + hashint a0
337 :     | hash (PrincipleEvec(a0)) = 0w149 + hashty a0
338 :     | hash EigenVecs2x2 = 0w151
339 :     | hash EigenVecs3x3 = 0w157
340 :     | hash EigenVals2x2 = 0w163
341 :     | hash EigenVals3x3 = 0w167
342 :     | hash (Zero(a0)) = 0w173 + hashty a0
343 :     | hash (Select(a0,a1)) = 0w179 + hashty a0 + hashint a1
344 :     | hash (Index(a0,a1)) = 0w181 + hashty a0 + hashint a1
345 :     | hash (Subscript(a0)) = 0w191 + hashty a0
346 :     | hash (MkDynamic(a0,a1)) = 0w193 + hashty a0 + hashint a1
347 :     | hash (Append(a0)) = 0w197 + hashty a0
348 :     | hash (Prepend(a0)) = 0w199 + hashty a0
349 :     | hash (Concat(a0)) = 0w211 + hashty a0
350 :     | hash (Length(a0)) = 0w223 + hashty a0
351 :     | hash (Ceiling(a0)) = 0w227 + hashint a0
352 :     | hash (Floor(a0)) = 0w229 + hashint a0
353 :     | hash (Round(a0)) = 0w233 + hashint a0
354 :     | hash (Trunc(a0)) = 0w239 + hashint a0
355 :     | hash IntToReal = 0w241
356 :     | hash (RealToInt(a0)) = 0w251 + hashint a0
357 :     | hash (Transform(a0)) = 0w257 + ImageInfo.hash a0
358 :     | hash (Translate(a0)) = 0w263 + ImageInfo.hash a0
359 :     | hash (Kernel(a0,a1)) = 0w269 + Kernel.hash a0 + hashint a1
360 : cchiw 2523 | hash (ImageAddress(a0)) = 0w271 + ImageInfo.hash a0
361 :     | hash (LoadVoxels(a0,a1)) = 0w277 + ImageInfo.hash a0 + hashint a1
362 :     | hash (Inside(a0,a1)) = 0w281 + ImageInfo.hash a0 + hashint a1
363 :     | hash (LoadSeq(a0,a1)) = 0w283 + hashty a0 + hashstring a1
364 : cchiw 2525 | hash (LoadImage(a0)) = 0w293 + ImageInfo.hash a0
365 :     | hash (Input(a0,a1,a2)) = 0w307 + hashty a0 + hashstring a1 + hashstring a2
366 :     | hash (InputWithDefault(a0,a1,a2)) = 0w311 + hashty a0 + hashstring a1 + hashstring a2
367 :     | hash (Print(a0)) = 0w313 + hashtys a0
368 : jhr 458
369 : cchiw 2523 fun toString IAdd = "IAdd"
370 :     | toString ISub = "ISub"
371 :     | toString IMul = "IMul"
372 :     | toString IDiv = "IDiv"
373 :     | toString INeg = "INeg"
374 : jhr 1116 | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]
375 : jhr 458 | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]
376 :     | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]
377 :     | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]
378 :     | toString (NEQ(a0)) = concat["NEQ<", tyToString a0, ">"]
379 :     | toString (GT(a0)) = concat["GT<", tyToString a0, ">"]
380 :     | toString (GTE(a0)) = concat["GTE<", tyToString a0, ">"]
381 :     | toString Not = "Not"
382 :     | toString Max = "Max"
383 :     | toString Min = "Min"
384 : cchiw 2523 | toString (C(a0)) = concat["C<", intToString a0, ">"]
385 : cchiw 2525 | toString (V(a0,a1,a2,a3)) = concat["V<", intToString a0, ",", intToString a1, ",", tyToString a2, ",", tyToString a3, ">"]
386 :     | toString (S(a0,a1,a2)) = concat["S<", intToString a0, ",", tyToString a1, ",", tyToString a2, ">"]
387 : cchiw 2523 | toString addSca = "addSca"
388 :     | toString subSca = "subSca"
389 :     | toString prodSca = "prodSca"
390 :     | toString divSca = "divSca"
391 :     | toString (cons(a0)) = concat["cons<", tyToString a0, ">"]
392 : cchiw 2525 | toString (img(a0,a1,a2)) = concat["img<", intToString a0, ",", tyToString a1, ",", intToString a2, ">"]
393 :     | toString (addVec(a0)) = concat["addVec<", intToString a0, ">"]
394 :     | toString (subVec(a0)) = concat["subVec<", intToString a0, ">"]
395 :     | toString (prodVec(a0)) = concat["prodVec<", intToString a0, ">"]
396 :     | toString (prodScaV(a0)) = concat["prodScaV<", intToString a0, ">"]
397 :     | toString (sumVec(a0)) = concat["sumVec<", intToString a0, ">"]
398 : jhr 1295 | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]
399 : jhr 1116 | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]
400 :     | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]
401 :     | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]
402 : jhr 458 | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]
403 : jhr 1640 | toString EigenVecs2x2 = "EigenVecs2x2"
404 :     | toString EigenVecs3x3 = "EigenVecs3x3"
405 :     | toString EigenVals2x2 = "EigenVals2x2"
406 :     | toString EigenVals3x3 = "EigenVals3x3"
407 : jhr 1116 | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]
408 : jhr 1640 | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]
409 :     | toString (Index(a0,a1)) = concat["Index<", tyToString a0, ",", intToString a1, ">"]
410 : jhr 458 | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]
411 : cchiw 2400 | toString (MkDynamic(a0,a1)) = concat["MkDynamic<", tyToString a0, ",", intToString a1, ">"]
412 :     | toString (Append(a0)) = concat["Append<", tyToString a0, ">"]
413 :     | toString (Prepend(a0)) = concat["Prepend<", tyToString a0, ">"]
414 :     | toString (Concat(a0)) = concat["Concat<", tyToString a0, ">"]
415 :     | toString (Length(a0)) = concat["Length<", tyToString a0, ">"]
416 : jhr 1116 | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]
417 : jhr 458 | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]
418 : jhr 1116 | toString (Round(a0)) = concat["Round<", intToString a0, ">"]
419 :     | toString (Trunc(a0)) = concat["Trunc<", intToString a0, ">"]
420 : jhr 458 | toString IntToReal = "IntToReal"
421 : jhr 1116 | toString (RealToInt(a0)) = concat["RealToInt<", intToString a0, ">"]
422 : cchiw 2523 | toString (Transform(a0)) = concat["Transform<", ImageInfo.toString a0, ">"]
423 :     | toString (Translate(a0)) = concat["Translate<", ImageInfo.toString a0, ">"]
424 : cchiw 2525 | toString (Kernel(a0,a1)) = concat["Kernel<", Kernel.toString a0, ",", intToString a1, ">"]
425 : jhr 511 | toString (ImageAddress(a0)) = concat["ImageAddress<", ImageInfo.toString a0, ">"]
426 : jhr 1116 | toString (LoadVoxels(a0,a1)) = concat["LoadVoxels<", ImageInfo.toString a0, ",", intToString a1, ">"]
427 :     | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]
428 : cchiw 2400 | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]
429 : cchiw 2525 | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]
430 :     | toString (Input(a0,a1,a2)) = concat["Input<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
431 :     | toString (InputWithDefault(a0,a1,a2)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
432 : cchiw 2523 | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]
433 : jhr 458
434 :     end
435 :    
436 :     structure LowIL = SSAFn(
437 : jhr 1232 val ilName = "low-il"
438 : jhr 458 structure Ty = LowILTypes
439 :     structure Op = LowOps)
440 : jhr 1116
441 :     structure LowILCensus = CensusFn(LowIL)
442 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0