Fact-checked by Grok 2 weeks ago

Control-flow graph

In , a control-flow graph (CFG) is a that models the possible sequences of execution paths through a program's code, with s representing s and edges indicating transfers of control between them. A is defined as a maximal sequence of consecutive statements in the program where control enters only at the beginning and leaves only at the end, ensuring no internal branches or jumps. CFGs typically include a unique entry for the program's starting point and may include an exit , forming a structure where all valid execution paths connect these points. The construction of a CFG begins with identifying "leaders" in the program's —statements such as the first instruction, targets of branch statements, or those immediately following branches—which mark the starts of basic blocks. Basic blocks are then formed by grouping consecutive statements between leaders, and directed edges are added to reflect sequential flow or conditional/unconditional branches, often labeled for true/false outcomes in conditional statements. This process yields a that captures the program's structure without embedding dependencies, distinguishing it from data-flow or program dependence . Control-flow graphs are essential tools in compiler construction and , enabling optimizations like , loop detection via back-edges and (nodes through which all paths from the entry must pass), and data-flow analyses such as reaching definitions. They also support by identifying structural coverage criteria, in execution logs, and of compiled binaries. Properties like reducibility—where the graph becomes acyclic after removing back-edges—further aid in advanced analyses and transformations.

Fundamentals

Definition

A control-flow graph (CFG) is a that represents the possible sequences of execution in a , where each corresponds to a —a maximal sequence of consecutive statements with no branches or jumps into or out of its interior—and each directed edge indicates a possible transfer of control from one basic block to another. This structure captures the flow of execution through sequential instructions, conditional branches, and jumps, providing a foundation for analyzing behavior without considering data dependencies. Every CFG designates a unique entry node as the initial point of execution and, in many cases, an exit node as the termination point, allowing the graph to model the program's overall from start to finish. Basic blocks serve as the atomic units in this representation, ensuring that the graph abstracts away low-level details while preserving the essential paths of control. In distinction from an (AST), which encodes the hierarchical syntactic structure derived from , a CFG focuses on the dynamic paths of execution after syntactic analysis, emphasizing how control proceeds through sequential and conditional statements. Similarly, while data-flow graphs model the movement and transformation of data between operations, CFGs are dedicated exclusively to the sequencing and branching of control, independent of variable values or dependencies. The concept of the control-flow graph originated in compiler theory during the late 1960s, with foundational contributions from researchers like Frances E. Allen, whose 1970 work formalized its use for and optimization. Allen's approach built on earlier ideas, such as boolean connectivity matrices for flow diagrams introduced by Reese T. Prosser in the 1950s, establishing the CFG as a key tool in understanding and transforming program execution.

Construction

The construction of a control-flow graph (CFG) involves systematically partitioning a program's or into basic blocks and then connecting them with directed edges that represent possible control transfers. This process typically begins with scanning the code to identify points where control flow may diverge or converge, ensuring the resulting graph accurately models execution paths without introducing extraneous nodes or edges. The first step is to identify basic block boundaries by locating "leaders," which are instructions that serve as entry points to blocks. Leaders include the program's first , any of a (conditional or unconditional, such as jumps or gotos), and the instruction immediately following a or . This identification can be formalized as an that iterates through the code: initialize the set of leaders with the first ; for each , if it is a , add its targets to the leaders; then, for each leader, mark the instructions following as additional leaders. Once leaders are found, basic blocks are formed by grouping consecutive starting from each leader up to but not including the next leader or the end of the program. Control statements like if, while, , and are key indicators during this scan, as they end the current block and potentially start new ones at labels or successors. After forming the basic blocks, which serve as nodes in the CFG, edges are inserted to capture control flow. Sequential edges connect a block to its immediate successor if the block does not end in a branch. For conditional branches, edges are added to all possible target blocks; unconditional jumps or gotos create a single edge to the target. Exception handling introduces additional edges from statements that may raise exceptions (e.g., I/O operations) to corresponding handler blocks, modeling non-local control transfers explicitly. Unstructured constructs like gotos are handled by treating them as unconditional branches, which may result in irregular edges but are incorporated directly without restructuring the code during initial construction. Optimizations can be applied during or immediately after construction to simplify the graph. For instance, edge contraction merges adjacent blocks connected by a single sequential edge without branches, effectively removing unnecessary intermediate nodes and reducing graph complexity while preserving semantics. This is particularly useful for eliminating trivial blocks created by labels or empty statements in unstructured code. The overall algorithm ensures the CFG is minimal yet complete, facilitating subsequent analyses.

