Skip to content

Commit 5830e49

Browse files
committed
issues with res
1 parent 10b22be commit 5830e49

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

src/ecTyping.ml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3199,12 +3199,13 @@ and trans_form_or_pattern env mode ?mv ?ps ue pf tt =
31993199
@ List.map (fun (xp, ty) -> f_pvar (EcTypes.pv_glob xp) ty mem) pv in
32003200

32013201
map_ss_inv f_tuple res in
3202-
3203-
let x1 = create EcFol.mleft in
3204-
let x2 = create EcFol.mright in
3202+
3203+
let ml, mr = oget (EcEnv.Memory.get_active_ts env) in
3204+
let x1 = ss_inv_generalize_right (create ml) mr in
3205+
let x2 = ss_inv_generalize_left (create mr) ml in
32053206

32063207
unify_or_fail env ue gp.pl_loc ~expct:x1.inv.f_ty x2.inv.f_ty;
3207-
(map_ss_inv2 f_eq x1 x2).inv
3208+
(map_ts_inv2 f_eq x1 x2).inv
32083209
in
32093210
EcFol.f_ands (List.map do1 xs)
32103211

src/phl/ecPhlCall.ml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -368,17 +368,18 @@ let t_call side ax tc =
368368

369369
(* -------------------------------------------------------------------- *)
370370
let mk_inv_spec (_pf : proofenv) env inv fl fr =
371+
let ml, mr = inv.ml, inv.mr in
371372
match NormMp.is_abstract_fun fl env with
372373
| true ->
373374
let (topl, _, _, sigl),
374375
(topr, _, _ , sigr) = EcLowPhlGoal.abstract_info2 env fl fr in
375-
let eqglob = ts_inv_eqglob topl mleft topr mright in
376+
let eqglob = ts_inv_eqglob topl ml topr mr in
376377
let lpre = [eqglob;inv] in
377378
let eq_params =
378379
ts_inv_eqparams
379-
sigl.fs_arg sigl.fs_anames mleft
380-
sigr.fs_arg sigr.fs_anames mright in
381-
let eq_res = ts_inv_eqres sigl.fs_ret mleft sigr.fs_ret mright in
380+
sigl.fs_arg sigl.fs_anames ml
381+
sigr.fs_arg sigr.fs_anames mr in
382+
let eq_res = ts_inv_eqres sigl.fs_ret ml sigr.fs_ret mr in
382383
let pre = map_ts_inv f_ands (eq_params::lpre) in
383384
let post = map_ts_inv f_ands [eq_res; eqglob; inv] in
384385
f_equivF pre fl fr post
@@ -395,9 +396,9 @@ let mk_inv_spec (_pf : proofenv) env inv fl fr =
395396
if not testty then raise EqObsInError;
396397
let eq_params =
397398
ts_inv_eqparams
398-
sigl.fs_arg sigl.fs_anames mleft
399-
sigr.fs_arg sigr.fs_anames mright in
400-
let eq_res = ts_inv_eqres sigl.fs_ret mleft sigr.fs_ret mright in
399+
sigl.fs_arg sigl.fs_anames ml
400+
sigr.fs_arg sigr.fs_anames mr in
401+
let eq_res = ts_inv_eqres sigl.fs_ret ml sigr.fs_ret mr in
401402
let pre = map_ts_inv2 f_and eq_params inv in
402403
let post = map_ts_inv2 f_and eq_res inv in
403404
f_equivF pre fl fr post

src/phl/ecPhlConseq.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,7 @@ let process_conseq notmod ((info1, info2, info3) : conseq_ppterm option tuple3)
14051405
in (penv, qenv, Inv_ts (ef_pr ef), Inv_ts (ef_po ef), tbool, lift_ts_inv2 fmake)
14061406

14071407
| FequivS es ->
1408-
let env = LDecl.push_all [es.es_ml; es.es_mr] hyps in
1408+
let env = LDecl.push_active_ts es.es_ml es.es_mr hyps in
14091409
let fmake pre post c_or_bd =
14101410
ensure_none c_or_bd;
14111411
f_equivS (snd es.es_ml) (snd es.es_mr) pre es.es_sl es.es_sr post

0 commit comments

Comments
 (0)