-
Notifications
You must be signed in to change notification settings - Fork 12
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
Arrays of clocks and actions #170
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Multiple instantiations of the same templates should share all the actions that are not passed as arguments
Also adds a warning if the user tries to define a variable with 3 consecutive '_'.
tomaz1502
changed the title
[WIP] New feature: Arrays of clocks and actions
Arrays of clocks and actions
Apr 2, 2024
This was referenced Apr 9, 2024
himito
reviewed
Apr 18, 2024
tomaz1502
force-pushed
the
chore/unexpanded_arrays
branch
from
April 23, 2024 09:33
8a8c579
to
31d4e51
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for arrays of actions and clocks. This is a different kind of array, which is only syntatic and only exists before the conversion of
unexpanded_parsed_model
toparsed_model
.In addition, it replaces the type
parsed_model_with_templates
with the new typeunexpanded_parsed_model
. It follows the same idea as the former but also adding information about syntatic arrays in the type (together with the information about templates). Now the function that we export has typeunexpanded_parsed_model -> parsed_model
.Another difference in this type is that it does not contain a single field with type
parsed_model
. Instead, it contains * all * the fields ofparsed_model
as individual fields. The fields are renamed inunexpanded_parsed_model
to avoid crashing the type inference. This is useful since there are a couple of fields that are slightly modified before the expansion. For instance, before expansion, actions have typename_or_access
, as they can be the result of a lookup of an array of actions, but after the expansion these arrays do not exist anymore, so the type of actions become juststring
.Two features are missing and will come in the next PRs: arrays of parameters and the support for arbitrary arithmetic expressions in accesses of syntatic arrays.