Examples

A simple example of a control-flow graph (CFG) arises from an statement in , which demonstrates conditional branching and a merge point. Consider the following :
if (x > 0) {
    y = x * 2;
} else {
    y = x / 2;
}
z = y + 1;
The CFG consists of four basic blocks: an entry block containing the condition if (x > 0), a then-block with y = x * 2;, an else-block with y = x / 2;, and an exit block with z = y + 1;. Edges connect the entry block to the then-block (true branch) and else-block (false branch), while both branches flow to the exit block, forming a diamond-shaped structure with the entry and exit as the top and bottom nodes, respectively. Another common CFG example is a while loop, illustrating iterative control flow with a back edge. For the pseudocode:
x = 0;
while (x < y) {
    y = f(x, y);
    x = x + 1;
}
The graph has four nodes: an initialization block x = 0;, a header block testing x < y, a body block with y = f(x, y); x = x + 1;, and an exit block (often a dummy node for termination). Edges include forward flow from initialization to header, a true branch from header to body, a false branch from header to exit, and a back edge from body to header to enable looping. This creates a cycle between the header and body, with the entry at the initialization and exit after the header. In visual representations, CFG nodes are typically labeled with the sequence of instructions in each , and directed arrows denote edges representing possible transfers, such as conditional jumps or unconditional falls-through. The entry node is the program's starting point, often marked as such, while the node(s) indicate termination points where leaves the . Variations in CFGs can include edges for function calls, where a call edge leads to a subroutine entry and a edge brings back, or exception-handling edges that divert flow to error-recovery blocks upon runtime faults like . These edge types extend the basic structure to model interprocedural or fault-tolerant without altering the core -based representation.

Basic Properties

Reachability

In a control-flow graph (CFG), reachability defines whether one node can be accessed from another during potential program execution. Specifically, a node B is reachable from a node A if there exists a directed path—a sequence of one or more edges—from A to B. This concept captures the possible flow of control through the program's basic blocks, starting typically from the designated entry node, and is essential for analyzing executable portions of code. Computing the reachable set from the entry node involves standard techniques. (DFS) explores as far as possible along each branch before backtracking, while (BFS) processes nodes level by level from the source. Both algorithms mark visited nodes to avoid cycles and efficiently identify all accessible nodes, with O(V + E) where V is the number of nodes and E the number of edges. The reachability relation R, where R(A, B) holds if a path exists from A to B, can also be determined via the of the CFG's ; this matrix-powered approach, using algorithms like Warshall's, yields a boolean matrix indicating all pairwise reachabilities in O(V^3) time. Reachability plays a key role in optimizations and . For instance, nodes unreachable from the entry point represent , which compilers can eliminate to reduce program size and improve performance without altering semantics. Furthermore, by examining the reachable , analysts can detect potential infinite loops, such as cycles lacking any outgoing path to an node, enabling warnings or transformations to prevent non-termination. These applications underscore reachability's foundational utility in ensuring code reliability and efficiency.

Strongly Connected Components

A strongly connected component (SCC) in a , such as a control-flow graph (CFG), is a maximal in which there exists a directed path from every to every other within the . This property of mutual ensures that the component captures tightly coupled regions of , extending the basic notion of by requiring bidirectional accessibility between all pairs of nodes. Efficient algorithms exist to compute the SCCs of a CFG in linear time relative to its size. Tarjan's algorithm, based on a single traversal with a to track discovery and low-link values, identifies all SCCs in O(V + E) time, where V is the number of vertices (basic blocks) and E is the number of edges. similarly achieves O(V + E) through two passes of : one on the original to obtain a finishing-time ordering, and another on the transpose to extract components in reverse post-order. In CFGs, SCCs hold particular significance for , as they delineate natural —where the component includes a header with back edges from the —and highlight irreducible regions that resist simple loop structuring. By contracting each SCC into a single supernode, the resulting forms a (DAG), which simplifies subsequent optimizations and analyses by enabling topological processing without intra-component cycles. For illustration, consider a CFG for a basic : vertices include an entry E leading to loop header H, H to body B, B back to H via a back , and H to an X. The SCC computation yields {H, B} as a single component due to the mutual paths (H → B → H and B → H → B), while E and X form trivial SCCs, with the condensation DAG showing E → {H,B} → X.

