静态分析 第三课 Data Flow Analysis(1)

Data Flow Analysis – Applications

  1. Overview of DFA
  2. Preliminaries of DFA
  3. Reaching Definitions Analysis
  4. Live Variables Analysis
  5. Available Expressions Analysis

Overview

How Data Flows on CFG?
How application-specific Data <- Abstraction
Flows through the <- Over-approximation(for most static analyses(may analysis))
Nodes(BBs/statements) and <- Transfer function
Edges(control flows) of <- Control-flow handling
CFG(a program)

may analysis:
outputs information that may be true(over approximation)

must analysis:
outputs information that must be true(under-approximation)

Both over- and under-approximations are for safety of analysis

Preliminaries of Data FLow Analysis

Input and Output States

Each execution of an IR statement transforms an input state to a new output state
The input(output) satate is associated with the program point before(after) the statement

在这里插入图片描述


In each data-flow analysis application, we associate with every program point a data-flow value that represents an abstraction of the set of all possible program states that can be observed for that point.

The set of possible data-flow values is the domain for this application

Data-flow analysis is to find a solution to a set of safe-approximation-directed constraints on the IN(s)'s and OUT(s)'s, for all statements
(transfer function or flows of control)

Notations for Transfer Function’s Constraints and Control Flow Constraints

  • Transfer Analysis
    Forward Analysis: OUT(s) = f(IN(s))
    Backward Analysis: IN(s) = f(OUT(s))

+Control flow within BB or among BBs
I N [ s i + 1 ] = O U T [ s i ] IN[s_{i+1}]=OUT[s_i] IN[si+1]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值