-
Notifications
You must be signed in to change notification settings - Fork 133
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
Better Name Validation #1661
Merged
philip-paul-mueller
merged 19 commits into
spcl:master
from
philip-paul-mueller:better_symbol_checking
Sep 24, 2024
Merged
Better Name Validation #1661
philip-paul-mueller
merged 19 commits into
spcl:master
from
philip-paul-mueller:better_symbol_checking
Sep 24, 2024
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
…array}` functions. These check ensures that there is no name dublication and all names are unique.
In this case it generates a more appropriate error.
It now checks and ensures that the different names (symbols, arrays and so on) are unique.
This was because where I checked it I did it wrong.
…sts it will be removed.
It no longer removes the reference from the array or symbol dict. It seems that they must exists inside these dicts otherwise there is a validation error.
df6376d
to
2204b16
Compare
Let's forget about this thing, it is just not worth it. |
This commit reworks and unify how the naming is adapted. Thanks to @alexnick83 for suggesting the solution; Let's hope that this time I got all.
Because it was originally inside a while loop the `find_new_name()` function was actually called multiple times. First with the "dirty" name, that still contained dots, which was then replaced. Because the first time the `add_datadesc()` function was called with that name and `find_new_name=True`, the cleaned name was already known. Thus it would again be passed to `_find_new_name()` but this time the name was cleaned and augmented (because it once passed through `_find_new_name()`). The code introduces exactly replicated this behviour. If it should be disabled, then the cleaning and the first call to `_find_new_name()` can be swapped and the if removed. Note this also means that the original `name` contained dots _and_ was added to `_arrays`. However, it did not trigger an error in validation, so it is probably fine.
alexnick83
reviewed
Sep 20, 2024
alexnick83
approved these changes
Sep 20, 2024
…ame name as the real entity.
Before the MPI replacement functions created pseudo-scalars with the same name as the corresponding entity, i.e. if there is a process grid with name `__pgrid_1` then there was a scalar with that name. According to the comment, this scalar is there to prevenbt the removal of some dummy nodes. However, as a side effect the Python frontend was also finding them and had not to wory about the MPI types, at least in assignment statements. But because we disallowed that different entities had different names (except for constants) this no longer worked and the frontend had to explicitly handle them. This commit added the facilities for this.
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 checks to the SDFG to ensures that names from symbols, data descriptors and so on are unique.
Furthermore, it also ensures that the NestedSDFG validates correctly and ensures that no symbols can be written.