Changeset 7620e5d for doc/theses
- Timestamp:
- Aug 19, 2021, 3:36:35 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
- Children:
- 315e5e3
- Parents:
- fe8aa21
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/future.tex
rfe8aa21 r7620e5d 2 2 \label{c:future} 3 3 4 The following discussion covers both missing language features that affected my 5 work and research based improvements. 6 4 7 \section{Language Improvements} 5 \todo{Future/Language Improvements seems to have gotten mixed up. It is 6 presented as ``waiting on language improvements" but really its more 7 non-research based impovements.} 8 8 9 \CFA is a developing programming language. As such, there are partially or 9 unimplemented features of the language(including several broken components)10 that I had to workaround while building an exception handling systemlargely in10 unimplemented features (including several broken components) 11 that I had to workaround while building an EHM largely in 11 12 the \CFA language (some C components). The following are a few of these 12 13 issues, and once implemented/fixed, how they would affect the exception system. … … 14 15 \item 15 16 The implementation of termination is not portable because it includes 16 hand-crafted assembly statements. 17 The existing compilers cannot translate that for other platforms and those 18 sections must be ported by hand to 19 support more hardware architectures, such as the ARM processor. 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. 20 22 \item 21 23 Due to a type-system problem, the catch clause cannot bind the exception to a … … 27 29 @return@, \etc. The reason is that current code generation hoists a handler 28 30 into a nested function for convenience (versus assemble-code generation at the 29 @try@ statement). Hence, when the handler runs, its code is not in the lexical 30 scope of the @try@ statement, where the local control-flow transfers are 31 meaningful. 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. 32 35 \item 33 36 There is no detection of colliding unwinds. It is possible for clean-up code 34 37 run during an unwind to trigger another unwind that escapes the clean-up code 35 38 itself; such as a termination exception caught further down the stack or a 36 cancellation. There do exist ways to handle this but currently they are not37 even detected and the first unwind will simply beforgotten, often leaving39 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 38 41 it in a bad state. 39 42 \item 40 Also the exception system did not have a lot of time to be tried and tested.41 So just letting people use the exception system more will reveal new42 quality of life upgrades that can be made with time.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. 43 46 \end{itemize} 44 47 … … 47 50 project, but was thrust upon it to do exception inheritance; hence, only 48 51 minimal work is done. A draft for a complete virtual system is available but 49 it isnot finalized. A future \CFA project is to complete that work and then52 not finalized. A future \CFA project is to complete that work and then 50 53 update the exception system that uses the current version. 51 54 … … 53 56 exception traits. The most important one is an assertion to check one virtual 54 57 type is a child of another. This check precisely captures many of the 55 c orrectness requirements.58 current ad-hoc correctness requirements. 56 59 57 60 The full virtual system might also include other improvement like associated 58 61 types to allow traits to refer to types not listed in their header. This 59 62 feature allows exception traits to not refer to the virtual-table type 60 explicitly , removing the need for the current interface macros.63 explicitly. %, removing the need for the current interface macros. 61 64 62 65 \section{Additional Raises} … … 93 96 Checked exceptions make exceptions part of a function's type by adding an 94 97 exception signature. An exception signature must declare all checked 95 exceptions that could propagate from the function (either because they were96 raised inside the function or came from a sub-function). This improves safety98 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 97 100 by making sure every checked exception is either handled or consciously 98 101 passed on. 99 102 100 103 However checked exceptions were never seriously considered for this project 101 because they have significant trade-offs in usab lity and code reuse in104 because they have significant trade-offs in usability and code reuse in 102 105 exchange for the increased safety. 103 106 These trade-offs are most problematic when trying to pass exceptions through … … 129 132 not support a successful-exiting stack-search without doing an unwind. 130 133 Workarounds are possible but awkward. Ideally an extension to libunwind could 131 be made, but that would either require separate maintenance or gain enough132 support to have it folded into the standard.134 be made, but that would either require separate maintenance or gaining enough 135 support to have it folded into the code base. 133 136 134 137 Also new techniques to skip previously searched parts of the stack need to be … … 158 161 to leave the handler. 159 162 Currently, mimicking this behaviour in \CFA is possible by throwing a 160 termination inside a resumption handler.163 termination exception inside a resumption handler. 161 164 162 165 % Maybe talk about the escape; and escape CONTROL_STMT; statements or how
Note: See TracChangeset
for help on using the changeset viewer.