You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each relation implements a bit of polynomial arithmetic applied to univariate polynomials. As an optimization, we would like that the univariates have the minimum allowable length (the length is the number of evaluations representing the polynomial; this is equals the degree of the polynomial + 1). To accomplish this, each relation defines a container for univariates of different lengths. To avoid code duplication, we have taken a somewhat complicated approach to doing this: each relation is split into
an implementation, which records these lengths in a template, and
a uniform 'wrapping'/completion step where this template is used to create the corresponding containers.
This solutions works, but it would be beneficial to simplify this structure. Some possibilities:
Each RelationImpl puts its lengths in an array which is somehow treated as a parameter pack in order to create the desired containers.
We accept duplication and just define the containers in each relation. We can enforce that this is done through a concept.
I agree that the relations code is complicated and I definitely welcome a simplification, but I don't think that duplicating the very complicated and error prone relation algebra is ever going to be the right thing. This was fine for StandardHonk, but take a look at the ECCVM, or even the just the auxiliary relation. I had originally set it up so that only the algebra was shared and the container definitions were explicit in each relation (leading to some acceptable duplication IMO) but we ultimately decided to go with the interface implemented in relation_types.hpp. If reverting that component could simplify the model then I'd be in favor.
Each relation implements a bit of polynomial arithmetic applied to univariate polynomials. As an optimization, we would like that the univariates have the minimum allowable length (the length is the number of evaluations representing the polynomial; this is equals the degree of the polynomial + 1). To accomplish this, each relation defines a container for univariates of different lengths. To avoid code duplication, we have taken a somewhat complicated approach to doing this: each relation is split into
This solutions works, but it would be beneficial to simplify this structure. Some possibilities:
RelationImpl
puts its lengths in an array which is somehow treated as a parameter pack in order to create the desired containers.concept
.cc @maramihali
The text was updated successfully, but these errors were encountered: