Information Technology Reference
In-Depth Information
Γ
[
x 7!
b
x
]
`
CFA
e
0
:
b
0
Γ `
CFA
c
:
b
c
Γ `
CFA
fn
x
=>
e
0
:
fg['
!
0
b
x
Γ `
CFA
e
1
:
'
!
b
0
Γ `
CFA
e
2
:
b
2
b
2
Γ `
CFA
x
:
Γ
(
x
)
Γ `
CFA
e
1
e
2
:
b
0
Table 1.
Control Flow Analysis:
Γ `
CFA
e
:
(Example 2).
b
rather than
because the latter choice does not give rise to a
conservative
extension
of the underlying type system: this means that there will be expres-
sions that are typed in the underlying type system but that have no analysis in
the control flow analysis; (this point is related to the issue of subeecting to be
discussed in Section 3.)
We should point out that we allow to replace
fg
'
1
'
2
1
!
b
2
by
1
!
b
2
whenever
b
b
'
1
and
2
if they
have the same underlying types and all annotations on corresponding function
arrows are \equal as sets". To be utterly formal this can be axiomatised by a
set of axioms and rules expressing that set union has a unit and is idempotent,
commutative, and associative, together with axioms and rules ensuring that
equality is an equivalence relation as well as a congruence; the abbreviation
UCAI
is often used for these properties.
'
2
are \equal as sets". More generally we allow to replace
1
by
b
b
t
Subtyping and Polymorphism
Another popular class of analyses that can be expressed by annotations is the
binding time analyses (e.g. [13]) which distinguish data as to whether they are
static (available at compile-time) or dynamic (available at run-time); these anal-
yses form the basis of
partial evaluation
and can also be used as the basis for
security
analyses (e.g. [12]) that distinguish between secret and public informa-
tion.
Example 3. Binding Time Analysis.
For binding time analysis we extend the language of Examples 1 and 2 with a
let
-construct:
e
2
(In fact
let
x
=
e
1
in
e
2
is semantically equivalent to (
fn
x
=>
e
2
)
e
::=
j
x
e
1
in
let
=
e
1
.) The
annotations of interest for the binding time analysis are:
'
::=
j
S
j
D
'
!
b
::=
int
'
j
bool
'
jj
b
1
2
b
::=
8
(
1
; ;
n
)
:
b
j
b
b
Search WWH ::
Custom Search