src/HOL/Tools/Sledgehammer/sledgehammer_prover_atp.ML
changeset 55297 1dfcd49f5dcb
parent 55296 1d3dadda13a1
child 55307 59ab33f9d4de
equal deleted inserted replaced
55296:1d3dadda13a1 55297:1dfcd49f5dcb
   130 val atp_important_message_keep_quotient = 25
   130 val atp_important_message_keep_quotient = 25
   131 
   131 
   132 fun run_atp mode name
   132 fun run_atp mode name
   133     (params as {debug, verbose, overlord, type_enc, strict, lam_trans, uncurried_aliases,
   133     (params as {debug, verbose, overlord, type_enc, strict, lam_trans, uncurried_aliases,
   134        fact_filter, max_facts, max_mono_iters, max_new_mono_instances, isar_proofs, compress_isar,
   134        fact_filter, max_facts, max_mono_iters, max_new_mono_instances, isar_proofs, compress_isar,
   135        try0_isar, smt, slice, minimize, timeout, preplay_timeout, ...})
   135        try0_isar, smt_proofs, slice, minimize, timeout, preplay_timeout, ...})
   136     minimize_command
   136     minimize_command
   137     ({comment, state, goal, subgoal, subgoal_count, factss, ...} : prover_problem) =
   137     ({comment, state, goal, subgoal, subgoal_count, factss, ...} : prover_problem) =
   138   let
   138   let
   139     val thy = Proof.theory_of state
   139     val thy = Proof.theory_of state
   140     val ctxt = Proof.context_of state
   140     val ctxt = Proof.context_of state
   345         NONE =>
   345         NONE =>
   346         let
   346         let
   347           val used_facts = used_facts_in_atp_proof ctxt fact_names atp_proof
   347           val used_facts = used_facts_in_atp_proof ctxt fact_names atp_proof
   348           val needs_full_types = is_typed_helper_used_in_atp_proof atp_proof
   348           val needs_full_types = is_typed_helper_used_in_atp_proof atp_proof
   349           val meths =
   349           val meths =
   350             bunch_of_proof_methods (smt <> SOME false) needs_full_types
   350             bunch_of_proof_methods (smt_proofs <> SOME false) needs_full_types
   351               (if atp_proof_prefers_lifting atp_proof then liftingN else hide_lamsN)
   351               (if atp_proof_prefers_lifting atp_proof then liftingN else hide_lamsN)
   352         in
   352         in
   353           (used_facts,
   353           (used_facts,
   354            Lazy.lazy (fn () =>
   354            Lazy.lazy (fn () =>
   355              let val used_pairs = used_from |> filter_used_facts false used_facts in
   355              let val used_pairs = used_from |> filter_used_facts false used_facts in
   378                   (preplay, proof_banner mode name, used_facts,
   378                   (preplay, proof_banner mode name, used_facts,
   379                    choose_minimize_command thy params minimize_command name preplay, subgoal,
   379                    choose_minimize_command thy params minimize_command name preplay, subgoal,
   380                    subgoal_count)
   380                    subgoal_count)
   381                 val num_chained = length (#facts (Proof.goal state))
   381                 val num_chained = length (#facts (Proof.goal state))
   382               in
   382               in
   383                 proof_text ctxt debug isar_proofs smt isar_params num_chained one_line_params
   383                 proof_text ctxt debug isar_proofs smt_proofs isar_params num_chained one_line_params
   384               end,
   384               end,
   385            (if verbose then "\nATP real CPU time: " ^ string_of_time run_time ^ "." else "") ^
   385            (if verbose then "\nATP real CPU time: " ^ string_of_time run_time ^ "." else "") ^
   386            (if important_message <> "" then
   386            (if important_message <> "" then
   387               "\n\nImportant message from Dr. Geoff Sutcliffe:\n" ^ important_message
   387               "\n\nImportant message from Dr. Geoff Sutcliffe:\n" ^ important_message
   388             else
   388             else