Skip to main content

DomainValue

Trait DomainValue 

Source
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§

Source

fn size(&self) -> Result<usize, EmulatorErrorKind>

Returns the size of this value in bytes

Source

fn value(&self) -> Result<u64, EmulatorErrorKind>

Attempt to read this value as a little-endian unsigned integer.

Source

fn from_u64(value: u64) -> Self

Source

fn is_float_nan(&self) -> Result<Self, EmulatorErrorKind>

Source

fn int_to_float(&self, size: usize) -> Result<Self, EmulatorErrorKind>

Source

fn float_to_float(&self, size: usize) -> Result<Self, EmulatorErrorKind>

Source

fn float_to_int(&self, size: usize) -> Result<Self, EmulatorErrorKind>

Source

fn zext(&self, size: usize) -> Result<Self, EmulatorErrorKind>

Source

fn sext(&self, size: usize) -> Result<Self, EmulatorErrorKind>

Source

fn range(&self, start: usize, size: usize) -> Result<Self, EmulatorErrorKind>

Source

fn byte_swap(&self) -> Result<Self, EmulatorErrorKind>

Source

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.

Source

fn pop_count(&self) -> Result<Self, EmulatorErrorKind>

Source

fn lz_count(&self) -> Result<Self, EmulatorErrorKind>

Source

fn carry(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn scarry(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn sborrow(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_not(&self) -> Result<Self, EmulatorErrorKind>

Source

fn int_negate(&self) -> Result<Self, EmulatorErrorKind>

Source

fn float_negate(&self) -> Result<Self, EmulatorErrorKind>

Source

fn float_abs(&self) -> Result<Self, EmulatorErrorKind>

Source

fn float_sqrt(&self) -> Result<Self, EmulatorErrorKind>

Source

fn float_ceil(&self) -> Result<Self, EmulatorErrorKind>

Source

fn float_floor(&self) -> Result<Self, EmulatorErrorKind>

Source

fn float_round(&self) -> Result<Self, EmulatorErrorKind>

Source

fn int_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_not_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_less(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_sless(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_less_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_sless_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_add(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_sub(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_xor(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_and(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_or(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_shift_left(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_shift_right(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_sshift_right(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_mul(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_div(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_rem(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_sdiv(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn int_srem(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn float_add(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn float_sub(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn float_mul(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn float_div(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn float_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn float_not_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn float_less(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source

fn float_less_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Provided Methods§

Source

fn zero(_size: usize) -> Self

Creates an all-zero value at size bytes. Domains that track width should override this; the default preserves compatibility for domains that only have a machine-word zero representation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§