ACSL (Ansi C Specification Language), is a specification for C code, annotated with special comments, that allows C code to be formally verified.I have not looked into it, but I imagine that the formal methods used in ACSL verifiers would be similar to Hoare Logic. For pure functional languages though, such as Haskell, I can't imagine what sort of formalism would be used for formal verification.Has anyone made something similar to ACSL, but for a pure functional language? If not, has there been any research into specification-annotated style formal verification for functional languages? I know that there's dependent typing, which many languages (Agda, Idris, etc...) support, but in Haskell dependent typing is difficult without doing some (unreadable?) type-wizardry. With that in mind, and since Haskell has so much better library support than Agda and Idris, I believe such a system for functional formal verification might be useful, but I don't know if research has been done on this or not.
Are there any annotated formal verification systems for pure functional programming languages?
lo.logic;pl.programming languages;functional programming;formal methods;haskell
Honda and Yoshida's A Compositional Program Logic for Polymorphic Higher-Order Functions (probably) pioneered Hoare logics for purely functional languages. This work is basedon Hennessy-Milner logic and Milner's encoding of functions into processes, as described here:From Process Logic to Program LogicThe work by Rgis-Gianas et al mentioned in another answer is similar to the first work above by Honda/Yoshida. This has been extended to effectful ML-style languages:An Observationally Complete Program Logic for Imperative Higher-OrderFunctionsA Logical Analysis of Aliasing in Imperative Higher-Order Functions Logical Reasoning For Higher-Order Functions With Local State Program Logics for Sequential Higher-Order ControlProgram Logics for Homogeneous Meta-ProgrammingThe logics mentioned are what is called observationally complete, meaning that the operational and the logical semantics coincide. Arthur Charguraud used this completenssfor his work on verifying functional programs Hoare-style in Coq.