101 |
101 |
102 (* Important messages are important but not so important that users want to see them each time. *) |
102 (* Important messages are important but not so important that users want to see them each time. *) |
103 val atp_important_message_keep_quotient = 25 |
103 val atp_important_message_keep_quotient = 25 |
104 |
104 |
105 fun run_atp mode name |
105 fun run_atp mode name |
106 ({debug, verbose, overlord, type_enc, strict, lam_trans, uncurried_aliases, max_facts, |
106 ({debug, verbose, overlord, type_enc, strict, lam_trans, uncurried_aliases, fact_filter, |
107 max_mono_iters, max_new_mono_instances, isar_proofs, compress, try0, smt_proofs, minimize, |
107 max_facts, max_mono_iters, max_new_mono_instances, isar_proofs, compress, try0, smt_proofs, |
108 slices, timeout, preplay_timeout, spy, ...} : params) |
108 minimize, slices, timeout, preplay_timeout, spy, ...} : params) |
109 ({comment, state, goal, subgoal, subgoal_count, facts, found_proof} : prover_problem) = |
109 ({comment, state, goal, subgoal, subgoal_count, factss, found_proof} : prover_problem) |
|
110 slice = |
110 let |
111 let |
111 val thy = Proof.theory_of state |
112 val thy = Proof.theory_of state |
112 val ctxt = Proof.context_of state |
113 val ctxt = Proof.context_of state |
113 |
114 |
114 val {exec, arguments, proof_delims, known_failures, prem_role, best_slices, best_max_mono_iters, |
115 val ATP_Slice ((best_max_facts, best_fact_filter), format, best_type_enc, best_lam_trans, |
|
116 best_uncurried_aliases, extra) = slice |
|
117 |
|
118 val {exec, arguments, proof_delims, known_failures, prem_role, best_max_mono_iters, |
115 best_max_new_mono_instances, ...} = get_atp thy name () |
119 best_max_new_mono_instances, ...} = get_atp thy name () |
116 |
120 |
117 val full_proofs = isar_proofs |> the_default (mode = Minimize) |
121 val full_proofs = isar_proofs |> the_default (mode = Minimize) |
118 val local_name = perhaps (try (unprefix remote_prefix)) name |
122 val local_name = perhaps (try (unprefix remote_prefix)) name |
119 |
123 |
181 Monomorph.monomorph atp_schematic_consts_of ctxt rths |
181 Monomorph.monomorph atp_schematic_consts_of ctxt rths |
182 |> tl |> curry ListPair.zip (map fst facts) |
182 |> tl |> curry ListPair.zip (map fst facts) |
183 |> maps (fn (name, rths) => map (pair name o zero_var_indexes o snd) rths) |
183 |> maps (fn (name, rths) => map (pair name o zero_var_indexes o snd) rths) |
184 end |
184 end |
185 |
185 |
186 val facts = snd facts |
186 val effective_fact_filter = fact_filter |> the_default best_fact_filter |
|
187 val facts = get_facts_of_filter effective_fact_filter factss |
187 val num_facts = |
188 val num_facts = |
188 (case max_facts of |
189 (case max_facts of |
189 NONE => best_max_facts |
190 NONE => best_max_facts |
190 | SOME max_facts => max_facts) |
191 | SOME max_facts => max_facts) |
191 |> Integer.min (length facts) |
192 |> Integer.min (length facts) |