`scope_work_depth()` analysis modifies original SDFG
- Dominant language
- Python
- Stars
- 593
- Forks
- 163
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 60
Description
**Describe the bug**
Using `scope_work_depth()` on an SDFG with loops removes the backedges in the state machine.
**To Reproduce**
Steps to reproduce the behavior:
1. Checkout DaCe (Commit Hash: 74a31cb71e624fe541a32b3b097e46b193d08114)
2. Execute the provided Python script with the sample SDFG in this [source](https://github.com/user-attachments/files/17194074/src.zip)
3. Inspect `out.sdfg`
**Expected behavior**
`scope_work_depth()` should not modify the passed SDFG.
**Screenshots**

The SDFG on the left is the sample SDFG and the SDFG on right has been analysed with `scope_work_depth()`.
Contributor guide
Assessment
This issue has not been assessed yet.