500 (case try Toplevel.proof_of st of |
500 (case try Toplevel.proof_of st of |
501 SOME state => |
501 SOME state => |
502 let |
502 let |
503 val [provers_arg, timeout_arg, isar_proofs_arg] = args; |
503 val [provers_arg, timeout_arg, isar_proofs_arg] = args; |
504 val ctxt = Proof.context_of state |
504 val ctxt = Proof.context_of state |
505 val mode = Normal_Result |
505 |
506 |
506 val {debug, verbose, overlord, isar_proofs, ...} = get_params Normal ctxt [] |
507 val {debug, verbose, overlord, isar_proofs, ...} = get_params mode ctxt [] |
|
508 val override_params = |
507 val override_params = |
509 ([("timeout", [timeout_arg]), ("blocking", ["true"])] @ |
508 ([("timeout", [timeout_arg]), ("blocking", ["true"])] @ |
510 (if Option.map Bool.toString isar_proofs <> SOME isar_proofs_arg |
509 (if Option.map Bool.toString isar_proofs <> SOME isar_proofs_arg |
511 then [("isar_proofs", [isar_proofs_arg])] else []) @ |
510 then [("isar_proofs", [isar_proofs_arg])] else []) @ |
512 (if debug then [("debug", ["false"])] else []) @ |
511 (if debug then [("debug", ["false"])] else []) @ |
514 (if overlord then [("overlord", ["false"])] else []) @ |
513 (if overlord then [("overlord", ["false"])] else []) @ |
515 (if provers_arg = "" then [] else [("provers", space_explode " " provers_arg)])) |
514 (if provers_arg = "" then [] else [("provers", space_explode " " provers_arg)])) |
516 |> map (normalize_raw_param ctxt) |
515 |> map (normalize_raw_param ctxt) |
517 |
516 |
518 val _ = |
517 val _ = |
519 run_sledgehammer (get_params mode ctxt override_params) mode (SOME output_result) 1 |
518 run_sledgehammer (get_params Normal ctxt override_params) Normal (SOME output_result) 1 |
520 no_fact_override (minimize_command override_params 1) state |
519 no_fact_override (minimize_command override_params 1) state |
521 in () end |
520 in () end |
522 | NONE => error "Unknown proof context")); |
521 | NONE => error "Unknown proof context")); |
523 |
522 |
524 end; |
523 end; |