swh:1:snp:ca722f838562be139d7880d2b37d9db111694bf0
Revision 7f08941c82a5d3bdfde6224656f489e5ea6c533b authored by Cameron Low on 19 January 2023, 18:14:06 UTC, committed by Pierre-Yves Strub on 19 January 2023, 21:44:41 UTC
Here is an example of use:

```
require import AllCore.

type t = [
  A of int | B of bool | C
].

module M = {
  proc f(x : t) : int = {
    var y : int <- 0;

    match x with
    | A v => y <- `|v|;
    | B _ => y <- 1;
    | C   => y <- 2;
    end;

    return y;
  }
}.

lemma L : hoare[M.f : true ==> 0 <= res].
proof. by proc; sp; match => [v|b|]; auto=> /> /#. qed.
```
1 parent ba37062
History
Tip revision: 701f4f03c094eb2441f511fed1df042080fdf34e authored by Cameron Low on 20 January 2023, 18:18:02 UTC
Unify created variables correctly.
Tip revision: 701f4f0
File Mode Size
.github
config
examples
lint
scripts
src
theories
.dir-locals.el -rw-r--r-- 285 bytes
.gitignore -rw-r--r-- 118 bytes
AUTHORS -rw-r--r-- 543 bytes
LICENSE -rw-r--r-- 1.2 KB
Makefile -rw-r--r-- 1.2 KB
README.md -rw-r--r-- 7.7 KB
default.nix -rw-r--r-- 961 bytes
dune -rw-r--r-- 221 bytes
dune-project -rw-r--r-- 432 bytes
easycrypt.opam -rw-r--r-- 1.2 KB
easycrypt.opam.template -rw-r--r-- 915 bytes
easycrypt.png -rw-r--r-- 182.6 KB

README.md

back to top