pub struct ZkDebugger<S> { /* private fields */ }Expand description
ZKP Debugger with CDF backend
Implementations§
Source§impl<S> ZkDebugger<S>
impl<S> ZkDebugger<S>
Sourcepub fn add_breakpoint(&mut self, source: String, line: Option<u64>) -> usize
pub fn add_breakpoint(&mut self, source: String, line: Option<u64>) -> usize
Add a breakpoint to the provided source/line
If line is None, the breakpoint will be triggered in any incidence of source
Sourcepub fn remove_breakpoint(&mut self, id: usize) -> Option<Breakpoint>
pub fn remove_breakpoint(&mut self, id: usize) -> Option<Breakpoint>
Remove a breakpoint with the provided id.
If the id is not in the set, will return None.
Sourcepub fn fetch_breakpoint(&mut self, id: usize) -> Option<&Breakpoint>
pub fn fetch_breakpoint(&mut self, id: usize) -> Option<&Breakpoint>
Fetch a breakpoint from an id returned from add_breakpoint.
Source§impl<S> ZkDebugger<S>
impl<S> ZkDebugger<S>
Sourcepub fn from_reader(source: S) -> Result<Self>
pub fn from_reader(source: S) -> Result<Self>
Create a CDF with the provided source and use it as backend for the debugger
Sourcepub fn fetch_current_constraint(&mut self) -> Result<Constraint<'_>>
pub fn fetch_current_constraint(&mut self) -> Result<Constraint<'_>>
Attempt to fetch the current constraint from the source
Sourcepub fn fetch_constraint(&mut self, idx: usize) -> Result<Constraint<'_>>
pub fn fetch_constraint(&mut self, idx: usize) -> Result<Constraint<'_>>
Attempt to read an indexed constraint from the source
Sourcepub fn fetch_witness(&mut self, idx: usize) -> Result<Witness<'_>>
pub fn fetch_witness(&mut self, idx: usize) -> Result<Witness<'_>>
Attempt to read an indexed witness from the source
Sourcepub fn afore(&mut self) -> Result<State>
pub fn afore(&mut self) -> Result<State>
Move to previous source/line.
May jump more than one constraint in case we have multiple constraints defined in a single source/file tuple.
Sourcepub fn cont(&mut self) -> Result<State>
pub fn cont(&mut self) -> Result<State>
Continue the execution until EOF, breakpoint, or invalid constraint.
Methods from Deref<Target = CircuitDescription<S>>§
Sourcepub fn source_name_contains(&self, name: &str) -> bool
pub fn source_name_contains(&self, name: &str) -> bool
Check if the provided name is contained within the available source names
Sourcepub fn fetch_constraint(&mut self, idx: usize) -> Result<Constraint<'_>>
pub fn fetch_constraint(&mut self, idx: usize) -> Result<Constraint<'_>>
Attempt to read an indexed constraint from the source
Sourcepub fn fetch_witness(&mut self, idx: usize) -> Result<Witness<'_>>
pub fn fetch_witness(&mut self, idx: usize) -> Result<Witness<'_>>
Attempt to read an indexed witness from the source
Trait Implementations§
Source§impl<S: Clone> Clone for ZkDebugger<S>
impl<S: Clone> Clone for ZkDebugger<S>
Source§fn clone(&self) -> ZkDebugger<S>
fn clone(&self) -> ZkDebugger<S>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more