Commit d8294aba authored by MARCHE Claude's avatar MARCHE Claude

ITP sessions: proved status in now inside the session static state and saved on disk

parent e556b0af
This diff is collapsed.
......@@ -61,13 +61,8 @@ module type Scheduler = sig
end
(** Correspondance between a node of the proof tree
and its state (proved or not) *)
type proof_state
type controller = private
{ mutable controller_session : Session_itp.session;
proof_state : proof_state;
controller_config : Whyconf.config;
controller_env : Env.env;
controller_provers : (Whyconf.config_prover * Driver.driver) Whyconf.Hprover.t;
......@@ -77,13 +72,6 @@ val create_controller: Whyconf.config -> Env.env -> Session_itp.session -> contr
(** creates a controller for the given session.
The config and env is used to load the drivers for the provers. *)
(** Used to find if a proof/trans node or theory is proved or not *)
val tn_proved: controller -> Session_itp.transID -> bool
val pn_proved: controller -> Session_itp.proofNodeID -> bool
val th_proved: controller -> Session_itp.theory -> bool
val file_proved: controller -> Session_itp.file -> bool
val any_proved: controller -> any -> bool
val print_session : Format.formatter -> controller -> unit
......@@ -145,14 +133,6 @@ val add_file : controller -> ?format:Env.fformat -> string -> unit
val get_undetached_children_no_pa: Session_itp.session -> any -> any list
type notifier = any -> unit
val remove_subtree:
controller ->
any ->
removed:(any -> unit) ->
notification:notifier -> unit
module Make(S : Scheduler) : sig
......@@ -233,11 +213,10 @@ val run_strategy_on_goal :
[schedule_transformation]). [callback] is called on each step of
execution of the strategy. *)
val clean_session:
controller ->
remove:(any -> unit) -> unit
(** Remove proof_attempts below proved goals, although thet are either obsoloete or not valid
*)
val clean_session: controller -> removed:notifier -> unit
(** Remove each proof attempt or transformation that are below proved
goals, that are either obsolete or not valid. The [removed]
notifier is called on each removed node. *)
val mark_as_obsolete:
notification:notifier ->
......
......@@ -15,25 +15,28 @@ exception Bad_prover_name of string
Else, return the concatenation of the reversed list of unproven
goals below the transformation and acc *)
let rec unproven_goals_below_tn cont acc tn =
if tn_proved cont tn then
let s = cont.controller_session in
if tn_proved s tn then
acc (* we ignore "dead" goals *)
else
let sub_tasks = get_sub_tasks cont.controller_session tn in
let sub_tasks = get_sub_tasks s tn in
List.fold_left (unproven_goals_below_pn cont) acc sub_tasks
(* Same as unproven_goals_below_tn; note that if goal is not proved
and there is no transformation, goal is returned (else it is not) *)
and unproven_goals_below_pn cont acc goal =
if pn_proved cont goal then
let s = cont.controller_session in
if pn_proved s goal then
acc (* we ignore "dead" transformations *)
else
match get_transformations cont.controller_session goal with
match get_transformations s goal with
| [] -> goal :: acc
| tns -> List.fold_left (unproven_goals_below_tn cont) acc tns
(* Same as unproven_goals_below_tn *)
let unproven_goals_below_th cont acc th =
if th_proved cont th then
let s = cont.controller_session in
if th_proved s th then
acc
else
let goals = theory_goals th in
......@@ -41,10 +44,11 @@ let unproven_goals_below_th cont acc th =
(* Same as unproven_goals_below_tn *)
let unproven_goals_below_file cont file =
if file_proved cont file then
let s = cont.controller_session in
if file_proved s file then
[]
else
let theories = file.file_theories in
let theories = file_theories file in
List.fold_left (unproven_goals_below_th cont) [] theories
let unproven_goals_below_id cont id =
......@@ -413,7 +417,7 @@ let () =
let node_ID_from_pn pn = Hpn.find pn_to_node_ID pn
let node_ID_from_tn tn = Htn.find tn_to_node_ID tn
let node_ID_from_th th = Ident.Hid.find th_to_node_ID (theory_name th)
let node_ID_from_file file = Hstr.find file_to_node_ID (file.file_name)
let node_ID_from_file file = Hstr.find file_to_node_ID (file_name file)
let node_ID_from_any any =
match any with
......@@ -426,9 +430,9 @@ let () =
let remove_any_node_ID any =
match any with
| AFile file ->
let nid = Hstr.find file_to_node_ID file.file_name in
let nid = Hstr.find file_to_node_ID (file_name file) in
Hint.remove model_any nid;
Hstr.remove file_to_node_ID file.file_name
Hstr.remove file_to_node_ID (file_name file)
| ATh th ->
let nid = Ident.Hid.find th_to_node_ID (theory_name th) in
Hint.remove model_any nid;
......@@ -454,7 +458,7 @@ let () =
let add_node_to_table node new_id =
match node with
| AFile file -> Hstr.add file_to_node_ID file.file_name new_id
| AFile file -> Hstr.add file_to_node_ID (file_name file) new_id
| ATh th -> Ident.Hid.add th_to_node_ID (theory_name th) new_id
| ATn tn -> Htn.add tn_to_node_ID tn new_id
| APn pn -> Hpn.add pn_to_node_ID pn new_id
......@@ -609,8 +613,8 @@ end
let s = d.cont.controller_session in
let files = Session_itp.get_files s in
Stdlib.Hstr.iter (fun _ f ->
Format.eprintf "File : %s@." f.file_name;
read_and_send f.file_name) files
Format.eprintf "File : %s@." (file_name f);
read_and_send (file_name f)) files
let relativize_location s loc =
let f, l, b, e = Loc.get loc in
......@@ -670,10 +674,8 @@ end
let get_node_name (node: any) =
let d = get_server_data () in
match node with
| AFile file ->
file.file_name
| ATh th ->
(theory_name th).Ident.id_string
| AFile file -> file_name file
| ATh th -> (theory_name th).Ident.id_string
| ATn tn ->
let name = get_transf_name d.cont.controller_session tn in
let args = get_transf_args d.cont.controller_session tn in
......@@ -696,17 +698,18 @@ end
let get_node_proved new_id (node: any) =
let d = get_server_data () in
let cont = d.cont in
let s = cont.controller_session in
match node with
| AFile file ->
P.notify (Node_change (new_id, Proved (file_proved cont file)))
P.notify (Node_change (new_id, Proved (file_proved s file)))
| ATh th ->
P.notify (Node_change (new_id, Proved (th_proved cont th)))
P.notify (Node_change (new_id, Proved (th_proved s th)))
| ATn tn ->
P.notify (Node_change (new_id, Proved (tn_proved cont tn)))
P.notify (Node_change (new_id, Proved (tn_proved s tn)))
| APn pn ->
P.notify (Node_change (new_id, Proved (pn_proved cont pn)))
P.notify (Node_change (new_id, Proved (pn_proved s pn)))
| APa pa ->
let pa = get_proof_attempt_node cont.controller_session pa in
let pa = get_proof_attempt_node s pa in
let obs = pa.proof_obsolete in
let limit = pa.limit in
let res =
......@@ -807,8 +810,7 @@ end
(f: parent:node_ID -> any -> unit) parent file =
f ~parent (AFile file);
let nid = node_ID_from_file file in
List.iter (iter_subtree_from_theory f nid)
file.file_theories
List.iter (iter_subtree_from_theory f nid) (file_theories file)
let iter_the_files (f: parent:node_ID -> any -> unit) parent : unit =
let d = get_server_data () in
......@@ -874,7 +876,7 @@ end
let s, list_loc = task_of_id d parid in
P.notify (Task (nid,s ^ "\n====================> Prover: " ^ name ^ "\n", list_loc))
| AFile f ->
P.notify (Task (nid, "File " ^ f.file_name, []))
P.notify (Task (nid, "File " ^ file_name f, []))
| ATn tid ->
let name = get_transf_name d.cont.controller_session tid in
let args = get_transf_args d.cont.controller_session tid in
......@@ -974,7 +976,7 @@ end
let notify_change_proved c x =
try
let node_ID = node_ID_from_any x in
let b = any_proved c x in
let b = any_proved c.controller_session x in
P.notify (Node_change (node_ID, Proved b));
match x with
| APa pa ->
......@@ -1087,11 +1089,11 @@ end
(* ----------------- Clean session -------------------- *)
let clean_session () =
let d = get_server_data () in
let remove x =
let removed x =
let nid = node_ID_from_any x in
remove_any_node_ID x;
P.notify (Remove nid) in
C.clean_session d.cont ~remove
C.clean_session d.cont ~removed
(* ----------------- Save session --------------------- *)
......@@ -1147,12 +1149,13 @@ end
(* ----------------- locate next unproven node -------------------- *)
let notify_first_unproven_node d ni =
let s = d.cont.controller_session in
let any = any_from_node_ID ni in
let unproven_any =
get_first_unproven_goal_around
~proved:(Controller_itp.any_proved d.cont)
~children:(get_undetached_children_no_pa d.cont.controller_session)
~get_parent:(get_any_parent d.cont.controller_session)
~proved:(Session_itp.any_proved s)
~children:(get_undetached_children_no_pa s)
~get_parent:(get_any_parent s)
~is_goal:(fun any -> match any with | APn _ -> true | _ -> false)
~is_pa:(fun any -> match any with | APa _ -> true | _ -> false)
any in
......@@ -1222,7 +1225,7 @@ end
let n = any_from_node_ID nid in
begin
try
Controller_itp.remove_subtree d.cont n
remove_subtree d.cont.controller_session n
~notification:(notify_change_proved d.cont)
~removed:(fun x ->
let nid = node_ID_from_any x in
......
This diff is collapsed.
......@@ -15,7 +15,8 @@ unique identifiers of type [proofNodeId]
*)
type session
type file
type theory
type proofNodeID
val print_proofNodeID : Format.formatter -> proofNodeID -> unit
type transID
......@@ -25,14 +26,6 @@ module Hpn: Exthtbl.S with type key = proofNodeID
module Htn: Exthtbl.S with type key = transID
module Hpan: Exthtbl.S with type key = proofAttemptID
type theory
type file = private {
file_name : string;
file_format : string option;
file_theories : theory list;
file_detached_theories : theory list;
}
(* Any proof node of the tree *)
type any =
......@@ -42,7 +35,10 @@ type any =
| APn of proofNodeID
| APa of proofAttemptID
(** Session / File *)
type notifier = any -> unit
(** Session *)
(* Get all the files in the session *)
val get_files : session -> file Stdlib.Hstr.t
......@@ -52,6 +48,12 @@ val get_file: session -> string -> file
val get_dir : session -> string
val get_shape_version : session -> int
(** File *)
val file_name : file -> string
val file_format : file -> string option
val file_theories : file -> theory list
val file_detached_theories : file -> theory list
(** Theory *)
val theory_name : theory -> Ident.ident
val theory_goals : theory -> proofNodeID list
......@@ -196,14 +198,37 @@ val load_session : string -> session * bool
exception RemoveError
val remove_subtree: session -> any -> notification:(any -> unit) -> unit
(** [remove_subtree s a notification] remove the subtree originating from a in
session s then call the notification function (used to notify the ide.
val remove_subtree: notification:notifier -> removed:notifier ->
session -> any -> unit
(** [remove_subtree s a ~removed ~notification] remove the subtree
originating from node [a] in session [s]. the notifier [removed] is
called on each removed node, and notifier [notification] on nodes
whose proved state changes.
If called on a theory or proof node, raise RemoveError *)
raises [RemoveError] when removal is forbidden, e.g. when called on
a theory, or a goal that is not detached
*)
val fold_all_any: session -> ('a -> any -> 'a) -> 'a -> any -> 'a
(** [fold_all_any s f acc any] folds on all the subnodes of any *)
val fold_all_session: session -> ('a -> any -> 'a) -> 'a -> 'a
(** [fold_all_session s f acc] folds on the whole session *)
(* proved status *)
val th_proved : session -> theory -> bool
val pn_proved : session -> proofNodeID -> bool
val tn_proved : session -> transID -> bool
val file_proved : session -> file -> bool
val any_proved : session -> any -> bool
(* status update *)
val update_goal_node : notifier -> session -> proofNodeID -> unit
(** [updates the proved status of the given goal node. If necessary, propagates
the update to ancestors. [notifier] is called on all nodes whose status changes *)
val update_trans_node : notifier -> session -> transID -> unit
(** [updates the proved status of the given transformation node. If necessary, propagates
the update to ancestors. [notifier] is called on all nodes whose status changes *)
......@@ -126,34 +126,34 @@ let print_result = Call_provers.print_prover_result
module S = Session_itp
let goal_statistics cont (goals,n,m) g =
if Controller_itp.pn_proved cont g then (goals,n+1,m+1) else (g::goals,n,m+1)
let goal_statistics ses (goals,n,m) g =
if S.pn_proved ses g then (goals,n+1,m+1) else (g::goals,n,m+1)
let theory_statistics cont (ths,n,m) th =
let theory_statistics ses (ths,n,m) th =
let goals,n1,m1 =
List.fold_left (goal_statistics cont) ([],0,0) (Session_itp.theory_goals th) in
List.fold_left (goal_statistics ses) ([],0,0) (S.theory_goals th) in
((th,goals,n1,m1)::ths,n+n1,m+m1)
let file_statistics cont _ f (files,n,m) =
let file_statistics ses _ f (files,n,m) =
let ths,n1,m1 =
List.fold_left (theory_statistics cont) ([],0,0) f.Session_itp.file_theories in
List.fold_left (theory_statistics ses) ([],0,0) (S.file_theories f) in
((f,ths,n1,m1)::files,n+n1,m+m1)
let print_statistics cont files =
let print_statistics ses files =
let print_goal g =
printf " +--goal %s not proved@."
(Session_itp.get_proof_name cont.Controller_itp.controller_session g).Ident.id_string
(S.get_proof_name ses g).Ident.id_string
in
let print_theory (th,goals,n,m) =
if n<m then begin
printf " +--theory %s: %d/%d@."
(Session_itp.theory_name th).Ident.id_string n m;
(S.theory_name th).Ident.id_string n m;
List.iter print_goal (List.rev goals)
end
in
let print_file (f,ths,n,m) =
if n<m then begin
printf " +--file %s: %d/%d@." f.S.file_name n m;
printf " +--file %s: %d/%d@." (S.file_name f) n m;
List.iter print_theory (List.rev ths)
end
in
......@@ -198,7 +198,7 @@ let add_to_check_no_smoke some_merge_miss found_obs cont =
let final_callback report =
Debug.dprintf debug "@.";
let files,n,m =
Stdlib.Hstr.fold (file_statistics cont)
Stdlib.Hstr.fold (file_statistics session)
(S.get_files session) ([],0,0)
in
let report =
......@@ -219,7 +219,7 @@ let add_to_check_no_smoke some_merge_miss found_obs cont =
printf "(replay OK%s%s)@."
(if found_obs then ", obsolete session" else "")
(if !found_upgraded_prover then ", upgraded prover" else "");
if true (* !opt_stats *) && n<m then print_statistics cont files;
if true (* !opt_stats *) && n<m then print_statistics session files;
Debug.dprintf debug "Everything replayed OK.@.";
if !opt_force || found_obs || !found_upgraded_prover then save ();
exit 0
......@@ -229,7 +229,7 @@ let add_to_check_no_smoke some_merge_miss found_obs cont =
begin
printf "(replay failed%s)@."
(if some_merge_miss then ", with some merge miss" else "");
List.iter (print_report cont.Controller_itp.controller_session) report;
List.iter (print_report session) report;
eprintf "Replay failed.@.";
if !opt_force then save ();
exit 1
......
......@@ -142,8 +142,7 @@ let update_perf_stats stats ((_,t) as prover_and_time) =
let string_of_prover p = Pp.string_of_wnl print_prover p
let rec stats_of_goal ~root prefix_name stats cont goal =
let ses = cont.Controller_itp.controller_session in
let rec stats_of_goal ~root prefix_name stats ses goal =
if root
then stats.nb_root_goals <- stats.nb_root_goals + 1
else stats.nb_sub_goals <- stats.nb_sub_goals + 1;
......@@ -163,9 +162,9 @@ let rec stats_of_goal ~root prefix_name stats cont goal =
[] (get_proof_attempts ses goal)
in
List.iter (update_perf_stats stats) proof_list;
List.iter (stats_of_transf prefix_name stats cont) (get_transformations ses goal);
List.iter (stats_of_transf prefix_name stats ses) (get_transformations ses goal);
let goal_name = prefix_name ^ (get_proof_name ses goal).Ident.id_string in
if not (Controller_itp.pn_proved cont goal) then
if not (pn_proved ses goal) then
stats.no_proof <- Sstr.add goal_name stats.no_proof
else
begin
......@@ -182,21 +181,20 @@ let rec stats_of_goal ~root prefix_name stats cont goal =
| _ -> ()
end
and stats_of_transf prefix_name stats cont transf =
let ses = cont.Controller_itp.controller_session in
and stats_of_transf prefix_name stats ses transf =
let prefix_name = prefix_name ^ (get_transf_name ses transf) ^
(String.concat "" (get_transf_args ses transf)) ^ " / " in
List.iter (stats_of_goal ~root:false prefix_name stats cont) (get_sub_tasks ses transf)
List.iter (stats_of_goal ~root:false prefix_name stats ses) (get_sub_tasks ses transf)
let stats_of_theory file stats cont theory =
let stats_of_theory file stats ses theory =
let goals = theory_goals theory in
let prefix_name = file.file_name ^ " / " ^ (theory_name theory).Ident.id_string
let prefix_name = file_name file ^ " / " ^ (theory_name theory).Ident.id_string
^ " / " in
List.iter (stats_of_goal ~root:true prefix_name stats cont) goals
List.iter (stats_of_goal ~root:true prefix_name stats ses) goals
let stats_of_file stats cont _ file =
let theories = file.file_theories in
List.iter (stats_of_theory file stats cont) theories
let stats_of_file stats ses _ file =
let theories = file_theories file in
List.iter (stats_of_theory file stats ses) theories
......@@ -204,8 +202,7 @@ type goal_stat =
| No of (transID * (proofNodeID * goal_stat) list) list
| Yes of (prover * float) list * (transID * (proofNodeID * goal_stat) list) list
let rec stats2_of_goal ~nb_proofs cont g : goal_stat =
let ses = cont.Controller_itp.controller_session in
let rec stats2_of_goal ~nb_proofs ses g : goal_stat =
let proof_list =
List.fold_left
(fun acc proof_attempt ->
......@@ -224,22 +221,21 @@ let rec stats2_of_goal ~nb_proofs cont g : goal_stat =
let l =
List.fold_left
(fun acc tr ->
match stats2_of_transf ~nb_proofs cont tr with
match stats2_of_transf ~nb_proofs ses tr with
| [] -> acc
| r -> (tr,List.rev r)::acc)
[] (get_transformations ses g)
in
if match nb_proofs with
| 0 -> not (Controller_itp.pn_proved cont g)
| 0 -> not (pn_proved ses g)
| 1 -> List.length proof_list = 1
| _ -> assert false
then Yes(proof_list,l) else No(l)
and stats2_of_transf ~nb_proofs cont tr : (proofNodeID * goal_stat) list =
let ses = cont.Controller_itp.controller_session in
and stats2_of_transf ~nb_proofs ses tr : (proofNodeID * goal_stat) list =
List.fold_left
(fun acc g ->
match stats2_of_goal ~nb_proofs cont g with
match stats2_of_goal ~nb_proofs ses g with
| No [] -> acc
| r -> (g,r)::acc)
[] (get_sub_tasks ses tr)
......@@ -271,10 +267,10 @@ and print_transf_stats ~time depth ses (tr,l) =
printf "+-- transformation %s@\n" name;
List.iter (print_goal_stats ~time (depth+1) ses) l
let stats2_of_theory ~nb_proofs cont th =
let stats2_of_theory ~nb_proofs ses th =
List.fold_left
(fun acc g ->
match stats2_of_goal ~nb_proofs cont g with
match stats2_of_goal ~nb_proofs ses g with
| No [] -> acc
| r -> (g,r)::acc)
[] (theory_goals th)
......@@ -283,25 +279,24 @@ let print_theory_stats ~time ses (th,r) =
printf " +-- theory %s@\n" (theory_name th).Ident.id_string;
List.iter (print_goal_stats ~time 2 ses) r
let stats2_of_file ~nb_proofs cont file =
let stats2_of_file ~nb_proofs ses file =
List.fold_left
(fun acc th ->
match stats2_of_theory ~nb_proofs cont th with
match stats2_of_theory ~nb_proofs ses th with
| [] -> acc
| r -> (th,List.rev r)::acc)
[] file.file_theories
[] (file_theories file)
let stats2_of_session ~nb_proofs cont acc =
let ses = cont.Controller_itp.controller_session in
let stats2_of_session ~nb_proofs ses acc =
Hstr.fold
(fun _ f acc ->
match stats2_of_file ~nb_proofs cont f with
match stats2_of_file ~nb_proofs ses f with
| [] -> acc
| r -> (f,List.rev r)::acc)
(get_files ses) acc
let print_file_stats ~time ses (f,r) =
printf "+-- file %s@\n" f.file_name;
printf "+-- file %s@\n" (file_name f);
List.iter (print_theory_stats ~time ses) r
let print_session_stats ~time ses = List.iter (print_file_stats ~time ses)
......@@ -355,10 +350,8 @@ let print_stats ses r0 r1 stats =
printf "@]@\n"
let run_one env config stats r0 r1 fname =
let cont,_,_ =
read_update_session ~allow_obsolete:false env config fname in
let ses = cont.Controller_itp.controller_session in
let run_one stats r0 r1 fname =
let ses,_ = read_session fname in
let sep = if !opt_print0 then Pp.print0 else Pp.newline in
if !opt_print_provers then
printf "%a@."
......@@ -383,9 +376,9 @@ let run_one env config stats r0 r1 fname =
if !opt_stats_print || !opt_hist_print then
begin
(* fill_prover_data stats session; *)
Hstr.iter (stats_of_file stats cont) (get_files ses);
r0 := stats2_of_session ~nb_proofs:0 cont !r0;
r1 := stats2_of_session ~nb_proofs:1 cont !r1
Hstr.iter (stats_of_file stats ses) (get_files ses);
r0 := stats2_of_session ~nb_proofs:0 ses !r0;
r1 := stats2_of_session ~nb_proofs:1 ses !r1
end;
if !opt_stats_print then
begin
......@@ -454,11 +447,11 @@ let print_hist stats =
(****** run on all files ******)
let run () =
let env,config,should_exit1 = read_env_spec () in
let _env,_config,should_exit1 = read_env_spec () in
if should_exit1 then exit 1;
let stats = new_proof_stats () in
let r0 = ref [] and r1 = ref [] in
iter_files (run_one env config stats r0 r1);
iter_files (run_one stats r0 r1);
if !opt_hist_print then print_hist stats
......
......@@ -71,11 +71,14 @@ let read_env_spec () =
let env = Env.create_env loadpath in
env,config,read_simple_spec ()
let read_update_session ~allow_obsolete env config fname =
let read_session fname =
let q = Queue.create () in
Queue.push fname q;
let project_dir = Server_utils.get_session_dir ~allow_mkdir:false q in
let session,use_shapes = S.load_session project_dir in
S.load_session project_dir
let read_update_session ~allow_obsolete env config fname =
let session,use_shapes = read_session fname in
(*
let ctxt = S.mk_update_context
~allow_obsolete_goals:allow_obsolete
......@@ -94,6 +97,7 @@ let read_update_session ~allow_obsolete env config fname =
Format.eprintf "%a@." Exn_printer.exn_printer e;
exit 1
in
if (found_obs || some_merge_miss) && not allow_obsolete then raise Exit;
cont, found_obs, some_merge_miss
(** filter *)
......@@ -209,7 +213,7 @@ let read_filter_spec whyconf : filters * bool =
status = !opt_status;
},!should_exit
let iter_proof_attempt_by_filter cont iter filters f =
let iter_proof_attempt_by_filter ses iter filters f =
(* provers *)
let iter_provers a =
if C.Sprover.mem a.S.prover filters.provers then f a in
......@@ -230,7 +234,7 @@ let iter_proof_attempt_by_filter cont iter filters f =
*)
(* verified_goal *)
let f = three_value f filters.verified_goal
(fun a -> Controller_itp.pn_proved cont a.S.parent) in
(fun a -> S.pn_proved ses a.S.parent) in
(* verified *)
let f = three_value f filters.verified
(fun p -> match p.S.proof_state with Some pr when pr.Call_provers.pr_answer = Call_provers.Valid ->
......@@ -240,17 +244,17 @@ let iter_proof_attempt_by_filter cont iter filters f =
(fun a -> match a.S.proof_state with
| Some pr when List.mem pr.Call_provers.pr_answer filters.status -> f a
| _ -> ()) in
iter f cont.Controller_itp.controller_session
iter f ses
let theory_iter_proof_attempt_by_filter cont filters f th =
let theory_iter_proof_attempt_by_filter s filters f th =
iter_proof_attempt_by_filter
cont
s
(fun f s -> S.theory_iter_proof_attempt s f)
filters f th
let session_iter_proof_attempt_by_filter cont filters f s =
let session_iter_proof_attempt_by_filter s filters f =
iter_proof_attempt_by_filter
cont
s
(fun f _s ->
S.session_iter_proof_attempt (fun _ x -> f x))
filters f s
......
......@@ -44,6 +44,8 @@ val common_options : spec_list
val read_env_spec : unit -> Env.env * Whyconf.config * bool
(** read_simple_spec also *)
val read_session : string -> Session_itp.session * bool
val read_update_session :
allow_obsolete:bool -> Env.env ->
Whyconf.config -> string ->
......@@ -63,14 +65,14 @@ val filter_spec : spec_list
val read_filter_spec : Whyconf.config -> filters * bool
val theory_iter_proof_attempt_by_filter :
Controller_itp.controller ->
Session_itp.session ->
filters ->
(Session_itp.proof_attempt_node -> unit) -> Session_itp.theory -> unit
val session_iter_proof_attempt_by_filter :
Controller_itp.controller ->
Session_itp.session ->
filters ->
(Session_itp.proof_attempt_node -> unit) -> Session_itp.session -> unit
(Session_itp.proof_attempt_node -> unit) -> unit
(* quite ad-hoc *)
......
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