🤖 AI Summary
Large-scale, structurally complex control-flow graphs (CFGs) of real-world programs degrade readability and structural traceability when visualized using generic graph-drawing algorithms, which fail to preserve instruction execution order. To address this, we propose a CFG-specific visualization framework: (1) we formally define and axiomatize CFG visualization principles grounded in control-flow semantics; (2) we introduce a dominance-based node layout reconstruction strategy that strictly maintains temporal control-flow logic; and (3) we design a lightweight, customized graph layout algorithm optimizing edge crossings, node distribution, and hierarchical structure without compromising efficiency. Evaluated on industrial-scale CFG datasets, our method achieves a 38% improvement in layout clarity and a 2.4× gain in human readability (per expert assessment) over state-of-the-art graph-drawing approaches, while accelerating runtime by 1.7×.
📝 Abstract
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.