#[non_exhaustive]pub enum Query<'q> {
Show 14 variants
IsZero(Expr),
IsNonZero(Expr),
Bit {
e: Expr,
bit: u16,
value: bool,
},
Eq(Expr, Expr),
Cmp(CmpOpExt, Expr, Expr),
InURange {
e: Expr,
lo: &'q BitVec,
hi: &'q BitVec,
},
InSRange {
e: Expr,
lo: &'q BitVec,
hi: &'q BitVec,
},
Aligned {
e: Expr,
log2: u16,
},
MaskRedundant {
e: Expr,
mask: &'q BitVec,
},
FitsUnsigned {
e: Expr,
bits: u16,
},
FitsSigned {
e: Expr,
bits: u16,
},
IsConstant(Expr),
Injective {
e: Expr,
of: Expr,
},
Bijective {
e: Expr,
of: Expr,
},
}Expand description
A question about expression values, answered by Context::prove.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IsZero(Expr)
The value is zero.
IsNonZero(Expr)
The value is not zero.
Bit
Bit bit has value value.
Eq(Expr, Expr)
The two values are equal.
Cmp(CmpOpExt, Expr, Expr)
The comparison holds.
InURange
The value is in [lo, hi] (unsigned).
InSRange
The value is in [lo, hi] (signed).
Aligned
The value is a multiple of 2^log2.
MaskRedundant
e & mask == e.
FitsUnsigned
The unsigned value fits in bits bits.
FitsSigned
The signed value fits in bits bits.
IsConstant(Expr)
The facts pin the value to one constant.
Injective
e is an injective function of its subexpression of: with every value that does not
depend on of held fixed, distinct values put in place of of give distinct values of
e. Proved through a chain of invertible layers from of up to e (operators
injective in one operand with the others fixed, such as x ^ k, x * k for odd k,
rotations, zext, declared extension operations, and triangular maps such as
h ^ ((h >>u 32) >>u (h >>u 60))); False when e does not depend on of or is
narrower than it.
Bijective
e is a bijective function of its subexpression of: injective (see
Query::Injective), of the same width. False when e does not depend on of or
their widths differ.