Skip to content

Runtime assertion checking based on Gospel specifications

License

Notifications You must be signed in to change notification settings

naomiiiiiiiii/stm_ortac

This branch is 20 commits ahead of, 680 commits behind ocaml-gospel/ortac:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bbb5b38 · Sep 7, 2022
Aug 14, 2022
Sep 7, 2022
Sep 7, 2022
Jun 2, 2022
Sep 18, 2020
Mar 29, 2022
Apr 19, 2022
Sep 18, 2020
Sep 18, 2020
Sep 7, 2022
Jun 2, 2022
Jun 2, 2022
Jun 2, 2022
Aug 14, 2022

Repository files navigation

ortac - OCaml Runtime Assertion Checking.

Disclamer: This project is still experimental. No support will be provided at this point, and its behaviour is still unstable.

Installation

opam pin add -y https://github.com/ocaml-gospel/gospel.git
opam pin add -y https://github.com/ocaml-gospel/ortac.git
opam install ortac

STM Tests

Create an STM test

Start on OCaml 4.14.0.

If path/api.mli is a file annotated with Gospel specifications, running

~/stm_ortac/bin >> dune build 
~/stm_ortac/bin >> dune exec -- ./cli.exe --frontend=STM path/api.mli > outpath/run_test.ml

will fill the file outpath/run_test.ml with a module that tests the functions specified in path/api.mli.

To run the tests in run_test.ml, do

~/outpath >> opam exec --switch=5.1.0+trunk -- dune build
~/outpath >> opam exec --switch=5.1.0+trunk -- dune exec ./run_test.exe

To satisfy dependencies (and suppress useless warnings), the dune file in outpath must be of the form:

(executable
 (name run_test)
(preprocess (pps ppx_deriving.show ))
 (libraries multicorecheck.stm qcheck-core qcheck zarith)
)
(env
  (dev
    (flags (:standard -w -26 -w -27 -w -32))))

About

Runtime assertion checking based on Gospel specifications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • OCaml 99.9%
  • Standard ML 0.1%