~/talk

Lightweight Testing of Persistent Amortized Time Complexity in the Credit Monad

Talkat Haskell 2025 · 2025-10-16..10-17· [testing, functional-programming]
links:none on file
slides:none on file

Defines a small DSL that models laziness with explicit delay/force, counts steps with a tick and runs property tests via QuickCheck to check persistent amortized costs. Uses defunctionalized thunks so counterexamples are printable. Tests all lazy structures in Okasaki's book and rediscovers a previously unreported gap in persistent Finger Trees; three cases fail the lightweight check (bankers queue needs a credit inheritance proof, catenable lists and the implicit catenable deck remain unresolved). Package and examples live on Hackage.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05Why amortized time complexity matters
  3. 4:17Persistent queues and lazy evaluation
  4. 6:45Credit Monad for Haskell
  5. 9:12Modeling Okasaki’s implicit queue
  6. 13:32Credit passing style
  7. 14:37Testing with QuickCheck
  8. 17:29Defunctionalizing laziness
  9. 19:57Debugging with Credit Monad
  10. 20:41Limitations and future work
  11. 21:48Q&A: Credit Monad package
  12. 23:11Q&A: Applicability to queues
  13. 24:55Q&A: Bugs found
  14. 25:39Q&A: Production translation
  15. 26:22Q&A: Binary operations testing
  16. 27:08Q&A: Garbage collection
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.