Control flow graphs (CFGs) are essential tools for understanding program behavior, yet the size of real-world CFGs makes them difficult to interpret. With thousands of nodes and edges, sophisticated graph drawing algorithms are required to present them on screens in ways that make them readable and understandable. However, being designed for general graphs, these algorithms frequently break the natural flow of execution, placing later instructions before earlier ones and obscuring critical program structures. In this paper, we introduce a set of criteria specifically tailored for CFG visualization, focusing on preserving execution order and making complex structures easier to follow. Building on these criteria, we present VEIL, a new layout algorithm that uses dominator analysis to produce clearer, more intuitive CFG layouts. Through a study of CFGs from real-world applications, we show how our method improves readability and provides improved layout performance compared to state of the art graph drawing techniques.
翻译:控制流图(CFGs)是理解程序行为的关键工具,然而实际应用中CFGs的规模使其难以解读。由于包含数千个节点和边,需要借助复杂的图绘制算法才能在屏幕上以可读且易于理解的方式呈现它们。然而,这些算法专为通用图设计,常常破坏执行的自然顺序,将后续指令置于较早指令之前,从而模糊了关键的程序结构。本文提出了一套专门针对CFG可视化的标准,重点关注保持执行顺序并使复杂结构更易于追踪。基于这些标准,我们提出了VEIL——一种新的布局算法,利用支配者分析生成更清晰、更直观的CFG布局。通过对实际应用程序中的CFGs进行研究,我们展示了该方法相较于当前最先进的图绘制技术,如何提升可读性并提供更优的布局性能。