This preview shows pages 1–7. Sign up to view the full content.
Lecture 3
Foundation of Data Flow Analysis
I
Semilattice (set of values, meet operator)
II
Transfer functions
III Correctness, precision and convergence
IV
Meaning of Data Flow Solution
Reading: Chapter 9.3
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document I. Purpose of a Framework
•
Purpose 1
–
Prove properties of entire family of problems once and for all
•
Will the program converge?
•
What does the solution to the set of equations mean?
•
Purpose 2:
–
Aid in software engineering: reuse code
M. Lam
CS243: Foundation of Data Flow
2
The DataFlow Framework
•
Dataflow problems (F, V,
∧
) are defined by
–
A semilattice
•
domain of values V
•
meet operator
∧
: V x V
V
–
A family of transfer functions F: V
V
M. Lam
CS243: Foundation of Data Flow
3
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document Semilattice: Structure of the Domain of Values
•
A semilattice S = <a set of values
V
, a meet operator
∧
>
•
Properties of the meet operator
–
idempotent: x
∧
x = x
–
commutative: x
∧
y = y
∧
x
–
associative: x
∧
(
y
∧
z
)
=
(
x
∧
y
)
∧
z
•
Examples of meet operators ?
•
Nonexamples ?
M. Lam
CS243: Foundation of Data Flow
4
Example of a SemiLattice Diagram
•
(V
,
∧
) : V = {
x
 such that
⊆
{d
1
,d
2
,d
3
}},
∧
= U
•
x
∧
y = first common descendant of x & y
•
A meet semilattice is bounded if there exists a top element T,
such that x
∧
T =
x
for all x.
•
A bottom element
⊥
exists, if x
∧
⊥
=
⊥
for all x.
M. Lam
CS243: Foundation of Data Flow
5
{}
(T)
{d
1
}
{d
2
}
{d
3
}
{d
1
,d
2
}
{d
1
,d
3
}
{d
2
,d
3
}
{d
1
,d
2
,d
3
}
(
⊥
)
important
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentMeet SemiLattices
vs
Partially Ordered Sets
•
A
meetsemilattice
is a partially ordered set which
has a
meet
(or
greatest lower bound
) for any nonempty finite subset.
•
Greatest lower bound: x
∧
y = First common descendant of x & y
•
Largest: top element T,
if x
∧
T
=
x for all x.
•
Smallest: bottom element
⊥
, if x
∧
⊥
=
⊥
for all x.
This is the end of the preview. Sign up
to
access the rest of the document.
This document was uploaded on 03/12/2012.
 Winter '09

Click to edit the document details