Analysis Techniques

Dominance Relationships

In a control-flow graph (CFG) with a designated entry , a d dominates a n, written d \dom n, if every from the entry to n includes d. The entry dominates every in the , and every dominates itself (reflexivity). Strict dominance, denoted d \sdom n, excludes the case where d = n, so d properly dominates n only if d precedes n on all paths to it. Post-dominance is the dual concept, defined with respect to paths to an exit : a p post-dominates n, written p \pdom n, if every path from n to the exit passes through p. This relation can be computed as forward dominance in the reverse CFG, where edge directions are inverted and the entry and exit nodes are swapped. Strict post-dominance follows analogously by excluding reflexivity. The dominance frontier of a d is the set of all nodes n such that d dominates some immediate predecessor of n, but d does not strictly dominate n. Formally, DF(d) = \{ n \mid \exists p \in \preds(n) \text{ s.t. } d \sdom p \land d \nsdom n \}, where \preds(n) denotes the predecessors of n. Dominance frontiers capture the boundaries where dominance breaks, which is crucial for identifying merge points in control flow, such as where phi functions are inserted in static single assignment (SSA) form. Dominators can be computed using iterative data-flow analysis, which solves the fixed-point equations \dom(n) = \{n\} \cup \bigcap_{p \in \preds(n)} \dom(p) starting from the entry node, propagating sets until convergence. This approach has time complexity O(n^2) in the worst case for dense graphs but performs well in practice for typical CFGs. For efficiency, the Lengauer-Tarjan algorithm computes the dominator relation in near-linear time, specifically O(m \alpha(m,n)), using depth-first search and union-find structures to process semi-dominators and link-eval operations. The dominator tree organizes the dominance relation hierarchically: the root is the entry node, and for each node n \neq entry, its parent is the strict dominator of n that is closest to n (i.e., the immediate dominator \idom(n)). Edges in the tree represent immediate dominance, forming a that reflects nesting of control regions. This tree facilitates optimizations by enabling traversal for tasks like constant propagation and partial redundancy elimination, as subtrees correspond to dominator-based scopes.

Special Edges

In control-flow graphs (CFGs), edges are classified based on their role in representing program execution paths, which facilitates various analyses and optimizations. This classification relies on a (DFS) traversal, producing a DFS . Tree edges form the itself. Forward edges connect an to a proper in the DFS (not a direct tree edge), progressing down the without forming cycles. Back edges connect a to an in the DFS , indicating loops; such edges have the that the head dominates the tail. Cross edges connect nodes where neither is an or of the other in the DFS , typically linking different branches. Abnormal edges represent exceptional control flows, such as those triggered by exceptions or signals, where the destination may be unpredictable or lead to handlers outside the normal flow. Critical edges form another important category, defined as edges originating from a basic block with multiple successors and terminating at a basic block with multiple predecessors; these are unmergeable without modification and pose challenges for optimizations requiring precise insertion points. To address this, compilers often split critical edges by inserting new empty s, ensuring that subsequent passes can safely place code without duplicating instructions across branches. Impossible edges, also known as fake edges, are artificially added to the CFG to maintain structural properties, such as ensuring the exit node has exactly one incoming edge or modeling unreachable paths in infinite loops; they are never executed in practice but aid in formal analysis. These special edges significantly influence compiler optimization passes. For instance, back and cross edges help identify loops for by revealing cyclic dependencies, while critical edges necessitate preprocessing to avoid incorrect transformations during redundancy elimination. Abnormal and impossible edges, however, can complicate analyses by introducing uncertainty, often requiring conservative approximations to preserve program correctness.

