Skip to content

Commit 63c31d2

Browse files
committed
fix byehoare
1 parent b46c8c7 commit 63c31d2

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

src/phl/ecPhlDeno.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ let t_ehoare_deno_r pre post tc =
9999

100100
let pr = destr_pr f in
101101
let concl_e = f_eHoareF pre pr.pr_fun post in
102-
let mpr, mpo = EcEnv.Fun.hoareF_memenv pr.pr_mem pr.pr_fun env in
102+
let mpr, mpo = EcEnv.Fun.hoareF_memenv pre.m pr.pr_fun env in
103103
(* pre <= bd *)
104104
(* building the substitution for the pre *)
105105
let sargs = PVM.add env pv_arg (fst mpr) pr.pr_args PVM.empty in

tests/byehoare-arg.ec

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
require import AllCore Int Real Xreal.
2+
3+
module M = {
4+
proc main(x : int) = {
5+
return x;
6+
}
7+
}.
8+
9+
lemma L &m (_x : int):
10+
Pr [ M.main(_x) @ &m : _x = res ] <= 1%r.
11+
proof.
12+
byehoare (_: ((arg = _x) `|` (1%xr)) ==> _) => //.
13+
- proc; auto => &hr.
14+
by apply xle_cxr_r => ->.
15+
qed.
16+

0 commit comments

Comments
 (0)