equal
deleted
inserted
replaced
157 timeout_params = {timeout, wf_timeout}}) |
157 timeout_params = {timeout, wf_timeout}}) |
158 mode i all_assms subgoal = |
158 mode i all_assms subgoal = |
159 let |
159 let |
160 val ctxt = Proof.context_of state; |
160 val ctxt = Proof.context_of state; |
161 |
161 |
162 val timer = Timer.startRealTimer () |
162 val time_start = Time.now () |
163 |
163 |
164 val print = writeln; |
164 val print = writeln; |
165 val print_n = if mode = Normal then writeln else K (); |
165 val print_n = if mode = Normal then writeln else K (); |
166 fun print_v f = if verbose then writeln (f ()) else (); |
166 fun print_v f = if verbose then writeln (f ()) else (); |
167 fun print_d f = if debug then writeln (f ()) else (); |
167 fun print_d f = if debug then writeln (f ()) else (); |
308 end; |
308 end; |
309 |
309 |
310 val _ = spying spy (fn () => (state, i, "starting " ^ str_of_mode mode ^ " mode")); |
310 val _ = spying spy (fn () => (state, i, "starting " ^ str_of_mode mode ^ " mode")); |
311 |
311 |
312 val outcome as (outcome_code, _) = |
312 val outcome as (outcome_code, _) = |
313 Timeout.apply (Time.+ (timeout, timeout_slack)) run () |
313 Timeout.apply (timeout + timeout_slack) run () |
314 handle Timeout.TIMEOUT _ => (print_n "Time out"; (unknownN, NONE)); |
314 handle Timeout.TIMEOUT _ => (print_n "Time out"; (unknownN, NONE)); |
315 |
315 |
316 val _ = print_v (fn () => "Total time: " ^ string_of_time (Timer.checkRealTimer timer)); |
316 val _ = print_v (fn () => "Total time: " ^ string_of_time (Time.now () - time_start)); |
317 |
317 |
318 val _ = spying spy (fn () => (state, i, "outcome: " ^ outcome_code)); |
318 val _ = spying spy (fn () => (state, i, "outcome: " ^ outcome_code)); |
319 in |
319 in |
320 if expect = "" orelse outcome_code = expect then outcome |
320 if expect = "" orelse outcome_code = expect then outcome |
321 else error ("Unexpected outcome: " ^ quote outcome_code) |
321 else error ("Unexpected outcome: " ^ quote outcome_code) |