equal
deleted
inserted
replaced
41 |
41 |
42 fun evaluate_mash_suggestions ctxt params range methods prob_dir_name |
42 fun evaluate_mash_suggestions ctxt params range methods prob_dir_name |
43 mepo_file_name mash_isar_file_name mash_prover_file_name |
43 mepo_file_name mash_isar_file_name mash_prover_file_name |
44 mesh_isar_file_name mesh_prover_file_name report_file_name = |
44 mesh_isar_file_name mesh_prover_file_name report_file_name = |
45 let |
45 let |
|
46 val zeros = [0, 0, 0, 0, 0, 0] |
46 val report_path = report_file_name |> Path.explode |
47 val report_path = report_file_name |> Path.explode |
47 val _ = File.write report_path "" |
48 val _ = File.write report_path "" |
48 fun print s = File.append report_path (s ^ "\n") |
49 fun print s = File.append report_path (s ^ "\n") |
49 val {provers, max_facts, slice, type_enc, lam_trans, timeout, ...} = |
50 val {provers, max_facts, slice, type_enc, lam_trans, timeout, ...} = |
50 default_params ctxt [] |
51 default_params ctxt [] |
178 "Goal " ^ string_of_int j ^ ": " ^ name :: map fst ress |
179 "Goal " ^ string_of_int j ^ ": " ^ name :: map fst ress |
179 |> cat_lines |> print; |
180 |> cat_lines |> print; |
180 map snd ress |
181 map snd ress |
181 end |
182 end |
182 else |
183 else |
183 [0, 0, 0, 0, 0, 0] |
184 zeros |
184 fun total_of method ok n = |
185 fun total_of method ok n = |
185 str_of_method method ^ string_of_int ok ^ " (" ^ |
186 str_of_method method ^ string_of_int ok ^ " (" ^ |
186 Real.fmt (StringCvt.FIX (SOME 1)) |
187 Real.fmt (StringCvt.FIX (SOME 1)) |
187 (100.0 * Real.fromInt ok / Real.fromInt n) ^ "%)" |
188 (100.0 * Real.fromInt ok / Real.fromInt (Int.max (1, n))) ^ "%)" |
188 val inst_inducts = Config.get ctxt instantiate_inducts |
189 val inst_inducts = Config.get ctxt instantiate_inducts |
189 val options = |
190 val options = |
190 ["prover = " ^ prover, |
191 ["prover = " ^ prover, |
191 "max_facts = " ^ string_of_int (the max_facts), |
192 "max_facts = " ^ string_of_int (the max_facts), |
192 "slice" |> not slice ? prefix "dont_", |
193 "slice" |> not slice ? prefix "dont_", |
198 val _ = print ("Options: " ^ commas options); |
199 val _ = print ("Options: " ^ commas options); |
199 val oks = Par_List.map solve_goal (tag_list 1 lines) |
200 val oks = Par_List.map solve_goal (tag_list 1 lines) |
200 val n = length oks |
201 val n = length oks |
201 val [mepo_ok, mash_isar_ok, mash_prover_ok, mesh_isar_ok, mesh_prover_ok, |
202 val [mepo_ok, mash_isar_ok, mash_prover_ok, mesh_isar_ok, mesh_prover_ok, |
202 isar_ok] = |
203 isar_ok] = |
203 map Integer.sum (map_transpose I oks) |
204 if n = 0 then zeros else map Integer.sum (map_transpose I oks) |
204 in |
205 in |
205 ["Successes (of " ^ string_of_int n ^ " goals)", |
206 ["Successes (of " ^ string_of_int n ^ " goals)", |
206 total_of MePoN mepo_ok n, |
207 total_of MePoN mepo_ok n, |
207 total_of MaSh_IsarN mash_isar_ok n, |
208 total_of MaSh_IsarN mash_isar_ok n, |
208 total_of MaSh_ProverN mash_prover_ok n, |
209 total_of MaSh_ProverN mash_prover_ok n, |