author | blanchet |
Thu, 17 Jan 2013 23:53:55 +0100 | |
changeset 50966 | b85cb3049df9 |
parent 50964 | 2a990baa09af |
child 51027 | 0f817f80bcca |
permissions | -rw-r--r-- |
48234 | 1 |
(* Title: HOL/TPTP/MaSh_Export.thy |
2 |
Author: Jasmin Blanchette, TU Muenchen |
|
3 |
*) |
|
4 |
||
5 |
header {* MaSh Exporter *} |
|
6 |
||
7 |
theory MaSh_Export |
|
50350
136d5318b1fe
tuned MaSh exporter -- and don't make temp directories unless explicitly told so
blanchet
parents:
50349
diff
changeset
|
8 |
imports Main |
48234 | 9 |
begin |
10 |
||
48891 | 11 |
ML_file "mash_export.ML" |
12 |
||
48245 | 13 |
sledgehammer_params |
50519 | 14 |
[provers = spass, max_facts = 32, strict, dont_slice, type_enc = mono_native, |
50925 | 15 |
lam_trans = lifting, timeout = 2, dont_preplay, minimize] |
48239
0016290f904c
generate Meng--Paulson facts for evaluation purposes
blanchet
parents:
48235
diff
changeset
|
16 |
|
50925 | 17 |
declare [[sledgehammer_instantiate_inducts = false]] |
50434
960a3429615c
more MaSh tweaking -- in particular, export the same facts in "MaSh_Export" as are later tried in "MaSh_Eval"
blanchet
parents:
50411
diff
changeset
|
18 |
|
48234 | 19 |
ML {* |
50519 | 20 |
!Multithreading.max_threads |
21 |
*} |
|
22 |
||
23 |
ML {* |
|
48234 | 24 |
open MaSh_Export |
25 |
*} |
|
26 |
||
27 |
ML {* |
|
48333 | 28 |
val do_it = false (* switch to "true" to generate the files *) |
50350
136d5318b1fe
tuned MaSh exporter -- and don't make temp directories unless explicitly told so
blanchet
parents:
50349
diff
changeset
|
29 |
val thys = [@{theory List}] |
48333 | 30 |
val params as {provers, ...} = Sledgehammer_Isar.default_params @{context} [] |
31 |
val prover = hd provers |
|
50954 | 32 |
val range = (1, NONE) |
33 |
val step = 1 |
|
50964
2a990baa09af
use precomputed MaSh/MePo data whenever available
blanchet
parents:
50954
diff
changeset
|
34 |
val max_suggestions = 1024 |
50513 | 35 |
val dir = "List" |
50349 | 36 |
val prefix = "/tmp/" ^ dir ^ "/" |
50337 | 37 |
*} |
38 |
||
39 |
ML {* |
|
50350
136d5318b1fe
tuned MaSh exporter -- and don't make temp directories unless explicitly told so
blanchet
parents:
50349
diff
changeset
|
40 |
if do_it then |
136d5318b1fe
tuned MaSh exporter -- and don't make temp directories unless explicitly told so
blanchet
parents:
50349
diff
changeset
|
41 |
Isabelle_System.mkdir (Path.explode prefix) |
136d5318b1fe
tuned MaSh exporter -- and don't make temp directories unless explicitly told so
blanchet
parents:
50349
diff
changeset
|
42 |
else |
136d5318b1fe
tuned MaSh exporter -- and don't make temp directories unless explicitly told so
blanchet
parents:
50349
diff
changeset
|
43 |
() |
48246
fb11c09d7729
add Isabelle dependencies to tweak relevance filter
blanchet
parents:
48245
diff
changeset
|
44 |
*} |
48531 | 45 |
|
48246
fb11c09d7729
add Isabelle dependencies to tweak relevance filter
blanchet
parents:
48245
diff
changeset
|
46 |
ML {* |
48245 | 47 |
if do_it then |
50349 | 48 |
generate_accessibility @{context} thys false (prefix ^ "mash_accessibility") |
48245 | 49 |
else |
50 |
() |
|
51 |
*} |
|
52 |
||
53 |
ML {* |
|
54 |
if do_it then |
|
50349 | 55 |
generate_features @{context} prover thys false (prefix ^ "mash_features") |
48245 | 56 |
else |
57 |
() |
|
48239
0016290f904c
generate Meng--Paulson facts for evaluation purposes
blanchet
parents:
48235
diff
changeset
|
58 |
*} |
0016290f904c
generate Meng--Paulson facts for evaluation purposes
blanchet
parents:
48235
diff
changeset
|
59 |
|
0016290f904c
generate Meng--Paulson facts for evaluation purposes
blanchet
parents:
48235
diff
changeset
|
60 |
ML {* |
48245 | 61 |
if do_it then |
50484
8ec31bdb9d36
adopt the neutral "prover" terminology for MaSh rather than the ambiguous/wrong ATP terminology (which sometimes excludes SMT solvers)
blanchet
parents:
50434
diff
changeset
|
62 |
generate_isar_dependencies @{context} thys false |
8ec31bdb9d36
adopt the neutral "prover" terminology for MaSh rather than the ambiguous/wrong ATP terminology (which sometimes excludes SMT solvers)
blanchet
parents:
50434
diff
changeset
|
63 |
(prefix ^ "mash_dependencies") |
48333 | 64 |
else |
65 |
() |
|
66 |
*} |
|
67 |
||
68 |
ML {* |
|
69 |
if do_it then |
|
50954 | 70 |
generate_isar_commands @{context} prover (range, step) thys |
71 |
(prefix ^ "mash_commands") |
|
48333 | 72 |
else |
73 |
() |
|
74 |
*} |
|
75 |
||
76 |
ML {* |
|
50816 | 77 |
if do_it then |
50954 | 78 |
generate_mepo_suggestions @{context} params (range, step) thys |
79 |
max_suggestions (prefix ^ "mepo_suggestions") |
|
50814 | 80 |
else |
81 |
() |
|
82 |
*} |
|
83 |
||
84 |
ML {* |
|
48333 | 85 |
if do_it then |
50814 | 86 |
generate_mesh_suggestions max_suggestions (prefix ^ "mash_suggestions") |
87 |
(prefix ^ "mepo_suggestions") (prefix ^ "mesh_suggestions") |
|
48245 | 88 |
else |
89 |
() |
|
90 |
*} |
|
91 |
||
92 |
ML {* |
|
93 |
if do_it then |
|
50954 | 94 |
generate_prover_dependencies @{context} params range thys false |
50484
8ec31bdb9d36
adopt the neutral "prover" terminology for MaSh rather than the ambiguous/wrong ATP terminology (which sometimes excludes SMT solvers)
blanchet
parents:
50434
diff
changeset
|
95 |
(prefix ^ "mash_prover_dependencies") |
48245 | 96 |
else |
97 |
() |
|
48234 | 98 |
*} |
99 |
||
50411 | 100 |
ML {* |
101 |
if do_it then |
|
50954 | 102 |
generate_prover_commands @{context} params (range, step) thys |
50484
8ec31bdb9d36
adopt the neutral "prover" terminology for MaSh rather than the ambiguous/wrong ATP terminology (which sometimes excludes SMT solvers)
blanchet
parents:
50434
diff
changeset
|
103 |
(prefix ^ "mash_prover_commands") |
50411 | 104 |
else |
105 |
() |
|
106 |
*} |
|
107 |
||
50966 | 108 |
ML {* |
109 |
if do_it then |
|
110 |
generate_mesh_suggestions max_suggestions (prefix ^ "mash_prover_suggestions") |
|
111 |
(prefix ^ "mepo_suggestions") (prefix ^ "mesh_prover_suggestions") |
|
112 |
else |
|
113 |
() |
|
114 |
*} |
|
115 |
||
48234 | 116 |
end |