- Verus overview
- Getting started
- 1. Getting started
- 1.1. ... on the command line
- 1.2. ... with VSCode
- Tutorial: Fundamentals
- 2. Using Verus within Rust
- 3. Basic specifications
- 3.1. assert, requires, ensures, ghost code
- 3.2. Expressions and operators for specifications
- 3.3. Integers and arithmetic
- 3.4. Equality
- 4. Specification code, proof code, executable code
- 4.1. spec functions
- 4.2. proof functions, proof blocks, assert-by
- 4.3. spec functions vs. proof functions, recommends
- 4.4. Ghost code vs. exec code
- 4.5. const declarations
- 4.6. Putting it all together
- 5. Recursion and loops
- 5.1. Recursive spec functions, decreases, fuel
- 5.2. Recursive exec and proof functions, proofs by induction
- 5.2.1. Lightweight termination checking
- 5.3. Loops and invariants
- 5.3.1. Loops with break
- 5.3.2. For Loops
- 5.3.3. Iterators
- 5.4. Lexicographic decreases clauses and mutual recursion
- 6. Datatypes: struct and enum
- 6.1. Struct
- 6.2. Enum
- 7. Libraries
- 7.1. Specification libraries: Seq, Set, Map
- 7.2. Executable libraries: Vec
- 8. Spec closures
- 9. Quantifiers
- 9.1. forall and triggers
- 9.2. Multiple variables, multiple triggers, matching loops
- 9.3. exists and choose
- 9.4. Proofs about forall and exists
- 9.5. Example: binary search
- 9.6. Ambient (broadcast) lemmas
- Tutorial: Proof Development
- 10. Developing proofs
- 10.1. Using assert and assume
- 10.2. Devising loop invariants
- 10.3. Proving absence of overflow
- 11. SMT solving, automation, and where automation fails
- 11.1. What's decidable, what's undecidable, what's fast, what's slow
- 11.2. Integers and nonlinear arithmetic
- 11.3. Bit vectors and bitwise operations
- 11.4. forall and exists: writing and using triggers, inline functions
- 11.5. Recursive functions
- 11.6. Extensional equality
- 11.7. Libraries: incomplete axioms for Seq, Set, Map
- 12. Managing proof performance and why it's critical
- 12.1. Measuring verification performance
- 12.2. Quantifier profiling
- 12.3. Modules, hiding, opaque, reveal
- 12.4. Hiding local proofs with assert (...) by { ... }
- 12.5. Structured proofs by calculation
- 12.6. Proof by computation
- 12.7. Spinning off separate SMT queries
- 12.8. Breaking proofs into smaller pieces
- 13. Using LLM assistants
- 13.1. Using LLMs to develop proofs
- 13.2. Using LLMs to develop specifications
- 14. Checklist: what to do when proofs go wrong
- Tutorial: Verification and Rust
- 15. Mutation, references, and borrowing
- 15.1. Mutable references
- 15.2. Assertions about mutable references
- 16. Traits
- 17. Iterator Specifications
- 18. Higher-order executable functions
- 18.1. Passing functions as values
- 18.2. Closures
- 19. Ghost and tracked variables
- 20. Strings
- 21. Macros
- 22. Unsafe code & complex ownership
- 22.1. Cells / interior mutability
- 22.2. Pointers
- 22.3. Concurrency
- 23. Verifying a container library: Binary Search Tree
- 23.1. First draft
- 23.2. Encapsulating well-formedness with type invariants
- 23.3. Making it generic
- 23.4. Implementing Clone
- 23.5. Mutable references in a container
- 23.6. Full source for the examples
- 24. Interacting with unverified code
- 24.1. Calling unverified code from verified code
- 24.2. Calling verified code from unverified code
- 25. Understanding the guarantees of a verified program
- 25.1. Assumptions and trusted components
- 25.2. Memory safety is conditional on verification
- 25.3. Calling verified code from unverified code
- Installation, configuration, and tooling
- 26. Installation and setup
- 26.1. IDE Support
- 26.2. Installing and configuring Singular
- 27. Project setup and development
- 27.1. Working with crates
- 27.2. Invoking Verus code from Rust
- 27.3. Documentation with Rustdoc
- 27.4. Ghost Erasure
- Reference
- 28. Supported and unsupported Rust features
- 29. Verus syntax by example
- 30. Modes
- 30.1. Function modes
- 30.2. Variable modes
- 31. Contributed Extensions
- 31.1. Automatic spec to exec functions
- 31.2. Spec and proof attributes for exec functions
- 31.2.1. Automatic exec to spec functions
- 32. Spec expressions
- 32.1. Rust subset
- 32.2. Operator Precedence
- 32.3. Arithmetic
- 32.4. Bit operators
- 32.5. Coercion with as
- 32.6. Spec equality (==)
- 32.7. Extensional equality (=~=, =~~=)
- 32.8. Prefix and/or (&&& and |||)
- 32.9. Chained operators
- 32.10. Implication (==>, <==, and <==>)
- 32.11. Quantifiers (forall, exists)
- 32.12. Such that (choose)
- 32.13. Trigger annotations
- 32.14. The view function @
- 32.15. Spec index operator []
- 32.16. decreases_to!
- 33. Proof features
- 33.1. assert and assume
- 33.2. assert ... by
- 33.3. assert forall ... by
- 33.4. assert ... by(bit_vector)
- 33.5. assert ... by(nonlinear_arith)
- 33.6. assert ... by(compute) / by(compute_only)
- 33.7. reveal, reveal_with_fuel, hide
- 34. Function specifications
- 34.1. Function Signatures
- 34.1.1. Exec fn signature
- 34.1.2. Proof fn signature
- 34.1.3. Spec fn signature
- 34.2. Signature clauses
- 34.2.1. requires / ensures
- 34.2.2. returns
- 34.2.3. opens_invariants
- 34.2.4. no_unwind
- 34.2.5. recommends
- 34.3. Traits and signature inheritance
- 34.4. Specifications on FnOnce
- 35. External trait specifications
- 36. Loop specifications
- 36.1. invariant
- 36.2. invariant_except_break / ensures
- 37. Recursion and termination
- 37.1. decreases ... when ... via ...
- 37.2. Datatype ordering
- 37.3. Cyclic definitions
- 38. Type invariants
- 39. Attribute list
- 40. Directives
- 40.1. assume_specification
- 40.2. global
- 41. Misc. Rust features
- 41.1. Statics
- 41.2. char
- 41.3. Unions
- 41.4. Pointers and cells
- 42. Command line
- 42.1. --record
- 43. Planned future work