112 in |
112 in |
113 maybe_paren (space_implode " " (meth_s :: ss)) |
113 maybe_paren (space_implode " " (meth_s :: ss)) |
114 end |
114 end |
115 |
115 |
116 fun tac_of_proof_method ctxt (local_facts, global_facts) meth = |
116 fun tac_of_proof_method ctxt (local_facts, global_facts) meth = |
117 Method.insert_tac ctxt local_facts THEN' |
|
118 (case meth of |
117 (case meth of |
119 Metis_Method (type_enc_opt, lam_trans_opt) => |
118 Metis_Method (type_enc_opt, lam_trans_opt) => |
120 let |
119 let |
121 val ctxt = ctxt |
120 val ctxt = ctxt |
122 |> Config.put Metis_Tactic.verbose false |
121 |> Config.put Metis_Tactic.verbose false |
123 |> Config.put Metis_Tactic.trace false |
122 |> Config.put Metis_Tactic.trace false |
124 in |
123 in |
125 Metis_Tactic.metis_tac [type_enc_opt |> the_default (hd partial_type_encs)] |
124 SELECT_GOAL (Metis_Tactic.metis_method ((Option.map single type_enc_opt, lam_trans_opt), |
126 (lam_trans_opt |> the_default default_metis_lam_trans) ctxt global_facts |
125 global_facts) ctxt local_facts) |
127 end |
126 end |
128 | Meson_Method => Meson_Tactic.meson_general_tac ctxt global_facts |
127 | SMT_Method => SMT_Solver.smt_tac ctxt (local_facts @ global_facts) |
129 | SMT_Method => SMT_Solver.smt_tac ctxt global_facts |
|
130 | Simp_Method => Simplifier.asm_full_simp_tac (ctxt addsimps global_facts) |
|
131 | Simp_Size_Method => |
|
132 Simplifier.asm_full_simp_tac (ctxt addsimps (@{thm size_ne_size_imp_ne} :: global_facts)) |
|
133 | _ => |
128 | _ => |
134 Method.insert_tac ctxt global_facts THEN' |
129 Method.insert_tac ctxt local_facts THEN' |
135 (case meth of |
130 (case meth of |
136 SATx_Method => SAT.satx_tac ctxt |
131 Meson_Method => Meson_Tactic.meson_general_tac ctxt global_facts |
137 | Blast_Method => blast_tac ctxt |
132 | Simp_Method => Simplifier.asm_full_simp_tac (ctxt addsimps global_facts) |
138 | Auto_Method => SELECT_GOAL (Clasimp.auto_tac ctxt) |
133 | Simp_Size_Method => |
139 | Fastforce_Method => Clasimp.fast_force_tac ctxt |
134 Simplifier.asm_full_simp_tac (ctxt addsimps (@{thm size_ne_size_imp_ne} :: global_facts)) |
140 | Force_Method => Clasimp.force_tac ctxt |
135 | _ => |
141 | Moura_Method => moura_tac ctxt |
136 Method.insert_tac ctxt global_facts THEN' |
142 | Linarith_Method => Lin_Arith.tac ctxt |
137 (case meth of |
143 | Presburger_Method => Cooper.tac true [] [] ctxt |
138 SATx_Method => SAT.satx_tac ctxt |
144 | Algebra_Method => Groebner.algebra_tac [] [] ctxt)) |
139 | Blast_Method => blast_tac ctxt |
|
140 | Auto_Method => SELECT_GOAL (Clasimp.auto_tac ctxt) |
|
141 | Fastforce_Method => Clasimp.fast_force_tac ctxt |
|
142 | Force_Method => Clasimp.force_tac ctxt |
|
143 | Moura_Method => moura_tac ctxt |
|
144 | Linarith_Method => Lin_Arith.tac ctxt |
|
145 | Presburger_Method => Cooper.tac true [] [] ctxt |
|
146 | Algebra_Method => Groebner.algebra_tac [] [] ctxt))) |
145 |
147 |
146 fun string_of_play_outcome (Played time) = string_of_ext_time (false, time) |
148 fun string_of_play_outcome (Played time) = string_of_ext_time (false, time) |
147 | string_of_play_outcome (Play_Timed_Out time) = |
149 | string_of_play_outcome (Play_Timed_Out time) = |
148 if time = Time.zeroTime then "" else string_of_ext_time (true, time) ^ ", timed out" |
150 if time = Time.zeroTime then "" else string_of_ext_time (true, time) ^ ", timed out" |
149 | string_of_play_outcome Play_Failed = "failed" |
151 | string_of_play_outcome Play_Failed = "failed" |