52590
|
1 |
(* Title: HOL/Tools/Sledgehammer/sledgehammer_reconstructor.ML
|
52555
|
2 |
Author: Jasmin Blanchette, TU Muenchen
|
|
3 |
Author: Steffen Juilf Smolka, TU Muenchen
|
|
4 |
|
|
5 |
Reconstructors.
|
|
6 |
*)
|
|
7 |
|
|
8 |
signature SLEDGEHAMMER_RECONSTRUCTOR =
|
|
9 |
sig
|
|
10 |
type stature = ATP_Problem_Generate.stature
|
|
11 |
|
|
12 |
datatype reconstructor =
|
|
13 |
Metis of string * string |
|
|
14 |
SMT
|
|
15 |
|
54824
|
16 |
datatype play_outcome =
|
|
17 |
Played of Time.time |
|
|
18 |
Play_Timed_Out of Time.time |
|
|
19 |
Play_Failed |
|
|
20 |
Not_Played
|
52555
|
21 |
|
54828
|
22 |
val string_of_play_outcome: play_outcome -> string
|
|
23 |
|
52555
|
24 |
type minimize_command = string list -> string
|
54824
|
25 |
type one_line_params =
|
|
26 |
(reconstructor * play_outcome) * string * (string * stature) list * minimize_command * int * int
|
52555
|
27 |
|
|
28 |
val smtN : string
|
55170
|
29 |
|
|
30 |
val silence_reconstructors : bool -> Proof.context -> Proof.context
|
54495
|
31 |
end;
|
52555
|
32 |
|
|
33 |
structure Sledgehammer_Reconstructor : SLEDGEHAMMER_RECONSTRUCTOR =
|
|
34 |
struct
|
|
35 |
|
54828
|
36 |
open ATP_Util
|
52555
|
37 |
open ATP_Problem_Generate
|
|
38 |
|
|
39 |
datatype reconstructor =
|
|
40 |
Metis of string * string |
|
|
41 |
SMT
|
|
42 |
|
54824
|
43 |
datatype play_outcome =
|
|
44 |
Played of Time.time |
|
|
45 |
Play_Timed_Out of Time.time |
|
|
46 |
Play_Failed |
|
|
47 |
Not_Played
|
52555
|
48 |
|
54828
|
49 |
fun string_of_play_outcome (Played time) = string_of_ext_time (false, time)
|
|
50 |
| string_of_play_outcome (Play_Timed_Out time) = string_of_ext_time (true, time) ^ ", timed out"
|
|
51 |
| string_of_play_outcome Play_Failed = "failed"
|
|
52 |
| string_of_play_outcome _ = "unknown"
|
|
53 |
|
52555
|
54 |
type minimize_command = string list -> string
|
54824
|
55 |
type one_line_params =
|
|
56 |
(reconstructor * play_outcome) * string * (string * stature) list * minimize_command * int * int
|
52555
|
57 |
|
|
58 |
val smtN = "smt"
|
|
59 |
|
55170
|
60 |
(* Makes reconstructor tools as silent as possible. The "set_visible" calls suppresses "Unification
|
|
61 |
bound exceeded" warnings and the like. *)
|
|
62 |
fun silence_reconstructors debug =
|
55177
|
63 |
Try0.silence_method debug
|
55170
|
64 |
#> Config.put SMT_Config.verbose debug
|
|
65 |
|
54495
|
66 |
end;
|