Chapter 8. Verification
Unsafe code enables low-level operations while circumventing Rust's safety guarantees, and may introduce undefined behavior (UB) if misused. The verification module (rapx::verify) provides a staged pipeline for checking that unsafe call sites satisfy their callee's safety preconditions. It combines path-sensitive MIR traversal, abstract interpretation, and Z3-based SMT solving to produce verdicts of Proved or Unproved for each safety property at each unsafe call site.
Chapter Outline
- 8.1 Design Principles and Verification Modes — the three assumptions, contract-based verification, and the
scan/targeted/invlessmodes - 8.2 Verification Target Collection — how targets are gathered and how contracts are resolved (annotation → JSON → call-chain)
- 8.3 Safety Property Contracts — complete syntax reference: property kinds, argument grammar,
ValidNumpredicates, direct annotation syntax, and the JSON contract database format - 8.4 The Verification Pipeline — a complete walkthrough of the verification pipeline using a linked-list case study: loop-repeat planning, path extraction, backward slicing, forward verification, and SMT check