2020-Pointer Analysis (Andersen-Style & Steensgaard-Style) #34
skyleaworlder
started this conversation in
General
Replies: 2 comments 1 reply
-
class Base {}
class A : Base() {
abstract fun hello()
}
class Aplus : A() {
override fun hello() = println("This is Aplus")
}
class Another : A() {
override fun hello() = println("This is Another")
}
class B : Base() {}
class Bplus : B() {}
class Bnother : B() {}
fun foo(A a, B b) {
var c: A? = null
var d: B? = null
val res: Base = if (isOK(a)) {
c = a; a
} else {
d = b; b
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Andersen-Style 和 Steensgaard-Style 都是 flow-insensitive 指针分析算法,通过为四种指针运算定义规则完成指向关系图的构建,这两种算法都不在乎以下两种顺序:
这里提到的 base and simple constraints 指的是 "p = &q" 与 "p = q" 这两类,因为:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://sites.cs.ucsb.edu/~yufeiding/cs293s/slides/293S_11_point-to-analysis.pdf Yufei Ding
https://www.cs.cmu.edu/~aldrich/courses/15-819O-13sp/resources/pointer.pdf Jonathan Aldrich jonathan.aldrich@cs.cmu.edu
from google
Beta Was this translation helpful? Give feedback.
All reactions