作者
Ivan Chien
始于
分类:PL
Tags: [ PL ]
南大《软件分析》课程 08
始于
分类:PL
Tags: [ PL ]
南大《软件分析》课程 08
Static Program Analysis - Pointer Analysis
Keys Facts and Choice in This Course
What Do We Analyze
Pointers in Java
- Local variable: x
- Static field: C.f
- Instance field: x.f
- Array element: array[i]: 会忽略下标,把它们都当成是 array 的一个 field 比如叫 arr,比如
array[0]
也是array.arr
,array[1]
也是array.arr
Pointer-affected Statements
- New.
x = new T()
- Assign.
x = y
- Store.
x.f = y
- Load.
y = x.f
- Call.
r = x.k(a, ...)