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

feat: dynamic array indexing #886

Merged
merged 34 commits into from
Mar 21, 2023
Merged

feat: dynamic array indexing #886

merged 34 commits into from
Mar 21, 2023

Conversation

guipublic
Copy link
Contributor

@guipublic guipublic commented Feb 21, 2023

Description

Summary of changes

Enable dynamic, i.e non constant, index for accessing arrays.
Memory operations are put in the memory trace and we apply memory consistency constraints on the sorted trace.
This PR requires an ACIR update

Test additions / changes

The integration test 6_arrays has been updated.

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.
  • This PR requires documentation updates when merged.

EDIT: I have de-activated the feature in the PR:

  • The frontend requires comp time for array index, as before
  • The added test case for dynamic arrays is commented

The reason is that it is a long standing PR for which the test case it failing verification. This is probably another issue.
Not having this code merged in master is starting to become annoying.
The dynamic arrays will be activated by simply un-commenting the 2 above changes once the issue with verification is solved.

crates/noirc_evaluator/src/ssa/acir_gen/acir_mem.rs Outdated Show resolved Hide resolved
crates/noirc_evaluator/src/ssa/acir_gen/acir_mem.rs Outdated Show resolved Hide resolved
crates/noirc_evaluator/src/ssa/acir_gen/acir_mem.rs Outdated Show resolved Hide resolved
crates/noirc_evaluator/src/ssa/acir_gen/acir_mem.rs Outdated Show resolved Hide resolved
crates/noirc_evaluator/src/ssa/acir_gen/acir_mem.rs Outdated Show resolved Hide resolved
crates/noirc_evaluator/src/ssa/acir_gen/operations/sort.rs Outdated Show resolved Hide resolved
crates/noirc_evaluator/src/ssa/acir_gen/operations/sort.rs Outdated Show resolved Hide resolved
crates/noirc_frontend/src/hir/type_check/expr.rs Outdated Show resolved Hide resolved
crates/noirc_frontend/src/hir/type_check/stmt.rs Outdated Show resolved Hide resolved
crates/noirc_frontend/src/hir_def/types.rs Outdated Show resolved Hide resolved
@guipublic guipublic mentioned this pull request Feb 23, 2023
6 tasks
@jfecher
Copy link
Contributor

jfecher commented Mar 2, 2023

Looks like this PR is failing the 6_array test. Is it a bug or is it in need of another PR to acvm?

@TomAFrench
Copy link
Member

Looks like we're using a feature which isn't stable in 1.66.0.

@guipublic
Copy link
Contributor Author

guipublic commented Mar 2, 2023

Looks like this PR is failing the 6_array test. Is it a bug or is it in need of another PR to acvm?

We need an acvm release

EDIT: in fact 6_array is failing verification, which may be linked to the may-be bb issue we have with verification...

@guipublic guipublic requested review from jfecher and kevaundray March 17, 2023 11:18
@guipublic guipublic mentioned this pull request Mar 20, 2023
jfecher
jfecher previously approved these changes Mar 20, 2023
Copy link
Contributor

@jfecher jfecher left a comment

Choose a reason for hiding this comment

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

LGTM

@guipublic guipublic added this pull request to the merge queue Mar 21, 2023
@guipublic guipublic merged commit aba1ed2 into master Mar 21, 2023
@guipublic guipublic deleted the gd/dynamic_array5 branch March 21, 2023 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants