private void WriteEdges(Block block, Func <Block, string> getLabel) { foreach (var successor in block.SuccessorBlocks) { writer.WriteEdge(blockId.Get(block), blockId.Get(successor), getLabel(successor)); } }
public void Visit(string methodName, UCFG ucfg) { writer.WriteGraphStart(methodName); writer.WriteNode(EntryBlockId, EntryBlockId, ucfg.Parameters.ToArray()); foreach (var entry in ucfg.Entries) { writer.WriteEdge(EntryBlockId, entry, string.Empty); } foreach (var block in ucfg.BasicBlocks) { Visit(block); } writer.WriteNode(ExitBlockId, ExitBlockId); writer.WriteGraphEnd(); }