openvm_stark_backend::interaction

Trait InteractionBuilder

Source
pub trait InteractionBuilder: AirBuilder {
    // Required methods
    fn push_interaction<E: Into<Self::Expr>>(
        &mut self,
        bus_index: usize,
        fields: impl IntoIterator<Item = E>,
        count: impl Into<Self::Expr>,
        interaction_type: InteractionType,
    );
    fn num_interactions(&self) -> usize;
    fn all_interactions(&self) -> &[Interaction<Self::Expr>];

    // Provided methods
    fn push_send<E: Into<Self::Expr>>(
        &mut self,
        bus_index: usize,
        fields: impl IntoIterator<Item = E>,
        count: impl Into<Self::Expr>,
    ) { ... }
    fn push_receive<E: Into<Self::Expr>>(
        &mut self,
        bus_index: usize,
        fields: impl IntoIterator<Item = E>,
        count: impl Into<Self::Expr>,
    ) { ... }
}
Expand description

An [AirBuilder] with additional functionality to build special logUp arguments for communication between AIRs across buses. These arguments use randomness to add additional trace columns (in the extension field) and constraints to the AIR.

An interactive AIR is a AIR that can specify buses for sending and receiving data to other AIRs. The original AIR is augmented by virtual columns determined by the interactions to define a RAP.

Required Methods§

Source

fn push_interaction<E: Into<Self::Expr>>( &mut self, bus_index: usize, fields: impl IntoIterator<Item = E>, count: impl Into<Self::Expr>, interaction_type: InteractionType, )

Stores a new interaction in the builder.

Source

fn num_interactions(&self) -> usize

Returns the current number of interactions.

Source

fn all_interactions(&self) -> &[Interaction<Self::Expr>]

Returns all interactions stored.

Provided Methods§

Source

fn push_send<E: Into<Self::Expr>>( &mut self, bus_index: usize, fields: impl IntoIterator<Item = E>, count: impl Into<Self::Expr>, )

Stores a new send interaction in the builder.

Source

fn push_receive<E: Into<Self::Expr>>( &mut self, bus_index: usize, fields: impl IntoIterator<Item = E>, count: impl Into<Self::Expr>, )

Stores a new receive interaction in the builder.

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§