equal
deleted
inserted
replaced
36 val used_facts_in_unsound_atp_proof : |
36 val used_facts_in_unsound_atp_proof : |
37 Proof.context -> (string * stature) list vector -> 'a proof -> |
37 Proof.context -> (string * stature) list vector -> 'a proof -> |
38 string list option |
38 string list option |
39 val one_line_proof_text : int -> one_line_params -> string |
39 val one_line_proof_text : int -> one_line_params -> string |
40 val isar_proof_text : |
40 val isar_proof_text : |
41 Proof.context -> bool -> isar_params -> one_line_params -> string |
41 Proof.context -> bool option -> isar_params -> one_line_params -> string |
42 val proof_text : |
42 val proof_text : |
43 Proof.context -> bool -> isar_params -> int -> one_line_params -> string |
43 Proof.context -> bool option -> isar_params -> int -> one_line_params |
|
44 -> string |
44 end; |
45 end; |
45 |
46 |
46 structure Sledgehammer_Reconstruct : SLEDGEHAMMER_PROOF_RECONSTRUCT = |
47 structure Sledgehammer_Reconstruct : SLEDGEHAMMER_PROOF_RECONSTRUCT = |
47 struct |
48 struct |
48 |
49 |
829 |> (if not preplay andalso isar_compress <= 1.0 then |
830 |> (if not preplay andalso isar_compress <= 1.0 then |
830 rpair (false, (true, seconds 0.0)) |
831 rpair (false, (true, seconds 0.0)) |
831 else |
832 else |
832 compress_proof debug ctxt type_enc lam_trans preplay |
833 compress_proof debug ctxt type_enc lam_trans preplay |
833 preplay_timeout |
834 preplay_timeout |
834 (if isar_proofs then isar_compress else 1000.0)) |
835 (if isar_proofs = SOME true then isar_compress else 1000.0)) |
835 |>> cleanup_labels_in_proof |
836 |>> cleanup_labels_in_proof |
836 val isar_text = |
837 val isar_text = |
837 string_for_proof ctxt type_enc lam_trans subgoal subgoal_count |
838 string_for_proof ctxt type_enc lam_trans subgoal subgoal_count |
838 isar_proof |
839 isar_proof |
839 in |
840 in |
840 case isar_text of |
841 case isar_text of |
841 "" => |
842 "" => |
842 if isar_proofs then |
843 if isar_proofs = SOME true then |
843 "\nNo structured proof available (proof too simple)." |
844 "\nNo structured proof available (proof too simple)." |
844 else |
845 else |
845 "" |
846 "" |
846 | _ => |
847 | _ => |
847 let |
848 let |
868 val isar_proof = |
869 val isar_proof = |
869 if debug then |
870 if debug then |
870 isar_proof_of () |
871 isar_proof_of () |
871 else case try isar_proof_of () of |
872 else case try isar_proof_of () of |
872 SOME s => s |
873 SOME s => s |
873 | NONE => if isar_proofs then |
874 | NONE => if isar_proofs = SOME true then |
874 "\nWarning: The Isar proof construction failed." |
875 "\nWarning: The Isar proof construction failed." |
875 else |
876 else |
876 "" |
877 "" |
877 in one_line_proof ^ isar_proof end |
878 in one_line_proof ^ isar_proof end |
878 |
879 |
882 | Trust_Playable _ => false |
883 | Trust_Playable _ => false |
883 | Failed_to_Play _ => true |
884 | Failed_to_Play _ => true |
884 |
885 |
885 fun proof_text ctxt isar_proofs isar_params num_chained |
886 fun proof_text ctxt isar_proofs isar_params num_chained |
886 (one_line_params as (preplay, _, _, _, _, _)) = |
887 (one_line_params as (preplay, _, _, _, _, _)) = |
887 (if isar_proofs orelse isar_proof_would_be_a_good_idea preplay then |
888 (if isar_proofs = SOME true orelse |
|
889 (isar_proofs = NONE andalso isar_proof_would_be_a_good_idea preplay) then |
888 isar_proof_text ctxt isar_proofs isar_params |
890 isar_proof_text ctxt isar_proofs isar_params |
889 else |
891 else |
890 one_line_proof_text num_chained) one_line_params |
892 one_line_proof_text num_chained) one_line_params |
891 |
893 |
892 end; |
894 end; |