-
Notifications
You must be signed in to change notification settings - Fork 89
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
Added expression degrees. #931
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #931 +/- ##
==========================================
- Coverage 91.48% 91.44% -0.04%
==========================================
Files 98 99 +1
Lines 13733 13787 +54
Branches 13733 13787 +54
==========================================
+ Hits 12563 12608 +45
- Misses 1055 1064 +9
Partials 115 115 ☔ View full report in Codecov by Sentry. |
bd78438
to
f835cb8
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.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2
.
Benchmark suite | Current: f835cb8 | Previous: cd8b37b | Ratio |
---|---|---|---|
merkle throughput/simd merkle |
28569815 ns/iter (± 434865 ) |
13712527 ns/iter (± 579195 ) |
2.08 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @shaharsamocha7
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 2 files reviewed, 3 unresolved discussions (waiting on @Alon-Ti)
crates/prover/src/constraint_framework/expr/degree.rs
line 8 at r2 (raw file):
/// simplification. /// 2. If expressions p and q cancel out under some operation, this will not be accounted /// for, so that (x^2 + 1) - (x^2 + x) will return degree 2.
You should mention that this is poly in the trace cells, right?
Code quote:
/// Finds a degree bound for an expressions.
/// Computes the actual degree with the following caveats:
/// 1. The constant expression 0 receives degree 0 like all other constants rather than the
/// mathematically correcy -infinity. This means, for example, that expresisons of the
/// type 0 * expr will return degree deg expr. This should be mitigated by
/// simplification.
/// 2. If expressions p and q cancel out under some operation, this will not be accounted
/// for, so that (x^2 + 1) - (x^2 + x) will return degree 2.
crates/prover/src/constraint_framework/expr/degree.rs
line 20 at r2 (raw file):
exprs: HashMap<String, BaseExpr>, ext_exprs: HashMap<String, ExtExpr>, }
Why this struct is here?
Also, why do we have a degree_bound function for this struct?
Isn't it enough to impl degree_bound for BaseExpr, ExtExpr and that's it?
Code quote:
/// A struct of named expressions that can be searched when determining the degree bound for an
/// expression that contains parameters.
pub struct NamedExprs {
exprs: HashMap<String, BaseExpr>,
ext_exprs: HashMap<String, ExtExpr>,
}
crates/prover/src/constraint_framework/expr/degree.rs
line 81 at r2 (raw file):
#[test] fn test_degree_bound() { let intermediate = (felt!(12) + col!(1, 1, 0)) * var!("a") * col!(1, 0, 0);
Remind me what var is? Is it counted as a constant?
Code quote:
var!("a")
No description provided.