I’m delighted to announce the initial release of Mica, a PPX deriver that automates differential testing for a pair of OCaml modules implementing the same signature. Users annotate module signatures with the directive [@@deriving_inline mica]
, and at compile-time, Mica derives specialized property-based testing (PBT) code that checks if two modules implementing the signature are observationally equivalent. (Under the hood, Mica uses Jane Street’s Core.Quickcheck
PBT library.)
Mica was presented at the OCaml Workshop '24 (paper) and the ICFP '23 SRC (poster).
Note: Mica is currently a research tool and should not be used in production code.
Mica is available on Opam:
opam update
opam install ppx_mica
(OCaml 5.1 or newer is required.)
Docs are available here, and a simple web app demo-ing Mica is available here.
Feedback & contributions are very welcome!