Skip to content

Commit

Permalink
docs: remove repetitive words
Browse files Browse the repository at this point in the history
Signed-off-by: RiceChuan <[email protected]>
  • Loading branch information
RiceChuan committed Dec 11, 2024
1 parent b13ed4d commit f7a9f57
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion air/src/constraints/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::{
pub const NUM_ASSERTIONS: usize = 2;
/// The number of transition constraints required by the Range Checker.
pub const NUM_CONSTRAINTS: usize = 1;
/// The degrees of the range checker's constraints, in the order they'll be added to the the result
/// The degrees of the range checker's constraints, in the order they'll be added to the result
/// array when a transition is evaluated.
pub const CONSTRAINT_DEGREES: [usize; NUM_CONSTRAINTS] = [
9, // Enforce values of column v transition.
Expand Down
2 changes: 1 addition & 1 deletion assembly/src/assembler/mast_forest_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ impl IndexMut<DecoratorId> for MastForestBuilder {

/// Determines if we want to merge a block with other blocks. Currently, this works as follows:
/// - If the block is a procedure, we merge it only if the number of operation batches is smaller
/// then the threshold (currently set at 32). The reasoning is based on an estimate of the the
/// then the threshold (currently set at 32). The reasoning is based on an estimate of the
/// runtime penalty of not inlining the procedure. We assume that this penalty is roughly 3 extra
/// nodes in the MAST and so would require 3 additional hashes at runtime. Since hashing each
/// operation batch requires 1 hash, this basically implies that if the runtime penalty is more
Expand Down
2 changes: 1 addition & 1 deletion assembly/src/ast/attribute/meta/kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl MetaKeyValue {
self.items.entry(key)
}

/// Get an iterator over the the key-value items of this metadata
/// Get an iterator over the key-value items of this metadata
#[inline]
pub fn iter(&self) -> impl Iterator<Item = (&Ident, &MetaExpr)> {
self.items.iter()
Expand Down
2 changes: 1 addition & 1 deletion assembly/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2209,7 +2209,7 @@ fn program_with_reexported_proc_in_another_library() -> TestResult {
let dummy_library =
Assembler::new(source_manager).with_module(ref_ast)?.assemble_library([ast])?;

// Now we want to use the the library we've compiled
// Now we want to use the library we've compiled
context.add_library(&dummy_library)?;

let source = source_file!(
Expand Down
2 changes: 1 addition & 1 deletion processor/src/chiplets/memory/segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl MemorySegmentTrace {

// since we record memory state at the end of a given cycle, to get memory state at the end
// of a cycle, we need to look at the previous cycle. that is, memory state at the end of
// the previous cycle is the same as memory state the the beginning of the current cycle.
// the previous cycle is the same as memory state the beginning of the current cycle.
let search_clk: u64 = (clk - 1).into();

for (&addr, addr_trace) in self.0.iter() {
Expand Down
2 changes: 1 addition & 1 deletion processor/src/operations/comb_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ where
///
/// Here:
///
/// 1. Ti for i in 0..=7 stands for the the value of the i-th trace polynomial for the current
/// 1. Ti for i in 0..=7 stands for the value of the i-th trace polynomial for the current
/// query i.e. T_i(x).
/// 2. (p0, p1) stands for an extension field element accumulating the values for the quotients
/// with common denominator (x - z).
Expand Down
4 changes: 2 additions & 2 deletions stdlib/asm/crypto/stark/deep_queries.masm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use.std::crypto::stark::constants
#!
#!
#! Here:
#! 1- Ti for i in 0..=7 stands for the the value of the i-th trace polynomial for the current query i.e. T_i(x).
#! 1- Ti for i in 0..=7 stands for the value of the i-th trace polynomial for the current query i.e. T_i(x).
#! 2- (p0, p1) stands for an extension field element accumulating the values for the quotients with common denominator (x - gz).
#! 3- (r0, r1) stands for an extension field element accumulating the values for the quotients with common denominator (x - z).
#! 4- x_addr is the memory address from which we are loading the Ti's using the MSTREAM instruction.
Expand Down Expand Up @@ -149,7 +149,7 @@ end
#!
#!
#! Here:
#! 1- Tij for i in 0..=3 and j=0,1 stands for the the value of the j-th coordinate in the quadratic extension field
#! 1- Tij for i in 0..=3 and j=0,1 stands for the value of the j-th coordinate in the quadratic extension field
#! of the i-th auxiliary trace polynomial for the current query i.e. $T_i(x)$.
#! 2- (p0, p1) stands for an extension field element accumulating the values for the quotients with common denominator (x - gz).
#! 3- (r0, r1) stands for an extension field element accumulating the values for the quotients with common denominator (x - z).
Expand Down
4 changes: 2 additions & 2 deletions stdlib/docs/crypto/stark/deep_queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
## std::crypto::stark::deep_queries
| Procedure | Description |
| ----------- | ------------- |
| combine_main | Computes a single step of the random linear combination defining the DEEP composition polynomial<br />that is the input to the FRI protocol. More precisely, the sum in question is:<br />$$<br />\sum_{i=0}^k{\alpha_i \cdot \left(\frac{T_i(x) - T_i(z)}{x - z} +<br />\frac{T_i(x) - T_i(z \cdot g)}{x - z \cdot g} \right)}<br />$$<br /><br />and the following instruction computes the denominators $\alpha_i \cdot (T_i(x) - T_i(z))$ and<br />$\alpha_i \cdot (T_i(x) - T_i(z \cdot g))$ and stores the values in two accumulators $r$ and $p$,<br />respectively. This instruction is specialized to main trace columns i.e. the values $T_i(x)$ are<br />base field elements.<br /><br />The stack transition of the instruction can be visualized as follows:<br /><br />+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+---+<br />\| T7 \| T6 \| T5 \| T4 \| T3 \| T2 \| T1 \| T0 \| p1 \| p0 \| r1 \| r0 \|x_addr\|z_addr\|a_addr\| - \|<br />+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+---+<br /><br />\|\|<br />\/<br /><br />+------+------+------+------+------+------+------+------+------+------+------+------+------+--------+--------+---+<br />\| T0 \| T7 \| T6 \| T5 \| T4 \| T3 \| T2 \| T1 \| p1' \| p0' \| r1' \| r0' \|x_addr\|z_addr+1\|a_addr+1\| - \|<br />+------+------+------+------+------+------+------+------+------+------+------+------+------+--------+--------+---+<br /><br /><br />Here:<br />1- Ti for i in 0..=7 stands for the the value of the i-th trace polynomial for the current query i.e. T_i(x).<br />2- (p0, p1) stands for an extension field element accumulating the values for the quotients with common denominator (x - gz).<br />3- (r0, r1) stands for an extension field element accumulating the values for the quotients with common denominator (x - z).<br />4- x_addr is the memory address from which we are loading the Ti's using the MSTREAM instruction.<br />5- z_addr is the memory address to the i-th OOD evaluation frame at z and gz i.e. T_i(z):= (T_i(z)0, T_i(z)1)<br />and T_i(gz):= (T_i(gz)0, T_i(gz)1)<br />6- a_addr is the memory address of the i-th random element used in batching the trace polynomial quotients.<br />The random elements a := (a0, a1) are stored in memory as [0, 0, a0, a1].<br /><br />Input: [T7, T6, T5, T4, T3, T2, T1, T0, p1, p0, r1, r0, x_addr, z_addr, a_addr, 0]<br />Output: [T0, T7, T6, T5, T4, T3, T2, T1, p1', p0', r1', r0', x_addr, z_addr+1, a_addr+1, 0]<br /> |
| combine_aux | Computes a single step of the random linear combination defining the DEEP composition polynomial<br />that is the input to the FRI protocol. More precisely, the sum in question is:<br />$$<br />\sum_{i=0}^k{\alpha_i \cdot \left(\frac{T_i(x) - T_i(z)}{x - z} +<br />\frac{T_i(x) - T_i(z \cdot g)}{x - z \cdot g} \right)}<br />$$<br /><br />and the following instruction computes the denominators $\alpha_i \cdot (T_i(x) - T_i(z))$ and<br />$\alpha_i \cdot (T_i(x) - T_i(z \cdot g))$ and stores the values in two accumulators $r$ and $p$,<br />respectively. This instruction is specialized to auxiliary trace columns i.e. the values $T_i(x)$<br />are field elements in a quadratic extension field.<br /><br />The stack transition of the instruction can be visualized as follows:<br /><br />+-------+-------+-------+-------+-------+-------+-------+-------+------+------+------+------+------+------+------+---+<br />\| T31 \| T30 \| T21 \| T20 \| T11 \| T10 \| T01 \| T00 \| p1 \| p0 \| r1 \| r0 \|x_addr\|z_addr\|a_addr\| - \|<br />+-------+-------+-------+-------+-------+-------+-------+-------+------+------+------+------+------+------+------+---+<br /><br />\|\|<br />\/<br /><br />+-------+-------+-------+-------+-------+-------+-------+-------+------+------+------+------+------+--------+--------+-----+<br />\| T31 \| T30 \| T21 \| T20 \| T11 \| T10 \| T01 \| T00 \| p1' \| p0' \| r1' \| r0' \|x_addr\|z_addr+1\|a_addr+b\| - \|<br />+-------+-------+-------+-------+-------+-------+-------+-------+------+------+------+------+------+--------+--------------+<br /><br /><br />Here:<br />1- Tij for i in 0..=3 and j=0,1 stands for the the value of the j-th coordinate in the quadratic extension field<br />of the i-th auxiliary trace polynomial for the current query i.e. $T_i(x)$.<br />2- (p0, p1) stands for an extension field element accumulating the values for the quotients with common denominator (x - gz).<br />3- (r0, r1) stands for an extension field element accumulating the values for the quotients with common denominator (x - z).<br />4- x_addr is the memory address from which we are loading the Ti's using the MSTREAM instruction.<br />5- z_addr is the memory address to the i-th OOD evaluation frame at z and gz i.e. T_i(z):= (T_i(z)0, T_i(z)1) and T_i(gz):= (T_i(gz)0, T_i(gz)1)<br />6- a_addr is the memory address of the i-th random element used in batching the trace polynomial quotients.<br />The random elements a := (a0, a1) are stored in memory as [0, 0, a0, a1].<br /><br />Input: [T31, T30, T21, T20, T11, T10, T01, T00, p1, p0, r1, r0, x_addr, z_addr, a_addr, 0]<br />Output: [T01, T00, T31, T30, T21, T20, T11, T10, p1', p0', r1', r0', x_addr, z_addr', a_addr', 0]<br /> |
| combine_main | Computes a single step of the random linear combination defining the DEEP composition polynomial<br />that is the input to the FRI protocol. More precisely, the sum in question is:<br />$$<br />\sum_{i=0}^k{\alpha_i \cdot \left(\frac{T_i(x) - T_i(z)}{x - z} +<br />\frac{T_i(x) - T_i(z \cdot g)}{x - z \cdot g} \right)}<br />$$<br /><br />and the following instruction computes the denominators $\alpha_i \cdot (T_i(x) - T_i(z))$ and<br />$\alpha_i \cdot (T_i(x) - T_i(z \cdot g))$ and stores the values in two accumulators $r$ and $p$,<br />respectively. This instruction is specialized to main trace columns i.e. the values $T_i(x)$ are<br />base field elements.<br /><br />The stack transition of the instruction can be visualized as follows:<br /><br />+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+---+<br />\| T7 \| T6 \| T5 \| T4 \| T3 \| T2 \| T1 \| T0 \| p1 \| p0 \| r1 \| r0 \|x_addr\|z_addr\|a_addr\| - \|<br />+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+---+<br /><br />\|\|<br />\/<br /><br />+------+------+------+------+------+------+------+------+------+------+------+------+------+--------+--------+---+<br />\| T0 \| T7 \| T6 \| T5 \| T4 \| T3 \| T2 \| T1 \| p1' \| p0' \| r1' \| r0' \|x_addr\|z_addr+1\|a_addr+1\| - \|<br />+------+------+------+------+------+------+------+------+------+------+------+------+------+--------+--------+---+<br /><br /><br />Here:<br />1- Ti for i in 0..=7 stands for the value of the i-th trace polynomial for the current query i.e. T_i(x).<br />2- (p0, p1) stands for an extension field element accumulating the values for the quotients with common denominator (x - gz).<br />3- (r0, r1) stands for an extension field element accumulating the values for the quotients with common denominator (x - z).<br />4- x_addr is the memory address from which we are loading the Ti's using the MSTREAM instruction.<br />5- z_addr is the memory address to the i-th OOD evaluation frame at z and gz i.e. T_i(z):= (T_i(z)0, T_i(z)1)<br />and T_i(gz):= (T_i(gz)0, T_i(gz)1)<br />6- a_addr is the memory address of the i-th random element used in batching the trace polynomial quotients.<br />The random elements a := (a0, a1) are stored in memory as [0, 0, a0, a1].<br /><br />Input: [T7, T6, T5, T4, T3, T2, T1, T0, p1, p0, r1, r0, x_addr, z_addr, a_addr, 0]<br />Output: [T0, T7, T6, T5, T4, T3, T2, T1, p1', p0', r1', r0', x_addr, z_addr+1, a_addr+1, 0]<br /> |
| combine_aux | Computes a single step of the random linear combination defining the DEEP composition polynomial<br />that is the input to the FRI protocol. More precisely, the sum in question is:<br />$$<br />\sum_{i=0}^k{\alpha_i \cdot \left(\frac{T_i(x) - T_i(z)}{x - z} +<br />\frac{T_i(x) - T_i(z \cdot g)}{x - z \cdot g} \right)}<br />$$<br /><br />and the following instruction computes the denominators $\alpha_i \cdot (T_i(x) - T_i(z))$ and<br />$\alpha_i \cdot (T_i(x) - T_i(z \cdot g))$ and stores the values in two accumulators $r$ and $p$,<br />respectively. This instruction is specialized to auxiliary trace columns i.e. the values $T_i(x)$<br />are field elements in a quadratic extension field.<br /><br />The stack transition of the instruction can be visualized as follows:<br /><br />+-------+-------+-------+-------+-------+-------+-------+-------+------+------+------+------+------+------+------+---+<br />\| T31 \| T30 \| T21 \| T20 \| T11 \| T10 \| T01 \| T00 \| p1 \| p0 \| r1 \| r0 \|x_addr\|z_addr\|a_addr\| - \|<br />+-------+-------+-------+-------+-------+-------+-------+-------+------+------+------+------+------+------+------+---+<br /><br />\|\|<br />\/<br /><br />+-------+-------+-------+-------+-------+-------+-------+-------+------+------+------+------+------+--------+--------+-----+<br />\| T31 \| T30 \| T21 \| T20 \| T11 \| T10 \| T01 \| T00 \| p1' \| p0' \| r1' \| r0' \|x_addr\|z_addr+1\|a_addr+b\| - \|<br />+-------+-------+-------+-------+-------+-------+-------+-------+------+------+------+------+------+--------+--------------+<br /><br /><br />Here:<br />1- Tij for i in 0..=3 and j=0,1 stands for the value of the j-th coordinate in the quadratic extension field<br />of the i-th auxiliary trace polynomial for the current query i.e. $T_i(x)$.<br />2- (p0, p1) stands for an extension field element accumulating the values for the quotients with common denominator (x - gz).<br />3- (r0, r1) stands for an extension field element accumulating the values for the quotients with common denominator (x - z).<br />4- x_addr is the memory address from which we are loading the Ti's using the MSTREAM instruction.<br />5- z_addr is the memory address to the i-th OOD evaluation frame at z and gz i.e. T_i(z):= (T_i(z)0, T_i(z)1) and T_i(gz):= (T_i(gz)0, T_i(gz)1)<br />6- a_addr is the memory address of the i-th random element used in batching the trace polynomial quotients.<br />The random elements a := (a0, a1) are stored in memory as [0, 0, a0, a1].<br /><br />Input: [T31, T30, T21, T20, T11, T10, T01, T00, p1, p0, r1, r0, x_addr, z_addr, a_addr, 0]<br />Output: [T01, T00, T31, T30, T21, T20, T11, T10, p1', p0', r1', r0', x_addr, z_addr', a_addr', 0]<br /> |
| compute_deep_composition_polynomial_queries | Compute the DEEP composition polynomial FRI queries.<br /><br />Input: [query_ptr, ...]<br />Output: [...]<br />Cycles: 6 + num_queries * 463<br /> |

0 comments on commit f7a9f57

Please sign in to comment.