fix: Dataflow analysis produces unsound results on Hugrs with entrypoint
The bigger issue here is #2254, which this PR does not solve; it is a workaround.
However, it at least avoids unsoundness, by running the analysis on all nodes in the Hugr, rather than only those beneath the entrypoint. While this loses the ability to run analysis faster by restricting to within entry_descendants (that would be the full solution to #2254, not done here), it still
- allows using the entrypoint to identify the starting point to which inputs are fed in [
Machine::run] - provdes more accurate results than if we ran only within the subtree
- reduces memory after the analysis is complete (by returning only filtered results)
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 82.17%. Comparing base (
ead071b) to head (6174928). Report is 3 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #2255 +/- ##
=======================================
Coverage 82.17% 82.17%
=======================================
Files 239 239
Lines 43012 43016 +4
Branches 38924 38928 +4
=======================================
+ Hits 35346 35350 +4
Misses 5675 5675
Partials 1991 1991
| Flag | Coverage Δ | |
|---|---|---|
| python | 85.34% <ø> (ø) |
|
| rust | 81.84% <100.00%> (+<0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.