305 (class_syntax', tyco_syntax', const_syntax')) |
305 (class_syntax', tyco_syntax', const_syntax')) |
306 end; |
306 end; |
307 |
307 |
308 fun project_program thy abortable names_hidden names1 program2 = |
308 fun project_program thy abortable names_hidden names1 program2 = |
309 let |
309 let |
|
310 val ctxt = ProofContext.init_global thy; |
310 val names2 = subtract (op =) names_hidden names1; |
311 val names2 = subtract (op =) names_hidden names1; |
311 val program3 = Graph.subgraph (not o member (op =) names_hidden) program2; |
312 val program3 = Graph.subgraph (not o member (op =) names_hidden) program2; |
312 val names4 = Graph.all_succs program3 names2; |
313 val names4 = Graph.all_succs program3 names2; |
313 val empty_funs = filter_out (member (op =) abortable) |
314 val empty_funs = filter_out (member (op =) abortable) |
314 (Code_Thingol.empty_funs program3); |
315 (Code_Thingol.empty_funs program3); |
315 val _ = if null empty_funs then () else error ("No code equations for " |
316 val _ = |
316 ^ commas (map (Sign.extern_const thy) empty_funs)); |
317 if null empty_funs then () |
|
318 else error ("No code equations for " ^ |
|
319 commas (map (ProofContext.extern_const ctxt) empty_funs)); |
317 val program4 = Graph.subgraph (member (op =) names4) program3; |
320 val program4 = Graph.subgraph (member (op =) names4) program3; |
318 in (names4, program4) end; |
321 in (names4, program4) end; |
319 |
322 |
320 fun prepare_serializer thy abortable serializer literals reserved all_includes |
323 fun prepare_serializer thy abortable serializer literals reserved all_includes |
321 module_alias proto_class_syntax proto_instance_syntax proto_tyco_syntax proto_const_syntax |
324 module_alias proto_class_syntax proto_instance_syntax proto_tyco_syntax proto_const_syntax |