Path

Struct Path 

Source
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 — the CheckpointLocation identifying 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 of PathStep values. Intermediate steps are MIR basic blocks; the final step is always PathStep::Checkpoint(target). The path always starts at function entry (block bb0).

§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_fn

In the path above, blocks 2, 3, and 4 are intermediate MIR blocks; block 5 contains the unsafecall terminator that the path targets.

Fields§

§target: CheckpointLocation

The 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

Source

pub fn describe(&self) -> String

Render this path as a compact string for diagnostics.

Source

pub fn describe_body(&self) -> String

Render only the path body from the start point to the checkpoint.

Source

pub fn describe_indices(&self) -> String

Render this path as a compact array of block indices.

Trait Implementations§

Source§

impl Clone for Path

Source§

fn clone(&self) -> Path

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Path

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,