Zoo [rocqdoc]
This project is part of the Iris Masterplan. It aims at verifying OCaml 5 programs, including lock-free data structures from Saturn, a lock-free multi-word compare-and-set algorithm from Kcas and a work-stealing scheduler based on Domainslib.
First, you need to install opam (>= 2.0).
To make sure it is up-to-date, run:
opam update --all --repositories
Then, create a new local opam switch and install dependencies with:
opam switch create . --empty --repos default,rocq-released=https://rocq-prover.github.io/opam/released,iris-dev=git+https://gitlab.mpi-sws.org/iris/opam.git --yes
eval $(opam env --switch=. --set-switch)
opam install ./rocq-zoo.opam --deps-only --yes
Finally, to compile Rocq proofs, run:
make
First, you need to install opam (>= 2.0).
To make sure it is up-to-date, run:
opam update --all --repositories
Then, you need to install this custom version of the OCaml compiler featuring generative constructors. Hopefully, it should be merged into the OCaml compiler one day.
The following commands take care of this:
opam switch create . --empty --repos default,rocq-released=https://rocq-prover.github.io/opam/released,iris-dev=git+https://gitlab.mpi-sws.org/iris/opam.git --yes
eval $(opam env --switch=. --set-switch)
opam pin add ocaml-variants git+https://github.com/clef-men/ocaml#generative_constructors --yes
Then, install dependencies including ocaml2zoo with:
opam pin add ocaml2zoo git+https://github.com/clef-men/ocaml2zoo#main --no-action --yes
opam install ocaml2zoo $(find . -depth 1 -name '*.opam' ! -name 'rocq-*') ./rocq-zoo.opam --with-dev-setup --deps-only --yes
opam install ocaml2zoo
To compile OCaml libraries (see lib/), run:
make lib
To compile benchmarks, run:
make bench
To translate OCaml libraries into Zoo (Rocq files are generated in theories/), run:
make ocaml2zoo
Finally, to compile Rocq proofs, run:
make
First, you need to install opam (>= 2.0).
To make sure it is up-to-date, run:
opam update --all --repositories
Then, you need to install this custom version of the OCaml compiler featuring generative constructors. Hopefully, it should be merged into the OCaml compiler one day.
The following commands take care of this:
opam switch create . --empty --repos default,rocq-released=https://rocq-prover.github.io/opam/released,iris-dev=git+https://gitlab.mpi-sws.org/iris/opam.git --yes
eval $(opam env --switch=. --set-switch)
opam pin add ocaml-variants git+https://github.com/clef-men/ocaml#generative_constructors --yes
Then, install dependencies with:
opam install $(find . -depth 1 -name '*.opam' ! -name 'rocq-*') --deps-only --yes
To compile benchmarks, you also need to install benchmark-only dependencies with:
opam install $(find . -depth 1 -name '*.opam' ! -name 'rocq-*') --with-dev-setup --deps-only --yes
To compile OCaml libraries (see lib/), run:
make lib
To compile benchmarks, run:
make bench
Zoo is not available on opam yet, but you can already use it in your Rocq developments by adding the following opam dependency:
pin-depends: [
["rocq-please.dev" "git+https://github.com/clef-men/rocq-please.git#main"]
["rocq-zoo.dev" "git+https://github.com/clef-men/zoo.git#main"]
]
depends: [
"rocq-zoo"
]
To also install the standard library, add:
pin-depends: [
["rocq-please.dev" "git+https://github.com/clef-men/rocq-please.git#main"]
["rocq-zoo.dev" "git+https://github.com/clef-men/zoo.git#main"]
["rocq-zoo-std.dev" "git+https://github.com/clef-men/zoo.git#main"]
]
depends: [
"rocq-zoo-std"
]
See also this example.