Loop Structures

Loop Management

Loop identification in control-flow graphs (CFGs) primarily relies on the concept of natural loops, which are single-entry subgraphs formed by back edges connecting a node to a node that dominates the . A back edge is defined as an edge from a node n to a node h where h dominates n, meaning every from the entry of the CFG to n passes through h. The body of the natural loop includes the h and all nodes from which n can be reached without traversing h, ensuring a unique entry point for optimization purposes. To simplify loop entry and facilitate analysis, compilers often insert a pre-header node immediately before the loop header, creating a dedicated entry block even if the original CFG has multiple predecessors to the header. In static single assignment (SSA) form, this pre-header placement allows phi functions—used to merge values from multiple control paths—to be positioned at the loop header without complicating the representation of loop entries. Pre-headers also enable safer insertion of loop-invariant computations outside the loop body while preserving the original control flow. Natural loops exhibit a structured nesting property: any two natural loops in a CFG are either disjoint, one contained within the other, or identical, which aids in building a hierarchical nest tree for . This property holds because are defined via dominance and back edges, preventing arbitrary overlaps and allowing disjoint or nested configurations without side entries. Handling nested involves recursively identifying inner within the body of outer ones, while disjoint can be processed independently. One key optimization leveraging loop management is , which relocates computations whose results do not change across loop iterations to the pre-header or just before the loop. This uses dominance information to verify that an expression is —computed from values not modified within the loop—and can be safely hoisted without altering program semantics. For example, in a loop accumulating an array sum where the array bounds are , the bounds check can be moved outside, reducing redundant executions.

Reducibility

In control-flow graphs (CFGs), reducibility is a structural property that ensures all can be organized into a hierarchical form resembling constructs. A CFG is reducible if every is a natural loop, where back edges connect only to a dominating header , and there are no retreating edges that bypass this dominance outside of such loops. This means that in any depth-first of the graph, every retreating edge must be a back edge to a that dominates its . To test for reducibility, an iterative can be applied: repeatedly identify and collapse natural loops (as defined by back edges to dominating headers) until the graph either reduces to a single or fails to do so, indicating irreducibility. This process involves transformations such as removing self-loops and merging nodes with a unique predecessor, equivalent to collapsing intervals in the . The runs in O(V + E) time, where V is the number of (basic blocks) and E is the number of edges, using a to identify back edges and dominators efficiently. Reducible CFGs exhibit properties that align with structured , commonly found in languages without unrestricted statements, such as those enforcing , while, and for constructs. This structure enables simpler and more efficient analyses, including data-flow optimization and interval-based transformations, by limiting the complexity of iterative algorithms to the graph's loop-nesting depth plus a small constant. Examples of irreducible CFGs typically involve constructs like statements that introduce multiple entry points to a , creating cycles without a single dominating header; for instance, a jumping directly into a 's body forms a retreating that cannot be part of a natural , resulting in a non-collapsible .

Loop Connectedness

