Lines Matching refs:flow

1 # Data flow analysis: an informal introduction
5 This document introduces data flow analysis in an informal way. The goal is to
9 Data flow analysis is a well-established technique; it is described in many
31 ## Data flow analysis
33 ### The purpose of data flow analysis
35 Data flow analysis is a static analysis technique that proves facts about a
37 program, while taking control flow into account and scaling to large programs.
39 control flow graph (CFG) until a fixpoint is reached.
43 We would like to explain data flow analysis while discussing an example. Let's
68 us to make a conclusion that `x` can only have one value. When control flow from
203 As humans, we understand the control flow from the program text. We used our
204 understanding of control flow to find program points where two flows join.
205 Formally, control flow is represented by a CFG (control flow graph):
221 * When two control flow paths join, we compute the set union of incoming
229 * Joins in control flow, for example, ones that appear at the end of "if"
252 **Effects of control flow** are modeled by joining the knowledge from all
349 tracking a flow condition. A flow condition is a predicate written in terms of
351 execution path that led to this statement. For example, the flow condition for
371 Of course, in a program with loops, symbolic expressions for flow conditions can
373 keep the symbolic representations manageable and ensure that the data flow
375 impossible flow conditions, and/or it can abstract them, losing precision, after
398 Let's explore how data flow analysis can help with a problem that is hard to
518 ![Lattice for data flow analysis that identifies output parameters](DataFlowAnalysisIntroImages/Out…
524 ### Using data flow results to identify output parameters
526 Let's take a look at how we use data flow analysis to identify an output
527 parameter. The refactoring can be safely done when the data flow algorithm
549 When the data flow algorithm computes a normal state, but not all fields are
564 Similarly, when the data flow algorithm computes a failure state, we also can't
651 `unique_ptr`. There are multiple ways to design a data flow analysis for this
840 To implement it using the data flow analysis framework, we can produce a warning
841 if any part of the branch condition is implied by the flow condition.
849 if (b1 && b2) { // `b1` is implied by the flow condition.
857 we could keep the flow condition in the CNF form and then it would be easy to
863 want to show that when `x.value()` is executed, the flow condition implies
878 flow condition.
909 Finding dead code is a classic application of data flow analysis.
968 We can also track the `m.contains()` check in the flow condition to find
987 words, we need to find all integers tainted with user IDs. We can use data flow