Expand description
Rich assertion slot tracking for the Antithesis-style assertion suite.
Maintains a fixed-size table of assertion slots. Supports boolean assertions (always/sometimes/reachable/unreachable), numeric guidance assertions (with watermark tracking), and compound boolean assertions (sometimes-all with frontier tracking).
Each slot is accessed via raw pointer arithmetic on the assertion region
(heap by default, or MAP_SHARED memory when an exploration backend installs
one). With multiple fork children running concurrently, find_or_alloc_slot
claims slots by atomically writing msg_hash before re-scanning, ensuring
concurrent allocators see each other.
On a “discovery” (first Sometimes/Reachable pass, numeric watermark
improvement, or frontier advance) the accounting calls
[crate::hooks::on_slot_discovery]. With no hook installed this is a no-op
(pure accounting); the exploration backend wires it to coverage + forking.
Structs§
- Assertion
Slot - A single assertion tracking slot.
- Assertion
Slot Snapshot - A snapshot of an assertion slot for reporting.
Enums§
- Assert
Cmp - Comparison operator for numeric assertions.
- Assert
Kind - The kind of assertion being tracked.
Constants§
- ASSERTION_
TABLE_ MEM_ SIZE - Total size of the assertion table memory region in bytes.
- MAX_
ASSERTION_ SLOTS - Maximum number of tracked assertion slots.
Functions§
- assertion_
bool - Boolean assertion backing function.
- assertion_
numeric - Numeric guidance assertion backing function.
- assertion_
read_ all - Read all allocated assertion slots from the region.
- assertion_
sometimes_ all - Compound boolean assertion backing function (sometimes-all).
- msg_
hash - FNV-1a hash of a message string to a stable u32.