Skip to content

Commit 86c4195

Browse files
committed
Update examples
1 parent 07155c0 commit 86c4195

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/exception.ec

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
require import AllCore.
22

3-
exception toto.
4-
exception tata.
3+
exception e1.
4+
exception e2.
55

66
module M ={
77
proc truc (x:int) : int = {
88
if (x = 3) {
9-
raise toto;
9+
raise e1;
1010
} else { x <- 5; }
1111
return x;
1212
}
1313
}.
1414

1515
lemma truc (_x: int):
16-
hoare [M.truc : _x = x ==> (4 < res) | toto:(_x = 3) | tata:(false) ].
16+
hoare [M.truc : _x = x ==> (4 < res) | e1:_x = 3 | e2:false ].
1717
proof.
1818
proc.
1919
conseq (: _ ==> x = 5).
@@ -78,7 +78,6 @@ hoare [M'.truc : p8 ==> q3 | assume:q1 |assert: q2 ].
7878
admitted.
7979

8080

81-
(*Conseq is brocken, should take into account the post of exception*)
8281
lemma assert_assume' :
8382
hoare [M'.truc : p9 ==> p4 | assume:p6 |assert: p5 ].
8483
proof.

0 commit comments

Comments
 (0)