pub trait RegisterDomain: AbstractDomain + SizedDomain + HasTop {
// Required methods
fn bin_op(&self, op: BinOpType, rhs: &Self) -> Self;
fn un_op(&self, op: UnOpType) -> Self;
fn subpiece(&self, low_byte: ByteSize, size: ByteSize) -> Self;
fn cast(&self, kind: CastOpType, width: ByteSize) -> Self;
// Provided method
fn bin_op_bytesize(&self, op: BinOpType, rhs: &Self) -> ByteSize { ... }
}
Expand description
A trait for abstract domains that can represent values loaded into CPU register.
The domain implements all general operations used to manipulate register values. The domain is parametrized by its bytesize (which represents the size of the register). It has a Top element, which is only characterized by its bytesize.
Required Methods§
sourcefn bin_op(&self, op: BinOpType, rhs: &Self) -> Self
fn bin_op(&self, op: BinOpType, rhs: &Self) -> Self
Compute the (abstract) result of a binary operation
sourcefn cast(&self, kind: CastOpType, width: ByteSize) -> Self
fn cast(&self, kind: CastOpType, width: ByteSize) -> Self
Perform a typecast to extend a bitvector or to cast between integer and floating point types.
Provided Methods§
sourcefn bin_op_bytesize(&self, op: BinOpType, rhs: &Self) -> ByteSize
fn bin_op_bytesize(&self, op: BinOpType, rhs: &Self) -> ByteSize
Return the bytesize of the result of the given binary operation. Has a generic implementation that should not be overwritten!
Object Safety§
This trait is not object safe.