Skip to main content

Module counterexample

Module counterexample 

Source
Expand description

Source-named inputs decoded from a failed check’s solver model.

Verus encodes a function parameter x as the SMT constant x! and a struct value as a constructor application such as (krate!Row./Row false 3), whose arguments follow the struct’s declaration order. A model also defines many internal constants: fuel, type identities, location labels and versioned locals. Decoding keeps only constants Verus names IDENT!, which include the parameters and the return binder, renders their values, and names struct fields when the caller supplies the declaration order. The raw model is never replaced: it stays in the obligation’s crate::output::Counterexample.

Decoded values are what the solver’s model assigned for one failed or unknown check. Sail does not evaluate them against the source, so they are not a validated concrete counterexample.

Structs§

Decoded
Source-named inputs from the first model of one failed or unknown obligation.
Field
One struct field of a decoded record.
Input
One source-named model constant.

Enums§

Value
A decoded value: a rendered scalar or a struct record.

Constants§

VERSION
Decoded counterexample contract version.

Functions§

decode
Decode the first counterexample of a failed or unknown obligation of function.

Type Aliases§

FieldNames
Struct field names in declaration order, keyed by struct name.