74 |
74 |
75 fun is_proof_method_direct (Metis_Method _) = true |
75 fun is_proof_method_direct (Metis_Method _) = true |
76 | is_proof_method_direct Meson_Method = true |
76 | is_proof_method_direct Meson_Method = true |
77 | is_proof_method_direct SMT2_Method = true |
77 | is_proof_method_direct SMT2_Method = true |
78 | is_proof_method_direct Simp_Method = true |
78 | is_proof_method_direct Simp_Method = true |
|
79 | is_proof_method_direct Simp_Size_Method = true |
79 | is_proof_method_direct _ = false |
80 | is_proof_method_direct _ = false |
80 |
81 |
81 fun maybe_paren s = s |> not (Symbol_Pos.is_identifier s) ? enclose "(" ")" |
82 fun maybe_paren s = s |> not (Symbol_Pos.is_identifier s) ? enclose "(" ")" |
82 |
83 |
83 fun string_of_proof_method ctxt ss meth = |
84 fun string_of_proof_method ctxt ss meth = |
101 | Algebra_Method => "algebra") |
102 | Algebra_Method => "algebra") |
102 in |
103 in |
103 maybe_paren (space_implode " " (meth_s :: ss)) |
104 maybe_paren (space_implode " " (meth_s :: ss)) |
104 end |
105 end |
105 |
106 |
106 val silence_unifier = Try0.silence_methods false |
107 val silence_methods = Try0.silence_methods false |
107 |
108 |
108 fun tac_of_proof_method ctxt (local_facts, global_facts) meth = |
109 fun tac_of_proof_method ctxt (local_facts, global_facts) meth = |
109 Method.insert_tac local_facts THEN' |
110 Method.insert_tac local_facts THEN' |
110 (case meth of |
111 (case meth of |
111 Metis_Method (type_enc_opt, lam_trans_opt) => |
112 Metis_Method (type_enc_opt, lam_trans_opt) => |
112 let val ctxt = Config.put Metis_Tactic.verbose false ctxt in |
113 let val ctxt = Config.put Metis_Tactic.verbose false ctxt in |
113 Metis_Tactic.metis_tac [type_enc_opt |> the_default (hd partial_type_encs)] |
114 Metis_Tactic.metis_tac [type_enc_opt |> the_default (hd partial_type_encs)] |
114 (lam_trans_opt |> the_default default_metis_lam_trans) ctxt global_facts |
115 (lam_trans_opt |> the_default default_metis_lam_trans) ctxt global_facts |
115 end |
116 end |
116 | Meson_Method => Meson_Tactic.meson_general_tac ctxt global_facts |
117 | Meson_Method => Meson_Tactic.meson_general_tac (silence_methods ctxt) global_facts |
117 | SMT2_Method => |
118 | SMT2_Method => |
118 let val ctxt = Config.put SMT2_Config.verbose false ctxt in |
119 let val ctxt = Config.put SMT2_Config.verbose false ctxt in |
119 SMT2_Solver.smt2_tac ctxt global_facts |
120 SMT2_Solver.smt2_tac ctxt global_facts |
120 end |
121 end |
121 | Simp_Method => Simplifier.asm_full_simp_tac (ctxt addsimps global_facts) |
122 | Simp_Method => Simplifier.asm_full_simp_tac (silence_methods ctxt addsimps global_facts) |
|
123 | Simp_Size_Method => |
|
124 Simplifier.asm_full_simp_tac (silence_methods ctxt addsimps @{thms size_ne_size_imp_ne}) |
122 | _ => |
125 | _ => |
123 Method.insert_tac global_facts THEN' |
126 Method.insert_tac global_facts THEN' |
124 (case meth of |
127 (case meth of |
125 SATx_Method => SAT.satx_tac ctxt |
128 SATx_Method => SAT.satx_tac ctxt |
126 | Blast_Method => blast_tac ctxt |
129 | Blast_Method => blast_tac ctxt |
127 | Simp_Size_Method => |
130 | Auto_Method => K (Clasimp.auto_tac (silence_methods ctxt)) |
128 Simplifier.asm_full_simp_tac (Simplifier.add_simp @{thm size_ne_size_imp_ne} ctxt) |
131 | Fastforce_Method => Clasimp.fast_force_tac (silence_methods ctxt) |
129 | Auto_Method => K (Clasimp.auto_tac (silence_unifier ctxt)) |
132 | Force_Method => Clasimp.force_tac (silence_methods ctxt) |
130 | Fastforce_Method => Clasimp.fast_force_tac (silence_unifier ctxt) |
|
131 | Force_Method => Clasimp.force_tac (silence_unifier ctxt) |
|
132 | Linarith_Method => |
133 | Linarith_Method => |
133 let val ctxt = Config.put Lin_Arith.verbose false ctxt in Lin_Arith.tac ctxt end |
134 let val ctxt = Config.put Lin_Arith.verbose false ctxt in Lin_Arith.tac ctxt end |
134 | Presburger_Method => Cooper.tac true [] [] ctxt |
135 | Presburger_Method => Cooper.tac true [] [] ctxt |
135 | Algebra_Method => Groebner.algebra_tac [] [] ctxt)) |
136 | Algebra_Method => Groebner.algebra_tac [] [] ctxt)) |
136 |
137 |