Pseudocode: Introduce pseudo-value analysis

This commit is contained in:
Alexey Sedunov
2014-05-12 17:42:44 +04:00
parent 3ce96671d9
commit d2c055e9da
103 changed files with 2417 additions and 1432 deletions
@@ -0,0 +1,27 @@
== foo ==
fun foo(a: Array<Int>) {
a[0]++
}
---------------------
L0:
1 <START>
v(a: Array<Int>)
magic(a: Array<Int>) -> <v0>
w(a|<v0>)
2 mark({ a[0]++ })
mark(a[0]++)
mark(a[0])
r(a) -> <v1>
r(0) -> <v2>
call(a[0], get|<v1>, <v2>) -> <v3>
call(++, inc|<v3>) -> <v4>
r(a) -> <v5>
r(0) -> <v6>
call(a[0]++, set|<v5>, <v6>, <v4>) -> <v7>
L1:
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================