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.
This line also has perhaps an implementation error for similar reasons.
Don't know if that's bugs or I implemented wrong CFGs.
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 theadjacentin fact return every node which included in an edge usenodeas its beginning, once we called ontrans_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 currentnodein CFG.python-student-support-code/dataflow_analysis.py
Line 20 in 8636ea5
This line also has perhaps an implementation error for similar reasons.
Don't know if that's bugs or I implemented wrong CFGs.