vix.ing · top · new · best · stats

System FR: formalized foundations for the stainless verifier

2019/04/30 by Jad Hamza, Nicolas Voirol, Viktor Kunčak · 29 citations
Computer Science · #Automated theorem proving #Data structure #Formal Methods in Verification #Functional programming #Gas meter prover #HOL #Logic, programming, and type systems #Monad (category theory) #Proof assistant #Rewriting #Satisfiability modulo theories #Security and Verification in Computing #Soundness #cs.LO

paper · pdf · doi:10.1145/3360592

published in Proceedings of the ACM on Programming Languages 3(OOPSLA), 1-30 (Association for Computing Machinery)

openalex created_date 2019/04/11 · openalex publication_date 2019/10/10 · arxiv created 2020/03/24 · arxiv updated 2020/03/25 · openalex updated_date 2026/08/06

Abstract

We present the design, implementation, and foundation of a verifier for higher-order functional programs with generics and recursive data types. Our system supports proving safety and termination using preconditions, postconditions and assertions. It supports writing proof hints using assertions and recursive calls. To formalize the soundness of the system we introduce System FR, a calculus supporting System F polymorphism, dependent refinement types, and recursive types (including recursion through contravariant positions of function types). Through the use of sized types, System FR supports reasoning about termination of lazy data structures such as streams. We formalize a reducibility argument using the Coq proof assistant and prove the soundness of a type-checker with respect to call-by-value semantics, ensuring type safety and normalization for typeable programs. Our program verifier is implemented as an alternative verification-condition generator for the Stainless tool, which relies on the Inox SMT-based solver backend for automation. We demonstrate the efficiency of our approach by verifying a collection of higher-order functional programs comprising around 14000 lines of polymorphic higher-order Scala code, including graph search algorithms, basic number theory, monad laws, functional data structures, and assignments from popular Functional Programming MOOCs.

Citations

Cited by