Types and Property Tests for Software Resiliency
summary
Functional programming uses types to constrain behavior and tests to fill gaps: parametricity yields “free theorems” (a polymorphic a -> a has exactly one implementation), algebra counts inhabitants (Bool -> Bool gives four), and two simple properties force list reversal. The workflow pairs Haskell-style types with property-based testing (Hedgehog, Scala/Java interop) and occasional machine-checked proofs (a 300-line Java/Yoneda proof example). The talk compares when types suffice and when targeted randomised properties are needed.
AI-written summary · about
chapters (14)
- 0:00Intro
- 2:11Simple Machines
- 2:47Just a bit of history
- 6:20What is Functional Programming?
- 16:20Software resiliency
- 16:54Software sandcastles
- 19:02Fast and loose reasoning
- 20:45Consider the following Java function ...
- 26:42What is Parametricity and Free Theorems
- 28:48Polymorphic values and tests
- 33:20Once-inhabitance
- 34:15Types and tests
- 37:13Counting inhabitants
- 38:51Here are some more examples
related talks
28mLanguage Support for Property-Based Testing
46mTesting in the world of Functional Programming
45mBetter types = fewer tests
01h 24mIntroduction to Property Based Testing
48mDomain Invariants & Property-Based Testing for the Masses
45mTDD, as in Type-Directed Development
20mType-level Property Based Testing
47mProperty-based Testing or the Insufficiency of Unit Tests
