~/talk

Implementing OCaml APIs in Coq

Talkat CoqPL 2025 · on Saturday, 2025-01-25· [compilers-and-language-design]
links:none on file
slides:none on file

Extraction is modified to map Coq encodings of OCaml effects to real OCaml exceptions and refs so extracted code matches existing APIs while remaining executable in Coq and OCaml. The repo includes a small library and three worked examples: List.head implemented via an error monad that extracts to OCaml exceptions, a mutable counter using a state module with fixed initial value that extracts to refs, and a stateful term API with fresh-name generation proved correct using reflective VM computation and shallow-state lemmas. Limitations: some manual extraction wiring, dune pre-processing, and client-opacity risks.

AI-written summary · about

  1. 0:00OCaml APIs in Coq intro
  2. 2:29OCaml API challenges in Coq
  3. 5:17Modeling exceptions with error monad
  4. 8:25Handling mutable state in Coq
  5. 10:50Reasoning about stateful computations
  6. 13:58Related work and limits
  7. 15:41Summary and future
  8. 16:06Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.