Lightweight Testing of Persistent Amortized Time Complexity in the Credit Monad
Persistent data structures are ubiquitous in functional programming languages and their designers frequently have to reason about amortized time complexity. But proving amortized bounds is difficult in a persistent setting, and pen-and-paper proofs give little assurance of correctness, while a full mechanization in a proof assistant can be too involved for the casual user. In this work, we define a strict domain specific language (DSL) for testing the amortized time complexity of persistent data structures using QuickCheck. Our DSL can give strong evidence of correctness, while imposing minimal overhead on the user. We have implemented all lazy data structures in Okasaki’s book in our DSL and have checked their amortized time complexity. We have also discovered and fixed a previously unreported gap in the analysis of persistent Finger Trees.
Thu 16 OctDisplayed time zone: Perth change
10:30 - 12:15 | |||
10:30 5mDay opening | Welcome Haskell | ||
10:35 30mResearch paper | Freer Arrows and Why You Need Them in Haskell Haskell Grant VanDomelen Portland State University, USA, Gan Shen University of California at Santa Cruz, Lindsey Kuper University of California, Santa Cruz, Yao Li Portland State University DOI Pre-print | ||
11:05 30mResearch paper | Lightweight Testing of Persistent Amortized Time Complexity in the Credit Monad Haskell Anton Lorenzen University of Edinburgh DOI | ||
11:35 30mResearch paper | The Calculated Typer (Functional Pearl) Haskell Zac Garby University of Nottingham, Patrick Bahr IT University of Copenhagen, Graham Hutton University of Nottingham | ||