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

SCM Repository

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

Annotation of /branches/charisee/src/compiler/tree-il/tree-ops.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2680 - (view) (download)

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

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