Seaurchin is a frontend for Seahorn to verify Rust programs using bounded model checking.
You will need the following software
- Docker - Please follow instructions at https://docs.docker.com/get-docker/ for your platform
- Seahorn - Please follow instructions at https://github.com/seahorn/seahorn/tree/dev10#developers-zone
- Clone the repo
git clone https://github.com/priyasiddharth/seaurchin.git && cd seaurchin
- Set
SEAHORN_ROOT.
INFO: Your SEAHORN_ROOT may be different
export SEAHORN_ROOT=$HOME/seahorn/seahorn/build-dbg/run
- Run verification job
INFO: The first run will download the docker image. It will take ~5 minutes.
./urchin rpf --command=bpf seahorn/jobs/mult_no_overflow/
- Run verification job (verbose). This is useful to see compilation errors.
./urchin rpf --command=bpf seahorn/jobs/mult_no_overflow/ -v1
- For some verification jobs, the verification entry point is a
test.
./urchin rpf seahorn/jobs/refcell_panic/ --test test_nopanic
libstdis bundled inseahorn/lib/toolchain/.... This is the standard library used by verification jobs.- We use
xargoto compile the standard library and then use the compiled artifacts to further compile the verification job. libstdcompilation artifacts are cached in the.xargodirectory (at root of repo, wherecargo-verifyscript lives).- If the cache gets stale, e.g. when one changes
libstdsource, then the.xargodirectory must be removed. NOTE: The first verification job to be run will compilelibstdwhich will take some time, subsequent runs will use the cache and be faster.
- The
urchinscript should always be started from a directory which is a parent to all the code (main project, local dependencies).- This is because we only
$PWDis mounted on docker rather than a large surface area like$HOME.
- This is because we only
- The
urchinscript will look forCargo.tomlin the given directory. - The docker build script and Rust verification tools are here.