48248
|
1 |
(* Title: HOL/Tools/Sledgehammer/sledgehammer_filter_mash.ML
|
|
2 |
Author: Jasmin Blanchette, TU Muenchen
|
|
3 |
|
|
4 |
Sledgehammer's machine-learning-based relevance filter (MaSh).
|
|
5 |
*)
|
|
6 |
|
|
7 |
signature SLEDGEHAMMER_FILTER_MASH =
|
|
8 |
sig
|
48249
|
9 |
val reset : unit -> unit
|
|
10 |
val can_suggest : unit -> bool
|
|
11 |
val can_learn_thy : theory -> bool
|
|
12 |
val learn_thy : theory -> real -> unit
|
|
13 |
val learn_proof : theory -> term -> thm list -> unit
|
48248
|
14 |
end;
|
|
15 |
|
|
16 |
structure Sledgehammer_Filter_MaSh : SLEDGEHAMMER_FILTER_MASH =
|
|
17 |
struct
|
48249
|
18 |
|
|
19 |
fun mash_reset () =
|
|
20 |
tracing "MaSh RESET"
|
|
21 |
|
|
22 |
fun mash_add fact (access, feats, deps) =
|
|
23 |
tracing ("MaSh ADD " ^ fact ^ ": " ^ space_implode " " access ^ "; " ^
|
|
24 |
space_implode " " feats ^ "; " ^ space_implode " " deps)
|
|
25 |
|
|
26 |
fun mash_del fact =
|
|
27 |
tracing ("MaSh DEL " ^ fact)
|
|
28 |
|
|
29 |
fun mash_suggest fact (access, feats) =
|
|
30 |
tracing ("MaSh SUGGEST " ^ fact ^ ": " ^ space_implode " " access ^ "; " ^
|
|
31 |
space_implode " " feats)
|
|
32 |
|
|
33 |
fun reset () =
|
|
34 |
()
|
|
35 |
|
|
36 |
fun can_suggest () =
|
|
37 |
true
|
|
38 |
|
|
39 |
fun can_learn_thy thy =
|
|
40 |
true
|
|
41 |
|
|
42 |
fun learn_thy thy timeout =
|
|
43 |
()
|
|
44 |
|
|
45 |
fun learn_proof theory t thms =
|
|
46 |
()
|
|
47 |
|
48248
|
48 |
end;
|