Skip to content

Commit f68f86d

Browse files
committed
Fix error msg + used memory
1 parent f4ade94 commit f68f86d

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/phl/ecPhlPrRw.ml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,12 @@ let t_pr_rewrite_low (s, (dof: (_ -> _ -> _ -> ss_inv) option)) tc =
253253
(* Check that k and d do not reference the post-execution memory.
254254
Otherwise the rewrite is unsound: the event `res = k` would use
255255
k from the post-state, but `mu1 d k` treats k as a constant. *)
256-
let post_mem = Mid.singleton k.m () in
257-
if not (Mid.set_disjoint k.inv.f_fv post_mem) then
256+
if Mid.mem k.m k.inv.f_fv then
258257
tc_error !!tc
259-
"Pr-rewrite: the value compared to res must not depend on \
260-
the post-execution memory";
261-
if not (Mid.set_disjoint d.inv.f_fv post_mem) then
258+
"Pr-rewrite: the value compared to res must not depend on memories";
259+
if Mid.mem d.m d.inv.f_fv then
262260
tc_error !!tc
263-
"Pr-rewrite: the distribution must not depend on \
264-
the post-execution memory";
261+
"Pr-rewrite: the distribution must not depend on memories";
265262
(pr_mu1_le_eq_mu1 pr_mem pr_fun pr_args resv k.inv k_id d.inv, 2)
266263

267264
| (`MuEq | `MuSub as kind) -> begin

0 commit comments

Comments
 (0)