src/HOL/Tools/Sledgehammer/sledgehammer_provers.ML
changeset 42588 562d6415616a
parent 42587 4fbb1de05169
child 42589 9f7c48463645
equal deleted inserted replaced
42587:4fbb1de05169 42588:562d6415616a
   343   | type_sys_monomorphizes (Mangled _) = true
   343   | type_sys_monomorphizes (Mangled _) = true
   344   | type_sys_monomorphizes (Args (mono, _)) = mono
   344   | type_sys_monomorphizes (Args (mono, _)) = mono
   345   | type_sys_monomorphizes (Tags (mono, _)) = mono
   345   | type_sys_monomorphizes (Tags (mono, _)) = mono
   346   | type_sys_monomorphizes No_Types = false
   346   | type_sys_monomorphizes No_Types = false
   347 
   347 
   348 val fallback_best_type_systems = [Many_Typed, Args (false, Unsound)]
   348 val fallback_best_type_systems = [Args (false, Unsound), Many_Typed]
   349 
   349 
   350 fun adjust_dumb_type_sys formats Many_Typed =
   350 fun adjust_dumb_type_sys formats Many_Typed =
   351     if member (op =) formats Tff then (Tff, Many_Typed)
   351     if member (op =) formats Tff then (Tff, Many_Typed)
   352     else (Fof, Mangled Sound)
   352     else (Fof, Mangled Sound)
   353   | adjust_dumb_type_sys formats type_sys =
   353   | adjust_dumb_type_sys formats type_sys =
   356 fun determine_format_and_type_sys _ formats (Dumb_Type_Sys type_sys) =
   356 fun determine_format_and_type_sys _ formats (Dumb_Type_Sys type_sys) =
   357     adjust_dumb_type_sys formats type_sys
   357     adjust_dumb_type_sys formats type_sys
   358   | determine_format_and_type_sys best_type_systems formats
   358   | determine_format_and_type_sys best_type_systems formats
   359                                   (Smart_Type_Sys full_types) =
   359                                   (Smart_Type_Sys full_types) =
   360     best_type_systems @ fallback_best_type_systems
   360     best_type_systems @ fallback_best_type_systems
   361     |> filter (fn type_sys => (level_of_type_sys type_sys = Sound) = full_types)
   361     |> full_types ? filter (curry (op =) Sound o level_of_type_sys)
   362     |> hd |> adjust_dumb_type_sys formats
   362     |> hd |> adjust_dumb_type_sys formats
   363 
   363 
   364 fun run_atp auto name
   364 fun run_atp auto name
   365         ({exec, required_execs, arguments, proof_delims, known_failures,
   365         ({exec, required_execs, arguments, proof_delims, known_failures,
   366           hypothesis_kind, formats, best_slices, best_type_systems, ...}
   366           hypothesis_kind, formats, best_slices, best_type_systems, ...}