pub struct Path {
pub target: CheckpointLocation,
pub steps: Vec<PathStep>,
}Expand description
One finite, acyclic execution trace from the function entry to a target checkpoint, represented as an ordered sequence of MIR basic blocks.
A Path is the core currency flowing through the verification pipeline.
It is produced by PathExtractor, then consumed by the
BackwardSlicer to determine which MIR
instructions are relevant to the safety property being checked.
§Structure
Each path consists of:
target— theCheckpointLocationidentifying the specific call terminator (or synthetic checkpoint) this path reaches. Redundant with the final step but stored separately for fast lookup.steps— an ordered list ofPathStepvalues. Intermediate steps are MIR basic blocks; the final step is alwaysPathStep::Checkpoint(target). The path always starts at function entry (blockbb0).
§Reachability
Every Path returned by PathExtractor is guaranteed to be reachable
in the function’s CFG. Paths that cannot be validated against the
SCC-aware PathGraph are silently discarded during extraction.
§Example (compact notation)
bb2 -> bb3 -> bb4 -> checkpoint@bb5::unsafe_fnIn the path above, blocks 2, 3, and 4 are intermediate MIR blocks; block 5 contains the unsafecall terminator that the path targets.
Fields§
§target: CheckpointLocationThe checkpoint location (function + basic block) reached by this path.
steps: Vec<PathStep>Ordered sequence of basic blocks from function entry to target,
terminated by a PathStep::Checkpoint.
Implementations§
Source§impl Path
impl Path
Sourcepub fn describe_body(&self) -> String
pub fn describe_body(&self) -> String
Render only the path body from the start point to the checkpoint.
Sourcepub fn describe_indices(&self) -> String
pub fn describe_indices(&self) -> String
Render this path as a compact array of block indices.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more