Skip to content
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

Fix for DFS edges method #1320

Merged
merged 5 commits into from Jul 16, 2023
Merged

Fix for DFS edges method #1320

merged 5 commits into from Jul 16, 2023

Conversation

alexnick83
Copy link
Contributor

@alexnick83 alexnick83 commented Jul 14, 2023

The method dace.sdfg.graph.Graph.dfs_edges avoids cycles by keeping track of visited nodes (SDFGStates). While iterating over the out-edges of a node, if the destination has already been visited, it skips it. However, the edge should still be yielded, otherwise, not all of them will be returned. For example, the former algorithm skips the back-edge leading from the body of a for-loop to its guard.

UPDATE: To fix a (newly) failing test, this PR also amends InterstateEdge.new_symbols to return only newly defined symbols. For example, if the InterstateEdge consists of the assignment i = i + 1, InterstateEdge.new_symbols will not return i any longer. The method uses the same algorithm as InterstateEdge.free_symbols to infer which symbols are actually defined.

@alexnick83 alexnick83 linked an issue Jul 14, 2023 that may be closed by this pull request
@alexnick83 alexnick83 requested a review from tbennun July 14, 2023 16:40
…Edge.free_symbols to return only newly defined symbols instead of all the LHS.
@alexnick83 alexnick83 marked this pull request as ready for review July 15, 2023 11:20
@alexnick83 alexnick83 merged commit 4cc7177 into master Jul 16, 2023
9 checks passed
@alexnick83 alexnick83 deleted the fix-dfs-edges branch July 16, 2023 09:32
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.

Missing declaration of interstate symbol in generated code.
2 participants