Skip to content
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

Refactor constraint system #29

Merged
merged 16 commits into from
Feb 4, 2022
Merged

Refactor constraint system #29

merged 16 commits into from
Feb 4, 2022

Conversation

lgiussan
Copy link

@lgiussan lgiussan commented Oct 14, 2021

Alignment with ConstraintSystem refactoring on GingerLib:

  • Removed the ConstraintSystem defined in this repo and use only the one defined in Ginger. Specific function that were present in were kept as single out-of-the box functions;
  • Updated code and interfaces to the new namings and calls defined in GingerLib after the refactoring

@DanieleDiBenedetto DanieleDiBenedetto changed the base branch from dev_tmp to dev October 14, 2021 16:07
Copy link
Collaborator

@DanieleDiBenedetto DanieleDiBenedetto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems ok, just a minor comment

src/ahp/constraint_systems.rs Outdated Show resolved Hide resolved
src/ahp/constraint_systems.rs Outdated Show resolved Hide resolved
src/ahp/constraint_systems.rs Outdated Show resolved Hide resolved
make_matrices_square(cs, num_variables);
let nnz = num_non_zero(cs);
let matrix_dim = padded_matrix_dim(num_variables, cs.num_constraints);
make_matrices_square_helper(cs, num_variables);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why another function ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not really a new function. I did the following renaming:

  1. make_matrices_square_for_indexer_and_prover ---> make_matrices_square
  2. make_matrices_square ---> make_matrices_square_helper

Function 1. is just a wrapper around function 2. which computes the right number of variables and performs some checks on the matrix dimensions.
Do you think that make_matrices_square_helper should be eliminated and its code copy-pasted inside make_matrices_square?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes why not

@albertog78 albertog78 merged commit b7e9a49 into dev Feb 4, 2022
@DanieleDiBenedetto DanieleDiBenedetto mentioned this pull request Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants