Compiling Exceptions Correctly

Exceptions are an important feature of modern programming languages, but their compilation has traditionally been viewed as an advanced topic. In this article we show that the basic method of compiling exceptions using stack unwinding can be explained and verified both simply and precisely, using e...

Full description

Bibliographic Details
Main Authors: Hutton, Graham, Wright, Joel
Format: Conference or Workshop Item
Published: Springer Lecture Notes in Computer Science 2004
Online Access:https://eprints.nottingham.ac.uk/228/
Description
Summary:Exceptions are an important feature of modern programming languages, but their compilation has traditionally been viewed as an advanced topic. In this article we show that the basic method of compiling exceptions using stack unwinding can be explained and verified both simply and precisely, using elementary functional programming techniques. In particular, we develop a compiler for a small language with exceptions, together with a proof of its correctness.