~/talk

Keynote: Contracts, Testing & the Pursuit of Well Defined Behaviour

Talkat CppNorth 2023 · 2023-07-17..07-19· [testing]
links:none on file
slides:none on file

Shows that language-level preconditions and a small Contracts MVP (pre/post/assert) aim for C++26, with an implementation model that supports enforce/observe/ignore semantics and a replaceable violation handler (prints diagnostics or throws for test harnesses). Documents how UB (off-by-one, signed overflow) gets optimized away, how assume (available in C++23/GCC13) yields faster code, and why testing contracts uses exceptions not noexcept and why death tests or fork/spawn hacks are impractical. Explains tradeoffs and tool interactions (UBSan, sanitizers, static analysis).

AI-written summary · about

  1. 0:00Introduction to safety
  2. 2:37Understanding UB
  3. 5:35How UB affects compilation
  4. 6:43Concrete examples of UB
  5. 10:10Mitigating UB risks
  6. 12:12The trade-offs of safety
  7. 14:20Language evolution strategies
  8. 18:39Current safety proposals
  9. 21:35Introduction to contracts
  10. 23:53Narrow vs wide contracts
  11. 26:12Analyzing Vector contracts
  12. 28:46Soft vs hard UB
  13. 31:28Implementing contract checks
  14. 34:22Contract semantics
  15. 36:44The 'assume' semantic
  16. 37:43C++23 assume attribute
  17. 39:56Assume in production
  18. 42:51Assume benchmarks
  19. 44:23Contract kinds
  20. 46:22Testing postconditions
  21. 48:45Class invariants
  22. 50:09Contracts vs unit testing
  23. 52:21Testing precondition checks
  24. 55:09Exception-based testing
  25. 57:05The noexcept conflict
  26. 58:53The Lakers rule
  27. 1:00:53Purpose of noexcept
  28. 1:02:13Debating noexcept usage
  29. 1:04:14Workarounds for testing
  30. 1:06:13Death tests
  31. 1:09:09Final recommendations
  32. 1:12:31Noexcept code gen
  33. 1:14:04Future of noexcept
  34. 1:15:25Standardizing contracts
  35. 1:17:18History of proposals
  36. 1:19:20SG21 and the MVP
  37. 1:21:18Contract MVP features
  38. 1:23:32Build modes
  39. 1:25:25Violation handler
  40. 1:27:09Future contract applications
  41. 1:29:38Contract syntax debate
  42. 1:32:39Looking ahead
~/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.