Complete the code to initialize the data flow analysis iteration.
worklist = [1]In iterative data flow frameworks, the worklist is usually initialized with all program nodes to ensure all nodes are analyzed.
Complete the code to update the data flow information for a node.
new_info = meet([1])The meet operation combines data flow information from all predecessors of a node to update its state.
Fix the error in the iteration condition to continue until no changes occur.
while [1]:
The iteration continues while changes are detected in data flow information, ensuring convergence.
Fill both blanks to correctly update the worklist after processing a node.
if data_changed: worklist.[1](successors) else: worklist.[2](node)
If data changes, successors are added to the worklist using extend. Otherwise, the current node is removed using remove.
Fill all three blanks to create a dictionary comprehension that maps nodes to their data if data is valid.
result = [1]: [2] for [3] in nodes if is_valid([2])
The comprehension maps each node to its data[node] if the data is valid. The variable iterating over nodes is node.