tasm_lib/
exported_snippets.rs

1use const_format::formatcp;
2use triton_vm::air::challenge_id::ChallengeId;
3use triton_vm::challenges::Challenges;
4use triton_vm::prelude::Stark;
5use triton_vm::proof_item::ProofItemVariant;
6use triton_vm::table::NUM_QUOTIENT_SEGMENTS;
7use triton_vm::table::master_table::MasterAuxTable;
8
9use crate::arithmetic::i128;
10use crate::arithmetic::u32;
11use crate::arithmetic::u64;
12use crate::arithmetic::u128;
13use crate::arithmetic::u128::shift_left_static::ShiftLeftStatic as SShlU128;
14use crate::arithmetic::u128::shift_right_static::ShiftRightStatic as SShrU128;
15use crate::array::horner_evaluation::HornerEvaluation;
16use crate::array::inner_product_of_three_rows_with_weights::InnerProductOfThreeRowsWithWeights;
17use crate::array::inner_product_of_three_rows_with_weights::MainElementType;
18use crate::array::inner_product_of_xfes::InnerProductOfXfes;
19use crate::hashing;
20use crate::hashing::algebraic_hasher;
21use crate::hashing::sponge_hasher;
22use crate::io::InputSource;
23use crate::io::read_input::ReadInput;
24use crate::io::write_to_stdout::WriteToStdout;
25use crate::list;
26use crate::memory::dyn_malloc::DynMalloc;
27use crate::memory::memcpy::MemCpy;
28use crate::mmr::bag_peaks::BagPeaks;
29use crate::mmr::calculate_new_peaks_from_append::CalculateNewPeaksFromAppend;
30use crate::mmr::calculate_new_peaks_from_leaf_mutation::MmrCalculateNewPeaksFromLeafMutationMtIndices;
31use crate::mmr::leaf_index_to_mt_index_and_peak_index::MmrLeafIndexToMtIndexAndPeakIndex;
32use crate::mmr::verify_from_memory::MmrVerifyFromMemory;
33use crate::mmr::verify_from_secret_in_leaf_index_on_stack::MmrVerifyFromSecretInLeafIndexOnStack;
34use crate::mmr::verify_from_secret_in_secret_leaf_index::MmrVerifyFromSecretInSecretLeafIndex;
35use crate::mmr::verify_mmr_successor::VerifyMmrSuccessor;
36use crate::neptune::mutator_set::commit::Commit;
37use crate::neptune::mutator_set::get_swbf_indices::GetSwbfIndices;
38use crate::prelude::*;
39use crate::verifier;
40use crate::verifier::challenges;
41use crate::verifier::challenges::new_empty_input_and_output::NewEmptyInputAndOutput;
42use crate::verifier::challenges::new_generic_dyn_claim::NewGenericDynClaim;
43use crate::verifier::claim::instantiate_fiat_shamir_with_claim::InstantiateFiatShamirWithClaim;
44use crate::verifier::fri;
45use crate::verifier::master_table::air_constraint_evaluation::AirConstraintEvaluation;
46use crate::verifier::master_table::divide_out_zerofiers::DivideOutZerofiers;
47use crate::verifier::master_table::verify_table_rows::ColumnType;
48use crate::verifier::master_table::verify_table_rows::VerifyTableRows;
49use crate::verifier::own_program_digest::OwnProgramDigest;
50use crate::verifier::read_and_verify_own_program_digest_from_std_in::ReadAndVerifyOwnProgramDigestFromStdIn;
51use crate::verifier::vm_proof_iter::dequeue_next_as::DequeueNextAs;
52
53const NUM_CONSTRAINTS_TVM: usize = MasterAuxTable::NUM_CONSTRAINTS;
54const WEIGHTS_QUOTIENTS_INNER_PRODUCT_ENTRYPOINT: &str = formatcp!(
55    "tasmlib_array_inner_product_of_{}_xfes",
56    NUM_CONSTRAINTS_TVM
57);
58const HORNER_EVALUATION_FOR_SUM_OF_EVALUATED_OUT_OF_DOMAIN_QUOTIENT_SEGMENTS_ENTRYPOINT: &str = formatcp!(
59    "tasmlib_array_horner_evaluation_with_{}_coefficients",
60    NUM_QUOTIENT_SEGMENTS
61);
62const CHALLENGES_NEW_FROM_DYN_CLAIM: &str = formatcp!(
63    "tasmlib_verifier_challenges_new_generic_dyn_claim_{}_{}",
64    Challenges::SAMPLE_COUNT,
65    Challenges::COUNT - Challenges::SAMPLE_COUNT
66);
67
68pub fn name_to_snippet(fn_name: &str) -> Option<Box<dyn BasicSnippet>> {
69    match fn_name {
70        // BFieldElement
71        "tasmlib_arithmetic_bfe_primitive_root_of_unity" => Some(Box::new(
72            crate::arithmetic::bfe::primitive_root_of_unity::PrimitiveRootOfUnity,
73        )),
74
75        // XFieldElement
76        "tasmlib_arithmetic_xfe_to_the_power_of_power_of_2" => Some(Box::new(
77            crate::arithmetic::xfe::to_the_power_of_power_of_2::ToThePowerOfPowerOf2,
78        )),
79
80        // u32
81        "tasmlib_arithmetic_u32_is_odd" => Some(Box::new(u32::is_odd::IsOdd)),
82        "tasmlib_arithmetic_u32_is_u32" => Some(Box::new(u32::is_u32::IsU32)),
83        "tasmlib_arithmetic_u32_leading_zeros" => Some(Box::new(u32::leading_zeros::LeadingZeros)),
84        "tasmlib_arithmetic_u32_next_power_of_two" => {
85            Some(Box::new(u32::next_power_of_two::NextPowerOfTwo))
86        }
87        "tasmlib_arithmetic_u32_or" => Some(Box::new(u32::or::Or)),
88        "tasmlib_arithmetic_u32_overflowing_add" => {
89            Some(Box::new(u32::overflowing_add::OverflowingAdd))
90        }
91        "tasmlib_arithmetic_u32_safe_add" => Some(Box::new(u32::safe_add::SafeAdd)),
92        "tasmlib_arithmetic_u32_safe_mul" => Some(Box::new(u32::safe_mul::SafeMul)),
93        "tasmlib_arithmetic_u32_safe_pow" => Some(Box::new(u32::safe_pow::SafePow)),
94        "tasmlib_arithmetic_u32_safe_sub" => Some(Box::new(u32::safe_sub::SafeSub)),
95        "tasmlib_arithmetic_u32_shift_left" => Some(Box::new(u32::shift_left::ShiftLeft)),
96        "tasmlib_arithmetic_u32_shift_right" => Some(Box::new(u32::shift_right::ShiftRight)),
97        "tasmlib_arithmetic_u32_trailing_zeros" => {
98            Some(Box::new(u32::trailing_zeros::TrailingZeros))
99        }
100
101        // u64
102        "tasmlib_arithmetic_u64_add" => Some(Box::new(u64::add::Add)),
103        "tasmlib_arithmetic_u64_and" => Some(Box::new(u64::and::And)),
104        "tasmlib_arithmetic_u64_decr" => Some(Box::new(u64::decr::Decr)),
105        "tasmlib_arithmetic_u64_div2" => Some(Box::new(u64::div2::Div2)),
106        "tasmlib_arithmetic_u64_div_mod" => Some(Box::new(u64::div_mod::DivMod)),
107        "tasmlib_arithmetic_u64_incr" => Some(Box::new(u64::incr::Incr)),
108        "tasmlib_arithmetic_u64_leading_zeros" => Some(Box::new(u64::leading_zeros::LeadingZeros)),
109        "tasmlib_arithmetic_u64_trailing_zeros" => {
110            Some(Box::new(u64::trailing_zeros::TrailingZeros))
111        }
112        "tasmlib_arithmetic_u64_log_2_floor" => Some(Box::new(u64::log_2_floor::Log2Floor)),
113        "tasmlib_arithmetic_u64_lt" => Some(Box::new(u64::lt::Lt)),
114        "tasmlib_arithmetic_u64_lt_preserve_args" => {
115            Some(Box::new(u64::lt_preserve_args::LtPreserveArgs))
116        }
117        "tasmlib_arithmetic_u64_mul_two_u64s_to_u128_u64" => {
118            Some(Box::new(u64::mul_two_u64s_to_u128::MulTwoU64sToU128))
119        }
120        "tasmlib_arithmetic_u64_or" => Some(Box::new(u64::or::Or)),
121        "tasmlib_arithmetic_u64_overflowing_sub" => {
122            Some(Box::new(u64::overflowing_sub::OverflowingSub))
123        }
124        "tasmlib_arithmetic_u64_popcount" => Some(Box::new(u64::popcount::PopCount)),
125        "tasmlib_arithmetic_u64_pow2" => Some(Box::new(u64::pow2::Pow2)),
126        "tasmlib_arithmetic_u64_safe_mul" => Some(Box::new(u64::safe_mul::SafeMul)),
127        "tasmlib_arithmetic_u64_shift_left" => Some(Box::new(u64::shift_left::ShiftLeft)),
128        "tasmlib_arithmetic_u64_shift_right" => Some(Box::new(u64::shift_right::ShiftRight)),
129        "tasmlib_arithmetic_u64_sub" => Some(Box::new(u64::sub::Sub)),
130        "tasmlib_arithmetic_u64_wrapping_mul" => Some(Box::new(u64::wrapping_mul::WrappingMul)),
131        "tasmlib_arithmetic_u64_wrapping_sub" => Some(Box::new(u64::wrapping_sub::WrappingSub)),
132        "tasmlib_arithmetic_u64_xor" => Some(Box::new(u64::xor::Xor)),
133
134        // u128
135        "tasmlib_arithmetic_u128_lt" => Some(Box::new(u128::lt::Lt)),
136        "tasmlib_arithmetic_u128_overflowing_add" => {
137            Some(Box::new(u128::overflowing_add::OverflowingAdd))
138        }
139        "tasmlib_arithmetic_u128_safe_add" => Some(Box::new(u128::safe_add::SafeAdd)),
140        "tasmlib_arithmetic_u128_safe_mul" => Some(Box::new(u128::safe_mul::SafeMul)),
141        "tasmlib_arithmetic_u128_shift_left" => Some(Box::new(u128::shift_left::ShiftLeft)),
142        "tasmlib_arithmetic_u128_shift_right" => Some(Box::new(u128::shift_right::ShiftRight)),
143        "tasmlib_arithmetic_u128_sub" => Some(Box::new(u128::sub::Sub)),
144
145        "tasmlib_arithmetic_u128_shift_left_static_1" => Some(Box::new(SShlU128::<1>)),
146        "tasmlib_arithmetic_u128_shift_left_static_2" => Some(Box::new(SShlU128::<2>)),
147        "tasmlib_arithmetic_u128_shift_left_static_3" => Some(Box::new(SShlU128::<3>)),
148        "tasmlib_arithmetic_u128_shift_left_static_4" => Some(Box::new(SShlU128::<4>)),
149        "tasmlib_arithmetic_u128_shift_left_static_5" => Some(Box::new(SShlU128::<5>)),
150        "tasmlib_arithmetic_u128_shift_left_static_6" => Some(Box::new(SShlU128::<6>)),
151        "tasmlib_arithmetic_u128_shift_left_static_7" => Some(Box::new(SShlU128::<7>)),
152        "tasmlib_arithmetic_u128_shift_left_static_8" => Some(Box::new(SShlU128::<8>)),
153        "tasmlib_arithmetic_u128_shift_left_static_9" => Some(Box::new(SShlU128::<9>)),
154        "tasmlib_arithmetic_u128_shift_left_static_10" => Some(Box::new(SShlU128::<10>)),
155        "tasmlib_arithmetic_u128_shift_left_static_11" => Some(Box::new(SShlU128::<11>)),
156        "tasmlib_arithmetic_u128_shift_left_static_12" => Some(Box::new(SShlU128::<12>)),
157        "tasmlib_arithmetic_u128_shift_left_static_13" => Some(Box::new(SShlU128::<13>)),
158        "tasmlib_arithmetic_u128_shift_left_static_14" => Some(Box::new(SShlU128::<14>)),
159        "tasmlib_arithmetic_u128_shift_left_static_15" => Some(Box::new(SShlU128::<15>)),
160        "tasmlib_arithmetic_u128_shift_left_static_16" => Some(Box::new(SShlU128::<16>)),
161        "tasmlib_arithmetic_u128_shift_left_static_17" => Some(Box::new(SShlU128::<17>)),
162        "tasmlib_arithmetic_u128_shift_left_static_18" => Some(Box::new(SShlU128::<18>)),
163        "tasmlib_arithmetic_u128_shift_left_static_19" => Some(Box::new(SShlU128::<19>)),
164        "tasmlib_arithmetic_u128_shift_left_static_20" => Some(Box::new(SShlU128::<20>)),
165        "tasmlib_arithmetic_u128_shift_left_static_21" => Some(Box::new(SShlU128::<21>)),
166        "tasmlib_arithmetic_u128_shift_left_static_22" => Some(Box::new(SShlU128::<22>)),
167        "tasmlib_arithmetic_u128_shift_left_static_23" => Some(Box::new(SShlU128::<23>)),
168        "tasmlib_arithmetic_u128_shift_left_static_24" => Some(Box::new(SShlU128::<24>)),
169        "tasmlib_arithmetic_u128_shift_left_static_25" => Some(Box::new(SShlU128::<25>)),
170        "tasmlib_arithmetic_u128_shift_left_static_26" => Some(Box::new(SShlU128::<26>)),
171        "tasmlib_arithmetic_u128_shift_left_static_27" => Some(Box::new(SShlU128::<27>)),
172        "tasmlib_arithmetic_u128_shift_left_static_28" => Some(Box::new(SShlU128::<28>)),
173        "tasmlib_arithmetic_u128_shift_left_static_29" => Some(Box::new(SShlU128::<29>)),
174        "tasmlib_arithmetic_u128_shift_left_static_30" => Some(Box::new(SShlU128::<30>)),
175        "tasmlib_arithmetic_u128_shift_left_static_31" => Some(Box::new(SShlU128::<31>)),
176        "tasmlib_arithmetic_u128_shift_left_static_32" => Some(Box::new(SShlU128::<32>)),
177
178        "tasmlib_arithmetic_u128_shift_right_static_1" => Some(Box::new(SShrU128::<1>)),
179        "tasmlib_arithmetic_u128_shift_right_static_2" => Some(Box::new(SShrU128::<2>)),
180        "tasmlib_arithmetic_u128_shift_right_static_3" => Some(Box::new(SShrU128::<3>)),
181        "tasmlib_arithmetic_u128_shift_right_static_4" => Some(Box::new(SShrU128::<4>)),
182        "tasmlib_arithmetic_u128_shift_right_static_5" => Some(Box::new(SShrU128::<5>)),
183        "tasmlib_arithmetic_u128_shift_right_static_6" => Some(Box::new(SShrU128::<6>)),
184        "tasmlib_arithmetic_u128_shift_right_static_7" => Some(Box::new(SShrU128::<7>)),
185        "tasmlib_arithmetic_u128_shift_right_static_8" => Some(Box::new(SShrU128::<8>)),
186        "tasmlib_arithmetic_u128_shift_right_static_9" => Some(Box::new(SShrU128::<9>)),
187        "tasmlib_arithmetic_u128_shift_right_static_10" => Some(Box::new(SShrU128::<10>)),
188        "tasmlib_arithmetic_u128_shift_right_static_11" => Some(Box::new(SShrU128::<11>)),
189        "tasmlib_arithmetic_u128_shift_right_static_12" => Some(Box::new(SShrU128::<12>)),
190        "tasmlib_arithmetic_u128_shift_right_static_13" => Some(Box::new(SShrU128::<13>)),
191        "tasmlib_arithmetic_u128_shift_right_static_14" => Some(Box::new(SShrU128::<14>)),
192        "tasmlib_arithmetic_u128_shift_right_static_15" => Some(Box::new(SShrU128::<15>)),
193        "tasmlib_arithmetic_u128_shift_right_static_16" => Some(Box::new(SShrU128::<16>)),
194        "tasmlib_arithmetic_u128_shift_right_static_17" => Some(Box::new(SShrU128::<17>)),
195        "tasmlib_arithmetic_u128_shift_right_static_18" => Some(Box::new(SShrU128::<18>)),
196        "tasmlib_arithmetic_u128_shift_right_static_19" => Some(Box::new(SShrU128::<19>)),
197        "tasmlib_arithmetic_u128_shift_right_static_20" => Some(Box::new(SShrU128::<20>)),
198        "tasmlib_arithmetic_u128_shift_right_static_21" => Some(Box::new(SShrU128::<21>)),
199        "tasmlib_arithmetic_u128_shift_right_static_22" => Some(Box::new(SShrU128::<22>)),
200        "tasmlib_arithmetic_u128_shift_right_static_23" => Some(Box::new(SShrU128::<23>)),
201        "tasmlib_arithmetic_u128_shift_right_static_24" => Some(Box::new(SShrU128::<24>)),
202        "tasmlib_arithmetic_u128_shift_right_static_25" => Some(Box::new(SShrU128::<25>)),
203        "tasmlib_arithmetic_u128_shift_right_static_26" => Some(Box::new(SShrU128::<26>)),
204        "tasmlib_arithmetic_u128_shift_right_static_27" => Some(Box::new(SShrU128::<27>)),
205        "tasmlib_arithmetic_u128_shift_right_static_28" => Some(Box::new(SShrU128::<28>)),
206        "tasmlib_arithmetic_u128_shift_right_static_29" => Some(Box::new(SShrU128::<29>)),
207        "tasmlib_arithmetic_u128_shift_right_static_30" => Some(Box::new(SShrU128::<30>)),
208        "tasmlib_arithmetic_u128_shift_right_static_31" => Some(Box::new(SShrU128::<31>)),
209        "tasmlib_arithmetic_u128_shift_right_static_32" => Some(Box::new(SShrU128::<32>)),
210
211        // i128
212        "tasmlib_arithmetic_i128_lt" => Some(Box::new(i128::lt::Lt)),
213        "tasmlib_arithmetic_i128_shift_right" => Some(Box::new(i128::shift_right::ShiftRight)),
214
215        // Hashing
216        "tasmlib_hashing_absorb_multiple" => {
217            Some(Box::new(hashing::absorb_multiple::AbsorbMultiple))
218        }
219        "tasmlib_hashing_merkle_root" => Some(Box::new(hashing::merkle_root::MerkleRoot)),
220        "tasmlib_hashing_merkle_root_from_xfes" => Some(Box::new(
221            hashing::merkle_root_from_xfes::MerkleRootFromXfes,
222        )),
223        "tasmlib_hashing_merkle_step_mem_u64_index" => {
224            Some(Box::new(hashing::merkle_step_mem_u64_index::MerkleStepMemU64Index))
225        },
226        "tasmlib_hashing_merkle_step_u64_index" => {
227            Some(Box::new(hashing::merkle_step_u64_index::MerkleStepU64Index))
228        }
229        "tasmlib_hashing_merkle_verify" => Some(Box::new(hashing::merkle_verify::MerkleVerify)),
230
231        // Hashing -> algebraic hasher trait
232        "tasmlib_hashing_algebraic_hasher_hash_varlen" => {
233            Some(Box::new(algebraic_hasher::hash_varlen::HashVarlen))
234        }
235        "tasmlib_hashing_algebraic_hasher_sample_indices" => {
236            Some(Box::new(algebraic_hasher::sample_indices::SampleIndices))
237        }
238        "tasmlib_hashing_algebraic_hasher_sample_scalars" => {
239            Some(Box::new(algebraic_hasher::sample_scalars::SampleScalars))
240        }
241
242        // Hashing -> Sponge hasher trait
243        "tasmlib_hashing_sponge_hasher_init" => Some(Box::new(sponge_hasher::init::Init)),
244        "tasmlib_hashing_sponge_hasher_absorb" => Some(Box::new(sponge_hasher::absorb::Absorb)),
245        "tasmlib_hashing_sponge_hasher_squeeze" => Some(Box::new(sponge_hasher::squeeze::Squeeze)),
246        "tasmlib_hashing_sponge_hasher_pad_and_absorb_all" => {
247            Some(Box::new(sponge_hasher::pad_and_absorb_all::PadAndAbsorbAll))
248        }
249
250        // io
251        "tasmlib_io_read_secin___bool" => Some(Box::new(ReadInput {
252            data_type: DataType::Bool,
253            input_source: InputSource::SecretIn,
254        })),
255        "tasmlib_io_read_secin___u32" => Some(Box::new(ReadInput {
256            data_type: DataType::U32,
257            input_source: InputSource::SecretIn,
258        })),
259        "tasmlib_io_read_secin___u64" => Some(Box::new(ReadInput {
260            data_type: DataType::U64,
261            input_source: InputSource::SecretIn,
262        })),
263        "tasmlib_io_read_secin___u128" => Some(Box::new(ReadInput {
264            data_type: DataType::U128,
265            input_source: InputSource::SecretIn,
266        })),
267        "tasmlib_io_read_secin___bfe" => Some(Box::new(ReadInput {
268            data_type: DataType::Bfe,
269            input_source: InputSource::SecretIn,
270        })),
271        "tasmlib_io_read_secin___xfe" => Some(Box::new(ReadInput {
272            data_type: DataType::Xfe,
273            input_source: InputSource::SecretIn,
274        })),
275        "tasmlib_io_read_secin___digest" => Some(Box::new(ReadInput {
276            data_type: DataType::Digest,
277            input_source: InputSource::SecretIn,
278        })),
279
280        "tasmlib_io_read_stdin___bool" => Some(Box::new(ReadInput {
281            data_type: DataType::Bool,
282            input_source: InputSource::StdIn,
283        })),
284        "tasmlib_io_read_stdin___u32" => Some(Box::new(ReadInput {
285            data_type: DataType::U32,
286            input_source: InputSource::StdIn,
287        })),
288        "tasmlib_io_read_stdin___u64" => Some(Box::new(ReadInput {
289            data_type: DataType::U64,
290            input_source: InputSource::StdIn,
291        })),
292        "tasmlib_io_read_stdin___u128" => Some(Box::new(ReadInput {
293            data_type: DataType::U128,
294            input_source: InputSource::StdIn,
295        })),
296        "tasmlib_io_read_stdin___bfe" => Some(Box::new(ReadInput {
297            data_type: DataType::Bfe,
298            input_source: InputSource::StdIn,
299        })),
300        "tasmlib_io_read_stdin___xfe" => Some(Box::new(ReadInput {
301            data_type: DataType::Xfe,
302            input_source: InputSource::StdIn,
303        })),
304        "tasmlib_io_read_stdin___digest" => Some(Box::new(ReadInput {
305            data_type: DataType::Digest,
306            input_source: InputSource::StdIn,
307        })),
308
309        "tasmlib_io_write_to_stdout___bool" => Some(Box::new(WriteToStdout {
310            data_type: DataType::Bool,
311        })),
312        "tasmlib_io_write_to_stdout___u32" => Some(Box::new(WriteToStdout {
313            data_type: DataType::U32,
314        })),
315        "tasmlib_io_write_to_stdout___u64" => Some(Box::new(WriteToStdout {
316            data_type: DataType::U64,
317        })),
318        "tasmlib_io_write_to_stdout___u128" => Some(Box::new(WriteToStdout {
319            data_type: DataType::U128,
320        })),
321        "tasmlib_io_write_to_stdout___bfe" => Some(Box::new(WriteToStdout {
322            data_type: DataType::Bfe,
323        })),
324        "tasmlib_io_write_to_stdout___xfe" => Some(Box::new(WriteToStdout {
325            data_type: DataType::Xfe,
326        })),
327        "tasmlib_io_write_to_stdout___digest" => Some(Box::new(WriteToStdout {
328            data_type: DataType::Digest,
329        })),
330
331        // lists
332        "tasmlib_list_get_element___bool" => Some(Box::new(list::get::Get::new(DataType::Bool))),
333        "tasmlib_list_get_element___u32" => Some(Box::new(list::get::Get::new(DataType::U32))),
334        "tasmlib_list_get_element___u64" => Some(Box::new(list::get::Get::new(DataType::U64))),
335        "tasmlib_list_get_element___bfe" => Some(Box::new(list::get::Get::new(DataType::Bfe))),
336        "tasmlib_list_get_element___xfe" => Some(Box::new(list::get::Get::new(DataType::Xfe))),
337        "tasmlib_list_get_element___digest" => {
338            Some(Box::new(list::get::Get::new(DataType::Digest)))
339        }
340
341        "tasmlib_list_pop___bool" => Some(Box::new(list::pop::Pop::new(DataType::Bool))),
342        "tasmlib_list_pop___u32" => Some(Box::new(list::pop::Pop::new(DataType::U32))),
343        "tasmlib_list_pop___u64" => Some(Box::new(list::pop::Pop::new(DataType::U64))),
344        "tasmlib_list_pop___bfe" => Some(Box::new(list::pop::Pop::new(DataType::Bfe))),
345        "tasmlib_list_pop___xfe" => Some(Box::new(list::pop::Pop::new(DataType::Xfe))),
346        "tasmlib_list_pop___digest" => Some(Box::new(list::pop::Pop::new(DataType::Digest))),
347
348        "tasmlib_list_push___bool" => Some(Box::new(list::push::Push::new(DataType::Bool))),
349        "tasmlib_list_push___u32" => Some(Box::new(list::push::Push::new(DataType::U32))),
350        "tasmlib_list_push___u64" => Some(Box::new(list::push::Push::new(DataType::U64))),
351        "tasmlib_list_push___bfe" => Some(Box::new(list::push::Push::new(DataType::Bfe))),
352        "tasmlib_list_push___xfe" => Some(Box::new(list::push::Push::new(DataType::Xfe))),
353        "tasmlib_list_push___digest" => Some(Box::new(list::push::Push::new(DataType::Digest))),
354
355        "tasmlib_list_set_element___bool" => Some(Box::new(list::set::Set::new(DataType::Bool))),
356        "tasmlib_list_set_element___u32" => Some(Box::new(list::set::Set::new(DataType::U32))),
357        "tasmlib_list_set_element___u64" => Some(Box::new(list::set::Set::new(DataType::U64))),
358        "tasmlib_list_set_element___bfe" => Some(Box::new(list::set::Set::new(DataType::Bfe))),
359        "tasmlib_list_set_element___xfe" => Some(Box::new(list::set::Set::new(DataType::Xfe))),
360        "tasmlib_list_set_element___digest" => {
361            Some(Box::new(list::set::Set::new(DataType::Digest)))
362        }
363
364        "tasmlib_list_new" => Some(Box::new(list::new::New)),
365        "tasmlib_list_length" => Some(Box::new(list::length::Length)),
366        "tasmlib_list_set_length" => Some(Box::new(list::set_length::SetLength)),
367
368        "tasmlib_list_multiset_equality_digests" => Some(Box::new(
369            list::multiset_equality_digests::MultisetEqualityDigests,
370        )),
371        "tasmlib_list_range" => Some(Box::new(list::range::Range)),
372
373        // MMR
374        "tasmlib_mmr_bag_peaks" => Some(Box::new(BagPeaks)),
375        "tasmlib_mmr_calculate_new_peaks_from_append" => {
376            Some(Box::new(CalculateNewPeaksFromAppend))
377        }
378        "tasmlib_mmr_calculate_new_peaks_from_leaf_mutation" => {
379            Some(Box::new(MmrCalculateNewPeaksFromLeafMutationMtIndices))
380        }
381        "tasmlib_mmr_leaf_index_to_mt_index_and_peak_index" => {
382            Some(Box::new(MmrLeafIndexToMtIndexAndPeakIndex))
383        }
384        "tasmlib_mmr_verify_from_memory" => Some(Box::new(MmrVerifyFromMemory)),
385        "tasmlib_mmr_verify_from_secret_in_leaf_index_on_stack" => {
386            Some(Box::new(MmrVerifyFromSecretInLeafIndexOnStack))
387        }
388        "tasmlib_mmr_verify_from_secret_in_secret_leaf_index" => {
389            Some(Box::new(MmrVerifyFromSecretInSecretLeafIndex))
390        }
391        "tasm_lib_mmr_verify_mmr_successor" => {
392            Some(Box::new(VerifyMmrSuccessor))
393        }
394
395        // recufy
396        "tasmlib_verifier_vm_proof_iter_dequeue_next_as_merkleroot" => {
397            Some(Box::new(DequeueNextAs {
398                proof_item: ProofItemVariant::MerkleRoot,
399            }))
400        }
401        "tasmlib_verifier_vm_proof_iter_dequeue_next_as_outofdomainmainrow" => {
402            Some(Box::new(DequeueNextAs {
403                proof_item: ProofItemVariant::OutOfDomainMainRow,
404            }))
405        }
406        "tasmlib_verifier_vm_proof_iter_dequeue_next_as_outofdomainauxrow" => {
407            Some(Box::new(DequeueNextAs {
408                proof_item: ProofItemVariant::OutOfDomainAuxRow,
409            }))
410        }
411        "tasmlib_verifier_vm_proof_iter_dequeue_next_as_outofdomainquotientsegments" => {
412            Some(Box::new(DequeueNextAs {
413                proof_item: ProofItemVariant::OutOfDomainQuotientSegments,
414            }))
415        }
416        "tasmlib_verifier_vm_proof_iter_dequeue_next_as_authenticationstructure" => {
417            Some(Box::new(DequeueNextAs {
418                proof_item: ProofItemVariant::AuthenticationStructure,
419            }))
420        }
421        "tasmlib_verifier_vm_proof_iter_dequeue_next_as_mastermaintablerows" => {
422            Some(Box::new(DequeueNextAs {
423                proof_item: ProofItemVariant::MasterMainTableRows,
424            }))
425        }
426        "tasmlib_verifier_vm_proof_iter_dequeue_next_as_masterauxtablerows" => {
427            Some(Box::new(DequeueNextAs {
428                proof_item: ProofItemVariant::MasterAuxTableRows,
429            }))
430        }
431        "tasmlib_verifier_vm_proof_iter_dequeue_next_as_log2paddedheight" => {
432            Some(Box::new(DequeueNextAs {
433                proof_item: ProofItemVariant::Log2PaddedHeight,
434            }))
435        }
436        "tasmlib_verifier_vm_proof_iter_dequeue_next_as_quotientsegmentselements" => {
437            Some(Box::new(DequeueNextAs {
438                proof_item: ProofItemVariant::QuotientSegmentsElements,
439            }))
440        }
441        "tasmlib_verifier_vm_proof_iter_dequeue_next_as_fricodeword" => {
442            Some(Box::new(DequeueNextAs {
443                proof_item: ProofItemVariant::FriCodeword,
444            }))
445        }
446        "tasmlib_verifier_vm_proof_iter_dequeue_next_as_fripolynomial" => {
447            Some(Box::new(DequeueNextAs {
448                proof_item: ProofItemVariant::FriPolynomial,
449            }))
450        }
451        "tasmlib_verifier_vm_proof_iter_dequeue_next_as_friresponse" => {
452            Some(Box::new(DequeueNextAs {
453                proof_item: ProofItemVariant::FriResponse,
454            }))
455        }
456        "tasmlib_verifier_vm_proof_iter_drop" => {
457            Some(Box::new(verifier::vm_proof_iter::drop::Drop))
458        }
459        "tasmlib_verifier_vm_proof_iter_new" => {
460            Some(Box::new(verifier::vm_proof_iter::new::New))
461        }
462
463        "tasmlib_verifier_read_and_verify_own_program_digest_from_std_in" => {
464            Some(Box::new(ReadAndVerifyOwnProgramDigestFromStdIn))
465        }
466        "tasmlib_verifier_challenges_new_empty_input_and_output_59_4" => {
467            let num_challenges_to_sample = Challenges::SAMPLE_COUNT;
468            let num_challenges_to_compute = Challenges::COUNT - num_challenges_to_sample;
469            assert_eq!(59, num_challenges_to_sample);
470            assert_eq!(4, num_challenges_to_compute);
471            let challenge_snippet = NewEmptyInputAndOutput::new(
472                num_challenges_to_sample,
473                num_challenges_to_compute,
474                challenges::shared::conventional_challenges_pointer(),
475            );
476            Some(Box::new(challenge_snippet))
477        }
478
479        "tasmlib_verifier_fri_barycentric_evaluation" => {
480            Some(Box::new(fri::barycentric_evaluation::BarycentricEvaluation))
481        }
482        "tasmlib_verifier_fri_derive_from_stark" => {
483            Some(Box::new(fri::derive_from_stark::DeriveFriFromStark{stark: Stark::default()}))
484        }
485        "tasmlib_verifier_fri_number_of_rounds" => {
486            Some(Box::new(fri::number_of_rounds::NumberOfRounds))
487        }
488        "tasmlib_verifier_fri_verify_fri_authentication_paths" => {
489            Some(Box::new(fri::verify_fri_authentication_paths::VerifyFriAuthenticationPaths))
490        }
491
492        "tasmlib_verifier_master_table_air_constraint_evaluation" => Some(Box::new(
493            AirConstraintEvaluation::with_conventional_dynamic_memory_layout(),
494        )),
495        "tasmlib_verifier_master_table_divide_out_zerofiers" => Some(Box::new(DivideOutZerofiers)),
496        "tasmlib_verifier_master_table_verify_Main_table_rows" => {
497            Some(Box::new(VerifyTableRows::new(ColumnType::Main)))
498        }
499        "tasmlib_verifier_master_table_verify_Aux_table_rows" => {
500            Some(Box::new(VerifyTableRows::new(ColumnType::Aux)))
501        }
502        "tasmlib_verifier_master_table_verify_Quotient_table_rows" => {
503            Some(Box::new(VerifyTableRows::new(ColumnType::Quotient)))
504        }
505
506        "tasmlib_verifier_out_of_domain_points" => {
507            Some(Box::new(verifier::out_of_domain_points::OutOfDomainPoints))
508        }
509
510        "tasmlib_array_inner_product_of_4_xfes" => Some(Box::new(InnerProductOfXfes::new(4))),
511        WEIGHTS_QUOTIENTS_INNER_PRODUCT_ENTRYPOINT => {
512            Some(Box::new(InnerProductOfXfes::new(NUM_CONSTRAINTS_TVM)))
513        }
514        "tasmlib_list_horner_evaluation_dynamic_length" => Some(Box::new(
515            list::horner_evaluation_dynamic_length::HornerEvaluationDynamicLength,
516        )),
517        HORNER_EVALUATION_FOR_SUM_OF_EVALUATED_OUT_OF_DOMAIN_QUOTIENT_SEGMENTS_ENTRYPOINT => {
518            Some(Box::new(HornerEvaluation::new(NUM_QUOTIENT_SEGMENTS)))
519        }
520        "tasmlib_verifier_own_program_digest" => Some(Box::new(OwnProgramDigest)),
521        "tasmlib_array_inner_product_of_three_rows_with_weights_Bfe_mainrowelem" => Some(Box::new(
522            InnerProductOfThreeRowsWithWeights::triton_vm_parameters(MainElementType::Bfe),
523        )),
524        "tasmlib_array_inner_product_of_three_rows_with_weights_Xfe_mainrowelem" => Some(Box::new(
525            InnerProductOfThreeRowsWithWeights::triton_vm_parameters(MainElementType::Xfe),
526        )),
527        "tasmlib_verifier_claim_instantiate_fiat_shamir_with_claim" => {
528            Some(Box::new(InstantiateFiatShamirWithClaim))
529        }
530        CHALLENGES_NEW_FROM_DYN_CLAIM => Some(Box::new(NewGenericDynClaim::new(
531            Challenges::SAMPLE_COUNT,
532            ChallengeId::NUM_DERIVED_CHALLENGES,
533            challenges::shared::conventional_challenges_pointer(),
534        ))),
535
536        "tasmlib_verifier_eval_arg_compute_terminal_dyn_sized_dynamic_symbols" => Some(Box::new(
537            verifier::eval_arg
538                ::compute_terminal_dyn_sized_dynamic_symbols::ComputeTerminalDynSizedDynamicSymbols
539        )),
540        "tasmlib_verifier_eval_arg_compute_terminal_from_digest" => Some(Box::new(
541            verifier::eval_arg::compute_terminal_from_digest::ComputeTerminalFromDigestInitialIsOne
542        )),
543
544        // memory
545        "tasmlib_memory_dyn_malloc" => Some(Box::new(DynMalloc)),
546        "tasmlib_memory_memcpy" => Some(Box::new(MemCpy)),
547
548        // FRI
549        #[cfg(not(test))]
550        "tasmlib_verifier_fri_verify" => {
551            Some(Box::new(crate::verifier::fri::verify::FriSnippet {}))
552        }
553
554        // structure
555
556        // mutator sets
557        "tasmlib_neptune_mutator_set_commit" => Some(Box::new(Commit)),
558        "tasmlib_neptune_mutator_get_swbf_indices_1048576_45" => Some(Box::new(GetSwbfIndices {
559            window_size: 1048576,
560            num_trials: 45,
561        })),
562
563        _ => None,
564    }
565}