Ignore:
Timestamp:
Jun 16, 2021, 10:44:22 AM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
edebbf7
Parents:
b51e389c
Message:

Andrew MMath: Update the first three chapters using Colby's comments.

File:
1 edited

Legend:

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

    rb51e389c r6071efc  
    1313\subsection{Raise / Handle}
    1414An exception operation has two main parts: raise and handle.
    15 These terms are sometimes also known as throw and catch but this work uses
     15These terms are sometimes known as throw and catch but this work uses
    1616throw/catch as a particular kind of raise/handle.
    1717These are the two parts that the user writes and may
     
    3737Only raises inside the guarded region and raising exceptions that match the
    3838label can be handled by a given handler.
    39 Different EHMs use different rules to pick a handler,
    40 if multiple handlers could be used such as ``best match" or ``first found".
     39If multiple handlers could can handle an exception,
     40EHMs will define a rule to pick one, such as ``best match" or ``first found".
    4141
    4242The @try@ statements of \Cpp, Java and Python are common examples. All three
     
    7474case when stack unwinding is involved.
    7575
    76 If a matching handler is not guarantied to be found, the EHM needs a
     76If a matching handler is not guaranteed to be found, the EHM needs a
    7777different course of action for the case where no handler matches.
    7878This situation only occurs with unchecked exceptions as checked exceptions
     
    105105
    106106\subsection{Completion}
    107 After the handler has finished the entire exception operation has to complete
     107After the handler has finished, the entire exception operation has to complete
    108108and continue executing somewhere else. This step is usually simple,
    109109both logically and in its implementation, as the installation of the handler
     
    126126Virtual types and casts are not part of \CFA's EHM nor are they required for
    127127any EHM.
    128 However, it is one of the best ways to support an exception hierachy
     128However, it is one of the best ways to support an exception hierarchy
    129129is via a virtual hierarchy and dispatch system.
    130130
     
    441441There is a global \defaultResumptionHandler{} is polymorphic over all
    442442resumption exceptions and preforms a termination throw on the exception.
    443 The \defaultTerminationHandler{} can be overriden by providing a new
     443The \defaultTerminationHandler{} can be overridden by providing a new
    444444function that is a better match.
    445445
     
    582582Two things can expose differences between these cases.
    583583
    584 One is the existance of multiple handlers on a single try statement.
     584One is the existence of multiple handlers on a single try statement.
    585585A reraise skips all later handlers on this try statement but a conditional
    586586catch does not.
     
    588588implicitly skipped, with a conditional catch they are not.
    589589Still, they are equivalently powerful,
    590 both can be used two mimick the behaviour of the other,
     590both can be used two mimic the behaviour of the other,
    591591as reraise can pack arbitrary code in the handler and conditional catches
    592592can put arbitrary code in the predicate.
    593 % I was struggling with a long explination about some simple solutions,
     593% I was struggling with a long explanation about some simple solutions,
    594594% like repeating a condition on later handlers, and the general solution of
    595595% merging everything together. I don't think it is useful though unless its
Note: See TracChangeset for help on using the changeset viewer.