Statics. The typing rule for the new form of task is given in
Figure 12. The rule uses the rules for typing heaps to assign a
398
signature to the concatenation of the from- and to-heaps. Since
values in Hf might refer to locations that have already been copied,
we forward the values of Hf before concatenating with Ht . The
expression must be well-typed under the concatenation of the global
signature 0 and this new signature . In addition, the typing rule
also enforces a key invariant of garbage collection: that the scan set
S is equal to the set FL(Ht e) of locations that appear free in either
e or a binding of Ht and are not bound in Ht . Formally,