| author | desharna | 
| Tue, 28 Sep 2021 10:47:18 +0200 | |
| changeset 74370 | d8dc8fdc46fc | 
| parent 73940 | f58108b7a60c | 
| child 74897 | 8b1ab558e3ee | 
| permissions | -rw-r--r-- | 
| 55201 | 1 | (* Title: HOL/Tools/Sledgehammer/sledgehammer_prover.ML | 
| 28477 
9339d4dcec8b
version of sledgehammer using threads instead of processes, misc cleanup;
 wenzelm parents: diff
changeset | 2 | Author: Fabian Immler, TU Muenchen | 
| 32996 
d2e48879e65a
removed disjunctive group cancellation -- provers run independently;
 wenzelm parents: 
32995diff
changeset | 3 | Author: Makarius | 
| 35969 | 4 | Author: Jasmin Blanchette, TU Muenchen | 
| 28477 
9339d4dcec8b
version of sledgehammer using threads instead of processes, misc cleanup;
 wenzelm parents: diff
changeset | 5 | |
| 41087 
d7b5fd465198
split "Sledgehammer" module into two parts, to resolve forthcoming dependency problems
 blanchet parents: 
41066diff
changeset | 6 | Generic prover abstraction for Sledgehammer. | 
| 28477 
9339d4dcec8b
version of sledgehammer using threads instead of processes, misc cleanup;
 wenzelm parents: diff
changeset | 7 | *) | 
| 
9339d4dcec8b
version of sledgehammer using threads instead of processes, misc cleanup;
 wenzelm parents: diff
changeset | 8 | |
| 55201 | 9 | signature SLEDGEHAMMER_PROVER = | 
| 28477 
9339d4dcec8b
version of sledgehammer using threads instead of processes, misc cleanup;
 wenzelm parents: diff
changeset | 10 | sig | 
| 53586 
bd5fa6425993
prefixed types and some functions with "atp_" for disambiguation
 blanchet parents: 
53551diff
changeset | 11 | type atp_failure = ATP_Proof.atp_failure | 
| 46340 | 12 | type stature = ATP_Problem_Generate.stature | 
| 46320 | 13 | type type_enc = ATP_Problem_Generate.type_enc | 
| 51005 
ce4290c33d73
eliminated needless speed optimization -- and simplified code quite a bit
 blanchet parents: 
50927diff
changeset | 14 | type fact = Sledgehammer_Fact.fact | 
| 55287 | 15 | type proof_method = Sledgehammer_Proof_Methods.proof_method | 
| 16 | type play_outcome = Sledgehammer_Proof_Methods.play_outcome | |
| 39493 
cb2208f2c07d
move SPASS's Flotter hack to "Sledgehammer_Reconstruct"
 blanchet parents: 
39492diff
changeset | 17 | |
| 58085 | 18 | datatype mode = Auto_Try | Try | Normal | Minimize | MaSh | 
| 43021 | 19 | |
| 73940 
f58108b7a60c
refactored Sledgehammer option "induction_rules"
 desharna parents: 
73939diff
changeset | 20 | datatype induction_rules = Include | Exclude | Instantiate | 
| 
f58108b7a60c
refactored Sledgehammer option "induction_rules"
 desharna parents: 
73939diff
changeset | 21 | val induction_rules_of_string : string -> induction_rules option | 
| 
f58108b7a60c
refactored Sledgehammer option "induction_rules"
 desharna parents: 
