20600
|
1 |
(* Title: Pure/Tools/codegen_funcgr.ML
|
|
2 |
ID: $Id$
|
|
3 |
Author: Florian Haftmann, TU Muenchen
|
|
4 |
|
22185
|
5 |
Retrieving, normalizing and structuring defining equations
|
20855
|
6 |
in graph with explicit dependencies.
|
20600
|
7 |
*)
|
|
8 |
|
|
9 |
signature CODEGEN_FUNCGR =
|
|
10 |
sig
|
22212
|
11 |
type T
|
|
12 |
val timing: bool ref
|
21120
|
13 |
val funcs: T -> CodegenConsts.const -> thm list
|
|
14 |
val typ: T -> CodegenConsts.const -> typ
|
|
15 |
val deps: T -> CodegenConsts.const list -> CodegenConsts.const list list
|
|
16 |
val all: T -> CodegenConsts.const list
|
22212
|
17 |
val pretty: theory -> T -> Pretty.T
|
|
18 |
end
|
|
19 |
|
|
20 |
signature CODEGEN_FUNCGR_RETRIEVAL =
|
|
21 |
sig
|
|
22 |
type T (* = CODEGEN_FUNCGR.T *)
|
|
23 |
val make: theory -> CodegenConsts.const list -> T
|
|
24 |
val make_consts: theory -> CodegenConsts.const list -> CodegenConsts.const list * T
|
|
25 |
val make_term: theory -> (T -> (thm -> thm) -> cterm -> thm -> 'a) -> cterm -> 'a * T
|
|
26 |
val init: theory -> theory
|
20600
|
27 |
end;
|
|
28 |
|
22212
|
29 |
structure CodegenFuncgr = (*signature is added later*)
|
20600
|
30 |
struct
|
|
31 |
|
22212
|
32 |
(** the graph type **)
|
20600
|
33 |
|
|
34 |
structure Constgraph = GraphFun (
|
|
35 |
type key = CodegenConsts.const;
|
|
36 |
val ord = CodegenConsts.const_ord;
|
|
37 |
);
|
|
38 |
|
|
39 |
type T = (typ * thm list) Constgraph.T;
|
|
40 |
|
22185
|
41 |
fun funcs funcgr =
|
|
42 |
these o Option.map snd o try (Constgraph.get_node funcgr);
|
|
43 |
|
|
44 |
fun typ funcgr =
|
|
45 |
fst o Constgraph.get_node funcgr;
|
|
46 |
|
|
47 |
fun deps funcgr cs =
|
|
48 |
let
|
|
49 |
val conn = Constgraph.strong_conn funcgr;
|
|
50 |
val order = rev conn;
|
|
51 |
in
|
|
52 |
(map o filter) (member (op =) (Constgraph.all_succs funcgr cs)) order
|
|
53 |
|> filter_out null
|
|
54 |
end;
|
|
55 |
|
|
56 |
fun all funcgr = Constgraph.keys funcgr;
|
|
57 |
|
22212
|
58 |
fun pretty thy funcgr =
|
|
59 |
AList.make (snd o Constgraph.get_node funcgr) (Constgraph.keys funcgr)
|
|
60 |
|> (map o apfst) (CodegenConsts.string_of_const thy)
|
|
61 |
|> sort (string_ord o pairself fst)
|
|
62 |
|> map (fn (s, thms) =>
|
|
63 |
(Pretty.block o Pretty.fbreaks) (
|
|
64 |
Pretty.str s
|
|
65 |
:: map Display.pretty_thm thms
|
|
66 |
))
|
|
67 |
|> Pretty.chunks;
|
20600
|
68 |
|
|
69 |
|
22185
|
70 |
(** generic combinators **)
|
20600
|
71 |
|
22185
|
72 |
fun fold_consts f thms =
|
|
73 |
thms
|
|
74 |
|> maps (op :: o swap o apfst (snd o strip_comb) o Logic.dest_equals o Drule.plain_prop_of)
|
|
75 |
|> (fold o fold_aterms) (fn Const c => f c | _ => I);
|
20600
|
76 |
|
22185
|
77 |
fun consts_of (const, []) = []
|
|
78 |
| consts_of (const, thms as thm :: _) =
|
|
79 |
let
|
|
80 |
val thy = Thm.theory_of_thm thm;
|
|
81 |
val is_refl = curry CodegenConsts.eq_const const;
|
|
82 |
fun the_const c = case try (CodegenConsts.norm_of_typ thy) c
|
|
83 |
of SOME const => if is_refl const then I else insert CodegenConsts.eq_const const
|
|
84 |
| NONE => I
|
|
85 |
in fold_consts the_const thms [] end;
|
20600
|
86 |
|
22185
|
87 |
fun insts_of thy algebra c ty_decl ty =
|
20600
|
88 |
let
|
22185
|
89 |
val tys_decl = Sign.const_typargs thy (c, ty_decl);
|
20600
|
90 |
val tys = Sign.const_typargs thy (c, ty);
|
22185
|
91 |
fun classrel (x, _) _ = x;
|
20600
|
92 |
fun constructor tyco xs class =
|
|
93 |
(tyco, class) :: maps (maps fst) xs;
|
|
94 |
fun variable (TVar (_, sort)) = map (pair []) sort
|
|
95 |
| variable (TFree (_, sort)) = map (pair []) sort;
|
|
96 |
fun mk_inst ty (TVar (_, sort)) = cons (ty, sort)
|
|
97 |
| mk_inst ty (TFree (_, sort)) = cons (ty, sort)
|
22198
|
98 |
| mk_inst (Type (_, tys1)) (Type (_, tys2)) = fold2 mk_inst tys1 tys2;
|
21120
|
99 |
fun of_sort_deriv (ty, sort) =
|
22185
|
100 |
Sorts.of_sort_derivation (Sign.pp thy) algebra
|
21120
|
101 |
{ classrel = classrel, constructor = constructor, variable = variable }
|
|
102 |
(ty, sort)
|
20600
|
103 |
in
|
21120
|
104 |
flat (maps of_sort_deriv (fold2 mk_inst tys tys_decl []))
|
20600
|
105 |
end;
|
|
106 |
|
22212
|
107 |
fun drop_classes thy tfrees thm =
|
|
108 |
let
|
|
109 |
val (_, thm') = Thm.varifyT' [] thm;
|
|
110 |
val tvars = Term.add_tvars (Thm.prop_of thm') [];
|
|
111 |
val unconstr = map (Thm.ctyp_of thy o TVar) tvars;
|
|
112 |
val instmap = map2 (fn (v_i, _) => fn (v, sort) => pairself (Thm.ctyp_of thy)
|
|
113 |
(TVar (v_i, []), TFree (v, sort))) tvars tfrees;
|
|
114 |
in
|
|
115 |
thm'
|
|
116 |
|> fold Thm.unconstrainT unconstr
|
|
117 |
|> Thm.instantiate (instmap, [])
|
|
118 |
|> Tactic.rule_by_tactic ((REPEAT o CHANGED o ALLGOALS o Tactic.resolve_tac) (AxClass.class_intros thy))
|
|
119 |
end;
|
|
120 |
|
22039
|
121 |
|
22185
|
122 |
(** graph algorithm **)
|
20600
|
123 |
|
22185
|
124 |
val timing = ref false;
|
20600
|
125 |
|
22185
|
126 |
local
|
20600
|
127 |
|
22185
|
128 |
exception INVALID of CodegenConsts.const list * string;
|
20600
|
129 |
|
22198
|
130 |
fun resort_thms algebra tap_typ [] = []
|
|
131 |
| resort_thms algebra tap_typ (thms as thm :: _) =
|
20600
|
132 |
let
|
22198
|
133 |
val thy = Thm.theory_of_thm thm;
|
|
134 |
val cs = fold_consts (insert (op =)) thms [];
|
|
135 |
fun match_const c (ty, ty_decl) =
|
20600
|
136 |
let
|
22198
|
137 |
val tys = CodegenConsts.typargs thy (c, ty);
|
|
138 |
val sorts = map (snd o dest_TVar) (CodegenConsts.typargs thy (c, ty_decl));
|
|
139 |
in fold2 (curry (CodegenConsts.typ_sort_inst algebra)) tys sorts end;
|
|
140 |
fun match (c_ty as (c, ty)) =
|
|
141 |
case tap_typ c_ty
|
|
142 |
of SOME ty_decl => match_const c (ty, ty_decl)
|
|
143 |
| NONE => I;
|
|
144 |
val tvars = fold match cs Vartab.empty;
|
|
145 |
in map (CodegenFunc.inst_thm tvars) thms end;
|
20600
|
146 |
|
22198
|
147 |
fun resort_funcss thy algebra funcgr =
|
|
148 |
let
|
|
149 |
val typ_funcgr = try (fst o Constgraph.get_node funcgr o CodegenConsts.norm_of_typ thy);
|
|
150 |
fun resort_dep (const, thms) = (const, resort_thms algebra typ_funcgr thms)
|
|
151 |
handle Sorts.CLASS_ERROR e => raise INVALID ([const], Sorts.msg_class_error (Sign.pp thy) e
|
|
152 |
^ ",\nfor constant " ^ CodegenConsts.string_of_const thy const
|
|
153 |
^ "\nin defining equations\n"
|
|
154 |
^ (cat_lines o map string_of_thm) thms)
|
|
155 |
fun resort_rec tap_typ (const, []) = (true, (const, []))
|
|
156 |
| resort_rec tap_typ (const, thms as thm :: _) =
|
|
157 |
let
|
|
158 |
val ty = CodegenFunc.typ_func thm;
|
|
159 |
val thms' as thm' :: _ = resort_thms algebra tap_typ thms
|
|
160 |
val ty' = CodegenFunc.typ_func thm';
|
|
161 |
in (Sign.typ_equiv thy (ty, ty'), (const, thms')) end;
|
|
162 |
fun resort_recs funcss =
|
|
163 |
let
|
|
164 |
fun tap_typ c_ty = case try (CodegenConsts.norm_of_typ thy) c_ty
|
|
165 |
of SOME const => AList.lookup (CodegenConsts.eq_const) funcss const
|
|
166 |
|> these
|
|
167 |
|> try hd
|
|
168 |
|> Option.map CodegenFunc.typ_func
|
|
169 |
| NONE => NONE;
|
|
170 |
val (unchangeds, funcss') = split_list (map (resort_rec tap_typ) funcss);
|
|
171 |
val unchanged = fold (fn x => fn y => x andalso y) unchangeds true;
|
|
172 |
in (unchanged, funcss') end;
|
|
173 |
fun resort_rec_until funcss =
|
|
174 |
let
|
|
175 |
val (unchanged, funcss') = resort_recs funcss;
|
|
176 |
in if unchanged then funcss' else resort_rec_until funcss' end;
|
|
177 |
in map resort_dep #> resort_rec_until end;
|
22039
|
178 |
|
22185
|
179 |
fun classop_const thy algebra class classop tyco =
|
|
180 |
let
|
|
181 |
val sorts = Sorts.mg_domain algebra tyco [class]
|
|
182 |
val (var, _) = try (AxClass.params_of_class thy) class |> the_default ("'a", []);
|
|
183 |
val vs = Name.names (Name.declare var Name.context) "'a" sorts;
|
|
184 |
val arity_typ = Type (tyco, map TFree vs);
|
|
185 |
in (classop, [arity_typ]) end;
|
|
186 |
|
|
187 |
fun instances_of thy algebra insts =
|
|
188 |
let
|
|
189 |
val thy_classes = (#classes o Sorts.rep_algebra o Sign.classes_of) thy;
|
|
190 |
fun all_classops tyco class =
|
|
191 |
try (AxClass.params_of_class thy) class
|
|
192 |
|> Option.map snd
|
|
193 |
|> these
|
|
194 |
|> map (fn (c, _) => classop_const thy algebra class c tyco)
|
|
195 |
|> map (CodegenConsts.norm thy)
|
|
196 |
in
|
|
197 |
Symtab.empty
|
|
198 |
|> fold (fn (tyco, class) =>
|
|
199 |
Symtab.map_default (tyco, []) (insert (op =) class)) insts
|
|
200 |
|> (fn tab => Symtab.fold (fn (tyco, classes) => append (maps (all_classops tyco)
|
|
201 |
(Graph.all_succs thy_classes classes))) tab [])
|
|
202 |
end;
|
|
203 |
|
|
204 |
fun instances_of_consts thy algebra funcgr consts =
|
20600
|
205 |
let
|
22185
|
206 |
fun inst (const as (c, ty)) = case try (CodegenConsts.norm_of_typ thy) const
|
|
207 |
of SOME const => insts_of thy algebra c (fst (Constgraph.get_node funcgr const)) ty
|
|
208 |
| NONE => [];
|
|
209 |
in
|
|
210 |
[]
|
|
211 |
|> fold (fold (insert (op =)) o inst) consts
|
|
212 |
|> instances_of thy algebra
|
|
213 |
end;
|
|
214 |
|
22212
|
215 |
fun ensure_const' rewrites thy algebra funcgr const auxgr =
|
22185
|
216 |
if can (Constgraph.get_node funcgr) const
|
|
217 |
then (NONE, auxgr)
|
|
218 |
else if can (Constgraph.get_node auxgr) const
|
|
219 |
then (SOME const, auxgr)
|
|
220 |
else if is_some (CodegenData.get_datatype_of_constr thy const) then
|
|
221 |
auxgr
|
|
222 |
|> Constgraph.new_node (const, [])
|
|
223 |
|> pair (SOME const)
|
|
224 |
else let
|
22212
|
225 |
val thms = CodegenData.these_funcs thy const
|
|
226 |
|> map (CodegenFunc.rewrite_func (rewrites thy))
|
|
227 |
|> CodegenFunc.norm_args
|
|
228 |
|> CodegenFunc.norm_varnames CodegenNames.purify_tvar CodegenNames.purify_var;
|
22185
|
229 |
val rhs = consts_of (const, thms);
|
|
230 |
in
|
|
231 |
auxgr
|
|
232 |
|> Constgraph.new_node (const, thms)
|
22212
|
233 |
|> fold_map (ensure_const rewrites thy algebra funcgr) rhs
|
22185
|
234 |
|-> (fn rhs' => fold (fn SOME const' => Constgraph.add_edge (const, const')
|
|
235 |
| NONE => I) rhs')
|
|
236 |
|> pair (SOME const)
|
|
237 |
end
|
22212
|
238 |
and ensure_const rewrites thy algebra funcgr const =
|
22185
|
239 |
let
|
|
240 |
val timeap = if !timing
|
|
241 |
then Output.timeap_msg ("time for " ^ CodegenConsts.string_of_const thy const)
|
|
242 |
else I;
|
22212
|
243 |
in timeap (ensure_const' rewrites thy algebra funcgr const) end;
|
22185
|
244 |
|
22212
|
245 |
fun merge_funcss rewrites thy algebra raw_funcss funcgr =
|
22185
|
246 |
let
|
22401
|
247 |
val funcss = raw_funcss
|
|
248 |
|> resort_funcss thy algebra funcgr
|
|
249 |
|> filter_out (can (Constgraph.get_node funcgr) o fst);
|
22198
|
250 |
fun classop_typ (c, [typarg]) class =
|
|
251 |
let
|
|
252 |
val ty = Sign.the_const_type thy c;
|
|
253 |
val inst = case typarg
|
|
254 |
of Type (tyco, _) => classop_const thy algebra class c tyco
|
|
255 |
|> snd
|
|
256 |
|> the_single
|
|
257 |
|> Logic.varifyT
|
|
258 |
| _ => TVar (("'a", 0), [class]);
|
|
259 |
in Term.map_type_tvar (K inst) ty end;
|
22185
|
260 |
fun default_typ (const as (c, tys)) = case CodegenData.tap_typ thy const
|
|
261 |
of SOME ty => ty
|
22198
|
262 |
| NONE => (case AxClass.class_of_param thy c
|
|
263 |
of SOME class => classop_typ const class
|
|
264 |
| NONE => Sign.the_const_type thy c)
|
22223
|
265 |
fun typ_func (const as (c, tys)) thms thm =
|
22198
|
266 |
let
|
|
267 |
val ty = CodegenFunc.typ_func thm;
|
|
268 |
in case AxClass.class_of_param thy c
|
|
269 |
of SOME class => (case tys
|
|
270 |
of [Type _] => let val ty_decl = classop_typ const class
|
|
271 |
in if Sign.typ_equiv thy (ty, ty_decl) then ty
|
|
272 |
else raise raise INVALID ([const], "Illegal instantation for class operation "
|
|
273 |
^ CodegenConsts.string_of_const thy const
|
|
274 |
^ ":\n" ^ CodegenConsts.string_of_typ thy ty_decl
|
22223
|
275 |
^ "\nto " ^ CodegenConsts.string_of_typ thy ty
|
|
276 |
^ "\nin defining equations\n"
|
|
277 |
^ (cat_lines o map string_of_thm) thms)
|
22198
|
278 |
end
|
|
279 |
| _ => ty)
|
|
280 |
| NONE => ty
|
|
281 |
end;
|
22185
|
282 |
fun add_funcs (const, thms as thm :: _) =
|
22223
|
283 |
Constgraph.new_node (const, (typ_func const thms thm, thms))
|
22185
|
284 |
| add_funcs (const, []) =
|
|
285 |
Constgraph.new_node (const, (default_typ const, []));
|
|
286 |
fun add_deps (funcs as (const, thms)) funcgr =
|
|
287 |
let
|
|
288 |
val deps = consts_of funcs;
|
|
289 |
val insts = instances_of_consts thy algebra funcgr
|
|
290 |
(fold_consts (insert (op =)) thms []);
|
|
291 |
in
|
|
292 |
funcgr
|
22212
|
293 |
|> ensure_consts' rewrites thy algebra insts
|
22185
|
294 |
|> fold (curry Constgraph.add_edge const) deps
|
|
295 |
|> fold (curry Constgraph.add_edge const) insts
|
|
296 |
end;
|
20600
|
297 |
in
|
|
298 |
funcgr
|
22185
|
299 |
|> fold add_funcs funcss
|
|
300 |
|> fold add_deps funcss
|
20600
|
301 |
end
|
22212
|
302 |
and ensure_consts' rewrites thy algebra cs funcgr =
|
22401
|
303 |
let
|
|
304 |
val auxgr = Constgraph.empty
|
|
305 |
|> fold (snd oo ensure_const rewrites thy algebra funcgr) cs;
|
|
306 |
in
|
|
307 |
funcgr
|
|
308 |
|> fold (merge_funcss rewrites thy algebra)
|
|
309 |
(map (AList.make (Constgraph.get_node auxgr))
|
|
310 |
(rev (Constgraph.strong_conn auxgr)))
|
|
311 |
end handle INVALID (cs', msg)
|
|
312 |
=> raise INVALID (fold (insert CodegenConsts.eq_const) cs' cs, msg);
|
20600
|
313 |
|
22212
|
314 |
fun ensure_consts rewrites thy consts funcgr =
|
22185
|
315 |
let
|
|
316 |
val algebra = CodegenData.coregular_algebra thy
|
22212
|
317 |
in ensure_consts' rewrites thy algebra consts funcgr
|
22185
|
318 |
handle INVALID (cs', msg) => error (msg ^ ",\nwhile preprocessing equations for constant(s) "
|
|
319 |
^ commas (map (CodegenConsts.string_of_const thy) cs'))
|
|
320 |
end;
|
|
321 |
|
20600
|
322 |
in
|
|
323 |
|
22212
|
324 |
(** retrieval interfaces **)
|
20600
|
325 |
|
22212
|
326 |
val ensure_consts = ensure_consts;
|
21120
|
327 |
|
22212
|
328 |
fun check_consts rewrites thy consts funcgr =
|
22185
|
329 |
let
|
|
330 |
val algebra = CodegenData.coregular_algebra thy;
|
|
331 |
fun try_const const funcgr =
|
22212
|
332 |
(SOME const, ensure_consts' rewrites thy algebra [const] funcgr)
|
22185
|
333 |
handle INVALID (cs', msg) => (NONE, funcgr);
|
22212
|
334 |
val (consts', funcgr') = fold_map try_const consts funcgr;
|
|
335 |
in (map_filter I consts', funcgr') end;
|
22185
|
336 |
|
22212
|
337 |
fun ensure_consts_term rewrites thy f ct funcgr =
|
21120
|
338 |
let
|
22212
|
339 |
fun rhs_conv conv thm =
|
|
340 |
let
|
|
341 |
val thm' = (conv o snd o Drule.dest_equals o Thm.cprop_of) thm;
|
|
342 |
in Thm.transitive thm thm' end
|
21120
|
343 |
val _ = Sign.no_vars (Sign.pp thy) (Thm.term_of ct);
|
|
344 |
val _ = Term.fold_types (Type.no_tvars #> K I) (Thm.term_of ct) ();
|
22212
|
345 |
val thm1 = CodegenData.preprocess_cterm ct
|
|
346 |
|> fold (rhs_conv o MetaSimplifier.rewrite false o single) (rewrites thy);
|
21120
|
347 |
val ct' = Drule.dest_equals_rhs (Thm.cprop_of thm1);
|
|
348 |
val consts = CodegenConsts.consts_of thy (Thm.term_of ct');
|
22212
|
349 |
val funcgr' = ensure_consts rewrites thy consts funcgr;
|
22198
|
350 |
val algebra = CodegenData.coregular_algebra thy;
|
21120
|
351 |
val (_, thm2) = Thm.varifyT' [] thm1;
|
|
352 |
val thm3 = Thm.reflexive (Drule.dest_equals_rhs (Thm.cprop_of thm2));
|
22212
|
353 |
val typ_funcgr = try (fst o Constgraph.get_node funcgr' o CodegenConsts.norm_of_typ thy);
|
22198
|
354 |
val [thm4] = resort_thms algebra typ_funcgr [thm3];
|
21120
|
355 |
val tfrees = Term.add_tfrees (Thm.prop_of thm1) [];
|
|
356 |
fun inst thm =
|
|
357 |
let
|
|
358 |
val tvars = Term.add_tvars (Thm.prop_of thm) [];
|
|
359 |
val instmap = map2 (fn (v_i, sort) => fn (v, _) => pairself (Thm.ctyp_of thy)
|
|
360 |
(TVar (v_i, sort), TFree (v, sort))) tvars tfrees;
|
|
361 |
in Thm.instantiate (instmap, []) thm end;
|
|
362 |
val thm5 = inst thm2;
|
|
363 |
val thm6 = inst thm4;
|
|
364 |
val ct'' = Drule.dest_equals_rhs (Thm.cprop_of thm6);
|
|
365 |
val cs = fold_aterms (fn Const c => cons c | _ => I) (Thm.term_of ct'') [];
|
|
366 |
val drop = drop_classes thy tfrees;
|
22212
|
367 |
val instdefs = instances_of_consts thy algebra funcgr' cs;
|
|
368 |
val funcgr'' = ensure_consts rewrites thy instdefs funcgr';
|
|
369 |
in (f funcgr'' drop ct'' thm5, funcgr'') end;
|
20600
|
370 |
|
|
371 |
end; (*local*)
|
|
372 |
|
22212
|
373 |
end; (*struct*)
|
22185
|
374 |
|
22212
|
375 |
functor CodegenFuncgrRetrieval (val name: string; val rewrites: theory -> thm list) : CODEGEN_FUNCGR_RETRIEVAL =
|
|
376 |
struct
|
20600
|
377 |
|
22212
|
378 |
(** code data **)
|
|
379 |
|
|
380 |
type T = CodegenFuncgr.T;
|
20600
|
381 |
|
22212
|
382 |
structure Funcgr = CodeDataFun
|
|
383 |
(struct
|
|
384 |
val name = name;
|
|
385 |
type T = T;
|
|
386 |
val empty = CodegenFuncgr.Constgraph.empty;
|
|
387 |
fun merge _ _ = CodegenFuncgr.Constgraph.empty;
|
|
388 |
fun purge _ NONE _ = CodegenFuncgr.Constgraph.empty
|
|
389 |
| purge _ (SOME cs) funcgr =
|
|
390 |
CodegenFuncgr.Constgraph.del_nodes ((CodegenFuncgr.Constgraph.all_preds funcgr
|
|
391 |
o filter (can (CodegenFuncgr.Constgraph.get_node funcgr))) cs) funcgr;
|
|
392 |
end);
|
20600
|
393 |
|
22212
|
394 |
fun make thy =
|
|
395 |
Funcgr.change thy o CodegenFuncgr.ensure_consts rewrites thy;
|
20600
|
396 |
|
22212
|
397 |
fun make_consts thy =
|
|
398 |
Funcgr.change_yield thy o CodegenFuncgr.check_consts rewrites thy;
|
|
399 |
|
|
400 |
fun make_term thy f =
|
|
401 |
Funcgr.change_yield thy o CodegenFuncgr.ensure_consts_term rewrites thy f;
|
20600
|
402 |
|
22212
|
403 |
val init = Funcgr.init;
|
|
404 |
|
|
405 |
end; (*functor*)
|
|
406 |
|
|
407 |
structure CodegenFuncgr : CODEGEN_FUNCGR =
|
|
408 |
struct
|
|
409 |
|
|
410 |
open CodegenFuncgr;
|
20600
|
411 |
|
|
412 |
end; (*struct*)
|