pub trait TransferFunctions {
    type State: AbstractDomain + Clone;

    const BACKWARD: bool;

    // Required method
    fn execute(
        &self,
        state: &mut Self::State,
        instr: &Bytecode,
        offset: CodeOffset
    );

    // Provided method
    fn execute_block(
        &self,
        block_id: BlockId,
        state: Self::State,
        instrs: &[Bytecode],
        cfg: &StacklessControlFlowGraph
    ) -> Self::State { ... }
}
Expand description

Take a pre-state + instruction and mutate it to produce a post-state。

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn execute(&self, state: &mut Self::State, instr: &Bytecode, offset: CodeOffset)

Provided Methods§

source

fn execute_block( &self, block_id: BlockId, state: Self::State, instrs: &[Bytecode], cfg: &StacklessControlFlowGraph ) -> Self::State

Implementors§