\chapter{Introduction} % Talk about Cforall and exceptions generally. This thesis goes over the design and implementation of the exception handling mechanism (EHM) of \CFA (pronounced see-for-all and also written Cforall or CFA). Exception handling provides more complex dynamic inter-function control flow. For example, normally function call is a strict linear form: function @h@ calls @g@, @g@ calls @f@, @f@ returns to @g@ and @g@ to @h@. \begin{center} \input{callreturn} \end{center} Exception handling allows deviations, such as @f@ returning directly to @h@ and the intervening call to @g@ is unwound. Other derivations include dynamic function call (old Lisp~\cite{CommonLisp} call) versus static or continuation passing. Basically, any non-linear form of call-return can be part of an EHM. Although powerful, an EHM tends to be conceptually more complex and expensive to use, and hence often limited to unusual or ``exceptional" cases. The classic example of this is error handling, exceptions can be used to remove error-handling logic from the main execution path and paying a higher performance cost only when the error actually occurs. \section{Background} Programming languages that provide different forms of EHM are: ... Mention the popular ``return union'' approach, which does not change the call/return control-flow. \section{New Work} % Overview of exceptions in Cforall. This thesis describes the design and implementation of the \CFA EHM. The work implements all of the common exception features (or an equivalent) found in most other EHMs and adds some features of its own. The design of all the features had to be adapted to \CFA's feature set as some of the underlying tools used to implement and express exception handling in other languages are absent in \CFA. Still the resulting syntax resembles that of other languages: \begin{cfa} try { ... T * object = malloc(request_size); if (!object) { throw OutOfMemory{fixed_allocation, request_size}; } ... } catch (OutOfMemory * error) { ... } \end{cfa} % A note that yes, that was a very fast overview. The design and implementation of all of \CFA's EHM's features are described in detail throughout in this thesis, whether they are a common feature or one unique to \CFA. % The current state of the project and what it contributes. All of these features have been implemented in \CFA, along with a suite of test cases, as part of this thesis. The implementation techniques are generally applicable in other programming languages and much of the design as well. Although some of \CFA's more unusual EHM feature would not be found in other programming languages. \section{Contributions} The contributions of this work are: \begin{enumerate} \item \item \item \item \end{enumerate} \section{Road Map}