src/HOL/Tools/Sledgehammer/sledgehammer_reconstruct.ML
changeset 51879 ee9562d31778
parent 51741 3fc8eb5c0915
child 51976 e5303bd748f2
equal deleted inserted replaced
51878:f11039b31bae 51879:ee9562d31778
    21 
    21 
    22   type minimize_command = string list -> string
    22   type minimize_command = string list -> string
    23   type one_line_params =
    23   type one_line_params =
    24     play * string * (string * stature) list * minimize_command * int * int
    24     play * string * (string * stature) list * minimize_command * int * int
    25   type isar_params =
    25   type isar_params =
    26     bool * bool * Time.time option * real * string Symtab.table
    26     bool * bool * Time.time option * bool * real * string Symtab.table
    27     * (string * stature) list vector * int Symtab.table * string proof * thm
    27     * (string * stature) list vector * int Symtab.table * string proof * thm
    28 
    28 
    29   val smtN : string
    29   val smtN : string
    30   val string_for_reconstructor : reconstructor -> string
    30   val string_for_reconstructor : reconstructor -> string
    31   val lam_trans_from_atp_proof : string proof -> string -> string
    31   val lam_trans_from_atp_proof : string proof -> string -> string
   629              chain_steps (try (List.last #> fst) assms) steps)
   629              chain_steps (try (List.last #> fst) assms) steps)
   630     and chain_proofs proofs = map (chain_proof) proofs
   630     and chain_proofs proofs = map (chain_proof) proofs
   631   in chain_proof end
   631   in chain_proof end
   632 
   632 
   633 type isar_params =
   633 type isar_params =
   634   bool * bool * Time.time option * real * string Symtab.table
   634   bool * bool * Time.time option * bool * real * string Symtab.table
   635   * (string * stature) list vector * int Symtab.table * string proof * thm
   635   * (string * stature) list vector * int Symtab.table * string proof * thm
   636 
   636 
   637 fun isar_proof_text ctxt isar_proofs
   637 fun isar_proof_text ctxt isar_proofs
   638     (debug, verbose, preplay_timeout, isar_compress, pool, fact_names, sym_tab,
   638     (debug, verbose, preplay_timeout, preplay_trace, isar_compress, pool,
   639      atp_proof, goal)
   639      fact_names, sym_tab, atp_proof, goal)
   640     (one_line_params as (_, _, _, _, subgoal, subgoal_count)) =
   640     (one_line_params as (_, _, _, _, subgoal, subgoal_count)) =
   641   let
   641   let
   642     val (params, hyp_ts, concl_t) = strip_subgoal ctxt goal subgoal
   642     val (params, hyp_ts, concl_t) = strip_subgoal ctxt goal subgoal
   643     val frees = fold Term.add_frees (concl_t :: hyp_ts) []
   643     val frees = fold Term.add_frees (concl_t :: hyp_ts) []
   644     val one_line_proof = one_line_proof_text 0 one_line_params
   644     val one_line_proof = one_line_proof_text 0 one_line_params
   790           |> isar_proof_of_direct_proof
   790           |> isar_proof_of_direct_proof
   791           |> (if not preplay andalso isar_compress <= 1.0 then
   791           |> (if not preplay andalso isar_compress <= 1.0 then
   792                 rpair (false, (true, seconds 0.0))
   792                 rpair (false, (true, seconds 0.0))
   793               else
   793               else
   794                 compress_and_preplay_proof debug ctxt type_enc lam_trans preplay
   794                 compress_and_preplay_proof debug ctxt type_enc lam_trans preplay
   795                   preplay_timeout
   795                   preplay_timeout preplay_trace
   796                   (if isar_proofs = SOME true then isar_compress else 1000.0))
   796                   (if isar_proofs = SOME true then isar_compress else 1000.0))
   797           |>> clean_up_labels_in_proof
   797           |>> clean_up_labels_in_proof
   798         val isar_text =
   798         val isar_text =
   799           string_for_proof ctxt type_enc lam_trans subgoal subgoal_count
   799           string_for_proof ctxt type_enc lam_trans subgoal subgoal_count
   800                            isar_proof
   800                            isar_proof