Lune

POPL2020Top-tier venue

Liquidate your assets: reasoning about resource usage in liquid Haskell

Martin A. T. Handley, Niki Vazou, Graham Hutton

Abstract

Liquid Haskell is an extension to the type system of Haskell that supports formal reasoning about program correctness by encoding logical properties as refinement types. In this article, we show how Liquid Haskell can also be used to reason about program efficiency in the same setting. We use the system's existing verification machinery to ensure that the results of our cost analysis are valid, together with custom invariants for particular program contexts to ensure that the results of our analysis are precise. To illustrate our approach, we analyse the efficiency of a wide range of popular data structures and algorithms, and in doing so, explore various notions of resource usage. Our experience is that reasoning about efficiency in Liquid Haskell is often just as simple as reasoning about correctness, and that the two can naturally be combined.

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

12 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

its abstract · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • A cost-aware logical framework cites A unifying type-theory for higher-order (amortized) cost analysis
  • CAMP: cost-aware multiparty session protocols cites Statically verified refinements for multiparty protocols
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers12

  1. Thunks and Debits in Separation Logic with Time CreditsFrançois Pottier, Armaël Guéneau, Jacques-Henri Jourdan, Glen MévelPOPL 2024 · 44 citations
  2. Statically verified refinements for multiparty protocolsFangyi Zhou, Francisco Ferreira, Raymond Hu, Rumyana Neykova et al.OOPSLA 2020 · 38 citations
  3. A unifying type-theory for higher-order (amortized) cost analysisVineet Rajani, Marco Gaboardi, Deepak Garg, Jan HoffmannPOPL 2021 · 26 citations
  4. A cost-aware logical frameworkYue Niu, Jonathan Sterling, Harrison Grodin, Robert HarperPOPL 2022 · 23 citations
  5. CAMP: cost-aware multiparty session protocolsDavid Castro-Perez, Nobuko YoshidaOOPSLA 2020 · 16 citations

Related papers

  1. Verifying replicated data types with typeclass refinements in Liquid HaskellYiyun Liu, James Parker, Patrick Redmond, Lindsey Kuper et al.OOPSLA 2020 · 24 citations
  2. PLEX: Normalization for Refinement TypesAlessio Ferrarini, Niki Vazou, Wouter SwierstraOOPSLA 2026
  3. Neurosymbolic Modular Refinement Type InferenceGeorgios Sakkas, Pratyush Sahu, Kyeling Ong, Ranjit JhalaICSE 2025 · 1 citation
  4. Quotient Haskell: Lightweight Quotient Types for AllBrandon Hewer, Graham HuttonPOPL 2024 · 3 citations
  5. Data flow refinement type inferenceZvonimir Pavlinovic, Yusen Su, Thomas WiesPOPL 2021 · 15 citations
Dusk over the sea between two cliffs drawn in fine vertical lines