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 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).
kind: VerifyKind§trace: boolOracle 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
impl VerifyBlock
Sourcepub fn new_unspanned(
fn_name: String,
line: usize,
cases: Vec<(Spanned<Expr>, Spanned<Expr>)>,
kind: VerifyKind,
) -> Self
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).
pub fn iter_cases_with_spans( &self, ) -> impl Iterator<Item = (&(Spanned<Expr>, Spanned<Expr>), &SourceSpan)>
Trait Implementations§
Source§impl Clone for VerifyBlock
impl Clone for VerifyBlock
Source§fn clone(&self) -> VerifyBlock
fn clone(&self) -> VerifyBlock
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VerifyBlock
impl Debug for VerifyBlock
Source§impl PartialEq for VerifyBlock
impl PartialEq for VerifyBlock
impl StructuralPartialEq for VerifyBlock
Auto Trait Implementations§
impl Freeze for VerifyBlock
impl RefUnwindSafe for VerifyBlock
impl Send for VerifyBlock
impl Sync for VerifyBlock
impl Unpin for VerifyBlock
impl UnsafeUnpin for VerifyBlock
impl UnwindSafe for VerifyBlock
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
Mutably borrows from an owned value. Read more