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

[asl] Iterate over possible values in domain. #926

Merged

Conversation

HadrienRenaud
Copy link
Collaborator

Improve subtype inference in cases where there is only a finite number of values, and we can iterate on them.

@HadrienRenaud HadrienRenaud force-pushed the asl-iterate-on-possible-values branch 4 times, most recently from 0df9fd8 to 3f5c612 Compare August 4, 2024 22:45
@HadrienRenaud HadrienRenaud force-pushed the asl-iterate-on-possible-values branch 2 times, most recently from fb545c2 to dd3f528 Compare August 5, 2024 15:34
HadrienRenaud added a commit that referenced this pull request Aug 5, 2024
[asl] Change type of index in for loop

This PR changes the type of the index in a for loop. Before it was a complex operation to determine the maximum and the minimum of the bounds of the loop. Now the type of `i` in `for i = a to b` is simply:
 - `integer {a..b}` if `a` and `b` are well-constrained;
 - the unconstrained integer type otherwise.

`TPositive8` is now split in two:
- `TPositive8` keeps the bulk of the test. ASLRef does not report any error on this part after #926. For now, it still report a type error.
- ASLRef reports a type error on `TPositive8-1`.
@HadrienRenaud HadrienRenaud merged commit b755beb into herd:master Aug 8, 2024
3 checks passed
@HadrienRenaud HadrienRenaud deleted the asl-iterate-on-possible-values branch August 8, 2024 15:31
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.

1 participant