pub enum BitvectorDomain {
Top(ByteSize),
Value(Bitvector),
}
Expand description
The BitvectorDomain
is a simple abstract domain describing a bitvector of known length.
As values it can only assume a known bitvector or Top(bytesize).
Variants§
Top(ByteSize)
The Top
value of the domain, representing the case that nothing is known about the actual value.
Value(Bitvector)
The exact value of the bitvector is known.
Trait Implementations§
source§impl AbstractDomain for BitvectorDomain
impl AbstractDomain for BitvectorDomain
source§impl Add for BitvectorDomain
impl Add for BitvectorDomain
source§impl Clone for BitvectorDomain
impl Clone for BitvectorDomain
source§fn clone(&self) -> BitvectorDomain
fn clone(&self) -> BitvectorDomain
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BitvectorDomain
impl Debug for BitvectorDomain
source§impl<'de> Deserialize<'de> for BitvectorDomain
impl<'de> Deserialize<'de> for BitvectorDomain
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for BitvectorDomain
impl Display for BitvectorDomain
source§impl From<ApInt> for BitvectorDomain
impl From<ApInt> for BitvectorDomain
source§fn from(bitvector: Bitvector) -> BitvectorDomain
fn from(bitvector: Bitvector) -> BitvectorDomain
Converts to this type from the input type.
source§impl HasTop for BitvectorDomain
impl HasTop for BitvectorDomain
source§fn top(&self) -> BitvectorDomain
fn top(&self) -> BitvectorDomain
Return a Top value with the same bytesize as self
.
source§impl Hash for BitvectorDomain
impl Hash for BitvectorDomain
source§impl Neg for BitvectorDomain
impl Neg for BitvectorDomain
source§impl PartialEq for BitvectorDomain
impl PartialEq for BitvectorDomain
source§fn eq(&self, other: &BitvectorDomain) -> bool
fn eq(&self, other: &BitvectorDomain) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RegisterDomain for BitvectorDomain
impl RegisterDomain for BitvectorDomain
source§fn bin_op(&self, op: BinOpType, rhs: &Self) -> Self
fn bin_op(&self, op: BinOpType, rhs: &Self) -> Self
Evaluate the given binary operation.
For non-shift operations, this function will panic if the operands have different bitsizes.
source§fn subpiece(&self, low_byte: ByteSize, size: ByteSize) -> Self
fn subpiece(&self, low_byte: ByteSize, size: ByteSize) -> Self
Extract a sub-bitvector out of a bitvector
source§fn cast(&self, kind: CastOpType, width: ByteSize) -> Self
fn cast(&self, kind: CastOpType, width: ByteSize) -> Self
Perform a size-changing cast on a bitvector.
source§impl Serialize for BitvectorDomain
impl Serialize for BitvectorDomain
source§impl SizedDomain for BitvectorDomain
impl SizedDomain for BitvectorDomain
source§impl Sub for BitvectorDomain
impl Sub for BitvectorDomain
source§impl TryToBitvec for BitvectorDomain
impl TryToBitvec for BitvectorDomain
source§impl TryToInterval for BitvectorDomain
impl TryToInterval for BitvectorDomain
source§fn try_to_interval(&self) -> Result<Interval, Error>
fn try_to_interval(&self) -> Result<Interval, Error>
If the domain represents an absolute value, return it as an interval of length one.
source§fn try_to_offset_interval(&self) -> Result<(i64, i64), Error>
fn try_to_offset_interval(&self) -> Result<(i64, i64), Error>
If
self
represents an interval of absolute values (or can be widened to represent such an interval)
then return it as an interval of signed integers of the form (start, end)
if the interval is bounded.
Else return an error.
Note that the conversion loses information about the bytesize of the values contained in the interval.impl Eq for BitvectorDomain
impl StructuralEq for BitvectorDomain
impl StructuralPartialEq for BitvectorDomain
Auto Trait Implementations§
impl RefUnwindSafe for BitvectorDomain
impl Send for BitvectorDomain
impl Sync for BitvectorDomain
impl Unpin for BitvectorDomain
impl UnwindSafe for BitvectorDomain
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.