blanchet@49249
|
1 |
(* Title: HOL/TPTP/MaSh_Export.thy
|
blanchet@49249
|
2 |
Author: Jasmin Blanchette, TU Muenchen
|
blanchet@49249
|
3 |
*)
|
blanchet@49249
|
4 |
|
blanchet@49249
|
5 |
header {* MaSh Exporter *}
|
blanchet@49249
|
6 |
|
blanchet@49249
|
7 |
theory MaSh_Export
|
blanchet@51352
|
8 |
imports
|
blanchet@51352
|
9 |
Main
|
blanchet@51352
|
10 |
(*
|
blanchet@51352
|
11 |
"~/afp/thys/Jinja/J/TypeSafe"
|
blanchet@51352
|
12 |
"~/afp/thys/ArrowImpossibilityGS/Thys/Arrow_Order"
|
blanchet@51352
|
13 |
"~/afp/thys/FFT/FFT"
|
blanchet@51352
|
14 |
"~~/src/HOL/Auth/NS_Shared"
|
blanchet@51352
|
15 |
"~~/src/HOL/IMPP/Hoare"
|
blanchet@51352
|
16 |
"~~/src/HOL/Library/Fundamental_Theorem_Algebra"
|
blanchet@51352
|
17 |
"~~/src/HOL/Proofs/Lambda/StrongNorm"
|
blanchet@51352
|
18 |
*)
|
blanchet@49249
|
19 |
begin
|
blanchet@49249
|
20 |
|
wenzelm@49906
|
21 |
ML_file "mash_export.ML"
|
wenzelm@49906
|
22 |
|
blanchet@49260
|
23 |
sledgehammer_params
|
blanchet@51352
|
24 |
[provers = spass, max_relevant = 40, strict, dont_slice, type_enc = mono_native,
|
blanchet@49447
|
25 |
lam_trans = combs_and_lifting, timeout = 1, dont_preplay, minimize]
|
blanchet@49254
|
26 |
|
blanchet@49249
|
27 |
ML {*
|
blanchet@49249
|
28 |
open MaSh_Export
|
blanchet@49249
|
29 |
*}
|
blanchet@49249
|
30 |
|
blanchet@49249
|
31 |
ML {*
|
blanchet@49348
|
32 |
val do_it = false (* switch to "true" to generate the files *)
|
blanchet@49348
|
33 |
val thy = @{theory List}
|
blanchet@49348
|
34 |
val params as {provers, ...} = Sledgehammer_Isar.default_params @{context} []
|
blanchet@49348
|
35 |
val prover = hd provers
|
blanchet@51352
|
36 |
val prefix = "/tmp/" ^ Context.theory_name thy ^ "/"
|
blanchet@51352
|
37 |
*}
|
blanchet@51352
|
38 |
|
blanchet@51352
|
39 |
ML {*
|
blanchet@51352
|
40 |
Isabelle_System.mkdir (Path.explode prefix)
|
blanchet@49261
|
41 |
*}
|
blanchet@49546
|
42 |
|
blanchet@49261
|
43 |
ML {*
|
blanchet@49260
|
44 |
if do_it then
|
blanchet@51352
|
45 |
generate_accessibility @{context} thy false (prefix ^ "mash_accessibility")
|
blanchet@49260
|
46 |
else
|
blanchet@49260
|
47 |
()
|
blanchet@49249
|
48 |
*}
|
blanchet@49249
|
49 |
|
blanchet@49249
|
50 |
ML {*
|
blanchet@49260
|
51 |
if do_it then
|
blanchet@51352
|
52 |
generate_features @{context} prover thy false (prefix ^ "mash_features")
|
blanchet@49260
|
53 |
else
|
blanchet@49260
|
54 |
()
|
blanchet@49249
|
55 |
*}
|
blanchet@49249
|
56 |
|
blanchet@49249
|
57 |
ML {*
|
blanchet@49260
|
58 |
if do_it then
|
blanchet@51352
|
59 |
generate_isar_dependencies @{context} thy false (prefix ^ "mash_dependencies")
|
blanchet@49348
|
60 |
else
|
blanchet@49348
|
61 |
()
|
blanchet@49348
|
62 |
*}
|
blanchet@49348
|
63 |
|
blanchet@49348
|
64 |
ML {*
|
blanchet@49348
|
65 |
if do_it then
|
blanchet@51352
|
66 |
generate_commands @{context} params thy (prefix ^ "mash_commands")
|
blanchet@49348
|
67 |
else
|
blanchet@49348
|
68 |
()
|
blanchet@49348
|
69 |
*}
|
blanchet@49348
|
70 |
|
blanchet@49348
|
71 |
ML {*
|
blanchet@49348
|
72 |
if do_it then
|
blanchet@51352
|
73 |
generate_mepo_suggestions @{context} params thy 1024 (prefix ^ "mash_mepo_suggestions")
|
blanchet@49260
|
74 |
else
|
blanchet@49260
|
75 |
()
|
blanchet@49249
|
76 |
*}
|
blanchet@49249
|
77 |
|
blanchet@49249
|
78 |
ML {*
|
blanchet@49260
|
79 |
if do_it then
|
blanchet@51352
|
80 |
generate_atp_dependencies @{context} params thy false (prefix ^ "mash_atp_dependencies")
|
blanchet@49260
|
81 |
else
|
blanchet@49260
|
82 |
()
|
blanchet@49260
|
83 |
*}
|
blanchet@49260
|
84 |
|
blanchet@49249
|
85 |
end
|