Changeset 553f8ab


Ignore:
Timestamp:
Jun 3, 2021, 4:23:07 PM (16 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
4ed7946e
Parents:
3f4bf57
Message:

Andrew MMath: Responding to Peter's suggestions on the introduction.

Location:
doc/theses/andrew_beach_MMath
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/existing.tex

    r3f4bf57 r553f8ab  
    11\chapter{\CFA Existing Features}
     2\label{c:existing}
    23
    34\CFA (C-for-all)~\cite{Cforall} is an open-source project extending ISO C with
     
    5859with a @&@ and then assigning a pointer too them.
    5960
    60 \begin{minipage}{0,5\textwidth}
     61\begin{minipage}{0,45\textwidth}
    6162With references:
    6263\begin{cfa}
     
    6970\end{cfa}
    7071\end{minipage}
    71 \begin{minipage}{0,5\textwidth}
     72\begin{minipage}{0,45\textwidth}
    7273With pointers:
    7374\begin{cfa}
  • doc/theses/andrew_beach_MMath/features.tex

    r3f4bf57 r553f8ab  
    11\chapter{Exception Features}
     2\label{c:features}
    23
    34This chapter covers the design and user interface of the \CFA
  • doc/theses/andrew_beach_MMath/future.tex

    r3f4bf57 r553f8ab  
    11\chapter{Future Work}
     2\label{c:future}
    23
    34\section{Language Improvements}
  • doc/theses/andrew_beach_MMath/implement.tex

    r3f4bf57 r553f8ab  
    11\chapter{Implementation}
    2 % Goes over how all the features are implemented.
     2\label{c:implement}
    33
    44The implementation work for this thesis covers two components: the virtual
  • doc/theses/andrew_beach_MMath/intro.tex

    r3f4bf57 r553f8ab  
    44This thesis goes over the design and implementation of the exception handling
    55mechanism (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).
     7Exception handling provides dynamic inter-function control flow.
     8There are two forms of exception handling covered in this thesis:
     9termination, which acts as a multi-level return,
     10and resumption, which is a dynamic function call.
     11This seperation is uncommon because termination exception handling is so
     12much more common that it is often assumed.
     13
     14Termination exception handling allows control to return to any previous
     15function on the stack directly, skipping any functions between it and the
     16current function.
    1017\begin{center}
    1118\input{callreturn}
    1219\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.
    1720
    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.
     21Resumption exception handling calls a function, but asks the functions on the
     22stack what function that is.
     23\todo{Add a diagram showing control flow for resumption.}
     24
     25Although a powerful feature, exception handling tends to be complex to set up
     26and expensive to use
     27so they are often limited to unusual or ``exceptional" cases.
    2128The 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}
     29remove error handling logic from the main execution path and while paying
     30most of the cost only when the error actually occurs.
    3231
    3332% Overview of exceptions in Cforall.
    34 This thesis describes the design and implementation of the \CFA EHM.
    35 The work implements all of the common exception features (or an
     33This work describes the design and implementation of the \CFA EHM.
     34The \CFA EHM implements all of the common exception features (or an
    3635equivalent) found in most other EHMs and adds some features of its own.
    3736The design of all the features had to be adapted to \CFA's feature set as
     
    5352
    5453% A note that yes, that was a very fast overview.
    55 The design and implementation of all of \CFA's EHM's features are
    56 described in detail throughout in this thesis, whether they are a common feature
     54All the design and implementation of all of \CFA's EHM's features are
     55described in detail throughout this thesis, whether they are a common feature
    5756or one unique to \CFA.
    5857
    5958% The current state of the project and what it contributes.
    60 All of these features have been implemented in \CFA, along with
    61 a suite of test cases, as part of this thesis.
     59All of these features have been added to the \CFA implemenation, along with
     60a suite of test cases as part of this project.
    6261The 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.
     62languages and much of the design is as well.
     63Some parts of the EHM use other features unique to \CFA and these would be
     64harder to replicate in other programming languages.
    6565
    66 \section{Contributions}
     66% Talk about other programming languages.
     67Some existing programming languages that include EHMs/exception handling
     68include C++, Java and Python. All three examples focus on termination
     69exceptions which unwind the stack as part of the
     70Exceptions also can replace return codes and return unions.
     71In functional languages will also sometimes fold exceptions into monads.
    6772
    6873The contributions of this work are:
    6974\begin{enumerate}
    70 \item
    71 \item
    72 \item
    73 \item
     75\item Designing \CFA's exception handling mechanism, adapting designs from
     76other programming languages and the creation of new features.
     77\item Implementing stack unwinding and the EHM in \CFA, including updating
     78the 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.
    7482\end{enumerate}
    7583
    76 \section{Road Map}
     84\todo{I can't figure out a good lead-in to the overview.}
     85Covering the existing \CFA features in \autoref{c:existing}.
     86Then the new features are introduce in \autoref{c:features}, explaining their
     87usage and design.
     88That 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.