diff options
author | Enrico Tassi <Enrico.Tassi@inria.fr> | 2014-12-17 10:29:18 +0100 |
---|---|---|
committer | Enrico Tassi <Enrico.Tassi@inria.fr> | 2014-12-17 15:05:05 +0100 |
commit | aaea1138a3a8b90aac0e8f3753a678467af36e72 (patch) | |
tree | 37cc822aae8ccdac2d11ec97382d1c37dac5dfd2 | |
parent | d229d1b2bfa29b94d5f4ee767024f560e85f0380 (diff) |
STM: rename and simplify flags
-rw-r--r-- | lib/flags.ml | 2 | ||||
-rw-r--r-- | lib/flags.mli | 2 | ||||
-rw-r--r-- | stm/stm.ml | 12 | ||||
-rw-r--r-- | toplevel/coqtop.ml | 5 |
4 files changed, 11 insertions, 10 deletions
diff --git a/lib/flags.ml b/lib/flags.ml index 0c6fef8be..9c718743d 100644 --- a/lib/flags.ml +++ b/lib/flags.ml @@ -55,7 +55,7 @@ let async_proofs_cache = ref None let async_proofs_n_workers = ref 1 let async_proofs_n_tacworkers = ref 2 let async_proofs_private_flags = ref None -let async_proofs_always_delegate = ref false +let async_proofs_full = ref false let async_proofs_never_reopen_branch = ref false let async_proofs_flags_for_workers = ref [] let async_proofs_worker_id = ref "master" diff --git a/lib/flags.mli b/lib/flags.mli index 0c922ebb4..fbb2f817a 100644 --- a/lib/flags.mli +++ b/lib/flags.mli @@ -24,7 +24,7 @@ val async_proofs_n_tacworkers : int ref val async_proofs_private_flags : string option ref val async_proofs_is_worker : unit -> bool val async_proofs_is_master : unit -> bool -val async_proofs_always_delegate : bool ref +val async_proofs_full : bool ref val async_proofs_never_reopen_branch : bool ref val async_proofs_flags_for_workers : string list ref val async_proofs_worker_id : string ref diff --git a/stm/stm.ml b/stm/stm.ml index cb7440f4a..deb8193e4 100644 --- a/stm/stm.ml +++ b/stm/stm.ml @@ -969,7 +969,7 @@ end = struct (* {{{ *) Pp.feedback (Feedback.InProgress ~-1); t_assign (`Val pl); record_pb_time t_name t_loc time; - if not !Flags.async_proofs_always_delegate then `End + if not !Flags.async_proofs_full then `End else `Stay(t_states,[States t_states]) | `Fresh, BuildProof { t_assign; t_loc; t_name; t_states }, RespError { e_error_at; e_safe_id = valid; e_msg; e_safe_states } -> @@ -1493,7 +1493,7 @@ end = struct (* {{{ *) QueryTask.({ QueryTask.t_where = prev; t_for = id; t_what = q }, switch) let init () = queue := Some (TaskQueue.create - (if !Flags.async_proofs_always_delegate then 1 else 0)) + (if !Flags.async_proofs_full then 1 else 0)) end (* }}} *) @@ -1511,10 +1511,10 @@ let delegate_policy_check time = if interactive () = `Yes then (Flags.async_proofs_is_master () || !Flags.async_proofs_mode = Flags.APonLazy) && - (time >= 1.0 || !Flags.async_proofs_always_delegate) + (time >= 1.0 || !Flags.async_proofs_full) else if !Flags.compilation_mode = Flags.BuildVi then true else !Flags.async_proofs_mode <> Flags.APoff && - (time >= 1.0 || !Flags.async_proofs_always_delegate) + (time >= 1.0 || !Flags.async_proofs_full) let collect_proof keep cur hd brkind id = prerr_endline ("Collecting proof ending at "^Stateid.to_string id); @@ -1586,7 +1586,7 @@ let collect_proof keep cur hd brkind id = else let rc = collect (Some cur) [] id in if keep == VtKeep && - (not(State.is_cached id) || !Flags.async_proofs_always_delegate) + (not(State.is_cached id) || !Flags.async_proofs_full) then rc else (* we already have the proof, no gain in delaying *) match rc with @@ -1958,7 +1958,7 @@ let process_transaction ?(newtip=Stateid.fresh ()) ~tty verbose c (loc, expr) = assert(Stateid.equal report_id Stateid.dummy); let id = VCS.new_node ~id:newtip () in let queue = - if !Flags.async_proofs_always_delegate then `QueryQueue (ref false) + if !Flags.async_proofs_full then `QueryQueue (ref false) else `MainQueue in VCS.commit id (Cmd { cast = x; cids = []; cqueue = queue }); Backtrack.record (); if w == VtNow then finish (); `Ok diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml index 83d693644..5e5d39ce6 100644 --- a/toplevel/coqtop.ml +++ b/toplevel/coqtop.ml @@ -466,8 +466,9 @@ let parse_args arglist = (* Options with zero arg *) |"-async-queries-always-delegate" - |"-async-proofs-always-delegate" -> - Flags.async_proofs_always_delegate := true; + |"-async-proofs-always-delegate" + |"-async-proofs-full" -> + Flags.async_proofs_full := true; |"-async-proofs-never-reopen-branch" -> Flags.async_proofs_never_reopen_branch := true; |"-batch" -> set_batch_mode () |