-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formal polynomial evaluator. #836
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## alont/symbolic-poly #836 +/- ##
=======================================================
- Coverage 91.53% 90.95% -0.59%
=======================================================
Files 91 93 +2
Lines 12629 12832 +203
Branches 12629 12832 +203
=======================================================
+ Hits 11560 11671 +111
- Misses 953 1045 +92
Partials 116 116
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
300bc79
to
83fe6fb
Compare
b2f76f5
to
005bb4f
Compare
83fe6fb
to
88a00ce
Compare
005bb4f
to
a0bb280
Compare
88a00ce
to
3bcbb58
Compare
a0bb280
to
674c490
Compare
3bcbb58
to
6f1ed4d
Compare
674c490
to
66a51d6
Compare
6f1ed4d
to
8626b9a
Compare
66a51d6
to
94d1735
Compare
8626b9a
to
eb1520f
Compare
94d1735
to
fc755eb
Compare
6a01e82
to
5a971e9
Compare
fc755eb
to
0989676
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 5 files reviewed, 2 unresolved discussions (waiting on @Alon-Ti)
crates/prover/src/constraint_framework/poly.rs
line 25 at r2 (raw file):
fn default() -> Monomial { Monomial { vars: [].into() } }
Remove in favour of One
?
Code quote:
fn default() -> Monomial {
Monomial { vars: [].into() }
}
crates/prover/src/constraint_framework/poly_eval.rs
line 83 at r2 (raw file):
assert_eq!(eval.constraints[0].to_string(), "(x₀x₁x₂) / (x₀ + x₁)"); } }
Suggestion:
#[cfg(test)]
mod tests {
use super::PolyEvaluator;
use crate::constraint_framework::{EvalAtRow, FrameworkEval};
use crate::core::fields::FieldExpOps;
#[test]
fn test_poly_eval() {
let test_struct = TestStruct {};
let eval = test_struct.evaluate(PolyEvaluator {
cur_var_index: 0,
constraints: vec![],
});
assert_eq!(eval.constraints[0].to_string(), "(x₀x₁x₂) / (x₀ + x₁)");
}
struct TestStruct {}
impl FrameworkEval for TestStruct {
fn log_size(&self) -> u32 {
1 << 16
}
fn max_constraint_log_degree_bound(&self) -> u32 {
1 << 17
}
fn evaluate<E: EvalAtRow>(&self, mut eval: E) -> E {
let x0 = eval.next_trace_mask();
let x1 = eval.next_trace_mask();
let x2 = eval.next_trace_mask();
eval.add_constraint(x0.clone() * x1.clone() * x2 * (x0 + x1).inverse());
eval
}
}
}
Formal polynomial evaluator.
Added rational functions for formal polynomial evaluator.
This change is