Skip to content

[Feature] Improve array construction. #28430

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

Closed
d0cd opened this issue Oct 31, 2024 · 1 comment
Closed

[Feature] Improve array construction. #28430

d0cd opened this issue Oct 31, 2024 · 1 comment
Labels
feature A new feature.

Comments

@d0cd
Copy link
Collaborator

d0cd commented Oct 31, 2024

Leo does not support assignment to arrays, which requires users to fully construct arrays when they'd like to update certain values. Furthermore, users are required to manually unroll their loops when making iterative updates to arrays.

@d0cd d0cd added the feature A new feature. label Oct 31, 2024
mikebenfield added a commit that referenced this issue Apr 6, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
mikebenfield added a commit that referenced this issue Apr 6, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
mikebenfield added a commit that referenced this issue Apr 7, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
mikebenfield added a commit that referenced this issue Apr 7, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
mikebenfield added a commit that referenced this issue Apr 10, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
mikebenfield added a commit that referenced this issue Apr 14, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
mikebenfield added a commit that referenced this issue Apr 14, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
mikebenfield added a commit that referenced this issue Apr 14, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
mikebenfield added a commit that referenced this issue Apr 15, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
mikebenfield added a commit that referenced this issue Apr 15, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
mikebenfield added a commit that referenced this issue Apr 15, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
mikebenfield added a commit that referenced this issue Apr 16, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
mikebenfield added a commit that referenced this issue Apr 17, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
mikebenfield added a commit that referenced this issue Apr 20, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
mikebenfield added a commit that referenced this issue Apr 22, 2025
This is supported with a new pass, `WriteTransforming`,
which converts assignments to struct or array members
into assignments to variables, and any time the
struct or array is accessed, reconstructs it
from the variables.

Tests for this functionality are in `array_write.leo`.

Also fixed the test `assign_fail.leo`, which seems to have been
in a useless state for a long time.

Fixes #28389, #28430
@vicsn
Copy link
Collaborator

vicsn commented May 7, 2025

Closed by #28559

@vicsn vicsn closed this as completed May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature.
Projects
None yet
Development

No branches or pull requests

2 participants