73939diff
changeset | 22 | |
| 35969 | 23 | type params = | 
| 48321 | 24 |     {debug : bool,
 | 
| 25 | verbose : bool, | |
| 26 | overlord : bool, | |
| 53800 | 27 | spy : bool, | 
| 48321 | 28 | provers : string list, | 
| 29 | type_enc : string option, | |
| 30 | strict : bool, | |
| 31 | lam_trans : string option, | |
| 32 | uncurried_aliases : bool option, | |
| 33 | learn : bool, | |
| 34 | fact_filter : string option, | |
| 73939 
9231ea46e041
promoted "sledgehammer_instantiate_inducts" to proper option "induction_rules"
 desharna parents: 
72798diff
changeset | 35 | induction_rules : induction_rules option, | 
| 48321 | 36 | max_facts : int option, | 
| 37 | fact_thresholds : real * real, | |
| 38 | max_mono_iters : int option, | |
| 39 | max_new_mono_instances : int option, | |
| 51190 
2654b3965c8d
made "isar_proofs" a 3-way option, to provide a way to totally disable isar_proofs if desired
 blanchet parents: 
51186diff
changeset | 40 | isar_proofs : bool option, | 
| 57783 | 41 | compress : real option, | 
| 57245 | 42 | try0 : bool, | 
| 71931 
0c8a9c028304
simplified 'smt_proofs' option to be a binary option (instead of ternary), now that SMT proofs are accepted in the AFP (done with Martin Desharnais)
 blanchet parents: 
63692diff
changeset | 43 | smt_proofs : bool, | 
| 48321 | 44 | slice : bool, | 
| 57721 | 45 | minimize : bool, | 
| 54816 
10d48c2a3e32
made timeouts in Sledgehammer not be 'option's -- simplified lots of code
 blanchet parents: 
54815diff
changeset | 46 | timeout : Time.time, | 
| 
10d48c2a3e32
made timeouts in Sledgehammer not be 'option's -- simplified lots of code
 blanchet parents: 
54815diff
changeset | 47 | preplay_timeout : Time.time, | 
| 48321 | 48 | expect : string} | 
| 39493 
cb2208f2c07d
move SPASS's Flotter hack to "Sledgehammer_Reconstruct"
 blanchet parents: 
39492diff
changeset | 49 | |
| 40061 
71cc5aac8b76
generalization of the Sledgehammer minimizer, to make it possible to handle SMT solvers as well
 blanchet parents: 
40060diff
changeset | 50 | type prover_problem = | 
| 54141 
f57f8e7a879f
generate a comment storing the goal nickname in "learn_prover"
 blanchet parents: 
54126diff
changeset | 51 |     {comment : string,
 | 
| 
f57f8e7a879f
generate a comment storing the goal nickname in "learn_prover"
 blanchet parents: 
54126diff
changeset | 52 | state : Proof.state, | 
| 48321 | 53 | goal : thm, | 
| 54 | subgoal : int, | |
| 55 | subgoal_count : int, | |
| 62735 | 56 | factss : (string * fact list) list, | 
| 57 | found_proof : unit -> unit} | |
| 39493 
cb2208f2c07d
move SPASS's Flotter hack to "Sledgehammer_Reconstruct"
 blanchet parents: 
39492diff
changeset | 58 | |
| 40061 
71cc5aac8b76
generalization of the Sledgehammer minimizer, to make it possible to handle SMT solvers as well
 blanchet parents: 
40060diff
changeset | 59 | type prover_result = | 
| 53586 
bd5fa6425993
prefixed types and some functions with "atp_" for disambiguation
 blanchet parents: 
53551diff
changeset | 60 |     {outcome : atp_failure option,
 | 
| 51009 
e8ff34a1fa9a
thread through fact triple component from which used facts come, for accurate index output
 blanchet parents: 
51007diff
changeset | 61 | used_facts : (string * stature) list, | 
| 
e8ff34a1fa9a
thread through fact triple component from which used facts come, for accurate index output
 blanchet parents: 
51007diff
changeset | 62 | used_from : fact list, | 
| 57734 
18bb3e1ff6f6
rationalized preplaying by eliminating (now superfluous) laziness
 blanchet parents: 
57732diff
changeset | 63 | preferred_methss : proof_method * proof_method list list, | 
| 48321 | 64 | run_time : Time.time, | 
| 57750 | 65 | message : (unit -> (string * stature) list * (proof_method * play_outcome)) -> string} | 
| 39493 
cb2208f2c07d
move SPASS's Flotter hack to "Sledgehammer_Reconstruct"
 blanchet parents: 
