Skip to main content

VerifyBlock

Struct VerifyBlock 

Source
pub struct VerifyBlock {
    pub fn_name: String,
    pub line: usize,
    pub cases: Vec<(Spanned<Expr>, Spanned<Expr>)>,
    pub case_spans: Vec<SourceSpan>,
    pub case_givens: Vec<Vec<(String, Spanned<Expr>)>>,
    pub case_hostile_origins: Vec<bool>,
    pub case_hostile_profiles: Vec<Vec<(String, String)>>,
    pub kind: VerifyKind,
    pub trace: bool,
    pub cases_givens: Vec<VerifyGiven>,
}

Fields§

§fn_name: String§line: usize§cases: Vec<(Spanned<Expr>, Spanned<Expr>)>§case_spans: Vec<SourceSpan>§case_givens: Vec<Vec<(String, Spanned<Expr>)>>

Per-case given bindings for law verify (empty for Cases kind).

§case_hostile_origins: Vec<bool>

Parallel to cases: true when the case was injected by aver verify --hostile (boundary-value expansion of a law’s given clause), false for cases the user wrote directly. Empty under non-hostile runs; the renderer uses this to label failures as “outside declared given — encode as when if precondition” when they only fail under the hostile expansion.

§case_hostile_profiles: Vec<Vec<(String, String)>>

Parallel to cases: per-case hostile effect-profile assignment for --hostile mode. Each inner Vec lists (method, profile) pairs (e.g. ("Time.now", "frozen")) that the runner installs as oracle stubs before running the case, alongside any user-given stubs. Empty inner Vec for cases that aren’t effect-hostile- expanded (declared, value-hostile-only, or fns without applicable classified effects). All entries empty under non-hostile runs.

§kind: VerifyKind§trace: bool

Oracle v1: trace keyword enables trace-aware assertions (.trace.*, .result, event literals in .contains / match patterns). Without it, a law checks only the return value, so adding a debug print does not break proofs that do not care about traces.

§cases_givens: Vec<VerifyGiven>

Oracle v1: given clauses declared at the top of a cases-form trace block. Law-form stores its givens inside VerifyKind::Law; cases-form doesn’t have that wrapper, so this field carries them so the verify runner can build oracle-stub mappings from the same data. Empty for non-trace or law-form blocks.

Implementations§

Source§

impl VerifyBlock

Source

pub fn new_unspanned( fn_name: String, line: usize, cases: Vec<(Spanned<Expr>, Spanned<Expr>)>, kind: VerifyKind, ) -> Self

Construct a VerifyBlock with default (zero) spans for each case. Use when source location tracking is not needed (codegen, tests).

Source

pub fn iter_cases_with_spans( &self, ) -> impl Iterator<Item = (&(Spanned<Expr>, Spanned<Expr>), &SourceSpan)>

Trait Implementations§

Source§

impl Clone for VerifyBlock

Source§

fn clone(&self) -> VerifyBlock

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for VerifyBlock

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for VerifyBlock

Source§

fn eq(&self, other: &VerifyBlock) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for VerifyBlock

Auto Trait Implementations§

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

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

Source§

fn vzip(self) -> V