pub struct SymbolicRapBuilder<F> { /* private fields */ }
Expand description
An AirBuilder
for evaluating constraints symbolically, and recording them for later use.
Implementations§
Source§impl<F: Field> SymbolicRapBuilder<F>
impl<F: Field> SymbolicRapBuilder<F>
pub fn constraints(self) -> SymbolicConstraints<F>
pub fn params(&self) -> StarkVerifyingParams
pub fn width(&self) -> TraceWidth
pub fn num_exposed_values_after_challenge(&self) -> Vec<usize>
pub fn num_challenges_to_sample(&self) -> Vec<usize>
Trait Implementations§
Source§impl<F: Field> AirBuilder for SymbolicRapBuilder<F>
impl<F: Field> AirBuilder for SymbolicRapBuilder<F>
Source§fn main(&self) -> Self::M
fn main(&self) -> Self::M
It is difficult to horizontally concatenate matrices when the main trace is partitioned, so we disable this method in that case.
type F = F
type Expr = SymbolicExpression<<SymbolicRapBuilder<F> as AirBuilder>::F>
type Var = SymbolicVariable<<SymbolicRapBuilder<F> as AirBuilder>::F>
type M = DenseMatrix<<SymbolicRapBuilder<F> as AirBuilder>::Var>
fn is_first_row(&self) -> Self::Expr
fn is_last_row(&self) -> Self::Expr
fn is_transition_window(&self, size: usize) -> Self::Expr
fn assert_zero<I: Into<Self::Expr>>(&mut self, x: I)
fn is_transition(&self) -> Self::Expr
Source§fn when<I>(&mut self, condition: I) -> FilteredAirBuilder<'_, Self>
fn when<I>(&mut self, condition: I) -> FilteredAirBuilder<'_, Self>
Returns a sub-builder whose constraints are enforced only when
condition
is nonzero.Source§fn when_ne<I1, I2>(&mut self, x: I1, y: I2) -> FilteredAirBuilder<'_, Self>
fn when_ne<I1, I2>(&mut self, x: I1, y: I2) -> FilteredAirBuilder<'_, Self>
Returns a sub-builder whose constraints are enforced only when
x != y
.Source§fn when_first_row(&mut self) -> FilteredAirBuilder<'_, Self>
fn when_first_row(&mut self) -> FilteredAirBuilder<'_, Self>
Returns a sub-builder whose constraints are enforced only on the first row.
Source§fn when_last_row(&mut self) -> FilteredAirBuilder<'_, Self>
fn when_last_row(&mut self) -> FilteredAirBuilder<'_, Self>
Returns a sub-builder whose constraints are enforced only on the last row.
Source§fn when_transition(&mut self) -> FilteredAirBuilder<'_, Self>
fn when_transition(&mut self) -> FilteredAirBuilder<'_, Self>
Returns a sub-builder whose constraints are enforced on all rows except the last.
Source§fn when_transition_window(
&mut self,
size: usize,
) -> FilteredAirBuilder<'_, Self>
fn when_transition_window( &mut self, size: usize, ) -> FilteredAirBuilder<'_, Self>
Returns a sub-builder whose constraints are enforced on all rows except the last
size - 1
.fn assert_one<I>(&mut self, x: I)
fn assert_eq<I1, I2>(&mut self, x: I1, y: I2)
Source§fn assert_bool<I>(&mut self, x: I)
fn assert_bool<I>(&mut self, x: I)
Assert that
x
is a boolean, i.e. either 0 or 1.Source§impl<F: Field> AirBuilderWithPublicValues for SymbolicRapBuilder<F>
impl<F: Field> AirBuilderWithPublicValues for SymbolicRapBuilder<F>
type PublicVar = SymbolicVariable<F>
fn public_values(&self) -> &[Self::PublicVar]
Source§impl<F: Debug> Debug for SymbolicRapBuilder<F>
impl<F: Debug> Debug for SymbolicRapBuilder<F>
Source§impl<F: Field> ExtensionBuilder for SymbolicRapBuilder<F>
impl<F: Field> ExtensionBuilder for SymbolicRapBuilder<F>
type EF = F
type ExprEF = SymbolicExpression<F>
type VarEF = SymbolicVariable<F>
fn assert_zero_ext<I>(&mut self, x: I)
fn assert_eq_ext<I1, I2>(&mut self, x: I1, y: I2)
fn assert_one_ext<I>(&mut self, x: I)
Source§impl<F: Field> InteractionBuilder for SymbolicRapBuilder<F>
impl<F: Field> InteractionBuilder for SymbolicRapBuilder<F>
Source§fn push_interaction<E: Into<Self::Expr>>(
&mut self,
bus_index: usize,
fields: impl IntoIterator<Item = E>,
count: impl Into<Self::Expr>,
interaction_type: InteractionType,
)
fn push_interaction<E: Into<Self::Expr>>( &mut self, bus_index: usize, fields: impl IntoIterator<Item = E>, count: impl Into<Self::Expr>, interaction_type: InteractionType, )
Stores a new interaction in the builder.
Source§fn num_interactions(&self) -> usize
fn num_interactions(&self) -> usize
Returns the current number of interactions.
Source§fn all_interactions(&self) -> &[Interaction<Self::Expr>]
fn all_interactions(&self) -> &[Interaction<Self::Expr>]
Returns all interactions stored.
Source§fn push_send<E: Into<Self::Expr>>(
&mut self,
bus_index: usize,
fields: impl IntoIterator<Item = E>,
count: impl Into<Self::Expr>,
)
fn push_send<E: Into<Self::Expr>>( &mut self, bus_index: usize, fields: impl IntoIterator<Item = E>, count: impl Into<Self::Expr>, )
Stores a new send interaction in the builder.
Source§fn push_receive<E: Into<Self::Expr>>(
&mut self,
bus_index: usize,
fields: impl IntoIterator<Item = E>,
count: impl Into<Self::Expr>,
)
fn push_receive<E: Into<Self::Expr>>( &mut self, bus_index: usize, fields: impl IntoIterator<Item = E>, count: impl Into<Self::Expr>, )
Stores a new receive interaction in the builder.
Source§impl<F: Field> PairBuilder for SymbolicRapBuilder<F>
impl<F: Field> PairBuilder for SymbolicRapBuilder<F>
fn preprocessed(&self) -> Self::M
Source§impl<F: Field> PartitionedAirBuilder for SymbolicRapBuilder<F>
impl<F: Field> PartitionedAirBuilder for SymbolicRapBuilder<F>
Source§fn cached_mains(&self) -> &[Self::M]
fn cached_mains(&self) -> &[Self::M]
Cached main trace matrix.
Source§fn common_main(&self) -> &Self::M
fn common_main(&self) -> &Self::M
Common main trace matrix. Panic if there is no common main trace.
Source§impl<F: Field> PermutationAirBuilder for SymbolicRapBuilder<F>
impl<F: Field> PermutationAirBuilder for SymbolicRapBuilder<F>
type MP = DenseMatrix<<SymbolicRapBuilder<F> as ExtensionBuilder>::VarEF>
type RandomVar = SymbolicVariable<F>
fn permutation(&self) -> Self::MP
fn permutation_randomness(&self) -> &[Self::RandomVar]
Source§impl<F: Field> PermutationAirBuilderWithExposedValues for SymbolicRapBuilder<F>
impl<F: Field> PermutationAirBuilderWithExposedValues for SymbolicRapBuilder<F>
fn permutation_exposed_values(&self) -> &[Self::VarEF]
Auto Trait Implementations§
impl<F> Freeze for SymbolicRapBuilder<F>
impl<F> RefUnwindSafe for SymbolicRapBuilder<F>where
F: RefUnwindSafe,
impl<F> Send for SymbolicRapBuilder<F>
impl<F> Sync for SymbolicRapBuilder<F>
impl<F> Unpin for SymbolicRapBuilder<F>where
F: Unpin,
impl<F> UnwindSafe for SymbolicRapBuilder<F>where
F: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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