Code:

already_done_vertices = empty cfg_of_function = makecfg(entry_point_of_function) function makecfg(current_instruction): vertex myvertex if current_instruction is in already_done_vertices myvertex = the appropriate vertex in already_done_vertices else myvertex.bytecode = bytecode of current_instruction myvertex.branchtype = branch type of current_instruction myvertex.edges = empty add myvertex to already_done_vertices for each target of current_instruction add makecfg(target) to myvertex.edges return myvertex