src/HOL/Tools/Sledgehammer/sledgehammer_prover_smt.ML
changeset 55452 29ec8680e61f
parent 55308 dc68f6fb88d2
child 56081 72fad75baf7e
equal deleted inserted replaced
55451:ea1d9408a233 55452:29ec8680e61f
    69   else
    69   else
    70     NONE
    70     NONE
    71 
    71 
    72 fun weight_smt_fact ctxt num_facts ((info, th), j) =
    72 fun weight_smt_fact ctxt num_facts ((info, th), j) =
    73   let val thy = Proof_Context.theory_of ctxt in
    73   let val thy = Proof_Context.theory_of ctxt in
    74     (info, (smt_fact_weight ctxt j num_facts, th |> Thm.transfer thy))
    74     (info, (smt_fact_weight ctxt j num_facts, Thm.transfer thy th (* TODO: needed? *)))
    75   end
    75   end
    76 
    76 
    77 (* "SMT_Failure.Abnormal_Termination" carries the solver's return code. Until these are sorted out
    77 (* "SMT_Failure.Abnormal_Termination" carries the solver's return code. Until these are sorted out
    78    properly in the SMT module, we must interpret these here. *)
    78    properly in the SMT module, we must interpret these here. *)
    79 val z3_failures =
    79 val z3_failures =
   210       end
   210       end
   211   in
   211   in
   212     do_slice timeout 1 NONE Time.zeroTime
   212     do_slice timeout 1 NONE Time.zeroTime
   213   end
   213   end
   214 
   214 
   215 fun run_smt_solver mode name (params as {verbose, smt_proofs, preplay_timeout, ...})
   215 fun run_smt_solver mode name (params as {debug, verbose, smt_proofs, preplay_timeout, ...})
   216     minimize_command ({state, goal, subgoal, subgoal_count, factss, ...} : prover_problem) =
   216     minimize_command ({state, goal, subgoal, subgoal_count, factss, ...} : prover_problem) =
   217   let
   217   let
   218     val thy = Proof.theory_of state
   218     val thy = Proof.theory_of state
   219     val ctxt = Proof.context_of state
   219     val ctxt = Proof.context_of state
   220 
   220 
   231 
   231 
   232     val (preplay, message, message_tail) =
   232     val (preplay, message, message_tail) =
   233       (case outcome of
   233       (case outcome of
   234         NONE =>
   234         NONE =>
   235         (Lazy.lazy (fn () =>
   235         (Lazy.lazy (fn () =>
   236            play_one_line_proof mode verbose preplay_timeout used_pairs state subgoal SMT_Method
   236            play_one_line_proof mode debug verbose preplay_timeout used_pairs state subgoal
   237              (bunch_of_proof_methods (smt_proofs <> SOME false) false liftingN)),
   237              SMT_Method (bunch_of_proof_methods (smt_proofs <> SOME false) false liftingN)),
   238          fn preplay =>
   238          fn preplay =>
   239             let
   239             let
   240               val one_line_params =
   240               val one_line_params =
   241                 (preplay, proof_banner mode name, used_facts,
   241                 (preplay, proof_banner mode name, used_facts,
   242                  choose_minimize_command thy params minimize_command name preplay, subgoal,
   242                  choose_minimize_command thy params minimize_command name preplay, subgoal,