Struct FuzzingTrace

Source
pub(crate) struct FuzzingTrace {
    trace: Vec<u32>,
    branch_to_feature_map: HashMap<(usize, usize), usize>,
}
Expand description

Context structure for all information necessary to compute the fuzzing trace

Fields§

§trace: Vec<u32>

Fuzzer tracing memory.

It records each time a key in the branch_to_feature_map was observed. Its length is equal to that of the branch_to_feature_map.

§branch_to_feature_map: HashMap<(usize, usize), usize>

Branch to feature map for fuzzing. Maps program counter + feature to index in the trace vector.

Implementations§

Source§

impl FuzzingTrace

Source

fn branch_state(cond: bool) -> usize

Source

fn log_range_state(log: usize) -> usize

Source

pub(crate) fn new(branch_to_feature_map: HashMap<(usize, usize), usize>) -> Self

Source

fn record_branch(&mut self, pc: usize, destination: usize)

Source

fn record_conditional_mov(&mut self, pc: usize, branch: bool)

Source

fn record_binary_field_op_comparison<F: AcirField>( &mut self, pc: usize, op: &BinaryFieldOp, lhs: MemoryValue<F>, rhs: MemoryValue<F>, result: MemoryValue<F>, )

Source

fn record_binary_int_op_comparison<F: AcirField>( &mut self, pc: usize, op: &BinaryIntOp, lhs: MemoryValue<F>, rhs: MemoryValue<F>, result: MemoryValue<F>, )

Source

pub(crate) fn get_trace(&self) -> Vec<u32>

Trait Implementations§

Source§

impl Clone for FuzzingTrace

Source§

fn clone(&self) -> FuzzingTrace

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FuzzingTrace

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FuzzingTrace

Source§

fn default() -> FuzzingTrace

Returns the “default value” for a type. Read more
Source§

impl PartialEq for FuzzingTrace

Source§

fn eq(&self, other: &FuzzingTrace) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for FuzzingTrace

Source§

impl StructuralPartialEq for FuzzingTrace

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V