equal
deleted
inserted
replaced
|
1 (* Title: HOL/Mirabelle/Tools/mirabelle_metis.ML |
|
2 Author: Jasmin Blanchette and Sascha Boehme, TU Munich |
|
3 |
|
4 Mirabelle action: "metis". |
|
5 *) |
|
6 |
|
7 structure Mirabelle_Metis: sig end = |
|
8 struct |
|
9 |
|
10 val _ = |
|
11 Theory.setup (Mirabelle.command_action \<^binding>\<open>metis\<close> |
|
12 (fn {timeout, ...} => fn {pre, post, ...} => |
|
13 let |
|
14 val thms = Mirabelle.theorems_of_sucessful_proof post; |
|
15 val names = map Thm.get_name_hint thms; |
|
16 val facts = map #1 (Facts.props (Proof_Context.facts_of (Proof.context_of pre))); |
|
17 fun metis ctxt = Metis_Tactic.metis_tac [] ATP_Problem_Generate.liftingN ctxt (thms @ facts); |
|
18 in |
|
19 (if Mirabelle.can_apply timeout metis pre then "succeeded" else "failed") |
|
20 |> not (null names) ? suffix (":\n" ^ commas names) |
|
21 end)); |
|
22 |
|
23 end |