tasm_lib::traits::read_only_algorithm

Trait ReadOnlyAlgorithm

Source
pub trait ReadOnlyAlgorithm: BasicSnippet {
    // Required methods
    fn rust_shadow(
        &self,
        stack: &mut Vec<BFieldElement>,
        memory: &HashMap<BFieldElement, BFieldElement>,
        nd_tokens: VecDeque<BFieldElement>,
        nd_digests: VecDeque<Digest>,
    );
    fn pseudorandom_initial_state(
        &self,
        seed: [u8; 32],
        bench_case: Option<BenchmarkCase>,
    ) -> ReadOnlyAlgorithmInitialState;

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

An ReadOnlyAlgorithm can read memory and take ND_input.

An ReadOnlyAlgorithm is a piece of tasm code that can read memory and read from non-determinism.

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

Required Methods§

Provided Methods§

Implementors§