pub trait Accessor: BasicSnippet {
// Required methods
fn rust_shadow(
&self,
stack: &mut Vec<BFieldElement>,
memory: &HashMap<BFieldElement, BFieldElement>,
);
fn pseudorandom_initial_state(
&self,
seed: [u8; 32],
bench_case: Option<BenchmarkCase>,
) -> AccessorInitialState;
// Provided method
fn corner_case_initial_states(&self) -> Vec<AccessorInitialState> { ... }
}
Expand description
An Accessor can modify that stack but only read from memory
An Accessor is a piece of tasm code that can read from and write to the stack but can only read from memory. Note that it cannot write to static memory. It cannot read from any inputs or write to standard out. It cannot modify the sponge state. See also: closure, function, procedure, algorithm, read_only_algorithm, mem_preserver