From de98a4c2831f965f9168e73b50ad5d60d95d002f Mon Sep 17 00:00:00 2001 From: Jan Ferdinand Sauer Date: Tue, 11 Jul 2023 08:37:59 +0200 Subject: [PATCH] fix broken links in doc-comments --- constraint-evaluation-generator/src/main.rs | 2 +- triton-vm/src/lib.rs | 11 ++++++----- triton-vm/src/proof_item.rs | 2 +- triton-vm/src/proof_stream.rs | 2 +- triton-vm/src/table/challenges.rs | 4 ++-- triton-vm/src/table/constraint_circuit.rs | 2 +- triton-vm/src/table/hash_table.rs | 4 ++-- triton-vm/src/table/table_column.rs | 8 +++++--- 8 files changed, 19 insertions(+), 16 deletions(-) diff --git a/constraint-evaluation-generator/src/main.rs b/constraint-evaluation-generator/src/main.rs index 9b44c74d..35c6a082 100644 --- a/constraint-evaluation-generator/src/main.rs +++ b/constraint-evaluation-generator/src/main.rs @@ -694,7 +694,7 @@ fn generate_degree_lowering_table_code( quote!( //! The degree lowering table contains the introduced variables that allow //! lowering the degree of the AIR. See - //! [`master_table::AIR_TARGET_DEGREE`] + //! [`crate::table::master_table::AIR_TARGET_DEGREE`] //! for additional information. //! //! This file has been auto-generated. Any modifications _will_ be lost. diff --git a/triton-vm/src/lib.rs b/triton-vm/src/lib.rs index 8e67d8bf..e7a1a985 100644 --- a/triton-vm/src/lib.rs +++ b/triton-vm/src/lib.rs @@ -37,7 +37,8 @@ pub mod vm; #[macro_use] pub mod macros { /// Parse an entire program written in [Triton assembly][tasm]. - /// The resulting [`Program`] can be [run](Program::run). + /// The resulting [`Program`](crate::program::Program) can be + /// [run](crate::program::Program::run). /// /// It is possible to use string-like interpolation to insert instructions, arguments, labels, /// or other substrings into the program. @@ -62,9 +63,9 @@ pub mod macros { /// /// Any type with an appropriate [`Display`](std::fmt::Display) implementation can be /// interpolated. This includes, for example, primitive types like `u64` and `&str`, but also - /// [`Instruction`](instruction::Instruction)s, - /// [`BFieldElement`](triton_vm::BFieldElement)s, and - /// [`Label`](instruction::LabelledInstruction)s, among others. + /// [`Instruction`](crate::instruction::Instruction)s, + /// [`BFieldElement`](crate::BFieldElement)s, and + /// [`Label`](crate::instruction::LabelledInstruction)s, among others. /// /// ``` /// # use triton_vm::triton_program; @@ -106,7 +107,7 @@ pub mod macros { } /// Parse [Triton assembly][tasm] into a list of labelled - /// [`Instruction`](instruction::LabelledInstruction)s. + /// [`Instruction`](crate::instruction::LabelledInstruction)s. /// Similar to [`triton_program!`](crate::triton_program), it is possible to use string-like /// interpolation to insert instructions, arguments, labels, or other expressions. /// diff --git a/triton-vm/src/proof_item.rs b/triton-vm/src/proof_item.rs index b313ea50..f07a4018 100644 --- a/triton-vm/src/proof_item.rs +++ b/triton-vm/src/proof_item.rs @@ -9,7 +9,7 @@ use twenty_first::shared_math::x_field_element::XFieldElement; type AuthenticationStructure = Vec; -/// A `FriResponse` is an [`AuthenticationStructure`] together with the values of the +/// A `FriResponse` is an `AuthenticationStructure` together with the values of the /// revealed leaves of the Merkle tree. Together, they correspond to the /// queried indices of the FRI codeword (of that round). #[derive(Debug, Clone, PartialEq, Eq, Hash, BFieldCodec)] diff --git a/triton-vm/src/proof_stream.rs b/triton-vm/src/proof_stream.rs index 8aa40c14..41775565 100644 --- a/triton-vm/src/proof_stream.rs +++ b/triton-vm/src/proof_stream.rs @@ -121,7 +121,7 @@ where .collect() } - /// A thin wrapper around [`H::sample_scalars`]. + /// A thin wrapper around [`H::sample_scalars`](AlgebraicHasher::sample_scalars). pub fn sample_scalars(&mut self, num_scalars: usize) -> Vec { H::sample_scalars(&mut self.sponge_state, num_scalars) } diff --git a/triton-vm/src/table/challenges.rs b/triton-vm/src/table/challenges.rs index 23f84d79..f1ff78ff 100644 --- a/triton-vm/src/table/challenges.rs +++ b/triton-vm/src/table/challenges.rs @@ -117,7 +117,7 @@ pub enum ChallengeId { /// /// Used by the evaluation argument [`PrepareChunkEvalArg`][prep] and in the Hash Table. /// - /// [rate]: crate::stark::StarkHasher::RATE + /// [rate]: twenty_first::shared_math::tip5::RATE /// [prep]: crate::table::table_column::ProgramExtTableColumn::PrepareChunkRunningEvaluation ProgramAttestationPrepareChunkIndeterminate, @@ -126,7 +126,7 @@ pub enum ChallengeId { /// Used by the evaluation arguments [`SendChunkEvalArg`][send] and /// [`ReceiveChunkEvalArg`][recv]. See also: [`ProgramAttestationPrepareChunkIndeterminate`]. /// - /// [rate]: crate::stark::StarkHasher::RATE + /// [rate]: twenty_first::shared_math::tip5::RATE /// [send]: crate::table::table_column::ProgramExtTableColumn::SendChunkRunningEvaluation /// [recv]: crate::table::table_column::HashExtTableColumn::ReceiveChunkRunningEvaluation ProgramAttestationSendChunkIndeterminate, diff --git a/triton-vm/src/table/constraint_circuit.rs b/triton-vm/src/table/constraint_circuit.rs index caa46719..c3772b9f 100644 --- a/triton-vm/src/table/constraint_circuit.rs +++ b/triton-vm/src/table/constraint_circuit.rs @@ -1016,7 +1016,7 @@ impl ConstraintCircuitMonad { } /// Returns all nodes used in the multicircuit. - /// This is distinct from [`ConstraintCircuitBuilder::all_nodes`] because it + /// This is distinct from `ConstraintCircuitBuilder::all_nodes` because it /// 1. only considers nodes used in the given multicircuit, not all nodes in the builder, /// 2. returns the nodes as [`ConstraintCircuit`]s, not as [`ConstraintCircuitMonad`]s, and /// 3. keeps duplicates, allowing to count how often a node occurs. diff --git a/triton-vm/src/table/hash_table.rs b/triton-vm/src/table/hash_table.rs index 1aecca26..8869244b 100644 --- a/triton-vm/src/table/hash_table.rs +++ b/triton-vm/src/table/hash_table.rs @@ -78,7 +78,7 @@ pub struct ExtHashTable {} /// The empty program is not valid since any valid [`Program`][program] must execute /// instruction `halt`. /// -/// [program]: triton_opcodes::program::Program +/// [program]: crate::program::Program /// [round_no]: HashBaseTableColumn::RoundNumber /// [prog_hash]: Self::ProgramHashing /// [sponge]: Self::Sponge @@ -88,7 +88,7 @@ pub struct ExtHashTable {} pub enum HashTableMode { /// The mode in which the [`Program`][program] is hashed. This is part of program attestation. /// - /// [program]: triton_opcodes::program::Program + /// [program]: crate::program::Program ProgramHashing, /// The mode in which Sponge instructions, _i.e._, `absorb_init`, `absorb`, and `squeeze`, diff --git a/triton-vm/src/table/table_column.rs b/triton-vm/src/table/table_column.rs index 299b6b50..be061bbe 100644 --- a/triton-vm/src/table/table_column.rs +++ b/triton-vm/src/table/table_column.rs @@ -82,7 +82,7 @@ pub enum ProgramExtTableColumn { /// Resets to zero after each chunk. /// Relevant for program attestation. /// - /// [rate]: crate::stark::StarkHasher::RATE + /// [rate]: twenty_first::shared_math::tip5::RATE PrepareChunkRunningEvaluation, /// An evaluation argument over all [`RATE`][rate]-sized chunks of instructions, @@ -92,7 +92,7 @@ pub enum ProgramExtTableColumn { /// /// The counterpart to [`RcvChunkEvalArg`](HashExtTableColumn::ReceiveChunkRunningEvaluation). /// - /// [rate]: crate::stark::StarkHasher::RATE + /// [rate]: twenty_first::shared_math::tip5::RATE /// [prep]: ProgramExtTableColumn::PrepareChunkRunningEvaluation SendChunkRunningEvaluation, } @@ -345,10 +345,12 @@ pub enum HashBaseTableColumn { #[derive(Display, Debug, Clone, Copy, PartialEq, Eq, EnumIter, EnumCountMacro, Hash)] pub enum HashExtTableColumn { /// The evaluation argument corresponding to receiving instructions in chunks of size - /// [`RATE`](StarkHasher::RATE). The chunks are hashed in Sponge mode. + /// [`RATE`][rate]. The chunks are hashed in Sponge mode. /// This allows program attestation. /// /// The counterpart to [`SendChunkEvalArg`](ProgramExtTableColumn::SendChunkRunningEvaluation). + /// + /// [rate]: twenty_first::shared_math::tip5::RATE ReceiveChunkRunningEvaluation, HashInputRunningEvaluation,