A Toolchain to Produce Correct-by-Construction OCaml Programs

Jean-Christophe Filliâtre 1 Léon Gondelman 1 Andrei Paskevich 2 Mário Pereira 3 Simão Melo de Sousa 4
2 PROVAL - Proof of Programs
UP11 - Université Paris-Sud - Paris 11, Inria Saclay - Ile de France, CNRS - Centre National de la Recherche Scientifique : UMR
3 TOCCATA - Certified Programs, Certified Tools, Certified Floating-Point Computations
LRI - Laboratoire de Recherche en Informatique, UP11 - Université Paris-Sud - Paris 11, Inria Saclay - Ile de France, CNRS - Centre National de la Recherche Scientifique : UMR8623
Abstract : This paper presents a methodology to get correct-by-construction OCaml programs using the Why3 tool. First, a formal behavioral specification is given in the form of an OCaml module signature extended with type invariants and function contracts, in the spirit of JML. Second, an implementation is written in the programming language of Why3 and then verified with respect to the specification. Finally, an OCaml program is obtained by an automated translation. Our methodology is illustrated with the proof of a union-find library. Several other proofs of data structures and algorithms are included in the companion artifact to this paper.
Document type :
Preprints, Working Papers, ...
Complete list of metadatas

Cited literature [13 references]  Display  Hide  Download

https://hal.inria.fr/hal-01783851
Contributor : Mário José Parreira Pereira <>
Submitted on : Wednesday, May 2, 2018 - 5:19:56 PM
Last modification on : Friday, April 19, 2019 - 4:55:13 PM
Long-term archiving on : Tuesday, September 25, 2018 - 3:42:15 AM

File

main.pdf
Files produced by the author(s)

Identifiers

  • HAL Id : hal-01783851, version 1

Citation

Jean-Christophe Filliâtre, Léon Gondelman, Andrei Paskevich, Mário Pereira, Simão Melo de Sousa. A Toolchain to Produce Correct-by-Construction OCaml Programs. 2018. ⟨hal-01783851⟩

Share

Metrics

Record views

307

Files downloads

219