Affiliation:
1. University of Pennsylvania, USA
2. UNSW, Australia
3. BAE Systems, USA
Abstract
Good tools can bring mechanical verification to programs written in mainstream functional languages. We use <pre>hs-to-coq</pre> to translate significant portions of Haskell’s <pre>containers</pre> library into Coq, and verify it against specifications that we derive from a variety of sources including type class laws, the library’s test suite, and interfaces from Coq’s standard library. Our work shows that it is feasible to verify mature, widely-used, highly optimized, and unmodified Haskell code. We also learn more about the theory of weight-balanced trees, extend <pre>hs-to-coq</pre> to handle partiality, and – since we found no bugs – attest to the superb quality of well-tested functional code.
Funder
National Science Foundation
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference25 articles.
1. Implementing sets efficiently in a functional language;Adams Stephen;Research Report CSTR,1992
2. Position paper: the science of deep specification;Appel Andrew W.;Philosophical Transactions of the Royal Society of London A: Mathematical, Physical and Engineering Sciences,2017
3. A Brief Overview of Agda – A Functional Language with Dependent Types
4. Edwin Brady. 2017. Type-driven Development With Idris. Manning. Edwin Brady. 2017. Type-driven Development With Idris. Manning.
5. Ready, set, verify! applying hs-to-coq to real-world Haskell code (experience report)
Cited by
18 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Translation certification for smart contracts;Science of Computer Programming;2024-03
2. Verified Inlining and Specialisation for PureCake;Lecture Notes in Computer Science;2024
3. Flexible Instruction-Set Semantics via Abstract Monads (Experience Report);Proceedings of the ACM on Programming Languages;2023-08-30
4. PureCake: A Verified Compiler for a Lazy Functional Language;Proceedings of the ACM on Programming Languages;2023-06-06
5. Formalising Decentralised Exchanges in Coq;Proceedings of the 12th ACM SIGPLAN International Conference on Certified Programs and Proofs;2023-01-11