437 |
437 |
438 val fallback_best_type_systems = |
438 val fallback_best_type_systems = |
439 [Preds (Mangled_Monomorphic, Nonmonotonic_Types, Light)] |
439 [Preds (Mangled_Monomorphic, Nonmonotonic_Types, Light)] |
440 |
440 |
441 fun adjust_dumb_type_sys formats (Simple_Types level) = |
441 fun adjust_dumb_type_sys formats (Simple_Types level) = |
442 (case inter (op =) formats [TFF, THF] of |
442 if member (op =) formats THF then |
443 format :: _ => (format, Simple_Types level) |
443 (THF, Simple_Types level) |
444 | [] => adjust_dumb_type_sys formats |
444 else if member (op =) formats TFF then |
445 (Preds (Mangled_Monomorphic, level, Heavy))) |
445 (TFF, Simple_Types level) |
|
446 else |
|
447 adjust_dumb_type_sys formats (Preds (Mangled_Monomorphic, level, Heavy)) |
446 | adjust_dumb_type_sys formats type_sys = |
448 | adjust_dumb_type_sys formats type_sys = |
447 if member (op =) formats CNF_UEQ then |
449 if member (op =) formats FOF then |
|
450 (FOF, type_sys) |
|
451 else if member (op =) formats CNF_UEQ then |
448 (CNF_UEQ, case type_sys of |
452 (CNF_UEQ, case type_sys of |
449 Tags _ => type_sys |
453 Tags _ => type_sys |
450 | _ => Preds (polymorphism_of_type_sys type_sys, |
454 | _ => Preds (polymorphism_of_type_sys type_sys, |
451 Const_Arg_Types, Light)) |
455 Const_Arg_Types, Light)) |
452 else if member (op =) formats FOF then |
|
453 (FOF, type_sys) |
|
454 else |
456 else |
455 (* We could return "type_sys" in all cases but this would require the |
457 (* We could return "type_sys" unchanged for TFF but this would require the |
456 TFF and THF provers to accept problems in which constants are |
458 TFF provers to accept problems in which constants are implicitly |
457 implicitly declared. Today neither SNARK nor ToFoF-E satisfy this |
459 declared. Today neither SNARK nor ToFoF-E meet this criterion. *) |
458 criterion. (FIXME: what about LEO-II?) *) |
|
459 (hd formats, Simple_Types All_Types) |
460 (hd formats, Simple_Types All_Types) |
460 fun determine_format_and_type_sys _ formats (Dumb_Type_Sys type_sys) = |
461 fun determine_format_and_type_sys _ formats (Dumb_Type_Sys type_sys) = |
461 adjust_dumb_type_sys formats type_sys |
462 adjust_dumb_type_sys formats type_sys |
462 | determine_format_and_type_sys best_type_systems formats |
463 | determine_format_and_type_sys best_type_systems formats |
463 (Smart_Type_Sys full_types) = |
464 (Smart_Type_Sys full_types) = |