Implementing OCaml APIs in Coq
This program is tentative and subject to change.
Extraction is a good way to produce verified programs; the extracted code can be linked with hand-written OCaml to produce an executable. But this is not sufficient to implement (stateful, exception-throwing) OCaml APIs, whose types and behavior must be preserved exactly for client compatibility. We propose a lightweight design pattern for implementing such functions by carefully modifying extraction to provide support for features such as exceptions and mutable state. The resulting programs are executable both within Coq and in OCaml, exactly matching the expected OCaml interface. We provide a small library to enable programming with this pattern and demonstrate on 3 examples: a subset of OCaml’s List library, a mutable counter, and a stateful term API that generates unique variable names for α-conversion and safe substitution.
This program is tentative and subject to change.
Sat 25 JanDisplayed time zone: Mountain Time (US & Canada) change
09:00 - 10:30 | |||
09:00 50mKeynote | Elpi: rule-based meta-languge for Rocq CoqPL Enrico Tassi INRIA | ||
09:50 20mTalk | Implementing OCaml APIs in Coq CoqPL Joshua M. Cohen Princeton University | ||
10:10 20mTalk | Towards general white-box automation: a typeclass-guided context cleaner CoqPL Thibaut Pérami University of Cambridge |