~/talk

From Formal Specification to Property Based Test

Talkat RubyKaigi 2026 · 2026-04-22..04-24· [testing]
links:none on file
slides:none on file

A gem named spec2pbt parses formal specifications and scaffolds runnable Property Based Tests plus a separate config file, lowering only safe, recognized patterns into tests. It finds the FIFO-vs-LIFO bug in a Stack by producing a minimal counterexample and contributes stateful property-based testing upstream to the pbt gem. The analysis uses a pattern catalog of about twenty-something patterns. Current limits: two spec languages partially supported, narrow pattern coverage, and generated tests need improved readability.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 3:26Why formal methods matter
  3. 6:02Formal specifications explained
  4. 8:53Property based testing overview
  5. 11:48Combining specs and tests
  6. 12:32Introducing spec2pbt tool
  7. 16:20Tool design decisions
  8. 18:12Scaffold vs compiler approach
  9. 20:20Safe regeneration design
  10. 21:46Upstream contributions
  11. 23:36Pattern analysis process
  12. 26:54Future directions and limits
  13. 29:06Conclusion and Q&A
~/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.