Struct winter_verifier::TransitionConstraintDegree [−][src]
pub struct TransitionConstraintDegree { /* fields omitted */ }Expand description
Degree descriptor of a transition constraint.
Describes constraint degree as a combination of multiplications of periodic and trace
registers. For example, degree of a constraint which requires multiplication of two trace
registers can be described as: base: 2, cycles: []. A constraint which requires
multiplication of 3 trace registers and a periodic register with a period of 32 steps can be
described as: base: 3, cycles: [32].
Implementations
Creates a new transition constraint degree descriptor for constraints which involve multiplications of trace registers only.
For example, if a constraint involves multiplication of two trace registers, degree
should be set to 2. If a constraint involves multiplication of three trace registers,
degree should be set to 3 etc.
Panics
Panics if the provided degree is zero.
pub fn with_cycles(
base_degree: usize,
cycles: Vec<usize, Global>
) -> TransitionConstraintDegree
pub fn with_cycles(
base_degree: usize,
cycles: Vec<usize, Global>
) -> TransitionConstraintDegree
Creates a new transition degree descriptor for constraints which involve multiplication of trace registers and periodic columns.
For example, if a constraint involves multiplication of two trace registers and one
periodic column with a period length of 32 steps, base_degree should be set to 2,
and cycles should be set to vec![32].
Panics
Panics if:
base_degreeis zero.- Any of the values in the
cyclesvector is smaller than two or is not powers of two.
Computes a degree to which this degree description expands in the context of execution trace of the specified length.
The expanded degree is computed as follows:
$$ b \cdot (n - 1) + \sum_{i = 0}^{k - 1}{\frac{n \cdot (c_i - 1)}{c_i}} $$
where: $b$ is the base degree, $n$ is the trace_length, $c_i$ is a cycle length of
periodic column $i$, and $k$ is the total number of periodic columns for this degree
descriptor.
Thus, evaluation degree of a transition constraint which involves multiplication of two trace registers and one periodic column with a period length of 32 steps when evaluated over an execution trace of 64 steps would be:
$$ 2 \cdot (64 - 1) + \frac{64 \cdot (32 - 1)}{32} = 126 + 62 = 188 $$
Returns a minimum blowup factor needed to evaluate constraint of this degree.
This is guaranteed to be a power of two, greater than one.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for TransitionConstraintDegree
impl Send for TransitionConstraintDegree
impl Sync for TransitionConstraintDegree
impl Unpin for TransitionConstraintDegree
impl UnwindSafe for TransitionConstraintDegree
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self