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: 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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VerifyBlock
impl Debug for VerifyBlock
Source§impl PartialEq for VerifyBlock
impl PartialEq for VerifyBlock
Source§fn eq(&self, other: &VerifyBlock) -> bool
fn eq(&self, other: &VerifyBlock) -> bool
self and other values to be equal, and is used by ==.