author | blanchet |
Mon, 31 Jan 2022 16:09:23 +0100 | |
changeset 75041 | a695b78213e5 |
parent 75003 | f21e7e6172a0 |
child 76183 | 8089593a364a |
permissions | -rw-r--r-- |
47847 | 1 |
(* Title: HOL/Mirabelle/Tools/mirabelle_sledgehammer_filter.ML |
38892 | 2 |
Author: Jasmin Blanchette, TU Munich |
73696
03e134d5f867
reactive "sledgehammer_filter": statically correct, but untested (no proof_file);
wenzelm
parents:
73691
diff
changeset
|
3 |
Author: Makarius |
73847
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
4 |
Author: Martin Desharnais, UniBw Munich |
73691
2f9877db82a1
reimplemented Mirabelle as Isabelle/ML presentation hook + Isabelle/Scala tool, but sledgehammer is still inactive;
wenzelm
parents:
63806
diff
changeset
|
5 |
|
2f9877db82a1
reimplemented Mirabelle as Isabelle/ML presentation hook + Isabelle/Scala tool, but sledgehammer is still inactive;
wenzelm
parents:
63806
diff
changeset
|
6 |
Mirabelle action: "sledgehammer_filter". |
38892 | 7 |
*) |
8 |
||
73847
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
9 |
structure Mirabelle_Sledgehammer_Filter: MIRABELLE_ACTION = |
38892 | 10 |
struct |
11 |
||
40070
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
12 |
fun get args name default_value = |
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
13 |
case AList.lookup (op =) args name of |
63806 | 14 |
SOME value => Value.parse_real value |
40070
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
15 |
| NONE => default_value |
38992
542474156c66
introduce fudge factors to deal with "theory const"
blanchet
parents:
38988
diff
changeset
|
16 |
|
40070
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
17 |
fun extract_relevance_fudge args |
55205 | 18 |
{local_const_multiplier, worse_irrel_freq, higher_order_irrel_weight, abs_rel_weight, |
19 |
abs_irrel_weight, theory_const_rel_weight, theory_const_irrel_weight, |
|
20 |
chained_const_irrel_weight, intro_bonus, elim_bonus, simp_bonus, local_bonus, assum_bonus, |
|
21 |
chained_bonus, max_imperfect, max_imperfect_exp, threshold_divisor, ridiculous_threshold} = |
|
22 |
{local_const_multiplier = get args "local_const_multiplier" local_const_multiplier, |
|
41159
1e12d6495423
honor "overlord" option for SMT solvers as well and don't pass "ext" to them
blanchet
parents:
41138
diff
changeset
|
23 |
worse_irrel_freq = get args "worse_irrel_freq" worse_irrel_freq, |
55205 | 24 |
higher_order_irrel_weight = get args "higher_order_irrel_weight" higher_order_irrel_weight, |
40070
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
25 |
abs_rel_weight = get args "abs_rel_weight" abs_rel_weight, |
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
26 |
abs_irrel_weight = get args "abs_irrel_weight" abs_irrel_weight, |
55205 | 27 |
theory_const_rel_weight = get args "theory_const_rel_weight" theory_const_rel_weight, |
28 |
theory_const_irrel_weight = get args "theory_const_irrel_weight" theory_const_irrel_weight, |
|
29 |
chained_const_irrel_weight = get args "chained_const_irrel_weight" chained_const_irrel_weight, |
|
40070
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
30 |
intro_bonus = get args "intro_bonus" intro_bonus, |
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
31 |
elim_bonus = get args "elim_bonus" elim_bonus, |
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
32 |
simp_bonus = get args "simp_bonus" simp_bonus, |
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
33 |
local_bonus = get args "local_bonus" local_bonus, |
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
34 |
assum_bonus = get args "assum_bonus" assum_bonus, |
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
35 |
chained_bonus = get args "chained_bonus" chained_bonus, |
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
36 |
max_imperfect = get args "max_imperfect" max_imperfect, |
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
37 |
max_imperfect_exp = get args "max_imperfect_exp" max_imperfect_exp, |
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
38 |
threshold_divisor = get args "threshold_divisor" threshold_divisor, |
bdb890782d4a
replaced references with proper record that's threaded through
blanchet
parents:
40069
diff
changeset
|
39 |
ridiculous_threshold = get args "ridiculous_threshold" ridiculous_threshold} |
38902 | 40 |
|
38892 | 41 |
structure Prooftab = |
41407 | 42 |
Table(type key = int * int val ord = prod_ord int_ord int_ord) |
38892 | 43 |
|
73847
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
44 |
fun print_int x = Value.print_int (Synchronized.value x) |
38894 | 45 |
|
73696
03e134d5f867
reactive "sledgehammer_filter": statically correct, but untested (no proof_file);
wenzelm
parents:
73691
diff
changeset
|
46 |
fun percentage a b = if b = 0 then "N/A" else Value.print_int (a * 100 div b) |
38894 | 47 |
fun percentage_alt a b = percentage a (a + b) |
48 |
||
57154 | 49 |
val default_prover = ATP_Proof.eN (* arbitrary ATP *) |
38892 | 50 |
|
73696
03e134d5f867
reactive "sledgehammer_filter": statically correct, but untested (no proof_file);
wenzelm
parents:
73691
diff
changeset
|
51 |
fun with_index (i, s) = s ^ "@" ^ Value.print_int i |
38892 | 52 |
|
38894 | 53 |
val proof_fileK = "proof_file" |
54 |
||
73847
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
55 |
fun make_action ({arguments, ...} : Mirabelle.action_context) = |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
56 |
let |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
57 |
val (proof_table, args) = |
73696
03e134d5f867
reactive "sledgehammer_filter": statically correct, but untested (no proof_file);
wenzelm
parents:
73691
diff
changeset
|
58 |
let |
73847
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
59 |
val (pf_args, other_args) = |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
60 |
List.partition (curry (op =) proof_fileK o fst) arguments |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
61 |
val proof_file = |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
62 |
(case pf_args of |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
63 |
[] => error "No \"proof_file\" specified" |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
64 |
| (_, s) :: _ => s) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
65 |
fun do_line line = |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
66 |
(case space_explode ":" line of |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
67 |
[line_num, offset, proof] => |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
68 |
SOME (apply2 (the o Int.fromString) (line_num, offset), |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
69 |
proof |> space_explode " " |> filter_out (curry (op =) "")) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
70 |
| _ => NONE) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
71 |
val proof_table = |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
72 |
File.read (Path.explode proof_file) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
73 |
|> space_explode "\n" |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
74 |
|> map_filter do_line |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
75 |
|> AList.coalesce (op =) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
76 |
|> Prooftab.make |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
77 |
in (proof_table, other_args) end |
73696
03e134d5f867
reactive "sledgehammer_filter": statically correct, but untested (no proof_file);
wenzelm
parents:
73691
diff
changeset
|
78 |
|
73847
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
79 |
val num_successes = Synchronized.var "num_successes" 0 |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
80 |
val num_failures = Synchronized.var "num_failures" 0 |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
81 |
val num_found_proofs = Synchronized.var "num_found_proofs" 0 |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
82 |
val num_lost_proofs = Synchronized.var "num_lost_proofs" 0 |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
83 |
val num_found_facts = Synchronized.var "num_found_facts" 0 |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
84 |
val num_lost_facts = Synchronized.var "num_lost_facts" 0 |
38892 | 85 |
|
75003
f21e7e6172a0
renamed run_action to run in Mirabelle.action record
desharna
parents:
74948
diff
changeset
|
86 |
fun run ({pos, pre, ...} : Mirabelle.command) = |
73847
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
87 |
let |
73696
03e134d5f867
reactive "sledgehammer_filter": statically correct, but untested (no proof_file);
wenzelm
parents:
73691
diff
changeset
|
88 |
val results = |
73847
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
89 |
(case (Position.line_of pos, Position.offset_of pos) of |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
90 |
(SOME line_num, SOME offset) => |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
91 |
(case Prooftab.lookup proof_table (line_num, offset) of |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
92 |
SOME proofs => |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
93 |
let |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
94 |
val thy = Proof.theory_of pre |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
95 |
val {context = ctxt, facts = chained_ths, goal} = Proof.goal pre |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
96 |
val prover = AList.lookup (op =) args "prover" |> the_default default_prover |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
97 |
val params as {max_facts, ...} = Sledgehammer_Commands.default_params thy args |
75041 | 98 |
val default_max_facts = 256 (* FUDGE *) |
73847
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
99 |
val relevance_fudge = |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
100 |
extract_relevance_fudge args Sledgehammer_MePo.default_relevance_fudge |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
101 |
val subgoal = 1 |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
102 |
val (_, hyp_ts, concl_t) = ATP_Util.strip_subgoal goal subgoal ctxt |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
103 |
val keywords = Thy_Header.get_keywords' ctxt |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
104 |
val css_table = Sledgehammer_Fact.clasimpset_rule_table_of ctxt |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
105 |
val facts = |
75041 | 106 |
Sledgehammer_Fact.nearly_all_facts ctxt false |
73847
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
107 |
Sledgehammer_Fact.no_fact_override keywords css_table chained_ths |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
108 |
hyp_ts concl_t |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
109 |
|> Sledgehammer_Fact.drop_duplicate_facts |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
110 |
|> Sledgehammer_MePo.mepo_suggested_facts ctxt params |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
111 |
(the_default default_max_facts max_facts) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
112 |
(SOME relevance_fudge) hyp_ts concl_t |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
113 |
|> map (fst o fst) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
114 |
val (found_facts, lost_facts) = |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
115 |
flat proofs |> sort_distinct string_ord |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
116 |
|> map (fn fact => (find_index (curry (op =) fact) facts, fact)) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
117 |
|> List.partition (curry (op <=) 0 o fst) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
118 |
|>> sort (prod_ord int_ord string_ord) ||> map snd |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
119 |
val found_proofs = filter (forall (member (op =) facts)) proofs |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
120 |
val n = length found_proofs |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
121 |
val _ = Int.div |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
122 |
val _ = Synchronized.change num_failures (curry op+ 1) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
123 |
val log1 = |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
124 |
if n = 0 then |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
125 |
(Synchronized.change num_failures (curry op+ 1); "Failure") |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
126 |
else |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
127 |
(Synchronized.change num_successes (curry op+ 1); |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
128 |
Synchronized.change num_found_proofs (curry op+ n); |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
129 |
"Success (" ^ Value.print_int n ^ " of " ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
130 |
Value.print_int (length proofs) ^ " proofs)") |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
131 |
val _ = Synchronized.change num_lost_proofs (curry op+ (length proofs - n)) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
132 |
val _ = Synchronized.change num_found_facts (curry op+ (length found_facts)) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
133 |
val _ = Synchronized.change num_lost_facts (curry op+ (length lost_facts)) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
134 |
val log2 = |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
135 |
if null found_facts then |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
136 |
"" |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
137 |
else |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
138 |
let |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
139 |
val found_weight = |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
140 |
Real.fromInt (fold (fn (n, _) => Integer.add (n * n)) found_facts 0) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
141 |
/ Real.fromInt (length found_facts) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
142 |
|> Math.sqrt |> Real.ceil |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
143 |
in |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
144 |
"Found facts (among " ^ Value.print_int (length facts) ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
145 |
", weight " ^ Value.print_int found_weight ^ "): " ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
146 |
commas (map with_index found_facts) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
147 |
end |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
148 |
val log3 = |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
149 |
if null lost_facts then |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
150 |
"" |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
151 |
else |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
152 |
"Lost facts (among " ^ Value.print_int (length facts) ^ "): " ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
153 |
commas lost_facts |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
154 |
in cat_lines [log1, log2, log3] end |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
155 |
| NONE => "No known proof") |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
156 |
| _ => "") |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
157 |
in |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
158 |
results |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
159 |
end |
38894 | 160 |
|
73847
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
161 |
fun finalize () = |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
162 |
if Synchronized.value num_successes + Synchronized.value num_failures > 0 then |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
163 |
"\nNumber of overall successes: " ^ print_int num_successes ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
164 |
"\nNumber of overall failures: " ^ print_int num_failures ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
165 |
"\nOverall success rate: " ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
166 |
percentage_alt (Synchronized.value num_successes) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
167 |
(Synchronized.value num_failures) ^ "%" ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
168 |
"\nNumber of found proofs: " ^ print_int num_found_proofs ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
169 |
"\nNumber of lost proofs: " ^ print_int num_lost_proofs ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
170 |
"\nProof found rate: " ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
171 |
percentage_alt (Synchronized.value num_found_proofs) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
172 |
(Synchronized.value num_lost_proofs) ^ "%" ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
173 |
"\nNumber of found facts: " ^ print_int num_found_facts ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
174 |
"\nNumber of lost facts: " ^ print_int num_lost_facts ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
175 |
"\nFact found rate: " ^ |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
176 |
percentage_alt (Synchronized.value num_found_facts) |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
177 |
(Synchronized.value num_lost_facts) ^ "%" |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
178 |
else |
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
179 |
"" |
75003
f21e7e6172a0
renamed run_action to run in Mirabelle.action record
desharna
parents:
74948
diff
changeset
|
180 |
in ("", {run = run, finalize = finalize}) end |
73847
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
181 |
|
58f6b41efe88
refactored Mirabelle to produce output in real time
desharna
parents:
73696
diff
changeset
|
182 |
val () = Mirabelle.register_action "sledgehammer_filter" make_action |
73696
03e134d5f867
reactive "sledgehammer_filter": statically correct, but untested (no proof_file);
wenzelm
parents:
73691
diff
changeset
|
183 |
|
03e134d5f867
reactive "sledgehammer_filter": statically correct, but untested (no proof_file);
wenzelm
parents:
73691
diff
changeset
|
184 |
end |