aboutsummaryrefslogtreecommitdiff
path: root/stm
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2020-03-26 02:26:43 -0400
committerEmilio Jesus Gallego Arias2020-03-31 05:16:22 -0400
commitb755869a7fdb34dcf7dacc9d5fd93c768d71d751 (patch)
tree68eb026dc0f9e214afcb44739e2c617d3d5f8be6 /stm
parent5828dffb05022ff667f44b1ad9a89f677647e0b4 (diff)
[proof] Split delayed and regular proof closing functions, part II
We make the types of the delayed / non-delayed declaration path different, as the latter is just creating futures that are forced right away. TTBOMK the new code should behave identically w.r.t. old one, modulo the equation `Future.(force (from_val x)) = x`. There are some questions as what the code is doing, but in this PR I've opted to keep the code 100% faithful to the original one, unless I did a mistake.
Diffstat (limited to 'stm')
-rw-r--r--stm/stm.ml10
1 files changed, 6 insertions, 4 deletions
diff --git a/stm/stm.ml b/stm/stm.ml
index 62556d38ff..ba8eba0eed 100644
--- a/stm/stm.ml
+++ b/stm/stm.ml
@@ -1668,7 +1668,7 @@ end = struct (* {{{ *)
(* The original terminator, a hook, has not been saved in the .vio*)
let proof, _info =
- PG_compat.close_proof ~opaque ~keep_body_ucst_separate:true (fun x -> x) in
+ PG_compat.close_proof ~opaque ~keep_body_ucst_separate:true in
let info = Lemmas.Info.make () in
@@ -2518,9 +2518,11 @@ let known_state ~doc ?(redefine_qed=false) ~cache id =
| VtKeepOpaque -> Opaque | VtKeepDefined -> Transparent
| VtKeepAxiom -> assert false
in
- Some(PG_compat.close_proof ~opaque
- ~keep_body_ucst_separate:false
- (State.exn_on id ~valid:eop)) in
+ try Some (PG_compat.close_proof ~opaque ~keep_body_ucst_separate:false)
+ with exn ->
+ let iexn = Exninfo.capture exn in
+ Exninfo.iraise (State.exn_on id ~valid:eop iexn)
+ in
if keep <> VtKeep VtKeepAxiom then
reach view.next;
let wall_clock2 = Unix.gettimeofday () in