For documentation on how to use Pulse, see https://fstar-lang.org/tutorial/book/pulse/pulse.html#pulse-proof-oriented-programming-in-concurrent-separation-logic
- Z3 4.13.3 (exactly this version)
- OCaml 4.10 or higher
- GNU Make
- A GCC-compatible compiler
- F* 2023.04.15 or higher (installed via opam or via its source. A binary package is unlikely to work, since Pulse needs to dynamically load a plugin.)
- Karamel, but only if you are interested in extracting to C. If you are only interested in verifying Pulse code, or extracting to OCaml, then Karamel is not needed.
- Rust and the bindgen-cli crate are required to build pulse2rust.
If you would like to skip this, set the environment variable
PULSE_NO_RUST
to something non-empty.
- Make sure
fstar.exe
is in yourPATH
. If F* was installed with opam, you may need to runeval $(opam env)
. If F* is not in yourPATH
, set theFSTAR_EXE
environment variable to the location of fstar.exe. - Run
make
(possibly with-j
). This will generate a local installation under theout/
subdirectory, identical to the ones created by the other options below.
- Follow the instructions above to build Pulse from the source.
- Install with
PREFIX=<your prefix> make install
. By default,PREFIX
will be set to/usr/local
, as per the UNIX custom.
-
Clone the F* repository and install F* with
opam install <path to FStar>/./fstar.opam
. This will build F* and all of its dependencies (including Z3)(Right now the F* release on the opam package repository is too old. Once version 2023.04.15 or later is made available on the opam repository, cloning the F* repository will no longer be necessary, and
opam install fstar
should be enough for this step.) -
Build and install Pulse with
opam install ./pulse.opam
In your F* project, simply add --include XYZ/lib/pulse
to your
Makefile invocations (and possibly VS code configs), where XYZ
is the
location where Pulse was installed (depending on the alternatives above,
e.g. it would be $PWD/out
for a local install).
Pulse consists of both an F* plugin and a library. F* will automatically
attempt to load the Pulse plugin whenever required, that is when a #lang-pulse
directive is processed. The checked files are also under that directory, and
are automatically picked up.
If you want to contribute to Pulse, please read CONTRIBUTING.md