Commit 841b97b2 authored by MARCHE Claude's avatar MARCHE Claude

Improved monitoring of running proofs

parent 39918c7e
...@@ -230,7 +230,7 @@ let cleaning_box = ...@@ -230,7 +230,7 @@ let cleaning_box =
~packing:cleaning_frame#add () ~packing:cleaning_frame#add ()
let monitor_frame = let monitor_frame =
GBin.frame ~label:"Monitor" GBin.frame ~label:"Proof monitoring"
~packing:(tools_window_vbox#pack ~expand:false) () ~packing:(tools_window_vbox#pack ~expand:false) ()
let monitor_box = let monitor_box =
......
...@@ -119,7 +119,8 @@ module M = Session.Make ...@@ -119,7 +119,8 @@ module M = Session.Make
| None -> timeout_handler := Some(float ms /. 1000.0 ,f); | None -> timeout_handler := Some(float ms /. 1000.0 ,f);
| Some _ -> failwith "Replay.timeout: already one handler installed" | Some _ -> failwith "Replay.timeout: already one handler installed"
let notify_timer_state _ _ _ = () let notify_timer_state w s r =
Printf.eprintf "Progress: %d/%d/%d \r%!" w s r
end) end)
...@@ -484,6 +485,7 @@ let () = ...@@ -484,6 +485,7 @@ let () =
if !opt_latex2 <> "" then print_latex_statistics 2 !opt_latex2 if !opt_latex2 <> "" then print_latex_statistics 2 !opt_latex2
else else
let callback report = let callback report =
eprintf "@.";
let files,n,m = let files,n,m =
List.fold_left file_statistics ([],0,0) (M.get_all_files ()) List.fold_left file_statistics ([],0,0) (M.get_all_files ())
in in
......
...@@ -447,9 +447,9 @@ let timeout_handler () = ...@@ -447,9 +447,9 @@ let timeout_handler () =
let continue = let continue =
match l with match l with
| [] -> | [] ->
(**) (*
eprintf "Info: timeout_handler stopped@."; eprintf "Info: timeout_handler stopped@.";
(**) *)
false false
| _ -> true | _ -> true
in in
...@@ -464,9 +464,9 @@ let run_timeout_handler () = ...@@ -464,9 +464,9 @@ let run_timeout_handler () =
if !timeout_handler_activated then () else if !timeout_handler_activated then () else
begin begin
timeout_handler_activated := true; timeout_handler_activated := true;
(**) (*
eprintf "Info: timeout_handler started@."; eprintf "Info: timeout_handler started@.";
(**) *)
O.timeout ~ms:100 timeout_handler O.timeout ~ms:100 timeout_handler
end end
...@@ -506,9 +506,9 @@ let idle_handler () = ...@@ -506,9 +506,9 @@ let idle_handler () =
true true
with Queue.Empty -> with Queue.Empty ->
idle_handler_activated := false; idle_handler_activated := false;
(**) (*
eprintf "Info: idle_handler stopped@."; eprintf "Info: idle_handler stopped@.";
(**) *)
false false
| e -> | e ->
Format.eprintf "@[Exception raise in Session.idle_handler:@ %a@.@]" Format.eprintf "@[Exception raise in Session.idle_handler:@ %a@.@]"
...@@ -521,9 +521,9 @@ let run_idle_handler () = ...@@ -521,9 +521,9 @@ let run_idle_handler () =
if !idle_handler_activated then () else if !idle_handler_activated then () else
begin begin
idle_handler_activated := true; idle_handler_activated := true;
(**) (*
eprintf "Info: idle_handler started@."; eprintf "Info: idle_handler started@.";
(**) *)
O.idle idle_handler O.idle idle_handler
end end
...@@ -548,14 +548,15 @@ let cancel_scheduled_proofs () = ...@@ -548,14 +548,15 @@ let cancel_scheduled_proofs () =
callback Interrupted callback Interrupted
done done
with with
| Queue.Empty -> () | Queue.Empty ->
O.notify_timer_state 0 0 (List.length !running_proofs)
let schedule_proof_attempt ~debug ~timelimit ~memlimit ?old let schedule_proof_attempt ~debug ~timelimit ~memlimit ?old
~command ~driver ~callback goal = ~command ~driver ~callback goal =
(**) (*
eprintf "Scheduling a new proof attempt@."; eprintf "Scheduling a new proof attempt@.";
(**) *)
Queue.push Queue.push
(Action_proof_attempt(debug,timelimit,memlimit,old,command,driver, (Action_proof_attempt(debug,timelimit,memlimit,old,command,driver,
callback,goal)) callback,goal))
...@@ -1762,10 +1763,14 @@ let check_all ~callback = ...@@ -1762,10 +1763,14 @@ let check_all ~callback =
file.theories) file.theories)
!all_files; !all_files;
let timeout () = let timeout () =
(*
Printf.eprintf "Progress: %d/%d\r%!" !proofs_done !proofs_to_do; Printf.eprintf "Progress: %d/%d\r%!" !proofs_done !proofs_to_do;
*)
if !proofs_done = !proofs_to_do then if !proofs_done = !proofs_to_do then
begin begin
(*
Printf.eprintf "\n%!"; Printf.eprintf "\n%!";
*)
decr maximum_running_proofs; decr maximum_running_proofs;
callback !reports; callback !reports;
false false
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment