Programming languages that allow non-local control jumps also need to provide an unwind-protect facility. Unwind-protect associates a postlude with a given block B of code, and guarantees that the postlude will always be executed regardless of whether B concludes normally or is exited by a jump. This facility is routinely provided in all languages with first-order control operators. Unfortunately, in languages such as Scheme and ML with higher-order control, unwind-protect does not have a clear meaning, although the need for some form of protection continues to exist. We will explore the problem of specifying and implementing unwind-protect in the higher-order control scenario of Scheme.
Permission to make digital or hard copies, to republish, to post on servers or to redistribute to lists all or part of this work is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To otherwise copy or redistribute requires prior specific permission. Fourth Workshop on Scheme and Functional Programming. November 7, 2003, Boston, Massachusetts, USA. Copyright 2003 Dorai Sitaram.