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 2377 - (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 :     = Add of ty
37 :     | Sub of ty
38 :     | Mul of ty
39 :     | Div of ty
40 :     | Neg of ty
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 : jhr 1295 | Clamp of ty
52 : jhr 1116 | Lerp of ty
53 : jhr 458 | Dot of int
54 : jhr 1116 | MulVecMat of int * int
55 :     | MulMatVec of int * int
56 :     | MulMatMat of int * int * int
57 : jhr 2356 | MulVecTen3 of int * int * int
58 :     | MulTen3Vec of int * int * int
59 :     | ColonMul of ty * ty
60 : jhr 458 | Cross
61 : jhr 1116 | Norm of ty
62 :     | Normalize of int
63 :     | Scale of ty
64 : jhr 458 | PrincipleEvec of ty
65 : jhr 1640 | EigenVecs2x2
66 :     | EigenVecs3x3
67 :     | EigenVals2x2
68 :     | EigenVals3x3
69 : jhr 1116 | Identity of int
70 :     | Zero of ty
71 : jhr 2356 | Transpose of int * int
72 : jhr 1640 | Select of ty * int
73 :     | Index of ty * int
74 : jhr 458 | Subscript of ty
75 : jhr 1116 | Ceiling of int
76 : jhr 458 | Floor of int
77 : jhr 1116 | Round of int
78 :     | Trunc of int
79 : jhr 458 | IntToReal
80 : jhr 1116 | RealToInt of int
81 : jhr 511 | ImageAddress of ImageInfo.info
82 : jhr 1116 | LoadVoxels of ImageInfo.info * int
83 : jhr 458 | PosToImgSpace of ImageInfo.info
84 : jhr 1116 | TensorToWorldSpace of ImageInfo.info * ty
85 : jhr 458 | LoadImage of ImageInfo.info
86 : jhr 1116 | Inside of ImageInfo.info * int
87 : jhr 1301 | Input of ty * string * string
88 :     | InputWithDefault of ty * string * string
89 : jhr 1640 | Print of tys
90 : jhr 458
91 : jhr 1640 fun resultArity (Add _) = 1
92 :     | resultArity (Sub _) = 1
93 :     | resultArity (Mul _) = 1
94 :     | resultArity (Div _) = 1
95 :     | resultArity (Neg _) = 1
96 :     | resultArity (Abs _) = 1
97 :     | resultArity (LT _) = 1
98 :     | resultArity (LTE _) = 1
99 :     | resultArity (EQ _) = 1
100 :     | resultArity (NEQ _) = 1
101 :     | resultArity (GT _) = 1
102 :     | resultArity (GTE _) = 1
103 :     | resultArity Not = 1
104 :     | resultArity Max = 1
105 :     | resultArity Min = 1
106 :     | resultArity (Clamp _) = 1
107 :     | resultArity (Lerp _) = 1
108 :     | resultArity (Dot _) = 1
109 :     | resultArity (MulVecMat _) = 1
110 :     | resultArity (MulMatVec _) = 1
111 :     | resultArity (MulMatMat _) = 1
112 : jhr 2356 | resultArity (MulVecTen3 _) = 1
113 :     | resultArity (MulTen3Vec _) = 1
114 :     | resultArity (ColonMul _) = 1
115 : jhr 1640 | resultArity Cross = 1
116 :     | resultArity (Norm _) = 1
117 :     | resultArity (Normalize _) = 1
118 :     | resultArity (Scale _) = 1
119 :     | resultArity (PrincipleEvec _) = 1
120 :     | resultArity EigenVecs2x2 = 1
121 :     | resultArity EigenVecs3x3 = 1
122 :     | resultArity EigenVals2x2 = 1
123 :     | resultArity EigenVals3x3 = 1
124 :     | resultArity (Identity _) = 1
125 :     | resultArity (Zero _) = 1
126 : jhr 2356 | resultArity (Transpose _) = 1
127 : jhr 1640 | resultArity (Select _) = 1
128 :     | resultArity (Index _) = 1
129 :     | resultArity (Subscript _) = 1
130 :     | resultArity (Ceiling _) = 1
131 :     | resultArity (Floor _) = 1
132 :     | resultArity (Round _) = 1
133 :     | resultArity (Trunc _) = 1
134 :     | resultArity IntToReal = 1
135 :     | resultArity (RealToInt _) = 1
136 :     | resultArity (ImageAddress _) = 1
137 :     | resultArity (LoadVoxels _) = 1
138 :     | resultArity (PosToImgSpace _) = 1
139 :     | resultArity (TensorToWorldSpace _) = 1
140 :     | resultArity (LoadImage _) = 1
141 :     | resultArity (Inside _) = 1
142 :     | resultArity (Input _) = 1
143 :     | resultArity (InputWithDefault _) = 1
144 :     | resultArity (Print _) = 0
145 :    
146 : jhr 458 fun arity (Add _) = 2
147 :     | arity (Sub _) = 2
148 :     | arity (Mul _) = 2
149 :     | arity (Div _) = 2
150 :     | arity (Neg _) = 1
151 : jhr 1116 | arity (Abs _) = 1
152 : jhr 458 | arity (LT _) = 2
153 :     | arity (LTE _) = 2
154 :     | arity (EQ _) = 2
155 :     | arity (NEQ _) = 2
156 :     | arity (GT _) = 2
157 :     | arity (GTE _) = 2
158 :     | arity Not = 1
159 :     | arity Max = 2
160 :     | arity Min = 2
161 : jhr 1295 | arity (Clamp _) = 3
162 : jhr 1116 | arity (Lerp _) = 3
163 : jhr 458 | arity (Dot _) = 2
164 : jhr 1116 | arity (MulVecMat _) = 2
165 :     | arity (MulMatVec _) = 2
166 :     | arity (MulMatMat _) = 2
167 : jhr 2356 | arity (MulVecTen3 _) = 2
168 :     | arity (MulTen3Vec _) = 2
169 :     | arity (ColonMul _) = 2
170 : jhr 458 | arity Cross = 2
171 :     | arity (Norm _) = 1
172 : jhr 1116 | arity (Normalize _) = 1
173 : jhr 458 | arity (Scale _) = 2
174 :     | arity (PrincipleEvec _) = 2
175 : jhr 1640 | arity EigenVecs2x2 = 1
176 :     | arity EigenVecs3x3 = 1
177 :     | arity EigenVals2x2 = 1
178 :     | arity EigenVals3x3 = 1
179 : jhr 1116 | arity (Identity _) = 0
180 :     | arity (Zero _) = 0
181 : jhr 2356 | arity (Transpose _) = 1
182 : jhr 1640 | arity (Select _) = 1
183 :     | arity (Index _) = 1
184 : jhr 458 | arity (Subscript _) = 2
185 : jhr 1116 | arity (Ceiling _) = 1
186 : jhr 458 | arity (Floor _) = 1
187 : jhr 1116 | arity (Round _) = 1
188 :     | arity (Trunc _) = 1
189 : jhr 458 | arity IntToReal = 1
190 : jhr 1116 | arity (RealToInt _) = 1
191 :     | arity (ImageAddress _) = 1
192 : jhr 458 | arity (LoadVoxels _) = 1
193 : jhr 1116 | arity (PosToImgSpace _) = 2
194 :     | arity (TensorToWorldSpace _) = 2
195 :     | arity (LoadImage _) = 1
196 :     | arity (Inside _) = 2
197 : jhr 458 | arity (Input _) = 0
198 :     | arity (InputWithDefault _) = 1
199 : jhr 1640 | arity (Print _) = ~1
200 : jhr 458
201 : jhr 2356 fun isPure (Print _) = false
202 :     | isPure _ = true
203 :    
204 : jhr 458 fun same (Add(a0), Add(b0)) = samety(a0, b0)
205 :     | same (Sub(a0), Sub(b0)) = samety(a0, b0)
206 :     | same (Mul(a0), Mul(b0)) = samety(a0, b0)
207 :     | same (Div(a0), Div(b0)) = samety(a0, b0)
208 :     | same (Neg(a0), Neg(b0)) = samety(a0, b0)
209 : jhr 1116 | same (Abs(a0), Abs(b0)) = samety(a0, b0)
210 : jhr 458 | same (LT(a0), LT(b0)) = samety(a0, b0)
211 :     | same (LTE(a0), LTE(b0)) = samety(a0, b0)
212 :     | same (EQ(a0), EQ(b0)) = samety(a0, b0)
213 :     | same (NEQ(a0), NEQ(b0)) = samety(a0, b0)
214 :     | same (GT(a0), GT(b0)) = samety(a0, b0)
215 :     | same (GTE(a0), GTE(b0)) = samety(a0, b0)
216 :     | same (Not, Not) = true
217 :     | same (Max, Max) = true
218 :     | same (Min, Min) = true
219 : jhr 1295 | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)
220 : jhr 1116 | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)
221 : jhr 458 | same (Dot(a0), Dot(b0)) = sameint(a0, b0)
222 : jhr 1116 | same (MulVecMat(a0,a1), MulVecMat(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)
223 :     | same (MulMatVec(a0,a1), MulMatVec(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)
224 :     | same (MulMatMat(a0,a1,a2), MulMatMat(b0,b1,b2)) = sameint(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)
225 : jhr 2356 | same (MulVecTen3(a0,a1,a2), MulVecTen3(b0,b1,b2)) = sameint(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)
226 :     | same (MulTen3Vec(a0,a1,a2), MulTen3Vec(b0,b1,b2)) = sameint(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)
227 :     | same (ColonMul(a0,a1), ColonMul(b0,b1)) = samety(a0, b0) andalso samety(a1, b1)
228 : jhr 458 | same (Cross, Cross) = true
229 : jhr 1116 | same (Norm(a0), Norm(b0)) = samety(a0, b0)
230 :     | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)
231 :     | same (Scale(a0), Scale(b0)) = samety(a0, b0)
232 : jhr 458 | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)
233 : jhr 1640 | same (EigenVecs2x2, EigenVecs2x2) = true
234 :     | same (EigenVecs3x3, EigenVecs3x3) = true
235 :     | same (EigenVals2x2, EigenVals2x2) = true
236 :     | same (EigenVals3x3, EigenVals3x3) = true
237 : jhr 1116 | same (Identity(a0), Identity(b0)) = sameint(a0, b0)
238 :     | same (Zero(a0), Zero(b0)) = samety(a0, b0)
239 : jhr 2356 | same (Transpose(a0,a1), Transpose(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)
240 : jhr 1640 | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
241 :     | same (Index(a0,a1), Index(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
242 : jhr 458 | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)
243 : jhr 1116 | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)
244 : jhr 458 | same (Floor(a0), Floor(b0)) = sameint(a0, b0)
245 : jhr 1116 | same (Round(a0), Round(b0)) = sameint(a0, b0)
246 :     | same (Trunc(a0), Trunc(b0)) = sameint(a0, b0)
247 : jhr 458 | same (IntToReal, IntToReal) = true
248 : jhr 1116 | same (RealToInt(a0), RealToInt(b0)) = sameint(a0, b0)
249 : jhr 511 | same (ImageAddress(a0), ImageAddress(b0)) = ImageInfo.same(a0, b0)
250 : jhr 1116 | same (LoadVoxels(a0,a1), LoadVoxels(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
251 : jhr 458 | same (PosToImgSpace(a0), PosToImgSpace(b0)) = ImageInfo.same(a0, b0)
252 : jhr 1116 | same (TensorToWorldSpace(a0,a1), TensorToWorldSpace(b0,b1)) = ImageInfo.same(a0, b0) andalso samety(a1, b1)
253 : jhr 458 | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)
254 : jhr 1116 | same (Inside(a0,a1), Inside(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
255 : jhr 1301 | same (Input(a0,a1,a2), Input(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
256 :     | same (InputWithDefault(a0,a1,a2), InputWithDefault(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
257 : jhr 1640 | same (Print(a0), Print(b0)) = sametys(a0, b0)
258 : jhr 458 | same _ = false
259 :    
260 :     fun hash (Add(a0)) = 0w3 + hashty a0
261 :     | hash (Sub(a0)) = 0w5 + hashty a0
262 :     | hash (Mul(a0)) = 0w7 + hashty a0
263 :     | hash (Div(a0)) = 0w11 + hashty a0
264 :     | hash (Neg(a0)) = 0w13 + hashty a0
265 : jhr 1116 | hash (Abs(a0)) = 0w17 + hashty a0
266 :     | hash (LT(a0)) = 0w19 + hashty a0
267 :     | hash (LTE(a0)) = 0w23 + hashty a0
268 :     | hash (EQ(a0)) = 0w29 + hashty a0
269 :     | hash (NEQ(a0)) = 0w31 + hashty a0
270 :     | hash (GT(a0)) = 0w37 + hashty a0
271 :     | hash (GTE(a0)) = 0w41 + hashty a0
272 :     | hash Not = 0w43
273 :     | hash Max = 0w47
274 :     | hash Min = 0w53
275 : jhr 1295 | hash (Clamp(a0)) = 0w59 + hashty a0
276 :     | hash (Lerp(a0)) = 0w61 + hashty a0
277 :     | hash (Dot(a0)) = 0w67 + hashint a0
278 :     | hash (MulVecMat(a0,a1)) = 0w71 + hashint a0 + hashint a1
279 :     | hash (MulMatVec(a0,a1)) = 0w73 + hashint a0 + hashint a1
280 :     | hash (MulMatMat(a0,a1,a2)) = 0w79 + hashint a0 + hashint a1 + hashint a2
281 : jhr 2356 | hash (MulVecTen3(a0,a1,a2)) = 0w83 + hashint a0 + hashint a1 + hashint a2
282 :     | hash (MulTen3Vec(a0,a1,a2)) = 0w89 + hashint a0 + hashint a1 + hashint a2
283 :     | hash (ColonMul(a0,a1)) = 0w97 + hashty a0 + hashty a1
284 :     | hash Cross = 0w101
285 :     | hash (Norm(a0)) = 0w103 + hashty a0
286 :     | hash (Normalize(a0)) = 0w107 + hashint a0
287 :     | hash (Scale(a0)) = 0w109 + hashty a0
288 :     | hash (PrincipleEvec(a0)) = 0w113 + hashty a0
289 :     | hash EigenVecs2x2 = 0w127
290 :     | hash EigenVecs3x3 = 0w131
291 :     | hash EigenVals2x2 = 0w137
292 :     | hash EigenVals3x3 = 0w139
293 :     | hash (Identity(a0)) = 0w149 + hashint a0
294 :     | hash (Zero(a0)) = 0w151 + hashty a0
295 :     | hash (Transpose(a0,a1)) = 0w157 + hashint a0 + hashint a1
296 :     | hash (Select(a0,a1)) = 0w163 + hashty a0 + hashint a1
297 :     | hash (Index(a0,a1)) = 0w167 + hashty a0 + hashint a1
298 :     | hash (Subscript(a0)) = 0w173 + hashty a0
299 :     | hash (Ceiling(a0)) = 0w179 + hashint a0
300 :     | hash (Floor(a0)) = 0w181 + hashint a0
301 :     | hash (Round(a0)) = 0w191 + hashint a0
302 :     | hash (Trunc(a0)) = 0w193 + hashint a0
303 :     | hash IntToReal = 0w197
304 :     | hash (RealToInt(a0)) = 0w199 + hashint a0
305 :     | hash (ImageAddress(a0)) = 0w211 + ImageInfo.hash a0
306 :     | hash (LoadVoxels(a0,a1)) = 0w223 + ImageInfo.hash a0 + hashint a1
307 :     | hash (PosToImgSpace(a0)) = 0w227 + ImageInfo.hash a0
308 :     | hash (TensorToWorldSpace(a0,a1)) = 0w229 + ImageInfo.hash a0 + hashty a1
309 :     | hash (LoadImage(a0)) = 0w233 + ImageInfo.hash a0
310 :     | hash (Inside(a0,a1)) = 0w239 + ImageInfo.hash a0 + hashint a1
311 :     | hash (Input(a0,a1,a2)) = 0w241 + hashty a0 + hashstring a1 + hashstring a2
312 :     | hash (InputWithDefault(a0,a1,a2)) = 0w251 + hashty a0 + hashstring a1 + hashstring a2
313 :     | hash (Print(a0)) = 0w257 + hashtys a0
314 : jhr 458
315 :     fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
316 :     | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
317 :     | toString (Mul(a0)) = concat["Mul<", tyToString a0, ">"]
318 :     | toString (Div(a0)) = concat["Div<", tyToString a0, ">"]
319 :     | toString (Neg(a0)) = concat["Neg<", tyToString a0, ">"]
320 : jhr 1116 | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]
321 : jhr 458 | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]
322 :     | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]
323 :     | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]
324 :     | toString (NEQ(a0)) = concat["NEQ<", tyToString a0, ">"]
325 :     | toString (GT(a0)) = concat["GT<", tyToString a0, ">"]
326 :     | toString (GTE(a0)) = concat["GTE<", tyToString a0, ">"]
327 :     | toString Not = "Not"
328 :     | toString Max = "Max"
329 :     | toString Min = "Min"
330 : jhr 1295 | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]
331 : jhr 1116 | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]
332 : jhr 458 | toString (Dot(a0)) = concat["Dot<", intToString a0, ">"]
333 : jhr 1116 | toString (MulVecMat(a0,a1)) = concat["MulVecMat<", intToString a0, ",", intToString a1, ">"]
334 :     | toString (MulMatVec(a0,a1)) = concat["MulMatVec<", intToString a0, ",", intToString a1, ">"]
335 :     | toString (MulMatMat(a0,a1,a2)) = concat["MulMatMat<", intToString a0, ",", intToString a1, ",", intToString a2, ">"]
336 : jhr 2356 | toString (MulVecTen3(a0,a1,a2)) = concat["MulVecTen3<", intToString a0, ",", intToString a1, ",", intToString a2, ">"]
337 :     | toString (MulTen3Vec(a0,a1,a2)) = concat["MulTen3Vec<", intToString a0, ",", intToString a1, ",", intToString a2, ">"]
338 :     | toString (ColonMul(a0,a1)) = concat["ColonMul<", tyToString a0, ",", tyToString a1, ">"]
339 : jhr 458 | toString Cross = "Cross"
340 : jhr 1116 | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]
341 :     | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]
342 :     | toString (Scale(a0)) = concat["Scale<", tyToString a0, ">"]
343 : jhr 458 | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]
344 : jhr 1640 | toString EigenVecs2x2 = "EigenVecs2x2"
345 :     | toString EigenVecs3x3 = "EigenVecs3x3"
346 :     | toString EigenVals2x2 = "EigenVals2x2"
347 :     | toString EigenVals3x3 = "EigenVals3x3"
348 : jhr 1116 | toString (Identity(a0)) = concat["Identity<", intToString a0, ">"]
349 :     | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]
350 : jhr 2356 | toString (Transpose(a0,a1)) = concat["Transpose<", intToString a0, ",", intToString a1, ">"]
351 : jhr 1640 | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]
352 :     | toString (Index(a0,a1)) = concat["Index<", tyToString a0, ",", intToString a1, ">"]
353 : jhr 458 | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]
354 : jhr 1116 | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]
355 : jhr 458 | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]
356 : jhr 1116 | toString (Round(a0)) = concat["Round<", intToString a0, ">"]
357 :     | toString (Trunc(a0)) = concat["Trunc<", intToString a0, ">"]
358 : jhr 458 | toString IntToReal = "IntToReal"
359 : jhr 1116 | toString (RealToInt(a0)) = concat["RealToInt<", intToString a0, ">"]
360 : jhr 511 | toString (ImageAddress(a0)) = concat["ImageAddress<", ImageInfo.toString a0, ">"]
361 : jhr 1116 | toString (LoadVoxels(a0,a1)) = concat["LoadVoxels<", ImageInfo.toString a0, ",", intToString a1, ">"]
362 : jhr 458 | toString (PosToImgSpace(a0)) = concat["PosToImgSpace<", ImageInfo.toString a0, ">"]
363 : jhr 1116 | toString (TensorToWorldSpace(a0,a1)) = concat["TensorToWorldSpace<", ImageInfo.toString a0, ",", tyToString a1, ">"]
364 : jhr 458 | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]
365 : jhr 1116 | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]
366 : jhr 1301 | toString (Input(a0,a1,a2)) = concat["Input<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
367 :     | toString (InputWithDefault(a0,a1,a2)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
368 : jhr 1640 | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]
369 : jhr 458
370 :     end
371 :    
372 :     structure LowIL = SSAFn(
373 : jhr 1232 val ilName = "low-il"
374 : jhr 458 structure Ty = LowILTypes
375 :     structure Op = LowOps)
376 : jhr 1116
377 :     structure LowILCensus = CensusFn(LowIL)
378 :    

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