Hostname: page-component-77f85d65b8-6c7dr Total loading time: 0 Render date: 2026-04-21T13:21:40.145Z Has data issue: false hasContentIssue false

Ready, Set, Verify! Applying hs-to-coq to real-world Haskell code

Part of: ICFP2018

Published online by Cambridge University Press:  26 February 2021

JOACHIM BREITNER
Affiliation:
DFINITY Stiftung, Zug, Switzerland (e-mail: joachim@dfinity.org)
ANTAL SPECTOR-ZABUSKY
Affiliation:
University of Pennsylvania, Philadelphia, USA (e-mail: antals@cis.upenn.edu)
YAO LI
Affiliation:
University of Pennsylvania, Philadelphia, USA (e-mail: liyao@cis.upenn.edu)
CHRISTINE RIZKALLAH
Affiliation:
University of New South Wales, Sydney, Australia (e-mail: c.rizkallah@unsw.edu.au)
JOHN WIEGLEY
Affiliation:
DFINITY Stiftung, Zug, Switzerland (e-mail: john@dfinity.org)
JOSHUA COHEN
Affiliation:
University of Pennsylvania, Philadelphia, USA (e-mail: joscoh@sas.upenn.edu)
STEPHANIE WEIRICH
Affiliation:
University of Pennsylvania, Philadelphia, USA (e-mail: sweirich@cis.upenn.edu)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

Good tools can bring mechanical verification to programs written in mainstream functional languages. We use hs-to-coq to translate significant portions of Haskell’s containers 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 hs-to-coq to handle partiality, and – since we found no bugs – attest to the superb quality of well-tested functional code.

Information

Type
Research Article
Copyright
© The Author(s), 2021. Published by Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.