39492diff
changeset | 66 | |
| 57735 
056a55b44ec7
eliminated Sledgehammer's "min" subcommand (and lots of complications in the code)
 blanchet parents: 
57734diff
changeset | 67 | type prover = params -> prover_problem -> prover_result | 
| 35867 | 68 | |
| 48319 
340187063d84
use async manager to manage MaSh learners to make sure they get killed cleanly
 blanchet parents: 
48314diff
changeset | 69 | val SledgehammerN : string | 
| 57037 | 70 | val str_of_mode : mode -> string | 
| 55205 | 71 | val overlord_file_location_of_prover : string -> string * string | 
| 72 | val proof_banner : mode -> string -> string | |
| 43050 
59284a13abc4
support "metis" and "metisFT" as provers in the architecture, so they can be used for minimizing
 blanchet parents: 
43044diff
changeset | 73 | val is_atp : theory -> string -> bool | 
| 72518 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 74 | val bunches_of_proof_methods : Proof.context -> bool -> bool -> bool -> string -> | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 75 | proof_method list list | 
| 48798 | 76 |   val is_fact_chained : (('a * stature) * 'b) -> bool
 | 
| 57056 | 77 |   val filter_used_facts : bool -> (''a * stature) list -> ((''a * stature) * 'b) list ->
 | 
| 48798 | 78 |     ((''a * stature) * 'b) list
 | 
| 55205 | 79 | val repair_monomorph_context : int option -> int -> int option -> int -> Proof.context -> | 
| 80 | Proof.context | |
| 55212 | 81 | val supported_provers : Proof.context -> unit | 
| 28477 
9339d4dcec8b
version of sledgehammer using threads instead of processes, misc cleanup;
 wenzelm parents: diff
changeset | 82 | end; | 
| 
9339d4dcec8b
version of sledgehammer using threads instead of processes, misc cleanup;
 wenzelm parents: diff
changeset | 83 | |
| 55201 | 84 | structure Sledgehammer_Prover : SLEDGEHAMMER_PROVER = | 
| 28477 
9339d4dcec8b
version of sledgehammer using threads instead of processes, misc cleanup;
 wenzelm parents: diff
changeset | 85 | struct | 
| 
9339d4dcec8b
version of sledgehammer using threads instead of processes, misc cleanup;
 wenzelm parents: diff
changeset | 86 | |
| 57154 | 87 | open ATP_Proof | 
| 43085 
0a2f5b86bdd7
first step in sharing more code between ATP and Metis translation
 blanchet parents: 
43063diff
changeset | 88 | open ATP_Util | 
| 38028 | 89 | open ATP_Problem | 
| 46320 | 90 | open ATP_Problem_Generate | 
| 91 | open ATP_Proof_Reconstruct | |
| 45521 | 92 | open Metis_Tactic | 
| 51005 
ce4290c33d73
eliminated needless speed optimization -- and simplified code quite a bit
 blanchet parents: 
50927diff
changeset | 93 | open Sledgehammer_Fact | 
| 55287 | 94 | open Sledgehammer_Proof_Methods | 
| 72400 | 95 | open Sledgehammer_ATP_Systems | 
| 54000 
9cfff7f61d0d
added experimental configuration options to tune use of builtin symbols in SMT
 blanchet parents: 
53989diff
changeset | 96 | |
| 58085 | 97 | (* Identifier that distinguishes Sledgehammer from other tools that could use "Async_Manager". *) | 
| 48319 
340187063d84
use async manager to manage MaSh learners to make sure they get killed cleanly
 blanchet parents: 
48314diff
changeset | 98 | val SledgehammerN = "Sledgehammer" | 
| 37585 | 99 | |
| 58085 | 100 | datatype mode = Auto_Try | Try | Normal | Minimize | MaSh | 
| 57037 | 101 | |
| 102 | fun str_of_mode Auto_Try = "Auto Try" | |
| 103 | | str_of_mode Try = "Try" | |
| 104 | | str_of_mode Normal = "Normal" | |
| 58085 | 105 | | str_of_mode Minimize = "Minimize" | 
| 57037 | 106 | | str_of_mode MaSh = "MaSh" | 
| 107 | ||
| 73940 
f58108b7a60c
refactored Sledgehammer option "induction_rules"
 desharna parents: 
73939diff
changeset | 108 | datatype induction_rules = Include | Exclude | Instantiate | 
| 
f58108b7a60c
refactored Sledgehammer option "induction_rules"
 desharna parents: 
73939diff
changeset | 109 | |
| 
f58108b7a60c
refactored Sledgehammer option "induction_rules"
 desharna parents: 
73939diff
changeset | 110 | fun induction_rules_of_string "include" = SOME Include | 
| 
f58108b7a60c
refactored Sledgehammer option "induction_rules"
 desharna parents: 
73939diff
changeset | 111 | | induction_rules_of_string "exclude" = SOME Exclude | 
| 
f58108b7a60c
refactored Sledgehammer option "induction_rules"
 desharna parents: 
73939diff
changeset | 112 | | induction_rules_of_string "instantiate" = SOME Instantiate | 
| 
f58108b7a60c
refactored Sledgehammer option "induction_rules"
 desharna parents: 
73939diff
changeset | 113 | | induction_rules_of_string _ = NONE | 
| 
f58108b7a60c
refactored Sledgehammer option "induction_rules"
 desharna parents: 
73939diff
changeset | 114 | |
| 43050 
59284a13abc4
support "metis" and "metisFT" as provers in the architecture, so they can be used for minimizing
 blanchet parents: 
43044diff
changeset | 115 | val is_atp = member (op =) o supported_atps | 
| 
59284a13abc4
support "metis" and "metisFT" as provers in the architecture, so they can be used for minimizing
 blanchet parents: 
43044diff
changeset | 116 | |
| 35969 | 117 | type params = | 
| 48321 | 118 |   {debug : bool,
 | 
| 119 | verbose : bool, | |
| 120 | overlord : bool, | |
| 53800 | 121 | spy : bool, | 
| 48321 | 122 | provers : string list, | 
| 123 | type_enc : string option, | |
| 124 | strict : bool, | |
| 125 | lam_trans : string option, | |
| 126 | uncurried_aliases : bool option, | |
| 127 | learn : bool, | |
| 128 | fact_filter : string option, | |
| 73939 
9231ea46e041
promoted "sledgehammer_instantiate_inducts" to proper option "induction_rules"
 desharna parents: 
72798diff
changeset | 129 | induction_rules : induction_rules option, | 
| 48321 | 130 | max_facts : int option, | 
| 131 | fact_thresholds : real * real, | |
| 132 | max_mono_iters : int option, | |
| 133 | max_new_mono_instances : int option, | |
| 51190 
2654b3965c8d
made "isar_proofs" a 3-way option, to provide a way to totally disable isar_proofs if desired
 blanchet parents: 
51186diff
changeset | 134 | isar_proofs : bool option, | 
| 57783 | 135 | compress : real option, | 
| 57245 | 136 | try0 : bool, | 
| 71931 
0c8a9c028304
simplified 'smt_proofs' option to be a binary option (instead of ternary), now that SMT proofs are accepted in the AFP (done with Martin Desharnais)
 blanchet parents: 
63692diff
changeset | 137 | smt_proofs : bool, | 
| 48321 | 138 | slice : bool, | 
| 57721 | 139 | minimize : bool, | 
| 54816 
10d48c2a3e32
made timeouts in Sledgehammer not be 'option's -- simplified lots of code
 blanchet parents: 
54815diff
changeset | 140 | timeout : Time.time, | 
| 
10d48c2a3e32
made timeouts in Sledgehammer not be 'option's -- simplified lots of code
 blanchet parents: 
54815diff
changeset | 141 | preplay_timeout : Time.time, | 
| 48321 | 142 | expect : string} | 
| 35867 | 143 | |
| 40061 
71cc5aac8b76
generalization of the Sledgehammer minimizer, to make it possible to handle SMT solvers as well
 blanchet parents: 
40060diff
changeset | 144 | type prover_problem = | 
| 54141 
f57f8e7a879f
generate a comment storing the goal nickname in "learn_prover"
 blanchet parents: 
54126diff
changeset | 145 |   {comment : string,
 | 
| 
f57f8e7a879f
generate a comment storing the goal nickname in "learn_prover"
 blanchet parents: 
54126diff
changeset | 146 | state : Proof.state, | 
| 48321 | 147 | goal : thm, | 
| 148 | subgoal : int, | |
| 149 | subgoal_count : int, | |
| 62735 | 150 | factss : (string * fact list) list, | 
| 151 | found_proof : unit -> unit} | |
| 35867 | 152 | |
| 40061 
71cc5aac8b76
generalization of the Sledgehammer minimizer, to make it possible to handle SMT solvers as well
 blanchet parents: 
40060diff
changeset | 153 | type prover_result = | 
| 53586 
bd5fa6425993
prefixed types and some functions with "atp_" for disambiguation
 blanchet parents: 
53551diff
changeset | 154 |   {outcome : atp_failure option,
 | 
| 48321 | 155 | used_facts : (string * stature) list, | 
| 51009 
e8ff34a1fa9a
thread through fact triple component from which used facts come, for accurate index output
 blanchet parents: 
51007diff
changeset | 156 | used_from : fact list, | 
| 57734 
18bb3e1ff6f6
rationalized preplaying by eliminating (now superfluous) laziness
 blanchet parents: 
57732diff
changeset | 157 | preferred_methss : proof_method * proof_method list list, | 
| 48321 | 158 | run_time : Time.time, | 
| 57750 | 159 | message : (unit -> (string * stature) list * (proof_method * play_outcome)) -> string} | 
| 35867 | 160 | |
| 57735 
056a55b44ec7
eliminated Sledgehammer's "min" subcommand (and lots of complications in the code)
 blanchet parents: 
57734diff
changeset | 161 | type prover = params -> prover_problem -> prover_result | 
| 35867 | 162 | |
| 55205 | 163 | fun overlord_file_location_of_prover prover = (getenv "ISABELLE_HOME_USER", "prob_" ^ prover) | 
| 41313 
a96ac4d180b7
optionally supply constant weights to E -- turned off by default until properly parameterized
 blanchet parents: 
41259diff
changeset | 164 | |
| 43052 
8d6a4978cc65
automatically minimize with Metis when this can be done within a few seconds
 blanchet parents: 
43051diff
changeset | 165 | fun proof_banner mode name = | 
| 55205 | 166 | (case mode of | 
| 43033 | 167 |     Auto_Try => "Auto Sledgehammer (" ^ quote name ^ ") found a proof"
 | 
| 168 |   | Try => "Sledgehammer (" ^ quote name ^ ") found a proof"
 | |
| 55205 | 169 | | _ => "Try this") | 
| 43033 | 170 | |
| 72518 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 171 | fun bunches_of_proof_methods ctxt try0 smt_proofs needs_full_types desperate_lam_trans = | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 172 | let | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 173 | val try0_methodss = | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 174 | if try0 then | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 175 | [[Simp_Method, Auto_Method, Blast_Method, Linarith_Method, Meson_Method, | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 176 | Metis_Method (NONE, NONE), Fastforce_Method, Force_Method, Presburger_Method]] | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 177 | else | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 178 | [] | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 179 | |
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 180 | val metis_methods = | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 181 | (if try0 then [] else [Metis_Method (NONE, NONE)]) @ | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 182 | Metis_Method (SOME full_typesN, NONE) :: | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 183 | Metis_Method (SOME really_full_type_enc, SOME desperate_lam_trans) :: | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 184 | (if needs_full_types then | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 185 | [Metis_Method (SOME really_full_type_enc, NONE), | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 186 | Metis_Method (SOME full_typesN, SOME desperate_lam_trans)] | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 187 | else | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 188 | [Metis_Method (SOME no_typesN, SOME desperate_lam_trans)]) | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 189 | |
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 190 | val smt_methodss = | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 191 | if smt_proofs then | 
| 74370 | 192 | [map (SMT_Method o SMT_Verit) (Verit_Proof.all_veriT_stgies (Context.Proof ctxt)), | 
| 193 | [SMT_Method SMT_Z3]] | |
| 72518 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 194 | else | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 195 | [] | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 196 | in | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 197 | try0_methodss @ [metis_methods] @ smt_methodss | 
| 
4be6ae020fc4
Added smt (verit) to Sledgehammer's proof preplay.
 desharna parents: 
72400diff
changeset | 198 | end | 
| 43033 | 199 | |
| 48798 | 200 | fun is_fact_chained ((_, (sc, _)), _) = sc = Chained | 
| 201 | ||
| 202 | fun filter_used_facts keep_chained used = | |
| 58654 
3e1cad27fc2f
special treatment of extensionality in minimizer
 blanchet parents: 
58498diff
changeset | 203 | filter ((member (eq_fst (op =)) used o fst) orf | 
| 
3e1cad27fc2f
special treatment of extensionality in minimizer
 blanchet parents: 
58498diff
changeset | 204 | (if keep_chained then is_fact_chained else K false)) | 
| 43033 | 205 | |
| 53480 
247817dbb990
limit the number of instances of a single theorem
 blanchet parents: 
53478diff
changeset | 206 | val max_fact_instances = 10 (* FUDGE *) | 
| 
247817dbb990
limit the number of instances of a single theorem
 blanchet parents: 
53478diff
changeset | 207 | |
| 55205 | 208 | fun repair_monomorph_context max_iters best_max_iters max_new_instances best_max_new_instances = | 
| 52034 
11b48e7a4e7e
correctly 'repair' the monomorphization context for SMT solvers from Sledgehammer
 blanchet parents: 
52031diff
changeset | 209 | Config.put Monomorph.max_rounds (max_iters |> the_default best_max_iters) | 
| 
11b48e7a4e7e
correctly 'repair' the monomorphization context for SMT solvers from Sledgehammer
 blanchet parents: 
52031diff
changeset | 210 | #> Config.put Monomorph.max_new_instances | 
| 55205 | 211 | (max_new_instances |> the_default best_max_new_instances) | 
| 53480 
247817dbb990
limit the number of instances of a single theorem
 blanchet parents: 
53478diff
changeset | 212 | #> Config.put Monomorph.max_thm_instances max_fact_instances | 
| 52034 
11b48e7a4e7e
correctly 'repair' the monomorphization context for SMT solvers from Sledgehammer
 blanchet parents: 
52031diff
changeset | 213 | |
| 55212 | 214 | fun supported_provers ctxt = | 
| 43050 
59284a13abc4
support "metis" and "metisFT" as provers in the architecture, so they can be used for minimizing
 blanchet parents: 
43044diff
changeset | 215 | let | 
| 55212 | 216 | val thy = Proof_Context.theory_of ctxt | 
| 217 | val (remote_provers, local_provers) = | |
| 58061 | 218 | sort_strings (supported_atps thy) @ sort_strings (SMT_Config.available_solvers_of ctxt) | 
| 55212 | 219 | |> List.partition (String.isPrefix remote_prefix) | 
| 43050 
59284a13abc4
support "metis" and "metisFT" as provers in the architecture, so they can be used for minimizing
 blanchet parents: 
43044diff
changeset | 220 | in | 
| 63692 | 221 |     writeln ("Supported provers: " ^ commas (local_provers @ remote_provers))
 | 
| 43050 
59284a13abc4
support "metis" and "metisFT" as provers in the architecture, so they can be used for minimizing
 blanchet parents: 
43044diff
changeset | 222 | end | 
| 
59284a13abc4
support "metis" and "metisFT" as provers in the architecture, so they can be used for minimizing
 blanchet parents: 
43044diff
changeset | 223 | |
| 28582 | 224 | end; |