Expand description
Function simulation: API behaviour modelling when MIR is unavailable.
Each recognised standard-library API is described by a single table
row: a name matcher, argument dependency, and effect
builder. The public entry points lookup_dependency and
lookup_effect scan the table linearly (first match wins) and
convert the matched row into the concrete summaries consumed by the
backward/forward visitors.
Two layers, both visible in one place:
- Matcher functions โ cheap name-pattern checks (hot-path
is_*helpers for classification queries). - Effect functions โ produce the
Vec<CallEffect>for a single API.
Macrosยง
Structsยง
Constantsยง
- ALL ๐
Staticsยง
- REGISTRY ๐
Functionsยง
- align_
to_ ๐local - allocator_
allocate ๐ - bit_
preserving_ ๐nz - Bit-preserving integer operations: rotations, byte/bit reversals,
endianness conversions, popcount, integer square root and saturating power
all map
0to0and non-zero to non-zero, so the result is non-zero iff the operand is (ReturnNonZeroIff). - checked_
pow_ ๐nz checked_powreturnsOption<T>whoseSomepayload is non-zero iff the base is non-zero (ReturnOptionSomeNonZeroIff).- cmp_min ๐
- eff_
alias_ ๐arg0 - eff_
alias_ ๐nonnull - eff_
alias_ ๐ptr - eff_
align_ ๐offset - eff_
align_ ๐to - eff_
allocator_ ๐allocate - eff_
box_ ๐from_ vec - eff_
cmp_ ๐min - eff_
forget ๐ - eff_
from_ ๐raw_ parts - eff_
from_ ๐trait - eff_
is_ ๐empty - eff_
layout_ ๐align - eff_
layout_ ๐const - eff_len ๐
- eff_
new_ ๐allocation - eff_
new_ ๐allocation_ from_ cap - eff_
none ๐ - eff_
offset_ ๐from_ unsigned - eff_
option_ ๐scan_ index - eff_
overflowing_ ๐nz - eff_
ownership_ ๐recon - eff_
ptr_ ๐add - eff_
ptr_ ๐sub - eff_
read_ ๐mem - eff_
return_ ๐abs - eff_
return_ ๐add - eff_
return_ ๐clamp - eff_
return_ ๐iter - eff_
return_ ๐max - eff_
return_ ๐mul - eff_
return_ ๐neg - eff_
return_ ๐nonzero_ iff - eff_
return_ ๐option_ some_ add - eff_
return_ ๐option_ some_ mul - eff_
return_ ๐option_ some_ nonzero_ iff - eff_
return_ ๐sub - eff_
scan_ ๐length - eff_
split_ ๐at - eff_
vec_ ๐from_ box - eff_
write_ ๐mem - from_
trait_ ๐call - int_abs ๐
- int_add ๐
- int_
checked_ ๐add - int_
checked_ ๐mul - int_
clamp ๐ - int_max ๐
- Comparison / absolute-value / negation / saturating & unchecked arithmetic
operations. Each is modelled with a precise expression over its operands
(see the
eff_return_*builders) so non-zero-ness is discharged conditionally โ only when the operands are actually non-zero. - int_mul ๐
- int_neg ๐
- into_
iter_ ๐local - is_
empty ๐ - is_
nonnull_ ๐dest - is_
slice_ ๐get_ unchecked - is_
strlen ๐ - iter_
position ๐ - layout_
align ๐ - layout_
call_ ๐ty - layout_
constant_ ๐effect - lookup_
dependency - lookup_
effect - mem_
forget ๐ - nonnull_
as_ ๐mut - nonnull_
as_ ๐ref - nonnull_
from ๐ - nonnull_
new ๐ - nonnull_
new_ ๐unchecked - nonnull_
pointee_ ๐alignment - overflowing_
nz ๐ overflowing_abs/overflowing_negreturn(result, overflow)where theresultfield (0) is non-zero whenever the operand is non-zero. Model the field 0 as non-zero (ReturnTupleFieldNonZero { field: 0 }).- ptr_
read ๐ - saturating_
sub ๐ - slice_
index ๐ - split_
at ๐ - transmute ๐