Changeset 9cdfa5fb for doc/theses/andrew_beach_MMath/future.tex
- Timestamp:
- Sep 10, 2021, 10:43:15 AM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 63b3279e
- Parents:
- d0b9247
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/future.tex
rd0b9247 r9cdfa5fb 3 3 4 4 The following discussion covers both possible interesting research 5 that could follow from this work as longas simple implementation5 that could follow from this work as well as simple implementation 6 6 improvements. 7 7 … … 10 10 \CFA is a developing programming language. As such, there are partially or 11 11 unimplemented features (including several broken components) 12 that I had to work around while building the EHM largely in12 that I had to work around while building the EHM largely in 13 13 the \CFA language (some C components). Below are a few of these issues 14 14 and how implementing/fixing them would affect the EHM. 15 In addition there are some simple improvements that had no interesting15 In addition, there are some simple improvements that had no interesting 16 16 research attached to them but would make using the language easier. 17 17 \begin{itemize} … … 28 28 Termination handlers cannot use local control-flow transfers, \eg by @break@, 29 29 @return@, \etc. The reason is that current code generation hoists a handler 30 into a nested function for convenience (versus assembl e-code generation at the30 into a nested function for convenience (versus assembly-code generation at the 31 31 try statement). Hence, when the handler runs, it can still access local 32 32 variables in the lexical scope of the try statement. Still, it does mean 33 33 that seemingly local control flow is not in fact local and crosses a function 34 34 boundary. 35 Making the termination handler s code within the surrounding35 Making the termination handler's code within the surrounding 36 36 function would remove this limitation. 37 37 % Try blocks are much more difficult to do practically (requires our own 38 38 % assembly) and resumption handlers have some theoretical complexity. 39 39 \item 40 There is no detection of colliding unwinds. It is possible for clean -up code41 run during an unwind to trigger another unwind that escapes the clean -up code42 itself ;such as a termination exception caught further down the stack or a40 There is no detection of colliding unwinds. It is possible for cleanup code 41 run during an unwind to trigger another unwind that escapes the cleanup code 42 itself, such as a termination exception caught further down the stack or a 43 43 cancellation. There do exist ways to handle this case, but currently there is 44 44 no detection and the first unwind will simply be forgotten, often leaving … … 64 64 Other features of the virtual system could also remove some of the 65 65 special cases around exception virtual tables, such as the generation 66 of the @msg@ function , could be removed.66 of the @msg@ function. 67 67 68 68 The full virtual system might also include other improvement like associated … … 74 74 \section{Additional Raises} 75 75 Several other kinds of exception raises were considered beyond termination 76 (@throw@), resumption (@throwResume@), and re raise.76 (@throw@), resumption (@throwResume@), and re-raise. 77 77 78 78 The first is a non-local/concurrent raise providing asynchronous exceptions, … … 110 110 passed on. 111 111 112 However checked exceptions were never seriously considered for this project112 Checked exceptions were never seriously considered for this project 113 113 because they have significant trade-offs in usability and code reuse in 114 114 exchange for the increased safety. … … 116 116 higher-order functions from the functions the user passed into the 117 117 higher-order function. There are no well known solutions to this problem 118 that were satisfactory for \CFA (which carries some of C's flexibility119 oversafety design) so additional research is needed.118 that were satisfactory for \CFA (which carries some of C's 119 flexibility-over-safety design) so additional research is needed. 120 120 121 121 Follow-up work might add some form of checked exceptions to \CFA, … … 140 140 Zero-cost resumptions is still an open problem. First, because libunwind does 141 141 not support a successful-exiting stack-search without doing an unwind. 142 Workarounds are possible but awkward. Ideally an extension to libunwind could142 Workarounds are possible but awkward. Ideally, an extension to libunwind could 143 143 be made, but that would either require separate maintenance or gaining enough 144 144 support to have it folded into the official library itself. 145 145 146 Also new techniques to skip previously searched parts of the stack need to be146 Also, new techniques to skip previously searched parts of the stack need to be 147 147 developed to handle the recursive resume problem and support advanced algebraic 148 148 effects.
Note: See TracChangeset
for help on using the changeset viewer.