src/HOL/Tools/Sledgehammer/sledgehammer_provers.ML
changeset 41259 13972ced98d9
parent 41256 0e7d45cc005f
child 41313 a96ac4d180b7
equal deleted inserted replaced
41258:73401632a80c 41259:13972ced98d9
   394                          prefix ("% " ^ command ^ "\n% " ^ timestamp () ^ "\n")
   394                          prefix ("% " ^ command ^ "\n% " ^ timestamp () ^ "\n")
   395                        else
   395                        else
   396                          I)
   396                          I)
   397                   |>> (if measure_run_time then split_time else rpair NONE)
   397                   |>> (if measure_run_time then split_time else rpair NONE)
   398                 val (tstplike_proof, outcome) =
   398                 val (tstplike_proof, outcome) =
   399                   extract_tstplike_proof_and_outcome complete res_code
   399                   extract_tstplike_proof_and_outcome verbose complete res_code
   400                       proof_delims known_failures output
   400                       proof_delims known_failures output
   401               in (output, msecs, tstplike_proof, outcome) end
   401               in (output, msecs, tstplike_proof, outcome) end
   402             val readable_names = debug andalso overlord
   402             val readable_names = debug andalso overlord
   403             val (atp_problem, pool, conjecture_offset, fact_names) =
   403             val (atp_problem, pool, conjecture_offset, fact_names) =
   404               prepare_atp_problem ctxt readable_names explicit_forall type_sys
   404               prepare_atp_problem ctxt readable_names explicit_forall type_sys
   501 fun failure_from_smt_failure (SMT_Failure.Counterexample _) = Unprovable
   501 fun failure_from_smt_failure (SMT_Failure.Counterexample _) = Unprovable
   502   | failure_from_smt_failure SMT_Failure.Time_Out = TimedOut
   502   | failure_from_smt_failure SMT_Failure.Time_Out = TimedOut
   503   | failure_from_smt_failure (SMT_Failure.Abnormal_Termination code) =
   503   | failure_from_smt_failure (SMT_Failure.Abnormal_Termination code) =
   504     (case AList.lookup (op =) smt_failures code of
   504     (case AList.lookup (op =) smt_failures code of
   505        SOME failure => failure
   505        SOME failure => failure
   506      | NONE => UnknownError)
   506      | NONE => UnknownError ("Abnormal termination with exit code " ^
       
   507                              string_of_int code ^ "."))
   507   | failure_from_smt_failure SMT_Failure.Out_Of_Memory = OutOfResources
   508   | failure_from_smt_failure SMT_Failure.Out_Of_Memory = OutOfResources
   508   | failure_from_smt_failure (SMT_Failure.Other_Failure msg) =
   509   | failure_from_smt_failure (SMT_Failure.Other_Failure msg) =
   509     if String.isPrefix internal_error_prefix msg then InternalError
   510     if String.isPrefix internal_error_prefix msg then InternalError
   510     else UnknownError
   511     else UnknownError msg
   511 
   512 
   512 (* FUDGE *)
   513 (* FUDGE *)
   513 val smt_max_iters = Unsynchronized.ref 8
   514 val smt_max_iters = Unsynchronized.ref 8
   514 val smt_iter_fact_frac = Unsynchronized.ref 0.5
   515 val smt_iter_fact_frac = Unsynchronized.ref 0.5
   515 val smt_iter_time_frac = Unsynchronized.ref 0.5
   516 val smt_iter_time_frac = Unsynchronized.ref 0.5