Changeset 553f8abe
- Timestamp:
- Jun 3, 2021, 4:23:07 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 4ed7946e
- Parents:
- 3f4bf57
- Location:
- doc/theses/andrew_beach_MMath
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/existing.tex
r3f4bf57 r553f8abe 1 1 \chapter{\CFA Existing Features} 2 \label{c:existing} 2 3 3 4 \CFA (C-for-all)~\cite{Cforall} is an open-source project extending ISO C with … … 58 59 with a @&@ and then assigning a pointer too them. 59 60 60 \begin{minipage}{0, 5\textwidth}61 \begin{minipage}{0,45\textwidth} 61 62 With references: 62 63 \begin{cfa} … … 69 70 \end{cfa} 70 71 \end{minipage} 71 \begin{minipage}{0, 5\textwidth}72 \begin{minipage}{0,45\textwidth} 72 73 With pointers: 73 74 \begin{cfa} -
doc/theses/andrew_beach_MMath/features.tex
r3f4bf57 r553f8abe 1 1 \chapter{Exception Features} 2 \label{c:features} 2 3 3 4 This chapter covers the design and user interface of the \CFA -
doc/theses/andrew_beach_MMath/future.tex
r3f4bf57 r553f8abe 1 1 \chapter{Future Work} 2 \label{c:future} 2 3 3 4 \section{Language Improvements} -
doc/theses/andrew_beach_MMath/implement.tex
r3f4bf57 r553f8abe 1 1 \chapter{Implementation} 2 % Goes over how all the features are implemented. 2 \label{c:implement} 3 3 4 4 The implementation work for this thesis covers two components: the virtual -
doc/theses/andrew_beach_MMath/intro.tex
r3f4bf57 r553f8abe 4 4 This thesis goes over the design and implementation of the exception handling 5 5 mechanism (EHM) of 6 \CFA (pronounced see-for-all and also written Cforall or CFA). 7 Exception handling provides more complex dynamic inter-function control flow. 8 For 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@. 6 \CFA (pernounced sea-for-all and may be written Cforall or CFA). 7 Exception handling provides dynamic inter-function control flow. 8 There are two forms of exception handling covered in this thesis: 9 termination, which acts as a multi-level return, 10 and resumption, which is a dynamic function call. 11 This seperation is uncommon because termination exception handling is so 12 much more common that it is often assumed. 13 14 Termination exception handling allows control to return to any previous 15 function on the stack directly, skipping any functions between it and the 16 current function. 10 17 \begin{center} 11 18 \input{callreturn} 12 19 \end{center} 13 Exception handling allows deviations,14 such as @f@ returning directly to @h@ and the intervening call to @g@ is unwound.15 Other derivations include dynamic function call (old Lisp~\cite{CommonLisp} call) versus static or continuation passing.16 Basically, any non-linear form of call-return can be part of an EHM.17 20 18 Although 19 powerful, an EHM tends to be conceptually more complex and expensive to use, and hence often limited 20 to unusual or ``exceptional" cases. 21 Resumption exception handling calls a function, but asks the functions on the 22 stack what function that is. 23 \todo{Add a diagram showing control flow for resumption.} 24 25 Although a powerful feature, exception handling tends to be complex to set up 26 and expensive to use 27 so they are often limited to unusual or ``exceptional" cases. 21 28 The classic example of this is error handling, exceptions can be used to 22 remove error-handling logic from the main execution path and paying a higher 23 performance cost only when the error actually occurs. 24 25 \section{Background} 26 27 Programming languages that provide different forms of EHM are: ... 28 29 Mention the popular ``return union'' approach, which does not change the call/return control-flow. 30 31 \section{New Work} 29 remove error handling logic from the main execution path and while paying 30 most of the cost only when the error actually occurs. 32 31 33 32 % Overview of exceptions in Cforall. 34 This thesisdescribes the design and implementation of the \CFA EHM.35 The workimplements all of the common exception features (or an33 This work describes the design and implementation of the \CFA EHM. 34 The \CFA EHM implements all of the common exception features (or an 36 35 equivalent) found in most other EHMs and adds some features of its own. 37 36 The design of all the features had to be adapted to \CFA's feature set as … … 53 52 54 53 % A note that yes, that was a very fast overview. 55 The design and implementation of all of \CFA's EHM's features are56 described in detail throughout inthis thesis, whether they are a common feature54 All the design and implementation of all of \CFA's EHM's features are 55 described in detail throughout this thesis, whether they are a common feature 57 56 or one unique to \CFA. 58 57 59 58 % The current state of the project and what it contributes. 60 All of these features have been implemented in \CFA, along with61 a suite of test cases , as part of this thesis.59 All of these features have been added to the \CFA implemenation, along with 60 a suite of test cases as part of this project. 62 61 The implementation techniques are generally applicable in other programming 63 languages and much of the design as well. Although some of \CFA's more unusual EHM feature 64 would not be found in other programming languages. 62 languages and much of the design is as well. 63 Some parts of the EHM use other features unique to \CFA and these would be 64 harder to replicate in other programming languages. 65 65 66 \section{Contributions} 66 % Talk about other programming languages. 67 Some existing programming languages that include EHMs/exception handling 68 include C++, Java and Python. All three examples focus on termination 69 exceptions which unwind the stack as part of the 70 Exceptions also can replace return codes and return unions. 71 In functional languages will also sometimes fold exceptions into monads. 67 72 68 73 The contributions of this work are: 69 74 \begin{enumerate} 70 \item 71 \item 72 \item 73 \item 75 \item Designing \CFA's exception handling mechanism, adapting designs from 76 other programming languages and the creation of new features. 77 \item Implementing stack unwinding and the EHM in \CFA, including updating 78 the compiler and the run-time environment. 79 \item Designed and implemented a prototype virtual system. 80 % I think the virtual system and per-call site default handlers are the only 81 % "new" features, everything else is a matter of implementation. 74 82 \end{enumerate} 75 83 76 \section{Road Map} 84 \todo{I can't figure out a good lead-in to the overview.} 85 Covering the existing \CFA features in \autoref{c:existing}. 86 Then the new features are introduce in \autoref{c:features}, explaining their 87 usage and design. 88 That is followed by the implementation of those features in 89 \autoref{c:implement}. 90 % Future Work \autoref{c:future}
Note: See TracChangeset
for help on using the changeset viewer.