Title
LiquidHaskell: experience with refinement types in the real world
Abstract
Haskell has many delightful features. Perhaps the one most beloved by its users is its type system that allows developers to specify and verify a variety of program properties at compile time. However, many properties, typically those that depend on relationships between program values are impossible, or at the very least, cumbersome to encode within the existing type system. Many such properties can be verified using a combination of Refinement Types and external SMT solvers. We describe the refinement type checker liquidHaskell, which we have used to specify and verify a variety of properties of over 10,000 lines of Haskell code from various popular libraries, including containers, hscolour, bytestring, text, vector-algorithms and xmonad. First, we present a high-level overview of liquidHaskell, through a tour of its features. Second, we present a qualitative discussion of the kinds of properties that can be checked -- ranging from generic application independent criteria like totality and termination, to application specific concerns like memory safety and data structure correctness invariants. Finally, we present a quantitative evaluation of the approach, with a view towards measuring the efficiency and programmer effort required for verification, and discuss the limitations of the approach.
Year
DOI
Venue
2014
10.1145/2633357.2633366
Haskell
Keywords
Field
DocType
standards,refinement types,haskell,verification,smt-based verification
Data structure,ENCODE,Memory safety,Programmer,Programming language,Compile time,Computer science,Correctness,Haskell,Invariant (mathematics)
Conference
Volume
Issue
ISSN
49
12
0362-1340
Citations 
PageRank 
References 
19
0.77
35
Authors
3
Name
Order
Citations
PageRank
Niki Vazou1888.90
Eric L. Seidel2505.15
Ranjit Jhala32183111.68