We’ll look at the basics of data flow analysis, including how it works in general, while presenting several real-world examples where it can help you write better code.
Striving For Better C++ Code, Part I: Data Flow Analysis Basics
by Anastasia Kazakova
From the article:
All data flow inspections rely on the control-flow graph. This is a graph on which vertices are the statements in the program and edges are the control flow jumps between these statements (direct code execution, conditional jumps, loops, breaks, gotos, etc.).
For example, the control-flow graph at the right represents the function
foo
on the left:
Add a Comment
Comments are closed.