Attention une mise à jour du serveur va être effectuée le vendredi 16 avril entre 12h et 12h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit dac3b102 authored by MARCHE Claude's avatar MARCHE Claude

GTK IDE: time and limits shown in third column

parent 95ba51b7
...@@ -133,7 +133,7 @@ let backtrace_and_exit f () = ...@@ -133,7 +133,7 @@ let backtrace_and_exit f () =
raise e raise e
end end
module S = struct module Scheduler = struct
let idle ~prio f = let idle ~prio f =
let (_ : GMain.Idle.id) = GMain.Idle.add ~prio (backtrace_and_exit f) in () let (_ : GMain.Idle.id) = GMain.Idle.add ~prio (backtrace_and_exit f) in ()
...@@ -143,7 +143,7 @@ module S = struct ...@@ -143,7 +143,7 @@ module S = struct
GMain.Timeout.add ~ms ~callback:(backtrace_and_exit f) in () GMain.Timeout.add ~ms ~callback:(backtrace_and_exit f) in ()
end end
module Server = Itp_server.Make (S) (Protocol_why3ide) module Server = Itp_server.Make (Scheduler) (Protocol_why3ide)
(************************) (************************)
(* parsing command line *) (* parsing command line *)
...@@ -1468,6 +1468,41 @@ let if_selected_alone id f = ...@@ -1468,6 +1468,41 @@ let if_selected_alone id f =
if i = id || Some i = get_parent id then f id if i = id || Some i = get_parent id then f id
| _ -> () | _ -> ()
module S = Session_itp
module C = Controller_itp
let set_status_and_time_column row pa obsolete l =
goals_model#set ~row:row#iter ~column:status_column
(image_of_pa_status ~obsolete pa);
let t = match pa with
| C.Done r ->
let time = r.Call_provers.pr_time in
let steps = r.Call_provers.pr_steps in
let s =
if gconfig.show_time_limit then
Format.sprintf "%.2f [%d.0]" time
(l.Call_provers.limit_time)
else
Format.sprintf "%.2f" time
in
if steps >= 0 then
Format.sprintf "%s (steps: %d)" s steps
else
s
| C.Unedited -> "(proof script not yet edited)"
| C.JustEdited -> "(proof script edited, replay needed)"
| C.InternalFailure _ -> "(internal failure)"
| C.Interrupted -> "(interrupted)"
| C.Uninstalled _ -> "(uninstalled prover)"
| C.Scheduled
| C.Running ->
Format.sprintf "[limit=%d sec., %d M]"
(l.Call_provers.limit_time)
(l.Call_provers.limit_mem)
in
let t = if obsolete then t ^ " (obsolete)" else t in
goals_model#set ~row:row#iter ~column:time_column t
let treat_notification n = let treat_notification n =
begin match n with begin match n with
| Node_change (id, uinfo) -> | Node_change (id, uinfo) ->
...@@ -1482,14 +1517,12 @@ let treat_notification n = ...@@ -1482,14 +1517,12 @@ let treat_notification n =
| Proof_status_change (pa, obs, l) -> | Proof_status_change (pa, obs, l) ->
let r = get_node_row id in let r = get_node_row id in
Hint.replace node_id_pa id (pa, obs, l); Hint.replace node_id_pa id (pa, obs, l);
goals_model#set ~row:r#iter ~column:status_column set_status_and_time_column r pa obs l
(image_of_pa_status ~obsolete:obs pa)
| Obsolete b -> | Obsolete b ->
let r = get_node_row id in let r = get_node_row id in
let (pa, _obs, l) = Hint.find node_id_pa id in let (pa, _, l) = Hint.find node_id_pa id in
Hint.replace node_id_pa id (pa, b, l); Hint.replace node_id_pa id (pa, b, l);
goals_model#set ~row:r#iter ~column:status_column set_status_and_time_column r pa b l
(image_of_pa_status ~obsolete:b pa)
end end
| Next_Unproven_Node_Id (asked_id, next_unproved_id) -> | Next_Unproven_Node_Id (asked_id, next_unproved_id) ->
if_selected_alone asked_id if_selected_alone asked_id
...@@ -1584,7 +1617,7 @@ let (_ : GMenu.image_menu_item) = ...@@ -1584,7 +1617,7 @@ let (_ : GMenu.image_menu_item) =
(***********************) (***********************)
let () = let () =
S.timeout ~ms:100 (fun () -> List.iter treat_notification (get_notified ()); true); Scheduler.timeout ~ms:100 (fun () -> List.iter treat_notification (get_notified ()); true);
(* temporary *) (* temporary *)
vpan222#set_position 500; vpan222#set_position 500;
goals_view#expand_all (); goals_view#expand_all ();
......
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