-
Notifications
You must be signed in to change notification settings - Fork 13
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
Expression: Expression cloning and mapper tests #419
Conversation
Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/419/index.html |
8298e0c
to
97cb7a9
Compare
7f0c0ed
to
47a7b9b
Compare
This prevents passing `expr_map` to constructors that don't expect it.
2f57346
to
76f1360
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #419 +/- ##
==========================================
+ Coverage 93.04% 93.11% +0.06%
==========================================
Files 198 200 +2
Lines 39320 39550 +230
==========================================
+ Hits 36587 36827 +240
+ Misses 2733 2723 -10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
76f1360
to
8977596
Compare
8977596
to
29c8a15
Compare
FYI: Checking with ec-physics regression locall, there is no noticeable performance impact on loki processing speed from this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic, many thanks. I also appreciate the number of clean-ups along the way, like the stray source handling for expression nodes.
Only comment is a suggestion for a stricter test, but otherwise nothing to add.
@Andrew-Beggs-ECMWF would you mind confirming if this resolves your issue?
Co-authored-by: Balthasar Reuter <[email protected]>
I'd like to reiterate Balthasar's comments, I'm really please to see this patch. Thank you for doing it! 😁 I can confirm all my tests now pass! |
Note: Only for testing so far ...The primary intention behind this PR is to increase test coverage of the expression mappers and rigorously duplicate symbols when expression mappers (
LokiIdentityMapper
andSubstituteExpressionMapper
). It also fixes a bunch of other issues along the way that this threw up and now fixes #379 .In a little more detail:
ExpressionRetriever
) and the mappersLokitIdentityMapper
andSubstituteExrpressionMapper
invalidate_source
argument from Loki mappers (we do not store source on expressions anymore)recursive_expression_map_update
by checking for ancestry ofSubstituteExpressionMapper
before handing the map to constructorsLokiIdentityMapper
andSubstotuteExpressionMapper
_rebuild()
method the base class that check for scope-carrying and scope-free symbolsDeferredTypeSymbols
are replaced withProcedureTypeSymbols
inCallStatement.name
after the type updates.