pub trait DomainValue: Clone + Copy {
Show 53 methods
// Required methods
fn size(&self) -> Result<usize, EmulatorErrorKind>;
fn value(&self) -> Result<u64, EmulatorErrorKind>;
fn from_u64(value: u64) -> Self;
fn is_float_nan(&self) -> Result<Self, EmulatorErrorKind>;
fn int_to_float(&self, size: usize) -> Result<Self, EmulatorErrorKind>;
fn float_to_float(&self, size: usize) -> Result<Self, EmulatorErrorKind>;
fn float_to_int(&self, size: usize) -> Result<Self, EmulatorErrorKind>;
fn zext(&self, size: usize) -> Result<Self, EmulatorErrorKind>;
fn sext(&self, size: usize) -> Result<Self, EmulatorErrorKind>;
fn range(
&self,
start: usize,
size: usize,
) -> Result<Self, EmulatorErrorKind>;
fn byte_swap(&self) -> Result<Self, EmulatorErrorKind>;
fn intrinsic(
id: IntrinsicId,
args: &[Self],
out_size: usize,
) -> Result<Self, EmulatorErrorKind>;
fn pop_count(&self) -> Result<Self, EmulatorErrorKind>;
fn lz_count(&self) -> Result<Self, EmulatorErrorKind>;
fn carry(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn scarry(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn sborrow(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_not(&self) -> Result<Self, EmulatorErrorKind>;
fn int_negate(&self) -> Result<Self, EmulatorErrorKind>;
fn float_negate(&self) -> Result<Self, EmulatorErrorKind>;
fn float_abs(&self) -> Result<Self, EmulatorErrorKind>;
fn float_sqrt(&self) -> Result<Self, EmulatorErrorKind>;
fn float_ceil(&self) -> Result<Self, EmulatorErrorKind>;
fn float_floor(&self) -> Result<Self, EmulatorErrorKind>;
fn float_round(&self) -> Result<Self, EmulatorErrorKind>;
fn int_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_not_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_less(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_sless(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_less_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_sless_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_add(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_sub(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_xor(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_and(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_or(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_shift_left(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_shift_right(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_sshift_right(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_mul(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_div(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_rem(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_sdiv(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn int_srem(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn float_add(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn float_sub(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn float_mul(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn float_div(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn float_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn float_not_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn float_less(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
fn float_less_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>;
// Provided method
fn zero(_size: usize) -> Self { ... }
}Expand description
A trait to describe a value This is used to abstract over different types of interpretations (symbolic, concrete, abstract, etc.)
Required Methods§
Sourcefn size(&self) -> Result<usize, EmulatorErrorKind>
fn size(&self) -> Result<usize, EmulatorErrorKind>
Returns the size of this value in bytes
Sourcefn value(&self) -> Result<u64, EmulatorErrorKind>
fn value(&self) -> Result<u64, EmulatorErrorKind>
Attempt to read this value as a little-endian unsigned integer.
fn from_u64(value: u64) -> Self
fn is_float_nan(&self) -> Result<Self, EmulatorErrorKind>
fn int_to_float(&self, size: usize) -> Result<Self, EmulatorErrorKind>
fn float_to_float(&self, size: usize) -> Result<Self, EmulatorErrorKind>
fn float_to_int(&self, size: usize) -> Result<Self, EmulatorErrorKind>
fn zext(&self, size: usize) -> Result<Self, EmulatorErrorKind>
fn sext(&self, size: usize) -> Result<Self, EmulatorErrorKind>
fn range(&self, start: usize, size: usize) -> Result<Self, EmulatorErrorKind>
fn byte_swap(&self) -> Result<Self, EmulatorErrorKind>
Sourcefn intrinsic(
id: IntrinsicId,
args: &[Self],
out_size: usize,
) -> Result<Self, EmulatorErrorKind>
fn intrinsic( id: IntrinsicId, args: &[Self], out_size: usize, ) -> Result<Self, EmulatorErrorKind>
Evaluate a pure intrinsic on its concrete operands, producing an
out_size-byte result via the intrinsic’s shared evaluator.
fn pop_count(&self) -> Result<Self, EmulatorErrorKind>
fn lz_count(&self) -> Result<Self, EmulatorErrorKind>
fn carry(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn scarry(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn sborrow(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_not(&self) -> Result<Self, EmulatorErrorKind>
fn int_negate(&self) -> Result<Self, EmulatorErrorKind>
fn float_negate(&self) -> Result<Self, EmulatorErrorKind>
fn float_abs(&self) -> Result<Self, EmulatorErrorKind>
fn float_sqrt(&self) -> Result<Self, EmulatorErrorKind>
fn float_ceil(&self) -> Result<Self, EmulatorErrorKind>
fn float_floor(&self) -> Result<Self, EmulatorErrorKind>
fn float_round(&self) -> Result<Self, EmulatorErrorKind>
fn int_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_not_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_less(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_sless(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_less_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_sless_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_add(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_sub(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_xor(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_and(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_or(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_shift_left(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_shift_right(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_sshift_right(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_mul(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_div(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_rem(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_sdiv(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn int_srem(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn float_add(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn float_sub(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn float_mul(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn float_div(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn float_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn float_not_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn float_less(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
fn float_less_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".