Skip to main content
This section examines how the components are implemented and covers some important functions defined on them, without diving into AIR-specific details since they are already covered in the earlier sections. The Components struct is a collection of components, implemented as follows:
Here, components is a collection of objects that implement the Component trait, and n_preprocessed_columns is the total number of preprocessed columns used across all components (refer to Preprocessed Trace). The Component trait represents a trace table along with a set of constraints. It implements the following functions:
This section will not examine each of these functions in detail but will explain them wherever they are used to implement various functions for the Components struct. The following are some important functions implemented for the Components struct.

Composition Polynomial Degree Bound

The composition_log_degree_bound function determines the log of the degree of the composition polynomial.
For each component, this calls the max_constraint_log_degree_bound() function, which returns the log of the highest polynomial degree among all constraints in that component. It then takes the maximum value across all components. For the example AIR containing two components, this function returns max(log(deg(p0)),log(deg(p1)))\max({\log{(\deg{(p_0)})}, \log{(\deg{(p_1)})}}).

Mask Points

The mask_points function determines all evaluation points needed to verify constraints at a given point
From the perspective of the prover (and verifier), when they need to open the composition polynomial at a specific point sent by the verifier (for example, an out-of-domain point), they require additional polynomial evaluations to verify the constraints. The composition polynomial combines many component-level constraint quotients. Each constraint involves relationships between multiple cells in the execution trace, potentially at different rows/offsets. The function mask_points performs the following:
  • Given a single point as input, it determines all related points where polynomial evaluations are needed to verify constraints.
  • Handles offsets for each component, since different components may have different constraint structures requiring different offset patterns.
  • Ensures preprocessed columns (shared lookup tables, etc.) are properly included.

Evaluate Composition Polynomial

The eval_composition_polynomial_at_point function evaluates the combined constraint polynomial.
The inputs to this function are as follows:
  • &self: The Components on which the function is called.
  • point: The circle point at which the composition polynomial is to be evaluated.
  • mask_values: The evaluations of the polynomials at the mask points that were previously determined by the mask_points function. These provide the constraint polynomial values needed to compute the composition polynomial at the input point.
  • random_coeff: An element from the SecureField (i.e. QM31\mathsf{QM31}). In the example, this is represented as γ\gamma, which is used to compose all constraints into a single composition polynomial.
The function body operates as follows. First, an evaluation_accumulator is instantiated. Then, for each component, the evaluation of the component-level quotient is added to the evaluation_accumulator. For the example AIR containing two components, this adds the evaluations of component-level quotients q0q_0 and q1q_1 at the input point to the evaluation_accumulator. Finally, the finalize() function is called on the evaluation_accumulator, which outputs the random linear combination evaluated at the input point. q=q0+γc0q1q = q_0 + \gamma^{c_0} \cdot q_1