Melocoton: A Program Logic for Verified Interoperability Between OCaml and C
Armaël Guéneau, Johannes Hostert, Simon Spies, Michael Sammler, Lars Birkedal, Derek Dreyer
Abstract
In recent years, there has been tremendous progress on developing program logics for verifying the correctness of programs in a rich and diverse array of languages. Thus far, however, such logics have assumed that programs are written entirely in a single programming language. In practice, this assumption rarely holds since programs are often composed of components written in different programming languages, which interact with one another via some kind of foreign function interface (FFI). In this paper, we take the first steps towards the goal of developing program logics for multi-language verification. Specifically, we present Melocoton, a multi-language program verification system for reasoning about OCaml, C, and their interactions through the OCaml FFI. Melocoton consists of the first formal semantics of (a large subset of) the OCaml FFI—previously only described in prose in the OCaml manual—as well as the first program logic to reason about the interactions of program components written in OCaml and C. Melocoton is fully mechanized in Coq on top of the Iris separation logic framework.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
9 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Tail Modulo Cons, OCaml, and Relational Separation Logic cites Transfinite Iris: resolving an existential dilemma of step-indexed separation logic
- RefinedC: automating the foundational verification of C code with refined ownership types cites Transfinite Iris: resolving an existential dilemma of step-indexed separation logic
- Formal Foundations for Translational Separation Logic Verifiers cites RefinedC: automating the foundational verification of C code with refined ownership types
- Formal Foundations for Translational Separation Logic Verifiers cites Conditional Contextual Refinement
- RustHornBelt: a semantic foundation for functional verification of Rust programs with unsafe code cites Transfinite Iris: resolving an existential dilemma of step-indexed separation logic
- Program Logics à la Carte cites RefinedC: automating the foundational verification of C code with refined ownership types
- Program Logics à la Carte cites Conditional Contextual Refinement
- Program Logics à la Carte cites An Iris Instance for Verifying CompCert C Programs
- Conditional Contextual Refinement cites CompCertM: CompCert with C-assembly linking and lightweight modular verification
- An Iris Instance for Verifying CompCert C Programs cites Transfinite Iris: resolving an existential dilemma of step-indexed separation logic
- An Iris Instance for Verifying CompCert C Programs cites RefinedC: automating the foundational verification of C code with refined ownership types
Cited by top-tier papers9
- An Iris Instance for Verifying CompCert C ProgramsWilliam Mansky, Ke DuPOPL 2024 · 14 citations
- Formal Foundations for Translational Separation Logic VerifiersThibault Dardinier, Michael Sammler, Gaurav Parthasarathy, Alexander J. Summers et al.POPL 2025 · 8 citations
- Securing Verified IO Programs Against Unverified Code in FCezar-Constantin Andrici, Stefan Ciobaca, Catalin Hritcu, Guido Martínez et al.POPL 2024 · 5 citations
- Tail Modulo Cons, OCaml, and Relational Separation LogicClément Allain, Frédéric Bour, Basile Clément, François Pottier et al.POPL 2025 · 4 citations
- Program Logics à la CarteMax Vistrup, Michael Sammler, Ralf JungPOPL 2025 · 4 citations
Builds on11
- RefinedC: automating the foundational verification of C code with refined ownership typesMichael Sammler, Rodolphe Lepigre, Robbert Krebbers, Kayvan Memarian et al.PLDI 2021 · 83 citations
- CompCertM: CompCert with C-assembly linking and lightweight modular verificationYoungju Song, Minki Cho, Dongjoo Kim, Yonghyun Kim et al.POPL 2020 · 49 citations
- RustHornBelt: a semantic foundation for functional verification of Rust programs with unsafe codeYusuke Matsushita, Xavier Denis, Jacques-Henri Jourdan, Derek DreyerPLDI 2022 · 44 citations
- Transfinite Iris: resolving an existential dilemma of step-indexed separation logicSimon Spies, Lennard Gäher, Daniel Gratzer, Joseph Tassarotti et al.PLDI 2021 · 32 citations
- Conditional Contextual RefinementYoungju Song, Minki Cho, Dongjae Lee, Chung-Kil Hur et al.POPL 2023 · 29 citations
Related papers
- A Relational Separation Logic for Effect HandlersPaulo Emílio de Vilhena, Simcha van Collem, Ines Wright, Robbert KrebbersPOPL 2026 · 3 citations
- Compositional Non-Interference for Fine-Grained Concurrent ProgramsDan Frumin, Robbert Krebbers, Lars BirkedalS&P 2021 · 20 citations
- Iris-Wasm: Robust and Modular Verification of WebAssembly ProgramsXiaojia Rao, Aïna Linn Georges, Maxime Legoupil, Conrad Watt et al.PLDI 2023 · 19 citations
- Actris: session-type based reasoning in separation logicJonas Kastberg Hinrichsen, Jesper Bengtson, Robbert KrebbersPOPL 2020 · 44 citations
- Zoo: A Framework for the Verification of Concurrent OCaml 5 Programs using Separation LogicClément Allain, Gabriel SchererPOPL 2026 · 2 citations
