Go backward to
Minimal Types
Go up to
Top
Go forward to
Extension of Subtyping
Denotational Semantics
Meaning of subtyping relation
[[
theta
1
<=
theta
2
]]: [[
theta
1
]]
->
[[
theta
2
]]
Coercion
map must exist.
[[
theta
<=
theta
]] is identity function.
[[
theta
1
<=
theta
3
]] = [[
theta
2
<=
theta
3
]] o [[
theta
1
<=
theta
2
]]
[[
pi
|- E:
theta
2
]]
e
s
= [[
theta
1
<=
theta
2
]]([[
pi
|- E:
theta
1
]]
e
s
)
Semantics must be
coherent
Meaning of well-typed program independent of derivation used to assert well-typing.
Subtyping on objects:
{I
1
:
theta
1
,...,I
m
:
theta
m
,...,I
n
:
theta
n
} <=
{I
1
:
theta
1
',...,I
m
:
theta
m
'}
if 0 <=
m
<=
n
and
theta
j
<=
theta
j
' for all 1 <=
j
<=
m
[[{I
1
:
theta
1
,...,I
m
:
theta
m
,...,I
n
:
theta
n
} <=
{I
1
:
theta
1
',...,I
m
:
theta
m
'}]]
{I
1
=
v
1
,...,I
m
=v
m
,...,I
n
=v
n
}
= {I
1
=[[
theta
1
<=
theta
1
']]
v
1
,...,[[
theta
m
<=
theta
m
']]
v
m
}
Author:
Wolfgang Schreiner
Last Modification: May 14, 1998