Ignore:
Timestamp:
Aug 21, 2021, 5:49:45 PM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
Children:
c2a9d88
Parents:
d8f8d08
Message:

Saved and reverted another set of Peter's changes.

File:
1 edited

Legend:

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

    rd8f8d08 r7372065  
    22\label{c:future}
    33
    4 The following discussion covers both missing language features that affected my
    5 work and research based improvements.
    6 
    74\section{Language Improvements}
    8 
     5\todo{Future/Language Improvements seems to have gotten mixed up. It is
     6presented as ``waiting on language improvements" but really its more
     7non-research based impovements.}
    98\CFA is a developing programming language. As such, there are partially or
    10 unimplemented features (including several broken components)
    11 that I had to workaround while building an EHM largely in
     9unimplemented features of the language (including several broken components)
     10that I had to workaround while building an exception handling system largely in
    1211the \CFA language (some C components).  The following are a few of these
    1312issues, and once implemented/fixed, how they would affect the exception system.
     
    1514\item
    1615The implementation of termination is not portable because it includes
    17 hand-crafted assembly statements for each architecture, where the
    18 ARM processor was just added.
    19 % The existing compilers cannot translate that for other platforms and those
    20 % sections must be ported by hand to
    21 Supporting more hardware architectures in a general way is important.
     16hand-crafted assembly statements.
     17The existing compilers cannot translate that for other platforms and those
     18sections must be ported by hand to
     19support more hardware architectures, such as the ARM processor.
    2220\item
    2321Due to a type-system problem, the catch clause cannot bind the exception to a
     
    2927@return@, \etc. The reason is that current code generation hoists a handler
    3028into a nested function for convenience (versus assemble-code generation at the
    31 @try@ statement). Hence, when the handler runs, its can access local variable
    32 in the lexical scope of the @try@ statement, but the closure does not capture
    33 local control-flow points so it cannot perform non-local transfers in the
    34 hoisted function.
     29@try@ statement). Hence, when the handler runs, its code is not in the lexical
     30scope of the @try@ statement, where the local control-flow transfers are
     31meaningful.
    3532\item
    3633There is no detection of colliding unwinds. It is possible for clean-up code
    3734run during an unwind to trigger another unwind that escapes the clean-up code
    3835itself; such as a termination exception caught further down the stack or a
    39 cancellation. There do exist ways to handle this case, but currently there is no
    40 detection and the first unwind is simply forgotten, often leaving
     36cancellation. There do exist ways to handle this but currently they are not
     37even detected and the first unwind will simply be forgotten, often leaving
    4138it in a bad state.
    4239\item
    43 Finally, the exception system has not have a lot programmer testing.
    44 More time with encouraged usage will reveal new
    45 quality of life upgrades that can be made.
     40Also the exception system did not have a lot of time to be tried and tested.
     41So just letting people use the exception system more will reveal new
     42quality of life upgrades that can be made with time.
    4643\end{itemize}
    4744
     
    5047project, but was thrust upon it to do exception inheritance; hence, only
    5148minimal work is done. A draft for a complete virtual system is available but
    52 not finalized.  A future \CFA project is to complete that work and then
     49it is not finalized.  A future \CFA project is to complete that work and then
    5350update the exception system that uses the current version.
    5451
     
    5653exception traits. The most important one is an assertion to check one virtual
    5754type is a child of another. This check precisely captures many of the
    58 current ad-hoc correctness requirements.
     55correctness requirements.
    5956
    6057The full virtual system might also include other improvement like associated
    6158types to allow traits to refer to types not listed in their header. This
    6259feature allows exception traits to not refer to the virtual-table type
    63 explicitly. %, removing the need for the current interface macros.
     60explicitly, removing the need for the current interface macros.
    6461
    6562\section{Additional Raises}
     
    9693Checked exceptions make exceptions part of a function's type by adding an
    9794exception signature. An exception signature must declare all checked
    98 exceptions that could propagate from the function, either because they were
    99 raised inside the function or a call to a sub-function. This improves safety
     95exceptions that could propagate from the function (either because they were
     96raised inside the function or came from a sub-function). This improves safety
    10097by making sure every checked exception is either handled or consciously
    10198passed on.
    10299
    103100However checked exceptions were never seriously considered for this project
    104 because they have significant trade-offs in usability and code reuse in
     101because they have significant trade-offs in usablity and code reuse in
    105102exchange for the increased safety.
    106103These trade-offs are most problematic when trying to pass exceptions through
     
    132129not support a successful-exiting stack-search without doing an unwind.
    133130Workarounds are possible but awkward. Ideally an extension to libunwind could
    134 be made, but that would either require separate maintenance or gaining enough
    135 support to have it folded into the code base.
     131be made, but that would either require separate maintenance or gain enough
     132support to have it folded into the standard.
    136133
    137134Also new techniques to skip previously searched parts of the stack need to be
     
    161158to leave the handler.
    162159Currently, mimicking this behaviour in \CFA is possible by throwing a
    163 termination exception inside a resumption handler.
     160termination inside a resumption handler.
    164161
    165162% Maybe talk about the escape; and escape CONTROL_STMT; statements or how
Note: See TracChangeset for help on using the changeset viewer.