Loop connectedness quantifies the degree of interconnection among in a control-flow graph (CFG), particularly by measuring the prevalence of back edges within loop nests relative to a depth-first (DFST). Formally, for a CFG G and DFST T, the loop connectedness d(G, T) is defined as the maximum number of back edges—those connecting a to one of its ancestors in T—encountered along any cycle-free in G. This metric captures the complexity of loop structures, where higher values indicate denser nesting or multiple looping mechanisms within a single nest. In reducible CFGs, d(G, T) remains constant regardless of the chosen DFST, providing a stable property for analysis. A key aspect of loop connectedness involves assessing entry and exit points in loops, distinguishing single-entry single-exit (SESE) structures from those with multiple entries or exits. SESE loops, which have exactly one entry and one exit , represent ideal structured forms that align with high connectedness in reducible graphs, where each natural typically features a single back . In contrast, multiple-entry loops arise in irreducible regions, increasing connectedness by allowing multiple back s to converge on a loop header, complicating the . Reducibility can be viewed as a special case of maximal connectedness limited to one back per , enabling straightforward reduction to SESE forms. The of connectedness emerges through interval analysis, where intervals—maximal single-entry subgraphs—are constructed to model nested as a tree-like structure akin to an . In this framework, outer intervals encompass inner ones, with back edges defining the boundaries; the depth of nesting correlates with d(G), as multiple back edges signal deeper or overlapping interactions. For irreducible regions, which defy simple SESE decomposition due to crossing edges, intervals overlap rather than nest perfectly, requiring auxiliary nodes or transformations to maintain . This approach handles non-structured control by partitioning the CFG into progressively refined regions, preserving overall connectedness. Algorithms for computing loop connectedness leverage dominator relations to identify and nest loops efficiently. Dominators, computed in near-linear time, reveal loop headers as nodes that strictly dominate back-edge tails, allowing enumeration of natural loops and their nesting: an inner loop nest exists if its header is dominated by an outer loop's header. et al.'s iterative algorithm for dominators, with O(|E|) worst-case complexity assuming low loop nesting, forms the basis for detecting these structures and deriving d(G) by counting back edges per nest. For region formation, the process extends to building SESE regions via dominator and post-dominator trees, collapsing loops into hierarchical nodes; this yields a program structure tree (PST) where connectedness dictates the tree's depth and branching. The significance of loop connectedness lies in providing an upper bound on the number of iterations required for convergence in iterative data-flow analyses, such as no more than d(G) + 3 passes when traversing in reverse postorder. This bound facilitates efficient optimization passes. Additionally, low connectedness can aid region-based restructuring of , enabling transformations that simplify unstructured CFGs while preserving semantics.

Extensions and Applications

Inter-procedural Control-Flow Graphs

Inter-procedural control-flow graphs (ICFGs) extend intra-procedural control-flow graphs to model across procedure boundaries in a program, enabling whole-program analysis. They are constructed by integrating the control-flow graphs of individual s with a that represents procedure invocations and returns. In this supergraph, nodes include statements from each 's CFG, along with explicit call nodes and return-site nodes; edges comprise intra-procedural control-flow edges, call edges from call sites to callee entry points, and return edges from callee exit points to the corresponding post-call sites in the caller. This structure captures the program's overall while respecting procedure nesting. A key challenge in ICFG construction and analysis arises from , which introduces cycles that can lead to infinite paths and unbounded graph explosion if fully unfolded. To mitigate this, analyses restrict consideration to valid paths—those with balanced calls and returns, enforceable via a that ensures proper nesting without infinite . Parameter passing poses another challenge, as actual arguments at call sites must be mapped to formal parameters in callees, often requiring data-flow modeling of values and globals. Context-sensitivity further complicates matters by distinguishing invocations based on calling contexts, improving but exponentially increasing the state space compared to context-insensitive approximations. For efficient analysis on ICFGs, summary edges approximate the effects of inter-procedural paths by representing the net transformation from a procedure's entry to its exit sites, computed via data-flow without enumerating all paths. These edges summarize the intra-procedural behavior, such as modifications or uses, and are particularly useful in flow-sensitive analyses like reaching definitions. Integration with points-to analysis resolves indirect calls and pointer dereferences, refining the call graph and ICFG edges for greater accuracy in languages with . The IFDS (Interprocedural Finite Distributive Subset) provides a foundational for solving a broad class of inter-procedural data-flow problems on ICFGs, reducing them to in an exploded supergraph. Here, nodes are pairs of original nodes and data-flow facts from a finite D, with edges modeling distributive data-flow functions; the ensures precision for subset-based problems (e.g., live variables) by computing only realizable paths in time, typically O(|E|D^3), while handling through path validation.

Applications in Optimization and Analysis

