Components
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. TheComponents struct is a collection of components, implemented as follows:
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:
Components struct. The following are some important functions implemented for the Components struct.
Composition Polynomial Degree Bound
Thecomposition_log_degree_bound function determines the log of the degree of the composition polynomial.
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 .
Mask Points
Themask_points function determines all evaluation points needed to verify constraints at a given point
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
Theeval_composition_polynomial_at_point function evaluates the combined constraint polynomial.
&self: TheComponentson 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 themask_pointsfunction. These provide the constraint polynomial values needed to compute the composition polynomial at the inputpoint.random_coeff: An element from theSecureField(i.e. ). In the example, this is represented as , which is used to compose all constraints into a single composition polynomial.
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 and 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.