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§

source

fn bin_op(&self, op: BinOpType, rhs: &Self) -> Self

Compute the (abstract) result of a binary operation

source

fn un_op(&self, op: UnOpType) -> Self

Compute the (abstract) result of a unary operation

source

fn subpiece(&self, low_byte: ByteSize, size: ByteSize) -> Self

Extract a sub-bitvector

source

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§

source

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.

Implementors§