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@51365
|
8 |
imports Main
|
blanchet@49249
|
9 |
begin
|
blanchet@49249
|
10 |
|
wenzelm@49906
|
11 |
ML_file "mash_export.ML"
|
wenzelm@49906
|
12 |
|
blanchet@49260
|
13 |
sledgehammer_params
|
blanchet@51534
|
14 |
[provers = spass, max_facts = 32, strict, dont_slice, type_enc = mono_native,
|
blanchet@51940
|
15 |
lam_trans = lifting, timeout = 2, dont_preplay, minimize]
|
blanchet@49254
|
16 |
|
blanchet@51940
|
17 |
declare [[sledgehammer_instantiate_inducts = false]]
|
blanchet@51449
|
18 |
|
blanchet@49249
|
19 |
ML {*
|
blanchet@51534
|
20 |
!Multithreading.max_threads
|
blanchet@51534
|
21 |
*}
|
blanchet@51534
|
22 |
|
blanchet@51534
|
23 |
ML {*
|
blanchet@49249
|
24 |
open MaSh_Export
|
blanchet@49249
|
25 |
*}
|
blanchet@49249
|
26 |
|
blanchet@49249
|
27 |
ML {*
|
blanchet@49348
|
28 |
val do_it = false (* switch to "true" to generate the files *)
|
blanchet@51365
|
29 |
val thys = [@{theory List}]
|
blanchet@49348
|
30 |
val params as {provers, ...} = Sledgehammer_Isar.default_params @{context} []
|
blanchet@49348
|
31 |
val prover = hd provers
|
blanchet@51940
|
32 |
val max_suggestions = 1536
|
blanchet@51528
|
33 |
val dir = "List"
|
blanchet@51364
|
34 |
val prefix = "/tmp/" ^ dir ^ "/"
|
blanchet@51352
|
35 |
*}
|
blanchet@51352
|
36 |
|
blanchet@51352
|
37 |
ML {*
|
blanchet@51365
|
38 |
if do_it then
|
blanchet@51365
|
39 |
Isabelle_System.mkdir (Path.explode prefix)
|
blanchet@51365
|
40 |
else
|
blanchet@51365
|
41 |
()
|
blanchet@49261
|
42 |
*}
|
blanchet@49546
|
43 |
|
blanchet@49261
|
44 |
ML {*
|
blanchet@49260
|
45 |
if do_it then
|
blanchet@51364
|
46 |
generate_accessibility @{context} thys false (prefix ^ "mash_accessibility")
|
blanchet@49260
|
47 |
else
|
blanchet@49260
|
48 |
()
|
blanchet@49249
|
49 |
*}
|
blanchet@49249
|
50 |
|
blanchet@49249
|
51 |
ML {*
|
blanchet@49260
|
52 |
if do_it then
|
blanchet@51364
|
53 |
generate_features @{context} prover thys false (prefix ^ "mash_features")
|
blanchet@49260
|
54 |
else
|
blanchet@49260
|
55 |
()
|
blanchet@49249
|
56 |
*}
|
blanchet@49249
|
57 |
|
blanchet@49249
|
58 |
ML {*
|
blanchet@49260
|
59 |
if do_it then
|
blanchet@51499
|
60 |
generate_isar_dependencies @{context} thys false
|
blanchet@51499
|
61 |
(prefix ^ "mash_dependencies")
|
blanchet@49348
|
62 |
else
|
blanchet@49348
|
63 |
()
|
blanchet@49348
|
64 |
*}
|
blanchet@49348
|
65 |
|
blanchet@49348
|
66 |
ML {*
|
blanchet@49348
|
67 |
if do_it then
|
blanchet@51426
|
68 |
generate_isar_commands @{context} prover thys (prefix ^ "mash_commands")
|
blanchet@49348
|
69 |
else
|
blanchet@49348
|
70 |
()
|
blanchet@49348
|
71 |
*}
|
blanchet@49348
|
72 |
|
blanchet@49348
|
73 |
ML {*
|
blanchet@51831
|
74 |
if do_it then
|
blanchet@51921
|
75 |
generate_mepo_suggestions @{context} params (1, NONE) thys max_suggestions
|
blanchet@51829
|
76 |
(prefix ^ "mepo_suggestions")
|
blanchet@51829
|
77 |
else
|
blanchet@51829
|
78 |
()
|
blanchet@51829
|
79 |
*}
|
blanchet@51829
|
80 |
|
blanchet@51829
|
81 |
ML {*
|
blanchet@49348
|
82 |
if do_it then
|
blanchet@51829
|
83 |
generate_mesh_suggestions max_suggestions (prefix ^ "mash_suggestions")
|
blanchet@51829
|
84 |
(prefix ^ "mepo_suggestions") (prefix ^ "mesh_suggestions")
|
blanchet@49260
|
85 |
else
|
blanchet@49260
|
86 |
()
|
blanchet@49249
|
87 |
*}
|
blanchet@49249
|
88 |
|
blanchet@49249
|
89 |
ML {*
|
blanchet@49260
|
90 |
if do_it then
|
blanchet@51574
|
91 |
generate_prover_dependencies @{context} params (1, NONE) thys false
|
blanchet@51499
|
92 |
(prefix ^ "mash_prover_dependencies")
|
blanchet@49260
|
93 |
else
|
blanchet@49260
|
94 |
()
|
blanchet@49260
|
95 |
*}
|
blanchet@49260
|
96 |
|
blanchet@51426
|
97 |
ML {*
|
blanchet@51426
|
98 |
if do_it then
|
blanchet@51574
|
99 |
generate_prover_commands @{context} params (1, NONE) thys
|
blanchet@51499
|
100 |
(prefix ^ "mash_prover_commands")
|
blanchet@51426
|
101 |
else
|
blanchet@51426
|
102 |
()
|
blanchet@51426
|
103 |
*}
|
blanchet@51426
|
104 |
|
blanchet@49249
|
105 |
end
|