Control-flow graphs (CFGs) play a central role in optimizations by enabling the identification and elimination of through , which determines whether certain s or basic blocks can be executed from the program's . This technique is fundamental to , where assignments to variables that are never used afterward are removed, reducing program size and improving execution speed without altering semantics. For instance, in a CFG, if a lacks incoming edges from reachable paths, it and its dependent subgraphs can be pruned entirely. Dominance relationships in CFGs further support optimizations like constant propagation, where constant values are forwarded along paths where a definition strictly dominates all uses, allowing substitution and simplification of expressions. This process converges through iterative on the CFG, replacing variables with constants to enable further folding and reduce runtime computations. Such optimizations are implemented in production compilers, where dominance frontiers help manage phi-functions in for precise propagation. In static analysis, CFGs facilitate bug detection by modeling execution paths to identify potential errors, such as dereferences, where analysis traces paths from variable assignments to uses and flags those leading to unchecked nulls. Tools employing flow-sensitive on CFGs can pinpoint 50-80% of such defects in code by propagating nullness information across basic blocks. Similarly, tracking for leverages CFGs to propagate taint labels from untrusted sources through control and data flows, detecting leaks or violations like tainted data reaching sensitive sinks. This approach reduces over-tainting by incorporating control-flow-aware propagation at the byte level, enhancing precision in vulnerability detection. Emerging applications extend CFGs to AI and compilers, where represents control flow using operators like tf.cond and tf.while_loop within its dataflow graphs, enabling optimizations for dynamic execution paths in training. In , CFGs aid binary analysis by reconstructing control structures from stripped executables, using graph s to predict procedure boundaries and recover function calls with high accuracy. Major compilers integrate CFG-based passes for these purposes; LLVM's SimplifyCFG pass merges basic blocks and eliminates unreachable code, while GCC employs similar analyses in its optimization pipelines to streamline control flow. Post-2020 advancements in just-in-time (JIT) compilation have incorporated renewable control-flow integrity, dynamically enforcing CFG policies during runtime to mitigate attacks while preserving performance. Tools like JITScope visualize IR transformations on CFGs in JIT environments, aiding debugging and optimization tuning in modern systems.

