Skip to content

Commit 1ebd033

Browse files
oskgostrub
authored andcommitted
also swap memory types when swapping memories
1 parent 66eb0f0 commit 1ebd033

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/phl/ecPhlSym.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let t_equivS_sym tc =
2020
let (ml, mtl), (mr, mtr) = es.es_ml, es.es_mr in
2121
let pr = {ml;mr;inv=(ts_inv_rebind (es_pr es) mr ml).inv} in
2222
let po = {ml;mr;inv=(ts_inv_rebind (es_po es) mr ml).inv} in
23-
let cond = f_equivS mtl mtr pr es.es_sr es.es_sl po in
23+
let cond = f_equivS mtr mtl pr es.es_sr es.es_sl po in
2424
FApi.xmutate1 tc `EquivSym [cond]
2525

2626
(*-------------------------------------------------------------------- *)

tests/symmetry.ec

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module M = {
2+
proc f() = {
3+
var f : int;
4+
5+
f <- 0;
6+
}
7+
8+
proc g() = {}
9+
}.
10+
11+
equiv toto: M.g ~ M.f: true ==> ={res}.
12+
proof.
13+
proc. symmetry.
14+
conseq (:true ==> true) (: true ==> f=0).
15+
abort.

0 commit comments

Comments
 (0)