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
@@ -6,24 +6,23 @@ fun foo(a: Array<Int>) {
L0:
1 <START>
v(a: Array<Int>)
w(a)
magic(a: Array<Int>) -> <v0>
w(a|<v0>)
2 mark({ a[0] += 1 })
mark(a[0] += 1)
mark(a[0])
r(a)
r(0)
call(a[0], get)
r(1)
call(+=, plus)
mark(a[0])
r(a)
r(0)
r(1)
call(a[0], set)
r(a) -> <v1>
r(0) -> <v2>
call(a[0], get|<v1>, <v2>) -> <v3>
r(1) -> <v4>
call(+=, plus|<v3>, <v4>) -> <v5>
r(a) -> <v6>
r(0) -> <v7>
call(a[0] += 1, set|<v6>, <v7>, <v5>) -> <v8>
L1:
1 <END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
<SINK> PREV:[<ERROR>, <END>]
=====================