Changeset 814f87d for doc/theses
- Timestamp:
- Sep 23, 2021, 3:36:04 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 9411cf0
- Parents:
- 75c7252
- Location:
- doc/theses/andrew_beach_MMath
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/features.tex
r75c7252 r814f87d 908 908 After a coroutine stack is unwound, control returns to the @resume@ function 909 909 that most recently resumed it. @resume@ reports a 910 @CoroutineCancelled@ exception, which contains a reference sto the cancelled910 @CoroutineCancelled@ exception, which contains a reference to the cancelled 911 911 coroutine and the exception used to cancel it. 912 912 The @resume@ function also takes the \defaultResumptionHandler{} from the -
doc/theses/andrew_beach_MMath/implement.tex
r75c7252 r814f87d 414 414 of a function's state with @setjmp@ and restoring that snapshot with 415 415 @longjmp@. This approach bypasses the need to know stack details by simply 416 reset ing to a snapshot of an arbitrary but existing function frame on the416 resetting to a snapshot of an arbitrary but existing function frame on the 417 417 stack. It is up to the programmer to ensure the snapshot is valid when it is 418 418 reset and that all required cleanup from the unwound stacks is performed. 419 This approach is fragile and requires extra work in the surrounding code. 419 Because it does not automate or check any of this cleanup, 420 it can be easy to make mistakes and always must be handled manually. 420 421 421 422 With respect to the extra work in the surrounding code, … … 435 436 library that provides tools for stack walking, handler execution, and 436 437 unwinding. What follows is an overview of all the relevant features of 437 libunwind needed for this work, and how \CFA uses them to implement exception 438 handling. 438 libunwind needed for this work. 439 Following that is the description of the \CFA code that uses libunwind 440 to implement termination. 439 441 440 442 \subsection{libunwind Usage} -
doc/theses/andrew_beach_MMath/intro.tex
r75c7252 r814f87d 220 220 unwinding the stack like in termination exception 221 221 handling.\cite{RustPanicMacro}\cite{RustPanicModule} 222 Go's panic th rough is very similar to a termination, except it only supports222 Go's panic though is very similar to a termination, except it only supports 223 223 a catch-all by calling \code{Go}{recover()}, simplifying the interface at 224 224 the cost of flexibility.\cite{Go:2021} … … 265 265 This pattern is very popular in any functional or semi-functional language 266 266 with primitive support for tagged unions (or algebraic data types). 267 % We need listing Rust/rust to format code snippets from it. 268 % Rust's \code{rust}{Result<T, E>} 267 Return unions can also be expressed as monads (evaluation in a context) 268 and often are in languages with special syntax for monadic evaluation, 269 such as Haskell's \code{haskell}{do} blocks. 270 269 271 The main advantage is that an arbitrary object can be used to represent an 270 272 error, so it can include a lot more information than a simple error code. … … 272 274 execution, and if there aren't primitive tagged unions proper, usage can be 273 275 hard to enforce. 276 % We need listing Rust/rust to format code snippets from it. 277 % Rust's \code{rust}{Result<T, E>} 278 279 Return unions as monads will result in the same code, but can hide most 280 of the work to propagate errors in simple cases. The code to actually handle 281 the errors, or to interact with other monads (a common case in these 282 languages) still has to be written by hand. 274 283 275 284 \item\emph{Handler Functions}: -
doc/theses/andrew_beach_MMath/performance.tex
r75c7252 r814f87d 37 37 resumption exceptions. Even the older programming languages with resumption 38 38 seem to be notable only for having resumption. 39 On the other hand, the functional equivalents to resumption are too new. 40 There does not seem to be any standard implementations in well-known 41 languages, so far they seem confined to extensions and research languages. 42 % There was some maybe interesting comparison to an OCaml extension 43 % but I'm not sure how to get that working if it is interesting. 39 44 Instead, resumption is compared to its simulation in other programming 40 45 languages: fixup functions that are explicitly passed into a function. -
doc/theses/andrew_beach_MMath/uw-ethesis.bib
r75c7252 r814f87d 50 50 author={The Rust Team}, 51 51 key={Rust Panic Macro}, 52 howpublished={\href{https://doc.rust-lang.org/std/ panic/index.html}{https://\-doc.rust-lang.org/\-std/\-panic/\-index.html}},52 howpublished={\href{https://doc.rust-lang.org/std/macro.panic.html}{https://\-doc.rust-lang.org/\-std/\-macro.panic.html}}, 53 53 addendum={Accessed 2021-08-31}, 54 54 }
Note: See TracChangeset
for help on using the changeset viewer.