aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2015-03-27 12:02:30 +0100
committerGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2015-03-27 12:02:39 +0100
commita5a333ddbf5c27320e767ca0611caf8a821449aa (patch)
treee3fd61a0d562fa5114267c4edcf9cd5828f38ac1
parent0da60299fa3abd4a84c7c673fa8f9ed202c84188 (diff)
STM: refine the notion of "simply a tactic"
When a worker sends back a system state to master, it tries to just send a delta. If the command is a simple tactic, then only the proof state changes. Now, what is a simple tactic? 1. a tactic 2. that does not change the environment Check 1. was surely incomplete. Now it is: VernacSolve _ | VernacFocus _ | VernacUnfocus | VernacBullet _ Is it complete?
-rw-r--r--stm/stm.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/stm/stm.ml b/stm/stm.ml
index 9e30cbbcd..477ca1f0d 100644
--- a/stm/stm.ml
+++ b/stm/stm.ml
@@ -1093,6 +1093,9 @@ end = struct (* {{{ *)
let perform_states query =
if query = [] then [] else
+ let is_tac = function
+ | VernacSolve _ | VernacFocus _ | VernacUnfocus | VernacBullet _ -> true
+ | _ -> false in
let initial =
let rec aux id =
try match VCS.visit id with { next } -> aux next
@@ -1110,8 +1113,8 @@ end = struct (* {{{ *)
if State.is_cached id then Some (State.get_cached id) else None in
match prev, this with
| _, None -> None
- | Some (prev, o, `Cmd { cast = { expr = VernacSolve _ }}), Some n
- when State.same_env o n -> (* A pure tactic *)
+ | Some (prev, o, `Cmd { cast = { expr }}), Some n
+ when is_tac expr && State.same_env o n -> (* A pure tactic *)
Some (id, `Proof (prev, State.proof_part_of_frozen n))
| Some _, Some s ->
msg_warning (str "Sending back a fat state");