Skip to content

Commit 52649f5

Browse files
authored
address TODOs from memory softcoding PR (#817)
1 parent c063e99 commit 52649f5

File tree

4 files changed

+0
-19
lines changed

4 files changed

+0
-19
lines changed

src/ecAst.ml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,6 @@ type inv =
466466
| Inv_ss of ss_inv
467467
| Inv_ts of ts_inv
468468

469-
(* TODO: Get rid of this after refactor *)
470469
let inv_of_inv (inv: inv) : form =
471470
match inv with
472471
| Inv_ss ss -> ss.inv
@@ -502,20 +501,6 @@ let lift_ts_inv2 (f: ts_inv -> ts_inv -> 'a) : inv -> inv -> 'a =
502501
| _ -> failwith "expected only two sided invariants" in
503502
f
504503

505-
(* TODO: This should be removed after refactor is done *)
506-
let lift_inv_adapter (f: form -> 'a) : inv -> 'a =
507-
let f inv = match inv with
508-
| Inv_ss ss -> f ss.inv
509-
| Inv_ts ts -> f ts.inv in
510-
f
511-
512-
let lift_inv_adapter2 (f: form -> form -> 'a) : inv -> inv -> 'a =
513-
let f inv1 inv2 = match inv1, inv2 with
514-
| Inv_ss ss1, Inv_ss ss2 -> f ss1.inv ss2.inv
515-
| Inv_ts ts1, Inv_ts ts2 -> f ts1.inv ts2.inv
516-
| _ -> failwith "expected compatible invariants" in
517-
f
518-
519504
let ss_inv_generalize_left (inv: ss_inv) (m: memory) : ts_inv =
520505
{ ml = m; mr = inv.m; inv = inv.inv }
521506

src/ecAst.mli

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,6 @@ val lift_ss_inv2 : (ss_inv -> ss_inv -> 'a) -> inv -> inv -> 'a
373373
val lift_ss_inv3 : (ss_inv -> ss_inv -> ss_inv -> 'a) -> inv -> inv -> inv -> 'a
374374
val lift_ts_inv : (ts_inv -> 'a) -> inv -> 'a
375375
val lift_ts_inv2 : (ts_inv -> ts_inv -> 'a) -> inv -> inv -> 'a
376-
val lift_inv_adapter : (form -> 'a) -> inv -> 'a
377-
val lift_inv_adapter2 : (form -> form -> 'a) -> inv -> inv -> 'a
378376

379377
val ss_inv_generalize_left : ss_inv -> memory -> ts_inv
380378
val ss_inv_generalize_right : ss_inv -> memory -> ts_inv

src/phl/ecPhlConseq.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,6 @@ let rec t_hi_conseq notmod f1 f2 f3 tc =
10241024
let m,hi,hh, h0 =
10251025
as_seq4 (LDecl.fresh_ids (FApi.tc1_hyps tc) ["&m";"_";"_";"_"]) in
10261026
let pre = map_ss_inv2 f_and (bhs_pr hs) (hs_pr hs2) in
1027-
(* TODO: dubious *)
10281027
let mpre = Fsubst.f_subst_mem pre.m m pre.inv in
10291028
let post1 = (bhs_po hs0) in
10301029
let post = (bhs_po hs) in

src/phl/ecPhlPr.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ let process_ppr info tc =
8989
let ef = tc1_as_equivF tc in
9090
let qenvl = snd (LDecl.hoareF ef.ef_ml ef.ef_fl hyps) in
9191
let qenvr = snd (LDecl.hoareF ef.ef_mr ef.ef_fr hyps) in
92-
(* TODO: These should be one-sided *)
9392
let phi1 = TTC.pf_process_form_opt !!tc qenvl None phi1 in
9493
let phi2 = TTC.pf_process_form_opt !!tc qenvr None phi2 in
9594
if not (EcReduction.EqTest.for_type (LDecl.toenv hyps) phi1.f_ty phi2.f_ty) then

0 commit comments

Comments
 (0)