skip to main content
10.1145/2541568.2541569acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
invited-talk

Refinement types for Haskell

Published: 11 January 2014 Publication History

Abstract

We present LiquidHaskell (http://goto.ucsd.edu/liquid), an automatic verifier for Haskell. LiquidHaskell uses Refinement types, a restricted form of dependent types where relationships between values are encoded by decorating types with logical predicates drawn from an efficiently SMT decidable theory (of arithmetic and uninterpreted functions.)
In this talk, we will describe the key ingredients of LiquidHaskell.
First, we will present a rapid overview of refinement types, including SMT solver based (decidable) subtyping, and inference. Decidability is achieved by eschewing the use of arbitrary terms inside types, and the use of indices to encode rich properties of data.
Second, we will show how to recover some of the expressiveness lost by restricting the logic, with two new techniques: measures which encode structural properties of values and abstract refinements which enable generalization (i.e. quantification) over refinements.
Third, we will discuss the curious interaction of laziness and refinement typing. In a nutshell, the technique of refinement typing can be viewed as a type-based generalization of Floyd-Hoare logics. Surprisingly, we demonstrate that under non-strict evaluation, these logics (and hence, classical refinement typing) is unsound, due to the presence of potentially divergent sub-computations. Fortunately, we show how soundness can be recovered with a termination analysis, itself, circularly bootstrapped off refinement typing.
We have used LiquidHaskell to verify safety, functional correctness and termination properties of real-world Haskell libraries totalling mroe than 10,000 lines of code. Time permitting, we will present a demonstration of the tool and a few short case studies illustrating its use.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLPV '14: Proceedings of the ACM SIGPLAN 2014 Workshop on Programming Languages meets Program Verification
January 2014
66 pages
ISBN:9781450325677
DOI:10.1145/2541568
Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author.

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 January 2014

Check for updates

Author Tags

  1. abstract interpretation
  2. dependent types
  3. haskell
  4. liquid types
  5. refinement types
  6. smt
  7. type inference

Qualifiers

  • Invited-talk

Conference

POPL '14
Sponsor:

Acceptance Rates

PLPV '14 Paper Acceptance Rate 5 of 7 submissions, 71%;
Overall Acceptance Rate 18 of 25 submissions, 72%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 19 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2019)Space-Efficient Latent ContractsTrends in Functional Programming10.1007/978-3-030-14805-8_1(3-23)Online publication date: 21-Feb-2019
  • (2017)Polymorphic Manifest Contracts, Revised and ResolvedACM Transactions on Programming Languages and Systems10.1145/299459439:1(1-36)Online publication date: 6-Feb-2017
  • (2016)Parallel type-checking with haskell using saturating LVars and stream generatorsACM SIGPLAN Notices10.1145/3016078.285114251:8(1-12)Online publication date: 27-Feb-2016
  • (2016)Parallel type-checking with haskell using saturating LVars and stream generatorsProceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming10.1145/2851141.2851142(1-12)Online publication date: 27-Feb-2016

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media