diff --git a/src/examples/mod.rs b/src/examples/mod.rs index 834a3d0f2..a81ec8ec4 100644 --- a/src/examples/mod.rs +++ b/src/examples/mod.rs @@ -1 +1,2 @@ pub mod fibonacci; +pub mod wide_fibonacci; diff --git a/src/examples/wide_fibonacci/constraint_eval.rs b/src/examples/wide_fibonacci/constraint_eval.rs new file mode 100644 index 000000000..42e0275c9 --- /dev/null +++ b/src/examples/wide_fibonacci/constraint_eval.rs @@ -0,0 +1,38 @@ +use super::structs::WideFibComponent; +use crate::core::air::accumulation::{DomainEvaluationAccumulator, PointEvaluationAccumulator}; +use crate::core::air::{Component, ComponentTrace, Mask}; +use crate::core::backend::CPUBackend; +use crate::core::circle::CirclePoint; +use crate::core::fields::qm31::SecureField; +use crate::core::ColumnVec; + +impl Component for WideFibComponent { + fn max_constraint_log_degree_bound(&self) -> u32 { + self.log_size + 1 + } + + fn trace_log_degree_bounds(&self) -> Vec { + vec![self.log_size; 256] + } + + fn mask(&self) -> Mask { + Mask(vec![vec![0_usize]; 256]) + } + + fn evaluate_constraint_quotients_on_domain( + &self, + _trace: &ComponentTrace<'_, CPUBackend>, + _evaluation_accumulator: &mut DomainEvaluationAccumulator, + ) { + unimplemented!("not implemented") + } + + fn evaluate_constraint_quotients_at_point( + &self, + _point: CirclePoint, + _mask: &ColumnVec>, + _evaluation_accumulator: &mut PointEvaluationAccumulator, + ) { + unimplemented!("not implemented") + } +} diff --git a/src/examples/wide_fibonacci/mod.rs b/src/examples/wide_fibonacci/mod.rs new file mode 100644 index 000000000..b64349068 --- /dev/null +++ b/src/examples/wide_fibonacci/mod.rs @@ -0,0 +1,3 @@ +pub mod constraint_eval; +pub mod structs; +pub mod trace_gen; diff --git a/src/examples/wide_fibonacci/structs.rs b/src/examples/wide_fibonacci/structs.rs new file mode 100644 index 000000000..16cf0de14 --- /dev/null +++ b/src/examples/wide_fibonacci/structs.rs @@ -0,0 +1,13 @@ +use crate::core::fields::m31::BaseField; + +/// Component that computes fibonacci numbers over 64 columns. +pub struct WideFibComponent { + pub log_size: u32, +} + +// Input for the fibonacci claim. +#[derive(Debug, Clone, Copy)] +pub struct Input { + pub a: BaseField, + pub b: BaseField, +} diff --git a/src/examples/wide_fibonacci/trace_gen.rs b/src/examples/wide_fibonacci/trace_gen.rs new file mode 100644 index 000000000..5a56848b4 --- /dev/null +++ b/src/examples/wide_fibonacci/trace_gen.rs @@ -0,0 +1,7 @@ +use super::structs::Input; +use crate::core::fields::m31::BaseField; + +/// Given a private input, write the trace row for the wide Fibonacci example to dst. +pub fn write_trace_row(_dst: &mut [Vec], _private_input: &Input, _row_offset: usize) { + unimplemented!() +}