Skip to main content

TargetSemantics

Trait TargetSemantics 

Source
pub trait TargetSemantics {
    type State;

    // Required methods
    fn fresh_state(&self) -> Self::State;
    fn apply_op(
        &self,
        state: &Self::State,
        op_name: &str,
        inputs: &[BV],
    ) -> Option<Self::State>;
    fn extract_result(
        &self,
        state: &Self::State,
        result_loc: &str,
    ) -> Option<BV>;
}
Expand description

Encodes target (ARM, RISC-V, etc.) operation semantics as SMT formulas

Required Associated Types§

Source

type State

The target state type (registers, flags, memory)

Required Methods§

Source

fn fresh_state(&self) -> Self::State

Create a fresh symbolic state

Source

fn apply_op( &self, state: &Self::State, op_name: &str, inputs: &[BV], ) -> Option<Self::State>

Apply a target operation to the state, returning updated state

Source

fn extract_result(&self, state: &Self::State, result_loc: &str) -> Option<BV>

Extract the result bitvector from a state (e.g. read Rd register)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§