Skip to main content

Air

Trait Air 

Source
pub trait Air<F: TowerField>:
    Sized
    + Clone
    + Sync {
Show 13 methods // Required methods fn column_layout(&self) -> &[ColumnType]; fn constraint_ast(&self) -> ConstraintAst<F>; // Provided methods fn name(&self) -> String { ... } fn num_columns(&self) -> usize { ... } fn constraints(&self) -> Vec<Constraint<F>> { ... } fn boundary_constraints(&self) -> Vec<BoundaryConstraint<F>> { ... } fn virtual_column_layout(&self) -> &[ColumnType] { ... } fn permutation_checks(&self) -> Vec<(String, PermutationCheckSpec)> { ... } fn lagrange_pinned_columns(&self) -> Vec<LagrangePin> { ... } fn virtual_expander(&self) -> Option<&VirtualExpander> { ... } fn parse_virtual_row(&self, bytes: &[u8], res: &mut Vec<Flat<F>>) where F: TraceCompatibleField { ... } fn inline_chiplets(&self) -> Result<Vec<ChipletDef<F>>> { ... } fn inline_chiplet_kernels(&self) -> Vec<InlineKernelHint> { ... }
}
Expand description

Defines the algebraic structure, trace layout, and constraints of an AIR table.

Implemented by both standalone programs and independent chiplets.

Required Methods§

Source

fn column_layout(&self) -> &[ColumnType]

Returns the physical layout of the columns in the trace.

This describes the storage type (Bit, B8, B32, etc.) of each column.

Source

fn constraint_ast(&self) -> ConstraintAst<F>

Returns the constraint system as an AST-DAG.

Provided Methods§

Source

fn name(&self) -> String

Source

fn num_columns(&self) -> usize

Source

fn constraints(&self) -> Vec<Constraint<F>>

Flat expansion of constraint_ast().

Source

fn boundary_constraints(&self) -> Vec<BoundaryConstraint<F>>

Returns the list of boundary constraints. Each constraint ties a specific trace cell to a public input value. By default, returns an empty list.

Source

fn virtual_column_layout(&self) -> &[ColumnType]

Returns the virtual layout of the columns (after unpacking). Defaults to the expander’s layout if present, else the physical layout.

Source

fn permutation_checks(&self) -> Vec<(String, PermutationCheckSpec)>

Returns the permutation check specifications for this AIR table.

Each tuple contains:

  • String: Unique bus identifier (e.g., RomChiplet::BUS_ID)
  • PermutationCheckSpec: The GPA specification (sources, selector)

Default: No permutation checks.

Source

fn lagrange_pinned_columns(&self) -> Vec<LagrangePin>

Columns whose MLE evaluation must equal a fixed Lagrange kernel at the verifier’s r_final.

Source

fn virtual_expander(&self) -> Option<&VirtualExpander>

Returns the VirtualExpander for chiplets with physical to virtual column expansion.

Source

fn parse_virtual_row(&self, bytes: &[u8], res: &mut Vec<Flat<F>>)

Parses a raw physical row (bytes) into the full Virtual Row (fields). Used by the Verifier to reconstruct the virtual trace from committed data.

Delegates to virtual_expander().parse_row() when present. Falls back to 1:1 parsing from column_layout().

Source

fn inline_chiplets(&self) -> Result<Vec<ChipletDef<F>>>

Chiplet defs used only for kernel dispatch.

Source

fn inline_chiplet_kernels(&self) -> Vec<InlineKernelHint>

Each hint’s chiplet_idx indexes into inline_chiplets().

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<F: TowerField> Air<F> for ChipletDef<F>