Escaping Locations
- Answer produced by block contains location:
- begin proc P =
begin var A: newint;
proc Q(X: intexp) = A:=X
in Q end
in (call P)(2) end
- Answer of P is parameterized procedure.
- P: intexp -> comm!
- Location of A escapes P
- A bound to loci.
- Answer of P is procedure q that updates loci.
- q v s =
[[mypi -U- {A: intloc, X: intexp}
|- A:=X: comm]]
(e -U- {A=loci, X=v}) s
= update(loci, v, s)
- Current typing system prevents this!
Escaping locations must not be freed!
Author: Wolfgang Schreiner
Last Modification: May 14, 1998