References

  1. [1]
    [PDF] Control Data Flow Graph
    A control flow graph (CFG), or simply a flow graph, is a directed graph in which: – (i) the nodes are basic blocks; and. – (ii) the edges are induced from ...
  2. [2]
    [PDF] Representation and Analysis of Software 1 Introduction 2 Control ...
    A control flow graph1 (CFG) is a directed graph in which each node represents a basic block and each edge represents the flow of control between basic ...Missing: science | Show results with:science
  3. [3]
    [PDF] Control Flow Graph: Definition
    representation of control flow in programs used in high-level and low-level code optimizers. The flow graph data structure lends itself to use of several ...Missing: science | Show results with:science
  4. [4]
    [PDF] Modern Compilers: Theory and Practise - Control flow analysis
    CFG - Control flow graph. Definition: A rooted directed graph G = (N,E), where N is given by the set of basic blocks + two special BBs: entry and exit. And ...
  5. [5]
    [PDF] Basic Program Analysis - CS@Columbia
    • Abstract Syntax Tree : Source code parsed to produce AST. • Control Flow Graph: AST is transformed to CFG. • Data Flow Analysis: operates on CFG. Page 5. The ...
  6. [6]
    Why use a CFG instead of a DFG - Computer Science Stack Exchange
    Apr 30, 2018 · A control-flow graph serves a different purpose than a data-flow graph. They aren't alternatives. A control-flow graph represents the flow of control.What is the difference between control flow graph & interprocedural ...Backward data-flow: post-order or RPO on reverse CFG?More results from cs.stackexchange.com
  7. [7]
    Control flow analysis | Proceedings of a symposium on Compiler ...
    In this paper the basic control flow relationships are expressed in a directed graph. Various graph constructs are then found and shown to codify interesting ...
  8. [8]
    [PDF] CS 380C Lecture 2 - UT Computer Science
    Control Flow Graph Construction. Constructing CFGs with basic blocks (sets of instructions). • Identify Leaders - first instruction of a basic block. • In ...
  9. [9]
    [PDF] Control Flow Analysis
    Control Flow Graph. □ CFG models flow of control in the program (procedure) ... 2. For each leader, its basic block is the leader and all statements up ...
  10. [10]
    [PDF] Compiler Design
    A goto-statement ends a basic block. ▫ A return statement ends a basic block. ▫ A label starts a basic block (and ends the previous block).<|control11|><|separator|>
  11. [11]
  12. [12]
    [PDF] Optimizations - UT Computer Science
    • Control Flow Graph (CFG) = graph representation of computation and control ... • Each outgoing edge = outgoing flow of control in some execution of ...Missing: contraction | Show results with:contraction
  13. [13]
    [PDF] Graph Coverage for Source Code
    – Control flow graph (CFG): the most common graph for source code ... Example: CFG for a while loop. – Basic blocks. 1: x = 0;. 2: while(x < y). 3: y ...
  14. [14]
    [PDF] Basic Blocks and Flow Graphs
    Flow Graphs 475–477. Or, read the Dragon book: Basic Blocks 528–530. Flow Graphs 532–534. Summary. A Control Flow Graph (CFG) is a graph whose nodes are basic.
  15. [15]
    [PDF] Dragon-book.pdf - School of Information Science and Technology
    In the time since the 1986 edition of this book, the world of compiler design has changed significantly. Programming languages have evolved to present new.
  16. [16]
    [PDF] Control Flow Analysis
    Every- thing that is said about directed graphs in this paper holds for control flow graphs. A subgraph of a directed graph, G = (B,E), is a directed graph.
  17. [17]
    [PDF] Directed Graphs - Princeton CS
    Transitive closure. For which vertices v and w is ... Adjacency matrix. • Adjacency lists. • Adjacency ... Reachability application: program control-flow analysis.<|control11|><|separator|>
  18. [18]
    [PDF] A Path-based Approach to the Detection of Infinite Looping
    Infinite looping can be detected if we can show that, once the loop is entered, none of the paths in the loop body leads to the violation of the loop condition.
  19. [19]
    Control flow analysis
    INTRODUCTION. Any static, global analysis of the expression and data relation- ships in a program requires a knowledge of the control flow of the program.Missing: 1960s | Show results with:1960s
  20. [20]
    (PDF) Formally-Proven Kosaraju's algorithm - ResearchGate
    This notes explains how the Kosaraju's algorithm that computes the strong-connected components of a directed graph has been for-malised in the Coq prover using ...
  21. [21]
    A fast algorithm for finding dominators in a flowgraph
    In 1979 Lengauer and Tarjan gave an almost-linear-time algorithm to find dominators. ... In the first part of the paper we show how to extend recent ...Missing: original | Show results with:original
  22. [22]
    [PDF] Control flow graphs and loop optimizations - Purdue Engineering
    Apr 14, 2011 · Control flow graphs (CFG) divide statements into basic blocks. Loop optimizations include low-level (code motion, strength reduction) and high- ...Missing: contraction | Show results with:contraction
  23. [23]
    [PDF] Flow Graph Theory - Stanford InfoLab
    Back Edges. ◇An edge is a back edge if its head dominates its tail. ◇Theorem: Every back edge is a retreating edge in every DFST of every flow graph.Missing: types abnormal
  24. [24]
    Tree, Back, Edge and Cross Edges in DFS of Graph - GeeksforGeeks
    Jul 11, 2025 · Forward Edge: It is an edge (u, v) such that v is a descendant but not part of the DFS tree. An edge from 1 to 8 is a forward edge. Back edge: ...Missing: control flow abnormal
  25. [25]
    Control Flow Graphs (CFG) | Echo - Washi
    An edge introduced by a conditional jump/branch instruction. Abnormal, An edge introduced by special or exceptional control flow (such as an error or signal).Missing: forward back cross
  26. [26]
    Parallel copy motion | Proceedings of the 13th International ...
    ... control-flow graph edges, leading to edge splitting. This paper presents ... A second application is moving copies out of critical edges, i.e., edges ...
  27. [27]
    The Machine-SUIF Control Flow Graph Library
    To handle an infinite loop, they insert an impossible edge from one of the loop nodes to the exit. We also provide functions to create and recognize ...
  28. [28]
    [PDF] Exceptional Interprocedural Control Flow Graphs for x86-64 Binaries⋆
    Each box is itself a control flow graph over various instructions. The thick black edges are also generated by existing works, the dashed edges are not.
  29. [29]
    Flow Graph Reducibility | SIAM Journal on Computing
    Flow Graph Reducibility. Authors: Matthew S. Hecht and Jeffrey D. Ullman ... In addition, a dominator algorithm for an rfg is presented which takes O(edges) bit ...
  30. [30]
    Testing flow graph reducibility | Proceedings of the fifth annual ACM ...
    Testing flow graph reducibility. Article. Free access. Share on. Testing flow graph reducibility. Author: Robert Tarjan. Robert Tarjan. View Profile. Authors ...
  31. [31]
  32. [32]
    [PDF] A Simple, Fast Dominance Algorithm
    In this paper, we have presented a technique for computing dominators on a control-flow graph. The algorithm builds on the well-developed and well-understood ...
  33. [33]
    The program structure tree: computing control regions in linear time
    We give a linear-time algorithm for finding SESE regions and for building the PST of arbitrary control flow graphs (including irreducible ones). Next, we ...
  34. [34]
    [PDF] Precise Interprocedural Dataflow Analysis via Graph Reachability
    Abstract. The paper shows how a large class of interprocedural dataflow-analysis problems can be solved precisely in poly- nomial time by transforming them ...Missing: challenges seminal
  35. [35]
    [PDF] The Program Summary Graph and Flow-sensitive Interprocedural ...
    This paper discusses a method for interprocedural data flow analysis which is powerful enough to express flow- sensitive problems but fast enough to apply ...
  36. [36]
    [PDF] Increasing the scope and resolution of Interprocedural Static Single ...
    A flow-insensitive pointer analysis indicates that x points to either y or z, and g points to x. Since the dereference in Example 1(a) on Line 8 corresponds.
  37. [37]
    [PDF] CONTROL FLOW GRAPHS - UFMG
    The material in these slides have been taken from the "Dragon Book", Secs 8.5 – 8.7, by Aho et al. ... Remember, if we are running on Linux, then our shared.
  38. [38]
    [PDF] Dominance Frontiers - cs.wisc.edu
    Since CFGs model flow of control, it is useful to identify those basic blocks whose execution is controlled by a branch decision made by a predecessor. We say Y ...Missing: seminal paper
  39. [39]
    CS 6120: Sparse Conditional Constant Propagation
    Oct 23, 2019 · Sparse conditional constant propagation computes fixed values at compile time, using SSA to detect control-flow edges that will never be ...
  40. [40]
    [PDF] Evaluating and Tuning a Static Analysis to Find Null Pointer Bugs
    This paper describes a static analysis for null pointer bugs in Java, using simple techniques, and pinpoints 50-80% of defects in student code.
  41. [41]
    [PDF] A Practical Approach for Dynamic Taint Tracking with Control-flow ...
    Then, it constructs the modified control flow graph described in Section 3.1 and uses Cooper et al. ... regions identified by data-only, basic-control, SCD ...<|control11|><|separator|>
  42. [42]
    A Practical Approach for Dynamic Taint Tracking with Control-flow ...
    Dec 24, 2021 · In this article, we introduce Conflux, alternative semantics for propagating taint tags along control flows. Conflux aims to reduce over-tainting.
  43. [43]
    [PDF] Implementation of Control Flow in TensorFlow
    Nov 1, 2017 · Overview. This document presents the current design and implementation of control flow operators in. TensorFlow.
  44. [44]
    Neural Reverse Engineering of Stripped Binaries using Augmented ...
    Feb 25, 2019 · We present a novel approach for predicting procedure names in stripped executables. Our approach combines static analysis with neural models.
  45. [45]
    LLVM's Analysis and Transform Passes
    This document serves as a high-level summary of the optimization features that LLVM provides. Optimizations are implemented as Passes that traverse some ...Missing: GCC 2020
  46. [46]
    Renewable Just-In-Time Control-Flow Integrity - ACM Digital Library
    Oct 16, 2023 · By leveraging recent advances in lightweight binary disassembly, efficient memory page interception, and fast machine code rewriting, Renew ...Missing: advancements | Show results with:advancements
  47. [47]
    JITScope: Interactive Visualization of JIT Compiler IR Transformations
    May 27, 2025 · We propose JITScope, a system that visualizes the evolution of Just-in-Time (JIT) compiler's Intermediate Representation (IR) using a backend- ...Missing: advancements 2020-2025