Go backward to
Dynamic Scoping
Go up to
Top
Go forward to
Extent
Semantics of Dynamic Scoping
Phrase's environment not determined until phrase is evaluated!
[[
define
I=U]]
e
s
= ({I=
f
},
s
)
where
f
e'
s'
= [[U]]
e'
s'
[[
invoke
I]]
e
s
=
f
e
s
where (I=
f
) in
e
Environment behaves like store!
Semantics for untyped phrases
Types of phrases cannt be predicated.
Well-formedness of semantics in question.
Strange programs can be written:
begin proc
P
=
call
P
in call
P
end
[[...]]
e
0
s
0
=
f
(
e
0
-U- {
P
=
f
})
s
0
f
must receive itself as argument!
Author:
Wolfgang Schreiner
Last Modification: May 14, 1998