Module common

Module common 

Source
Expand description

Common SMT checking backend for the staged verifier.

The SMT layer consumes the abstract facts produced by verifying and exposes one property-oriented entry point. Safety properties do not call Z3 directly. Instead, each property-specific module lowers its requirement into one of the common SMT obligations below, and the common backend discharges that obligation against the path-local abstract facts.

Current common obligations:

  • SmtObligation::Aligned: prove addr(place) % align == 0.
  • SmtObligation::NonZero: prove addr(place) != 0.
  • SmtObligation::Range: reserved for future bounds-style checks.

Current property lowering:

  • Align(p, T) lowers to Aligned { place: p, align: align_of(T) }.
  • NonNull(p) lowers to NonZero { place: p }.
  • ValidPtr(p, T, n) is decomposed by valid_ptr.rs into primitive SMT checks that are implemented today, while unsupported primitives remain explicit Unknown notes.

Future SPs should add small lowering modules next to align.rs and reuse SmtModel, SmtQuery, and SmtCheckResult instead of constructing solver queries ad hoc.

StructsΒ§

PathCursorCutoff πŸ”’
PointerBounds πŸ”’
Recovered index and length terms for a first-cut in-bounds proof.
SmtCheckResult
Result of one SMT check.
SmtChecker
SMT backend for verifier properties.
SmtModel πŸ”’
Per-query SMT term builder over a forward visit result.
SmtQuery
Solver query built from path facts plus one negated obligation.

EnumsΒ§

SliceIndexKind πŸ”’
SmtObligation
General SMT obligation produced by an SP-specific lowering.
SmtPredicate
Common boolean predicate asserted or refuted by SMT queries.
SmtTerm
Common SMT term used by diagnostics and property-independent query building.
TypeSizeClass πŸ”’
Trivalent size classification for type-dependent composite SPs.

FunctionsΒ§

abstract_value_from_operand πŸ”’
abstract_value_from_rvalue πŸ”’
allocated_type_compatible πŸ”’
allocation_object_invalidated πŸ”’
array_elem_type πŸ”’
binop_label πŸ”’
Render a compact binary operator label.
call_has_pointer_add_effect πŸ”’
Return true when a call summary carries pointer-add semantics.
call_has_pointer_sub_effect πŸ”’
const_int_from_debug πŸ”’
Extract a small integer constant from rustc’s debug representation.
const_param_name_from_debug πŸ”’
Extract a const generic parameter name, e.g. Param(N) β†’ "N".
contract_expr_from_place_key πŸ”’
failed_smt πŸ”’
infer_element_ty πŸ”’
init_type_compatible πŸ”’
initialized_element_ty_name πŸ”’
is_as_ptr_call πŸ”’
Return true when a call summary extracts a pointer from a slice-like object.
is_len_carrying_ty πŸ”’
is_pointer_add_call πŸ”’
Return true when a call summary is a typed pointer addition.
is_pointer_sub_call πŸ”’
Return true when a call summary is a typed pointer subtraction.
is_unsigned_integral_ty πŸ”’
normalize_init_ty_name πŸ”’
operand_place πŸ”’
Convert an operand into a place key when it names a MIR place.
place_label πŸ”’
Compact human-readable label for a MIR place key.
place_name πŸ”’
Stable SMT variable name for a place key.
pointee_stride_from_types πŸ”’
pointee_ty πŸ”’
Return the pointee type of raw pointers and references.
pointee_ty_str πŸ”’
Return a string label for the pointee type, for type-level alias checks.
pointer_range_negated_goal πŸ”’
ptr_metadata_origin πŸ”’
safe_type_layout πŸ”’
sanitize_smt_name πŸ”’
Stable SMT identifier for diagnostic-only symbolic terms.
short_func_name πŸ”’
Return the final path segment of a rustc debug function name.
smt_term_const_u64 πŸ”’
smt_term_for_value πŸ”’
ty_has_param_const πŸ”’
value_for_place πŸ”’
Return the abstract value assigned to a place when it is tracked by local.
value_label πŸ”’
Compact human-readable label for an abstract value.

Type AliasesΒ§

TraceSeen πŸ”’
ValueCursor πŸ”’