tasm_lib::traits::closure

Trait Closure

Source
pub trait Closure: BasicSnippet {
    // Required methods
    fn rust_shadow(&self, stack: &mut Vec<BFieldElement>);
    fn pseudorandom_initial_state(
        &self,
        seed: [u8; 32],
        bench_case: Option<BenchmarkCase>,
    ) -> Vec<BFieldElement>;

    // Provided method
    fn corner_case_initial_states(&self) -> Vec<Vec<BFieldElement>> { ... }
}
Expand description

A Closure is a piece of tasm code that modifies the top of the stack without access to memory or nondeterminism or standard input/output.

See also: function, algorithm, read_only_algorithm, procedure, accessor, mem_preserver

Required Methods§

Source

fn rust_shadow(&self, stack: &mut Vec<BFieldElement>)

Source

fn pseudorandom_initial_state( &self, seed: [u8; 32], bench_case: Option<BenchmarkCase>, ) -> Vec<BFieldElement>

Generate a pseudorandom initial state (in this case, just the opstack) from the given seed.

Provided Methods§

Implementors§