【软件分析笔记】数据流分析:基础与原理篇

Data Flow Analysis: Foundations 在应用篇的所有算法,都可以看作是 Iterative Algorithm 现在,我们从形式化 Formal的角度来审视这些算法: A Functional View of Iterative Algorithm (Define)Given a CFG i.e.: a program with k nodes, the iterative algorithm updates $OUT[n]$ for every node n in each iteration. (Domain)Assume the domain of the values in data flow analysis is $V$, then we can define a K-tuple $$ (OUT[n_1],OUT[n_2],…,OUT[n_k]) $$ as an element of set $(V_1 \times V_2 \times … \times V_k)$ denoted as $V^k$, to hold the values of the analysis after each iteration....

September 15, 2020 · 9 min · Noobi

【软件分析笔记】数据流分析:应用篇

Data Flow Analysis:Applications Overview What is Data Flow Analysis ? How application-specific Data flows on CFG with safe approximation. 分析算法感兴趣的数据如何流经控制流图。 CFG Nodes (Basic Blocks) 基本块 Edges (Control Flow) 控制流 CFG(a program) 整个程序 Safe Approximation safe approximation for different purposes 不同的分析目的,对于safe有不同的定义: Must Analysis:Under Approximation May Analysis: Over Approximation 相同点:这两种目的往往殊途同归地达到Soundness。 不同的目的对应了不同的手段:1. Data Abstraction 2. Approximation Strategies i.e. transfer functions & control flow handling. Preliminaries for Data Flow Analysis Input & Output States Definition:...

September 15, 2020 · 5 min · Noobi