Harry Goldstein University at Buffalo, SUNY hgoldste@buffalo.edu
What’s the point
of testing
anymore?
Lean Port of Minecraft
State.step_entities_sound
Entities collide properly with blocks
Session.play_dig_iff
Clicks don’t get lost
mem_chunkFaces
Faces are only drawn if visible
214 theorems
This took me Claude
2.5 hours
Trustworthy foundations
for random testing.
Joint work with
Mike Hicks · Katie Hough · Josh Cohen
Ernest Ng · Segev Elazar Mittelman
Funded in part by
def genElapsed : G Nat :=
frequency [
(2, return 0),
(5, chooseNat 1 450),
(3, chooseNat 900 1100),
(1, return 1000),
(2, chooseNat 1001 16999),
(1, chooseNat 14000 200000)
]
example : IsCompleteFor genElapsed (· ≤ 200000) := by
intro n hn
rw [genElapsed, SPMF.mem_support_iff_may]
walk
omega
omega could not prove the goal:
a possible counterexample may satisfy the constraints
451 ≤ n ≤ 899
def genFrames : G (List Nat) :=
oneOf [
return [],
do
let n ← genElapsed
let ns ← genFrames
return n :: ns
]
example : HasProbability genFrames [] ≤ 1 / 10 := by
rw [genFrames, SPMF.prob_oneOf]
simp [prob_cons_nil]
unsolved goals
⊢ 1 / 2 ≤ 1 / 10
IsSoundAndComplete
What is the support?
IsAlmostSurelyTerminating
Does it terminate?
HasProbability
How likely is a value?
HasExpectedValue
How big is a value on average?
IsCostBounded
How many choices are made?
IsExpectedCostBounded
How many choices on average?
Carette et al., Finally Tagless, Partially Evaluated, JFP 2009
Richey and Cutler et al., Fail Faster, OOPSLA 2026
Goldstein et al., The Search for Constrained Random Generators, PLDI 2026
Elazar Mittelman et al., Testing Theorems, Fully Automatically, OOPSLA 2026
Tjoa et al., Tuning Random Generators, OOPSLA 2025
Zhuang, Ariadne, POPL SRC 2026
Disselkoen et al., How We Built Cedar, FSE 2024
github.com/strata-org/Strata
A new foundation for random testing.
TrustworthyEnables proofs of critical performance properties.
InterpretableProofs and code use the same generator.
PracticalRuns as fast as other flagship PBT libraries.
Next StepsLays groundwork for other PBT advances.
A couple more things…
New Course
Trustworthy Software Engineering with AI
I plan to teach students testing and verification in the context of agentic programming.
Upcoming User Study
How do programmers understand theorems?
If SEs don't have a formal methods team to support them, how do they engage with correctness theorems?
Would love to chat about these afterwards!
Thank you!
Basalt Collaborators
My Students
Funded in part by
a generous gift from