Skip to content

Commit 72b48e4

Browse files
committed
push two sided actives when processing prhl formula
1 parent e01a66e commit 72b48e4

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

src/ecProofTyping.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ let tc1_process_prhl_form_opt tc oty pf =
107107
| _ -> assert false
108108
in
109109

110-
let hyps = LDecl.push_all [ml; mr] hyps in
110+
let hyps = LDecl.push_active_ts ml mr hyps in
111111
let mv = Msym.of_list [("pre", pr); ("post", po)] in
112112
let f = pf_process_form_opt ~mv !!tc hyps oty pf in
113113
let ml, mr = fst ml, fst mr in

src/phl/ecPhlDeno.ml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ let t_core_phoare_deno pre post tc =
4242
match concl.f_node with
4343
| Fapp ({f_node = Fop (op, _)}, [f; bd])
4444
when is_pr f && EcPath.p_equal op EcCoreLib.CI_Real.p_real_le ->
45-
(FHle, f, bd, fun ev -> map_ss_inv2 f_imp_simpl ev post)
45+
(FHle, f, bd, fun ev po -> map_ss_inv2 f_imp_simpl ev po)
4646

4747
| Fapp ({f_node = Fop (op, _)}, [bd; f])
4848
when is_pr f && EcPath.p_equal op EcCoreLib.CI_Real.p_real_le ->
49-
(FHge, f, bd, fun ev -> map_ss_inv2 f_imp_simpl post ev)
49+
(FHge, f, bd, fun ev po -> map_ss_inv2 f_imp_simpl po ev)
5050

5151
| Fapp ({f_node = Fop (op, _)}, [f; bd])
5252
when is_pr f && EcPath.p_equal op EcCoreLib.CI_Bool.p_eq ->
53-
(FHeq, f, bd, map_ss_inv2 f_iff_simpl post)
53+
(FHeq, f, bd, map_ss_inv2 f_iff_simpl)
5454

5555
| _ -> tc_error !!tc "invalid goal shape"
5656
in
@@ -65,11 +65,10 @@ let t_core_phoare_deno pre post tc =
6565
let concl_pr = Fsubst.f_subst smem ((PVM.subst env sargs) pre.inv) in
6666

6767
(* building the substitution for the post *)
68-
(* FIXME:
69-
* let smem_ = Fsubst.f_bind_mem Fsubst.f_subst_id mhr mhr in
70-
* let ev = Fsubst.f_subst smem_ ev in *)
71-
let me = EcEnv.Fun.actmem_post m fun_ in
72-
let concl_po = EcSubst.f_forall_mems_ss_inv me (concl_post pr.pr_event) in
68+
let ev = pr.pr_event in
69+
let me = EcEnv.Fun.actmem_post ev.m fun_ in
70+
let post = ss_inv_rebind post ev.m in
71+
let concl_po = EcSubst.f_forall_mems_ss_inv me (concl_post ev post) in
7372

7473
FApi.xmutate1 tc `HlDeno [concl_e; concl_pr; concl_po]
7574

0 commit comments

Comments
 (0)