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

Is this an implementation bug of dataflow_analysis? #19

Open
Lysanleo opened this issue Jun 6, 2023 · 0 comments
Open

Is this an implementation bug of dataflow_analysis? #19

Lysanleo opened this issue Jun 6, 2023 · 0 comments

Comments

@Lysanleo
Copy link

Lysanleo commented Jun 6, 2023

https://github.com/IUCompilerCourse/python-student-support-code/blob/8636ea57437d9779d8fe963bd635fced5ebb34ab/dataflow_analysis.py#LL16C46-L16C46

This line is trying to get the live-after of a block with reducing on the trans_G.adjacent(node) and the adjacent in fact return every node which included in an edge use node as its beginning, once we called on trans_G, will get all the nodes that are represented before the node in the CFG. But what we actually want is to get the nodes after the current node in CFG.

for v in G.adjacent(node):

This line also has perhaps an implementation error for similar reasons.

Don't know if that's bugs or I implemented wrong CFGs.

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

No branches or pull requests

1 participant