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

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since d286e94d was e8a7ca2, checked in by Andrew Beach <ajbeach@…>, 3 years ago

Andrew MMath: I'm going in circles with the introduction so here is the first version.

  • Property mode set to 100644
File size: 1.8 KB
Line 
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
6\CFA (pernounced sea-for-all, can also be written Cforall or CFA).
7Exception handling provides dynamic inter-function control flow. Although
8a powerful feature they tend to be expensive to use so they are often limited
9to unusual or ``exceptional" cases.
10The classic example of this is error handling, exceptions can be used to
11remove error handling logic from the main execution path and paying most of
12the cost only when the error actually occurs.
13
14% Overview of exceptions in Cforall.
15The \CFA EHM implements all of the common exception features (or an
16equivalent) found in most other EHMs and adds some features of its own.
17The design of all the features had to be adapted to \CFA's feature set as
18some of the underlying tools used to implement and express exception handling
19in other languages are absent in \CFA.
20Still the resulting syntax resembles that of other languages:
21\begin{cfa}
22try {
23        ...
24        T * object = malloc(request_size);
25        if (!object) {
26                throw OutOfMemory{fixed_allocation, request_size};
27        }
28        ...
29} catch (OutOfMemory * error) {
30        ...
31}
32\end{cfa}
33
34% A note that yes, that was a very fast overview.
35All the design and implementation of all of \CFA's EHM's features are
36described in detail later in this thesis, whether they are a common feature
37or one unique to \CFA.
38
39% The current state of the project and what it contributes.
40All of these features have been added to the \CFA implemenation, along with
41a suite of test cases.
42The implementation techniques are generally applicable in other programming
43languages and much of the design is as well, although occationally
44replacements for some of \CFA's more unusual feature would have to be found.
Note: See TracBrowser for help on using the repository browser.