Skip to main content

Query

Enum Query 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

IsZero(Expr)

The value is zero.

§

IsNonZero(Expr)

The value is not zero.

§

Bit

Bit bit has value value.

Fields

§e: Expr

The expression.

§bit: u16

The bit index.

§value: bool

The value asked about.

§

Eq(Expr, Expr)

The two values are equal.

§

Cmp(CmpOpExt, Expr, Expr)

The comparison holds.

§

InURange

The value is in [lo, hi] (unsigned).

Fields

§e: Expr

The expression.

§lo: &'q BitVec

Lower bound.

§hi: &'q BitVec

Upper bound.

§

InSRange

The value is in [lo, hi] (signed).

Fields

§e: Expr

The expression.

§lo: &'q BitVec

Lower bound.

§hi: &'q BitVec

Upper bound.

§

Aligned

The value is a multiple of 2^log2.

Fields

§e: Expr

The expression.

§log2: u16

Alignment exponent.

§

MaskRedundant

e & mask == e.

Fields

§e: Expr

The expression.

§mask: &'q BitVec

The mask.

§

FitsUnsigned

The unsigned value fits in bits bits.

Fields

§e: Expr

The expression.

§bits: u16

Number of bits.

§

FitsSigned

The signed value fits in bits bits.

Fields

§e: Expr

The expression.

§bits: u16

Number of 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.

Fields

§e: Expr

The expression.

§of: Expr

The subexpression it is read as a function of.

§

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.

Fields

§e: Expr

The expression.

§of: Expr

The subexpression it is read as a function of.

Trait Implementations§

Source§

impl<'q> Clone for Query<'q>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'q> Copy for Query<'q>

Source§

impl<'q> Debug for Query<'q>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'q> Freeze for Query<'q>

§

impl<'q> RefUnwindSafe for Query<'q>

§

impl<'q> Send for Query<'q>

§

impl<'q> Sync for Query<'q>

§

impl<'q> Unpin for Query<'q>

§

impl<'q> UnsafeUnpin for Query<'q>

§

impl<'q> UnwindSafe for Query<'q>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.