ICFP 2024
Mon 2 - Sat 7 September 2024 Milan, Italy
Sat 7 Sep 2024 11:45 - 12:07 at Orange 2 - OCaml developer experience Chair(s): Gabriel Radanne

Suppose we are given two OCaml modules implementing the same signature. How do we check that they are observationally equivalent—that is, that they behave the same on all inputs? One established technique is to use a property-based testing (PBT) tool such as QuickCheck. Currently, however, this can require significant amounts of boilerplate code and ad-hoc test harnesses.

To address this issue, We present Mica, an automated tool for testing observational equivalence of OCaml modules. Mica is implemented as a PPX compiler extension, allowing users to supply minimal annotations to a module signature. These annotations guide Mica to automatically derive specialized PBT code that checks observational equivalence. We discuss the design of Mica and demonstrate its efficacy as a testing tool on various modules taken from real-world OCaml libraries.

Paper (ocaml2024-final8.pdf)528KiB

Sat 7 Sep

Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change