pub trait ProofExpr:
Debug
+ Send
+ Sync {
// Required methods
fn data_type(&self) -> ColumnType;
fn first_round_evaluate<'a, S: Scalar>(
&self,
alloc: &'a Bump,
table: &Table<'a, S>,
params: &[LiteralValue],
) -> PlaceholderResult<Column<'a, S>>;
fn final_round_evaluate<'a, S: Scalar>(
&self,
builder: &mut FinalRoundBuilder<'a, S>,
alloc: &'a Bump,
table: &Table<'a, S>,
params: &[LiteralValue],
) -> PlaceholderResult<Column<'a, S>>;
fn verifier_evaluate<S: Scalar>(
&self,
builder: &mut impl VerificationBuilder<S>,
accessor: &IndexMap<Ident, S, BuildHasherDefault<AHasher>>,
chi_eval: S,
params: &[LiteralValue],
) -> Result<S, ProofError>;
fn get_column_references(
&self,
columns: &mut IndexSet<ColumnRef, BuildHasherDefault<AHasher>>,
);
}
Expand description
Provable AST column expression that evaluates to a Column
Required Methods§
Sourcefn data_type(&self) -> ColumnType
fn data_type(&self) -> ColumnType
Get the data type of the expression
Sourcefn first_round_evaluate<'a, S: Scalar>(
&self,
alloc: &'a Bump,
table: &Table<'a, S>,
params: &[LiteralValue],
) -> PlaceholderResult<Column<'a, S>>
fn first_round_evaluate<'a, S: Scalar>( &self, alloc: &'a Bump, table: &Table<'a, S>, params: &[LiteralValue], ) -> PlaceholderResult<Column<'a, S>>
This returns the result of evaluating the expression on the given table, and returns
a column of values. This result slice is guaranteed to have length table_length
.
Implementations must ensure that the returned slice has length table_length
.
Sourcefn final_round_evaluate<'a, S: Scalar>(
&self,
builder: &mut FinalRoundBuilder<'a, S>,
alloc: &'a Bump,
table: &Table<'a, S>,
params: &[LiteralValue],
) -> PlaceholderResult<Column<'a, S>>
fn final_round_evaluate<'a, S: Scalar>( &self, builder: &mut FinalRoundBuilder<'a, S>, alloc: &'a Bump, table: &Table<'a, S>, params: &[LiteralValue], ) -> PlaceholderResult<Column<'a, S>>
Evaluate the expression, add components needed to prove it, and return thet resulting column of values
Sourcefn verifier_evaluate<S: Scalar>(
&self,
builder: &mut impl VerificationBuilder<S>,
accessor: &IndexMap<Ident, S, BuildHasherDefault<AHasher>>,
chi_eval: S,
params: &[LiteralValue],
) -> Result<S, ProofError>
fn verifier_evaluate<S: Scalar>( &self, builder: &mut impl VerificationBuilder<S>, accessor: &IndexMap<Ident, S, BuildHasherDefault<AHasher>>, chi_eval: S, params: &[LiteralValue], ) -> Result<S, ProofError>
Compute the evaluation of a multilinear extension from this expression
at the random sumcheck point and adds components needed to verify the expression to
[VerificationBuilder<S>
]
Sourcefn get_column_references(
&self,
columns: &mut IndexSet<ColumnRef, BuildHasherDefault<AHasher>>,
)
fn get_column_references( &self, columns: &mut IndexSet<ColumnRef, BuildHasherDefault<AHasher>>, )
Insert in the [IndexSet
] columns
all the column
references in the BoolExpr
or forwards the call to some
subsequent bool_expr
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.