핵심 개념
This paper presents a comprehensive, hands-on tutorial on how to apply different verification tools, such as Cameleer and CFML, to formally verify OCaml programs written in both functional and imperative styles.
초록
The paper starts by providing a brief overview of GOSPEL, a behavioral specification language for OCaml code. It then introduces the Cameleer tool, which is used to verify purely functional OCaml programs, such as a merge routine and the "same fringe" problem. The authors then showcase how Cameleer can be used to verify imperative OCaml programs, using the Boyer-Moore majority algorithm as an example.
The paper then delves into the verification of heap-dependent OCaml programs using the CFML tool, which is based on Separation Logic. The authors use the implementation of singly-linked lists as a case study, demonstrating how to specify and verify pointer-manipulating OCaml code.
Throughout the tutorial, the authors emphasize the importance of providing comprehensive, hands-on documentation to promote the adoption of formal methods by the working OCaml programmer community. The paper is accompanied by a companion artifact that includes additional case studies and proofs.
통계
The paper presents three main case studies: a merge routine, the "same fringe" problem, and the Boyer-Moore majority algorithm.
The Cameleer tool is used to verify the functional and imperative OCaml programs, generating a total of 28, 6, and 11 verification conditions, respectively, all of which are discharged in less than one tenth of a second using the Alt-Ergo SMT solver.
The CFML tool is used to verify the singly-linked list implementation, with the proof of the copy function requiring a well-founded induction proof.
인용구
"We claim that functional programming deserves (even) more attention from the formal methods community."
"Cameleer is a tool for the deductive verification of OCaml programs, which has been actively developed over the past four years."
"CFML allows one to reason about OCaml programs mixing higher-order and side-effects, which is known to be a challenge for deductive verification tools."