A Generic Framework for Interprocedural Analysis of Numerical Properties
Markus Müller-Olm + Helmut Seidl Münster + München PUMA Ringvorlesung, 2009
1
A Generic Framework for Interprocedural Analysis of Numerical - - PowerPoint PPT Presentation
A Generic Framework for Interprocedural Analysis of Numerical Properties + Markus Mller-Olm Helmut Seidl + Mnster Mnchen PUMA Ringvorlesung, 2009 1 Outline: Background The framework for affine relations Grangers
1
2
3
4
5
6
7
8
x2 := 4 x1 := 2 x1 := x1 + x2 x2 := x2 − 2x1
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1 x := 1 y := q
2
x := 4q − 1 x := q + 1 y := x − 2q
semantics collecting property
31
1
2
x := 1 y := q x := 4q − 1 y := x − 2q x := q + 1
semantics collecting property
32
1
2
x := 1 y := q x := q + 1 y := x − 2q x := 4q − 1
semantics abstract semantics collecting property
33
1
2
x := 1 y := q x := q + 1 y := x − 2q x := 4q − 1
semantics collecting property semantics abstract lossless
34
36
37
38
39
40
41
R height field k + 1 Zm log(m) · (k + 1) Z unbounded
42
43
R[start]
R[v]
R[u])
44
x2 := 4 x1 := 2 x1 := x1 + x2 x2 := x2 − 2x1
45
x2 := 4 x1 := 2 x1 := x1 + x2 x2 := x2 − 2x1
46
x2 := 4 x1 := 2 x1 := x1 + x2 x2 := x2 − 2x1
47
x2 := 4 x1 := 2 x1 := x1 + x2 x2 := x2 − 2x1
48
49
R
R[u]
50
R
R[u]
R Complexity field n · k3 Zm n · k3 · log(m)
51
52
53
54
55
56
57
R Complexity field n · k3 Zm n · k3 · log(m)
58
59
60
61
62
63
64
65
66
67
68
69
Q;
Zm[u];
70
Q;
Zm[u];
71
Q[u] = GQ
72
Q[u] = GQ
73
74
1 2 3 4 5 6
Main : q()
x2 := 0 x1 := 2
q : q()
x2 := x1 + x2 x2 := x1 + x2 x1 := 3 ∗ x1 x1 := 5 ∗ x1
75
76
77
78
79
80
R[startq]
R[q]
R[returnq]
R[v]
R[u]
R[v]
R[q] · E♯ R[u]
81
1 1 1 0 0
x2 := x1 + x2 x2 := x1 + x2 x1 := 3 ∗ x1 x1 := 5 ∗ x1
82
1 1 1 0 0 1 1 1 0 0
x2 := x1 + x2 x2 := x1 + x2 x1 := 3 ∗ x1 x1 := 5 ∗ x1
83
1 1 1 0 0 1 3 1 3 0 0 1 1 1 0 0 1 1 18 15 1 3 1 3 0 0
x2 := x1 + x2 x2 := x1 + x2 x1 := 3 ∗ x1 x1 := 5 ∗ x1
84
1 1 1 0 0 1 3 1 3 0 0 1 1 1 0 0 1 1 18 15 1 1 225 282 1 3 1 3 0 0 1 1 57 45
x2 := x1 + x2 x2 := x1 + x2 x1 := 3 ∗ x1 x1 := 5 ∗ x1
85
1 3 1 3 0 0 1 1 57 45 1 1 675 849 1 1 1 0 0 1 3 1 3 0 0 1 1 1 0 0 1 1 18 15 1 1 225 282
x2 := x1 + x2 x2 := x1 + x2 x1 := 3 ∗ x1 x1 := 5 ∗ x1
86
R[q]
R[Main]
R[startq]
R[q]
87
R[q]
R[Main]
R[startq]
R[q]
R[v]
R[u])
88
R[q]
R[Main]
R[startq]
R[q]
R[v]
R[u])
R[v]
R[q] (C♯ R[u]) ,
R[q]
R[u] ,
89
1 1 1 0 0 1 1 225 282 1 1 18 15 1 1 1 1 1
1 2 3 4 5 6
Main : q()
x2 := 0 x1 := 2
q()
x2 := x1 + x2 x2 := x1 + x2 x1 := 3 ∗ x1 x1 := 5 ∗ x1
q :
90
1 1 1 0 0 1 1 225 282 1 1 18 15 2 1 1 1 1 1 1
1 2 3 4 5 6
Main : q()
x2 := 0 x1 := 2
q()
x2 := x1 + x2 x2 := x1 + x2 x1 := 3 ∗ x1 x1 := 5 ∗ x1
q :
91
1 1 1 0 0 1 1 225 282 1 1 18 15 2 1 1 1 1 1 1 2 1 564 450 1 36 30 1
1 2 3 4 5 6
Main : q()
x2 := 0 x1 := 2
q()
x2 := x1 + x2 x2 := x1 + x2 x1 := 3 ∗ x1 x1 := 5 ∗ x1
q :
92
R
R
R[p] , C♯ R[u]
R Complexity field n · k8 Zm n · k8 · log(m)
93
R Complexity field n · k8 Zm n · k8 · log(m) Z n2 · k8 · ∆
94
95
96
97
98
99
x1 := x1 + 1 x1 = 10? x1 := 0
100
101
R[v]
R[u]
102
R[v]
R[u]
103
104
105
x1 := x1 + 1 x1 = 10? x1 := 0
106
x1 := x1 + 1 x1 := 0
x2 := x1 − 10
107
R[v]
R[q] (C♯ R[u]) ,
108
109
110
111
112
113