equal
deleted
inserted
replaced
45 | string_for_failure MalformedOutput = "Error." |
45 | string_for_failure MalformedOutput = "Error." |
46 | string_for_failure UnknownError = "Failed." |
46 | string_for_failure UnknownError = "Failed." |
47 fun string_for_outcome NONE = "Success." |
47 fun string_for_outcome NONE = "Success." |
48 | string_for_outcome (SOME failure) = string_for_failure failure |
48 | string_for_outcome (SOME failure) = string_for_failure failure |
49 |
49 |
50 fun sledgehammer_test_theorems (params as {full_types, ...} : params) prover |
50 fun sledgehammer_test_theorems (params : params) prover timeout subgoal state |
51 timeout subgoal state filtered_clauses name_thms_pairs = |
51 filtered_clauses name_thms_pairs = |
52 let |
52 let |
53 val num_theorems = length name_thms_pairs |
53 val num_theorems = length name_thms_pairs |
54 val _ = priority ("Testing " ^ string_of_int num_theorems ^ |
54 val _ = priority ("Testing " ^ string_of_int num_theorems ^ |
55 " theorem" ^ plural_s num_theorems ^ "...") |
55 " theorem" ^ plural_s num_theorems ^ "...") |
56 val name_thm_pairs = maps (fn (n, ths) => map (pair n) ths) name_thms_pairs |
56 val name_thm_pairs = maps (fn (n, ths) => map (pair n) ths) name_thms_pairs |
86 fun test_thms filtered thms = |
86 fun test_thms filtered thms = |
87 case test_thms_fun filtered thms of |
87 case test_thms_fun filtered thms of |
88 (result as {outcome = NONE, ...}) => SOME result |
88 (result as {outcome = NONE, ...}) => SOME result |
89 | _ => NONE |
89 | _ => NONE |
90 |
90 |
91 val {context = ctxt, facts, goal} = Proof.goal state; |
91 val {context = ctxt, goal, ...} = Proof.goal state; |
92 in |
92 in |
93 (* try prove first to check result and get used theorems *) |
93 (* try prove first to check result and get used theorems *) |
94 (case test_thms_fun NONE name_thms_pairs of |
94 (case test_thms_fun NONE name_thms_pairs of |
95 result as {outcome = NONE, pool, internal_thm_names, conjecture_shape, |
95 result as {outcome = NONE, pool, internal_thm_names, conjecture_shape, |
96 filtered_clauses, ...} => |
96 filtered_clauses, ...} => |