src/HOL/Tools/Sledgehammer/sledgehammer_provers.ML
changeset 42939 0134d6650092
parent 42937 cabb3a947894
child 42943 62a14c80d194
equal deleted inserted replaced
42938:c124032ac96f 42939:0134d6650092
   411     else (FOF, Preds (Mangled_Monomorphic, level, Heavy))
   411     else (FOF, Preds (Mangled_Monomorphic, level, Heavy))
   412   | adjust_dumb_type_sys formats type_sys =
   412   | adjust_dumb_type_sys formats type_sys =
   413     (* We could return (TFF, type_sys) in all cases but this would require the
   413     (* We could return (TFF, type_sys) in all cases but this would require the
   414        TFF provers to accept problems in which constants are implicitly
   414        TFF provers to accept problems in which constants are implicitly
   415        declared. Today neither SNARK nor ToFoF-E satisfy this criterion. *)
   415        declared. Today neither SNARK nor ToFoF-E satisfy this criterion. *)
   416     if member (op =) formats FOF then (FOF, type_sys)
   416     if member (op =) formats FOF then
   417     else (TFF, Simple_Types All_Types)
   417       (FOF, type_sys)
       
   418     else if member (op =) formats CNF_UEQ then
       
   419       (CNF_UEQ, case type_sys of
       
   420                   Tags _ => type_sys
       
   421                 | _ => Preds (polymorphism_of_type_sys type_sys,
       
   422                               Const_Arg_Types, Light))
       
   423     else
       
   424       (TFF, Simple_Types All_Types)
   418 fun determine_format_and_type_sys _ formats (Dumb_Type_Sys type_sys) =
   425 fun determine_format_and_type_sys _ formats (Dumb_Type_Sys type_sys) =
   419     adjust_dumb_type_sys formats type_sys
   426     adjust_dumb_type_sys formats type_sys
   420   | determine_format_and_type_sys best_type_systems formats
   427   | determine_format_and_type_sys best_type_systems formats
   421                                   (Smart_Type_Sys full_types) =
   428                                   (Smart_Type_Sys full_types) =
   422     map type_sys_from_string best_type_systems @ fallback_best_type_systems
   429     map type_sys_from_string best_type_systems @ fallback_best_type_systems
   533                     |> Output.urgent_message
   540                     |> Output.urgent_message
   534                   else
   541                   else
   535                     ()
   542                     ()
   536                 val (atp_problem, pool, conjecture_offset, facts_offset,
   543                 val (atp_problem, pool, conjecture_offset, facts_offset,
   537                      fact_names, typed_helpers, sym_tab) =
   544                      fact_names, typed_helpers, sym_tab) =
   538                   prepare_atp_problem ctxt conj_sym_kind prem_kind type_sys
   545                   prepare_atp_problem ctxt format conj_sym_kind prem_kind
   539                                       explicit_apply hyp_ts concl_t facts
   546                       type_sys explicit_apply hyp_ts concl_t facts
   540                 fun weights () = atp_problem_weights atp_problem
   547                 fun weights () = atp_problem_weights atp_problem
   541                 val core =
   548                 val core =
   542                   File.shell_path command ^ " " ^
   549                   File.shell_path command ^ " " ^
   543                   arguments ctxt slice slice_timeout weights ^ " " ^
   550                   arguments ctxt slice slice_timeout weights ^ " " ^
   544                   File.shell_path prob_file
   551                   File.shell_path prob_file