source: doc/theses/andrew_beach_MMath/intro.tex @ e46ea00

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since e46ea00 was e46ea00, checked in by Peter A. Buhr <pabuhr@…>, 3 years ago

augment introduction chapter with places for extension

  • Property mode set to 100644
File size: 2.7 KB
RevLine 
[e8a7ca2]1\chapter{Introduction}
2
3% Talk about Cforall and exceptions generally.
4This thesis goes over the design and implementation of the exception handling
5mechanism (EHM) of
[e46ea00]6\CFA (pronounced see-for-all and also written Cforall or CFA).
7Exception handling provides more complex dynamic inter-function control flow.
8For example, normally function call is a strict linear form: function @h@ calls @g@,
9@g@ calls @f@, @f@ returns to @g@ and @g@ to @h@.
10\begin{center}
11\input{callreturn}
12\end{center}
13Exception handling allows deviations,
14such as @f@ returning directly to @h@ and the intervening call to @g@ is unwound.
15Other derivations include dynamic function call (old Lisp~\cite{CommonLisp} call) versus static or continuation passing.
16Basically, any non-linear form of call-return can be part of an EHM.
17
18Although
19powerful, an EHM tends to be conceptually more complex and expensive to use, and hence often limited
[e8a7ca2]20to unusual or ``exceptional" cases.
21The classic example of this is error handling, exceptions can be used to
[e46ea00]22remove error-handling logic from the main execution path and paying a higher
23performance cost only when the error actually occurs.
24
25\section{Background}
26
27Programming languages that provide different forms of EHM are: ...
28
29Mention the popular ``return union'' approach, which does not change the call/return control-flow.
30
31\section{New Work}
[e8a7ca2]32
33% Overview of exceptions in Cforall.
[e46ea00]34This thesis describes the design and implementation of the \CFA EHM.
35The work implements all of the common exception features (or an
[e8a7ca2]36equivalent) found in most other EHMs and adds some features of its own.
37The design of all the features had to be adapted to \CFA's feature set as
38some of the underlying tools used to implement and express exception handling
39in other languages are absent in \CFA.
40Still the resulting syntax resembles that of other languages:
41\begin{cfa}
42try {
43        ...
44        T * object = malloc(request_size);
45        if (!object) {
46                throw OutOfMemory{fixed_allocation, request_size};
47        }
48        ...
49} catch (OutOfMemory * error) {
50        ...
51}
52\end{cfa}
53
54% A note that yes, that was a very fast overview.
[e46ea00]55The design and implementation of all of \CFA's EHM's features are
56described in detail throughout in this thesis, whether they are a common feature
[e8a7ca2]57or one unique to \CFA.
58
59% The current state of the project and what it contributes.
[e46ea00]60All of these features have been implemented in \CFA, along with
61a suite of test cases, as part of this thesis.
[e8a7ca2]62The implementation techniques are generally applicable in other programming
[e46ea00]63languages and much of the design as well. Although some of \CFA's more unusual EHM feature
64would not be found in other programming languages.
65
66\section{Contributions}
67
68The contributions of this work are:
69\begin{enumerate}
70\item
71\item
72\item
73\item
74\end{enumerate}
75
76\section{Road Map}
Note: See TracBrowser for help on using the repository browser.