Module call_summary

Module call_summary 

Source
Expand description

Interprocedural call summaries for the staged verifier.

The backward visitor needs dependency information: when a call result is relevant, which call arguments should become relevant too? The forward visitor needs effect information: after a retained call, what facts about the return value or arguments can be added or forgotten?

This module keeps those summaries in one place. Standard unsafe/std APIs are summarized by name. Local callees can additionally use the existing dataflow graph to approximate which arguments flow into the return value.

StructsΒ§

CallDependencySummary
Dependency summary consumed by the backward visitor.
CallEffectSummary
Effect summary consumed by the forward visitor.

EnumsΒ§

CallEffect
Path-local effect produced by a retained call.

FunctionsΒ§

call_name
Return a stable, human-readable name for a MIR call operand.
callee_def_id
Return the static callee definition for a MIR call operand.
dependency_summary
Return dependency information for a MIR call terminator.
destination_nonnull_alignment πŸ”’
Return pointee alignment when the destination is NonNull<T>.
destination_pointee_alignment πŸ”’
Return pointee alignment for a pointer returned into destination.
destination_stride πŸ”’
Return the byte stride for a pointer returned into destination.
effect_summary
Return effect information for a MIR call terminator.
is_as_mut_ptr_call
Return true for mutable pointer extraction calls.
is_as_ptr_call
Return true for slice/string/vector pointer extraction calls.
is_from_trait_call πŸ”’
is_layout_constant_call
Return true for layout constant producers.
is_len_call
Return true for slice/string/vector length queries.
is_maybe_uninit_uninit_call
Return true for MaybeUninit::<T>::uninit.
is_nonnull_destination πŸ”’
is_pointer_add_call
Return true for typed pointer addition calls.
is_pointer_offset_call
Return true for typed pointer offset calls.
is_pointer_read_call
Return true for pointer reads.
is_pointer_sub_call
Return true for typed pointer subtraction calls.
is_pointer_write_call
Return true for pointer writes that initialize one element.
layout_call_ty πŸ”’
Return the type argument for a layout-producing call.
layout_constant_effect πŸ”’
Return a concrete layout constant effect for align_of::<T>() or size_of::<T>().
local_must_write_args πŸ”’
Return callee argument indices that are definitely written on every reachable return path.
local_return_dependencies πŸ”’
Use the existing dataflow graph to approximate local callee return deps.
nonnull_inner_ty πŸ”’
path_ends_in_return πŸ”’
pointee_ty πŸ”’
Return the pointee type of raw pointers and references.
trace_to_callee_arg πŸ”’
Trace backward from an operand (inner call arg) through Copy/Move/Cast assignments to the outer callee’s argument local, returning its index.
try_pointer_arith_wrapper_effect πŸ”’
Detect when a local callee wraps a pointer-arithmetic call (add/sub) and produce the correct ReturnPointerAdd / ReturnPointerSub effect.
ty_has_param_const πŸ”’
type_layout πŸ”’
write_args_on_path πŸ”’