Skip to content

Dataflow Analysis Refactor#521

Open
Andrew-Beggs-ECMWF wants to merge 10 commits intoecmwf-ifs:mainfrom
Andrew-Beggs-ECMWF:naab-dfa-refactor
Open

Dataflow Analysis Refactor#521
Andrew-Beggs-ECMWF wants to merge 10 commits intoecmwf-ifs:mainfrom
Andrew-Beggs-ECMWF:naab-dfa-refactor

Conversation

@Andrew-Beggs-ECMWF
Copy link
Contributor

@Andrew-Beggs-ECMWF Andrew-Beggs-ECMWF commented Apr 1, 2025

Split off of #515 and implemented suggested changes.

This PR refactors dataflow analysis into a framework that can handle multiple kinds of analysis.

This commit adds AbstractDFA and the concrete implementation of LiveVariableAnalysis. LiveVariableAnalysis replaces DataFlowAnalysis, and is simply a rename from the user's perspective. Internally, everything has been brought under one class (with the use of inner classes) and makes use of AbstractDFA.

The goal is that other forms of DFA will follow and use this pattern as a common interface.
This is to better reflect existing patterns & functionality.
ConstantPropagationAnalysis.py -> constant_propagation_analysis
AbstractDFA.py -> abstract_dfa.py
DataFlowAnalysis.py -> data_flow_analysis.py
@reuterbal
Copy link
Collaborator

Thanks @Andrew-Beggs-ECMWF, please mark this as ready for review if you think we should have a look.

@codecov
Copy link

codecov bot commented Apr 9, 2025

Codecov Report

Attention: Patch coverage is 95.89041% with 12 lines in your changes missing coverage. Please review.

Project coverage is 96.12%. Comparing base (86e4299) to head (1786388).
Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
loki/analyse/dataflow_analysis.py 95.76% 11 Missing ⚠️
loki/analyse/abstract_dfa.py 96.55% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #521      +/-   ##
==========================================
- Coverage   96.12%   96.12%   -0.01%     
==========================================
  Files         232      233       +1     
  Lines       41507    41524      +17     
==========================================
+ Hits        39900    39916      +16     
- Misses       1607     1608       +1     
Flag Coverage Δ
lint_rules 96.39% <ø> (ø)
loki 96.12% <95.89%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Andrew-Beggs-ECMWF Andrew-Beggs-ECMWF marked this pull request as ready for review April 9, 2025 09:45
@Andrew-Beggs-ECMWF
Copy link
Contributor Author

I've marked it ready for review as I think the technical side of things is ready. I've still to add the docstrings though, I might wait until you've made suggestions so I'm not rewriting them if something changes : )

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.

2 participants